summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-08-07 13:30:44 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-08-07 13:37:12 +0200
commita30ce480fa6044b1545145559cd23df140307bd0 (patch)
treee8c335164ffd0fc22c159fc0df7e6298f832cd5a /sw
parent91bfacea9058b0a00feb58879c14666d31089c21 (diff)
These SwTxtFrm calls shall apparently be done via pOwn, not m_rThis
...given the initialization of pOwn based on m_rThis at the start of CalcUpperSpace and the pOwn->IsTxtFrm() checks preceeding these casts. At least CppunitTest_sw_odfimport via SwFlowFrm::CalcUpperSpace SwSectionFrm::Format SwLayoutFrm::MakeAll SwSectionFrm::MakeAll SwFrm::PrepareMake SwFrm::Calc SwLayAction::FormatLayout SwLayAction::FormatLayout SwLayAction::FormatLayout SwLayAction::InternalAction SwLayAction::Action SwViewShell::ImplEndAction SwViewShell::EndAction SwCrsrShell::EndAction SwView::OuterResizePixel SfxViewFrame::DoAdjustPosSizePixel SfxViewFrame::Resize SfxFrameViewWindow_Impl::Resize Window::ImplCallResize Window::Show SfxBaseController::ConnectSfxFrame_Impl SfxBaseController::attachFrame (anonymous namespace)::SfxFrameLoader_Impl::impl (anonymous namespace)::SfxFrameLoader_Impl::load framework::LoadEnv::impl_loadContent framework::LoadEnv::startLoading framework::LoadEnv::loadComponentFromURL unotest::MacrosTest::loadFromDesktop SwModelTestBase::load SwModelTestBase::executeImportTest testFdo55814::Import leads to calls where m_rThis is not a SwTxtFrm. As this mixed usage of m_rThis and pOwn is in there since 84a3db80b4fd66c6854b3135b5f69b61fd828e62 "initial import" it is hard to tell whether further uses of m_rThis should be replace with uses of pOwn, too. Change-Id: I6a59aa3aec2d28b8aec13cd4b9528fdbe4ab093a
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/flowfrm.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index a13ddbcaf84e..687409235738 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -1382,7 +1382,7 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
// former consideration
if ( pOwn->IsTxtFrm() )
{
- nAdd = std::max( nAdd, static_cast<SwTxtFrm&>(m_rThis).GetLineSpace() );
+ nAdd = std::max( nAdd, static_cast<SwTxtFrm*>(pOwn)->GetLineSpace() );
}
nUpper += nAdd;
}
@@ -1404,11 +1404,11 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
// spacing is built.
if ( bPrevLineSpacingPorportional )
{
- nAdd += static_cast<SwTxtFrm&>(m_rThis).GetLineSpace( true );
+ nAdd += static_cast<SwTxtFrm*>(pOwn)->GetLineSpace( true );
}
else
{
- nAdd = std::max( nAdd, static_cast<SwTxtFrm&>(m_rThis).GetLineSpace( true ) );
+ nAdd = std::max( nAdd, static_cast<SwTxtFrm*>(pOwn)->GetLineSpace( true ) );
}
}
nUpper += nAdd;
@@ -1450,11 +1450,11 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
// spacing is built.
if ( bPrevLineSpacingPorportional )
{
- nAdd += static_cast<SwTxtFrm&>(m_rThis).GetLineSpace( true );
+ nAdd += static_cast<SwTxtFrm*>(pOwn)->GetLineSpace( true );
}
else
{
- nAdd = std::max( nAdd, static_cast<SwTxtFrm&>(m_rThis).GetLineSpace( true ) );
+ nAdd = std::max( nAdd, static_cast<SwTxtFrm*>(pOwn)->GetLineSpace( true ) );
}
}
nUpper += nAdd;