summaryrefslogtreecommitdiff
path: root/sw/qa/core
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-05-25 09:58:28 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-05-25 11:52:02 +0200
commitce5d609da9d20b3c91f6f8eb4ee88451cbd55a9d (patch)
tree2aba1fb0c225d7b89d67e244e56d68220b041135 /sw/qa/core
parentd77db907465547f8704fd32b2c90165b54873dba (diff)
sw content controls, date: show a date picker on click
- add a new SwContentControl::GetDateString() that knows how to produce a formatted date, taking the language and the date format into account - add a new SwDateContentControlButton that knows how to open popup a calendar on click and that puts the selected date into SwContentControl::m_oSelectedDate - extend SwWrtShell::GotoContentControl() to consume that selected date & update the document text accordingly - in case SwSelPaintRects::HighlightContentControl() notices a date content control, create an instance of this newly introduced SwDateContentControlButton Change-Id: Ia2cb0fa3aefbf543b8dc2e96bcebb41408eb12c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134926 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/qa/core')
-rw-r--r--sw/qa/core/unocore/unocore.cxx7
1 files changed, 1 insertions, 6 deletions
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index 16959a06f377..a998810e6029 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -590,12 +590,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlDate)
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
- uno::Reference<beans::XPropertySet> xTextGraphic(
- xMSF->createInstance("com.sun.star.text.TextGraphicObject"), uno::UNO_QUERY);
- xTextGraphic->setPropertyValue("AnchorType",
- uno::Any(text::TextContentAnchorType_AS_CHARACTER));
- uno::Reference<text::XTextContent> xTextContent(xTextGraphic, uno::UNO_QUERY);
- xText->insertTextContent(xCursor, xTextContent, false);
+ xText->insertString(xCursor, "test", /*bAbsorb=*/false);
xCursor->gotoStart(/*bExpand=*/false);
xCursor->gotoEnd(/*bExpand=*/true);
uno::Reference<text::XTextContent> xContentControl(