[Libreoffice-commits] core.git: offapi/com sw/qa sw/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Tue Mar 30 18:04:38 UTC 2021
offapi/com/sun/star/style/PageProperties.idl | 6 ++++++
sw/qa/core/unocore/unocore.cxx | 14 ++++++++++++++
sw/source/core/unocore/unomap1.cxx | 1 +
3 files changed, 21 insertions(+)
New commits:
commit bcbf1c245fa13cfbae2059a996006179c7f4b747
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue Mar 30 14:09:06 2021 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Mar 30 20:03:57 2021 +0200
tdf#140343 sw page rtl gutter margin: add UNO API
When true, the gutter position may be right and top, not left and top.
Change-Id: I5e3e4b4d9cb217b81b2712cb208ca5725d46ae28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113349
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Tested-by: Jenkins
diff --git a/offapi/com/sun/star/style/PageProperties.idl b/offapi/com/sun/star/style/PageProperties.idl
index 29b561e34538..3189f569d4df 100644
--- a/offapi/com/sun/star/style/PageProperties.idl
+++ b/offapi/com/sun/star/style/PageProperties.idl
@@ -501,6 +501,12 @@ published service PageProperties
*/
[optional, property] boolean BackgroundFullSize;
+ /** specifies that the page gutter shall be placed on the right side of the page.
+
+ @since LibreOffice 7.2
+ */
+ [optional, property] boolean RtlGutter;
+
};
}; }; }; };
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index 62c3f439c4e5..cf701a25d423 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -82,6 +82,20 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, flyAtParaAnchor)
xText->insertTextContent(xAnchor, xFieldmark, false);
}
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testRtlGutter)
+{
+ mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Unknown property: RtlGutter
+ auto bRtlGutter = getProperty<bool>(xPageStyle, "RtlGutter");
+ CPPUNIT_ASSERT(!bRtlGutter);
+ xPageStyle->setPropertyValue("RtlGutter", uno::makeAny(true));
+ bRtlGutter = getProperty<bool>(xPageStyle, "RtlGutter");
+ CPPUNIT_ASSERT(bRtlGutter);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unomap1.cxx b/sw/source/core/unocore/unomap1.cxx
index 572f1f752c61..803c93f94b1b 100644
--- a/sw/source/core/unocore/unomap1.cxx
+++ b/sw/source/core/unocore/unomap1.cxx
@@ -570,6 +570,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPageStylePropertyMa
// This entry is for adding that properties to style import/export
FILL_PROPERTIES_SW
{ u"BackgroundFullSize", RES_BACKGROUND_FULL_SIZE, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 },
+ { u"RtlGutter", RES_RTL_GUTTER, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 },
// Added DrawingLayer FillStyle Properties for Header. These need an own unique name,
// but reuse the same WhichIDs as the regular fill. The implementation will decide to which
More information about the Libreoffice-commits
mailing list