mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
DocFormatReader - background page
This commit is contained in:
@ -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();
|
Initialize();
|
||||||
|
|
||||||
@ -226,7 +227,7 @@ namespace DocFileFormat
|
|||||||
dywDispPag = FormatUtils::BytesToInt16( bytes, 498, size );
|
dywDispPag = FormatUtils::BytesToInt16( bytes, 498, size );
|
||||||
|
|
||||||
//WORD 2000, 2002, 2003 PART
|
//WORD 2000, 2002, 2003 PART
|
||||||
if ( size > 500 )
|
if ( size > 500/* && fib->m_FibNew.nFibNew > Fib1997*/)
|
||||||
{
|
{
|
||||||
ilvlLastBulletMain = bytes[500];
|
ilvlLastBulletMain = bytes[500];
|
||||||
ilvlLastNumberMain = bytes[501];
|
ilvlLastNumberMain = bytes[501];
|
||||||
@ -266,138 +267,158 @@ namespace DocFileFormat
|
|||||||
fDntULTrlSpc = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 14 );
|
fDntULTrlSpc = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 14 );
|
||||||
fDntBlnSbDbWid = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 15 );
|
fDntBlnSbDbWid = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 15 );
|
||||||
fSuppressTopSpacingMac5 = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 16 );
|
fSuppressTopSpacingMac5 = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 16 );
|
||||||
fTruncDxaExpand = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 17 );
|
fTruncDxaExpand = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 17 );
|
||||||
fPrintBodyBeforeHdr = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 18 );
|
fPrintBodyBeforeHdr = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 18 );
|
||||||
fNoLeading = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 19 );
|
fNoLeading = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 19 );
|
||||||
fMakeSpaceForUL = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 20 );
|
fMakeSpaceForUL = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 20 );
|
||||||
fMWSmallCaps = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 21 );
|
fMWSmallCaps = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 21 );
|
||||||
f2ptExtLeadingOnly = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 22 );
|
f2ptExtLeadingOnly = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 22 );
|
||||||
fTruncFontHeight = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 23 );
|
fTruncFontHeight = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 23 );
|
||||||
fSubOnSize = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 24 );
|
fSubOnSize = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 24 );
|
||||||
fLineWrapLikeWord6 = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 25 );
|
fLineWrapLikeWord6 = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 25 );
|
||||||
fWW6BorderRules = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 26 );
|
fWW6BorderRules = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 26 );
|
||||||
fExactOnTop = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 27 );
|
fExactOnTop = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 27 );
|
||||||
fExtraAfter = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 28 );
|
fExtraAfter = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 28 );
|
||||||
fWPSpace = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 29 );
|
fWPSpace = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 29 );
|
||||||
fWPJust = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 30 );
|
fWPJust = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 30 );
|
||||||
fPrintMet = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 31 );
|
fPrintMet = FormatUtils::GetBitFromBytes( ( bytes + 508 ), 4, 31 );
|
||||||
|
|
||||||
//split bytes 512,513,514,515 into bits
|
//split bytes 512,513,514,515 into bits
|
||||||
fSpLayoutLikeWW8 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 0 );
|
fSpLayoutLikeWW8 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 0 );
|
||||||
fFtnLayoutLikeWW8 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 1 );
|
fFtnLayoutLikeWW8 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 1 );
|
||||||
fDontUseHTMLParagraphAutoSpacing = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 2 );
|
fDontUseHTMLParagraphAutoSpacing = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 2 );
|
||||||
fDontAdjustLineHeightInTable = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 3 );
|
fDontAdjustLineHeightInTable = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 3 );
|
||||||
fForgetLastTabAlign = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 4 );
|
fForgetLastTabAlign = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 4 );
|
||||||
fUseAutoSpaceForFullWidthAlpha = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 5 );
|
fUseAutoSpaceForFullWidthAlpha = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 5 );
|
||||||
fAlignTablesRowByRow = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 6 );
|
fAlignTablesRowByRow = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 6 );
|
||||||
fLayoutRawTableWidth = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 7 );
|
fLayoutRawTableWidth = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 7 );
|
||||||
fLayoutTableRowsApart = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 8 );
|
fLayoutTableRowsApart = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 8 );
|
||||||
fUserWord97LineBreakingRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 9 );
|
fUserWord97LineBreakingRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 9 );
|
||||||
fDontBreakWrappedTables = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 10 );
|
fDontBreakWrappedTables = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 10 );
|
||||||
fDontSnapToGridInCell = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 11 );
|
fDontSnapToGridInCell = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 11 );
|
||||||
fDontAllowFieldEndSelect = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 12 );
|
fDontAllowFieldEndSelect = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 12 );
|
||||||
fApplyBreakingRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 13 );
|
fApplyBreakingRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 13 );
|
||||||
fDontWrapTextWithPunct = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 14 );
|
fDontWrapTextWithPunct = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 14 );
|
||||||
fDontUseAsianBreakRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 15 );
|
fDontUseAsianBreakRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 15 );
|
||||||
fUseWord2002TableStyleRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 16 );
|
fUseWord2002TableStyleRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 16 );
|
||||||
fGrowAutofit = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 17 );
|
fGrowAutofit = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 17 );
|
||||||
fUseNormalStyleForList = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 18 );
|
fUseNormalStyleForList = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 18 );
|
||||||
fDontUseIndentAsNumberingTabStop = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 19 );
|
fDontUseIndentAsNumberingTabStop = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 19 );
|
||||||
fFELineBreak11 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 20 );
|
fFELineBreak11 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 20 );
|
||||||
fAllowSpaceOfSameStyleInTable = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 21 );
|
fAllowSpaceOfSameStyleInTable = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 21 );
|
||||||
fWW11IndentRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 22 );
|
fWW11IndentRules = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 22 );
|
||||||
fDontAutofitConstrainedTables = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 23 );
|
fDontAutofitConstrainedTables = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 23 );
|
||||||
fAutofitLikeWW11 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 24 );
|
fAutofitLikeWW11 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 24 );
|
||||||
fUnderlineTabInNumList = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 25 );
|
fUnderlineTabInNumList = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 25 );
|
||||||
fHangulWidthLikeWW11 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 26 );
|
fHangulWidthLikeWW11 = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 26 );
|
||||||
fSplitPgBreakAndParaMark = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 27 );
|
fSplitPgBreakAndParaMark = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 27 );
|
||||||
fDontVertAlignCellWithSp = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 28 );
|
fDontVertAlignCellWithSp = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 28 );
|
||||||
fDontBreakConstrainedForcedTables = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 29 );
|
fDontBreakConstrainedForcedTables = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 29 );
|
||||||
fDontVertAlignInTxbx = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 30 );
|
fDontVertAlignInTxbx = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 30 );
|
||||||
fWord11KerningPairs = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 31 );
|
fWord11KerningPairs = FormatUtils::GetBitFromBytes( ( bytes + 512 ), 4, 31 );
|
||||||
fCachedColBalance = FormatUtils::GetBitFromBytes( ( bytes + 516 ), 4, 0 );
|
|
||||||
|
fCachedColBalance = FormatUtils::GetBitFromBytes( ( bytes + 516 ), 4, 0 );
|
||||||
|
|
||||||
//bytes 517-539 are unused
|
//bytes 517-539 are unused
|
||||||
|
|
||||||
verCompatPreW10 = (unsigned short)FormatUtils::GetUIntFromBytesBits( ( bytes + 540 ), 4, 0, 16 );
|
verCompatPreW10 = (unsigned short)FormatUtils::GetUIntFromBytesBits( ( bytes + 540 ), 4, 0, 16 );
|
||||||
fNoMargPgvwSaved = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 16 );
|
fNoMargPgvwSaved = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 16 );
|
||||||
fNoMargPgvWPag = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 17 );
|
fNoMargPgvWPag = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 17 );
|
||||||
fWebViewPag = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 18 );
|
fWebViewPag = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 18 );
|
||||||
fSeeDrawingsPag = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 19 );
|
fSeeDrawingsPag = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 19 );
|
||||||
fBulletProofed = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 20 );
|
fBulletProofed = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 20 );
|
||||||
fCorrupted = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 21 );
|
fCorrupted = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 21 );
|
||||||
fSaveUim = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 22 );
|
fSaveUim = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 22 );
|
||||||
fFilterPrivacy = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 23 );
|
fFilterPrivacy = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 23 );
|
||||||
fInFReplaceNoRM = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 24 );
|
fInFReplaceNoRM = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 24 );
|
||||||
fSeenRepairs = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 25 );
|
fSeenRepairs = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 25 );
|
||||||
fHasXML = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 26 );
|
fHasXML = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 26 );
|
||||||
fSeeScriptAnchorsPag = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 27 );
|
fSeeScriptAnchorsPag = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 27 );
|
||||||
fValidateXML = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 28 );
|
fValidateXML = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 28 );
|
||||||
fSaveIfInvalidXML = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 29 );
|
fSaveIfInvalidXML = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 29 );
|
||||||
fShowXMLErrors = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 30 );
|
fShowXMLErrors = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 30 );
|
||||||
fAlwaysMergeEmptyNamespace = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 31 );
|
fAlwaysMergeEmptyNamespace = FormatUtils::GetBitFromBytes( ( bytes + 540 ), 4, 31 );
|
||||||
|
|
||||||
|
if ( size > 544/* && fib->m_FibNew.nFibNew > Fib2000*/)
|
||||||
|
{
|
||||||
|
cpMaxListCacheMainDoc = FormatUtils::BytesToInt32( bytes, 544, size ); //unused
|
||||||
|
|
||||||
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 );
|
||||||
|
|
||||||
//split bytes 548,549 into bits
|
istdTableDflt = FormatUtils::BytesToUInt16( bytes, 550, size );
|
||||||
fDoNotEmbedSystemFont = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 0 );
|
verCompat = FormatUtils::BytesToUInt16( bytes, 552, size );
|
||||||
fWordCompact = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 1 );
|
grfFmtFilter = FormatUtils::BytesToUInt16( bytes, 554, size );
|
||||||
fLiveRecover = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 2 );
|
iFolioPages = FormatUtils::BytesToInt16 ( bytes, 556, size );
|
||||||
fEmbedFactoids = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 3 );
|
cpgText = FormatUtils::BytesToUInt16( bytes, 558, size );
|
||||||
fFactoidXML = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 4 );
|
cpMinRMText = FormatUtils::BytesToInt32 ( bytes, 560, size );
|
||||||
fFactoidAllDone = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 5 );
|
cpMinRMFtn = FormatUtils::BytesToInt32 ( bytes, 564, size );
|
||||||
fFolioPrint = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 6 );
|
cpMinRMHdd = FormatUtils::BytesToInt32 ( bytes, 568, size );
|
||||||
fReverseFolio = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 7 );
|
cpMinRMAtn = FormatUtils::BytesToInt32 ( bytes, 572, size );
|
||||||
iTextLineEnding = (short)FormatUtils::GetUIntFromBytesBits( ( bytes + 548 ), 2, 8, 3 );
|
cpMinRMEdn = FormatUtils::BytesToInt32 ( bytes, 576, size );
|
||||||
fHideFcc = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 11 );
|
cpMinRMTxbx = FormatUtils::BytesToInt32 ( bytes, 580, size );
|
||||||
fAcetateShowMarkup = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 12 );
|
cpMinRMHdrTxbx = FormatUtils::BytesToInt32 ( bytes, 584, size );
|
||||||
fAcetateShowAtn = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 13 );
|
rsidRoot = FormatUtils::BytesToInt32 ( bytes, 588, size );
|
||||||
fAcetateShowInsDel = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 14 );
|
//unused 2
|
||||||
fAcetateShowProps = FormatUtils::GetBitFromBytes( ( bytes + 548 ), 2, 15 );
|
|
||||||
|
|
||||||
istdTableDflt = FormatUtils::BytesToUInt16( bytes, 550, size );
|
if ( size > 594/* && fib->m_FibNew.nFibNew > Fib2002*/)
|
||||||
verCompat = FormatUtils::BytesToUInt16( bytes, 552, size );
|
{
|
||||||
grfFmtFilter = FormatUtils::BytesToUInt16( bytes, 554, size );
|
//split bytes 592,593,594,595 into bits
|
||||||
iFolioPages = FormatUtils::BytesToInt16( bytes, 556, size );
|
fTreatLockAtnAsReadOnly = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 0 );
|
||||||
cpgText = FormatUtils::BytesToUInt16( bytes, 558, size );
|
fStyleLock = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 1 );
|
||||||
cpMinRMText = FormatUtils::BytesToInt32( bytes, 560, size );
|
fAutoFmtOverride = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 2 );
|
||||||
cpMinRMFtn = FormatUtils::BytesToInt32( bytes, 564, size );
|
fRemoveWordML = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 3 );
|
||||||
cpMinRMHdd = FormatUtils::BytesToInt32( bytes, 568, size );
|
fApplyCustomXForm = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 4 );
|
||||||
cpMinRMAtn = FormatUtils::BytesToInt32( bytes, 572, size );
|
fStyeLockEnforced = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 5 );
|
||||||
cpMinRMEdn = FormatUtils::BytesToInt32( bytes, 576, size );
|
fFakeLockAtn = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 6 );
|
||||||
cpMinRMTxbx = FormatUtils::BytesToInt32( bytes, 580, size );
|
fIgnoreMixedContent = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 7 );
|
||||||
cpMinRMHdrTxbx = FormatUtils::BytesToInt32( bytes, 584, size );
|
fShowPlaceholderText = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 8 );
|
||||||
rsidRoot = FormatUtils::BytesToInt32( bytes, 588, size );
|
grf = FormatUtils::GetUIntFromBytesBits( ( bytes + 592 ), 4, 9, 23 );
|
||||||
|
|
||||||
if ( size == 610 )
|
//split bytes 596 and 597 into bits
|
||||||
{
|
fReadingModeInkLockDown = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 0 );
|
||||||
//split bytes 592,593,594,595 into bits
|
fAcetateShowInkAtn = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 1 );
|
||||||
fTreatLockAtnAsReadOnly = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 0 );
|
fFilterDttm = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 2 );
|
||||||
fStyleLock = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 1 );
|
fEnforceDocProt = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 3 );
|
||||||
fAutoFmtOverride = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 2 );
|
iDocProtCur = (unsigned short)FormatUtils::GetUIntFromBytesBits( ( bytes + 596 ), 2, 4, 3 );
|
||||||
fRemoveWordML = FormatUtils::GetBitFromBytes( ( bytes + 592 ), 4, 3 );
|
fDispBkSpSaved = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 7 );
|
||||||
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
|
dxaPageLock = FormatUtils::BytesToInt16( bytes, 598, size );
|
||||||
fReadingModeInkLockDown = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 0 );
|
dyaPageLock = FormatUtils::BytesToInt16( bytes, 600, size );
|
||||||
fAcetateShowInkAtn = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 1 );
|
pctFontLock = FormatUtils::BytesToInt32( bytes, 602, size );
|
||||||
fFilterDttm = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 2 );
|
grfitbid = bytes[606];
|
||||||
fEnforceDocProt = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 3 );
|
//unsigned char 607 is unused
|
||||||
iDocProtCur = (unsigned short)FormatUtils::GetUIntFromBytesBits( ( bytes + 596 ), 2, 4, 3 );
|
ilfoMacAtCleanup = FormatUtils::BytesToUInt16( bytes, 608, size );
|
||||||
fDispBkSpSaved = FormatUtils::GetBitFromBytes( ( bytes + 596 ), 2, 7 );
|
|
||||||
|
if ( size > 616/* && fib->m_FibNew.nFibNew > Fib2003*/)
|
||||||
dxaPageLock = FormatUtils::BytesToInt16( bytes, 598, size );
|
{
|
||||||
dyaPageLock = FormatUtils::BytesToInt16( bytes, 600, size );
|
//4 bytes reserved
|
||||||
pctFontLock = FormatUtils::BytesToInt32( bytes, 602, size );
|
bool fRMTrackFormatting = FormatUtils::GetBitFromBytes( ( bytes + 620 ), 2, 0 );
|
||||||
grfitbid = bytes[606];
|
bool fRMTrackMoves = FormatUtils::GetBitFromBytes( ( bytes + 620 ), 2, 1 );
|
||||||
//unsigned char 607 is unused
|
//dopMth = 34 bytes from 624 = 658
|
||||||
ilfoMacAtCleanup = FormatUtils::BytesToUInt16( bytes, 608, size );
|
|
||||||
}
|
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;
|
friend class SettingsMapping;
|
||||||
|
|
||||||
|
bool bDisplayBackgroundShape;
|
||||||
private:
|
private:
|
||||||
// True when facing pages should be printed
|
// True when facing pages should be printed
|
||||||
bool fFacingPages;
|
bool fFacingPages;
|
||||||
|
|||||||
@ -1162,6 +1162,8 @@ namespace DocFileFormat
|
|||||||
{
|
{
|
||||||
//Read the FibRgCswNew
|
//Read the FibRgCswNew
|
||||||
m_FibNew.nFibNew = (FibVersion)reader.ReadUInt16();
|
m_FibNew.nFibNew = (FibVersion)reader.ReadUInt16();
|
||||||
|
|
||||||
|
if (m_FibNew.nFibNew == 0) m_FibNew.nFibNew = Fib1997;
|
||||||
m_FibNew.cQuickSavesNew = reader.ReadUInt16();
|
m_FibNew.cQuickSavesNew = reader.ReadUInt16();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,33 +53,47 @@ namespace DocFileFormat
|
|||||||
m_context->_docx->RegisterDocument();
|
m_context->_docx->RegisterDocument();
|
||||||
|
|
||||||
// Header
|
// Header
|
||||||
m_pXmlWriter->WriteNodeBegin(_T("?xml version=\"1.0\" encoding=\"UTF-8\"?"));
|
m_pXmlWriter->WriteNodeBegin(L"?xml version=\"1.0\" encoding=\"UTF-8\"?");
|
||||||
m_pXmlWriter->WriteNodeBegin(_T("w:document"), TRUE );
|
m_pXmlWriter->WriteNodeBegin(L"w:document", TRUE );
|
||||||
|
|
||||||
// Namespaces
|
// Namespaces
|
||||||
m_pXmlWriter->WriteAttribute(_T("xmlns:w"), OpenXmlNamespaces::WordprocessingML );
|
m_pXmlWriter->WriteAttribute(L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
|
||||||
m_pXmlWriter->WriteAttribute(_T("xmlns:v"), OpenXmlNamespaces::VectorML );
|
m_pXmlWriter->WriteAttribute(L"xmlns:v", OpenXmlNamespaces::VectorML );
|
||||||
m_pXmlWriter->WriteAttribute(_T("xmlns:o"), OpenXmlNamespaces::Office );
|
m_pXmlWriter->WriteAttribute(L"xmlns:o", OpenXmlNamespaces::Office );
|
||||||
m_pXmlWriter->WriteAttribute(_T("xmlns:w10"), OpenXmlNamespaces::OfficeWord );
|
m_pXmlWriter->WriteAttribute(L"xmlns:w10", OpenXmlNamespaces::OfficeWord );
|
||||||
m_pXmlWriter->WriteAttribute(_T("xmlns:r"), OpenXmlNamespaces::Relationships );
|
m_pXmlWriter->WriteAttribute(L"xmlns:r", OpenXmlNamespaces::Relationships );
|
||||||
m_pXmlWriter->WriteAttribute(_T("xmlns:m"), _T("http://schemas.openxmlformats.org/officeDocument/2006/math"));
|
m_pXmlWriter->WriteAttribute(L"xmlns:m", L"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(L"xmlns:wpc", L"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(L"xmlns:mc", L"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(L"xmlns:wp14", L"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(L"xmlns:wp", L"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(L"xmlns:w14", L"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(L"xmlns:wpg", L"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(L"xmlns:wpi", L"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(L"xmlns:wne", L"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(L"xmlns:wps", L"http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
|
||||||
//m_pXmlWriter->WriteAttribute(_T("mc:Ignorable"), _T("w14 wp14"));
|
//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();
|
||||||
|
|
||||||
// Convert the document
|
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
|
||||||
_lastValidPapx = NULL;
|
_lastValidPapx = NULL;
|
||||||
if (m_document->AllPapxFkps->empty() == false)
|
if (m_document->AllPapxFkps->empty() == false)
|
||||||
{
|
{
|
||||||
@ -175,8 +189,8 @@ namespace DocFileFormat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pXmlWriter->WriteNodeEnd( _T( "w:body" ) );
|
m_pXmlWriter->WriteNodeEnd( L"w:body" );
|
||||||
m_pXmlWriter->WriteNodeEnd( _T( "w:document" ) );
|
m_pXmlWriter->WriteNodeEnd( L"w:document" );
|
||||||
|
|
||||||
m_context->_docx->DocumentXML = std::wstring(m_pXmlWriter->GetXmlString());
|
m_context->_docx->DocumentXML = std::wstring(m_pXmlWriter->GetXmlString());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,6 +34,7 @@
|
|||||||
#include "OfficeDrawing/RecordFactory.h"
|
#include "OfficeDrawing/RecordFactory.h"
|
||||||
|
|
||||||
#include "OfficeDrawing/DrawingContainer.h"
|
#include "OfficeDrawing/DrawingContainer.h"
|
||||||
|
#include "OfficeDrawing/DrawingRecord.h"
|
||||||
#include "OfficeDrawing/DrawingGroup.h"
|
#include "OfficeDrawing/DrawingGroup.h"
|
||||||
#include "OfficeDrawing/GroupContainer.h"
|
#include "OfficeDrawing/GroupContainer.h"
|
||||||
#include "OfficeDrawing/Shape.h"
|
#include "OfficeDrawing/Shape.h"
|
||||||
@ -57,7 +58,7 @@ namespace DocFileFormat
|
|||||||
|
|
||||||
public:
|
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);
|
VirtualStreamReader oStearmReader(pStream, 0 , pFIB->m_bOlderVersion);
|
||||||
|
|
||||||
@ -87,15 +88,23 @@ namespace DocFileFormat
|
|||||||
{
|
{
|
||||||
// the child is a subgroup
|
// the child is a subgroup
|
||||||
GroupContainer* group = static_cast<GroupContainer*>(groupChild);
|
GroupContainer* group = static_cast<GroupContainer*>(groupChild);
|
||||||
group->Index = i;
|
if (group)
|
||||||
drawing.container->Children[i] = group;
|
{
|
||||||
|
group->Index = i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (ShapeContainer::TYPE_CODE_0xF004 == groupChild->TypeCode)
|
else if (ShapeContainer::TYPE_CODE_0xF004 == groupChild->TypeCode)
|
||||||
{
|
{
|
||||||
// the child is a shape
|
// the child is a shape
|
||||||
ShapeContainer* shape = static_cast<ShapeContainer*>(groupChild);
|
ShapeContainer* shape = static_cast<ShapeContainer*>(groupChild);
|
||||||
shape->Index = i;
|
if (shape)
|
||||||
drawing.container->Children[i] = 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)
|
for ( std::list<OfficeArtWordDrawing>::iterator iter = m_arrDrawings.begin(); iter != m_arrDrawings.end(); ++iter)
|
||||||
RELEASEOBJECT(iter->container);
|
RELEASEOBJECT(iter->container);
|
||||||
}
|
}
|
||||||
|
inline ShapeContainer* GetShapeBackgound()
|
||||||
|
{
|
||||||
|
return m_pBackgroud;
|
||||||
|
}
|
||||||
inline ShapeContainer* GetShapeContainer (int spid)
|
inline ShapeContainer* GetShapeContainer (int spid)
|
||||||
{
|
{
|
||||||
ShapeContainer* ret = NULL;
|
ShapeContainer* ret = NULL;
|
||||||
@ -138,7 +150,6 @@ namespace DocFileFormat
|
|||||||
if (shape->GetShapeID() == spid)
|
if (shape->GetShapeID() == spid)
|
||||||
{
|
{
|
||||||
ret = container;
|
ret = container;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -150,7 +161,7 @@ namespace DocFileFormat
|
|||||||
|
|
||||||
if (shape->GetShapeID() == spid)
|
if (shape->GetShapeID() == spid)
|
||||||
{
|
{
|
||||||
ret = container;
|
ret = container;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -174,7 +185,7 @@ namespace DocFileFormat
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
ShapeContainer* m_pBackgroud;
|
||||||
DrawingGroup* m_pDrawingGroupData;
|
DrawingGroup* m_pDrawingGroupData;
|
||||||
std::list<OfficeArtWordDrawing> m_arrDrawings;
|
std::list<OfficeArtWordDrawing> m_arrDrawings;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -39,11 +39,9 @@ namespace DocFileFormat
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static const unsigned short TYPE_CODE_0xF008 = 0xF008;
|
static const unsigned short TYPE_CODE_0xF008 = 0xF008;
|
||||||
|
|
||||||
/// The number of shapes in this drawing
|
unsigned int csp; // The number of shapes in this drawing
|
||||||
unsigned int csp;
|
int spidCur; // The last MSOSPID given to an SP in this DG
|
||||||
/// The last MSOSPID given to an SP in this DG
|
|
||||||
int spidCur;
|
|
||||||
|
|
||||||
DrawingRecord():
|
DrawingRecord():
|
||||||
Record(), csp(0), spidCur(0)
|
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 ):
|
DrawingRecord( IBinaryReader* _reader, unsigned int size, unsigned int typeCode, unsigned int version, unsigned int instance ):
|
||||||
Record( _reader, size, typeCode, version, instance )
|
Record( _reader, size, typeCode, version, instance )
|
||||||
{
|
{
|
||||||
this->csp = this->Reader->ReadUInt32();
|
csp = Reader->ReadUInt32();
|
||||||
this->spidCur = this->Reader->ReadInt32();
|
spidCur = Reader->ReadInt32();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~DrawingRecord()
|
virtual ~DrawingRecord()
|
||||||
|
|||||||
@ -93,29 +93,23 @@ namespace DocFileFormat
|
|||||||
{
|
{
|
||||||
case ShapeContainer::TYPE_CODE_0xF004:
|
case ShapeContainer::TYPE_CODE_0xF004:
|
||||||
return new ShapeContainer();
|
return new ShapeContainer();
|
||||||
break;
|
|
||||||
|
|
||||||
case Shape::TYPE_CODE_0xF00A:
|
case Shape::TYPE_CODE_0xF00A:
|
||||||
return new Shape();
|
return new Shape();
|
||||||
break;
|
|
||||||
|
|
||||||
case ShapeOptions::TYPE_CODE_0xF00B:
|
case ShapeOptions::TYPE_CODE_0xF00B:
|
||||||
case ShapeOptions::TYPE_CODE_0xF121:
|
case ShapeOptions::TYPE_CODE_0xF121:
|
||||||
case ShapeOptions::TYPE_CODE_0xF122:
|
case ShapeOptions::TYPE_CODE_0xF122:
|
||||||
return new ShapeOptions();
|
return new ShapeOptions();
|
||||||
break;
|
|
||||||
|
|
||||||
case ClientAnchor::TYPE_CODE_0xF010:
|
case ClientAnchor::TYPE_CODE_0xF010:
|
||||||
return new ClientAnchor();
|
return new ClientAnchor();
|
||||||
break;
|
|
||||||
|
|
||||||
case ChildAnchor::TYPE_CODE_0xF00F:
|
case ChildAnchor::TYPE_CODE_0xF00F:
|
||||||
return new ChildAnchor();
|
return new ChildAnchor();
|
||||||
break;
|
|
||||||
|
|
||||||
case BlipStoreEntry::TYPE_CODE_0xF007:
|
case BlipStoreEntry::TYPE_CODE_0xF007:
|
||||||
return new BlipStoreEntry();
|
return new BlipStoreEntry();
|
||||||
break;
|
|
||||||
|
|
||||||
case BitmapBlip::TYPE_CODE_0xF01D: //OfficeArtBlipJPEG
|
case BitmapBlip::TYPE_CODE_0xF01D: //OfficeArtBlipJPEG
|
||||||
case BitmapBlip::TYPE_CODE_0xF01E: //OfficeArtBlipPNG
|
case BitmapBlip::TYPE_CODE_0xF01E: //OfficeArtBlipPNG
|
||||||
@ -125,25 +119,25 @@ namespace DocFileFormat
|
|||||||
case BitmapBlip::TYPE_CODE_0xF029: //OfficeArtBlipTIFF
|
case BitmapBlip::TYPE_CODE_0xF029: //OfficeArtBlipTIFF
|
||||||
case BitmapBlip::TYPE_CODE_0xF02A: //OfficeArtBlipJPEG
|
case BitmapBlip::TYPE_CODE_0xF02A: //OfficeArtBlipJPEG
|
||||||
return new BitmapBlip();
|
return new BitmapBlip();
|
||||||
break;
|
|
||||||
|
|
||||||
case MetafilePictBlip::TYPE_CODE_0xF01A: //OfficeArtBlipEMF
|
case MetafilePictBlip::TYPE_CODE_0xF01A: //OfficeArtBlipEMF
|
||||||
case MetafilePictBlip::TYPE_CODE_0xF01B: //OfficeArtBlipWMF
|
case MetafilePictBlip::TYPE_CODE_0xF01B: //OfficeArtBlipWMF
|
||||||
case MetafilePictBlip::TYPE_CODE_0xF01C : //OfficeArtBlipPICT
|
case MetafilePictBlip::TYPE_CODE_0xF01C : //OfficeArtBlipPICT
|
||||||
return new MetafilePictBlip(); break;
|
return new MetafilePictBlip();
|
||||||
|
|
||||||
case DrawingGroup::TYPE_CODE_0xF000 : return new DrawingGroup(); break;
|
case DrawingGroup::TYPE_CODE_0xF000 : return new DrawingGroup();
|
||||||
case DrawingGroupRecord::TYPE_CODE_0xF006 : return new DrawingGroupRecord(); break;
|
case DrawingGroupRecord::TYPE_CODE_0xF006 : return new DrawingGroupRecord();
|
||||||
case BlipStoreContainer::TYPE_CODE_0xF001 : return new BlipStoreContainer(); break;
|
case BlipStoreContainer::TYPE_CODE_0xF001 : return new BlipStoreContainer();
|
||||||
case SplitMenuColorContainer::TYPE_CODE_0xF11E : return new SplitMenuColorContainer(); break;
|
case SplitMenuColorContainer::TYPE_CODE_0xF11E : return new SplitMenuColorContainer();
|
||||||
case ClientData::TYPE_CODE_0xF011 : return new ClientData(); break;
|
case ClientData::TYPE_CODE_0xF011 : return new ClientData();
|
||||||
case DrawingContainer::TYPE_CODE_0xF002 : return new DrawingContainer(); break;
|
case DrawingContainer::TYPE_CODE_0xF002 : return new DrawingContainer();
|
||||||
case DrawingRecord::TYPE_CODE_0xF008 : return new DrawingRecord(); break;
|
case DrawingRecord::TYPE_CODE_0xF008 : return new DrawingRecord();
|
||||||
case GroupContainer::TYPE_CODE_0xF003 : return new GroupContainer(); break;
|
case GroupContainer::TYPE_CODE_0xF003 : return new GroupContainer();
|
||||||
case GroupShapeRecord::TYPE_CODE_0xF009 : return new GroupShapeRecord (); break;
|
case GroupShapeRecord::TYPE_CODE_0xF009 : return new GroupShapeRecord ();
|
||||||
case OfficeArtClientTextbox::TYPE_CODE_0xF00D : return new OfficeArtClientTextbox (); break;
|
case OfficeArtClientTextbox::TYPE_CODE_0xF00D : return new OfficeArtClientTextbox ();
|
||||||
|
|
||||||
default: return new UnknownRecord(); break;
|
default:
|
||||||
|
return new UnknownRecord();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,33 +39,20 @@ namespace DocFileFormat
|
|||||||
class Shape: public Record
|
class Shape: public Record
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int spid;
|
int spid;
|
||||||
/// This shape is a group shape
|
bool fGroup;
|
||||||
bool fGroup;
|
bool fChild;
|
||||||
/// Not a top-level shape
|
bool fPatriarch; // This is the topmost group shape. Exactly one of these per drawing.
|
||||||
bool fChild;
|
bool fDeleted; // The shape has been deleted
|
||||||
/// This is the topmost group shape.
|
bool fOleShape; // The shape is an OLE object
|
||||||
/// Exactly one of these per drawing.
|
bool fHaveMaster;
|
||||||
bool fPatriarch;
|
bool fFlipH;
|
||||||
/// The shape has been deleted
|
bool fFlipV;
|
||||||
bool fDeleted;
|
bool fConnector;
|
||||||
/// The shape is an OLE object
|
bool fHaveAnchor;
|
||||||
bool fOleShape;
|
bool fBackground;
|
||||||
/// Shape has a hspMaster property
|
bool fHaveSpt;
|
||||||
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
|
|
||||||
ShapeType* shapeType;
|
ShapeType* shapeType;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -69,7 +69,20 @@ namespace DocFileFormat
|
|||||||
}
|
}
|
||||||
return 0;
|
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()
|
virtual ~ShapeContainer()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -79,7 +92,6 @@ namespace DocFileFormat
|
|||||||
return new ShapeContainer( _reader, bodySize, typeCode, version, instance );
|
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> ExtractOptions() const
|
||||||
{
|
{
|
||||||
std::list<OptionEntry> ret;
|
std::list<OptionEntry> ret;
|
||||||
|
|||||||
@ -476,6 +476,7 @@ namespace DocFileFormat
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
int sz = iter->argumentsSize;
|
||||||
}break;
|
}break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,27 +44,31 @@ namespace DocFileFormat
|
|||||||
{
|
{
|
||||||
WordDocumentProperties* dop = static_cast<WordDocumentProperties*>( visited );
|
WordDocumentProperties* dop = static_cast<WordDocumentProperties*>( visited );
|
||||||
|
|
||||||
this->_ctx->_docx->RegisterSettings();
|
_ctx->_docx->RegisterSettings();
|
||||||
|
|
||||||
//start w:settings
|
//start w:settings
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "?xml version=\"1.0\" encoding=\"UTF-8\"?" ) );
|
m_oXmlWriter.WriteNodeBegin( L"?xml version=\"1.0\" encoding=\"UTF-8\"?" );
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:settings" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:settings", TRUE );
|
||||||
|
|
||||||
//write namespaces
|
//write namespaces
|
||||||
m_oXmlWriter.WriteAttribute( _T( "xmlns:w" ), OpenXmlNamespaces::WordprocessingML );
|
m_oXmlWriter.WriteAttribute( L"xmlns:w", OpenXmlNamespaces::WordprocessingML );
|
||||||
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE, FALSE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE, FALSE );
|
|
||||||
|
|
||||||
//zoom
|
//zoom
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:zoom" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin ( L"w:zoom", TRUE );
|
||||||
m_oXmlWriter.WriteAttribute( _T( "w:percent" ), FormatUtils::IntToWideString( dop->wScaleSaved ).c_str() );
|
m_oXmlWriter.WriteAttribute ( L"w:percent", FormatUtils::IntToWideString( dop->wScaleSaved ).c_str() );
|
||||||
|
|
||||||
if ( dop->zkSaved != 0 )
|
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
|
//doc protection
|
||||||
//<w:documentProtection w:edit="forms" w:enforcement="1"/>
|
//<w:documentProtection w:edit="forms" w:enforcement="1"/>
|
||||||
@ -72,30 +76,30 @@ namespace DocFileFormat
|
|||||||
//embed system fonts
|
//embed system fonts
|
||||||
if( !dop->fDoNotEmbedSystemFont )
|
if( !dop->fDoNotEmbedSystemFont )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:embedSystemFonts" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:embedSystemFonts", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
//mirror margins
|
//mirror margins
|
||||||
if ( dop->fMirrorMargins )
|
if ( dop->fMirrorMargins )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:mirrorMargins" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:mirrorMargins", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
//evenAndOddHeaders
|
//evenAndOddHeaders
|
||||||
if ( dop->fFacingPages )
|
if ( dop->fFacingPages )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:evenAndOddHeaders" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:evenAndOddHeaders", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
//proof state
|
//proof state
|
||||||
XMLTools::XMLElement<wchar_t> proofState( _T( "w:proofState" ) );
|
XMLTools::XMLElement<wchar_t> proofState( L"w:proofState" );
|
||||||
|
|
||||||
if ( dop->fGramAllClean )
|
if ( dop->fGramAllClean )
|
||||||
{
|
{
|
||||||
appendValueAttribute( &proofState, _T( "w:grammar" ), _T( "clean" ) );
|
appendValueAttribute( &proofState, L"w:grammar", L"clean" );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( proofState.GetAttributeCount() > 0 )
|
if ( proofState.GetAttributeCount() > 0 )
|
||||||
@ -106,31 +110,31 @@ namespace DocFileFormat
|
|||||||
//stylePaneFormatFilter
|
//stylePaneFormatFilter
|
||||||
if ( dop->grfFmtFilter != 0 )
|
if ( dop->grfFmtFilter != 0 )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:stylePaneFormatFilter" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:stylePaneFormatFilter", TRUE );
|
||||||
m_oXmlWriter.WriteAttribute( _T( "w:val" ), FormatUtils::IntToFormattedWideString( dop->grfFmtFilter, _T( "%04x" ) ).c_str() );
|
m_oXmlWriter.WriteAttribute( L"w:val", FormatUtils::IntToFormattedWideString( dop->grfFmtFilter, L"%04x" ).c_str() );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
//default tab stop
|
//default tab stop
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:defaultTabStop" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:defaultTabStop", TRUE );
|
||||||
m_oXmlWriter.WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString( dop->dxaTab ).c_str() );
|
m_oXmlWriter.WriteAttribute( L"w:val", FormatUtils::IntToWideString( dop->dxaTab ).c_str() );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
|
|
||||||
//drawing grid
|
//drawing grid
|
||||||
if( dop->dogrid != NULL )
|
if( dop->dogrid != NULL )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:displayHorizontalDrawingGridEvery" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:displayHorizontalDrawingGridEvery", TRUE );
|
||||||
m_oXmlWriter.WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString( dop->dogrid->dxGridDisplay ).c_str() );
|
m_oXmlWriter.WriteAttribute( L"w:val", FormatUtils::IntToWideString( dop->dogrid->dxGridDisplay ).c_str() );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
|
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:displayVerticalDrawingGridEvery" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:displayVerticalDrawingGridEvery", TRUE );
|
||||||
m_oXmlWriter.WriteAttribute( _T( "w:val" ), FormatUtils::IntToWideString( dop->dogrid->dyGridDisplay ).c_str() );
|
m_oXmlWriter.WriteAttribute( L"w:val", FormatUtils::IntToWideString( dop->dogrid->dyGridDisplay ).c_str() );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
|
|
||||||
if ( dop->dogrid->fFollowMargins == false )
|
if ( dop->dogrid->fFollowMargins == false )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotUseMarginsForDrawingGridOrigin" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:doNotUseMarginsForDrawingGridOrigin", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,27 +143,27 @@ namespace DocFileFormat
|
|||||||
{
|
{
|
||||||
if ( dop->doptypography->fKerningPunct == false )
|
if ( dop->doptypography->fKerningPunct == false )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:noPunctuationKerning" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:noPunctuationKerning", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//footnote properties
|
//footnote properties
|
||||||
XMLTools::XMLElement<wchar_t> footnotePr( _T( "w:footnotePr" ) );
|
XMLTools::XMLElement<wchar_t> footnotePr( L"w:footnotePr" );
|
||||||
|
|
||||||
if ( dop->nFtn != 0 )
|
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 )
|
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 )
|
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 )
|
if ( footnotePr.GetAttributeCount() > 0 )
|
||||||
@ -173,7 +177,7 @@ namespace DocFileFormat
|
|||||||
writeRsidList();
|
writeRsidList();
|
||||||
|
|
||||||
//close w:settings
|
//close w:settings
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "w:settings" ) );
|
m_oXmlWriter.WriteNodeEnd( L"w:settings" );
|
||||||
|
|
||||||
this->_ctx->_docx->SettingsXML = std::wstring( m_oXmlWriter.GetXmlString() );
|
this->_ctx->_docx->SettingsXML = std::wstring( m_oXmlWriter.GetXmlString() );
|
||||||
}
|
}
|
||||||
@ -181,368 +185,368 @@ namespace DocFileFormat
|
|||||||
void SettingsMapping::writeRsidList()
|
void SettingsMapping::writeRsidList()
|
||||||
{
|
{
|
||||||
//convert the rsid list
|
//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++ )
|
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.WriteNodeBegin( L"w:rsid", TRUE );
|
||||||
m_oXmlWriter.WriteAttribute( _T( "w:val" ), iter->c_str() );
|
m_oXmlWriter.WriteAttribute( L"w:val", iter->c_str() );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "w:rsids" ) );
|
m_oXmlWriter.WriteNodeEnd( L"w:rsids" );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsMapping::writeCompatibilitySettings(const WordDocumentProperties* dop)
|
void SettingsMapping::writeCompatibilitySettings(const WordDocumentProperties* dop)
|
||||||
{
|
{
|
||||||
//compatibility settings
|
//compatibility settings
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:compat" ) );
|
m_oXmlWriter.WriteNodeBegin( L"w:compat" );
|
||||||
|
|
||||||
//some settings must always be written
|
//some settings must always be written
|
||||||
|
|
||||||
if ( dop->fUseNormalStyleForList )
|
if ( dop->fUseNormalStyleForList )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:useNormalStyleForList" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:useNormalStyleForList", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fDontUseIndentAsNumberingTabStop )
|
if ( dop->fDontUseIndentAsNumberingTabStop )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotUseIndentAsNumberingTabStop" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:doNotUseIndentAsNumberingTabStop", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fFELineBreak11 )
|
if ( dop->fFELineBreak11 )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:useAltKinsokuLineBreakRules" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:useAltKinsokuLineBreakRules", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fAllowSpaceOfSameStyleInTable )
|
if ( dop->fAllowSpaceOfSameStyleInTable )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:allowSpaceOfSameStyleInTable" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:allowSpaceOfSameStyleInTable", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fWW11IndentRules )
|
if ( dop->fWW11IndentRules )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotSuppressIndentation" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:doNotSuppressIndentation", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fDontAutofitConstrainedTables )
|
if ( dop->fDontAutofitConstrainedTables )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotAutofitConstrainedTables" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:doNotAutofitConstrainedTables", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fAutofitLikeWW11 )
|
if ( dop->fAutofitLikeWW11 )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:autofitToFirstFixedWidthCell" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:autofitToFirstFixedWidthCell", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fUnderlineTabInNumList )
|
if ( dop->fUnderlineTabInNumList )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:underlineTabInNumList" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:underlineTabInNumList", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fHangulWidthLikeWW11 )
|
if ( dop->fHangulWidthLikeWW11 )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:displayHangulFixedWidth" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:displayHangulFixedWidth", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fSplitPgBreakAndParaMark )
|
if ( dop->fSplitPgBreakAndParaMark )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:splitPgBreakAndParaMark" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:splitPgBreakAndParaMark", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fDontVertAlignCellWithSp )
|
if ( dop->fDontVertAlignCellWithSp )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotVertAlignCellWithSp" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:doNotVertAlignCellWithSp", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fDontBreakConstrainedForcedTables )
|
if ( dop->fDontBreakConstrainedForcedTables )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotBreakConstrainedForcedTable" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:doNotBreakConstrainedForcedTable", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fDontVertAlignInTxbx )
|
if ( dop->fDontVertAlignInTxbx )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotVertAlignInTxbx" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:doNotVertAlignInTxbx", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fWord11KerningPairs )
|
if ( dop->fWord11KerningPairs )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:useAnsiKerningPairs" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:useAnsiKerningPairs", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fCachedColBalance )
|
if ( dop->fCachedColBalance )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:cachedColBalance" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:cachedColBalance", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
//others are saved in the file
|
//others are saved in the file
|
||||||
if ( !dop->fDontAdjustLineHeightInTable )
|
if ( !dop->fDontAdjustLineHeightInTable )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:adjustLineHeightInTable" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:adjustLineHeightInTable", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fAlignTablesRowByRow )
|
if ( dop->fAlignTablesRowByRow )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:alignTablesRowByRow" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:alignTablesRowByRow", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fApplyBreakingRules )
|
if ( dop->fApplyBreakingRules )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:applyBreakingRules" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:applyBreakingRules", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fUseAutoSpaceForFullWidthAlpha )
|
if ( dop->fUseAutoSpaceForFullWidthAlpha )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:autoSpaceLikeWord95" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:autoSpaceLikeWord95", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !dop->fDntBlnSbDbWid )
|
if ( !dop->fDntBlnSbDbWid )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:balanceSingleByteDoubleByteWidth" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:balanceSingleByteDoubleByteWidth", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fConvMailMergeEsc )
|
if ( dop->fConvMailMergeEsc )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:convMailMergeEsc" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:convMailMergeEsc", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fDontBreakWrappedTables )
|
if ( dop->fDontBreakWrappedTables )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotBreakWrappedTables" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:doNotBreakWrappedTables", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !dop->fExpShRtn )
|
if ( !dop->fExpShRtn )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotExpandShiftReturn" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:doNotExpandShiftReturn", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !dop->fLeaveBackslashAlone )
|
if ( !dop->fLeaveBackslashAlone )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotLeaveBackslashAlone" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:doNotLeaveBackslashAlone", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fDontSnapToGridInCell )
|
if ( dop->fDontSnapToGridInCell )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotSnapToGridInCell" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:doNotSnapToGridInCell", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fDontUseAsianBreakRules )
|
if ( dop->fDontUseAsianBreakRules )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotUseEastAsianBreakRules" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:doNotUseEastAsianBreakRules", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fDontUseHTMLParagraphAutoSpacing )
|
if ( dop->fDontUseHTMLParagraphAutoSpacing )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotUseHTMLParagraphAutoSpacing" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:doNotUseHTMLParagraphAutoSpacing", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fDontWrapTextWithPunct )
|
if ( dop->fDontWrapTextWithPunct )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:doNotWrapTextWithPunct" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:doNotWrapTextWithPunct", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fFtnLayoutLikeWW8 )
|
if ( dop->fFtnLayoutLikeWW8 )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:footnoteLayoutLikeWW8" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:footnoteLayoutLikeWW8", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fForgetLastTabAlign )
|
if ( dop->fForgetLastTabAlign )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:forgetLastTabAlignment" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:forgetLastTabAlignment", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fGrowAutofit )
|
if ( dop->fGrowAutofit )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:growAutofit" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:growAutofit", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fLayoutRawTableWidth )
|
if ( dop->fLayoutRawTableWidth )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:layoutRawTableWidth" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:layoutRawTableWidth", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fLayoutTableRowsApart )
|
if ( dop->fLayoutTableRowsApart )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:layoutTableRowsApart" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:layoutTableRowsApart", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fLineWrapLikeWord6 )
|
if ( dop->fLineWrapLikeWord6 )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:lineWrapLikeWord6" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:lineWrapLikeWord6", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fMWSmallCaps )
|
if ( dop->fMWSmallCaps )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:mwSmallCaps" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:mwSmallCaps", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fNoColumnBalance )
|
if ( dop->fNoColumnBalance )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:noColumnBalance" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:noColumnBalance", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fNoLeading )
|
if ( dop->fNoLeading )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:noLeading" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:noLeading", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fNoSpaceRaiseLower )
|
if ( dop->fNoSpaceRaiseLower )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:noSpaceRaiseLower" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:noSpaceRaiseLower", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fNoTabForInd )
|
if ( dop->fNoTabForInd )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:noTabHangInd" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:noTabHangInd", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fPrintBodyBeforeHdr )
|
if ( dop->fPrintBodyBeforeHdr )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:printBodyTextBeforeHeader" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:printBodyTextBeforeHeader", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fMapPrintTextColor )
|
if ( dop->fMapPrintTextColor )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:printColBlack" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:printColBlack", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fDontAllowFieldEndSelect )
|
if ( dop->fDontAllowFieldEndSelect )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:selectFldWithFirstOrLastChar" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:selectFldWithFirstOrLastChar", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fSpLayoutLikeWW8 )
|
if ( dop->fSpLayoutLikeWW8 )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:shapeLayoutLikeWW8" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:shapeLayoutLikeWW8", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fShowBreaksInFrames )
|
if ( dop->fShowBreaksInFrames )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:showBreaksInFrames" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:showBreaksInFrames", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fMakeSpaceForUL )
|
if ( dop->fMakeSpaceForUL )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:spaceForUL" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:spaceForUL", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fTruncDxaExpand )
|
if ( dop->fTruncDxaExpand )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:spacingInWholePoints" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:spacingInWholePoints", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fSubOnSize )
|
if ( dop->fSubOnSize )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:subFontBySize" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:subFontBySize", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fSuppressSpbfAfterPageBreak )
|
if ( dop->fSuppressSpbfAfterPageBreak )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:suppressSpBfAfterPgBrk" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:suppressSpBfAfterPgBrk", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fSuppressTopSpacing )
|
if ( dop->fSuppressTopSpacing )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:suppressTopSpacing" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:suppressTopSpacing", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fSwapBordersFacingPgs )
|
if ( dop->fSwapBordersFacingPgs )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:swapBordersFacingPages" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:swapBordersFacingPages", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !dop->fDntULTrlSpc )
|
if ( !dop->fDntULTrlSpc )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:ulTrailSpace" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:ulTrailSpace", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fPrintMet )
|
if ( dop->fPrintMet )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:usePrinterMetrics" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:usePrinterMetrics", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fUseWord2002TableStyleRules )
|
if ( dop->fUseWord2002TableStyleRules )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:useWord2002TableStyleRules" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:useWord2002TableStyleRules", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fUserWord97LineBreakingRules )
|
if ( dop->fUserWord97LineBreakingRules )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:useWord97LineBreakRules" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:useWord97LineBreakRules", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fWPJust )
|
if ( dop->fWPJust )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:wpJustification" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:wpJustification", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fWPSpace )
|
if ( dop->fWPSpace )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:wpSpaceWidth" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:wpSpaceWidth", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dop->fWrapTrailSpaces )
|
if ( dop->fWrapTrailSpaces )
|
||||||
{
|
{
|
||||||
m_oXmlWriter.WriteNodeBegin( _T( "w:wrapTrailSpaces" ), TRUE );
|
m_oXmlWriter.WriteNodeBegin( L"w:wrapTrailSpaces", TRUE );
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "" ), TRUE );
|
m_oXmlWriter.WriteNodeEnd( L"", TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_oXmlWriter.WriteNodeEnd( _T( "w:compat" ) );
|
m_oXmlWriter.WriteNodeEnd( L"w:compat" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -112,23 +112,14 @@ namespace DocFileFormat
|
|||||||
friend class PropertiesMapping;
|
friend class PropertiesMapping;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// 24-bit foreground color
|
unsigned int cvFore; // 24-bit foreground color
|
||||||
unsigned int cvFore;
|
bool cvForeAuto;
|
||||||
bool cvForeAuto;
|
int icoFore; // Foreground color.
|
||||||
/// Foreground color.
|
unsigned int cvBack;
|
||||||
/// Only used if cvFore is not set
|
bool cvBackAuto;
|
||||||
int icoFore;
|
int icoBack;
|
||||||
/// 24-bit background color
|
ShadingPattern ipat;
|
||||||
unsigned int cvBack;
|
ShadingType shadingType;
|
||||||
bool cvBackAuto;
|
|
||||||
/// Background color.
|
|
||||||
/// Only used if cvBack is not set.
|
|
||||||
int icoBack;
|
|
||||||
/// Shading pattern
|
|
||||||
ShadingPattern ipat;
|
|
||||||
/// Shading type
|
|
||||||
ShadingType shadingType;
|
|
||||||
/// Shading special vale
|
|
||||||
ShadingSpecialValue shadingSpecialValue;
|
ShadingSpecialValue shadingSpecialValue;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -236,7 +227,7 @@ namespace DocFileFormat
|
|||||||
else if (0x0F == icoBack) { cvBack = RGB2 (0x80, 0x80, 0x80); }
|
else if (0x0F == icoBack) { cvBack = RGB2 (0x80, 0x80, 0x80); }
|
||||||
else if (0x10 == icoBack) { cvBack = RGB2 (0xC0, 0xC0, 0xC0); }
|
else if (0x10 == icoBack) { cvBack = RGB2 (0xC0, 0xC0, 0xC0); }
|
||||||
|
|
||||||
// TODO : если будут документы с такими цветовыми палитрами
|
// .... если будут документы с такими цветовыми палитрами
|
||||||
|
|
||||||
//if ((cvFore == 0) && (icoFore == 0x0) && (cvBack == 0) && (icoBack == 0x0) && (ipat == Automatic))
|
//if ((cvFore == 0) && (icoFore == 0x0) && (cvBack == 0) && (icoBack == 0x0) && (ipat == Automatic))
|
||||||
//{
|
//{
|
||||||
@ -250,7 +241,6 @@ namespace DocFileFormat
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//throw new ByteParseException("Cannot parse the struct SHD, the length of the struct doesn't match");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -50,8 +50,10 @@
|
|||||||
|
|
||||||
int _tmain(int argc, _TCHAR* argv[])
|
int _tmain(int argc, _TCHAR* argv[])
|
||||||
{
|
{
|
||||||
|
if (argc < 2) return 1;
|
||||||
|
|
||||||
std::wstring sSrcDoc = argv[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 outputDir = FileSystem::Directory::GetFolderPath(sDstDocx);
|
||||||
std::wstring dstTempPath = FileSystem::Directory::CreateDirectoryWithUniqueName(outputDir);
|
std::wstring dstTempPath = FileSystem::Directory::CreateDirectoryWithUniqueName(outputDir);
|
||||||
|
|||||||
@ -37,12 +37,21 @@
|
|||||||
|
|
||||||
#include "../../src/ConvertOO2OOX.h"
|
#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[])
|
int _tmain(int argc, _TCHAR* argv[])
|
||||||
{
|
{
|
||||||
|
if (argc < 2) return 1;
|
||||||
|
|
||||||
HRESULT hr = S_OK;
|
HRESULT hr = S_OK;
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
std::wstring srcFileName = argv[1];
|
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 outputDir = FileSystem::Directory::GetFolderPath(dstPath);
|
||||||
|
|
||||||
std::wstring srcTempPath = FileSystem::Directory::CreateDirectoryWithUniqueName(outputDir);
|
std::wstring srcTempPath = FileSystem::Directory::CreateDirectoryWithUniqueName(outputDir);
|
||||||
|
|||||||
@ -345,10 +345,6 @@
|
|||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\..\Common\3dParty\icu\win_32\lib\icuuc.lib"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\Common\3dParty\pole\pole.cpp"
|
RelativePath="..\..\..\Common\3dParty\pole\pole.cpp"
|
||||||
>
|
>
|
||||||
|
|||||||
@ -38,10 +38,10 @@
|
|||||||
|
|
||||||
int _tmain(int argc, _TCHAR* argv[])
|
int _tmain(int argc, _TCHAR* argv[])
|
||||||
{
|
{
|
||||||
if (argc < 3) return 3;
|
if (argc < 2) return 1;
|
||||||
|
|
||||||
std::wstring sSrcPpt = argv[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 outputDir = FileSystem::Directory::GetFolderPath(sDstPptx);
|
||||||
std::wstring dstTempPath = FileSystem::Directory::CreateDirectoryWithUniqueName(outputDir);
|
std::wstring dstTempPath = FileSystem::Directory::CreateDirectoryWithUniqueName(outputDir);
|
||||||
|
|||||||
Reference in New Issue
Block a user