diff options
author | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-12-07 01:24:21 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-12-07 01:25:32 +0100 |
commit | 1d8cb97fea57b81a1ab151b88c2180e646bd401b (patch) | |
tree | caac0465bab454865c37fc22b7bc3e8ba1669156 /lotuswordpro | |
parent | 3809655e6d554dbc6c74b11597c540c4a62d4c09 (diff) |
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.
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwplayout.cxx | 15 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwplayout.hxx | 1 |
2 files changed, 3 insertions, 13 deletions
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; |