diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-07 08:42:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-07 08:35:04 +0100 |
commit | a498b12dc1723b072a165f8c528c377024fd4c98 (patch) | |
tree | c52b7d01cd95176d345b4ad0bf417edc4c499d26 /extensions | |
parent | 073b4eadd2a9a00b915c664df90b15d5b2d709c0 (diff) |
use more Color in editeng..forms
Change-Id: If6c862e7bb61cd78c3379afde11b528a74162900
Reviewed-on: https://gerrit.libreoffice.org/50860
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/propctrlr/fontdialog.cxx | 10 | ||||
-rw-r--r-- | extensions/source/propctrlr/formcomponenthandler.cxx | 9 | ||||
-rw-r--r-- | extensions/source/propctrlr/standardcontrol.cxx | 4 |
3 files changed, 10 insertions, 13 deletions
diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index 025389b345c2..8640edb213f7 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -241,7 +241,7 @@ namespace pcr SvxUnderlineItem aUnderlineItem(eUnderline,CFID_UNDERLINE); aUnderlineItem.SetColor(Color(nTextLineColor)); - SvxColorItem aSvxColorItem(nColor32,CFID_CHARCOLOR); + SvxColorItem aSvxColorItem(Color(nColor32),CFID_CHARCOLOR); SvxLanguageItem aLanguageItem(Application::GetSettings().GetUILanguageTag().getLanguageType(), CFID_LANGUAGE); // the 2 CJK props @@ -372,10 +372,10 @@ namespace pcr lcl_pushBackPropertyValue( _out_properties, PROPERTY_FONT_UNDERLINE,makeAny(nUnderline)); // the text line color is transported in this item, too - sal_Int32 nColor = rUnderlineItem.GetColor().GetColor(); + Color nColor = rUnderlineItem.GetColor(); Any aUnoColor; - if (COL_AUTO != static_cast<sal_uInt32>(nColor)) + if (COL_AUTO != nColor) aUnoColor <<= nColor; lcl_pushBackPropertyValue( _out_properties, PROPERTY_TEXTLINECOLOR, aUnoColor ); @@ -415,10 +415,10 @@ namespace pcr const SvxColorItem& rColorItem = static_cast<const SvxColorItem&>(_rSet.Get(CFID_CHARCOLOR)); - sal_Int32 nColor = rColorItem.GetValue().GetColor(); + Color nColor = rColorItem.GetValue(); Any aUnoColor; - if (COL_AUTO != static_cast<sal_uInt32>(nColor)) + if (COL_AUTO != nColor) aUnoColor <<= nColor; lcl_pushBackPropertyValue( _out_properties, PROPERTY_TEXTCOLOR, aUnoColor ); diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 40fce9868229..a24eb5cf1868 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -2847,9 +2847,8 @@ namespace pcr bool FormComponentPropertyHandler::impl_dialogColorChooser_throw( sal_Int32 _nColorPropertyId, Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const { - sal_Int32 nColor = 0; - OSL_VERIFY( impl_getPropertyValue_throw( impl_getPropertyNameFromId_nothrow( _nColorPropertyId ) ) >>= nColor ); - ::Color aColor( nColor ); + ::Color aColor; + OSL_VERIFY( impl_getPropertyValue_throw( impl_getPropertyNameFromId_nothrow( _nColorPropertyId ) ) >>= aColor ); SvColorDialog aColorDlg( impl_getDefaultDialogParent_nothrow() ); aColorDlg.SetColor( aColor ); @@ -2857,9 +2856,7 @@ namespace pcr if ( !aColorDlg.Execute() ) return false; - aColor = aColorDlg.GetColor(); - nColor = aColor.GetColor(); - _out_rNewValue <<= nColor; + _out_rNewValue <<= aColorDlg.GetColor(); return true; } diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index 2fdaf166fd27..4bd7c2055d47 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -657,7 +657,7 @@ namespace pcr css::util::Color nColor = sal_uInt32(COL_TRANSPARENT); if (_rValue.hasValue()) _rValue >>= nColor; - getTypedControlWindow()->SelectEntry(::Color(sal_uInt32(nColor))); + getTypedControlWindow()->SelectEntry(nColor); } Any SAL_CALL OColorControl::getValue() @@ -666,7 +666,7 @@ namespace pcr ::Color aRgbCol = getTypedControlWindow()->GetSelectEntryColor(); if (aRgbCol == COL_TRANSPARENT) return aPropValue; - aPropValue <<= static_cast<css::util::Color>(aRgbCol.GetColor()); + aPropValue <<= aRgbCol; return aPropValue; } |