sw/source/core/layout/flowfrm.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit a30ce480fa6044b1545145559cd23df140307bd0 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Aug 7 13:30:44 2014 +0200 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 diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index a13ddbc..6874092 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits