summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorRegina Henschel <rb.henschel@t-online.de>2023-03-09 21:09:09 +0100
committerRegina Henschel <rb.henschel@t-online.de>2023-03-09 22:20:51 +0000
commitbe7455813557f4289b31d5bb1b68ce1a44a86669 (patch)
treeb4222967af5029ddd40de7ecf9488f26786a4d8d /oox
parentb6d1cb887438733da2465f107da5088f9826435e (diff)
rename struct gradientStopColor to GradientStopColor
This is a follow-up to commit d95a09c1fca70d658207b8c48761af32dd2df213. The change has been requested by reviewer Miklos Vajna. Change-Id: If59cee0b757ef0afe0b48c5bce9d9e3024e81e4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148566 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/fontworkhelpers.cxx19
1 files changed, 10 insertions, 9 deletions
diff --git a/oox/source/drawingml/fontworkhelpers.cxx b/oox/source/drawingml/fontworkhelpers.cxx
index cebe7bcf707e..3a09ff618d0a 100644
--- a/oox/source/drawingml/fontworkhelpers.cxx
+++ b/oox/source/drawingml/fontworkhelpers.cxx
@@ -1024,7 +1024,8 @@ bool FontworkHelpers::getThemeColorFromShape(
namespace
{
-struct gradientStopColor
+// Contains information about one gradient stop. Each gradient has at least 2 of these.
+struct GradientStopColor
{
// RGBColor contains no transformations. In case TTColor has other type than
// ThemeColorType::Unknown, it has precedence. The color transformations in TTColor are used
@@ -1037,7 +1038,7 @@ struct gradientStopColor
// 'first' contains the position in the range 0 (=0%) to 100000 (=100%) in the gradient as needed for
// the 'pos' attribute in <w14:gs> element in oox, 'second' contains color and color transformations
// at this position. The map contains all information needed for a <w14:gsLst> element in oox.
-typedef std::multimap<sal_Int32, gradientStopColor> ColorMapType;
+typedef std::multimap<sal_Int32, GradientStopColor> ColorMapType;
namespace
{
@@ -1214,8 +1215,8 @@ sal_Int16 lcl_getAlphaFromTransparenceGradient(const awt::Gradient& rTransparenc
/ (100.0 - nBorder) * 100 / 255.0);
}
-// gradientStopColor has components ::Color RGBColor and modul::ThemeColor TTColor
-gradientStopColor
+// GradientStopColor has components ::Color RGBColor and modul::ThemeColor TTColor
+GradientStopColor
lcl_createGradientStopColor(const uno::Reference<beans::XPropertySet>& rXPropSet,
const uno::Reference<beans::XPropertySetInfo>& rXPropSetInfo,
const awt::Gradient& rColorGradient, const bool& rbHasColorGradient,
@@ -1226,7 +1227,7 @@ lcl_createGradientStopColor(const uno::Reference<beans::XPropertySet>& rXPropSet
// -10000 to +10000. Constants are used in converting from API values below.
constexpr sal_Int16 nFactorToHthPerc = 100;
constexpr sal_Int16 nMaxHthPerc = 10000;
- gradientStopColor aStopColor;
+ GradientStopColor aStopColor;
if (rbHasTransparenceGradient)
{
// Color
@@ -1339,18 +1340,18 @@ ColorMapType lcl_createColorMapFromShapeProps(
aTransparenceGradient.EndIntensity);
}
- // A gradientStopColor includes color and transparency.
+ // A GradientStopColor includes color and transparency.
// The key of aColorMap has same unit as the w14:pos attribute of <w14:gs> element in oox.
- gradientStopColor aStartStopColor
+ GradientStopColor aStartStopColor
= lcl_createGradientStopColor(rXPropSet, rXPropSetInfo, aColorGradient, rbHasColorGradient,
aTransparenceGradient, rbHasTransparenceGradient, 0);
aColorMap.insert(std::pair{ 0, aStartStopColor });
- gradientStopColor aEndStopColor
+ GradientStopColor aEndStopColor
= lcl_createGradientStopColor(rXPropSet, rXPropSetInfo, aColorGradient, rbHasColorGradient,
aTransparenceGradient, rbHasTransparenceGradient, 100);
aColorMap.insert(std::pair{ 100000, aEndStopColor });
- // We add additional gradientStopColor in case of borders.
+ // We add additional GradientStopColor in case of borders.
if (rbHasColorGradient)
{
// We only use the color border for now. If the transparency gradient has a total different