diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-26 13:28:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-27 10:24:59 +0100 |
commit | 68e6706fb931ed2f53c08bc9c0a02cbb559c8c53 (patch) | |
tree | d24225c6da5eda1cf7070f419deb3d2f6f94c36a /sw/source/uibase | |
parent | be5af6cefea2fa43479ec6124e2c847956144a6d (diff) |
drop old tools/gen.hxx methods in sw
Change-Id: I1db8954b86e9b2ec27ecc1f65e8ff7715612d756
Reviewed-on: https://gerrit.libreoffice.org/50363
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/config/viewopt.cxx | 11 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewport.cxx | 9 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewtab.cxx | 10 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh1.cxx | 3 |
4 files changed, 22 insertions, 11 deletions
diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx index d291dc76ce50..90eb12c95c95 100644 --- a/sw/source/uibase/config/viewopt.cxx +++ b/sw/source/uibase/config/viewopt.cxx @@ -195,9 +195,16 @@ SwViewOption::SwViewOption() : ViewOptFlags2::AnyRuler; if (!utl::ConfigManager::IsFuzzing() && MeasurementSystem::Metric != SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()) - m_aSnapSize.Width() = m_aSnapSize.Height() = 720; // 1/2" + { + m_aSnapSize.setWidth(720); // 1/2" + m_aSnapSize.setHeight(720); // 1/2" + + } else - m_aSnapSize.Width() = m_aSnapSize.Height() = 567; // 1 cm + { + m_aSnapSize.setWidth(567); // 1 cm + m_aSnapSize.setHeight(567); // 1 cm + } m_nDivisionX = m_nDivisionY = 1; m_bSelectionInReadonly = !utl::ConfigManager::IsFuzzing() && SW_MOD()->GetAccessibilityOptions().IsSelectionInReadonly(); diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index c1ce4ffe4d1a..dba6610de692 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -101,12 +101,9 @@ static void lcl_GetPos(SwView const * pView, if ( !bHori && nTmp > lSize ) lDelta -= nTmp - lSize; - // use a reference to access/modify the correct coordinate - // returned by accessors to non-const object - long & rCoord = bHori ? rPos.X() : rPos.Y(); - rCoord += lDelta; - if ( bBorder && rCoord < DOCUMENTBORDER ) - rCoord = DOCUMENTBORDER; + bHori ? rPos.AdjustX(lDelta) : rPos.AdjustY(lDelta); + if ( bBorder && (bHori ? rPos.X() : rPos.Y()) < DOCUMENTBORDER ) + bHori ? rPos.setX(DOCUMENTBORDER) : rPos.setY(DOCUMENTBORDER); } // Set zero ruler diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx index 4fad05c26eda..4dab2bb0a4bf 100644 --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -2067,7 +2067,10 @@ void SwView::StateTabWin(SfxItemSet& rSet) aRectangle.AdjustLeft(aRect.Left() ); } if(pFormat) // Range in frame - here you may up to the edge - aRectangle.Left() = aRectangle.Right() = 0; + { + aRectangle.SetLeft(0); + aRectangle.SetRight(0); + } else { // Move the rectangle to the correct absolute position. @@ -2210,7 +2213,10 @@ void SwView::StateTabWin(SfxItemSet& rSet) aRectangle.SetRight( aPageLRSpace.GetRight() ); } else - aRectangle.Left() = aRectangle.Right() = 0; + { + aRectangle.SetLeft(0); + aRectangle.SetRight(0); + } SfxRectangleItem aLR( SID_RULER_LR_MIN_MAX , aRectangle); rSet.Put(aLR); diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 697adae10c90..1bb5fedd7588 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -282,7 +282,8 @@ void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter, Size aSz( pFrameMgr->GetSize() ); if ( !aSz.Width() || !aSz.Height() ) { - aSz.Width() = aSz.Height() = 567; + aSz.setWidth(567); + aSz.setHeight( 567); pFrameMgr->SetSize( aSz ); } else if ( aSz.Width() != DFLT_WIDTH && aSz.Height() != DFLT_HEIGHT ) |