include/svtools/extcolorcfg.hxx | 15 ++++++------- reportdesign/source/ui/inc/ColorListener.hxx | 2 - reportdesign/source/ui/inc/FormattedFieldBeautifier.hxx | 5 ++-- reportdesign/source/ui/inc/dlgedfunc.hxx | 6 ++--- reportdesign/source/ui/report/FormattedFieldBeautifier.cxx | 6 ++--- reportdesign/source/ui/report/ReportSection.cxx | 5 +--- reportdesign/source/ui/report/dlgedfunc.cxx | 6 ++--- 7 files changed, 23 insertions(+), 22 deletions(-)
New commits: commit 9bb9589d7ada8339ee0c1212df277fa8f035e402 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Thu Mar 1 15:49:22 2018 +0200 use more Color in ExtendedColorConfigValue and reportdesign Change-Id: I710407ccdd373ba686914e1d049bd8c2bcdcd1e3 Reviewed-on: https://gerrit.libreoffice.org/50576 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/svtools/extcolorcfg.hxx b/include/svtools/extcolorcfg.hxx index 52eeeb254326..17e885661371 100644 --- a/include/svtools/extcolorcfg.hxx +++ b/include/svtools/extcolorcfg.hxx @@ -23,6 +23,7 @@ #include <rtl/ustring.hxx> #include <svl/SfxBroadcaster.hxx> #include <svl/lstner.hxx> +#include <tools/color.hxx> #include <memory> @@ -34,14 +35,14 @@ class ExtendedColorConfigValue { OUString m_sName; OUString m_sDisplayName; - sal_Int32 m_nColor; - sal_Int32 m_nDefaultColor; + Color m_nColor; + Color m_nDefaultColor; public: ExtendedColorConfigValue() : m_nColor(0),m_nDefaultColor(0){} ExtendedColorConfigValue(const OUString& _sName ,const OUString& _sDisplayName - ,sal_Int32 _nColor - ,sal_Int32 _nDefaultColor) + ,Color _nColor + ,Color _nDefaultColor) : m_sName(_sName) ,m_sDisplayName(_sDisplayName) ,m_nColor(_nColor) @@ -50,10 +51,10 @@ public: const OUString& getName() const { return m_sName; } const OUString& getDisplayName() const { return m_sDisplayName; } - sal_Int32 getColor() const { return m_nColor; } - sal_Int32 getDefaultColor() const { return m_nDefaultColor; } + Color getColor() const { return m_nColor; } + Color getDefaultColor() const { return m_nDefaultColor; } - void setColor(sal_Int32 _nColor) { m_nColor = _nColor; } + void setColor(Color _nColor) { m_nColor = _nColor; } }; class SVT_DLLPUBLIC ExtendedColorConfig : public SfxBroadcaster, public SfxListener diff --git a/reportdesign/source/ui/inc/ColorListener.hxx b/reportdesign/source/ui/inc/ColorListener.hxx index 449717760742..0f8a89acad9e 100644 --- a/reportdesign/source/ui/inc/ColorListener.hxx +++ b/reportdesign/source/ui/inc/ColorListener.hxx @@ -35,7 +35,7 @@ namespace rptui svtools::ColorConfig m_aColorConfig; svtools::ExtendedColorConfig m_aExtendedColorConfig; OUString m_sColorEntry; - sal_Int32 m_nColor; + Color m_nColor; Color m_nTextBoundaries; bool m_bCollapsed; bool m_bMarked; diff --git a/reportdesign/source/ui/inc/FormattedFieldBeautifier.hxx b/reportdesign/source/ui/inc/FormattedFieldBeautifier.hxx index da70fc782d06..7a31cff99501 100644 --- a/reportdesign/source/ui/inc/FormattedFieldBeautifier.hxx +++ b/reportdesign/source/ui/inc/FormattedFieldBeautifier.hxx @@ -24,6 +24,7 @@ #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/awt/XVclWindowPeer.hpp> #include <com/sun/star/report/XReportComponent.hpp> +#include <tools/color.hxx> #include <vector> #include "IReportControllerObserver.hxx" @@ -35,7 +36,7 @@ namespace rptui class FormattedFieldBeautifier : public IReportControllerObserver { const OReportController& m_rReportController; - sal_Int32 m_nTextColor; + Color m_nTextColor; /// @throws css::uno::RuntimeException css::uno::Reference< css::awt::XVclWindowPeer > getVclWindowPeer(const css::uno::Reference< css::report::XReportComponent >& _xComponent); @@ -43,7 +44,7 @@ namespace rptui void setPlaceholderText( const css::uno::Reference< css::uno::XInterface >& _rxComponent ); void setPlaceholderText( const css::uno::Reference< css::awt::XVclWindowPeer >& _xVclWindowPeer, const OUString& _rText ); - sal_Int32 getTextColor(); + Color getTextColor(); public: FormattedFieldBeautifier(const OReportController & _aObserver); diff --git a/reportdesign/source/ui/inc/dlgedfunc.hxx b/reportdesign/source/ui/inc/dlgedfunc.hxx index ae293654bb08..4350ed4bff77 100644 --- a/reportdesign/source/ui/inc/dlgedfunc.hxx +++ b/reportdesign/source/ui/inc/dlgedfunc.hxx @@ -47,8 +47,8 @@ protected: Point m_aMDPos; css::uno::Reference<css::uno::XInterface> m_xOverlappingObj; SdrObject * m_pOverlappingObj; - sal_Int32 m_nOverlappedControlColor; - sal_Int32 m_nOldColor; + Color m_nOverlappedControlColor; + Color m_nOldColor; bool m_bSelectionMode; bool m_bUiActive; bool m_bShowPropertyBrowser; @@ -101,7 +101,7 @@ public: * \return <TRUE/> if overlapping, otherwise <FALSE/> */ bool isOverlapping(const MouseEvent& rMEvt); - void setOverlappedControlColor(sal_Int32 _nColor); + void setOverlappedControlColor(Color _nColor); void stopScrollTimer(); /** deactivate all ole object diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx index db79387e4701..3d92f69ccdac 100644 --- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx +++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx @@ -48,14 +48,14 @@ namespace rptui FormattedFieldBeautifier::FormattedFieldBeautifier(const OReportController& _aController) :m_rReportController(_aController) - ,m_nTextColor(-1) + ,m_nTextColor(0xffffffff) { } - sal_Int32 FormattedFieldBeautifier::getTextColor() + Color FormattedFieldBeautifier::getTextColor() { - if (m_nTextColor == -1) + if (m_nTextColor == Color(0xffffffff)) { svtools::ExtendedColorConfig aConfig; m_nTextColor = aConfig.GetColorValue(CFG_REPORTDESIGNER, DBTEXTBOXBOUNDCONTENT).getColor(); diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index de5a0e726aca..5b9765fb793b 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -70,11 +70,10 @@ namespace rptui using namespace ::com::sun::star; -sal_Int32 lcl_getOverlappedControlColor(/*const uno::Reference <lang::XMultiServiceFactory> _rxFactory*/) +Color lcl_getOverlappedControlColor(/*const uno::Reference <lang::XMultiServiceFactory> _rxFactory*/) { svtools::ExtendedColorConfig aConfig; - sal_Int32 nColor = aConfig.GetColorValue(CFG_REPORTDESIGNER, DBOVERLAPPEDCONTROL).getColor(); - return nColor; + return aConfig.GetColorValue(CFG_REPORTDESIGNER, DBOVERLAPPEDCONTROL).getColor(); } OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< report::XSection >& _xSection) diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index 04fb810066d6..3248f749ab90 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -126,14 +126,14 @@ DlgEdFunc::DlgEdFunc( OReportSection* _pParent ) aScrollTimer.SetTimeout( SELENG_AUTOREPEAT_INTERVAL ); } -void DlgEdFunc::setOverlappedControlColor(sal_Int32 _nColor) +void DlgEdFunc::setOverlappedControlColor(Color _nColor) { m_nOverlappedControlColor = _nColor; } -sal_Int32 lcl_setColorOfObject(const uno::Reference< uno::XInterface >& _xObj, long _nColorTRGB) +Color lcl_setColorOfObject(const uno::Reference< uno::XInterface >& _xObj, Color _nColorTRGB) { - sal_Int32 nBackColor = 0; + Color nBackColor; try { uno::Reference<report::XReportComponent> xComponent(_xObj, uno::UNO_QUERY_THROW); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits