summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-07 08:42:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-07 08:35:04 +0100
commita498b12dc1723b072a165f8c528c377024fd4c98 (patch)
treec52b7d01cd95176d345b4ad0bf417edc4c499d26 /forms
parent073b4eadd2a9a00b915c664df90b15d5b2d709c0 (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 'forms')
-rw-r--r--forms/source/component/Grid.cxx4
-rw-r--r--forms/source/component/formcontrolfont.cxx8
-rw-r--r--forms/source/component/navigationbar.cxx8
-rw-r--r--forms/source/inc/formcontrolfont.hxx9
-rw-r--r--forms/source/richtext/richtextcontrol.cxx4
-rw-r--r--forms/source/solar/component/navbarcontrol.cxx6
6 files changed, 20 insertions, 19 deletions
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index db2a5b11dba8..41aef4c83fe6 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -843,7 +843,7 @@ void OGridControlModel::write(const Reference<XObjectOutputStream>& _rxOutStream
_rxOutStream->writeBoolean(getBOOL(m_aTabStop));
_rxOutStream->writeBoolean(m_bNavigation);
if (nAnyMask & TEXTCOLOR)
- _rxOutStream->writeLong( getTextColor() );
+ _rxOutStream->writeLong( sal_Int32(getTextColor()) );
// new since version 6
_rxOutStream << m_sHelpText;
if (nAnyMask & FONTDESCRIPTOR)
@@ -965,7 +965,7 @@ void OGridControlModel::read(const Reference<XObjectInputStream>& _rxInStream)
if (nAnyMask & TEXTCOLOR)
{
sal_Int32 nValue = _rxInStream->readLong();
- setTextColor( nValue );
+ setTextColor( ::Color(nValue) );
}
// new since version 6
if (nVersion > 5)
diff --git a/forms/source/component/formcontrolfont.cxx b/forms/source/component/formcontrolfont.cxx
index c23f598e3976..974f3984b202 100644
--- a/forms/source/component/formcontrolfont.cxx
+++ b/forms/source/component/formcontrolfont.cxx
@@ -170,17 +170,17 @@ namespace frm
}
- sal_Int32 FontControlModel::getTextColor( ) const
+ Color FontControlModel::getTextColor( ) const
{
- sal_Int32 nColor(COL_TRANSPARENT);
+ Color nColor = COL_TRANSPARENT;
m_aTextColor >>= nColor;
return nColor;
}
- sal_Int32 FontControlModel::getTextLineColor( ) const
+ Color FontControlModel::getTextLineColor( ) const
{
- sal_Int32 nColor(COL_TRANSPARENT);
+ Color nColor = COL_TRANSPARENT;
m_aTextLineColor >>= nColor;
return nColor;
}
diff --git a/forms/source/component/navigationbar.cxx b/forms/source/component/navigationbar.cxx
index 44133a8da799..99ac10ac19e8 100644
--- a/forms/source/component/navigationbar.cxx
+++ b/forms/source/component/navigationbar.cxx
@@ -218,11 +218,11 @@ namespace frm
}
if ( nNonVoids & PERSIST_TEXTCOLOR )
{
- _rxOutStream->writeLong( getTextColor() );
+ _rxOutStream->writeLong( sal_Int32(getTextColor()) );
}
if ( nNonVoids & PERSIST_TEXTLINECOLOR )
{
- _rxOutStream->writeLong( getTextLineColor() );
+ _rxOutStream->writeLong( sal_Int32(getTextLineColor()) );
}
}
@@ -276,12 +276,12 @@ namespace frm
m_aBackgroundColor.clear();
if ( nNonVoids & PERSIST_TEXTCOLOR )
- setTextColor( _rxInStream->readLong() );
+ setTextColor( ::Color(_rxInStream->readLong()) );
else
clearTextColor();
if ( nNonVoids & PERSIST_TEXTLINECOLOR )
- setTextLineColor( _rxInStream->readLong() );
+ setTextLineColor( ::Color(_rxInStream->readLong()) );
else
clearTextLineColor();
}
diff --git a/forms/source/inc/formcontrolfont.hxx b/forms/source/inc/formcontrolfont.hxx
index 67135d041a7f..5e4a49aae5a8 100644
--- a/forms/source/inc/formcontrolfont.hxx
+++ b/forms/source/inc/formcontrolfont.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/awt/FontDescriptor.hpp>
#include <com/sun/star/beans/Property.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <tools/color.hxx>
namespace cppu {
class OPropertySetHelper;
@@ -50,15 +51,15 @@ namespace frm
const css::awt::FontDescriptor& getFont() const { return m_aFont; }
void setFont( const css::awt::FontDescriptor& _rFont ) { m_aFont = _rFont; }
- void setTextColor( sal_Int32 _nColor ) { m_aTextColor <<= _nColor; }
+ void setTextColor( Color _nColor ) { m_aTextColor <<= _nColor; }
void clearTextColor( ) { m_aTextColor.clear(); }
bool hasTextColor( ) const { return m_aTextColor.hasValue(); }
- sal_Int32 getTextColor( ) const;
+ Color getTextColor( ) const;
- void setTextLineColor( sal_Int32 _nColor ) { m_aTextLineColor <<= _nColor; }
+ void setTextLineColor( Color _nColor ) { m_aTextLineColor <<= _nColor; }
void clearTextLineColor( ) { m_aTextLineColor.clear(); }
bool hasTextLineColor( ) const { return m_aTextLineColor.hasValue(); }
- sal_Int32 getTextLineColor( ) const;
+ Color getTextLineColor( ) const;
protected:
FontControlModel( bool _bToolkitCompatibleDefaults );
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx
index 3939e1778160..16acff075a43 100644
--- a/forms/source/richtext/richtextcontrol.cxx
+++ b/forms/source/richtext/richtextcontrol.cxx
@@ -357,9 +357,9 @@ namespace frm
}
else
{
- sal_Int32 nColor(COL_TRANSPARENT);
+ Color nColor = COL_TRANSPARENT;
_rValue >>= nColor;
- pControl->SetBackgroundColor( Color( nColor ) );
+ pControl->SetBackgroundColor( nColor );
}
}
else if ( _rPropertyName == PROPERTY_HSCROLL )
diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx
index e74d921a4b82..f7c569677899 100644
--- a/forms/source/solar/component/navbarcontrol.cxx
+++ b/forms/source/solar/component/navbarcontrol.cxx
@@ -271,7 +271,7 @@ namespace frm
bool bVoid = !_rValue.hasValue();
bool bBoolValue = false;
- sal_Int32 nColor(COL_TRANSPARENT);
+ Color nColor = COL_TRANSPARENT;
// TODO: more generic mechanisms for this (the grid control implementation,
// when used herein, will do the same stuff for lot of these)
@@ -346,11 +346,11 @@ namespace frm
if ( _rPropertyName == PROPERTY_BACKGROUNDCOLOR )
{
- aReturn <<= static_cast<sal_Int32>(pNavBar->GetControlBackground().GetColor());
+ aReturn <<= pNavBar->GetControlBackground();
}
else if ( _rPropertyName == PROPERTY_TEXTLINECOLOR )
{
- aReturn <<= static_cast<sal_Int32>(pNavBar->GetTextLineColor().GetColor());
+ aReturn <<= pNavBar->GetTextLineColor();
}
else if ( _rPropertyName == PROPERTY_ICONSIZE )
{