diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2023-03-02 20:29:36 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-03-03 12:42:43 +0000 |
commit | 2721520ca37654056c3d509657c50ee42e3dcae4 (patch) | |
tree | a5c305cd942cd748b4f1c947ca5fc9286777a555 /sw | |
parent | e1c5960450a5cb8ba93490bbd99533b6070d558e (diff) |
tdf#153925 xmloff,sw: decorative flag on frame styles
* sw API SwXStyle property "Decorative"
* UI checkbox "Decorative" - split up the GtkFrame to always show it
* ODF import/export as loext:decorative on style:graphic-properties
* test for ODF filters
Change-Id: If124cb50ee7776b5807720e65f41a07e7b9f4cf9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148143
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/globalfilter/globalfilter.cxx | 7 | ||||
-rw-r--r-- | sw/source/core/unocore/unomap1.cxx | 1 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/frmaddpage.ui | 228 |
3 files changed, 138 insertions, 98 deletions
diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx index 2b8c37114ce1..77a0b8aa2011 100644 --- a/sw/qa/extras/globalfilter/globalfilter.cxx +++ b/sw/qa/extras/globalfilter/globalfilter.cxx @@ -1237,9 +1237,16 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf143311) // check DOCX filters saveAndReload("Office Open XML Text"); CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getShape(1), "Decorative")); + { + // tdf#153925 not imported - check default and set it to test ODF filters + uno::Reference<beans::XPropertySet> const xStyle(getStyles("FrameStyles")->getByName("Formula"), uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xStyle, "Decorative")); + xStyle->setPropertyValue("Decorative", uno::Any(true)); + } // check ODF filters saveAndReload("writer8"); CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getShape(1), "Decorative")); + CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getStyles("FrameStyles")->getByName("Formula"), "Decorative")); // check PDF export utl::MediaDescriptor aMediaDescriptor; diff --git a/sw/source/core/unocore/unomap1.cxx b/sw/source/core/unocore/unomap1.cxx index 4496a65bae07..5b70b52948ae 100644 --- a/sw/source/core/unocore/unomap1.cxx +++ b/sw/source/core/unocore/unomap1.cxx @@ -413,6 +413,7 @@ o3tl::span<const SfxItemPropertyMapEntry> SwUnoPropertyMapProvider::GetFrameStyl { UNO_NAME_ALLOW_OVERLAP, RES_WRAP_INFLUENCE_ON_OBJPOS, cppu::UnoType<bool>::get(), PROPERTY_NONE, MID_ALLOW_OVERLAP}, { UNO_NAME_WRITING_MODE, RES_FRAMEDIR, cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 }, { UNO_NAME_HIDDEN, FN_UNO_HIDDEN, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { u"Decorative", RES_DECORATIVE, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 }, { UNO_NAME_TEXT_VERT_ADJUST, RES_TEXT_VERT_ADJUST, cppu::UnoType<css::drawing::TextVerticalAdjust>::get(), PROPERTY_NONE ,0}, // added FillProperties for SW, same as FILL_PROPERTIES in svx diff --git a/sw/uiconfig/swriter/ui/frmaddpage.ui b/sw/uiconfig/swriter/ui/frmaddpage.ui index 51431a1ff493..f73f404a9b7b 100644 --- a/sw/uiconfig/swriter/ui/frmaddpage.ui +++ b/sw/uiconfig/swriter/ui/frmaddpage.ui @@ -18,7 +18,7 @@ <property name="row-spacing">12</property> <property name="column-spacing">24</property> <child> - <object class="GtkFrame" id="nameframe"> + <object class="GtkFrame" id="a11yframe"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="hexpand">True</property> @@ -26,8 +26,8 @@ <property name="label-xalign">0</property> <property name="shadow-type">none</property> <child> - <!-- n-columns=2 n-rows=3 --> - <object class="GtkGrid" id="grid1"> + <!-- n-columns=1 n-rows=2 --> + <object class="GtkGrid" id="grid0"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="margin-start">12</property> @@ -37,113 +37,146 @@ <property name="row-spacing">6</property> <property name="column-spacing">12</property> <child> - <object class="GtkEntry" id="name"> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="hexpand">True</property> - <property name="activates-default">True</property> - <property name="width-chars">50</property> - <property name="truncate-multiline">True</property> - <child internal-child="accessible"> - <object class="AtkObject" id="name-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="frmaddpage|extended_tip|name">Enter a name for the selected item.</property> - </object> - </child> - </object> - <packing> - <property name="left-attach">1</property> - <property name="top-attach">0</property> - </packing> - </child> - <child> - <object class="GtkEntry" id="altname"> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="hexpand">True</property> - <property name="activates-default">True</property> - <property name="width-chars">50</property> - <property name="truncate-multiline">True</property> - <child internal-child="accessible"> - <object class="AtkObject" id="altname-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="frmaddpage|extended_tip|altname">Enter a short description of the essential details of the selected object for a person who cannot see the object. This text is available for use by assistive technologies. For images, this text is exported with an appropriate tag to HTML and PDF format.</property> - </object> - </child> - </object> - <packing> - <property name="left-attach">1</property> - <property name="top-attach">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="name_label"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="frmaddpage|name_label">_Name:</property> - <property name="use-underline">True</property> - <property name="mnemonic-widget">name</property> - <property name="xalign">0</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="altname_label"> + <object class="GtkFrame" id="nameframe"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="label" translatable="yes" context="frmaddpage|altname_label">Text _Alternative:</property> - <property name="tooltip_text" translatable="yes" context="frmaddpage|altname_label|tooltip_text">Give a short description for users who do not see this object.</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">altname</property> - <property name="xalign">0</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="description_label"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="frmaddpage|description_label">_Description:</property> - <property name="tooltip_text" translatable="yes" context="frmaddpage|description_label">Give a longer explanation of the content if it is too complex to be described briefly in “Text Alternative.”</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">description</property> - <property name="xalign">0</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">2</property> - </packing> - </child> - <child> - <object class="GtkScrolledWindow" id="scrolledwindow1"> - <property name="visible">True</property> - <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="shadow-type">in</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> - <object class="GtkTextView" id="description"> + <!-- n-columns=2 n-rows=3 --> + <object class="GtkGrid" id="grid1"> <property name="visible">True</property> - <property name="can-focus">True</property> + <property name="can-focus">False</property> + <property name="margin-start">0</property> + <property name="margin-top">0</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="wrap-mode">word</property> - <property name="buffer">textbuffer1</property> - <child internal-child="accessible"> - <object class="AtkObject" id="description-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="frmaddpage|extended_tip|description">Enter a longer description of the object, especially if the object is too complex or contains too much detail to be described adequately with the short “Text Alternative.” This text is available for use by assistive technologies. For images, this text is exported with an appropriate tag to HTML and PDF format.</property> + <property name="row-spacing">6</property> + <property name="column-spacing">12</property> + <child> + <object class="GtkEntry" id="name"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="hexpand">True</property> + <property name="activates-default">True</property> + <property name="width-chars">50</property> + <property name="truncate-multiline">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="name-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="frmaddpage|extended_tip|name">Enter a name for the selected item.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="altname"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="hexpand">True</property> + <property name="activates-default">True</property> + <property name="width-chars">50</property> + <property name="truncate-multiline">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="altname-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="frmaddpage|extended_tip|altname">Enter a short description of the essential details of the selected object for a person who cannot see the object. This text is available for use by assistive technologies. For images, this text is exported with an appropriate tag to HTML and PDF format.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="name_label"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes" context="frmaddpage|name_label">_Name:</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">name</property> + <property name="xalign">0</property> </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">0</property> + </packing> </child> + <child> + <object class="GtkLabel" id="altname_label"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes" context="frmaddpage|altname_label">Text _Alternative:</property> + <property name="tooltip_text" translatable="yes" context="frmaddpage|altname_label|tooltip_text">Give a short description for users who do not see this object.</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">altname</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="description_label"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes" context="frmaddpage|description_label">_Description:</property> + <property name="tooltip_text" translatable="yes" context="frmaddpage|description_label">Give a longer explanation of the content if it is too complex to be described briefly in “Text Alternative.”</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">description</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">2</property> + </packing> + </child> + <child> + <object class="GtkScrolledWindow" id="scrolledwindow1"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="shadow-type">in</property> + <child> + <object class="GtkTextView" id="description"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="wrap-mode">word</property> + <property name="buffer">textbuffer1</property> + <child internal-child="accessible"> + <object class="AtkObject" id="description-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="frmaddpage|extended_tip|description">Enter a longer description of the object, especially if the object is too complex or contains too much detail to be described adequately with the short “Text Alternative.” This text is available for use by assistive technologies. For images, this text is exported with an appropriate tag to HTML and PDF format.</property> + </object> + </child> + </object> + </child> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">2</property> + </packing> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="dummylabelforVCL"> + <property name="visible">False</property> + <property name="can-focus">False</property> </object> </child> </object> <packing> - <property name="left-attach">1</property> - <property name="top-attach">2</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> @@ -162,8 +195,7 @@ </object> <packing> <property name="left-attach">0</property> - <property name="top-attach">3</property> - <property name="width">2</property> + <property name="top-attach">2</property> </packing> </child> </object> |