diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-07-10 09:41:23 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-07-10 09:41:45 +0200 |
commit | 9487b7130609c85ccd9c6ece331bb31e3be68a51 (patch) | |
tree | dc7ef0b4629cd072e46e8fbf858d01cc2f3e5f6e /editeng | |
parent | 728f10576807970b3356eb0d5ad01722bdddd977 (diff) |
SvxBrushItem::TransparencyToPercent: add this to avoid copypaste
Change-Id: I9b77c0a48b7de39eadae118c24c70ac415898293
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/frmitems.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 8dedafd3a2a8..987c888be328 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -3567,7 +3567,7 @@ static inline sal_Int8 lcl_PercentToTransparency(long nPercent) //0xff must not be returned! return sal_Int8(nPercent ? (50 + 0xfe * nPercent) / 100 : 0); } -static inline sal_Int8 lcl_TransparencyToPercent(sal_Int32 nTrans) +sal_Int8 SvxBrushItem::TransparencyToPercent(sal_Int32 nTrans) { return (sal_Int8)((nTrans * 100 + 127) / 254); } @@ -3584,7 +3584,7 @@ bool SvxBrushItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const rVal <<= (sal_Int32)( aColor.GetRGBColor() ); break; case MID_BACK_COLOR_TRANSPARENCY: - rVal <<= lcl_TransparencyToPercent(aColor.GetTransparency()); + rVal <<= SvxBrushItem::TransparencyToPercent(aColor.GetTransparency()); break; case MID_GRAPHIC_POSITION: rVal <<= (style::GraphicLocation)(sal_Int16)eGraphicPos; |