diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2023-07-05 14:04:17 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-07-05 19:54:17 +0200 |
commit | 6efc72b99a08384e56c5a4da7918177be60b3b09 (patch) | |
tree | 67e228fb3914c392a009bc0191a63287678fed8c /svx/source/unodraw | |
parent | 082993c38e68089282b42fdb46179ac2574d61d5 (diff) |
tdf#138504 svx,etc.: decorative flag on SdrObject shapes
* SdrObject new member m_IsDecorative
* new Undo SdrUndoObjDecorative
* surprising amount of changes in sw including additional SwUndoFlyDecorative
* svx API SvxShape property "Decorative"
* UI checkbox "Decorative"
* ODF import/export as loext:decorative on style:graphic-properties
* PDF/UA export: ViewObjectContcat tag shapes with this flag as Artifact
Change-Id: I37f7a0597eab92c6c6aff94fad6c16c59b231c80
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154063
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r-- | svx/source/unodraw/unoprov.cxx | 7 | ||||
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 17 |
2 files changed, 24 insertions, 0 deletions
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index 0022cb77f4f5..105ed7a2d60e 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -475,6 +475,7 @@ static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxPluginPropertyMap() // #i68101# { UNO_NAME_MISC_OBJ_TITLE, OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0}, { UNO_NAME_MISC_OBJ_DESCRIPTION, OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0}, + { u"Decorative", OWN_ATTR_MISC_OBJ_DECORATIVE, ::cppu::UnoType<bool>::get(), 0, 0 }, }; return aPluginPropertyMap_Impl; @@ -509,6 +510,7 @@ static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxFramePropertyMap() // #i68101# { UNO_NAME_MISC_OBJ_TITLE, OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0}, { UNO_NAME_MISC_OBJ_DESCRIPTION, OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0}, + { u"Decorative", OWN_ATTR_MISC_OBJ_DECORATIVE, ::cppu::UnoType<bool>::get(), 0, 0 }, }; return aFramePropertyMap_Impl; @@ -542,6 +544,7 @@ static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxAppletPropertyMap() // #i68101# { UNO_NAME_MISC_OBJ_TITLE, OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0}, { UNO_NAME_MISC_OBJ_DESCRIPTION, OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0}, + { u"Decorative", OWN_ATTR_MISC_OBJ_DECORATIVE, ::cppu::UnoType<bool>::get(), 0, 0 }, }; return aAppletPropertyMap_Impl; @@ -598,6 +601,7 @@ static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxControlShapePropertyM // #i68101# { UNO_NAME_MISC_OBJ_TITLE, OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0}, { UNO_NAME_MISC_OBJ_DESCRIPTION, OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0}, + { u"Decorative", OWN_ATTR_MISC_OBJ_DECORATIVE, ::cppu::UnoType<bool>::get(), 0, 0 }, // #i112587# { UNO_NAME_MISC_OBJ_PRINTABLE, SDRATTR_OBJPRINTABLE , cppu::UnoType<bool>::get(), 0, 0}, { u"Visible", SDRATTR_OBJVISIBLE , cppu::UnoType<bool>::get(), 0, 0}, @@ -624,6 +628,7 @@ static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxPageShapePropertyMap( // #i68101# { UNO_NAME_MISC_OBJ_TITLE, OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0}, { UNO_NAME_MISC_OBJ_DESCRIPTION, OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0}, + { u"Decorative", OWN_ATTR_MISC_OBJ_DECORATIVE, ::cppu::UnoType<bool>::get(), 0, 0 }, }; return aPageShapePropertyMap_Impl; @@ -709,6 +714,7 @@ static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxMediaShapePropertyMap // #i68101# { UNO_NAME_MISC_OBJ_TITLE, OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0}, { UNO_NAME_MISC_OBJ_DESCRIPTION, OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0}, + { u"Decorative", OWN_ATTR_MISC_OBJ_DECORATIVE, ::cppu::UnoType<bool>::get(), 0, 0 }, {u"PrivateStream", OWN_ATTR_MEDIA_STREAM, cppu::UnoType<css::io::XInputStream>::get(), 0, 0}, {u"PrivateTempFileURL", OWN_ATTR_MEDIA_TEMPFILEURL, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0}, { u"MediaMimeType", OWN_ATTR_MEDIA_MIMETYPE, cppu::UnoType<OUString>::get(), 0, 0}, @@ -738,6 +744,7 @@ static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxTableShapePropertyMap { u"UINameSingular", OWN_ATTR_UINAME_SINGULAR , ::cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0}, { UNO_NAME_MISC_OBJ_TITLE, OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0}, { UNO_NAME_MISC_OBJ_DESCRIPTION, OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0}, + { u"Decorative", OWN_ATTR_MISC_OBJ_DECORATIVE, ::cppu::UnoType<bool>::get(), 0, 0 }, { u"Model", OWN_ATTR_OLEMODEL , cppu::UnoType<css::table::XTable>::get(), css::beans::PropertyAttribute::READONLY, 0}, { u"TableTemplate", OWN_ATTR_TABLETEMPLATE , cppu::UnoType<css::container::XIndexAccess>::get(), 0, 0}, { u"UseFirstRowStyle", OWN_ATTR_TABLETEMPLATE_FIRSTROW, cppu::UnoType<bool>::get(),0, 0}, diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 95adad4150a0..b186a95097c2 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -2395,6 +2395,16 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertyMapEn } break; } + case OWN_ATTR_MISC_OBJ_DECORATIVE: + { + bool isDecorative; + if (rValue >>= isDecorative) + { + pSdrObject->SetDecorative(isDecorative); + return true; + } + break; + } case SDRATTR_OBJPRINTABLE: { @@ -2839,6 +2849,13 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertyMapEn break; } + case OWN_ATTR_MISC_OBJ_DECORATIVE: + { + bool const isDecorative(GetSdrObject()->IsDecorative()); + rValue <<= isDecorative; + break; + } + case SDRATTR_OBJPRINTABLE: rValue <<= GetSdrObject()->IsPrintable(); break; |