include/oox/drawingml/color.hxx                  |    4 ++--
 oox/source/drawingml/color.cxx                   |    2 +-
 oox/source/drawingml/shape.cxx                   |   14 +++++++-------
 oox/source/drawingml/shape3dproperties.cxx       |    2 +-
 oox/source/drawingml/textcharacterproperties.cxx |    2 +-
 5 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 9acb80943da5aaaf5d515a794f8a825d88bda430
Author:     Sarper Akdemir <sarper.akde...@collabora.com>
AuthorDate: Tue Aug 24 23:58:35 2021 +0300
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Wed Nov 17 19:58:01 2021 +0100

    rename getSchemeName getSchemeIndex to remove ambiguity
    
    [ Miklos: i.e. index could be a theme index or an index into a color
    set, this one is the later case. ]
    
    (cherry picked from commit aef22c3bbf1b4bb8ab9ba2bccb7005e0d0c75cb3,
    from the feature/themesupport2 branch)
    
    Conflicts:
            oox/source/drawingml/shape.cxx
            oox/source/drawingml/shape3dproperties.cxx
    
    Change-Id: I495e4b39975f1483607972ccbcc9348021710519
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125414
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/include/oox/drawingml/color.hxx b/include/oox/drawingml/color.hxx
index f213dba9a973..00473cfe6f27 100644
--- a/include/oox/drawingml/color.hxx
+++ b/include/oox/drawingml/color.hxx
@@ -97,8 +97,8 @@ public:
     sal_Int16           getTransparency() const;
 
     /** Returns the scheme name from the a:schemeClr element for 
interoperability purposes */
-    const OUString&     getSchemeName() const { return msSchemeName; }
-    sal_Int16           getSchemeIndex() const;
+    const OUString&     getSchemeColorName() const { return msSchemeName; }
+    sal_Int16           getSchemeColorIndex() const;
 
     /** Returns the unaltered list of transformations for interoperability 
purposes */
     const css::uno::Sequence< css::beans::PropertyValue >& 
getTransformations() const { return maInteropTransformations;}
diff --git a/oox/source/drawingml/color.cxx b/oox/source/drawingml/color.cxx
index 9f4026727b56..2ced5345904e 100644
--- a/oox/source/drawingml/color.cxx
+++ b/oox/source/drawingml/color.cxx
@@ -661,7 +661,7 @@ sal_Int16 Color::getTransparency() const
     return sal_Int16(std::round( (1.0 * (MAX_PERCENT - mnAlpha)) / 
PER_PERCENT) );
 }
 
-sal_Int16 Color::getSchemeIndex() const
+sal_Int16 Color::getSchemeColorIndex() const
 {
     static std::map<OUString, sal_Int32> const aSchemeColorNameToIndex{
         { "dk1", 0 },     { "lt1", 1 },     { "dk2", 2 },     { "lt2", 3 },
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 69bf775ee5da..1f1d430e241d 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1064,7 +1064,7 @@ Reference< XShape > const & Shape::createAndInsert(
                 // Store style-related properties to InteropGrabBag to be able 
to export them back
                 uno::Sequence<beans::PropertyValue> aProperties = 
comphelper::InitPropertySequence(
                 {
-                    {"SchemeClr", 
uno::makeAny(pLineRef->maPhClr.getSchemeName())},
+                    {"SchemeClr", 
uno::makeAny(pLineRef->maPhClr.getSchemeColorName())},
                     {"Idx", uno::makeAny(pLineRef->mnThemedIdx)},
                     {"Color", uno::makeAny(nLinePhClr)},
                     {"LineStyle", 
uno::makeAny(aLineProperties.getLineStyle())},
@@ -1082,7 +1082,7 @@ Reference< XShape > const & Shape::createAndInsert(
                     nFillPhClr = pFillRef->maPhClr.getColor(rGraphicHelper);
                 }
 
-                OUString sColorScheme = pFillRef->maPhClr.getSchemeName();
+                OUString sColorScheme = pFillRef->maPhClr.getSchemeColorName();
                 if( !sColorScheme.isEmpty() )
                 {
                     uno::Sequence<beans::PropertyValue> aProperties = 
comphelper::InitPropertySequence(
@@ -1104,7 +1104,7 @@ Reference< XShape > const & Shape::createAndInsert(
                 // Store style-related properties to InteropGrabBag to be able 
to export them back
                 uno::Sequence<beans::PropertyValue> aProperties = 
comphelper::InitPropertySequence(
                 {
-                    {"SchemeClr", 
uno::makeAny(pEffectRef->maPhClr.getSchemeName())},
+                    {"SchemeClr", 
uno::makeAny(pEffectRef->maPhClr.getSchemeColorName())},
                     {"Idx", uno::makeAny(pEffectRef->mnThemedIdx)},
                     {"Transformations", 
uno::makeAny(pEffectRef->maPhClr.getTransformations())}
                 });
@@ -1356,13 +1356,13 @@ Reference< XShape > const & Shape::createAndInsert(
                 comphelper::makePropertyValue("OriginalSolidFillClr", 
aShapeProps.getProperty(PROP_FillColor)),
                 comphelper::makePropertyValue("OriginalLnSolidFillClr", 
aShapeProps.getProperty(PROP_LineColor))
             };
-            OUString sColorFillScheme = 
aFillProperties.maFillColor.getSchemeName();
+            OUString sColorFillScheme = 
aFillProperties.maFillColor.getSchemeColorName();
             if( !aFillProperties.maFillColor.isPlaceHolder() && 
!sColorFillScheme.isEmpty() )
             {
                 
aProperties.push_back(comphelper::makePropertyValue("SpPrSolidFillSchemeClr", 
sColorFillScheme));
                 
aProperties.push_back(comphelper::makePropertyValue("SpPrSolidFillSchemeClrTransformations",
 aFillProperties.maFillColor.getTransformations()));
             }
-            OUString sLnColorFillScheme = 
aLineProperties.maLineFill.maFillColor.getSchemeName();
+            OUString sLnColorFillScheme = 
aLineProperties.maLineFill.maFillColor.getSchemeColorName();
             if( !aLineProperties.maLineFill.maFillColor.isPlaceHolder() && 
!sLnColorFillScheme.isEmpty() )
             {
                 
aProperties.push_back(comphelper::makePropertyValue("SpPrLnSolidFillSchemeClr", 
sLnColorFillScheme));
@@ -1388,7 +1388,7 @@ Reference< XShape > const & Shape::createAndInsert(
                         comphelper::makePropertyValue("Pos", rPos)
                     };
 
-                    OUString sStopColorScheme = rColor.getSchemeName();
+                    OUString sStopColorScheme = rColor.getSchemeColorName();
                     if( sStopColorScheme.isEmpty() )
                     {
                         // save RGB color
@@ -1433,7 +1433,7 @@ Reference< XShape > const & Shape::createAndInsert(
                         };
 
                         Color& aColor( it->moColor );
-                        OUString sColorScheme = aColor.getSchemeName();
+                        OUString sColorScheme = aColor.getSchemeColorName();
                         if( sColorScheme.isEmpty() )
                         {
                             // RGB color and transparency value
diff --git a/oox/source/drawingml/shape3dproperties.cxx 
b/oox/source/drawingml/shape3dproperties.cxx
index 4cb127022c1d..07ba56579682 100644
--- a/oox/source/drawingml/shape3dproperties.cxx
+++ b/oox/source/drawingml/shape3dproperties.cxx
@@ -316,7 +316,7 @@ css::uno::Sequence< css::beans::PropertyValue > 
Generic3DProperties::getBevelAtt
 css::uno::Sequence< css::beans::PropertyValue > 
Generic3DProperties::getColorAttributes(
         const Color& rColor, const GraphicHelper& rGraphicHelper, ::Color 
rPhClr )
 {
-    const OUString& sColorScheme = rColor.getSchemeName();
+    const OUString& sColorScheme = rColor.getSchemeColorName();
     if( sColorScheme.isEmpty() )
     {
         // RGB color and transparency value
diff --git a/oox/source/drawingml/textcharacterproperties.cxx 
b/oox/source/drawingml/textcharacterproperties.cxx
index 9cbc331d05fa..90b0e38c1d3a 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -112,7 +112,7 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& 
rPropMap, const XmlFil
         Color aColor = maFillProperties.getBestSolidColor();
         rPropMap.setProperty(PROP_CharColor, 
aColor.getColor(rFilter.getGraphicHelper()));
         // set color theme index
-        rPropMap.setProperty(PROP_CharColorTheme, aColor.getSchemeIndex());
+        rPropMap.setProperty(PROP_CharColorTheme, 
aColor.getSchemeColorIndex());
 
         if (aColor.hasTransparency())
         {

Reply via email to