Kaydet (Commit) 1d8cb97f authored tarafından Thorsten Behrens's avatar Thorsten Behrens

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 d38674f3.
üst 3809655e
......@@ -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
......
......@@ -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;
......
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