File tree Expand file tree Collapse file tree 4 files changed +20
-28
lines changed Expand file tree Collapse file tree 4 files changed +20
-28
lines changed Original file line number Diff line number Diff line change @@ -1280,23 +1280,6 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148952_2010)
12801280 CPPUNIT_ASSERT_EQUAL (u" Black" _ustr, title);
12811281}
12821282
1283- DECLARE_OOXMLEXPORT_TEST (testTdf153196, " A019_min.docx" )
1284- {
1285- uno::Reference<beans::XPropertySet> xPageStyle;
1286- getStyles (" PageStyles" )->getByName (" Converted1" ) >>= xPageStyle;
1287- sal_Int32 nLeftMargin{};
1288- xPageStyle->getPropertyValue (" LeftMargin" ) >>= nLeftMargin;
1289- // Without the accompanying fix in place, this test would have failed with:
1290- // - Expected: 4265
1291- // - Actual : 0
1292- CPPUNIT_ASSERT_EQUAL (static_cast <sal_Int32>(4265 ), nLeftMargin);
1293- sal_Int32 nRightMargin{};
1294- xPageStyle->getPropertyValue (" RightMargin" ) >>= nRightMargin;
1295- // - Expected: 0
1296- // - Actual : 4265
1297- CPPUNIT_ASSERT_EQUAL (static_cast <sal_Int32>(0 ), nRightMargin);
1298- }
1299-
13001283CPPUNIT_PLUGIN_IMPLEMENT ();
13011284
13021285/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
File renamed without changes.
Original file line number Diff line number Diff line change @@ -1333,6 +1333,26 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf154370)
13331333 CPPUNIT_ASSERT_EQUAL (beans::PropertyState_DIRECT_VALUE, ePropertyState);
13341334 }
13351335}
1336+
1337+ CPPUNIT_TEST_FIXTURE (Test, testTdf153196)
1338+ {
1339+ createSwDoc (" A019_min.docx" );
1340+
1341+ uno::Reference<beans::XPropertySet> xPageStyle;
1342+ getStyles (" PageStyles" )->getByName (" Converted1" ) >>= xPageStyle;
1343+ sal_Int32 nLeftMargin{};
1344+ xPageStyle->getPropertyValue (" LeftMargin" ) >>= nLeftMargin;
1345+ // Without the accompanying fix in place, this test would have failed with:
1346+ // - Expected: 4265
1347+ // - Actual : 0
1348+ CPPUNIT_ASSERT_EQUAL (static_cast <sal_Int32>(4265 ), nLeftMargin);
1349+ sal_Int32 nRightMargin{};
1350+ xPageStyle->getPropertyValue (" RightMargin" ) >>= nRightMargin;
1351+ // - Expected: 0
1352+ // - Actual : 4265
1353+ CPPUNIT_ASSERT_EQUAL (static_cast <sal_Int32>(0 ), nRightMargin);
1354+ }
1355+
13361356// tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT
13371357
13381358} // end of anonymous namespace
Original file line number Diff line number Diff line change @@ -9468,17 +9468,6 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
94689468
94699469 m_pageMargins.nLeft += sal::static_int_cast<sal_uInt16>(rLRSpace.ResolveLeft ({}));
94709470 m_pageMargins.nRight += sal::static_int_cast<sal_uInt16>(rLRSpace.ResolveRight ({}));
9471- // if page layout is 'left' then left/right margin need to be exchanged
9472- // as it is exported as mirrored layout starting with even page
9473- const WW8_SepInfo *pSectionInfo = m_rExport.Sections ().CurrentSectionInfo ();
9474- if (pSectionInfo->pPageDesc &&
9475- m_rExport.isMirroredMargin () &&
9476- ((pSectionInfo->pPageDesc ->ReadUseOn () & UseOnPage::All) == UseOnPage::Left))
9477- {
9478- sal_uInt16 nLeft = m_pageMargins.nLeft ;
9479- m_pageMargins.nLeft = m_pageMargins.nRight ;
9480- m_pageMargins.nRight = nLeft;
9481- }
94829471 sal_uInt16 nGutter = rLRSpace.GetGutterMargin ();
94839472
94849473 AddToAttrList ( m_pSectionSpacingAttrList,
You can’t perform that action at this time.
0 commit comments