[PATCH] fdo#36791 : fix for import of greeting card
Hi, I have submitted a patch for review: https://gerrit.libreoffice.org/4240 To pull it, you can do: git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/40/4240/1 fdo#36791 : fix for import of greeting card Change-Id: Id9d68e3e5bc2e2335ef1d1b3a8605a0de64ae8ea --- M editeng/source/editeng/editeng.cxx M editeng/source/outliner/outliner.cxx M include/editeng/editeng.hxx M include/editeng/outliner.hxx M include/oox/vml/vmltextbox.hxx M oox/source/vml/vmlshape.cxx M oox/source/vml/vmlshapecontext.cxx M oox/source/vml/vmltextbox.cxx M oox/source/vml/vmltextboxcontext.cxx M svx/source/customshapes/EnhancedCustomShape2d.cxx M svx/source/svdraw/svdmodel.cxx M svx/source/svdraw/svdograf.cxx M svx/source/svdraw/svdotextdecomposition.cxx M svx/source/unodraw/unoshap2.cxx M sw/qa/extras/ooxmlimport/ooxmlimport.cxx M sw/source/core/layout/fly.cxx M sw/source/filter/ww8/docxattributeoutput.cxx 17 files changed, 190 insertions(+), 14 deletions(-) diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 9bf29e5..7aa5cf1 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -102,6 +102,7 @@ { DBG_CTOR( EditEngine, 0 ); pImpEditEngine = new ImpEditEngine( this, pItemPool ); +mpStripRec = new Rectangle(); } EditEngine::~EditEngine() @@ -1879,12 +1880,34 @@ { DBG_CHKTHIS( EditEngine, 0 ); VirtualDevice aTmpDev; +#if 0 // Modify for greeting.docx error. Rectangle aBigRect( Point( 0, 0 ), Size( 0x7FFF, 0x7FFF ) ); if ( IsVertical() ) { aBigRect.Right() = 0; aBigRect.Left() = -0x7FFF; } +#endif +// Set Clipping area +Rectangle aBigRect; + +GetStripArea(aBigRect); +sal_uInt32 rectHeight = aBigRect.GetHeight(); + +sal_uInt16 nParaNum = GetParagraphCount(); +sal_uInt32 nHeight = 0; +sal_uInt32 nLastHeight = 0; +for(int i = 0; i nParaNum; i ++) +{ +nLastHeight = GetTextHeight( i ); +nHeight += nLastHeight; +if (nHeight = rectHeight) +break; +} + +aBigRect.Top() = 0; +aBigRect.Bottom() = (rectHeight - nLastHeight); + pImpEditEngine-Paint( aTmpDev, aBigRect, Point(), sal_True ); } @@ -2936,11 +2959,21 @@ return pImpEditEngine-InsertLineBreak(rEditSelection); } +void EditEngine::SetStripArea( const Rectangle rRect ) +{ +(*mpStripRec) = rRect; +} + +void EditEngine::GetStripArea( Rectangle rRect ) +{ +rRect = (*mpStripRec); +} + + EFieldInfo::EFieldInfo() { pFieldItem = NULL; } - EFieldInfo::EFieldInfo( const SvxFieldItem rFieldItem, sal_Int32 nPara, sal_uInt16 nPos ) : aPosition( nPara, nPos ) { diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index db6915d..895bbfa 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -1335,6 +1335,7 @@ bBlockInsCallback = sal_False; nMaxDepth = 9; +mStripRec = Rectangle(); pParaList = new ParagraphList; pParaList-SetVisibleStateChangedHdl( LINK( this, Outliner, ParaVisibleStateChangedHdl ) ); @@ -1784,6 +1785,7 @@ { DBG_CHKTHIS(Outliner,0); bStrippingPortions = sal_True; +pEditEngine-SetStripArea(GetStripArea()); pEditEngine-StripPortions(); bStrippingPortions = sal_False; } diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index a3ba78d..d71043d 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -129,6 +129,7 @@ private: ImpEditEngine* pImpEditEngine; +Rectangle* mpStripRec; EDITENG_DLLPRIVATE EditEngine( const EditEngine ); EDITENG_DLLPRIVATE EditEngine operator=( const EditEngine ); @@ -579,6 +580,9 @@ bool Undo(EditView* pView); bool Redo(EditView* pView); + +virtual voidSetStripArea( const Rectangle rRect ); +virtual voidGetStripArea( Rectangle rRect ); }; #endif // _MyEDITENG_HXX diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index c9c0b0b..7f2f1ba 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -633,6 +633,8 @@ sal_uLong nDummy; +Rectangle mStripRec; + DECL_LINK( ParaVisibleStateChangedHdl, Paragraph* ); DECL_LINK( BeginMovingParagraphsHdl, void* ); DECL_LINK( EndMovingParagraphsHdl, MoveParagraphsInfo* ); @@ -1040,6 +1042,9 @@ // convenient method to determine the bullets/numbering status for all paragraphs sal_Int32 GetBulletsNumberingStatus() const; + +voidSetStripArea( const Rectangle rRect ) { mStripRec = rRect; } +Rectangle GetStripArea() const { return mStripRec; }; }; #endif diff --git a/include/oox/vml/vmltextbox.hxx b/include/oox/vml/vmltextbox.hxx index 4975e6b..3643855 100644 --- a/include/oox/vml/vmltextbox.hxx +++
[PATCH] fdo#64238: fix for missing footer bug
Hi, I have submitted a patch for review: https://gerrit.libreoffice.org/4233 To pull it, you can do: git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/33/4233/1 fdo#64238: fix for missing footer bug Change-Id: I328547c41bfc1a23f7e6233db57fbfa415e22cb3 --- A sw/qa/extras/ooxmlexport/data/fdo64238_a.docx A sw/qa/extras/ooxmlexport/data/fdo64238_b.docx M sw/qa/extras/ooxmlexport/ooxmlexport.cxx M writerfilter/source/dmapper/DomainMapper_Impl.cxx M writerfilter/source/dmapper/DomainMapper_Impl.hxx 5 files changed, 99 insertions(+), 27 deletions(-) diff --git a/sw/qa/extras/ooxmlexport/data/fdo64238_a.docx b/sw/qa/extras/ooxmlexport/data/fdo64238_a.docx new file mode 100644 index 000..7c43fea --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/fdo64238_a.docx Binary files differ diff --git a/sw/qa/extras/ooxmlexport/data/fdo64238_b.docx b/sw/qa/extras/ooxmlexport/data/fdo64238_b.docx new file mode 100644 index 000..bfaf92c --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/fdo64238_b.docx Binary files differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index ca6fad6..1295e28 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -72,6 +72,8 @@ void testI120928(); void testFdo64826(); void testPageBackground(); +void testFdo64238_a(); +void testFdo64238_b(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) !defined(WNT) @@ -121,6 +123,8 @@ {i120928.docx, Test::testI120928}, {fdo64826.docx, Test::testFdo64826}, {page-background.docx, Test::testPageBackground}, +{fdo64238_a.docx, Test::testFdo64238_a}, +{fdo64238_b.docx, Test::testFdo64238_b}, }; // Don't test the first import of these, for some reason those tests fail const char* aBlacklist[] = { @@ -688,6 +692,46 @@ CPPUNIT_ASSERT_EQUAL(sal_Int32(0x92D050), getPropertysal_Int32(xPageStyle, BackColor)); } +void Test::testFdo64238_a() +{ +// The problem was that when 'Show Only Odd Footer' was marked in Word and the Even footer *was filled* +// then LO would still import the Even footer and concatenate it to to the odd footer. +// This case specifically is for : +// 'Blank Odd Footer' with 'Non-Blank Even Footer' when 'Show Only Odd Footer' is marked in Word +// In this case the imported footer in LO was supposed to be blank, but instead was the 'even' footer +uno::Referencetext::XText xFooterText = getProperty uno::Referencetext::XText (getStyles(PageStyles)-getByName(DEFAULT_STYLE), FooterText); +uno::Reference text::XTextRange xFooterParagraph = getParagraphOfText( 1, xFooterText ); +uno::Referencecontainer::XEnumerationAccess xRunEnumAccess(xFooterParagraph, uno::UNO_QUERY); +uno::Referencecontainer::XEnumeration xRunEnum = xRunEnumAccess-createEnumeration(); +int numOfRuns = 0; +while (xRunEnum-hasMoreElements()) +{ +uno::Referencetext::XTextRange xRun(xRunEnum-nextElement(), uno::UNO_QUERY); +numOfRuns++; +} +CPPUNIT_ASSERT_EQUAL(sal_Int32(2), numOfRuns); +} + +void Test::testFdo64238_b() +{ +// The problem was that when 'Show Only Odd Footer' was marked in Word and the Even footer *was filled* +// then LO would still import the Even footer and concatenate it to to the odd footer. +// This case specifically is for : +// 'Non-Blank Odd Footer' with 'Non-Blank Even Footer' when 'Show Only Odd Footer' is marked in Word +// In this case the imported footer in LO was supposed to be just the odd footer, but instead was the 'odd' and 'even' footers concatenated +uno::Referencetext::XText xFooterText = getProperty uno::Referencetext::XText (getStyles(PageStyles)-getByName(DEFAULT_STYLE), FooterText); +uno::Reference text::XTextRange xFooterParagraph = getParagraphOfText( 1, xFooterText ); +uno::Referencecontainer::XEnumerationAccess xRunEnumAccess(xFooterParagraph, uno::UNO_QUERY); +uno::Referencecontainer::XEnumeration xRunEnum = xRunEnumAccess-createEnumeration(); +int numOfRuns = 0; +while (xRunEnum-hasMoreElements()) +{ +uno::Referencetext::XTextRange xRun(xRunEnum-nextElement(), uno::UNO_QUERY); +numOfRuns++; +} +CPPUNIT_ASSERT_EQUAL(sal_Int32(5), numOfRuns); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index fbc633d..6734e75 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -175,6 +175,7 @@ m_bInStyleSheetImport( false ), m_bInAnyTableImport( false ), m_bInHeaderFooterImport( false ), +m_bDiscardHeaderFooter( false ), m_bLineNumberingSet( false ), m_bIsInFootnoteProperties( true ),
[PATCH] fdo#65655 : fix for Different_Odd_And_Even_Pages flag ignore...
Hi, I have submitted a patch for review: https://gerrit.libreoffice.org/4229 To pull it, you can do: git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/29/4229/1 fdo#65655 : fix for Different_Odd_And_Even_Pages flag ignored Change-Id: Icf9949bb00aa905d22aedfd8f2b297dfa89dfedb --- A sw/qa/extras/ooxmlexport/data/fdo65655.docx M sw/qa/extras/ooxmlexport/ooxmlexport.cxx A sw/qa/extras/ooxmlimport/data/fdo65655.docx M sw/qa/extras/ooxmlimport/ooxmlimport.cxx M writerfilter/source/dmapper/DomainMapper_Impl.cxx 5 files changed, 39 insertions(+), 2 deletions(-) diff --git a/sw/qa/extras/ooxmlexport/data/fdo65655.docx b/sw/qa/extras/ooxmlexport/data/fdo65655.docx new file mode 100644 index 000..5fe9451 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/fdo65655.docx Binary files differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index ca6fad6..55221c2 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -72,6 +72,7 @@ void testI120928(); void testFdo64826(); void testPageBackground(); +void testFdo65655(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) !defined(WNT) @@ -121,6 +122,7 @@ {i120928.docx, Test::testI120928}, {fdo64826.docx, Test::testFdo64826}, {page-background.docx, Test::testPageBackground}, +{fdo65655.docx, Test::testFdo65655}, }; // Don't test the first import of these, for some reason those tests fail const char* aBlacklist[] = { @@ -688,6 +690,20 @@ CPPUNIT_ASSERT_EQUAL(sal_Int32(0x92D050), getPropertysal_Int32(xPageStyle, BackColor)); } +void Test::testFdo65655() +{ +// The problem was that the DOCX had a non-blank odd footer and a blank even footer +// The 'Different Odd Even Pages' was turned on +// However - LO assumed that because the 'even' footer is blank - it should ignore the 'Different Odd Even Pages' flag +// So it did not import it and did not export it +uno::Referencebeans::XPropertySet xPropertySet(getStyles(PageStyles)-getByName(DEFAULT_STYLE), uno::UNO_QUERY); +sal_Bool bValue = false; +xPropertySet-getPropertyValue(HeaderIsShared) = bValue; +CPPUNIT_ASSERT_EQUAL(false, bool(bValue)); +xPropertySet-getPropertyValue(FooterIsShared) = bValue; +CPPUNIT_ASSERT_EQUAL(false, bool(bValue)); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/qa/extras/ooxmlimport/data/fdo65655.docx b/sw/qa/extras/ooxmlimport/data/fdo65655.docx new file mode 100644 index 000..5fe9451 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/fdo65655.docx Binary files differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index c422ecc..128961f 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -117,6 +117,7 @@ void testWatermark(); void testPageBorderShadow(); void testN816593(); +void testFdo65655(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) !defined(WNT) @@ -202,6 +203,7 @@ {watermark.docx, Test::testWatermark}, {page-border-shadow.docx, Test::testPageBorderShadow}, {n816593.docx, Test::testN816593}, +{fdo65655.docx, Test::testFdo65655}, }; header(); for (unsigned int i = 0; i SAL_N_ELEMENTS(aMethods); ++i) @@ -1441,6 +1443,19 @@ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTables-getCount()); } +void Test::testFdo65655() +{ +// The problem was that the DOCX had a non-blank odd footer and a blank even footer +// The 'Different Odd Even Pages' was turned on +// However - LO assumed that because the 'even' footer is blank - it should ignore the 'Different Odd Even Pages' flag +uno::Referencebeans::XPropertySet xPropertySet(getStyles(PageStyles)-getByName(DEFAULT_STYLE), uno::UNO_QUERY); +sal_Bool bValue = false; +xPropertySet-getPropertyValue(HeaderIsShared) = bValue; +CPPUNIT_ASSERT_EQUAL(false, bool(bValue)); +xPropertySet-getPropertyValue(FooterIsShared) = bValue; +CPPUNIT_ASSERT_EQUAL(false, bool(bValue)); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index fbc633d..c822739 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1377,7 +1377,10 @@ uno::makeAny(sal_True) ); // if a left header is available then header are not shared bool bLeft = eType == SectionPropertyMap::PAGE_LEFT; -if( bLeft m_pSettingsTable-GetEvenAndOddHeaders()) + +// If the 'Different Even Odd Pages' flag is turned on - do not ignore it +// Even if the 'Even' header is blank - the flag should be imported (so
[PATCH] fdo#65257 : DOCX not exporting background color
Hi, I have submitted a patch for review: https://gerrit.libreoffice.org/4130 To pull it, you can do: git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/30/4130/1 fdo#65257 : DOCX not exporting background color Change-Id: Ida3f66d5adb063400494e1da589a463b4d7c2a86 --- A sw/qa/extras/ooxmlexport/data/page-background.docx M sw/qa/extras/ooxmlexport/ooxmlexport.cxx M sw/source/filter/ww8/docxexport.cxx 3 files changed, 34 insertions(+), 0 deletions(-) diff --git a/sw/qa/extras/ooxmlexport/data/page-background.docx b/sw/qa/extras/ooxmlexport/data/page-background.docx new file mode 100644 index 000..8c1f2ebd --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/page-background.docx Binary files differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 8dc69f2..a816854 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -69,6 +69,7 @@ void testMathLiteral(); void testFdo48557(); void testI120928(); +void testPageBackground(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) !defined(WNT) @@ -116,6 +117,7 @@ {math-literal.docx, Test::testMathLiteral}, {fdo48557.odt, Test::testFdo48557}, {i120928.docx, Test::testI120928}, +{page-background.docx, Test::testPageBackground}, }; // Don't test the first import of these, for some reason those tests fail const char* aBlacklist[] = { @@ -672,6 +674,13 @@ CPPUNIT_ASSERT_EQUAL(true, bIsGraphic); } +void Test::testPageBackground() +{ +// 'Document Background' wasn't exported. +uno::Referencebeans::XPropertySet xPageStyle(getStyles(PageStyles)-getByName(DEFAULT_STYLE), uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(sal_Int32(0x92D050), getPropertysal_Int32(xPageStyle, BackColor)); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index ca46cae..5de892e 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -44,6 +44,7 @@ #include frmfmt.hxx #include section.hxx #include ftninfo.hxx +#include pagedesc.hxx #include editeng/editobj.hxx #include editeng/outlobj.hxx @@ -687,6 +688,16 @@ OString aZoom(OString::valueOf(sal_Int32(pViewShell-GetViewOptions()-GetZoom(; pFS-singleElementNS(XML_w, XML_zoom, FSNS(XML_w, XML_percent), aZoom.getStr(), FSEND); +// Display Background Shape +const SwFrmFmt rFmt = pDoc-GetPageDesc(0).GetMaster(); +const SfxPoolItem* pItem = 0; +SfxItemState eState = rFmt.GetItemState(RES_BACKGROUND, true, pItem); +if (SFX_ITEM_SET == eState pItem) +{ +// Turn on the 'displayBackgroundShape' +pFS-singleElementNS( XML_w, XML_displayBackgroundShape, FSEND ); +} + // Track Changes if ( settings.trackRevisions ) pFS-singleElementNS( XML_w, XML_trackRevisions, FSEND ); @@ -729,6 +740,20 @@ // setup the namespaces m_pDocumentFS-startElementNS( XML_w, XML_document, MainXmlNamespaces( m_pDocumentFS )); +// Write background page color +const SwFrmFmt rFmt = pDoc-GetPageDesc(0).GetMaster(); +const SfxPoolItem* pItem = 0; +SfxItemState eState = rFmt.GetItemState(RES_BACKGROUND, true, pItem); +if (SFX_ITEM_SET == eState pItem) +{ +// The 'color' is set for the first page style - take it and use it as the background color of the entire DOCX +const SvxBrushItem* pBrush = (const SvxBrushItem*)pItem; +Color backgroundColor = pBrush-GetColor(); +OString aBackgroundColorStr = msfilter::util::ConvertColor(backgroundColor); + +m_pDocumentFS-singleElementNS( XML_w, XML_background, FSNS( XML_w, XML_color ), aBackgroundColorStr, FSEND ); +} + // body m_pDocumentFS-startElementNS( XML_w, XML_body, FSEND ); -- To view, visit https://gerrit.libreoffice.org/4130 To unsubscribe, visit https://gerrit.libreoffice.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida3f66d5adb063400494e1da589a463b4d7c2a86 Gerrit-PatchSet: 1 Gerrit-Project: core Gerrit-Branch: master Gerrit-Owner: Adam CloudOn rattles2...@gmail.com ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[PATCH] fdo#64826 : fix for track-changes export in DOCX
Hi, I have submitted a patch for review: https://gerrit.libreoffice.org/4011 To pull it, you can do: git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/11/4011/1 fdo#64826 : fix for track-changes export in DOCX Change-Id: I44b505f977edcf9e0af2108487870352277ee9f0 --- M sw/source/filter/ww8/docxexport.cxx 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index ca46cae..0ceacc05 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -318,6 +318,9 @@ void DocxExport::ExportDocument_Impl() { +// Set the 'Track Revisions' flag in the settings structure +settings.trackRevisions = 0 != ( nsRedlineMode_t::REDLINE_ON mnRedlineMode ); + InitStyles(); // init sections @@ -824,9 +827,6 @@ m_nFooters( 0 ), m_pVMLExport( NULL ) { -// Set the 'Track Revisions' flag in the settings structure -settings.trackRevisions = 0 != ( nsRedlineMode_t::REDLINE_ON mnRedlineMode ); - // Write the document properies WriteProperties( ); -- To view, visit https://gerrit.libreoffice.org/4011 To unsubscribe, visit https://gerrit.libreoffice.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I44b505f977edcf9e0af2108487870352277ee9f0 Gerrit-PatchSet: 1 Gerrit-Project: core Gerrit-Branch: master Gerrit-Owner: Adam CloudOn rattles2...@gmail.com ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[PATCH] fdo#64826: fix for exporting to DOCX that didnt save track '...
Hi, I have submitted a patch for review: https://gerrit.libreoffice.org/3991 To pull it, you can do: git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/91/3991/1 fdo#64826: fix for exporting to DOCX that didnt save track 'changes state' Change-Id: If5b3198769a08cc751d542f8305fd7f41c73ec26 --- M sw/source/filter/ww8/docxexport.cxx M sw/source/filter/ww8/docxexport.hxx 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index e04f12d..18d0583 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -686,18 +686,33 @@ // Zoom OString aZoom(OString::valueOf(sal_Int32(pViewShell-GetViewOptions()-GetZoom(; pFS-singleElementNS(XML_w, XML_zoom, FSNS(XML_w, XML_percent), aZoom.getStr(), FSEND); + +// Track Changes +if ( settings.trackRevisions ) +pFS-singleElementNS( XML_w, XML_trackRevisions, FSEND ); + +// Embed Fonts if( pDoc-get( IDocumentSettingAccess::EMBED_FONTS )) pFS-singleElementNS( XML_w, XML_embedTrueTypeFonts, FSEND ); + +// Embed System Fonts if( pDoc-get( IDocumentSettingAccess::EMBED_SYSTEM_FONTS )) pFS-singleElementNS( XML_w, XML_embedSystemFonts, FSEND ); + +// Default Tab Stop if( settings.defaultTabStop != 0 ) pFS-singleElementNS( XML_w, XML_defaultTabStop, FSNS( XML_w, XML_val ), OString::valueOf( sal_Int32( settings.defaultTabStop )).getStr(), FSEND ); + +// Even and Odd Headers if( settings.evenAndOddHeaders ) pFS-singleElementNS( XML_w, XML_evenAndOddHeaders, FSEND ); +// Has Footnotes if( m_pAttrOutput-HasFootnotes()) m_pAttrOutput-WriteFootnoteEndnotePr( pFS, XML_footnotePr, pDoc-GetFtnInfo(), XML_footnote ); + +// Has Endnotes if( m_pAttrOutput-HasEndnotes()) m_pAttrOutput-WriteFootnoteEndnotePr( pFS, XML_endnotePr, pDoc-GetEndNoteInfo(), XML_endnote ); @@ -809,6 +824,9 @@ m_nFooters( 0 ), m_pVMLExport( NULL ) { +// Set the 'Track Revisions' flag in the settings structure +settings.trackRevisions = 0 != ( nsRedlineMode_t::REDLINE_ON mnRedlineMode ); + // Write the document properies WriteProperties( ); @@ -840,6 +858,7 @@ DocxSettingsData::DocxSettingsData() : evenAndOddHeaders( false ) , defaultTabStop( 0 ) +, trackRevisions( false ) { } @@ -849,6 +868,9 @@ return true; if( defaultTabStop != 0 ) return true; +if ( trackRevisions ) +return true; + return false; } diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx index 16bf73e..2348349 100644 --- a/sw/source/filter/ww8/docxexport.hxx +++ b/sw/source/filter/ww8/docxexport.hxx @@ -54,6 +54,7 @@ bool hasData() const; /// returns true if there are any non-default settings (i.e. something to write) bool evenAndOddHeaders; int defaultTabStop; +bool trackRevisions;// Should 'Track Revisions' be set }; /// The class that does all the actual DOCX export-related work. -- To view, visit https://gerrit.libreoffice.org/3991 To unsubscribe, visit https://gerrit.libreoffice.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If5b3198769a08cc751d542f8305fd7f41c73ec26 Gerrit-PatchSet: 1 Gerrit-Project: core Gerrit-Branch: master Gerrit-Owner: Adam CloudOn rattles2...@gmail.com ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[PATCH] fdo#64531 : Tab-stops exported to DOCX added too much indent...
Hi, I have submitted a patch for review: https://gerrit.libreoffice.org/3883 To pull it, you can do: git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/83/3883/1 fdo#64531 : Tab-stops exported to DOCX added too much indentation Change-Id: I8ae5dec772fc56e75b3bec48edbf23a1258e47b4 --- M sw/source/filter/ww8/docxattributeoutput.cxx 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 95ce729..26ba5aa 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -4163,7 +4163,9 @@ break; } -pTabElementAttrList-add( FSNS( XML_w, XML_pos ), OString::valueOf( rTab.GetTabPos() + nCurrentLeft ) ); +// Because GetTabHost is included Indent, we don't need to add CurrentLeft (CurrentLeft is Indent Information.) +//pTabElementAttrList-add( FSNS( XML_w, XML_pos ), OString::valueOf( rTab.GetTabPos() + nCurrentLeft ) ); +pTabElementAttrList-add( FSNS( XML_w, XML_pos ), OString::valueOf( rTab.GetTabPos()) ); sal_Unicode cFillChar = rTab.GetFill(); -- To view, visit https://gerrit.libreoffice.org/3883 To unsubscribe, visit https://gerrit.libreoffice.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8ae5dec772fc56e75b3bec48edbf23a1258e47b4 Gerrit-PatchSet: 1 Gerrit-Project: core Gerrit-Branch: master Gerrit-Owner: Adam CloudOn rattles2...@gmail.com ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[PATCH] fdo#64531 : Tab-stops exported to DOCX added too much indent...
Hi, I have submitted a patch for review: https://gerrit.libreoffice.org/3884 To pull it, you can do: git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/84/3884/1 fdo#64531 : Tab-stops exported to DOCX added too much indentation Change-Id: I12747006c8aac663f9529b495914f4a08301c66f --- M sw/source/filter/ww8/docxattributeoutput.cxx 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 95ce729..795045f 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -4163,7 +4163,9 @@ break; } -pTabElementAttrList-add( FSNS( XML_w, XML_pos ), OString::valueOf( rTab.GetTabPos() + nCurrentLeft ) ); +// Because GetTabPos already includes indent, we don't need to add nCurrentLeft (CurrentLeft is indentation information) +//pTabElementAttrList-add( FSNS( XML_w, XML_pos ), OString::valueOf( rTab.GetTabPos() + nCurrentLeft ) ); +pTabElementAttrList-add( FSNS( XML_w, XML_pos ), OString::valueOf( rTab.GetTabPos()) ); sal_Unicode cFillChar = rTab.GetFill(); -- To view, visit https://gerrit.libreoffice.org/3884 To unsubscribe, visit https://gerrit.libreoffice.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I12747006c8aac663f9529b495914f4a08301c66f Gerrit-PatchSet: 1 Gerrit-Project: core Gerrit-Branch: master Gerrit-Owner: Adam CloudOn rattles2...@gmail.com ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[ABANDONED] fdo#64531 : Tab-stops exported to DOCX added too much indent...
Adam CloudOn has abandoned this change. Change subject: fdo#64531 : Tab-stops exported to DOCX added too much indentation .. Patch Set 1: Abandoned recommitted this in https://gerrit.libreoffice.org/#/c/3884/ -- To view, visit https://gerrit.libreoffice.org/3883 To unsubscribe, visit https://gerrit.libreoffice.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I8ae5dec772fc56e75b3bec48edbf23a1258e47b4 Gerrit-PatchSet: 1 Gerrit-Project: core Gerrit-Branch: master Gerrit-Owner: Adam CloudOn rattles2...@gmail.com ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice