summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/docxsdrexport.cxx
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-01-08 14:37:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-08 18:14:38 +0100
commit0ea17e24702dabc6287345796417bb08c44244d6 (patch)
treedbbb1c4061a53a324c68122acc6cb033b1b8222a /sw/source/filter/ww8/docxsdrexport.cxx
parent498f6f67979f2cb62ca53a42963dc85c6102f179 (diff)
fix variable name and improve method name
the variable value is alpha, not transparency Change-Id: I87904afcc0fb0fecfeeb4b80b52c5dd62893669c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108972 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/ww8/docxsdrexport.cxx')
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index edba8dfaf8f4..1ed60de45e25 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -1079,12 +1079,12 @@ void DocxSdrExport::writeDMLAndVMLDrawing(const SdrObject* sdrObj,
}
// Converts ARGB transparency (0..255) to drawingml alpha (opposite, and 0..100000)
-static OString lcl_ConvertTransparency(const Color& rColor)
+static OString lcl_TransparencyToDrawingMlAlpha(const Color& rColor)
{
if (rColor.IsTransparent())
{
- sal_Int32 nTransparencyPercent = 100 - float(rColor.GetTransparency()) / 2.55;
- return OString::number(nTransparencyPercent * oox::drawingml::PER_PERCENT);
+ sal_Int32 nAlphaPercent = 100 - float(rColor.GetTransparency()) / 2.55;
+ return OString::number(nAlphaPercent * oox::drawingml::PER_PERCENT);
}
return OString();
@@ -1103,7 +1103,7 @@ void DocxSdrExport::writeDMLEffectLst(const SwFrameFormat& rFrameFormat)
= sqrt(static_cast<double>(aShadowItem.GetWidth()) * aShadowItem.GetWidth() * 2.0);
OString aShadowDist(OString::number(TwipsToEMU(nShadowDist)));
OString aShadowColor = msfilter::util::ConvertColor(aShadowItem.GetColor());
- OString aShadowAlpha = lcl_ConvertTransparency(aShadowItem.GetColor());
+ OString aShadowAlpha = lcl_TransparencyToDrawingMlAlpha(aShadowItem.GetColor());
sal_uInt32 nShadowDir = 0;
switch (aShadowItem.GetLocation())
{