summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-08-23 14:39:33 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-08-23 16:13:10 +0200
commitd6e80921f6bdd8ae21f44677aa978e80fe7ee54b (patch)
tree371c64462e46e700ad00546e8c439520faea4de3 /writerfilter
parentc35898696f9d6157472e78426ae511bc83f3eb74 (diff)
DOCX import of picture shadow transparency
Change-Id: I15e09017eccc3f0e5ed8cab9c3de3677c8a580fa
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 3ff217603b59..af55e261842f 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -1364,11 +1364,13 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
{
// Shadow width is approximated by average of X and Y
table::ShadowFormat aShadow;
- sal_Int32 nShadowColor = m_pImpl->nShadowColor;
+ sal_uInt32 nShadowColor = m_pImpl->nShadowColor & 0x00FFFFFF; // The shadow color we get is RGB only.
sal_Int32 nShadowWidth = (abs(m_pImpl->nShadowXDistance)
+ abs(m_pImpl->nShadowYDistance)) / 2;
aShadow.ShadowWidth = nShadowWidth;
+ sal_uInt8 nShadowTransparence = float(m_pImpl->nShadowTransparence) * 2.55;
+ nShadowColor |= (nShadowTransparence << 24); // Add transparence to the color.
aShadow.Color = nShadowColor;
// Distances -ve for top and right, +ve for bottom and left
if (m_pImpl->nShadowXDistance > 0)