lotuswordpro/source/filter/lwplayout.cxx | 15 +++------------ lotuswordpro/source/filter/lwplayout.hxx | 1 - 2 files changed, 3 insertions(+), 13 deletions(-)
New commits: commit 1d8cb97fea57b81a1ab151b88c2180e646bd401b Author: Thorsten Behrens <thorsten.behr...@cib.de> Date: Thu Dec 7 01:24:21 2017 +0100 Revert "ofz#4548 infinite regress in GetUsePrinterSettings" This breaks a unit test: filters-test.cxx:145:Assertion Test name: (anonymous namespace)::LotusWordProTest::test equality assertion failed - Expected: 1 - Actual : 0 This reverts commit d38674f3b5b6c97be5f8822f52301e29d677ed1e. diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx index acd913cd8489..cdaa7ab7dfa3 100644 --- a/lotuswordpro/source/filter/lwplayout.cxx +++ b/lotuswordpro/source/filter/lwplayout.cxx @@ -81,7 +81,6 @@ LwpVirtualLayout::LwpVirtualLayout(LwpObjectHeader const &objHdr, LwpSvStream* p , m_bGettingIsProtected(false) , m_bGettingMarginsValue(false) , m_bGettingExtMarginsValue(false) - , m_bGettingUsePrinterSettings(false) , m_nAttributes(0) , m_nAttributes2(0) , m_nAttributes3(0) @@ -1406,27 +1405,19 @@ XFBGImage* LwpMiddleLayout::GetXFBGImage() */ bool LwpMiddleLayout::GetUsePrinterSettings() { - if (m_bGettingUsePrinterSettings) - throw std::runtime_error("recursion in layout"); - m_bGettingUsePrinterSettings = true; - - bool bRet = false; - if(m_nOverrideFlag & OVER_SIZE) { - bRet = (m_nAttributes3 & STYLE3_USEPRINTERSETTINGS) != 0; + return (m_nAttributes3 & STYLE3_USEPRINTERSETTINGS) != 0; } else { rtl::Reference<LwpObject> xBase(GetBasedOnStyle()); if (LwpMiddleLayout* pLay = dynamic_cast<LwpMiddleLayout*>(xBase.get())) { - bRet = pLay->GetUsePrinterSettings(); + return pLay->GetUsePrinterSettings(); } } - - m_bGettingMarginsValue = false; - return bRet; + return false; } //Check whether there are contents in the layout diff --git a/lotuswordpro/source/filter/lwplayout.hxx b/lotuswordpro/source/filter/lwplayout.hxx index cd84af5b380b..efff5f62fd07 100644 --- a/lotuswordpro/source/filter/lwplayout.hxx +++ b/lotuswordpro/source/filter/lwplayout.hxx @@ -226,7 +226,6 @@ protected: bool m_bGettingIsProtected; bool m_bGettingMarginsValue; bool m_bGettingExtMarginsValue; - bool m_bGettingUsePrinterSettings; sal_uInt32 m_nAttributes; sal_uInt32 m_nAttributes2; sal_uInt32 m_nAttributes3; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits