summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-05-06 16:13:48 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2020-05-06 17:30:27 +0200
commitc1c67cca7de5714635bef88de943b6c2e519eddf (patch)
tree8911bc01834a39bdba3b645955bbc2fd48249b7b /sd
parent8fa958d7d7f454cbea83fdafdde295ffd960787e (diff)
tdf#101181: support for transparency attribute of glow effect
Read/write support for ODF and OOXML (in ODF, loext:glow-transparency attribute of style:graphic-properties has been added). Added UI on glow sidebar panel. Not used in actual painting yet. Change-Id: I21b25d9c52c8611cd796f056374377ebf13cc2f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93565 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx3
-rw-r--r--sd/qa/unit/import-tests.cxx3
-rw-r--r--sd/sdi/_drvwsh.sdi5
-rw-r--r--sd/source/ui/view/drviews2.cxx1
-rw-r--r--sd/source/ui/view/drviewsf.cxx1
5 files changed, 13 insertions, 0 deletions
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 07b340ba69f7..c006772ae302 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -2861,6 +2861,9 @@ void SdOOXMLExportTest2::testShapeGlowEffect()
Color nColor;
xShape->getPropertyValue("GlowEffectColor") >>= nColor;
CPPUNIT_ASSERT_EQUAL(Color(0xFFC000), nColor);
+ sal_uInt16 nTransparency;
+ xShape->getPropertyValue("GlowEffectTransparency") >>= nTransparency;
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(60), nTransparency);
}
void SdOOXMLExportTest2::testTdf119087()
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 83cab0b6c083..158641ae4b81 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -3122,6 +3122,9 @@ void SdImportTest::testShapeGlowEffectPPTXImpoer()
Color nColor;
xShape->getPropertyValue("GlowEffectColor") >>= nColor;
CPPUNIT_ASSERT_EQUAL(Color(0xFFC000), nColor);
+ sal_uInt16 nTransparency;
+ xShape->getPropertyValue("GlowEffectTransparency") >>= nTransparency;
+ CPPUNIT_ASSERT_EQUAL(sal_uInt16(60), nTransparency);
}
CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index 962ef2368e15..b1a6f641fbc8 100644
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -2875,5 +2875,10 @@ interface DrawView
ExecMethod = FuTemporary;
StateMethod = GetAttrState;
]
+ SID_ATTR_GLOW_TRANSPARENCY
+ [
+ ExecMethod = FuTemporary;
+ StateMethod = GetAttrState;
+ ]
}
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index fb6f3decca06..d0629139d280 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -3473,6 +3473,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_ATTR_GLOW:
case SID_ATTR_GLOW_COLOR:
case SID_ATTR_GLOW_RADIUS:
+ case SID_ATTR_GLOW_TRANSPARENCY:
if (const SfxItemSet* pNewArgs = rReq.GetArgs())
mpDrawView->SetAttributes(*pNewArgs);
rReq.Done();
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index c3401210c40d..b58d7f344b0a 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -440,6 +440,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
case SID_ATTR_GLOW:
case SID_ATTR_GLOW_COLOR:
case SID_ATTR_GLOW_RADIUS:
+ case SID_ATTR_GLOW_TRANSPARENCY:
case SID_SET_SUB_SCRIPT:
case SID_SET_SUPER_SCRIPT:
{