diff options
-rw-r--r-- | include/xmloff/controlpropertyhdl.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/forms/controlpropertyhdl.cxx | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/include/xmloff/controlpropertyhdl.hxx b/include/xmloff/controlpropertyhdl.hxx index edcbd476f915..dd7010cc0f8f 100644 --- a/include/xmloff/controlpropertyhdl.hxx +++ b/include/xmloff/controlpropertyhdl.hxx @@ -30,6 +30,7 @@ #include <rtl/ustring.hxx> #include <xmloff/xmlexppr.hxx> #include <xmloff/XMLConstantsPropertyHandler.hxx> +#include <xmloff/NamedBoolPropertyHdl.hxx> template<typename EnumT> struct SvXMLEnumMapEntry; class Color; @@ -119,6 +120,7 @@ namespace xmloff mutable std::unique_ptr<OFontWidthHandler> m_pFontWidthHandler; mutable std::unique_ptr<XMLConstantsPropertyHandler> m_pFontEmphasisHandler; mutable std::unique_ptr<XMLConstantsPropertyHandler> m_pFontReliefHandler; + mutable std::unique_ptr<XMLNamedBoolPropertyHdl> m_pTextLineModeHandler; public: OControlPropertyHandlerFactory(); diff --git a/xmloff/source/forms/controlpropertyhdl.cxx b/xmloff/source/forms/controlpropertyhdl.cxx index ba5a27f8661d..839789167e9e 100644 --- a/xmloff/source/forms/controlpropertyhdl.cxx +++ b/xmloff/source/forms/controlpropertyhdl.cxx @@ -99,9 +99,13 @@ namespace xmloff pHandler = m_pFontReliefHandler.get(); break; case XML_TYPE_TEXT_LINE_MODE: - pHandler = new XMLNamedBoolPropertyHdl( - ::xmloff::token::XML_SKIP_WHITE_SPACE, - ::xmloff::token::XML_CONTINUOUS); + if (!m_pTextLineModeHandler) + { + m_pTextLineModeHandler = o3tl::make_unique<XMLNamedBoolPropertyHdl>( + ::xmloff::token::XML_SKIP_WHITE_SPACE, + ::xmloff::token::XML_CONTINUOUS); + } + pHandler = m_pTextLineModeHandler.get(); break; } |