diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-27 17:12:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-28 12:47:31 +0100 |
commit | efe22f3fa2375c233b86d9a4556e2cd7eed85f9d (patch) | |
tree | 6c8283a52080c266f54ea416befd31d3f7456893 /reportdesign | |
parent | 398d10a506f9f1c4109d012f22f0e85ee571fe9f (diff) |
drop old tools/gen methods in reportdesign..xmloff
Change-Id: I398831c526ba51d861557fa6c13c0e2fb44dfbe0
Reviewed-on: https://gerrit.libreoffice.org/50447
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/ui/report/SectionWindow.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ViewsWindow.cxx | 22 | ||||
-rw-r--r-- | reportdesign/source/ui/report/dlgedfunc.cxx | 4 |
3 files changed, 16 insertions, 12 deletions
diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index 0e98b03e0ae3..015775bd9e40 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -232,7 +232,7 @@ void OSectionWindow::Resize() const Point aThumbPos = m_pParent->getView()->getThumbPos(); aOutputSize.AdjustWidth( -(aThumbPos.X()) ); - aOutputSize.Height() -= m_aSplitter->GetSizePixel().Height(); + aOutputSize.AdjustHeight( -m_aSplitter->GetSizePixel().Height() ); if ( m_aStartMarker->isCollapsed() ) { diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 224977bc80de..5e48c8c209f3 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -770,8 +770,9 @@ void OViewsWindow::alignMarkedObjects(ControlModification _nControlModification, bool bMove = true; - ::std::function<long&(tools::Rectangle *)> aGetFun = ::std::mem_fn(static_cast<long&(tools::Rectangle:: *)()>(&tools::Rectangle::Bottom)); - ::std::function<long&(tools::Rectangle *)> aRefFun = ::std::mem_fn(static_cast<long&(tools::Rectangle:: *)()>(&tools::Rectangle::Top)); + auto aGetFun = ::std::mem_fn(static_cast<long(tools::Rectangle:: *)() const>(&tools::Rectangle::Bottom)); + auto aSetFun = ::std::mem_fn(&tools::Rectangle::SetBottom); + auto aRefFun = ::std::mem_fn(static_cast<long(tools::Rectangle:: *)() const>(&tools::Rectangle::Top)); TRectangleMap::const_iterator aRectIter = aSortRectangles.begin(); TRectangleMap::const_iterator aRectEnd = aSortRectangles.end(); for (;aRectIter != aRectEnd ; ++aRectIter) @@ -790,8 +791,9 @@ void OViewsWindow::alignMarkedObjects(ControlModification _nControlModification, switch(_nControlModification) { case ControlModification::TOP : - aGetFun = ::std::mem_fn(static_cast<long&(tools::Rectangle:: *)()>(&tools::Rectangle::Top)); - aRefFun = ::std::mem_fn(static_cast<long&(tools::Rectangle:: *)()>(&tools::Rectangle::Bottom)); + aGetFun = ::std::mem_fn(static_cast<long(tools::Rectangle:: *)() const>(&tools::Rectangle::Top)); + aSetFun = ::std::mem_fn(&tools::Rectangle::SetTop); + aRefFun = ::std::mem_fn(static_cast<long(tools::Rectangle:: *)() const>(&tools::Rectangle::Bottom)); pValue = &nYMov; break; case ControlModification::BOTTOM: @@ -804,16 +806,18 @@ void OViewsWindow::alignMarkedObjects(ControlModification _nControlModification, bMove = false; break; case ControlModification::RIGHT : - aGetFun = ::std::mem_fn(static_cast<long&(tools::Rectangle:: *)()>(&tools::Rectangle::Right)); - aRefFun = ::std::mem_fn(static_cast<long&(tools::Rectangle:: *)()>(&tools::Rectangle::Left)); + aGetFun = ::std::mem_fn(static_cast<long(tools::Rectangle:: *)() const>(&tools::Rectangle::Right)); + aSetFun = ::std::mem_fn(&tools::Rectangle::SetRight); + aRefFun = ::std::mem_fn(static_cast<long(tools::Rectangle:: *)() const>(&tools::Rectangle::Left)); break; case ControlModification::CENTER_HORIZONTAL: nXMov = aCenter.X() - aObjRect.Center().X(); bMove = false; break; case ControlModification::LEFT : - aGetFun = ::std::mem_fn(static_cast<long&(tools::Rectangle:: *)()>(&tools::Rectangle::Left)); - aRefFun = ::std::mem_fn(static_cast<long&(tools::Rectangle:: *)()>(&tools::Rectangle::Right)); + aGetFun = ::std::mem_fn(static_cast<long(tools::Rectangle:: *)() const>(&tools::Rectangle::Left)); + aSetFun = ::std::mem_fn(&tools::Rectangle::SetLeft); + aRefFun = ::std::mem_fn(static_cast<long(tools::Rectangle:: *)() const>(&tools::Rectangle::Right)); break; default: bMove = false; @@ -822,7 +826,7 @@ void OViewsWindow::alignMarkedObjects(ControlModification _nControlModification, if ( bMove ) { tools::Rectangle aTest = aObjRect; - aGetFun(&aTest) = aGetFun(&aBound); + aSetFun(&aTest, aGetFun(&aBound)); TRectangleMap::const_iterator aInterSectRectIter = aSortRectangles.begin(); for (; aInterSectRectIter != aRectIter; ++aInterSectRectIter) { diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index 4ce3b25da416..04fb810066d6 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -78,11 +78,11 @@ void DlgEdFunc::ForceScroll( const Point& rPos ) aStartWidth *= m_pParent->GetMapMode().GetScaleX(); aOut.AdjustWidth( -static_cast<long>(aStartWidth) ); - aOut.Height() = m_pParent->GetOutputSizePixel().Height(); + aOut.setHeight( m_pParent->GetOutputSizePixel().Height() ); Point aPos = pScrollWindow->getThumbPos(); aPos.setX( aPos.X() * 0.5 ); - aPos.Y() *= 0.5; + aPos.setY( aPos.Y() * 0.5 ); tools::Rectangle aOutRect( aPos, aOut ); aOutRect = m_pParent->PixelToLogic( aOutRect ); tools::Rectangle aWorkArea(Point(), pScrollWindow->getTotalSize()); |