summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-07-28 17:01:42 +0200
committerTomaž Vajngerl <quikee@gmail.com>2023-08-01 08:15:35 +0200
commit7f265875ef784d717f5a534bdca2cd36fdce7ecb (patch)
treef734c6221e8feaa8efa02e62c00cb44b59d518b0 /sc/source/filter/oox
parent5e34a25aa7f58b37a2303aef9318bbe5a9af5d37 (diff)
sc: rename oox::xls::Color to oox::xls::XlsColor
It's annoying that the class name is so similar to the commonly used class Color, even when it is in its own namespace. To avoid unneccesary conflicts and confusion, it was renamed. (Similar would be also good for oox::drawingml::Color) Change-Id: I68dcaf951b7faf089cb2b13d94576007f40c441e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155109 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sc/source/filter/oox')
-rw-r--r--sc/source/filter/oox/stylesbuffer.cxx27
1 files changed, 15 insertions, 12 deletions
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index f53681521ad6..25f273b1e1f2 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -241,37 +241,40 @@ ExcelGraphicHelper::ExcelGraphicHelper( const WorkbookHelper& rHelper ) :
return getStyles().getPaletteColor( nPaletteIdx );
}
-void Color::setAuto()
+void XlsColor::setAuto()
{
clearTransformations();
setSchemeClr( XML_phClr );
}
-void Color::setRgb( ::Color nRgbValue, double fTint )
+void XlsColor::setRgb( ::Color nRgbValue, double fTint )
{
clearTransformations();
setSrgbClr( sal_uInt32(nRgbValue) & 0xFFFFFF );
- if( fTint != 0.0 ) addExcelTintTransformation( fTint );
+ if (fTint != 0.0)
+ addExcelTintTransformation(fTint);
}
-void Color::setTheme( sal_Int32 nThemeIdx, double fTint )
+void XlsColor::setTheme( sal_Int32 nThemeIdx, double fTint )
{
clearTransformations();
static const sal_Int32 spnColorTokens[] = {
XML_lt1, XML_dk1, XML_lt2, XML_dk2, XML_accent1, XML_accent2,
XML_accent3, XML_accent4, XML_accent5, XML_accent6, XML_hlink, XML_folHlink };
setSchemeClr( STATIC_ARRAY_SELECT( spnColorTokens, nThemeIdx, XML_TOKEN_INVALID ) );
- if( fTint != 0.0 ) addExcelTintTransformation( fTint );
+ if (fTint != 0.0)
+ addExcelTintTransformation( fTint );
}
-void Color::setIndexed( sal_Int32 nPaletteIdx, double fTint )
+void XlsColor::setIndexed( sal_Int32 nPaletteIdx, double fTint )
{
clearTransformations();
setPaletteClr( nPaletteIdx );
- if( fTint != 0.0 ) addExcelTintTransformation( fTint );
+ if (fTint != 0.0)
+ addExcelTintTransformation(fTint);
}
-void Color::importColor( const AttributeList& rAttribs )
+void XlsColor::importColor( const AttributeList& rAttribs )
{
// tdf#113271 The order of import color is very important in case of more than one color attributes was provided.
// This order (theme -> rgb -> indexed -> auto) is not documented and was gathered experimentally based on MS Excel 2013.
@@ -294,7 +297,7 @@ void Color::importColor( const AttributeList& rAttribs )
}
}
-void Color::importColor( SequenceInputStream& rStrm )
+void XlsColor::importColor( SequenceInputStream& rStrm )
{
sal_uInt8 nFlags, nIndex;
sal_Int16 nTint;
@@ -333,12 +336,12 @@ void Color::importColor( SequenceInputStream& rStrm )
}
}
-void Color::importColorId( SequenceInputStream& rStrm )
+void XlsColor::importColorId( SequenceInputStream& rStrm )
{
setIndexed( rStrm.readInt32() );
}
-SequenceInputStream& operator>>( SequenceInputStream& rStrm, Color& orColor )
+SequenceInputStream& operator>>( SequenceInputStream& rStrm, XlsColor& orColor )
{
orColor.importColor( rStrm );
return rStrm;
@@ -1672,7 +1675,7 @@ void GradientFillModel::readGradient( SequenceInputStream& rStrm )
void GradientFillModel::readGradientStop( SequenceInputStream& rStrm, bool bDxf )
{
- Color aColor;
+ XlsColor aColor;
double fPosition;
if( bDxf )
{