diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-06-10 22:40:41 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-06-10 22:40:41 +0200 |
commit | f222de1de0f4be3ee01162aa3c62ca928dc8476f (patch) | |
tree | d8b28cbd2377fc444dd7db6ee5ad8c42c5c51422 /editeng | |
parent | 17282387d650e843e0f5a28611d91597ccd09970 (diff) |
Remove unnecessary Bool2Any
(It feels better to use explicitly bool-typed css::uno::makeAny<bool>(x) rather
than implicitly typed css::uno::makeAny(x) or css::uno::Any(x), in case x is not
already of type bool.)
Change-Id: I282b3764bb207aeae9f13cc981e68e8ef2b8ab93
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/frmitems.cxx | 6 | ||||
-rw-r--r-- | editeng/source/items/paraitem.cxx | 2 | ||||
-rw-r--r-- | editeng/source/items/textitem.cxx | 18 |
3 files changed, 13 insertions, 13 deletions
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index d872838d7250..357eb8b6e91f 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -468,7 +468,7 @@ bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const break; case MID_FIRST_AUTO: - rVal = Bool2Any(IsAutoFirst()); + rVal = css::uno::makeAny<bool>(IsAutoFirst()); break; default: @@ -1206,7 +1206,7 @@ bool SvxProtectItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const return false; } - rVal = Bool2Any( bValue ); + rVal = css::uno::makeAny<bool>( bValue ); return true; } @@ -3600,7 +3600,7 @@ bool SvxBrushItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const break; case MID_GRAPHIC_TRANSPARENT: - rVal = Bool2Any( aColor.GetTransparency() == 0xff ); + rVal = css::uno::makeAny<bool>( aColor.GetTransparency() == 0xff ); break; case MID_GRAPHIC_URL: diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index 452704b0d9ff..c1402d9b6b38 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -655,7 +655,7 @@ bool SvxHyphenZoneItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) con switch(nMemberId) { case MID_IS_HYPHEN: - rVal = Bool2Any(bHyphen); + rVal = css::uno::makeAny<bool>(bHyphen); break; case MID_HYPHEN_MIN_LEAD: rVal <<= (sal_Int16)nMinLead; diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 0c9fbadc78d4..69d4d38705c3 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -547,7 +547,7 @@ bool SvxPostureItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const switch( nMemberId ) { case MID_ITALIC: - rVal = Bool2Any(GetBoolValue()); + rVal = css::uno::makeAny<bool>(GetBoolValue()); break; case MID_POSTURE: rVal <<= (awt::FontSlant)GetValue(); // values from awt::FontSlant and FontItalic are equal @@ -699,7 +699,7 @@ bool SvxWeightItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const switch( nMemberId ) { case MID_BOLD : - rVal = Bool2Any(GetBoolValue()); + rVal = css::uno::makeAny<bool>(GetBoolValue()); break; case MID_WEIGHT: { @@ -1349,7 +1349,7 @@ bool SvxTextLineItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const switch(nMemberId) { case MID_TEXTLINED: - rVal = Bool2Any(GetBoolValue()); + rVal = css::uno::makeAny<bool>(GetBoolValue()); break; case MID_TL_STYLE: rVal <<= (sal_Int16)(GetValue()); @@ -1358,7 +1358,7 @@ bool SvxTextLineItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const rVal <<= (sal_Int32)( mColor.GetColor() ); break; case MID_TL_HASCOLOR: - rVal = Bool2Any( !mColor.GetTransparency() ); + rVal = css::uno::makeAny<bool>( !mColor.GetTransparency() ); break; } return true; @@ -1565,7 +1565,7 @@ bool SvxCrossedOutItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const switch(nMemberId) { case MID_CROSSED_OUT: - rVal = Bool2Any(GetBoolValue()); + rVal = css::uno::makeAny<bool>(GetBoolValue()); break; case MID_CROSS_OUT: rVal <<= (sal_Int16)(GetValue()); @@ -1880,7 +1880,7 @@ bool SvxBackgroundColorItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) c { case MID_GRAPHIC_TRANSPARENT: { - rVal <<= Bool2Any (aColor.GetTransparency() == 0xff); + rVal <<= css::uno::makeAny<bool>(aColor.GetTransparency() == 0xff); break; } default: @@ -2445,7 +2445,7 @@ bool SvxEscapementItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const rVal <<= (sal_Int8)(nProp); break; case MID_AUTO_ESC: - rVal = Bool2Any(DFLT_ESC_AUTO_SUB == nEsc || DFLT_ESC_AUTO_SUPER == nEsc); + rVal = css::uno::makeAny<bool>(DFLT_ESC_AUTO_SUB == nEsc || DFLT_ESC_AUTO_SUPER == nEsc); break; } return true; @@ -2946,7 +2946,7 @@ bool SvxTwoLinesItem::QueryValue( com::sun::star::uno::Any& rVal, switch( nMemberId ) { case MID_TWOLINES: - rVal = Bool2Any( bOn ); + rVal = css::uno::makeAny<bool>( bOn ); break; case MID_START_BRACKET: { @@ -3109,7 +3109,7 @@ bool SvxCharRotateItem::QueryValue( com::sun::star::uno::Any& rVal, rVal <<= (sal_Int16)GetValue(); break; case MID_FITTOLINE: - rVal = Bool2Any( IsFitToLine() ); + rVal = css::uno::makeAny<bool>( IsFitToLine() ); break; default: bRet = false; |