summaryrefslogtreecommitdiff
path: root/offapi
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-10-26 10:03:04 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-10-26 15:34:30 +0200
commit23272c0cfe01d0719572bc80733833f6f8c09f24 (patch)
tree7c20093a1d6a8b524dfb6587c47ca90147601fd2 /offapi
parent3005bd3793e76f8c010a9e774cfb508de406a3d1 (diff)
sw content controls: enable data binding for date
The document had a 2022 date in document.xml, but had a 2012 date in data binding. Writer used to show 2022, while Word picks 2012. Data binding for dates were disabled in commit de90c192cb8f1f03a4028493d8bfe9a127a76b2a (sw content controls, plain text: enable DOCX filter with data binding, 2022-09-19), because the formatting of those date timestamps were missing, so it was better to just not update them from data binding, temporarily. Fix the problem by adding a new read-only DateString property on SwXContentControl, this way the import filter can set not only the timestamp but the formatted date as well. This shares the SwContentControl::GetDateString() code with the UI, which already had the need in the past to turn a timestamp into a date string, based on a provided language and date format. (cherry picked from commit 58002ab85d992c7ac44d8bb4d135246b67aa5cc7) Conflicts: sw/source/core/unocore/unomap1.cxx Change-Id: I842a9483a675f895129a9854caec347be6b6b84e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141867 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'offapi')
-rw-r--r--offapi/com/sun/star/text/ContentControl.idl10
1 files changed, 8 insertions, 2 deletions
diff --git a/offapi/com/sun/star/text/ContentControl.idl b/offapi/com/sun/star/text/ContentControl.idl
index 8f390665c2b3..ae8a0e1a9396 100644
--- a/offapi/com/sun/star/text/ContentControl.idl
+++ b/offapi/com/sun/star/text/ContentControl.idl
@@ -100,17 +100,23 @@ service ContentControl
*/
[optional, property] boolean ComboBox;
- /** The alias: just remembered.
+ /** The alias: kind of a human-readable title / description, show up on the UI.
@since LibreOffice 7.5
*/
[optional, property] string Alias;
- /** The tag: just remembered.
+ /** The tag: similar to Alias, but is meant to be machine-readable.
@since LibreOffice 7.5
*/
[optional, property] string Tag;
+
+ /** The formatted date string, based on DateFormat, DateLanguage and CurrentDate.
+
+ @since LibreOffice 7.5
+ */
+ [optional, property, readonly] string DateString;
};