diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-05-08 23:25:17 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-05-11 00:12:33 +0200 |
commit | 5952331844450dad93e21d2e329d51841ae1700e (patch) | |
tree | ee95ae8c96b27928ba6ae30620e9e524c1982d3e /svx | |
parent | ce0933c0d8cc0d51774d0168a8be4e9bb3153463 (diff) |
tdf#49247: implement soft edges document model and import/export
... for ODF and OOXML.
Two object properties added:
SoftEdge (boolean, effect enabled/disabled)
SoftEdgeRad (sal_Int32, effect radius in 100ths of mm)
Two corresponding ODF attributes added:
loext:softedge ("visible"/"hidden")
loext:softedge-radius (metric)
Change-Id: I0dc4d7fc3e5b0c2c36092d430568ebcfd3a68c9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93833
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sdr/properties/customshapeproperties.cxx | 2 | ||||
-rw-r--r-- | svx/source/sdr/properties/graphicproperties.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdattr.cxx | 9 | ||||
-rw-r--r-- | svx/source/unodraw/unoprov.cxx | 11 |
4 files changed, 22 insertions, 2 deletions
diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx index f9da077101ee..0d1443081910 100644 --- a/svx/source/sdr/properties/customshapeproperties.cxx +++ b/svx/source/sdr/properties/customshapeproperties.cxx @@ -73,7 +73,7 @@ namespace sdr::properties // Graphic attributes, 3D properties, CustomShape // properties: SDRATTR_GRAF_FIRST, SDRATTR_CUSTOMSHAPE_LAST, - SDRATTR_GLOW_FIRST, SDRATTR_GLOW_LAST, + SDRATTR_GLOW_FIRST, SDRATTR_SOFTEDGE_LAST, // Range from SdrTextObj: EE_ITEMS_START, EE_ITEMS_END>{}); } diff --git a/svx/source/sdr/properties/graphicproperties.cxx b/svx/source/sdr/properties/graphicproperties.cxx index 35d8e832679a..2819826caad5 100644 --- a/svx/source/sdr/properties/graphicproperties.cxx +++ b/svx/source/sdr/properties/graphicproperties.cxx @@ -67,7 +67,7 @@ namespace sdr::properties // range from SdrGrafObj SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST, - SDRATTR_GLOW_FIRST, SDRATTR_GLOW_LAST, + SDRATTR_GLOW_FIRST, SDRATTR_SOFTEDGE_LAST, // range from SdrTextObj EE_ITEMS_START, EE_ITEMS_END>{}); diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index 1b89cab1da13..ed96682bc6f7 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -333,6 +333,9 @@ SdrItemPool::SdrItemPool( rPoolDefaults[ SDRATTR_GLOW_COLOR - SDRATTR_START ] = new XColorItem(SDRATTR_GLOW_COLOR, aNullCol); rPoolDefaults[ SDRATTR_GLOW_TRANSPARENCY - SDRATTR_START ] = new SdrPercentItem(SDRATTR_GLOW_TRANSPARENCY, 0); + rPoolDefaults[SDRATTR_SOFTEDGE - SDRATTR_START] = new SdrOnOffItem(SDRATTR_SOFTEDGE, false); + rPoolDefaults[SDRATTR_SOFTEDGE_RAD - SDRATTR_START] = new SdrMetricItem(SDRATTR_SOFTEDGE_RAD, 0); + // set own ItemInfos mpLocalItemInfos[SDRATTR_SHADOW-SDRATTR_START]._nSID=SID_ATTR_FILL_SHADOW; mpLocalItemInfos[SDRATTR_SHADOWCOLOR-SDRATTR_START]._nSID=SID_ATTR_SHADOW_COLOR; @@ -352,6 +355,9 @@ SdrItemPool::SdrItemPool( mpLocalItemInfos[SDRATTR_GLOW_COLOR - SDRATTR_START]._nSID = SID_ATTR_GLOW_COLOR; mpLocalItemInfos[SDRATTR_GLOW_TRANSPARENCY - SDRATTR_START]._nSID = SID_ATTR_GLOW_TRANSPARENCY; + mpLocalItemInfos[SDRATTR_SOFTEDGE - SDRATTR_START]._nSID = SID_ATTR_SOFTEDGE; + mpLocalItemInfos[SDRATTR_SOFTEDGE_RAD - SDRATTR_START]._nSID = SID_ATTR_SOFTEDGE_RADIUS; + // it's my own creation level, set Defaults and ItemInfos SetDefaults(mpLocalPoolDefaults); SetItemInfos(mpLocalItemInfos.get()); @@ -463,6 +469,9 @@ OUString SdrItemPool::GetItemName(sal_uInt16 nWhich) case SDRATTR_GLOW_COLOR : pResId = SIP_SA_GLOW_COLOR;break; case SDRATTR_GLOW_TRANSPARENCY : pResId = SIP_SA_GLOW_TRANSPARENCY;break; + case SDRATTR_SOFTEDGE : pResId = SIP_SA_SOFTEDGE; break; + case SDRATTR_SOFTEDGE_RAD : pResId = SIP_SA_SOFTEDGE_RAD; break; + case SDRATTR_CAPTIONTYPE : pResId = SIP_SA_CAPTIONTYPE;break; case SDRATTR_CAPTIONFIXEDANGLE: pResId = SIP_SA_CAPTIONFIXEDANGLE;break; case SDRATTR_CAPTIONANGLE : pResId = SIP_SA_CAPTIONANGLE;break; diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index 92399dee20c3..8d2849512856 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -62,6 +62,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxShapePropertyMap() MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES GLOW_PROPERTIES + SOFTEDGE_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# @@ -86,6 +87,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxTextShapePropertyMap() MISC_OBJ_PROPERTIES_NO_SHEAR LINKTARGET_PROPERTIES GLOW_PROPERTIES + SOFTEDGE_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# @@ -111,6 +113,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxConnectorPropertyMap() MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES GLOW_PROPERTIES + SOFTEDGE_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# @@ -136,6 +139,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxDimensioningPropertyMap() MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES GLOW_PROPERTIES + SOFTEDGE_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# @@ -161,6 +165,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxCirclePropertyMap() MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES GLOW_PROPERTIES + SOFTEDGE_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# @@ -188,6 +193,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxPolyPolygonPropertyMap() MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES GLOW_PROPERTIES + SOFTEDGE_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# @@ -218,6 +224,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxGraphicObjectPropertyMap() LINKTARGET_PROPERTIES GLOW_PROPERTIES + SOFTEDGE_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# @@ -369,6 +376,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxAllPropertyMap() static SfxItemPropertyMapEntry const aAllPropertyMap_Impl[] = { GLOW_PROPERTIES + SOFTEDGE_PROPERTIES SHADOW_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END @@ -432,6 +440,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxOle2PropertyMap() MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES GLOW_PROPERTIES + SOFTEDGE_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES FONTWORK_PROPERTIES @@ -684,6 +693,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxCustomShapePropertyMap() MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES GLOW_PROPERTIES + SOFTEDGE_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES {OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0}, @@ -763,6 +773,7 @@ static comphelper::PropertyMapEntry const * ImplGetSvxDrawingDefaultsPropertyMap static comphelper::PropertyMapEntry const aSvxDrawingDefaultsPropertyMap_Impl[] = { GLOW_PROPERTIES + SOFTEDGE_PROPERTIES SHADOW_PROPERTIES LINE_PROPERTIES_DEFAULTS FILL_PROPERTIES_BMP |