diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-26 17:13:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-28 07:34:27 +0100 |
commit | e2cb154195fdc2ffccdb6f5e87cae8b29640b3eb (patch) | |
tree | 7c3d53d78e0867aa879b98d84211d1e73602520f /reportdesign/source | |
parent | 0ea41fea75cd1ac1d81fa57c4411e75a6b4001f0 (diff) |
convert COL_ constants to be of type Color
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48
Reviewed-on: https://gerrit.libreoffice.org/50373
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign/source')
-rw-r--r-- | reportdesign/source/core/api/ImageControl.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/core/api/ReportDefinition.cxx | 6 | ||||
-rw-r--r-- | reportdesign/source/core/api/Section.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/core/inc/ReportHelperImpl.hxx | 2 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlExport.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/inspection/GeometryHandler.cxx | 8 | ||||
-rw-r--r-- | reportdesign/source/ui/report/FixedTextColor.cxx | 2 |
7 files changed, 12 insertions, 12 deletions
diff --git a/reportdesign/source/core/api/ImageControl.cxx b/reportdesign/source/core/api/ImageControl.cxx index 94a919465ae5..363995cc16c0 100644 --- a/reportdesign/source/core/api/ImageControl.cxx +++ b/reportdesign/source/core/api/ImageControl.cxx @@ -237,7 +237,7 @@ void SAL_CALL OImageControl::setHyperLinkName(const OUString & the_value) ::sal_Int32 SAL_CALL OImageControl::getControlBackground() { ::osl::MutexGuard aGuard(m_aMutex); - return m_aProps.aFormatProperties.m_bBackgroundTransparent ? COL_TRANSPARENT : m_aProps.aFormatProperties.nBackgroundColor; + return sal_Int32(m_aProps.aFormatProperties.m_bBackgroundTransparent ? COL_TRANSPARENT : m_aProps.aFormatProperties.nBackgroundColor); } void SAL_CALL OImageControl::setControlBackground( ::sal_Int32 _backgroundcolor ) diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index d30dc28d8568..d1d24803159c 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -291,7 +291,7 @@ OStyle::OStyle() sal_Int32 i = 0; registerPropertyNoMember( PROPERTY_NAME, ++i, nBound, cppu::UnoType<OUString>::get(), css::uno::Any(OUString("Default")) ); - registerPropertyNoMember(PROPERTY_BACKCOLOR, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(COL_TRANSPARENT)); + registerPropertyNoMember(PROPERTY_BACKCOLOR, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny(COL_TRANSPARENT)); registerPropertyNoMember(PROPERTY_BACKGRAPHICLOCATION, ++i,nBound, cppu::UnoType<style::GraphicLocation>::get(), css::uno::Any(style::GraphicLocation_NONE)); registerPropertyNoMember(PROPERTY_BACKTRANSPARENT, ++i,nBound,cppu::UnoType<bool>::get(), css::uno::Any(true)); @@ -300,7 +300,7 @@ OStyle::OStyle() registerPropertyNoMember(SC_UNO_PAGE_BOTTBRDDIST, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0)); registerPropertyNoMember(PROPERTY_BOTTOMMARGIN, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::Any(nMargin)); registerPropertyNoMember("DisplayName", ++i,nBound, cppu::UnoType<OUString>::get(), css::uno::Any(OUString())); - registerPropertyNoMember(SC_UNO_PAGE_FTRBACKCOL, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(COL_TRANSPARENT)); + registerPropertyNoMember(SC_UNO_PAGE_FTRBACKCOL, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny(COL_TRANSPARENT)); registerPropertyNoMember(SC_UNO_PAGE_FTRGRFFILT, ++i,nBound, cppu::UnoType<OUString>::get(), css::uno::Any(OUString())); registerPropertyNoMember(SC_UNO_PAGE_FTRGRFLOC, ++i,nBound, cppu::UnoType<style::GraphicLocation>::get(), css::uno::Any(style::GraphicLocation_NONE)); registerPropertyNoMember(SC_UNO_PAGE_FTRGRFURL, ++i,nBound, cppu::UnoType<OUString>::get(), css::uno::Any(OUString())); @@ -323,7 +323,7 @@ OStyle::OStyle() registerPropertyNoMember(SC_UNO_PAGE_FTRTOPBOR, ++i,nBound, cppu::UnoType<table::BorderLine2>::get(), css::uno::Any(table::BorderLine2())); registerPropertyNoMember(SC_UNO_PAGE_FTRTOPBDIS, ++i,nBound, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(0)); - registerPropertyNoMember(SC_UNO_PAGE_HDRBACKCOL, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny<sal_Int32>(COL_TRANSPARENT)); + registerPropertyNoMember(SC_UNO_PAGE_HDRBACKCOL, ++i,nBound|nMayBeVoid, cppu::UnoType<sal_Int32>::get(), css::uno::makeAny(COL_TRANSPARENT)); registerPropertyNoMember(SC_UNO_PAGE_HDRGRFFILT, ++i,nBound|nMayBeVoid, cppu::UnoType<OUString>::get(), css::uno::Any(OUString())); registerPropertyNoMember(SC_UNO_PAGE_HDRGRFLOC, ++i,nBound|nMayBeVoid, cppu::UnoType<style::GraphicLocation>::get(), css::uno::Any(style::GraphicLocation_NONE)); registerPropertyNoMember(SC_UNO_PAGE_HDRGRFURL, ++i,nBound|nMayBeVoid, cppu::UnoType<OUString>::get(), css::uno::Any(OUString())); diff --git a/reportdesign/source/core/api/Section.cxx b/reportdesign/source/core/api/Section.cxx index 62b1892f16ca..f1c4163e783e 100644 --- a/reportdesign/source/core/api/Section.cxx +++ b/reportdesign/source/core/api/Section.cxx @@ -252,7 +252,7 @@ void SAL_CALL OSection::setHeight( ::sal_uInt32 _height ) ::sal_Int32 SAL_CALL OSection::getBackColor() { ::osl::MutexGuard aGuard(m_aMutex); - return m_bBacktransparent ? COL_TRANSPARENT : m_nBackgroundColor; + return sal_Int32(m_bBacktransparent ? COL_TRANSPARENT : m_nBackgroundColor); } void SAL_CALL OSection::setBackColor( ::sal_Int32 _backgroundcolor ) diff --git a/reportdesign/source/core/inc/ReportHelperImpl.hxx b/reportdesign/source/core/inc/ReportHelperImpl.hxx index fa59c9c8a80f..6e581347856f 100644 --- a/reportdesign/source/core/inc/ReportHelperImpl.hxx +++ b/reportdesign/source/core/inc/ReportHelperImpl.hxx @@ -153,7 +153,7 @@ void SAL_CALL clazz::setDetailFields( const css::uno::Sequence< OUString >& )\ ::sal_Int32 SAL_CALL clazz::getControlBackground() \ { \ ::osl::MutexGuard aGuard(m_aMutex); \ - return varName.m_bBackgroundTransparent ? COL_TRANSPARENT : varName.nBackgroundColor; \ + return varName.m_bBackgroundTransparent ? sal_Int32(COL_TRANSPARENT) : varName.nBackgroundColor; \ } \ \ void SAL_CALL clazz::setControlBackground( ::sal_Int32 _backgroundcolor )\ diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index 120d00537962..54620e910d53 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -1134,7 +1134,7 @@ void ORptExport::exportAutoStyle(XPropertySet* _xProp,const Reference<XFormatted { uno::Reference<beans::XPropertySet> xBorderProp = OXMLHelper::createBorderPropertySet(); table::BorderLine2 aValue; - aValue.Color = COL_BLACK; + aValue.Color = sal_uInt32(COL_BLACK); aValue.InnerLineWidth = aValue.LineDistance = 0; aValue.OuterLineWidth = DEFAULT_LINE_WIDTH; aValue.LineStyle = table::BorderLineStyle::SOLID; diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index 70f08c27a500..7643320646fb 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -421,8 +421,8 @@ uno::Any SAL_CALL GeometryHandler::getPropertyValue(const OUString & PropertyNam case PROPERTY_ID_CONTROLBACKGROUND: { aPropertyValue = m_xReportComponent->getPropertyValue( PropertyName ); - sal_Int32 nColor = COL_TRANSPARENT; - if ( (aPropertyValue >>= nColor) && static_cast<sal_Int32>(COL_TRANSPARENT) == nColor ) + Color nColor = COL_TRANSPARENT; + if ( (aPropertyValue >>= nColor) && COL_TRANSPARENT == nColor ) aPropertyValue.clear(); } break; @@ -1263,8 +1263,8 @@ uno::Any SAL_CALL GeometryHandler::convertToControlValue(const OUString & Proper case PROPERTY_ID_BACKCOLOR: case PROPERTY_ID_CONTROLBACKGROUND: { - sal_Int32 nColor = COL_TRANSPARENT; - if ( (aPropertyValue >>= nColor) && static_cast<sal_Int32>(COL_TRANSPARENT) == nColor ) + Color nColor = COL_TRANSPARENT; + if ( (aPropertyValue >>= nColor) && COL_TRANSPARENT == nColor ) aPropertyValue.clear(); } SAL_FALLTHROUGH; diff --git a/reportdesign/source/ui/report/FixedTextColor.cxx b/reportdesign/source/ui/report/FixedTextColor.cxx index 0e99b2083eaf..643fc3407bef 100644 --- a/reportdesign/source/ui/report/FixedTextColor.cxx +++ b/reportdesign/source/ui/report/FixedTextColor.cxx @@ -104,7 +104,7 @@ namespace rptui { bool bIsDark = false; const sal_Int32 nBackColor( xFixedText->getControlBackground() ); - if (static_cast<sal_uInt32>(nBackColor) == COL_TRANSPARENT) + if (nBackColor == sal_Int32(COL_TRANSPARENT)) { uno::Reference <report::XSection> xSection(xFixedText->getParent(), uno::UNO_QUERY_THROW); |