diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-03-02 09:38:14 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-03-02 10:36:12 +0100 |
commit | 1a240807f2c051ff9a63d713625404a024d7c221 (patch) | |
tree | 05ebf0969a011658e5cb99c318e8e227df91886a /sw/qa | |
parent | 46cf4096b794b11fee2bf75975f1083a38d889ec (diff) |
sw clearing breaks: add UNO API to insert this with custom clear / char props
- if (character) properties are specified when the text content itself
is inserted, then format the anchor ("dummy") character like that
- add the ability to specify a clear type (none/left/right/all) on the
line break object itself before insertion
Change-Id: I219a1031e53c2e0368ff329d45b7e3fff0934038
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130818
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/core/unocore/unocore.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx index b7d92d8485ac..315716a6da15 100644 --- a/sw/qa/core/unocore/unocore.cxx +++ b/sw/qa/core/unocore/unocore.cxx @@ -226,6 +226,9 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testLineBreakInsert) uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<text::XTextContent> xLineBreak( xMSF->createInstance("com.sun.star.text.LineBreak"), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xLineBreakProps(xLineBreak, uno::UNO_QUERY); + auto eClear = static_cast<sal_Int16>(SwLineBreakClear::ALL); + xLineBreakProps->setPropertyValue("Clear", uno::makeAny(eClear)); uno::Reference<text::XText> xText = xTextDocument->getText(); uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor(); xText->insertTextContent(xCursor, xLineBreak, /*bAbsorb=*/false); |