From 922e4ba2994c914a8b393723fbee28529abd8a6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolnai=20Tam=C3=A1s?= Date: Wed, 11 Sep 2013 16:45:41 +0200 Subject: [PATCH] Use the shorter GetScaledWidth() method Change-Id: Id3ad483d3830310b8d13c86e407ff88d9a709464 --- editeng/source/items/borderline.cxx | 4 ++-- editeng/source/items/frmitems.cxx | 2 +- sc/source/core/data/attrib.cxx | 4 ++-- sc/source/ui/view/printfun.cxx | 2 +- svx/source/table/tablelayouter.cxx | 4 ++-- sw/source/filter/xml/xmlithlp.cxx | 3 +-- 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx index 6a61aadef48f..e80685e33ae7 100644 --- a/editeng/source/items/borderline.cxx +++ b/editeng/source/items/borderline.cxx @@ -661,8 +661,8 @@ OUString SvxBorderLine::GetValueString( SfxMapUnit eSrcUnit, bool SvxBorderLine::HasPriority( const SvxBorderLine& rOtherLine ) const { - const sal_uInt16 nThisSize = GetOutWidth() + GetDistance() + GetInWidth(); - const sal_uInt16 nOtherSize = rOtherLine.GetOutWidth() + rOtherLine.GetDistance() + rOtherLine.GetInWidth(); + const sal_uInt16 nThisSize = GetScaledWidth(); + const sal_uInt16 nOtherSize = rOtherLine.GetScaledWidth(); if ( nThisSize > nOtherSize ) { diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 0c5917d81d37..0d194b19d7f6 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -2461,7 +2461,7 @@ sal_uInt16 SvxBoxItem::CalcLineSpace( sal_uInt16 nLine, sal_Bool bIgnoreLine ) c if( pTmp ) { - nDist = nDist + (sal_uInt16)(pTmp->GetOutWidth()) + (sal_uInt16)(pTmp->GetInWidth()) + (sal_uInt16)(pTmp->GetDistance()); + nDist = nDist + pTmp->GetScaledWidth(); } else if( !bIgnoreLine ) nDist = 0; diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx index ce572b930369..2ec52ec9fc01 100644 --- a/sc/source/core/data/attrib.cxx +++ b/sc/source/core/data/attrib.cxx @@ -67,8 +67,8 @@ bool ScHasPriority( const ::editeng::SvxBorderLine* pThis, const ::editeng::SvxB if (!pOther) return true; - sal_uInt16 nThisSize = pThis->GetOutWidth() + pThis->GetDistance() + pThis->GetInWidth(); - sal_uInt16 nOtherSize = pOther->GetOutWidth() + pOther->GetDistance() + pOther->GetInWidth(); + sal_uInt16 nThisSize = pThis->GetScaledWidth(); + sal_uInt16 nOtherSize = pOther->GetScaledWidth(); if (nThisSize > nOtherSize) return true; diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index 0a7cb3289b73..388f08d7dcdc 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -165,7 +165,7 @@ size_t ScPageRowEntry::CountVisible() const static long lcl_LineTotal(const ::editeng::SvxBorderLine* pLine) { - return pLine ? ( pLine->GetOutWidth() + pLine->GetInWidth() + pLine->GetDistance() ) : 0; + return pLine ? ( pLine->GetScaledWidth() ) : 0; } void ScPrintFunc::Construct( const ScPrintOptions* pOptions ) diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx index 9ccbdfa8a49c..55ed2d2247a8 100644 --- a/svx/source/table/tablelayouter.cxx +++ b/svx/source/table/tablelayouter.cxx @@ -901,8 +901,8 @@ bool TableLayouter::HasPriority( const SvxBorderLine* pThis, const SvxBorderLine if (!pOther || (pOther == &gEmptyBorder)) return true; - sal_uInt16 nThisSize = pThis->GetOutWidth() + pThis->GetDistance() + pThis->GetInWidth(); - sal_uInt16 nOtherSize = pOther->GetOutWidth() + pOther->GetDistance() + pOther->GetInWidth(); + sal_uInt16 nThisSize = pThis->GetScaledWidth(); + sal_uInt16 nOtherSize = pOther->GetScaledWidth(); if (nThisSize > nOtherSize) return true; diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx index 10627afe22e8..259d2fe02b34 100644 --- a/sw/source/filter/xml/xmlithlp.cxx +++ b/sw/source/filter/xml/xmlithlp.cxx @@ -204,8 +204,7 @@ bool sw_frmitems_setXMLBorder( SvxBorderLine*& rpLine, else { if (!bHasWidth) - nWidth = rpLine->GetInWidth() + rpLine->GetDistance() + - rpLine->GetOutWidth(); + nWidth = rpLine->GetScaledWidth(); rpLine->SetWidth( nWidth ); }