diff options
-rwxr-xr-x | sw/qa/extras/odfimport/data/tdf41542_borderlessPadding.odt | bin | 0 -> 15669 bytes | |||
-rw-r--r-- | sw/qa/extras/odfimport/odfimport.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/layout/frmtool.cxx | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sw/qa/extras/odfimport/data/tdf41542_borderlessPadding.odt b/sw/qa/extras/odfimport/data/tdf41542_borderlessPadding.odt Binary files differnew file mode 100755 index 000000000000..9585041de3b2 --- /dev/null +++ b/sw/qa/extras/odfimport/data/tdf41542_borderlessPadding.odt diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index 90f1da1f96f2..9c21cad377b7 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -242,6 +242,12 @@ DECLARE_ODFIMPORT_TEST(testOdtBorders, "borders_ooo33.odt") } while(xParaEnum->hasMoreElements()); } +DECLARE_ODFIMPORT_TEST(testTdf41542_borderlessPadding, "tdf41542_borderlessPadding.odt") +{ + // the page style's borderless padding should force this to 3 pages, not 1 + CPPUNIT_ASSERT_EQUAL( 3, getPages() ); +} + DECLARE_ODFIMPORT_TEST(testPageStyleLayoutDefault, "hello.odt") { uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Default Style"), uno::UNO_QUERY); diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 5149cb671841..6aa488a4c764 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -1829,13 +1829,7 @@ SwBorderAttrs::SwBorderAttrs(const SwModify *pMod, const SwFrame *pConstructor) m_bCachedJoinedWithPrev = false; m_bCachedJoinedWithNext = false; - bool bAllowPaddingWithoutBorders = false; - if( (pConstructor->GetType() & SwFrameType::Fly) - && pConstructor->IsLayoutFrame() - && pConstructor->GetLower() && pConstructor->GetLower()->IsTextFrame() ) - { - bAllowPaddingWithoutBorders = pConstructor->getRootFrame()->GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::ALLOW_PADDING_WITHOUT_BORDERS); - } + bool bAllowPaddingWithoutBorders = true; m_bBorderDist = bool(pConstructor->GetType() & SwFrameType::Cell) || bAllowPaddingWithoutBorders; } |