summaryrefslogtreecommitdiff
path: root/xmloff/inc
diff options
context:
space:
mode:
authorJonathan Clark <jonathan@libreoffice.org>2024-10-21 11:31:46 -0600
committerJonathan Clark <jonathan@libreoffice.org>2024-11-02 01:09:52 +0100
commit43cd683230bc05d294b1bd64f1e7932feccdd3fb (patch)
tree8490101ef265632d22d3594d926575abfac3c7a5 /xmloff/inc
parentdb7cd5032068c5b9faa4c707db204b58c1dbf2b2 (diff)
tdf#36709 Add loext:text-indent supporting font-relative units
This change adds an ODF font-relative first-line indent paragraph style attribute as a LibreOffice extension. The corresponding ODF standard change is tracked by OFFICE-4165. This change only implements what is minimally necessary to serialize, deserialize, and check for ODF files containing this attribute. Further changes are necessary. * Added cssLength to schema, which is equivalent to length but also allows ic and em as units. * Added loext:text-indent to schema as a paragraph style attribute. This attribute is equivalent to fo:text-indent, but accepts cssLength instead of length. * Added XML_TYPE_UNIT_MEASURE to the ODF parser, which currently accepts only the font-relative measures and forces fallback in other cases. * Added loext:text-indent to the ODF parser. This attribute accepts font-relative metrics, and will behave as an import-only alias for fo:text-indent in other cases. * Updated SvxFirstLineIndentItem to handle unit-denominated measures. * Added proof-of-concept indentation handler to Writer. This implementation is incomplete and temporary, and will be revised in future changes. Change-Id: I7eb5c7382093cb18a9b0afbf93dacb34ba1d35ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175941 Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Diffstat (limited to 'xmloff/inc')
-rw-r--r--xmloff/inc/xmlbahdl.hxx10
-rw-r--r--xmloff/inc/xmlprop.hxx1
2 files changed, 11 insertions, 0 deletions
diff --git a/xmloff/inc/xmlbahdl.hxx b/xmloff/inc/xmlbahdl.hxx
index 09e392d6cc6b..7736d6d2f432 100644
--- a/xmloff/inc/xmlbahdl.hxx
+++ b/xmloff/inc/xmlbahdl.hxx
@@ -69,6 +69,16 @@ public:
};
/**
+ PropertyHandler for the XML-data-type: XML_TYPE_UNIT_MEASURE
+*/
+class XMLUnitMeasurePropHdl : public XMLPropertyHandler
+{
+public:
+ bool importXML( const OUString& rStrImpValue, css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const override;
+ bool exportXML( OUString& rStrExpValue, const css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const override;
+};
+
+/**
PropertyHandler for the XML-data-type: XML_TYPE_PERCENT
*/
class XMLPercentPropHdl : public XMLPropertyHandler
diff --git a/xmloff/inc/xmlprop.hxx b/xmloff/inc/xmlprop.hxx
index b7acca175a1d..8f47e328ff44 100644
--- a/xmloff/inc/xmlprop.hxx
+++ b/xmloff/inc/xmlprop.hxx
@@ -489,6 +489,7 @@ inline constexpr OUString PROP_ParaContextMargin = u"ParaContextMargin"_ustr;
inline constexpr OUString PROP_ParaExpandSingleWord = u"ParaExpandSingleWord"_ustr;
inline constexpr OUString PROP_ParaFirstLineIndent = u"ParaFirstLineIndent"_ustr;
inline constexpr OUString PROP_ParaFirstLineIndentRelative = u"ParaFirstLineIndentRelative"_ustr;
+inline constexpr OUString PROP_ParaFirstLineIndentUnit = u"ParaFirstLineIndentUnit"_ustr;
inline constexpr OUString PROP_ParaHyphenationMaxHyphens = u"ParaHyphenationMaxHyphens"_ustr;
inline constexpr OUString PROP_ParaHyphenationMaxLeadingChars
= u"ParaHyphenationMaxLeadingChars"_ustr;