[Libreoffice-commits] core.git: cui/source dbaccess/source framework/source include/tools oox/source sc/source sfx2/source svtools/source svx/source sw/source tools/source

Noel Grandin noel.grandin at collabora.co.uk
Thu Mar 1 07:24:48 UTC 2018


 cui/source/tabpages/backgrnd.cxx                        |    2 +-
 dbaccess/source/ui/misc/HtmlReader.cxx                  |    2 +-
 dbaccess/source/ui/misc/RtfReader.cxx                   |    2 +-
 framework/source/xml/imagesdocumenthandler.cxx          |    2 +-
 include/tools/color.hxx                                 |    2 +-
 oox/source/drawingml/table/tablecell.cxx                |    2 +-
 sc/source/filter/html/htmlexp.cxx                       |    2 +-
 sfx2/source/sidebar/Tools.cxx                           |    4 ++--
 svtools/source/svhtml/htmlout.cxx                       |    2 +-
 svx/source/sdr/attribute/sdrallfillattributeshelper.cxx |    2 +-
 sw/source/filter/ww8/ww8atr.cxx                         |    2 +-
 tools/source/generic/color.cxx                          |    2 +-
 12 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit d3510bef84423f17ece0715b7a8cdb75725c5938
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue Feb 27 17:18:39 2018 +0200

    make Color::GetRGBColor return Color instead of ColorData
    
    Change-Id: I532959a7103c3857510f26ecce2f942d676a233b
    Reviewed-on: https://gerrit.libreoffice.org/50487
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 024a8361b144..59b1d6060797 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -206,7 +206,7 @@ void BackgroundPreviewImpl::NotifyChange( const Color& rColor )
     {
         const static Color aTranspCol( COL_TRANSPARENT );
 
-        SetFillColor( rColor == aTranspCol ? GetSettings().GetStyleSettings().GetFieldColor() : Color(rColor.GetRGBColor()) );
+        SetFillColor( rColor == aTranspCol ? GetSettings().GetStyleSettings().GetFieldColor() : rColor.GetRGBColor() );
         Invalidate(aDrawRect);
     }
 }
diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx
index 2892205962e1..e195bc716b4f 100644
--- a/dbaccess/source/ui/misc/HtmlReader.cxx
+++ b/dbaccess/source/ui/misc/HtmlReader.cxx
@@ -331,7 +331,7 @@ void OHTMLReader::TableFontOn(FontDescriptor& _rFont,sal_Int32 &_rTextColor)
             {
                 Color aColor;
                 rOption.GetColor( aColor );
-                _rTextColor = aColor.GetRGBColor();
+                _rTextColor = sal_Int32(aColor.GetRGBColor());
             }
             break;
         case HtmlOptionId::FACE :
diff --git a/dbaccess/source/ui/misc/RtfReader.cxx b/dbaccess/source/ui/misc/RtfReader.cxx
index 0c0d6d6edc65..ed0b2da1cd3e 100644
--- a/dbaccess/source/ui/misc/RtfReader.cxx
+++ b/dbaccess/source/ui/misc/RtfReader.cxx
@@ -122,7 +122,7 @@ void ORTFReader::NextToken( int nToken )
                             nTmpToken2 = GetNextToken();
                         }
                         while(aToken[0] != ';' && eState != SvParserState::Error && eState != SvParserState::Accepted);
-                        m_vecColor.push_back(aColor.GetRGBColor());
+                        m_vecColor.push_back(sal_uInt32(aColor.GetRGBColor()));
                         nTmpToken2 = GetNextToken();
                     }
                     while(nTmpToken2 == RTF_RED && eState != SvParserState::Error && eState != SvParserState::Accepted);
diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx
index 28ec385b2f3e..cbcb0eb265df 100644
--- a/framework/source/xml/imagesdocumenthandler.cxx
+++ b/framework/source/xml/imagesdocumenthandler.cxx
@@ -670,7 +670,7 @@ void OWriteImagesDocumentHandler::WriteImageList( const ImageListItemDescriptor*
     else
     {
         OUStringBuffer   aColorStrBuffer( 8 );
-        sal_Int64       nValue = pImageList->aMaskColor.GetRGBColor();
+        sal_Int64       nValue = sal_uInt32(pImageList->aMaskColor.GetRGBColor());
 
         aColorStrBuffer.append( "#" );
         aColorStrBuffer.append( OUString::number( nValue, 16 ));
diff --git a/include/tools/color.hxx b/include/tools/color.hxx
index 7f3005aaf7c0..1f6012d98151 100644
--- a/include/tools/color.hxx
+++ b/include/tools/color.hxx
@@ -95,7 +95,7 @@ public:
     {
         return mnColor;
     }
-    ColorData GetRGBColor() const
+    Color GetRGBColor() const
     {
         return COLORDATA_RGB(mnColor);
     }
diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx
index 36751930d59a..c8cef8384435 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -450,7 +450,7 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, cons
         ::Color nCellColor( rCellColor.getColor(rFilterBase.getGraphicHelper()) );
         ::Color aResult( basegfx::interpolate(nBgColor.getBColor(), nCellColor.getBColor(), 1.0 - fTransparency) );
         aFillProperties.maFillColor.clearTransformations();
-        aFillProperties.maFillColor.setSrgbClr(aResult.GetRGBColor());
+        aFillProperties.maFillColor.setSrgbClr(sal_Int32(aResult.GetRGBColor()));
         aFillProperties.moFillType.set(XML_solidFill);
     }
     if (!aFillProperties.moFillType.has())
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index abb85f513d63..822c5a331192 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -550,7 +550,7 @@ OString ScHTMLExport::BorderToStyle(const char* pBorderName,
 
         // color
         char hex[7];
-        snprintf( hex, 7, "%06x", static_cast< unsigned int >( pLine->GetColor().GetRGBColor() ) );
+        snprintf( hex, 7, "%06x", static_cast<sal_uInt32>( pLine->GetColor().GetRGBColor() ) );
         hex[6] = 0;
 
         aOut.append(hex);
diff --git a/sfx2/source/sidebar/Tools.cxx b/sfx2/source/sidebar/Tools.cxx
index e246599fd9c0..deeb3eb56808 100644
--- a/sfx2/source/sidebar/Tools.cxx
+++ b/sfx2/source/sidebar/Tools.cxx
@@ -81,8 +81,8 @@ css::awt::Gradient Tools::VclToAwtGradient (const Gradient& rVclGradient)
 {
     css::awt::Gradient aAwtGradient (
         awt::GradientStyle(rVclGradient.GetStyle()),
-        rVclGradient.GetStartColor().GetRGBColor(),
-        rVclGradient.GetEndColor().GetRGBColor(),
+        sal_Int32(rVclGradient.GetStartColor().GetRGBColor()),
+        sal_Int32(rVclGradient.GetEndColor().GetRGBColor()),
         rVclGradient.GetAngle(),
         rVclGradient.GetBorder(),
         rVclGradient.GetOfsX(),
diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx
index e756e5c5e316..c2975d06faea 100644
--- a/svtools/source/svhtml/htmlout.cxx
+++ b/svtools/source/svhtml/htmlout.cxx
@@ -1005,7 +1005,7 @@ void HtmlWriterHelper::applyColor(HtmlWriter& rHtmlWriter, const OString &aAttri
             << std::setfill('0')
             << std::setw(6)
             << std::hex
-            << rColor.GetRGBColor();
+            << sal_uInt32(rColor.GetRGBColor());
         sBuffer.append(sStringStream.str().c_str());
     }
 
diff --git a/svx/source/sdr/attribute/sdrallfillattributeshelper.cxx b/svx/source/sdr/attribute/sdrallfillattributeshelper.cxx
index 3036fd96a330..0c6067cd3efd 100644
--- a/svx/source/sdr/attribute/sdrallfillattributeshelper.cxx
+++ b/svx/source/sdr/attribute/sdrallfillattributeshelper.cxx
@@ -64,7 +64,7 @@ namespace drawinglayer
             maFillAttribute.reset(
                 new drawinglayer::attribute::SdrFillAttribute(
                     0.0,
-                    Color(rColor.GetRGBColor()).getBColor(),
+                    rColor.GetRGBColor().getBColor(),
                     drawinglayer::attribute::FillGradientAttribute(),
                     drawinglayer::attribute::FillHatchAttribute(),
                     drawinglayer::attribute::SdrFillGraphicAttribute()));
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 9480ce32ba80..d923d0c491ac 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -4283,7 +4283,7 @@ WW8_BRCVer9 WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
             nWidth = 1;                         // don't omit
 
         // BRC.cv
-        nColBGR = wwUtility::RGBToBGR(rLine.GetColor().GetRGBColor());
+        nColBGR = wwUtility::RGBToBGR(sal_uInt32(rLine.GetColor().GetRGBColor()));
     }
 
     // BRC.dptSpace
diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx
index 9abc74141728..70b388b416f9 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -198,7 +198,7 @@ SvStream& Color::Write( SvStream& rOStm ) const
 OUString Color::AsRGBHexString() const
 {
     std::stringstream ss;
-    ss << std::hex << std::setfill ('0') << std::setw(6) << GetRGBColor();
+    ss << std::hex << std::setfill ('0') << std::setw(6) << sal_uInt32(GetRGBColor());
     return OUString::createFromAscii(ss.str().c_str());
 }
 


More information about the Libreoffice-commits mailing list