[Libreoffice-commits] core.git: sw/source
Noel (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jan 8 17:15:21 UTC 2021
sw/source/filter/ww8/docxsdrexport.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 0ea17e24702dabc6287345796417bb08c44244d6
Author: Noel <noel.grandin at collabora.co.uk>
AuthorDate: Fri Jan 8 14:37:19 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jan 8 18:14:38 2021 +0100
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 at collabora.co.uk>
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())
{
More information about the Libreoffice-commits
mailing list