summaryrefslogtreecommitdiffstats
path: root/include/editeng
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2017-10-30 12:21:49 +0900
committerTomaž Vajngerl <quikee@gmail.com>2017-11-01 11:15:35 +0100
commit2884d57d4717afc3c31baee0ebc4a3e8b1c1d2f2 (patch)
tree7895b0b38b75fd35011ed24245d81a9340246c13 /include/editeng
parentTSCP: simplify key creation and detection (diff)
downloadcore-2884d57d4717afc3c31baee0ebc4a3e8b1c1d2f2.tar.gz
core-2884d57d4717afc3c31baee0ebc4a3e8b1c1d2f2.zip
TSCP: Support DocInfo.Custom field for ODP file format
Impress has a limited support for fields - this includes support for DocInfo.Custom field, which shows the user defined custom fields that are used in TSCP. This commit adds minimal support (only what is needed for TSCP) for DocInfo.Custom field but only supports string fields for now. It is not possible to add the field manually, at least not until the full support is added. Change-Id: Ib3b73ab22fd4fe65ab6fb5173fe035a3359deea5 Reviewed-on: https://gerrit.libreoffice.org/44041 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/editeng')
-rw-r--r--include/editeng/CustomPropertyField.hxx18
-rw-r--r--include/editeng/unonames.hxx6
2 files changed, 17 insertions, 7 deletions
diff --git a/include/editeng/CustomPropertyField.hxx b/include/editeng/CustomPropertyField.hxx
index 3d862007c1f6..687b4a171375 100644
--- a/include/editeng/CustomPropertyField.hxx
+++ b/include/editeng/CustomPropertyField.hxx
@@ -26,26 +26,32 @@ namespace editeng
class EDITENG_DLLPUBLIC CustomPropertyField : public SvxFieldData
{
private:
- OUString msKey;
+ OUString msName;
+ OUString msCurrentPresentation;
public:
CustomPropertyField();
- explicit CustomPropertyField(OUString const & rKey);
+ explicit CustomPropertyField(OUString const & rName, OUString const & rCurrentPresentation);
virtual ~CustomPropertyField() override;
- SV_DECL_PERSIST1(CustomPropertyField, css::text::textfield::Type::CUSTOM_PROPERTY)
+ SV_DECL_PERSIST1(CustomPropertyField, css::text::textfield::Type::DOCINFO_CUSTOM)
virtual SvxFieldData* Clone() const override;
virtual bool operator==(const SvxFieldData&) const override;
virtual MetaAction* createBeginComment() const override;
- OUString GetFormatted(css::uno::Reference<css::document::XDocumentProperties> const & xDocumentProperties) const;
+ OUString GetFormatted(css::uno::Reference<css::document::XDocumentProperties> const & xDocumentProperties);
- OUString GetKey() const
+ OUString GetName() const
{
- return msKey;
+ return msName;
+ }
+
+ OUString GetCurrentPresentation() const
+ {
+ return msCurrentPresentation;
}
};
diff --git a/include/editeng/unonames.hxx b/include/editeng/unonames.hxx
index f3e3a8047e67..de2e1fcf6c47 100644
--- a/include/editeng/unonames.hxx
+++ b/include/editeng/unonames.hxx
@@ -15,11 +15,15 @@
#define UNO_TC_PROP_TEXTFIELD_TYPE "TextFieldType"
#define UNO_TC_PROP_IS_FIXED "IsFixed"
#define UNO_TC_PROP_CURRENT_PRESENTATION "CurrentPresentation"
+#define UNO_TC_PROP_NAME "Name"
+#define UNO_TC_PROP_IS_FIXED_LANGUAGE "IsFixedLanguage"
+#define UNO_TC_PROP_NUMFORMAT "NumberFormat"
+#define UNO_TC_PROP_USED "IsFieldUsed"
+#define UNO_TC_PROP_DISPLAYED "IsFieldDisplayed"
// Date & Time
#define UNO_TC_PROP_IS_DATE "IsDate"
#define UNO_TC_PROP_DATE_TIME "DateTime"
-#define UNO_TC_PROP_NUMFORMAT "NumberFormat"
// URL
#define UNO_TC_PROP_URL_FORMAT "Format"