Kaydet (Commit) e3d3b7bb authored tarafından Vinaya Mandke's avatar Vinaya Mandke Kaydeden (comit) Miklos Vajna

Fix for multipe occurrences of attibute in <w:pgMar>

After round trip multiple occurrences of w:left,  w:right etc
were exported.
Also added UT for the test file.

Conflicts:
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx

Change-Id: I6a503cf609f627b8f8eb9d33691e51582c15b459
Reviewed-on: https://gerrit.libreoffice.org/6608
üst 458ff29a
...@@ -1568,6 +1568,12 @@ DECLARE_OOXML_TEST(testFdo70812, "fdo70812.docx") ...@@ -1568,6 +1568,12 @@ DECLARE_OOXML_TEST(testFdo70812, "fdo70812.docx")
getParagraph(1, "Sample pages document."); getParagraph(1, "Sample pages document.");
} }
DECLARE_OOXML_TEST(testPgMargin, "testPgMargin.docx")
{
xmlDocPtr pXmlDoc = parseExport();
assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:pgMar", "left", "1440");
}
#endif #endif
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
......
...@@ -1642,7 +1642,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt ...@@ -1642,7 +1642,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
2 New page, 3 Even page, 4 Odd page 2 New page, 3 Even page, 4 Odd page
*/ */
sal_uInt8 nBreakCode = 2; // default neue Seite beginnen sal_uInt8 nBreakCode = 2; // default neue Seite beginnen
bool bOutPgDscSet = true, bLeftRightPgChain = false; bool bOutPgDscSet = true, bLeftRightPgChain = false, bOutputStyleItemSet = false;
const SwFrmFmt* pPdFmt = &pPd->GetMaster(); const SwFrmFmt* pPdFmt = &pPd->GetMaster();
if ( rSepInfo.pSectionFmt ) if ( rSepInfo.pSectionFmt )
{ {
...@@ -1703,6 +1703,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt ...@@ -1703,6 +1703,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
// Switch off test on default item values, if page description // Switch off test on default item values, if page description
// set (value of <bOutPgDscSet>) isn't written. // set (value of <bOutPgDscSet>) isn't written.
AttrOutput().OutputStyleItemSet( aSet, true, bOutPgDscSet ); AttrOutput().OutputStyleItemSet( aSet, true, bOutPgDscSet );
bOutputStyleItemSet = true;
//Cannot export as normal page framedir, as continous sections //Cannot export as normal page framedir, as continous sections
//cannot contain any grid settings like proper sections //cannot contain any grid settings like proper sections
...@@ -1789,7 +1790,8 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt ...@@ -1789,7 +1790,8 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
} }
pISet = &pPdFmt->GetAttrSet(); pISet = &pPdFmt->GetAttrSet();
AttrOutput().OutputStyleItemSet( pPdFmt->GetAttrSet(), true, false ); if (!bOutputStyleItemSet)
AttrOutput().OutputStyleItemSet( pPdFmt->GetAttrSet(), true, false );
AttrOutput().SectionPageBorders( pPdFmt, pPdFirstPgFmt ); AttrOutput().SectionPageBorders( pPdFmt, pPdFirstPgFmt );
pISet = pOldI; pISet = pOldI;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment