Commit 635a5d23 authored by ElenaSubbotina's avatar ElenaSubbotina

DocFormatReader - background page

parent 6fa18eb2
......@@ -43,7 +43,8 @@ namespace DocFileFormat
/*========================================================================================================*/
WordDocumentProperties::WordDocumentProperties(FileInformationBlock* fib, POLE::Stream* tableStream) : doptypography(NULL), dogrid(NULL), asumyi(NULL)
WordDocumentProperties::WordDocumentProperties(FileInformationBlock* fib, POLE::Stream* tableStream) :
doptypography(NULL), dogrid(NULL), asumyi(NULL), bDisplayBackgroundShape(false)
{
Initialize();
......@@ -226,7 +227,7 @@ namespace DocFileFormat
dywDispPag = FormatUtils::BytesToInt16( bytes, 498, size );
//WORD 2000, 2002, 2003 PART
if ( size > 500 )
if ( size > 500/* && fib->m_FibNew.nFibNew > Fib1997*/)
{
ilvlLastBulletMain = bytes[500];
ilvlLastNumberMain = bytes[501];
......@@ -266,138 +267,158 @@ namespace DocFileFormat
fDntULTrlSpc = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 14 );
fDntBlnSbDbWid = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 15 );
fSuppressTopSpacingMac5 = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 16 );
fTruncDxaExpand = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 17 );
fPrintBodyBeforeHdr = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 18 );
fNoLeading = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 19 );
fMakeSpaceForUL = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 20 );
fMWSmallCaps = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 21 );
f2ptExtLeadingOnly = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 22 );
fTruncFontHeight = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 23 );
fSubOnSize = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 24 );
fLineWrapLikeWord6 = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 25 );
fWW6BorderRules = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 26 );
fExactOnTop = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 27 );
fExtraAfter = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 28 );
fWPSpace = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 29 );
fWPJust = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 30 );
fPrintMet = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 31 );
//split bytes 512,513,514,515 into bits
fSpLayoutLikeWW8 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 0 );
fFtnLayoutLikeWW8 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 1 );
fDontUseHTMLParagraphAutoSpacing = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 2 );
fDontAdjustLineHeightInTable = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 3 );
fForgetLastTabAlign = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 4 );
fUseAutoSpaceForFullWidthAlpha = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 5 );
fAlignTablesRowByRow = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 6 );
fLayoutRawTableWidth = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 7 );
fLayoutTableRowsApart = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 8 );
fUserWord97LineBreakingRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 9 );
fDontBreakWrappedTables = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 10 );
fDontSnapToGridInCell = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 11 );
fDontAllowFieldEndSelect = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 12 );
fApplyBreakingRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 13 );
fDontWrapTextWithPunct = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 14 );
fDontUseAsianBreakRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 15 );
fUseWord2002TableStyleRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 16 );
fGrowAutofit = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 17 );
fUseNormalStyleForList = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 18 );
fDontUseIndentAsNumberingTabStop = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 19 );
fFELineBreak11 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 20 );
fAllowSpaceOfSameStyleInTable = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 21 );
fWW11IndentRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 22 );
fDontAutofitConstrainedTables = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 23 );
fAutofitLikeWW11 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 24 );
fUnderlineTabInNumList = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 25 );
fHangulWidthLikeWW11 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 26 );
fSplitPgBreakAndParaMark = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 27 );
fDontVertAlignCellWithSp = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 28 );
fDontBreakConstrainedForcedTables = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 29 );
fDontVertAlignInTxbx = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 30 );
fWord11KerningPairs = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 31 );
fCachedColBalance = FormatUtils::GetBitFromBytes( ( bytes + 516 ), 4, 0 );
fTruncDxaExpand = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 17 );
fPrintBodyBeforeHdr = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 18 );
fNoLeading = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 19 );
fMakeSpaceForUL = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 20 );
fMWSmallCaps = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 21 );
f2ptExtLeadingOnly = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 22 );
fTruncFontHeight = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 23 );
fSubOnSize = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 24 );
fLineWrapLikeWord6 = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 25 );
fWW6BorderRules = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 26 );
fExactOnTop = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 27 );
fExtraAfter = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 28 );
fWPSpace = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 29 );
fWPJust = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 30 );
fPrintMet = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 31 );
//split bytes 512,513,514,515 into bits
fSpLayoutLikeWW8 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 0 );
fFtnLayoutLikeWW8 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 1 );
fDontUseHTMLParagraphAutoSpacing = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 2 );
fDontAdjustLineHeightInTable = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 3 );
fForgetLastTabAlign = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 4 );
fUseAutoSpaceForFullWidthAlpha = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 5 );
fAlignTablesRowByRow = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 6 );
fLayoutRawTableWidth = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 7 );
fLayoutTableRowsApart = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 8 );
fUserWord97LineBreakingRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 9 );
fDontBreakWrappedTables = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 10 );
fDontSnapToGridInCell = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 11 );
fDontAllowFieldEndSelect = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 12 );
fApplyBreakingRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 13 );
fDontWrapTextWithPunct = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 14 );
fDontUseAsianBreakRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 15 );
fUseWord2002TableStyleRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 16 );
fGrowAutofit = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 17 );
fUseNormalStyleForList = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 18 );
fDontUseIndentAsNumberingTabStop = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 19 );
fFELineBreak11 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 20 );
fAllowSpaceOfSameStyleInTable = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 21 );
fWW11IndentRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 22 );
fDontAutofitConstrainedTables = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 23 );
fAutofitLikeWW11 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 24 );
fUnderlineTabInNumList = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 25 );
fHangulWidthLikeWW11 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 26 );
fSplitPgBreakAndParaMark = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 27 );
fDontVertAlignCellWithSp = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 28 );
fDontBreakConstrainedForcedTables = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 29 );
fDontVertAlignInTxbx = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 30 );
fWord11KerningPairs = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 31 );
fCachedColBalance = FormatUtils::GetBitFromBytes( ( bytes + 516 ), 4, 0 );
//bytes 517-539 are unused
verCompatPreW10 = (unsigned short)FormatUtils::GetUIntFromBytesBits( ( bytes + 540 ), 4, 0, 16 );
fNoMargPgvwSaved = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 16 );
fNoMargPgvWPag = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 17 );
fWebViewPag = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 18 );
fSeeDrawingsPag = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 19 );
fBulletProofed = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 20 );
fCorrupted = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 21 );
fSaveUim = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 22 );
fFilterPrivacy = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 23 );
fInFReplaceNoRM = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 24 );
fSeenRepairs = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 25 );
fHasXML = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 26 );
fSeeScriptAnchorsPag = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 27 );
fValidateXML = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 28 );
fSaveIfInvalidXML = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 29 );
fShowXMLErrors = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 30 );
fAlwaysMergeEmptyNamespace = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 31 );
cpMaxListCacheMainDoc = FormatUtils::BytesToInt32( bytes, 544, size );
//split bytes 548,549 into bits
fDoNotEmbedSystemFont = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 0 );
fWordCompact = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 1 );
fLiveRecover = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 2 );
fEmbedFactoids = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 3 );
fFactoidXML = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 4 );
fFactoidAllDone = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 5 );
fFolioPrint = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 6 );
fReverseFolio = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 7 );
iTextLineEnding = (short)FormatUtils::GetUIntFromBytesBits( ( bytes + 548 ), 2, 8, 3 );
fHideFcc = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 11 );
fAcetateShowMarkup = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 12 );
fAcetateShowAtn = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 13 );
fAcetateShowInsDel = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 14 );
fAcetateShowProps = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 15 );
istdTableDflt = FormatUtils::BytesToUInt16( bytes, 550, size );
verCompat = FormatUtils::BytesToUInt16( bytes, 552, size );
grfFmtFilter = FormatUtils::BytesToUInt16( bytes, 554, size );
iFolioPages = FormatUtils::BytesToInt16( bytes, 556, size );
cpgText = FormatUtils::BytesToUInt16( bytes, 558, size );
cpMinRMText = FormatUtils::BytesToInt32( bytes, 560, size );
cpMinRMFtn = FormatUtils::BytesToInt32( bytes, 564, size );
cpMinRMHdd = FormatUtils::BytesToInt32( bytes, 568, size );
cpMinRMAtn = FormatUtils::BytesToInt32( bytes, 572, size );
cpMinRMEdn = FormatUtils::BytesToInt32( bytes, 576, size );
cpMinRMTxbx = FormatUtils::BytesToInt32( bytes, 580, size );
cpMinRMHdrTxbx = FormatUtils::BytesToInt32( bytes, 584, size );
rsidRoot = FormatUtils::BytesToInt32( bytes, 588, size );
if ( size == 610 )
{
//split bytes 592,593,594,595 into bits
fTreatLockAtnAsReadOnly = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 0 );
fStyleLock = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 1 );
fAutoFmtOverride = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 2 );
fRemoveWordML = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 3 );
fApplyCustomXForm = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 4 );
fStyeLockEnforced = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 5 );
fFakeLockAtn = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 6 );
fIgnoreMixedContent = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 7 );
fShowPlaceholderText = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 8 );
grf = FormatUtils::GetUIntFromBytesBits( ( bytes + 592 ), 4, 9, 23 );
//split bytes 596 and 597 into bits
fReadingModeInkLockDown = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 0 );
fAcetateShowInkAtn = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 1 );
fFilterDttm = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 2 );
fEnforceDocProt = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 3 );
iDocProtCur = (unsigned short)FormatUtils::GetUIntFromBytesBits( ( bytes + 596 ), 2, 4, 3 );
fDispBkSpSaved = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 7 );
dxaPageLock = FormatUtils::BytesToInt16( bytes, 598, size );
dyaPageLock = FormatUtils::BytesToInt16( bytes, 600, size );
pctFontLock = FormatUtils::BytesToInt32( bytes, 602, size );
grfitbid = bytes[606];
//unsigned char 607 is unused
ilfoMacAtCleanup = FormatUtils::BytesToUInt16( bytes, 608, size );
}
//bytes 517-539 are unused
verCompatPreW10 = (unsigned short)FormatUtils::GetUIntFromBytesBits( ( bytes + 540 ), 4, 0, 16 );
fNoMargPgvwSaved = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 16 );
fNoMargPgvWPag = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 17 );
fWebViewPag = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 18 );
fSeeDrawingsPag = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 19 );
fBulletProofed = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 20 );
fCorrupted = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 21 );
fSaveUim = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 22 );
fFilterPrivacy = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 23 );
fInFReplaceNoRM = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 24 );
fSeenRepairs = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 25 );
fHasXML = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 26 );
fSeeScriptAnchorsPag = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 27 );
fValidateXML = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 28 );
fSaveIfInvalidXML = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 29 );
fShowXMLErrors = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 30 );
fAlwaysMergeEmptyNamespace = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 31 );
if ( size > 544/* && fib->m_FibNew.nFibNew > Fib2000*/)
{
cpMaxListCacheMainDoc = FormatUtils::BytesToInt32( bytes, 544, size ); //unused
//split bytes 548,549 into bits
fDoNotEmbedSystemFont = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 0 );
fWordCompact = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 1 );
fLiveRecover = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 2 );
fEmbedFactoids = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 3 );
fFactoidXML = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 4 );
fFactoidAllDone = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 5 );
fFolioPrint = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 6 );
fReverseFolio = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 7 );
iTextLineEnding = (short)FormatUtils::GetUIntFromBytesBits( ( bytes + 548 ), 2, 8, 3 );
fHideFcc = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 11 );
fAcetateShowMarkup = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 12 );
fAcetateShowAtn = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 13 );
fAcetateShowInsDel = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 14 );
fAcetateShowProps = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 15 );
istdTableDflt = FormatUtils::BytesToUInt16( bytes, 550, size );
verCompat = FormatUtils::BytesToUInt16( bytes, 552, size );
grfFmtFilter = FormatUtils::BytesToUInt16( bytes, 554, size );
iFolioPages = FormatUtils::BytesToInt16 ( bytes, 556, size );
cpgText = FormatUtils::BytesToUInt16( bytes, 558, size );
cpMinRMText = FormatUtils::BytesToInt32 ( bytes, 560, size );
cpMinRMFtn = FormatUtils::BytesToInt32 ( bytes, 564, size );
cpMinRMHdd = FormatUtils::BytesToInt32 ( bytes, 568, size );
cpMinRMAtn = FormatUtils::BytesToInt32 ( bytes, 572, size );
cpMinRMEdn = FormatUtils::BytesToInt32 ( bytes, 576, size );
cpMinRMTxbx = FormatUtils::BytesToInt32 ( bytes, 580, size );
cpMinRMHdrTxbx = FormatUtils::BytesToInt32 ( bytes, 584, size );
rsidRoot = FormatUtils::BytesToInt32 ( bytes, 588, size );
//unused 2
if ( size > 594/* && fib->m_FibNew.nFibNew > Fib2002*/)
{
//split bytes 592,593,594,595 into bits
fTreatLockAtnAsReadOnly = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 0 );
fStyleLock = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 1 );
fAutoFmtOverride = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 2 );
fRemoveWordML = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 3 );
fApplyCustomXForm = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 4 );
fStyeLockEnforced = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 5 );
fFakeLockAtn = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 6 );
fIgnoreMixedContent = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 7 );
fShowPlaceholderText = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 8 );
grf = FormatUtils::GetUIntFromBytesBits( ( bytes + 592 ), 4, 9, 23 );
//split bytes 596 and 597 into bits
fReadingModeInkLockDown = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 0 );
fAcetateShowInkAtn = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 1 );
fFilterDttm = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 2 );
fEnforceDocProt = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 3 );
iDocProtCur = (unsigned short)FormatUtils::GetUIntFromBytesBits( ( bytes + 596 ), 2, 4, 3 );
fDispBkSpSaved = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 7 );
dxaPageLock = FormatUtils::BytesToInt16( bytes, 598, size );
dyaPageLock = FormatUtils::BytesToInt16( bytes, 600, size );
pctFontLock = FormatUtils::BytesToInt32( bytes, 602, size );
grfitbid = bytes[606];
//unsigned char 607 is unused
ilfoMacAtCleanup = FormatUtils::BytesToUInt16( bytes, 608, size );
if ( size > 616/* && fib->m_FibNew.nFibNew > Fib2003*/)
{
//4 bytes reserved
bool fRMTrackFormatting = FormatUtils::GetBitFromBytes( ( bytes + 620 ), 2, 0 );
bool fRMTrackMoves = FormatUtils::GetBitFromBytes( ( bytes + 620 ), 2, 1 );
//dopMth = 34 bytes from 624 = 658
if ( size > 674/* && fib->m_FibNew.nFibNew > Fib2007*/)
{
if ( size > 690/* && fib->m_FibNew.nFibNew > Fib2010*/)
{
}
}
}
}
}
}
}
}
......
......@@ -54,6 +54,7 @@ namespace DocFileFormat
friend class SettingsMapping;
bool bDisplayBackgroundShape;
private:
// True when facing pages should be printed
bool fFacingPages;
......
......@@ -1162,6 +1162,8 @@ namespace DocFileFormat
{
//Read the FibRgCswNew
m_FibNew.nFibNew = (FibVersion)reader.ReadUInt16();
if (m_FibNew.nFibNew == 0) m_FibNew.nFibNew = Fib1997;
m_FibNew.cQuickSavesNew = reader.ReadUInt16();
}
}
......
......@@ -53,33 +53,47 @@ namespace DocFileFormat
m_context->_docx->RegisterDocument();
// Header
m_pXmlWriter->WriteNodeBegin(_T("?xml version=\"1.0\" encoding=\"UTF-8\"?"));
m_pXmlWriter->WriteNodeBegin(_T("w:document"), TRUE );
m_pXmlWriter->WriteNodeBegin(L"?xml version=\"1.0\" encoding=\"UTF-8\"?");
m_pXmlWriter->WriteNodeBegin(L"w:document", TRUE );
// Namespaces
m_pXmlWriter->WriteAttribute(_T("xmlns:w"), OpenXmlNamespaces::WordprocessingML );
m_pXmlWriter->WriteAttribute(_T("xmlns:v"), OpenXmlNamespaces::VectorML );
m_pXmlWriter->WriteAttribute(_T("xmlns:o"), OpenXmlNamespaces::Office );
m_pXmlWriter->WriteAttribute(_T("xmlns:w10"), OpenXmlNamespaces::OfficeWord );
m_pXmlWriter->WriteAttribute(_T("xmlns:r"), OpenXmlNamespaces::Relationships );
m_pXmlWriter->WriteAttribute(_T("xmlns:m"), _T("http://schemas.openxmlformats.org/officeDocument/2006/math"));
//m_pXmlWriter->WriteAttribute(_T("xmlns:wpc"), _T("http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"));
//m_pXmlWriter->WriteAttribute(_T("xmlns:mc"), _T("http://schemas.openxmlformats.org/markup-compatibility/2006"));
//m_pXmlWriter->WriteAttribute(_T("xmlns:wp14"),_T("http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"));
//m_pXmlWriter->WriteAttribute(_T("xmlns:wp"), _T("http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"));
//m_pXmlWriter->WriteAttribute(_T("xmlns:w14"), _T("http://schemas.microsoft.com/office/word/2010/wordml"));
//m_pXmlWriter->WriteAttribute(_T("xmlns:wpg"), _T("http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"));
//m_pXmlWriter->WriteAttribute(_T("xmlns:wpi"), _T("http://schemas.microsoft.com/office/word/2010/wordprocessingInk"));
//m_pXmlWriter->WriteAttribute(_T("xmlns:wne"), _T("http://schemas.microsoft.com/office/word/2006/wordml"));
//m_pXmlWriter->WriteAttribute(_T("xmlns:wps"), _T("http://schemas.microsoft.com/office/word/2010/wordprocessingShape"));
//m_pXmlWriter->WriteAttribute(_T("mc:Ignorable"), _T("w14 wp14"));
m_pXmlWriter->WriteAttribute(L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
m_pXmlWriter->WriteAttribute(L"xmlns:v", OpenXmlNamespaces::VectorML );
m_pXmlWriter->WriteAttribute(L"xmlns:o", OpenXmlNamespaces::Office );
m_pXmlWriter->WriteAttribute(L"xmlns:w10", OpenXmlNamespaces::OfficeWord );
m_pXmlWriter->WriteAttribute(L"xmlns:r", OpenXmlNamespaces::Relationships );
m_pXmlWriter->WriteAttribute(L"xmlns:m", L"http://schemas.openxmlformats.org/officeDocument/2006/math");
//m_pXmlWriter->WriteAttribute(L"xmlns:wpc", L"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
//m_pXmlWriter->WriteAttribute(L"xmlns:mc", L"http://schemas.openxmlformats.org/markup-compatibility/2006");
//m_pXmlWriter->WriteAttribute(L"xmlns:wp14", L"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
//m_pXmlWriter->WriteAttribute(L"xmlns:wp", L"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
//m_pXmlWriter->WriteAttribute(L"xmlns:w14", L"http://schemas.microsoft.com/office/word/2010/wordml");
//m_pXmlWriter->WriteAttribute(L"xmlns:wpg", L"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
//m_pXmlWriter->WriteAttribute(L"xmlns:wpi", L"http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
//m_pXmlWriter->WriteAttribute(L"xmlns:wne", L"http://schemas.microsoft.com/office/word/2006/wordml");
//m_pXmlWriter->WriteAttribute(L"xmlns:wps", L"http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
//m_pXmlWriter->WriteAttribute(L"mc:Ignorable", L"w14 wp14");
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
m_pXmlWriter->WriteNodeBegin( _T("w:body"), FALSE );
if ((m_document->GetOfficeArt()) && (m_document->GetOfficeArt()->GetShapeBackgound()))
{
m_document->DocProperties->bDisplayBackgroundShape = true;
ShapeContainer* pShape = m_document->GetOfficeArt()->GetShapeBackgound();
m_pXmlWriter->WriteNodeBegin ( L"w:background", TRUE);
m_pXmlWriter->WriteAttribute ( L"w:color", L"FFFFFF");
m_pXmlWriter->WriteNodeEnd( L"", TRUE, FALSE );
VMLShapeMapping oVmlWriter (m_context, m_pXmlWriter, NULL, NULL, _caller);
pShape->Convert(&oVmlWriter);
m_pXmlWriter->WriteNodeEnd (L"w:background");
}
m_pXmlWriter->WriteNodeBegin( L"w:body", FALSE );
// Convert the document
// Convert the document
_lastValidPapx = NULL;
if (m_document->AllPapxFkps->empty() == false)
{
......@@ -175,8 +189,8 @@ namespace DocFileFormat
}
}
m_pXmlWriter->WriteNodeEnd( _T( "w:body" ) );
m_pXmlWriter->WriteNodeEnd( _T( "w:document" ) );
m_pXmlWriter->WriteNodeEnd( L"w:body" );
m_pXmlWriter->WriteNodeEnd( L"w:document" );
m_context->_docx->DocumentXML = std::wstring(m_pXmlWriter->GetXmlString());
}
......
......@@ -34,6 +34,7 @@
#include "OfficeDrawing/RecordFactory.h"
#include "OfficeDrawing/DrawingContainer.h"
#include "OfficeDrawing/DrawingRecord.h"
#include "OfficeDrawing/DrawingGroup.h"
#include "OfficeDrawing/GroupContainer.h"
#include "OfficeDrawing/Shape.h"
......@@ -57,7 +58,7 @@ namespace DocFileFormat
public:
OfficeArtContent (const FileInformationBlock* pFIB, POLE::Stream* pStream): m_pDrawingGroupData(NULL)
OfficeArtContent (const FileInformationBlock* pFIB, POLE::Stream* pStream): m_pDrawingGroupData(NULL), m_pBackgroud(NULL)
{
VirtualStreamReader oStearmReader(pStream, 0 , pFIB->m_bOlderVersion);
......@@ -87,15 +88,23 @@ namespace DocFileFormat
{
// the child is a subgroup
GroupContainer* group = static_cast<GroupContainer*>(groupChild);
group->Index = i;
drawing.container->Children[i] = group;
if (group)
{
group->Index = i;
}
}
else if (ShapeContainer::TYPE_CODE_0xF004 == groupChild->TypeCode)
{
// the child is a shape
ShapeContainer* shape = static_cast<ShapeContainer*>(groupChild);
shape->Index = i;
drawing.container->Children[i] = shape;
if (shape)
{
shape->Index = i;
if (shape->isBackground())
{
m_pBackgroud = shape;
}
}
}
}
}
......@@ -112,7 +121,10 @@ namespace DocFileFormat
for ( std::list<OfficeArtWordDrawing>::iterator iter = m_arrDrawings.begin(); iter != m_arrDrawings.end(); ++iter)
RELEASEOBJECT(iter->container);
}
inline ShapeContainer* GetShapeBackgound()
{
return m_pBackgroud;
}
inline ShapeContainer* GetShapeContainer (int spid)
{
ShapeContainer* ret = NULL;
......@@ -138,7 +150,6 @@ namespace DocFileFormat
if (shape->GetShapeID() == spid)
{
ret = container;
break;
}
}
......@@ -150,7 +161,7 @@ namespace DocFileFormat
if (shape->GetShapeID() == spid)
{
ret = container;
ret = container;
break;
}
}
......@@ -174,7 +185,7 @@ namespace DocFileFormat
}
private:
ShapeContainer* m_pBackgroud;
DrawingGroup* m_pDrawingGroupData;
std::list<OfficeArtWordDrawing> m_arrDrawings;
};
......
......@@ -39,11 +39,9 @@ namespace DocFileFormat
{
public:
static const unsigned short TYPE_CODE_0xF008 = 0xF008;
/// The number of shapes in this drawing
unsigned int csp;
/// The last MSOSPID given to an SP in this DG
int spidCur;
unsigned int csp; // The number of shapes in this drawing
int spidCur; // The last MSOSPID given to an SP in this DG
DrawingRecord():
Record(), csp(0), spidCur(0)
......@@ -53,8 +51,8 @@ namespace DocFileFormat
DrawingRecord( IBinaryReader* _reader, unsigned int size, unsigned int typeCode, unsigned int version, unsigned int instance ):
Record( _reader, size, typeCode, version, instance )
{
this->csp = this->Reader->ReadUInt32();
this->spidCur = this->Reader->ReadInt32();
csp = Reader->ReadUInt32();
spidCur = Reader->ReadInt32();
}
virtual ~DrawingRecord()
......
......@@ -93,29 +93,23 @@ namespace DocFileFormat
{
case ShapeContainer::TYPE_CODE_0xF004:
return new ShapeContainer();
break;
case Shape::TYPE_CODE_0xF00A:
return new Shape();
break;
case ShapeOptions::TYPE_CODE_0xF00B:
case ShapeOptions::TYPE_CODE_0xF121:
case ShapeOptions::TYPE_CODE_0xF122:
return new ShapeOptions();
break;
case ClientAnchor::TYPE_CODE_0xF010:
return new ClientAnchor();
break;
case ChildAnchor::TYPE_CODE_0xF00F:
return new ChildAnchor();
break;
case BlipStoreEntry::TYPE_CODE_0xF007:
return new BlipStoreEntry();
break;
case BitmapBlip::TYPE_CODE_0xF01D: //OfficeArtBlipJPEG
case BitmapBlip::TYPE_CODE_0xF01E: //OfficeArtBlipPNG
......@@ -125,25 +119,25 @@ namespace DocFileFormat
case BitmapBlip::TYPE_CODE_0xF029: //OfficeArtBlipTIFF
case BitmapBlip::TYPE_CODE_0xF02A: //OfficeArtBlipJPEG
return new BitmapBlip();
break;
case MetafilePictBlip::TYPE_CODE_0xF01A: //OfficeArtBlipEMF
case MetafilePictBlip::TYPE_CODE_0xF01B: //OfficeArtBlipWMF
case MetafilePictBlip::TYPE_CODE_0xF01C : //OfficeArtBlipPICT
return new MetafilePictBlip(); break;
case DrawingGroup::TYPE_CODE_0xF000 : return new DrawingGroup(); break;
case DrawingGroupRecord::TYPE_CODE_0xF006 : return new DrawingGroupRecord(); break;
case BlipStoreContainer::TYPE_CODE_0xF001 : return new BlipStoreContainer(); break;
case SplitMenuColorContainer::TYPE_CODE_0xF11E : return new SplitMenuColorContainer(); break;
case ClientData::TYPE_CODE_0xF011 : return new ClientData(); break;
case DrawingContainer::TYPE_CODE_0xF002 : return new DrawingContainer(); break;
case DrawingRecord::TYPE_CODE_0xF008 : return new DrawingRecord(); break;
case GroupContainer::TYPE_CODE_0xF003 : return new GroupContainer(); break;
case GroupShapeRecord::TYPE_CODE_0xF009 : return new GroupShapeRecord (); break;
case OfficeArtClientTextbox::TYPE_CODE_0xF00D : return new OfficeArtClientTextbox (); break;
default: return new UnknownRecord(); break;
return new MetafilePictBlip();
case DrawingGroup::TYPE_CODE_0xF000 : return new DrawingGroup();
case DrawingGroupRecord::TYPE_CODE_0xF006 : return new DrawingGroupRecord();
case BlipStoreContainer::TYPE_CODE_0xF001 : return new BlipStoreContainer();
case SplitMenuColorContainer::TYPE_CODE_0xF11E : return new SplitMenuColorContainer();
case ClientData::TYPE_CODE_0xF011 : return new ClientData();
case DrawingContainer::TYPE_CODE_0xF002 : return new DrawingContainer();
case DrawingRecord::TYPE_CODE_0xF008 : return new DrawingRecord();
case GroupContainer::TYPE_CODE_0xF003 : return new GroupContainer();
case GroupShapeRecord::TYPE_CODE_0xF009 : return new GroupShapeRecord ();
case OfficeArtClientTextbox::TYPE_CODE_0xF00D : return new OfficeArtClientTextbox ();
default:
return new UnknownRecord();
}
}
}
......@@ -39,33 +39,20 @@ namespace DocFileFormat
class Shape: public Record
{
public:
int spid;
/// This shape is a group shape
bool fGroup;
/// Not a top-level shape
bool fChild;
/// This is the topmost group shape.
/// Exactly one of these per drawing.
bool fPatriarch;
/// The shape has been deleted
bool fDeleted;
/// The shape is an OLE object
bool fOleShape;
/// Shape has a hspMaster property
bool fHaveMaster;
/// Shape is flipped horizontally
bool fFlipH;
/// Shape is flipped vertically
bool fFlipV;
/// Connector type of shape
bool fConnector;
/// Shape has an anchor of some kind
bool fHaveAnchor;
/// Background shape
bool fBackground;
/// Shape has a shape type property
bool fHaveSpt;
/// The shape type of the shape
int spid;
bool fGroup;
bool fChild;
bool fPatriarch; // This is the topmost group shape. Exactly one of these per drawing.
bool fDeleted; // The shape has been deleted
bool fOleShape; // The shape is an OLE object
bool fHaveMaster;
bool fFlipH;
bool fFlipV;
bool fConnector;
bool fHaveAnchor;
bool fBackground;
bool fHaveSpt;
ShapeType* shapeType;
public:
......
......@@ -69,7 +69,20 @@ namespace DocFileFormat
}
return 0;
}
bool isBackground()
{
int ret = 0;
for ( std::vector<Record*>::const_iterator iter = this->Children.begin(); iter != this->Children.end(); iter++ )
{
Shape* sh = dynamic_cast<Shape*>( *iter );
if (sh)
{
return sh->fBackground;
}
}
return false;
}
virtual ~ShapeContainer()
{
}
......@@ -79,7 +92,6 @@ namespace DocFileFormat
return new ShapeContainer( _reader, bodySize, typeCode, version, instance );
}
/// Searches all OptionEntry in the ShapeContainer and puts them into a list.
std::list<OptionEntry> ExtractOptions() const
{
std::list<OptionEntry> ret;
......
......@@ -476,6 +476,7 @@ namespace DocFileFormat
default:
{
int sz = iter->argumentsSize;
}break;
}
}
......
......@@ -44,27 +44,31 @@ namespace DocFileFormat
{
WordDocumentProperties* dop = static_cast<WordDocumentProperties*>( visited );
this->_ctx->_docx->RegisterSettings();
_ctx->_docx->RegisterSettings();
//start w:settings
m_oXmlWriter.WriteNodeBegin( _T( "?xml version=\"1.0\" encoding=\"UTF-8\"?" ) );
m_oXmlWriter.WriteNodeBegin( _T( "w:settings" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?" );
m_oXmlWriter.WriteNodeBegin( L"w:settings", TRUE );
//write namespaces
m_oXmlWriter.WriteAttribute( _T( "xmlns:w" ), OpenXmlNamespaces::WordprocessingML );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_oXmlWriter.WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
m_oXmlWriter.WriteNodeEnd( L"", TRUE, FALSE );
//zoom
m_oXmlWriter.WriteNodeBegin( _T( "w:zoom" ), TRUE );
m_oXmlWriter.WriteAttribute( _T( "w:percent" ), FormatUtils::IntToWideString( dop->wScaleSaved ).c_str() );
m_oXmlWriter.WriteNodeBegin ( L"w:zoom", TRUE );
m_oXmlWriter.WriteAttribute ( L"w:percent", FormatUtils::IntToWideString( dop->wScaleSaved ).c_str() );
if ( dop->zkSaved != 0 )
{
m_oXmlWriter.WriteAttribute( _T( "w:val" ), FormatUtils::MapValueToWideString( dop->zkSaved, &ZoomTypeMap[0][0], 3, 9 ).c_str() );
m_oXmlWriter.WriteAttribute( L"w:val", FormatUtils::MapValueToWideString( dop->zkSaved, &ZoomTypeMap[0][0], 3, 9 ).c_str() );
}
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
if (dop->bDisplayBackgroundShape)
{
m_oXmlWriter.WriteNodeBegin ( L"w:displayBackgroundShape", TRUE );
m_oXmlWriter.WriteNodeEnd ( L"", TRUE );
}
//doc protection
//<w:documentProtection w:edit="forms" w:enforcement="1"/>
......@@ -72,30 +76,30 @@ namespace DocFileFormat
//embed system fonts
if( !dop->fDoNotEmbedSystemFont )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:embedSystemFonts" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:embedSystemFonts", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
//mirror margins
if ( dop->fMirrorMargins )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:mirrorMargins" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:mirrorMargins", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
//evenAndOddHeaders
if ( dop->fFacingPages )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:evenAndOddHeaders" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:evenAndOddHeaders", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
//proof state
XMLTools::XMLElement<wchar_t> proofState( _T( "w:proofState" ) );
XMLTools::XMLElement<wchar_t> proofState( L"w:proofState" );
if ( dop->fGramAllClean )
{
appendValueAttribute( &proofState, _T( "w:grammar" ), _T( "clean" ) );
appendValueAttribute( &proofState, L"w:grammar", L"clean" );
}
if ( proofState.GetAttributeCount() > 0 )
......@@ -106,31 +110,31 @@ namespace DocFileFormat
//stylePaneFormatFilter
if ( dop->grfFmtFilter != 0 )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:stylePaneFormatFilter" ), TRUE );
m_oXmlWriter.WriteAttribute( _T( "w:val" ), FormatUtils::IntToFormattedWideString( dop->grfFmtFilter, _T( "%04x" ) ).c_str() );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:stylePaneFormatFilter", TRUE );
m_oXmlWriter.WriteAttribute( L"w:val", FormatUtils::IntToFormattedWideString( dop->grfFmtFilter, L"%04x" ).c_str() );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
//default tab stop
m_oXmlWriter.WriteNodeBegin( _T( "w:defaultTabStop" ), TRUE );
m_oXmlWriter.WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString( dop->dxaTab ).c_str() );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:defaultTabStop", TRUE );
m_oXmlWriter.WriteAttribute( L"w:val", FormatUtils::IntToWideString( dop->dxaTab ).c_str() );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
//drawing grid
if( dop->dogrid != NULL )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:displayHorizontalDrawingGridEvery" ), TRUE );
m_oXmlWriter.WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString( dop->dogrid->dxGridDisplay ).c_str() );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:displayHorizontalDrawingGridEvery", TRUE );
m_oXmlWriter.WriteAttribute( L"w:val", FormatUtils::IntToWideString( dop->dogrid->dxGridDisplay ).c_str() );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
m_oXmlWriter.WriteNodeBegin( _T( "w:displayVerticalDrawingGridEvery" ), TRUE );
m_oXmlWriter.WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString( dop->dogrid->dyGridDisplay ).c_str() );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:displayVerticalDrawingGridEvery", TRUE );
m_oXmlWriter.WriteAttribute( L"w:val", FormatUtils::IntToWideString( dop->dogrid->dyGridDisplay ).c_str() );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
if ( dop->dogrid->fFollowMargins == false )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotUseMarginsForDrawingGridOrigin" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:doNotUseMarginsForDrawingGridOrigin", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
}
......@@ -139,27 +143,27 @@ namespace DocFileFormat
{
if ( dop->doptypography->fKerningPunct == false )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:noPunctuationKerning" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:noPunctuationKerning", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
}
//footnote properties
XMLTools::XMLElement<wchar_t> footnotePr( _T( "w:footnotePr" ) );
XMLTools::XMLElement<wchar_t> footnotePr( L"w:footnotePr" );
if ( dop->nFtn != 0 )
{
appendValueAttribute( &footnotePr, _T( "w:numStart" ), FormatUtils::IntToWideString( dop->nFtn ).c_str() );
appendValueAttribute( &footnotePr, L"w:numStart", FormatUtils::IntToWideString( dop->nFtn ).c_str() );
}
if ( dop->rncFtn != 0 )
{
appendValueAttribute( &footnotePr, _T( "w:numRestart" ), FormatUtils::IntToWideString( dop->rncFtn ).c_str() );
appendValueAttribute( &footnotePr, L"w:numRestart", FormatUtils::IntToWideString( dop->rncFtn ).c_str() );
}
if ( dop->Fpc != 0 )
{
appendValueAttribute( &footnotePr, _T( "w:pos" ), FormatUtils::MapValueToWideString( dop->Fpc, &FootnotePositionMap[0][0], 4, 12 ).c_str() );
appendValueAttribute( &footnotePr, L"w:pos", FormatUtils::MapValueToWideString( dop->Fpc, &FootnotePositionMap[0][0], 4, 12 ).c_str() );
}
if ( footnotePr.GetAttributeCount() > 0 )
......@@ -173,7 +177,7 @@ namespace DocFileFormat
writeRsidList();
//close w:settings
m_oXmlWriter.WriteNodeEnd( _T( "w:settings" ) );
m_oXmlWriter.WriteNodeEnd( L"w:settings" );
this->_ctx->_docx->SettingsXML = std::wstring( m_oXmlWriter.GetXmlString() );
}
......@@ -181,368 +185,368 @@ namespace DocFileFormat
void SettingsMapping::writeRsidList()
{
//convert the rsid list
m_oXmlWriter.WriteNodeBegin( _T( "w:rsids" ) );
m_oXmlWriter.WriteNodeBegin( L"w:rsids" );
for ( std::set<std::wstring>::iterator iter = this->_ctx->AllRsids.begin(); iter != this->_ctx->AllRsids.end(); iter++ )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:rsid" ), TRUE );
m_oXmlWriter.WriteAttribute( _T( "w:val" ), iter->c_str() );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:rsid", TRUE );
m_oXmlWriter.WriteAttribute( L"w:val", iter->c_str() );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
m_oXmlWriter.WriteNodeEnd( _T( "w:rsids" ) );
m_oXmlWriter.WriteNodeEnd( L"w:rsids" );
}
void SettingsMapping::writeCompatibilitySettings(const WordDocumentProperties* dop)
{
//compatibility settings
m_oXmlWriter.WriteNodeBegin( _T( "w:compat" ) );
m_oXmlWriter.WriteNodeBegin( L"w:compat" );
//some settings must always be written
if ( dop->fUseNormalStyleForList )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:useNormalStyleForList" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:useNormalStyleForList", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fDontUseIndentAsNumberingTabStop )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotUseIndentAsNumberingTabStop" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:doNotUseIndentAsNumberingTabStop", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fFELineBreak11 )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:useAltKinsokuLineBreakRules" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:useAltKinsokuLineBreakRules", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fAllowSpaceOfSameStyleInTable )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:allowSpaceOfSameStyleInTable" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:allowSpaceOfSameStyleInTable", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fWW11IndentRules )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotSuppressIndentation" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:doNotSuppressIndentation", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fDontAutofitConstrainedTables )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotAutofitConstrainedTables" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:doNotAutofitConstrainedTables", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fAutofitLikeWW11 )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:autofitToFirstFixedWidthCell" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:autofitToFirstFixedWidthCell", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fUnderlineTabInNumList )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:underlineTabInNumList" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:underlineTabInNumList", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fHangulWidthLikeWW11 )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:displayHangulFixedWidth" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:displayHangulFixedWidth", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fSplitPgBreakAndParaMark )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:splitPgBreakAndParaMark" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:splitPgBreakAndParaMark", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fDontVertAlignCellWithSp )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotVertAlignCellWithSp" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:doNotVertAlignCellWithSp", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fDontBreakConstrainedForcedTables )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotBreakConstrainedForcedTable" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:doNotBreakConstrainedForcedTable", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fDontVertAlignInTxbx )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotVertAlignInTxbx" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:doNotVertAlignInTxbx", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fWord11KerningPairs )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:useAnsiKerningPairs" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:useAnsiKerningPairs", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fCachedColBalance )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:cachedColBalance" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:cachedColBalance", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
//others are saved in the file
if ( !dop->fDontAdjustLineHeightInTable )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:adjustLineHeightInTable" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:adjustLineHeightInTable", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fAlignTablesRowByRow )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:alignTablesRowByRow" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:alignTablesRowByRow", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fApplyBreakingRules )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:applyBreakingRules" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:applyBreakingRules", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fUseAutoSpaceForFullWidthAlpha )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:autoSpaceLikeWord95" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:autoSpaceLikeWord95", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( !dop->fDntBlnSbDbWid )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:balanceSingleByteDoubleByteWidth" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:balanceSingleByteDoubleByteWidth", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fConvMailMergeEsc )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:convMailMergeEsc" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:convMailMergeEsc", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fDontBreakWrappedTables )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotBreakWrappedTables" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:doNotBreakWrappedTables", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( !dop->fExpShRtn )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotExpandShiftReturn" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:doNotExpandShiftReturn", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( !dop->fLeaveBackslashAlone )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotLeaveBackslashAlone" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:doNotLeaveBackslashAlone", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fDontSnapToGridInCell )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotSnapToGridInCell" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:doNotSnapToGridInCell", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fDontUseAsianBreakRules )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotUseEastAsianBreakRules" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:doNotUseEastAsianBreakRules", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fDontUseHTMLParagraphAutoSpacing )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotUseHTMLParagraphAutoSpacing" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:doNotUseHTMLParagraphAutoSpacing", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fDontWrapTextWithPunct )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotWrapTextWithPunct" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:doNotWrapTextWithPunct", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fFtnLayoutLikeWW8 )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:footnoteLayoutLikeWW8" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:footnoteLayoutLikeWW8", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fForgetLastTabAlign )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:forgetLastTabAlignment" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:forgetLastTabAlignment", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fGrowAutofit )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:growAutofit" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:growAutofit", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fLayoutRawTableWidth )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:layoutRawTableWidth" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:layoutRawTableWidth", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fLayoutTableRowsApart )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:layoutTableRowsApart" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:layoutTableRowsApart", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fLineWrapLikeWord6 )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:lineWrapLikeWord6" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:lineWrapLikeWord6", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fMWSmallCaps )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:mwSmallCaps" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:mwSmallCaps", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fNoColumnBalance )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:noColumnBalance" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:noColumnBalance", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fNoLeading )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:noLeading" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:noLeading", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fNoSpaceRaiseLower )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:noSpaceRaiseLower" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:noSpaceRaiseLower", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fNoTabForInd )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:noTabHangInd" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:noTabHangInd", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fPrintBodyBeforeHdr )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:printBodyTextBeforeHeader" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:printBodyTextBeforeHeader", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fMapPrintTextColor )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:printColBlack" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:printColBlack", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fDontAllowFieldEndSelect )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:selectFldWithFirstOrLastChar" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:selectFldWithFirstOrLastChar", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fSpLayoutLikeWW8 )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:shapeLayoutLikeWW8" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:shapeLayoutLikeWW8", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fShowBreaksInFrames )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:showBreaksInFrames" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:showBreaksInFrames", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fMakeSpaceForUL )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:spaceForUL" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:spaceForUL", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fTruncDxaExpand )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:spacingInWholePoints" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:spacingInWholePoints", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fSubOnSize )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:subFontBySize" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:subFontBySize", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fSuppressSpbfAfterPageBreak )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:suppressSpBfAfterPgBrk" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:suppressSpBfAfterPgBrk", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fSuppressTopSpacing )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:suppressTopSpacing" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:suppressTopSpacing", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fSwapBordersFacingPgs )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:swapBordersFacingPages" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:swapBordersFacingPages", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( !dop->fDntULTrlSpc )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:ulTrailSpace" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:ulTrailSpace", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fPrintMet )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:usePrinterMetrics" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:usePrinterMetrics", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fUseWord2002TableStyleRules )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:useWord2002TableStyleRules" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:useWord2002TableStyleRules", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fUserWord97LineBreakingRules )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:useWord97LineBreakRules" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:useWord97LineBreakRules", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fWPJust )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:wpJustification" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:wpJustification", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fWPSpace )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:wpSpaceWidth" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:wpSpaceWidth", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
if ( dop->fWrapTrailSpaces )
{
m_oXmlWriter.WriteNodeBegin( _T( "w:wrapTrailSpaces" ), TRUE );
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
m_oXmlWriter.WriteNodeBegin( L"w:wrapTrailSpaces", TRUE );
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
}
m_oXmlWriter.WriteNodeEnd( _T( "w:compat" ) );
m_oXmlWriter.WriteNodeEnd( L"w:compat" );
}
}
\ No newline at end of file
......@@ -112,23 +112,14 @@ namespace DocFileFormat
friend class PropertiesMapping;
private:
/// 24-bit foreground color
unsigned int cvFore;
bool cvForeAuto;
/// Foreground color.
/// Only used if cvFore is not set
int icoFore;
/// 24-bit background color
unsigned int cvBack;
bool cvBackAuto;
/// Background color.
/// Only used if cvBack is not set.
int icoBack;
/// Shading pattern
ShadingPattern ipat;
/// Shading type
ShadingType shadingType;
/// Shading special vale
unsigned int cvFore; // 24-bit foreground color
bool cvForeAuto;
int icoFore; // Foreground color.
unsigned int cvBack;
bool cvBackAuto;
int icoBack;
ShadingPattern ipat;
ShadingType shadingType;
ShadingSpecialValue shadingSpecialValue;
public:
......@@ -236,7 +227,7 @@ namespace DocFileFormat
else if (0x0F == icoBack) { cvBack = RGB2 (0x80, 0x80, 0x80); }
else if (0x10 == icoBack) { cvBack = RGB2 (0xC0, 0xC0, 0xC0); }
// TODO : если будут документы с такими цветовыми палитрами
// .... если будут документы с такими цветовыми палитрами
//if ((cvFore == 0) && (icoFore == 0x0) && (cvBack == 0) && (icoBack == 0x0) && (ipat == Automatic))
//{
......@@ -250,7 +241,6 @@ namespace DocFileFormat
}
else
{
//throw new ByteParseException("Cannot parse the struct SHD, the length of the struct doesn't match");
}
}
}
......
......@@ -73,12 +73,12 @@ namespace DocFileFormat
m_pict = pPicture;
m_nImageId = 0;
m_imagedata = XMLTools::XMLElement<wchar_t>(_T("v:imagedata"));
m_fill = XMLTools::XMLElement<wchar_t>(_T("v:fill"));
m_stroke = XMLTools::XMLElement<wchar_t>(_T("v:stroke"));
m_shadow = XMLTools::XMLElement<wchar_t>(_T("v:shadow"));
m_3dstyle = XMLTools::XMLElement<wchar_t>(_T("o:extrusion"));
m_textpath = XMLTools::XMLElement<wchar_t>(_T("v:textpath"));
m_imagedata = XMLTools::XMLElement<wchar_t>(L"v:imagedata");
m_fill = XMLTools::XMLElement<wchar_t>(L"v:fill");
m_stroke = XMLTools::XMLElement<wchar_t>(L"v:stroke");
m_shadow = XMLTools::XMLElement<wchar_t>(L"v:shadow");
m_3dstyle = XMLTools::XMLElement<wchar_t>(L"o:extrusion");
m_textpath = XMLTools::XMLElement<wchar_t>(L"v:textpath");
Record* recBs = NULL;
if ((m_ctx) && (m_ctx->_doc))
......@@ -146,11 +146,11 @@ namespace DocFileFormat
std::list<OptionEntry> options = groupShape->ExtractOptions();
ChildAnchor* anchor = groupShape->FirstChildWithType<ChildAnchor>();
m_pXmlWriter->WriteNodeBegin( _T( "v:group" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "id" ), GetShapeID(shape).c_str());
m_pXmlWriter->WriteAttribute( _T( "style" ), FormatUtils::XmlEncode(buildStyle(shape, anchor, options, container->Index)).c_str() );
m_pXmlWriter->WriteAttribute( _T( "coordorigin" ), ( FormatUtils::IntToWideString(gsr->rcgBounds.topLeftAngle.x) + _T( "," ) + FormatUtils::IntToWideString( gsr->rcgBounds.topLeftAngle.y)).c_str() );
m_pXmlWriter->WriteAttribute( _T( "coordsize" ), ( FormatUtils::IntToWideString(gsr->rcgBounds.size.cx) + _T( "," ) + FormatUtils::IntToWideString(gsr->rcgBounds.size.cy)).c_str() );
m_pXmlWriter->WriteNodeBegin( L"v:group", true );
m_pXmlWriter->WriteAttribute( L"id", GetShapeID(shape).c_str());
m_pXmlWriter->WriteAttribute( L"style", FormatUtils::XmlEncode(buildStyle(shape, anchor, options, container->Index)).c_str() );
m_pXmlWriter->WriteAttribute( L"coordorigin", ( FormatUtils::IntToWideString(gsr->rcgBounds.topLeftAngle.x) + L"," + FormatUtils::IntToWideString( gsr->rcgBounds.topLeftAngle.y)).c_str() );
m_pXmlWriter->WriteAttribute( L"coordsize", ( FormatUtils::IntToWideString(gsr->rcgBounds.size.cx) + L"," + FormatUtils::IntToWideString(gsr->rcgBounds.size.cy)).c_str() );
// Write wrap coords
std::list<OptionEntry>::const_iterator end = options.end();
......@@ -162,13 +162,13 @@ namespace DocFileFormat
{
std::wstring wrapCoords = getWrapCoords(*iter);
if (wrapCoords.length())
m_pXmlWriter->WriteAttribute(_T( "wrapcoords" ), wrapCoords.c_str());
m_pXmlWriter->WriteAttribute(L"wrapcoords", wrapCoords.c_str());
}
break;
}
}
m_pXmlWriter->WriteNodeEnd(_T( "" ), TRUE, FALSE);
m_pXmlWriter->WriteNodeEnd(L"", true, false);
// Convert the shapes/groups in the group
......@@ -200,15 +200,15 @@ namespace DocFileFormat
if (m_pSpa)
{
std::wstring wrap = getWrapType(m_pSpa);
if (wrap != _T( "through" ))
if (wrap != L"through")
{
m_pXmlWriter->WriteNodeBegin( _T( "w10:wrap" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "type" ), wrap.c_str() );
m_pXmlWriter->WriteNodeEnd ( _T( "w10:wrap" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w10:wrap", true );
m_pXmlWriter->WriteAttribute( L"type", wrap.c_str() );
m_pXmlWriter->WriteNodeEnd ( L"w10:wrap", true );
}
}
m_pXmlWriter->WriteNodeEnd( _T( "v:group" ) );
m_pXmlWriter->WriteNodeEnd( L"v:group" );
}
}
......@@ -217,10 +217,10 @@ namespace DocFileFormat
{
if ((NULL != pContainer) && (!pContainer->Children.empty()))
{
Shape* pShape = static_cast<Shape*>(pContainer->Children[0]);
Shape* pShape = static_cast<Shape*>(pContainer->Children[0]);
if (pShape)
{
bool freeform = true;
bool freeform = true;
std::list<OptionEntry> options = pContainer->ExtractOptions();
ChildAnchor* pAnchor = pContainer->FirstChildWithType<ChildAnchor>();
......@@ -228,26 +228,26 @@ namespace DocFileFormat
WriteBeginShapeNode (pShape);
m_pXmlWriter->WriteAttribute ( _T( "id"), GetShapeID(pShape).c_str());
m_pXmlWriter->WriteAttribute ( L"id", GetShapeID(pShape).c_str());
if (pShape->GetShapeType())
if (pShape->GetShapeType() && !pShape->fBackground )
{
freeform = false;
m_pXmlWriter->WriteAttribute( _T("type"), (std::wstring(_T("#")) + VMLShapeTypeMapping::GenerateTypeId(pShape->GetShapeType())).c_str());
m_pXmlWriter->WriteAttribute( L"type", (std::wstring(L"#") + VMLShapeTypeMapping::GenerateTypeId(pShape->GetShapeType())).c_str());
}
m_pXmlWriter->WriteAttribute( _T("style"), FormatUtils::XmlEncode(buildStyle(pShape, pAnchor, options, pContainer->Index)).c_str());
m_pXmlWriter->WriteAttribute( L"style", FormatUtils::XmlEncode(buildStyle(pShape, pAnchor, options, pContainer->Index)).c_str());
if (pShape->is<LineType>())
{
//append "from" and "to" attributes
m_pXmlWriter->WriteAttribute(_T("from"), GetLineFrom(pAnchor).c_str());
m_pXmlWriter->WriteAttribute(_T("to"), GetLineTo(pAnchor).c_str());
m_pXmlWriter->WriteAttribute(L"from", GetLineFrom(pAnchor).c_str());
m_pXmlWriter->WriteAttribute(L"to", GetLineTo(pAnchor).c_str());
}
if (m_isBullete)
{
m_pXmlWriter->WriteAttribute(_T("o:bullet"), _T("t"));
m_pXmlWriter->WriteAttribute(L"o:bullet", L"t");
}
......@@ -397,7 +397,7 @@ namespace DocFileFormat
if (!wrapCoords.empty())
{
m_pXmlWriter->WriteAttribute( _T( "wrapcoords" ), wrapCoords.c_str() );
m_pXmlWriter->WriteAttribute( L"wrapcoords", wrapCoords.c_str() );
}
}break;
case geoRight:
......@@ -419,79 +419,79 @@ namespace DocFileFormat
case lineColor:
{
RGBColor lineColor((int)iter->op, RedFirst);
m_pXmlWriter->WriteAttribute( _T("strokecolor"), (std::wstring(_T("#")) + lineColor.SixDigitHexCode).c_str());
m_pXmlWriter->WriteAttribute( L"strokecolor", (std::wstring(L"#") + lineColor.SixDigitHexCode).c_str());
}break;
case lineWidth:
{
if (iter->op > 0)
{
EmuValue eLineWidth ((int)iter->op );
m_pXmlWriter->WriteAttribute(_T("strokeweight"), FormatUtils::DoubleToWideString(eLineWidth.ToPoints()) + _T("pt"));
m_pXmlWriter->WriteAttribute(L"strokeweight", FormatUtils::DoubleToWideString(eLineWidth.ToPoints()) + L"pt");
}
}break;
case lineDashing:
{
appendValueAttribute(&m_stroke, _T( "dashstyle" ), FormatUtils::MapValueToWideString( iter->op, &Global::DashStyleMap[0][0], 11, 16 ).c_str() );
appendValueAttribute(&m_stroke, L"dashstyle", FormatUtils::MapValueToWideString( iter->op, &Global::DashStyleMap[0][0], 11, 16 ).c_str() );
}break;
case lineStyle:
{
appendValueAttribute(&m_stroke, _T( "linestyle" ), getLineStyle( iter->op ).c_str());
appendValueAttribute(&m_stroke, L"linestyle", getLineStyle( iter->op ).c_str());
}break;
case lineEndArrowhead:
{
appendValueAttribute(&m_stroke, _T( "endarrow" ), getArrowStyle( iter->op ).c_str());
appendValueAttribute(&m_stroke, L"endarrow", getArrowStyle( iter->op ).c_str());
}break;
case lineEndArrowLength:
{
appendValueAttribute(&m_stroke, _T( "endarrowlength" ), getArrowLength( iter->op ).c_str());
appendValueAttribute(&m_stroke, L"endarrowlength", getArrowLength( iter->op ).c_str());
}break;
case lineEndArrowWidth:
{
appendValueAttribute(&m_stroke, _T( "endarrowwidth" ), getArrowWidth( iter->op ).c_str());
appendValueAttribute(&m_stroke, L"endarrowwidth", getArrowWidth( iter->op ).c_str());
}break;
case lineStartArrowhead:
{
appendValueAttribute(&m_stroke, _T( "startarrow" ), getArrowStyle( iter->op ).c_str());
appendValueAttribute(&m_stroke, L"startarrow", getArrowStyle( iter->op ).c_str());
}break;
case lineStartArrowLength:
{
appendValueAttribute(&m_stroke, _T( "startarrowlength" ), getArrowLength( iter->op ).c_str());
appendValueAttribute(&m_stroke, L"startarrowlength", getArrowLength( iter->op ).c_str());
}break;
case lineStartArrowWidth:
{
appendValueAttribute(&m_stroke, _T( "startarrowwidth" ), getArrowWidth( iter->op ).c_str());
appendValueAttribute(&m_stroke, L"startarrowwidth", getArrowWidth( iter->op ).c_str());
}break;
// FILL
case fillColor:
{
RGBColor fillColor((int)iter->op, RedFirst);
m_pXmlWriter->WriteAttribute(_T( "fillcolor" ), ( std::wstring( _T( "#" ) ) + fillColor.SixDigitHexCode ).c_str());
m_pXmlWriter->WriteAttribute(L"fillcolor", ( std::wstring( L"#" ) + fillColor.SixDigitHexCode ).c_str());
}break;
case fillBackColor:
{
RGBColor fillBackColor( (int)iter->op, RedFirst );
appendValueAttribute(&m_fill, _T( "color2" ), ( std::wstring( _T( "#" ) ) + fillBackColor.SixDigitHexCode ).c_str());
appendValueAttribute(&m_fill, L"color2", ( std::wstring( L"#" ) + fillBackColor.SixDigitHexCode ).c_str());
}break;
case fillAngle:
{
FixedPointNumber fllAngl( iter->op );
appendValueAttribute(&m_fill, _T( "angle" ), FormatUtils::DoubleToWideString( fllAngl.ToAngle() ).c_str());
appendValueAttribute(&m_fill, L"angle", FormatUtils::DoubleToWideString( fllAngl.ToAngle() ).c_str());
}break;
case fillShadeType:
{
appendValueAttribute(&m_fill, _T( "method" ), getFillMethod( iter->op ).c_str());
appendValueAttribute(&m_fill, L"method", getFillMethod( iter->op ).c_str());
}break;
case fillShadeColors:
{
appendValueAttribute(&m_fill, _T( "colors" ), getFillColorString( iter->opComplex, iter->op ).c_str());
appendValueAttribute(&m_fill, L"colors", getFillColorString( iter->opComplex, iter->op ).c_str());
}break;
case fillFocus:
{
appendValueAttribute(&m_fill, _T( "focus" ), ( FormatUtils::IntToWideString( iter->op ) + _T( "%" ) ).c_str());
appendValueAttribute(&m_fill, L"focus", ( FormatUtils::IntToWideString( iter->op ) + L"%" ).c_str());
}break;
case fillType:
{
appendValueAttribute(&m_fill, _T( "type" ), getFillType( iter->op ).c_str());
appendValueAttribute(&m_fill, L"type", getFillType( iter->op ).c_str());
}break;
case fillBlip:
{
......@@ -509,29 +509,28 @@ namespace DocFileFormat
if ( (pFillBlip != NULL) && copyPicture(pFillBlip) )
{
appendValueAttribute(&m_fill, _T( "r:id" ), ( std::wstring( _T( "rId" ) ) + FormatUtils::IntToWideString(m_nImageId) ).c_str());
appendValueAttribute(&m_imagedata, _T( "o:title" ), _T( "" ));
appendValueAttribute(&m_fill, L"r:id", std::wstring(( L"rId" ) + FormatUtils::IntToWideString(m_nImageId) ).c_str());
}
}break;
case fillOpacity:
{
appendValueAttribute(&m_fill, _T( "opacity" ), ( FormatUtils::IntToWideString( iter->op ) + _T( "f" ) ).c_str());
appendValueAttribute(&m_fill, L"opacity", ( FormatUtils::IntToWideString( iter->op ) + L"f" ).c_str());
}
break;
case fillBackOpacity:
{
appendValueAttribute(&m_fill, _T("opacity2"), (FormatUtils::IntToWideString(iter->op) + _T("f")).c_str());
appendValueAttribute(&m_fill, L"opacity2", (FormatUtils::IntToWideString(iter->op) + L"f").c_str());
}break;
// SHADOW
case shadowType:
{
appendValueAttribute(&m_shadow, _T("type"), getShadowType(iter->op).c_str());
appendValueAttribute(&m_shadow, L"type", getShadowType(iter->op).c_str());
}break;
case shadowColor:
{
RGBColor shadowColor((int)iter->op, RedFirst);
appendValueAttribute(&m_shadow, _T( "color" ), ( std::wstring( _T( "#" ) ) + shadowColor.SixDigitHexCode ).c_str());
appendValueAttribute(&m_shadow, L"color", ( std::wstring( L"#" ) + shadowColor.SixDigitHexCode ).c_str());
}break;
case shadowOffsetX:
{
......@@ -561,7 +560,7 @@ namespace DocFileFormat
{
double shadowOpa = (iter->op / pow( (double)2, (double)16));
appendValueAttribute(&m_shadow, _T( "opacity" ), FormatUtils::DoubleToFormattedWideString( shadowOpa, _T( "%.2f" ) ).c_str());
appendValueAttribute(&m_shadow, L"opacity", FormatUtils::DoubleToFormattedWideString( shadowOpa, L"%.2f" ).c_str());
}break;
case shadowStyleBooleanProperties:
{
......@@ -577,7 +576,7 @@ namespace DocFileFormat
BlipStoreEntry* oBlip = static_cast<BlipStoreEntry*>(m_pBlipStore->Children[index]);
if (copyPicture(oBlip))
{
appendValueAttribute(&m_imagedata, _T( "r:id" ), ( std::wstring( _T( "rId" ) ) + FormatUtils::IntToWideString(m_nImageId) ).c_str());
appendValueAttribute(&m_imagedata, L"r:id", ( std::wstring( L"rId" ) + FormatUtils::IntToWideString(m_nImageId) ).c_str());
}
}
}break;
......@@ -585,7 +584,8 @@ namespace DocFileFormat
{
std::wstring name;
FormatUtils::GetSTLCollectionFromBytes<std::wstring>(&name, iter->opComplex, iter->op, ENCODING_UTF16);
appendValueAttribute(&m_imagedata, _T( "o:title" ), FormatUtils::XmlEncode(name).c_str());
if (!name.empty())
appendValueAttribute(&m_imagedata, L"o:title", FormatUtils::XmlEncode(name).c_str());
}break;
// 3D STYLE
case f3D:
......@@ -597,37 +597,37 @@ namespace DocFileFormat
{
EmuValue backwardValue( (int)iter->op );
std::wstring depth = FormatUtils::DoubleToWideString( backwardValue.ToPoints() ) + L"pt";
appendValueAttribute(&m_3dstyle, _T( "backdepth" ), depth.c_str());
appendValueAttribute(&m_3dstyle, L"backdepth", depth.c_str());
}break;
case c3DAmbientIntensity:
{
std::wstring intens = FormatUtils::IntToWideString((int)iter->op) + L"f";
appendValueAttribute(&m_3dstyle, _T( "brightness" ), intens.c_str());
appendValueAttribute(&m_3dstyle, L"brightness", intens.c_str());
}break;
case c3DSpecularAmt:
{
std::wstring amt = FormatUtils::IntToWideString((int)iter->op) + L"f";
appendValueAttribute(&m_3dstyle, _T( "specularity" ), amt.c_str());
appendValueAttribute(&m_3dstyle, L"specularity", amt.c_str());
}break;
case c3DDiffuseAmt:
{
std::wstring amt = FormatUtils::IntToWideString((int)iter->op) + L"f";
appendValueAttribute(&m_3dstyle, _T( "diffusity" ), amt.c_str());
appendValueAttribute(&m_3dstyle, L"diffusity", amt.c_str());
}break;
case c3DKeyIntensity:
{
std::wstring amt = FormatUtils::IntToWideString((int)iter->op);
appendValueAttribute(&m_3dstyle, _T( "lightlevel" ), amt.c_str());
appendValueAttribute(&m_3dstyle, L"lightlevel", amt.c_str());
}break;
case c3DExtrusionColor:
{
std::wstring color = FormatUtils::IntToFormattedWideString(iter->op, L"#%06x");
appendValueAttribute(&m_3dstyle, _T( "color" ), color.c_str());
appendValueAttribute(&m_3dstyle, L"color", color.c_str());
}break;
case c3DSkewAngle:
{
FixedPointNumber skewAngle( iter->op );
appendValueAttribute(&m_3dstyle, _T( "skewangle" ), FormatUtils::DoubleToWideString( skewAngle.ToAngle() ).c_str());
appendValueAttribute(&m_3dstyle, L"skewangle", FormatUtils::DoubleToWideString( skewAngle.ToAngle() ).c_str());
}break;
case c3DXViewpoint:
{
......@@ -685,11 +685,11 @@ namespace DocFileFormat
text = FormatUtils::XmlEncode(text);
if (0 <= text.find(_T("\n")))
if (0 <= text.find(L"\n"))
{
m_textpath.AppendText(text.c_str());
}
text = ReplaceString(text, _T("\n") , _T("&#xA;"));
text = ReplaceString(text, L"\n", L"&#xA;");
appendValueAttribute(&m_textpath, L"string", text.c_str());
}break;
case gtextFont:
......@@ -703,7 +703,7 @@ namespace DocFileFormat
}
if (i < font.size()) font.erase(font.begin() + i, font.end());
font = std::wstring(_T("\"")) + font + std::wstring(_T("\""));
font = std::wstring(L"\"") + font + std::wstring(L"\"");
appendStyleProperty(&m_textPathStyle, L"font-family", font);
}break;
case gtextSize:
......@@ -721,11 +721,11 @@ namespace DocFileFormat
GeometryTextBooleanProperties props(iter->op);
if (props.fUsegtextFBestFit && props.gtextFBestFit)
{
appendValueAttribute(&m_textpath, L"fitshape", _T("t"));
appendValueAttribute(&m_textpath, L"fitshape", L"t");
}
if (props.fUsegtextFShrinkFit && props.gtextFShrinkFit)
{
appendValueAttribute(&m_textpath, L"trim", _T("t"));
appendValueAttribute(&m_textpath, L"trim", L"t");
}
if (props.fUsegtextFVertical && props.gtextFVertical)
{
......@@ -753,7 +753,7 @@ namespace DocFileFormat
std::wstring path = ParsePath(options);
if (false == path.empty())
m_pXmlWriter->WriteAttribute (_T( "path" ), path.c_str());
m_pXmlWriter->WriteAttribute (L"path", path.c_str());
}break;
default:
{
......@@ -767,27 +767,27 @@ namespace DocFileFormat
std::wstring path = ParsePath(options);
if (false == path.empty())
m_pXmlWriter->WriteAttribute (_T( "path" ), path.c_str());
m_pXmlWriter->WriteAttribute (L"path", path.c_str());
}
if ( !filled )
{
m_pXmlWriter->WriteAttribute( _T( "filled" ), _T( "f" ) );
m_pXmlWriter->WriteAttribute( L"filled", L"f" );
}
if ( !stroked )
{
m_pXmlWriter->WriteAttribute( _T( "stroked" ), _T( "f" ) );
m_pXmlWriter->WriteAttribute( L"stroked", L"f" );
}
if (!layoutInCell)
{
m_pXmlWriter->WriteAttribute(_T("o:allowincell"), _T("f"));
m_pXmlWriter->WriteAttribute(L"o:allowincell", L"f");
}
if ( ( xCoord > 0 ) && ( yCoord > 0 ) )
{
m_pXmlWriter->WriteAttribute( _T( "coordsize" ), ( FormatUtils::IntToWideString( xCoord ) + _T( "," ) + FormatUtils::IntToWideString( yCoord ) ).c_str() );
m_pXmlWriter->WriteAttribute( L"coordsize", ( FormatUtils::IntToWideString( xCoord ) + L"," + FormatUtils::IntToWideString( yCoord ) ).c_str() );
}
int nCode = 0;
......@@ -816,7 +816,7 @@ namespace DocFileFormat
}
}
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( L"", true, false );
//build shadow offsets
std::wstring offset;
......@@ -824,17 +824,17 @@ namespace DocFileFormat
if ( ShadowOffsetX != 0 )
{
offset += FormatUtils::DoubleToWideString( ShadowOffsetX.ToPoints() );
offset += _T( "pt" );
offset += L"pt";
}
if ( ShadowOffsetY != 0 )
{
offset += _T( "," );
offset += L",";
offset += FormatUtils::DoubleToWideString( ShadowOffsetY.ToPoints() );
offset += _T( "pt" );
offset += L"pt";
}
if ( !offset.empty() )
{
appendValueAttribute(&m_shadow, _T( "offset" ), offset.c_str());
appendValueAttribute(&m_shadow, L"offset", offset.c_str());
}
std::wstring offset2;
......@@ -842,25 +842,25 @@ namespace DocFileFormat
if ( SecondShadowOffsetX != 0 )
{
offset2 += FormatUtils::DoubleToWideString( SecondShadowOffsetX.ToPoints() );
offset2 += _T( "pt" );
offset2 += L"pt";
}
if ( SecondShadowOffsetY != 0 )
{
offset2 += _T( "," );
offset2 += L",";
offset2 += FormatUtils::DoubleToWideString(SecondShadowOffsetY.ToPoints());
offset2 += _T( "pt" );
offset2 += L"pt";
}
if (!offset2.empty())
{
appendValueAttribute(&m_shadow, _T("offset2"), offset2.c_str());
appendValueAttribute(&m_shadow, L"offset2", offset2.c_str());
}
//build shadow origin
if ( ( ShadowOriginX != 0 ) && ( ShadowOriginY != 0 ) )
{
appendValueAttribute(&m_shadow, _T("origin"), (FormatUtils::DoubleToWideString(shadowOriginX) + std::wstring(_T( "," )) + FormatUtils::DoubleToWideString(shadowOriginY)).c_str());
appendValueAttribute(&m_shadow, L"origin", (FormatUtils::DoubleToWideString(shadowOriginX) + std::wstring(L"," ) + FormatUtils::DoubleToWideString(shadowOriginY)).c_str());
}
// write shadow
......@@ -868,7 +868,7 @@ namespace DocFileFormat
{
if (shadowBoolean.fShadow)
{
appendValueAttribute(&m_shadow, _T( "on" ), _T( "t" ));
appendValueAttribute(&m_shadow, L"on", L"t" );
}
m_pXmlWriter->WriteString(m_shadow.GetXMLString().c_str());
......@@ -876,8 +876,8 @@ namespace DocFileFormat
//write 3d style
if (m_3dstyle.GetAttributeCount() > 0)
{
appendValueAttribute(&m_3dstyle, _T( "v:ext" ), _T( "view" ));
appendValueAttribute(&m_3dstyle, _T( "on" ), _T( "t" ));
appendValueAttribute(&m_3dstyle, L"v:ext", L"view" );
appendValueAttribute(&m_3dstyle, L"on", L"t" );
//write the viewpoint
if ( ( ViewPointX != 0 ) || ( ViewPointY != 0 ) || ( ViewPointZ != 0 ) )
......@@ -888,18 +888,18 @@ namespace DocFileFormat
{
viewPoint += FormatUtils::IntToWideString( ViewPointX ) + L"pt";
}
viewPoint += _T( "," );
viewPoint += L",";
if ( ViewPointY != 0 )
{
viewPoint += FormatUtils::IntToWideString( ViewPointY ) + L"pt";
}
viewPoint += _T( "," );
viewPoint += L",";
if ( ViewPointZ != 0 )
{
viewPoint += FormatUtils::IntToWideString( ViewPointZ ) + L"pt";
}
appendValueAttribute(&m_3dstyle, _T( "viewpoint" ), viewPoint.c_str());
appendValueAttribute(&m_3dstyle, L"viewpoint", viewPoint.c_str());
}
// write the viewpointorigin
if ( ( viewPointOriginX != 0 ) || ( viewPointOriginY != 0 ) )
......@@ -908,16 +908,16 @@ namespace DocFileFormat
if ( viewPointOriginX != 0 )
{
viewPointOrigin += FormatUtils::DoubleToFormattedWideString( viewPointOriginX, _T( "%.2f" ) );
viewPointOrigin += FormatUtils::DoubleToFormattedWideString( viewPointOriginX, L"%.2f" );
}
if ( viewPointOriginY != 0 )
{
viewPointOrigin += _T( "," );
viewPointOrigin += FormatUtils::DoubleToFormattedWideString( viewPointOriginY, _T( "%.2f" ) );
viewPointOrigin += L",";
viewPointOrigin += FormatUtils::DoubleToFormattedWideString( viewPointOriginY, L"%.2f" );
}
appendValueAttribute(&m_3dstyle, _T( "viewpointorigin" ), viewPointOrigin.c_str());
appendValueAttribute(&m_3dstyle, L"viewpointorigin", viewPointOrigin.c_str());
}
m_pXmlWriter->WriteString(m_3dstyle.GetXMLString().c_str());
......@@ -927,11 +927,11 @@ namespace DocFileFormat
{
std::wstring wrap = getWrapType(m_pSpa);
if (wrap != _T("through"))
if (wrap != L"through")
{
m_pXmlWriter->WriteNodeBegin( _T( "w10:wrap" ), TRUE );
m_pXmlWriter->WriteAttribute( _T( "type" ), wrap.c_str() );
m_pXmlWriter->WriteNodeEnd ( _T( "w10:wrap" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"w10:wrap", true );
m_pXmlWriter->WriteAttribute( L"type", wrap.c_str() );
m_pXmlWriter->WriteNodeEnd ( L"w10:wrap", true );
}
}
// write stroke
......@@ -947,7 +947,7 @@ namespace DocFileFormat
// text path
if (m_textpath.GetAttributeCount())
{
appendValueAttribute(&m_textpath, _T( "style" ), FormatUtils::XmlEncode(m_textPathStyle).c_str());
appendValueAttribute(&m_textpath, L"style", FormatUtils::XmlEncode(m_textPathStyle).c_str());
m_pXmlWriter->WriteString(m_textpath.GetXMLString().c_str());
}
// write imagedata
......@@ -1008,7 +1008,7 @@ namespace DocFileFormat
WriteEndShapeNode(pShape);
//ShapeType
if (NULL != pShape->GetShapeType()/* && !m_isInlineShape*/) //bullete only???
if (NULL != pShape->GetShapeType() && !pShape->fBackground /* && !m_isInlineShape*/) //bullete only???
{
VMLShapeTypeMapping oXmlMapper(m_pXmlWriter);
pShape->GetShapeType()->Convert(&oXmlMapper);
......@@ -1022,29 +1022,33 @@ namespace DocFileFormat
{
if (NULL != pShape)
{
if (pShape->is<OvalType>())
if (pShape->fBackground)
{
m_pXmlWriter->WriteNodeBegin( L"v:background", true );
}
else if (pShape->is<OvalType>())
{
//OVAL
m_pXmlWriter->WriteNodeBegin( _T( "v:oval" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"v:oval", true );
}
else if (pShape->is<RoundedRectangleType>())
{
//ROUNDED RECT
m_pXmlWriter->WriteNodeBegin( _T( "v:roundrect" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"v:roundrect", true );
}
else if (pShape->is<RectangleType>())
{
//RECT
m_pXmlWriter->WriteNodeBegin( _T( "v:rect" ), TRUE );
m_pXmlWriter->WriteNodeBegin( L"v:rect", true );
}
else if (pShape->is<LineType>())
{
//LINE
m_pXmlWriter->WriteNodeBegin(_T( "v:line" ), TRUE);
m_pXmlWriter->WriteNodeBegin(L"v:line", true);
}
else
{
m_pXmlWriter->WriteNodeBegin(_T( "v:shape" ), TRUE);
m_pXmlWriter->WriteNodeBegin(L"v:shape", true);
}
}
}
......@@ -1053,25 +1057,29 @@ namespace DocFileFormat
{
if (NULL != pShape)
{
if (pShape->is<OvalType>())
if (pShape->fBackground)
{
m_pXmlWriter->WriteNodeEnd( _T( "v:oval" ) );
m_pXmlWriter->WriteNodeEnd( L"v:background" );
}
else if (pShape->is<OvalType>())
{
m_pXmlWriter->WriteNodeEnd( L"v:oval" );
}
else if (pShape->is<RoundedRectangleType>())
{
m_pXmlWriter->WriteNodeEnd( _T( "v:roundrect" ) );
m_pXmlWriter->WriteNodeEnd( L"v:roundrect" );
}
else if (pShape->is<RectangleType>())
{
m_pXmlWriter->WriteNodeEnd( _T( "v:rect" ) );
m_pXmlWriter->WriteNodeEnd( L"v:rect" );
}
else if (pShape->is<LineType>())
{
m_pXmlWriter->WriteNodeEnd( _T( "v:line" ) );
m_pXmlWriter->WriteNodeEnd( L"v:line" );
}
else
{
m_pXmlWriter->WriteNodeEnd( _T( "v:shape" ) );
m_pXmlWriter->WriteNodeEnd( L"v:shape" );
}
}
}
......@@ -1082,7 +1090,7 @@ namespace DocFileFormat
if (NULL != pShape)
{
strXmlAttr += std::wstring(_T("_x0000_s" ));
strXmlAttr += std::wstring(L"_x0000_s");
strXmlAttr += FormatUtils::IntToWideString(pShape->GetShapeID());
}
......@@ -1099,7 +1107,7 @@ namespace DocFileFormat
if (NULL != pAnchor)
{
strXmlFrom += FormatUtils::IntToWideString(pAnchor->rcgBounds.topLeftAngle.x);
strXmlFrom += _T( "," );
strXmlFrom += L",";
strXmlFrom += FormatUtils::IntToWideString(pAnchor->rcgBounds.topLeftAngle.y);
}
else if (m_pSpa)
......@@ -1108,9 +1116,9 @@ namespace DocFileFormat
TwipsValue oTop(m_pSpa->yaTop);
strXmlFrom += FormatUtils::DoubleToWideString(oLeft.ToPoints());
strXmlFrom += _T( "pt," );
strXmlFrom += L"pt,";
strXmlFrom += FormatUtils::DoubleToWideString(oTop.ToPoints());
strXmlFrom += _T( "pt" );
strXmlFrom += L"pt";
}
return strXmlFrom;
......@@ -1118,7 +1126,6 @@ namespace DocFileFormat
std::wstring VMLShapeMapping::GetLineTo(const ChildAnchor* pAnchor) const
{
//Если линия находится в группе, то координаты должны быть в Twips
//Если линия находится в группе, то координаты должны быть в других единицах измерения (например в twips)
std::wstring strXmlTo;
......@@ -1126,7 +1133,7 @@ namespace DocFileFormat
if (NULL != pAnchor)
{
strXmlTo += FormatUtils::IntToWideString(pAnchor->rcgBounds.topLeftAngle.x + pAnchor->rcgBounds.size.cx);
strXmlTo += _T( "," );
strXmlTo += L",";
strXmlTo += FormatUtils::IntToWideString(pAnchor->rcgBounds.topLeftAngle.y + pAnchor->rcgBounds.size.cy);
}
else if (m_pSpa)
......@@ -1135,9 +1142,9 @@ namespace DocFileFormat
TwipsValue oBottom (m_pSpa->yaBottom);
strXmlTo += FormatUtils::DoubleToWideString(oRight.ToPoints());
strXmlTo += _T( "pt," );
strXmlTo += L"pt,";
strXmlTo += FormatUtils::DoubleToWideString(oBottom.ToPoints());
strXmlTo += _T( "pt" );
strXmlTo += L"pt";
}
return strXmlTo;
......@@ -1167,7 +1174,7 @@ namespace DocFileFormat
for (std::list<int>::const_iterator iter = arrVertices.begin(); iter != end; ++iter)
{
coords += FormatUtils::IntToWideString(*iter);
coords += _T( "," );
coords += L",";
}
coords.erase(coords.size() - 1);
......@@ -1250,35 +1257,35 @@ namespace DocFileFormat
switch ( _type )
{
case Global::msoblipDIB:
return std::wstring( _T( ".bmp" ) );
return std::wstring( L".bmp" );
case Global::msoblipEMF:
return std::wstring( _T( ".emf" ) );
return std::wstring( L".emf" );
//case msoblipGIF:
// return std::wstring( _T( ".gif" ) );
// return std::wstring( L".gif" );
//case msoblipICON:
// return std::wstring( _T( ".ico" ) );
// return std::wstring( L".ico" );
case Global::msoblipJPEG:
case Global::msoblipCMYKJPEG:
return std::wstring( _T( ".jpg" ) );
return std::wstring( L".jpg" );
//case msoblipPCX:
// return std::wstring( _T( ".pcx" ) );
// return std::wstring( L".pcx" );
case Global::msoblipPNG:
return std::wstring( _T( ".png" ) );
return std::wstring( L".png" );
case Global::msoblipTIFF:
return std::wstring( _T( ".tif" ) );
return std::wstring( L".tif" );
case Global::msoblipWMF:
return std::wstring( _T( ".wmf" ) );
return std::wstring( L".wmf" );
default:
return std::wstring( _T( ".png" ) );
return std::wstring( L".png" );
}
}
......@@ -1301,8 +1308,8 @@ namespace DocFileFormat
std::wstring widthString = FormatUtils::DoubleToWideString( width.ToPoints() );
std::wstring heightString = FormatUtils::DoubleToWideString( height.ToPoints() );
style->operator += ( std::wstring( _T( "width:" ) ) + widthString + std::wstring( _T( "pt;" ) ) );
style->operator += ( std::wstring( _T( "height:" ) ) + heightString + std::wstring( _T( "pt;" ) ) );
style->operator += ( std::wstring( L"width:" ) + widthString + std::wstring( L"pt;" ) );
style->operator += ( std::wstring( L"height:" ) + heightString + std::wstring( L"pt;" ) );
}
}
......@@ -1315,11 +1322,11 @@ namespace DocFileFormat
//if (pSpa->fAnchorLock )
//if (pSpa->bx == TEXT && pSpa->by == TEXT)
//{
// appendStyleProperty( style, _T( "position" ), _T( "static" ) );
// appendStyleProperty( style, L"position", L"static" );
//}
//else
//{
appendStyleProperty( style, _T( "position" ), _T( "absolute" ) );
appendStyleProperty( style, L"position", L"absolute" );
//}
TwipsValue left (pSpa->xaLeft);
......@@ -1336,10 +1343,10 @@ namespace DocFileFormat
top = TwipsValue((pSpa->yaBottom + pSpa->yaTop) * 0.5 - (pSpa->xaRight - pSpa->xaLeft) * 0.5);
}
appendStyleProperty (style, _T( "margin-left" ), ( FormatUtils::DoubleToWideString(left.ToPoints()) + std::wstring( _T( "pt" ) ) ));
appendStyleProperty (style, _T( "margin-top" ), ( FormatUtils::DoubleToWideString(top.ToPoints()) + std::wstring( _T( "pt" ) ) ));
appendStyleProperty (style, _T( "width" ), ( FormatUtils::DoubleToWideString(width.ToPoints()) + std::wstring( _T( "pt" ) ) ));
appendStyleProperty (style, _T( "height" ), ( FormatUtils::DoubleToWideString(height.ToPoints()) + std::wstring( _T( "pt" ) ) ));
appendStyleProperty (style, L"margin-left", ( FormatUtils::DoubleToWideString(left.ToPoints()) + std::wstring( L"pt" ) ));
appendStyleProperty (style, L"margin-top", ( FormatUtils::DoubleToWideString(top.ToPoints()) + std::wstring( L"pt" ) ));
appendStyleProperty (style, L"width", ( FormatUtils::DoubleToWideString(width.ToPoints()) + std::wstring( L"pt" ) ));
appendStyleProperty (style, L"height", ( FormatUtils::DoubleToWideString(height.ToPoints()) + std::wstring( L"pt" ) ));
}
}
......@@ -1355,19 +1362,19 @@ namespace DocFileFormat
bounds.topLeftAngle.y = static_cast<LONG>(((anchor->Bottom + anchor->Top) * 0.5 - (anchor->Right - anchor->Left) * 0.5));
}
appendStyleProperty(style, _T("position"), _T("absolute"));
appendStyleProperty(style, _T("left"), FormatUtils::IntToWideString(bounds.topLeftAngle.x));
appendStyleProperty(style, _T("top"), FormatUtils::IntToWideString(bounds.topLeftAngle.y));
appendStyleProperty(style, L"position", L"absolute");
appendStyleProperty(style, L"left", FormatUtils::IntToWideString(bounds.topLeftAngle.x));
appendStyleProperty(style, L"top", FormatUtils::IntToWideString(bounds.topLeftAngle.y));
if (twistDimensions)
{
appendStyleProperty(style, _T("width"), FormatUtils::IntToWideString(bounds.size.cy));
appendStyleProperty(style, _T("height"), FormatUtils::IntToWideString(bounds.size.cx));
appendStyleProperty(style, L"width", FormatUtils::IntToWideString(bounds.size.cy));
appendStyleProperty(style, L"height", FormatUtils::IntToWideString(bounds.size.cx));
}
else
{
appendStyleProperty(style, _T("width"), FormatUtils::IntToWideString(bounds.size.cx));
appendStyleProperty(style, _T("height"), FormatUtils::IntToWideString(bounds.size.cy));
appendStyleProperty(style, L"width", FormatUtils::IntToWideString(bounds.size.cx));
appendStyleProperty(style, L"height", FormatUtils::IntToWideString(bounds.size.cy));
}
}
}
......@@ -1377,9 +1384,9 @@ namespace DocFileFormat
if ( b != NULL )
{
b->operator += ( propName );
b->operator += ( _T( ":" ) );
b->operator += ( L":" );
b->operator += ( propValue );
b->operator +=( _T( ";" ) );
b->operator +=( L";" );
}
}
......@@ -1387,18 +1394,18 @@ namespace DocFileFormat
{
switch ( anchor )
{
case 0: return _T("top");
case 1: return _T("middle");
case 2: return _T("bottom");
case 3: return _T("top-center");
case 4: return _T("middle-center");
case 5: return _T("bottom-center");
case 6: return _T("top-baseline");
case 7: return _T("bottom-baseline");
case 8: return _T("top-center-baseline");
case 9: return _T("bottom-center-baseline");
case 0: return L"top";
case 1: return L"middle";
case 2: return L"bottom";
case 3: return L"top-center";
case 4: return L"middle-center";
case 5: return L"bottom-center";
case 6: return L"top-baseline";
case 7: return L"bottom-baseline";
case 8: return L"top-center-baseline";
case 9: return L"bottom-center-baseline";
default:
return _T("top");
return L"top";
}
}
......@@ -1406,14 +1413,14 @@ namespace DocFileFormat
{
switch ( vPos )
{
/*case msopvAbs: return _T( "absolute" );*/
case msopvTop: return _T( "top" );
case msopvCenter: return _T( "center" );
case msopvBottom: return _T( "bottom" );
case msopvInside: return _T( "inside" );
case msopvOutside: return _T( "outside" );
/*case msopvAbs: return L"absolute" );*/
case msopvTop: return L"top";
case msopvCenter: return L"center";
case msopvBottom: return L"bottom";
case msopvInside: return L"inside";
case msopvOutside: return L"outside";
default:
return _T( "absolute" );
return L"absolute";
}
}
......@@ -1422,12 +1429,12 @@ namespace DocFileFormat
PositionVerticalRelative vRel = (PositionVerticalRelative)vRel_;
switch ( vRel )
{
case msoprvMargin: return _T( "margin" );
case msoprvPage: return _T( "page" );
case msoprvText: return _T( "text" );
case msoprvLine: return _T( "line" );
case msoprvMargin: return L"margin";
case msoprvPage: return L"page";
case msoprvText: return L"text";
case msoprvLine: return L"line";
default:
return _T( "margin" );
return L"margin";
}
}
......@@ -1435,14 +1442,14 @@ namespace DocFileFormat
{
switch ( hPos )
{
/*case msophAbs: return _T( "absolute" );*/
case msophLeft: return _T( "left" );
case msophCenter: return _T( "center" );
case msophRight: return _T( "right" );
case msophInside: return _T( "inside" );
case msophOutside: return _T( "outside" );
/*case msophAbs: return L"absolute";*/
case msophLeft: return L"left";
case msophCenter: return L"center";
case msophRight: return L"right";
case msophInside: return L"inside";
case msophOutside: return L"outside";
default:
return _T( "absolute" );
return L"absolute";
}
}
......@@ -1451,12 +1458,12 @@ namespace DocFileFormat
PositionHorizontalRelative hRel = (PositionHorizontalRelative )hRel_;
switch ( hRel )
{
case msoprhMargin: return _T( "margin" );
case msoprhPage: return _T( "page" );
case msoprhText: return _T( "text" );
case msoprhChar: return _T( "char" );
case msoprhMargin: return L"margin";
case msoprhPage: return L"page";
case msoprhText: return L"text";
case msoprhChar: return L"char";
default:
return _T( "margin" );
return L"margin";
}
}
......@@ -1478,22 +1485,22 @@ namespace DocFileFormat
// POSITIONING
case posh:
{
appendStyleProperty(oStyle, _T("mso-position-horizontal"), mapHorizontalPosition((PositionHorizontal)iter->op));
appendStyleProperty(oStyle, L"mso-position-horizontal", mapHorizontalPosition((PositionHorizontal)iter->op));
bPosH = true;
}break;
case posrelh:
{
appendStyleProperty(oStyle, _T("mso-position-horizontal-relative"), mapHorizontalPositionRelative((PositionHorizontalRelative)iter->op));
appendStyleProperty(oStyle, L"mso-position-horizontal-relative", mapHorizontalPositionRelative((PositionHorizontalRelative)iter->op));
bRelH = true;
}break;
case posv:
{
appendStyleProperty(oStyle, _T("mso-position-vertical"), mapVerticalPosition((PositionVertical)iter->op));
appendStyleProperty(oStyle, L"mso-position-vertical", mapVerticalPosition((PositionVertical)iter->op));
bPosV = true;
}break;
case posrelv:
{
appendStyleProperty(oStyle, _T("mso-position-vertical-relative"), mapVerticalPositionRelative((PositionVerticalRelative)iter->op));
appendStyleProperty(oStyle, L"mso-position-vertical-relative", mapVerticalPositionRelative((PositionVerticalRelative)iter->op));
bRelV = true;
}break;
// BOOLEANS
......@@ -1504,18 +1511,18 @@ namespace DocFileFormat
if (groupShapeBooleans.fUsefBehindDocument && groupShapeBooleans.fBehindDocument && !bZIndex)
{
//The shape is behind the text, so the z-index must be negative.
appendStyleProperty(oStyle, _T( "z-index" ), _T( "-1" ) );
appendStyleProperty(oStyle, L"z-index", L"-1" );
bZIndex = true;
}
else if (!m_isInlineShape && !bZIndex)
{
appendStyleProperty( oStyle, _T( "z-index" ), FormatUtils::IntToWideString(zIndex + 0x7ffff));
appendStyleProperty( oStyle, L"z-index", FormatUtils::IntToWideString(zIndex + 0x7ffff));
bZIndex = true;
}
if (groupShapeBooleans.fHidden && groupShapeBooleans.fUsefHidden)
{
appendStyleProperty(oStyle, _T( "visibility" ), _T( "hidden" ));
appendStyleProperty(oStyle, L"visibility", L"hidden" );
}
}break;
// GEOMETRY
......@@ -1526,54 +1533,54 @@ namespace DocFileFormat
if (dAngle < -360.0)
dAngle += 360.0;
appendStyleProperty(oStyle, _T( "rotation" ), FormatUtils::DoubleToWideString(dAngle));
appendStyleProperty(oStyle, L"rotation", FormatUtils::DoubleToWideString(dAngle));
}break;
// TEXTBOX
case anchorText:
{
appendStyleProperty(oStyle, _T("v-text-anchor"), getTextboxAnchor(iter->op));
appendStyleProperty(oStyle, L"v-text-anchor", getTextboxAnchor(iter->op));
}break;
// WRAP DISTANCE
case dxWrapDistLeft:
{
appendStyleProperty(oStyle, _T("mso-wrap-distance-left"), (FormatUtils::DoubleToWideString(EmuValue((int)iter->op).ToPoints()) + std::wstring(_T("pt"))));
appendStyleProperty(oStyle, L"mso-wrap-distance-left", (FormatUtils::DoubleToWideString(EmuValue((int)iter->op).ToPoints()) + std::wstring(L"pt")));
}break;
case dxWrapDistRight:
{
appendStyleProperty(oStyle, _T("mso-wrap-distance-right"), (FormatUtils::DoubleToWideString(EmuValue((int)iter->op).ToPoints()) + std::wstring(_T("pt"))));
appendStyleProperty(oStyle, L"mso-wrap-distance-right", (FormatUtils::DoubleToWideString(EmuValue((int)iter->op).ToPoints()) + std::wstring(L"pt")));
}break;
case dyWrapDistBottom:
{
appendStyleProperty(oStyle, _T("mso-wrap-distance-bottom"), (FormatUtils::DoubleToWideString(EmuValue((int)iter->op).ToPoints()) + std::wstring(_T("pt"))));
appendStyleProperty(oStyle, L"mso-wrap-distance-bottom", (FormatUtils::DoubleToWideString(EmuValue((int)iter->op).ToPoints()) + std::wstring(L"pt")));
}break;
case dyWrapDistTop:
{
appendStyleProperty(oStyle, _T("mso-wrap-distance-top"), (FormatUtils::DoubleToWideString(EmuValue((int)iter->op).ToPoints()) + std::wstring(_T("pt"))));
appendStyleProperty(oStyle, L"mso-wrap-distance-top", (FormatUtils::DoubleToWideString(EmuValue((int)iter->op).ToPoints()) + std::wstring(L"pt")));
}break;
}
}
if (!bRelH && m_pSpa)
{
appendStyleProperty(oStyle, _T("mso-position-horizontal-relative"), mapHorizontalPositionRelative(m_pSpa->bx));
appendStyleProperty(oStyle, L"mso-position-horizontal-relative", mapHorizontalPositionRelative(m_pSpa->bx));
}
if (!bRelV && m_pSpa)
{
appendStyleProperty(oStyle, _T("mso-position-vertical-relative"), mapVerticalPositionRelative(m_pSpa->bx));
appendStyleProperty(oStyle, L"mso-position-vertical-relative", mapVerticalPositionRelative(m_pSpa->bx));
}
if (!m_isInlineShape && !bZIndex)
{
appendStyleProperty( oStyle, _T( "z-index" ), FormatUtils::IntToWideString(zIndex + 0x7ffff));
appendStyleProperty( oStyle, L"z-index", FormatUtils::IntToWideString(zIndex + 0x7ffff));
bZIndex = true;
}
//if (!bPosH)
//{
// appendStyleProperty(oStyle, _T("mso-position-horizontal"), _T( "absolute" ));
// appendStyleProperty(oStyle, L"mso-position-horizontal", L"absolute" );
//}
//if (!bPosV)
//{
// appendStyleProperty(oStyle, _T("mso-position-vertical"), _T( "absolute" ));
// appendStyleProperty(oStyle, L"mso-position-vertical", L"absolute" );
//}
}
......@@ -1636,7 +1643,7 @@ namespace DocFileFormat
//если не написать тип позиции, то будет inline
if ( anchor != NULL )
{
appendStyleProperty( &style, _T( "position" ), _T( "absolute" ) );
appendStyleProperty( &style, L"position", L"absolute" );
}
else if (m_pSpa)
{
......@@ -1645,23 +1652,23 @@ namespace DocFileFormat
//if (m_pSpa->bx == TEXT && m_pSpa->by == TEXT)
//{
// appendStyleProperty( &style, _T( "position" ), _T( "static" ) );
// appendStyleProperty( &style, L"position", L"static" );
//}
//else
{
appendStyleProperty( &style, _T( "position" ), _T( "absolute" ) );
appendStyleProperty( &style, L"position", L"absolute" );
}
}
}
if ( shape->fFlipH )
{
appendStyleProperty( &style, _T( "flip" ), _T( "x" ) );
appendStyleProperty( &style, L"flip", L"x" );
}
if ( shape->fFlipV )
{
appendStyleProperty( &style, _T( "flip" ), _T( "y" ) );
appendStyleProperty( &style, L"flip", L"y" );
}
AppendOptionsToStyle( &style, options, zIndex );
......@@ -1673,12 +1680,12 @@ namespace DocFileFormat
{
switch (p)
{
case 0: return _T( "single" );
case 1: return _T( "thinThin" );
case 2: return _T( "thinThick" );
case 3: return _T( "thickThin" );
case 4: return _T( "thickBetweenThin" );
default: return _T( "single" );
case 0: return L"single";
case 1: return L"thinThin";
case 2: return L"thinThick";
case 3: return L"thickThin";
case 4: return L"thickBetweenThin";
default: return L"single";
}
}
......@@ -1686,12 +1693,12 @@ namespace DocFileFormat
{
switch ( op )
{
default: return _T( "none" );
case 1: return _T( "block" );
case 2: return _T( "classic" );
case 3: return _T( "diamond" );
case 4: return _T( "oval" );
case 5: return _T( "open" );
default: return L"none";
case 1: return L"block";
case 2: return L"classic";
case 3: return L"diamond";
case 4: return L"oval";
case 5: return L"open";
}
}
......@@ -1699,9 +1706,9 @@ namespace DocFileFormat
{
switch ( op )
{
default: return _T( "short" );
case 1: return _T( "medium" );
case 2: return _T( "long" );
default: return L"short";
case 1: return L"medium";
case 2: return L"long";
}
}
......@@ -1709,9 +1716,9 @@ namespace DocFileFormat
{
switch ( op )
{
default: return _T( "narrow" );
case 1: return _T( "medium" );
case 2: return _T( "wide" );
default: return L"narrow";
case 1: return L"medium";
case 2: return L"wide";
}
}
......@@ -1721,35 +1728,12 @@ namespace DocFileFormat
switch ( val )
{
case 0:
{
return _T( "none" );
}
break;
case 1:
{
return _T( "any" );
}
break;
case 2:
{
return _T( "linear" );
}
break;
case 4:
{
return _T( "linear sigma" );
}
break;
case 0: return L"none";
case 1: return L"any";
case 2: return L"linear";
case 4: return L"linear sigma";
default:
{
return _T( "any" );
}
break;
return L"any";
}
}
......@@ -1772,9 +1756,9 @@ namespace DocFileFormat
int colorPos = FormatUtils::BytesToInt32(p, ( pos + 4 ), size);
result += FormatUtils::IntToWideString(colorPos);
result += _T( "f #" );
result += L"f #";
result += color.SixDigitHexCode;
result += _T( ";" );
result += L";";
}
}
......@@ -1786,58 +1770,17 @@ namespace DocFileFormat
{
switch ( p )
{
case 0:
{
return _T( "solid" );
}
break;
case 1:
{
return _T( "pattern" );
}
break;
case 2:
{
return _T( "tile" );
}
break;
case 3:
{
return _T( "frame" );
}
break;
case 4:
{
return _T( "gradient" );
}
break;
case 5:
{
return _T( "gradientRadial" );
}
break;
case 6:
{
return _T( "gradientRadial" );
}
break;
case 7:
{
return _T( "gradient" );
}
break;
case 0: return L"solid";
case 1: return L"pattern";
case 2: return L"tile";
case 3: return L"frame";
case 4: return L"gradient";
case 5: return L"gradientRadial";
case 6: return L"gradientRadial";
case 7: return L"gradient";
case 9:
{
return _T( "solid" );
}
break;
default:
{
return _T( "solid" );
}
break;
return L"solid";
}
}
......@@ -1845,47 +1788,14 @@ namespace DocFileFormat
{
switch ( p )
{
case 0:
{
return _T( "single" );
}
break;
case 1:
{
return _T( "double" );
}
break;
case 2:
{
return _T( "perspective" );
}
break;
case 3:
{
return _T( "shaperelative" );
}
break;
case 4:
{
return _T( "drawingrelative" );
}
break;
case 5:
{
return _T( "emboss" );
}
break;
case 0: return L"single";
case 1: return L"double";
case 2: return L"perspective";
case 3: return L"shaperelative";
case 4: return L"drawingrelative";
case 5: return L"emboss";
default:
{
return _T( "single" );
}
break;
return L"single";
}
}
......@@ -1900,43 +1810,20 @@ namespace DocFileFormat
// 4 = wrap tightly areound object
// 5 = wrap tightly but allow holes
std::wstring wrapType = _T("none");
std::wstring wrapType = L"none";
if (pSpa != NULL)
{
switch (pSpa->wr)
{
case 0:
case 2:
{
wrapType = _T( "square" );
}
break;
case 1:
{
wrapType = _T( "topAndBottom" );
}
break;
case 3:
{
wrapType = _T( "through" );
}
break;
case 4:
case 5:
{
wrapType = _T( "tight" );
}
break;
default:
{
wrapType = _T( "none" );
}
break;
case 0:
case 2: wrapType = L"square";
case 1: wrapType = L"topAndBottom";
case 3: wrapType = L"through";
case 4:
case 5: wrapType = L"tight";
default:
wrapType = L"none";
}
}
......@@ -2025,7 +1912,7 @@ namespace DocFileFormat
DrawingPrimitive *primitive = dynamic_cast<DrawingPrimitive *>(primitives->at(index));
m_pXmlWriter->WriteNodeBegin(primitive->strVmlType.c_str(), TRUE );
m_pXmlWriter->WriteNodeBegin(primitive->strVmlType.c_str(), true );
if (primitive->type == 0x0007)
{
......@@ -2090,10 +1977,10 @@ namespace DocFileFormat
TwipsValue h( primitive->dya );
std::wstring strId = std::wstring(L"_x0000_s") + FormatUtils::IntToWideString(1024 + (count_vml_objects++));
//m_pXmlWriter->WriteAttribute ( _T( "id") , strId.c_str());
m_pXmlWriter->WriteAttribute ( _T( "o:spid"), strId.c_str());
//m_pXmlWriter->WriteAttribute ( L"id") , strId.c_str());
m_pXmlWriter->WriteAttribute ( L"o:spid", strId.c_str());
std::wstring strStyle = _T("position:absolute;visibility:visible;mso-wrap-style:square;");
std::wstring strStyle = L"position:absolute;visibility:visible;mso-wrap-style:square;";
DrawingPrimitiveLine * line = dynamic_cast<DrawingPrimitiveLine *>(primitive);
if (line)
......@@ -2103,83 +1990,83 @@ namespace DocFileFormat
TwipsValue x2( line->xaEnd );
TwipsValue y2( line->yaEnd );
std::wstring strStart = FormatUtils::IntToWideString(line->xaStart + primitive->xa) + _T(",") + FormatUtils::IntToWideString(line->yaStart + primitive->ya);
std::wstring strEnd = FormatUtils::IntToWideString(line->xaEnd + primitive->xa) + _T(",") + FormatUtils::IntToWideString(line->yaEnd + primitive->ya);
std::wstring strStart = FormatUtils::IntToWideString(line->xaStart + primitive->xa) + L"," + FormatUtils::IntToWideString(line->yaStart + primitive->ya);
std::wstring strEnd = FormatUtils::IntToWideString(line->xaEnd + primitive->xa) + L"," + FormatUtils::IntToWideString(line->yaEnd + primitive->ya);
m_pXmlWriter->WriteAttribute(_T("from"), strStart.c_str() );
m_pXmlWriter->WriteAttribute(_T("to"), strEnd.c_str());
m_pXmlWriter->WriteAttribute(L"from", strStart.c_str() );
m_pXmlWriter->WriteAttribute(L"to", strEnd.c_str());
}
else
{
if (root)
{
//strStyle += _T("left:") + FormatUtils::IntToWideString( x.ToPoints()) + _T("pt;");
//strStyle += _T("top:") + FormatUtils::IntToWideString( y.ToPoints()) + _T("pt;");
strStyle += _T("width:") + FormatUtils::IntToWideString( w.ToPoints()) + _T("pt;");
strStyle += _T("height:") + FormatUtils::IntToWideString( h.ToPoints()) + _T("pt;");
//strStyle += L"left:" + FormatUtils::IntToWideString( x.ToPoints()) + L"pt;";
//strStyle += L"top:" + FormatUtils::IntToWideString( y.ToPoints()) + L"pt;";
strStyle += L"width:" + FormatUtils::IntToWideString( w.ToPoints()) + L"pt;";
strStyle += L"height:" + FormatUtils::IntToWideString( h.ToPoints()) + L"pt;";
strStyle += _T("margin-left:") + FormatUtils::IntToWideString( x.ToPoints()) + _T("pt;");
strStyle += _T("margin-top:") + FormatUtils::IntToWideString( y.ToPoints()) + _T("pt;");
strStyle += L"margin-left:" + FormatUtils::IntToWideString( x.ToPoints()) + L"pt;";
strStyle += L"margin-top:" + FormatUtils::IntToWideString( y.ToPoints()) + L"pt;";
std::wstring xMargin;
std::wstring yMargin;
if (m_pSpa->bx == PAGE) xMargin = _T("page;");
if (m_pSpa->by == PAGE) yMargin = _T("page;");
if (m_pSpa->bx == PAGE) xMargin = L"page;";
if (m_pSpa->by == PAGE) yMargin = L"page;";
if (m_pSpa->bx == MARGIN) xMargin = _T("margin;");
if (m_pSpa->by == MARGIN) yMargin = _T("margin;");
if (m_pSpa->bx == MARGIN) xMargin = L"margin;";
if (m_pSpa->by == MARGIN) yMargin = L"margin;";
if (!xMargin.empty()) strStyle += _T("mso-position-horizontal-relative:") + xMargin;
if (!yMargin.empty()) strStyle += _T("mso-position-vertical-relative:") + yMargin;
if (!xMargin.empty()) strStyle += L"mso-position-horizontal-relative:" + xMargin;
if (!yMargin.empty()) strStyle += L"mso-position-vertical-relative:" + yMargin;
std::wstring strSize = FormatUtils::IntToWideString(primitive->dxa) + _T(",") + FormatUtils::IntToWideString(primitive->dya);
std::wstring strOrigin = FormatUtils::IntToWideString(primitive->xa) + _T(",") + FormatUtils::IntToWideString(primitive->ya);
std::wstring strSize = FormatUtils::IntToWideString(primitive->dxa) + L"," + FormatUtils::IntToWideString(primitive->dya);
std::wstring strOrigin = FormatUtils::IntToWideString(primitive->xa) + L"," + FormatUtils::IntToWideString(primitive->ya);
m_pXmlWriter->WriteAttribute( _T("coordsize"), strSize.c_str());
//m_pXmlWriter->WriteAttribute( _T("coordorigin"), strOrigin.c_str());
m_pXmlWriter->WriteAttribute( L"coordsize", strSize.c_str());
//m_pXmlWriter->WriteAttribute( L"coordorigin"), strOrigin.c_str());
}
else
{
strStyle += _T("left:") + FormatUtils::IntToWideString( primitive->xa) + _T(";");
strStyle += _T("top:") + FormatUtils::IntToWideString( primitive->ya) + _T(";");
strStyle += _T("width:") + FormatUtils::IntToWideString( primitive->dxa) + _T(";");
strStyle += _T("height:") + FormatUtils::IntToWideString( primitive->dya) + _T(";");
strStyle += L"left:" + FormatUtils::IntToWideString( primitive->xa) + L";";
strStyle += L"top:" + FormatUtils::IntToWideString( primitive->ya) + L";";
strStyle += L"width:" + FormatUtils::IntToWideString( primitive->dxa) + L";";
strStyle += L"height:" + FormatUtils::IntToWideString( primitive->dya) + L";";
}
}
if (primitive->fillPattern == 0)
m_pXmlWriter->WriteAttribute( _T("filled"), _T("f"));
m_pXmlWriter->WriteAttribute( L"filled", L"f");
if (primitive->type > 1)
{
m_pXmlWriter->WriteAttribute( _T("fillColor"), FormatUtils::IntToFormattedWideString(primitive->fillFore, L"#%06x").c_str());
m_pXmlWriter->WriteAttribute( L"fillColor", FormatUtils::IntToFormattedWideString(primitive->fillFore, L"#%06x").c_str());
}
m_pXmlWriter->WriteAttribute( _T("style"), strStyle.c_str());
m_pXmlWriter->WriteAttribute( L"style", strStyle.c_str());
std::wstring strStrokeWeight = FormatUtils::IntToWideString(primitive->lineWeight / 20) + _T("pt");
std::wstring strStrokeWeight = FormatUtils::IntToWideString(primitive->lineWeight / 20) + L"pt";
if (primitive->lineWeight > 20)
m_pXmlWriter->WriteAttribute( _T("strokeweight"), strStrokeWeight.c_str());
m_pXmlWriter->WriteAttribute( L"strokeweight", strStrokeWeight.c_str());
if (primitive->type > 0)
m_pXmlWriter->WriteAttribute( _T("strokecolor"), FormatUtils::IntToFormattedWideString(primitive->lineColor, L"#%06x").c_str());
m_pXmlWriter->WriteAttribute( L"strokecolor", FormatUtils::IntToFormattedWideString(primitive->lineColor, L"#%06x").c_str());
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( L"", true, false );
if (primitive->type > 1 && primitive->fillPattern > 1)
{
m_pXmlWriter->WriteNodeBegin(_T("v:fill"), TRUE );
m_pXmlWriter->WriteAttribute( _T("color2"), FormatUtils::IntToFormattedWideString(primitive->fillBack, L"#%06x").c_str());
m_pXmlWriter->WriteAttribute( _T("type"), _T("pattern"));
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( _T("v:fill") );
m_pXmlWriter->WriteNodeBegin(L"v:fill", true );
m_pXmlWriter->WriteAttribute( L"color2", FormatUtils::IntToFormattedWideString(primitive->fillBack, L"#%06x").c_str());
m_pXmlWriter->WriteAttribute( L"type", L"pattern");
m_pXmlWriter->WriteNodeEnd( L"", true, false );
m_pXmlWriter->WriteNodeEnd( L"v:fill" );
}
if (primitive->lineStyle > 1)
{
m_pXmlWriter->WriteNodeBegin(_T("v:stroke"), TRUE );
std::wstring strDashStyle = FormatUtils::IntToWideString(primitive->lineStyle) + _T(" 1");
m_pXmlWriter->WriteAttribute( _T("dashstyle"), strDashStyle.c_str());
m_pXmlWriter->WriteNodeEnd( _T( "" ), TRUE, FALSE );
m_pXmlWriter->WriteNodeEnd( _T("v:stroke") );
m_pXmlWriter->WriteNodeBegin(L"v:stroke", true );
std::wstring strDashStyle = FormatUtils::IntToWideString(primitive->lineStyle) + L" 1";
m_pXmlWriter->WriteAttribute( L"dashstyle", strDashStyle.c_str());
m_pXmlWriter->WriteNodeEnd( L"", true, false );
m_pXmlWriter->WriteNodeEnd( L"v:stroke" );
}
}
......
......@@ -50,8 +50,10 @@
int _tmain(int argc, _TCHAR* argv[])
{
if (argc < 2) return 1;
std::wstring sSrcDoc = argv[1];
std::wstring sDstDocx = argv[2];
std::wstring sDstDocx = argc > 2 ? argv[2] : sSrcDoc + L"-my.docx";
std::wstring outputDir = FileSystem::Directory::GetFolderPath(sDstDocx);
std::wstring dstTempPath = FileSystem::Directory::CreateDirectoryWithUniqueName(outputDir);
......
......@@ -37,12 +37,21 @@
#include "../../src/ConvertOO2OOX.h"
#if defined(_WIN64)
#pragma comment(lib, "../../../build/bin/icu/win_64/icuuc.lib")
#elif defined (_WIN32)
#pragma comment(lib, "../../../build/bin/icu/win_32/icuuc.lib")
#endif
int _tmain(int argc, _TCHAR* argv[])
{
if (argc < 2) return 1;
HRESULT hr = S_OK;
//////////////////////////////////////////////////////////////////////////
std::wstring srcFileName = argv[1];
std::wstring dstPath = argv[2];
std::wstring dstPath = argc > 2 ? argv[2] : sSrcDoc + L"-my.docx"; //xlsx pptx
std::wstring outputDir = FileSystem::Directory::GetFolderPath(dstPath);
std::wstring srcTempPath = FileSystem::Directory::CreateDirectoryWithUniqueName(outputDir);
......
......@@ -345,10 +345,6 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\Common\3dParty\icu\win_32\lib\icuuc.lib"
>
</File>
<File
RelativePath="..\..\..\Common\3dParty\pole\pole.cpp"
>
......
......@@ -38,10 +38,10 @@
int _tmain(int argc, _TCHAR* argv[])
{
if (argc < 3) return 3;
if (argc < 2) return 1;
std::wstring sSrcPpt = argv[1];
std::wstring sDstPptx = argv[2];
std::wstring sDstPptx = argc > 2 ? argv[2] : sSrcDoc + L"-my.pptx";
std::wstring outputDir = FileSystem::Directory::GetFolderPath(sDstPptx);
std::wstring dstTempPath = FileSystem::Directory::CreateDirectoryWithUniqueName(outputDir);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment