summaryrefslogtreecommitdiff
path: root/sw/qa/core/text/text.cxx
diff options
context:
space:
mode:
authorVojtěch Doležal <dolezvo1@cvut.cz>2023-04-06 00:25:34 +0200
committerMiklos Vajna <vmiklos@collabora.com>2023-05-05 08:32:09 +0200
commitd543eb2d8e45999a3d8fa6134f0d98f08acb8037 (patch)
treed5a1c6d1e2b2d5cd7084746f6428d03d9c35a802 /sw/qa/core/text/text.cxx
parent671d1c6cd14b28b5960ad56086299bd69533dfd8 (diff)
Reworked bibliography mark link target to have user-selectable type
Without this change, havign no link is not possible, if the bibliography entry has URL. This commit adds a select box for user to choose between target types (Entry URL, specific Target URL, None, bibliography table row) The main features are that it also makes it more obvious to the user and makes it possible to easily extend target types in the future. As for compatibility, files from before 7b99871635 are fully compatible without any hurdles, as missing property maps to the old behaviour. Bibliography marks saved after 7b99871635 will also revert to the old behaviour, however no actual data (such as target URLs) will be lost. Change-Id: Iad61dd8b4df337fa202f45d117313ee47ec20c05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150708 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/qa/core/text/text.cxx')
-rw-r--r--sw/qa/core/text/text.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index b233d2ecf499..36332102e3b0 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -226,8 +226,8 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testBibliographyUrlPdfExport4)
comphelper::makePropertyValue("Identifier", OUString("AT")),
comphelper::makePropertyValue("Author", OUString("Author")),
comphelper::makePropertyValue("Title", OUString("Title")),
+ comphelper::makePropertyValue("TargetType", OUString("1")), // 1 == UseTargetURL
comphelper::makePropertyValue("TargetURL", OUString("#page=1")),
- comphelper::makePropertyValue("UseTargetURL", OUString("true")),
};
xField->setPropertyValue("Fields", uno::Any(aFields));
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
@@ -262,7 +262,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testBibliographyUrlPdfExport5)
comphelper::makePropertyValue("Identifier", OUString("AT")),
comphelper::makePropertyValue("Author", OUString("Author")),
comphelper::makePropertyValue("Title", OUString("Title")),
- comphelper::makePropertyValue("UseTargetURL", OUString("true")),
+ comphelper::makePropertyValue("TargetType", OUString("3")), // 3 == BibliographyTableRow
};
xField->setPropertyValue("Fields", uno::Any(aFields));
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
@@ -309,7 +309,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testBibliographyUrlPdfExport6)
comphelper::makePropertyValue("Identifier", OUString("AT")),
comphelper::makePropertyValue("Author", OUString("AuthorName")),
comphelper::makePropertyValue("Title", OUString("Title")),
- comphelper::makePropertyValue("UseTargetURL", OUString("true")),
+ comphelper::makePropertyValue("TargetType", OUString("3")), // 3 == BibliographyTableRow
};
xField->setPropertyValue("Fields", uno::Any(aFields));
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);