diff options
Diffstat (limited to 'xmloff/source')
-rw-r--r-- | xmloff/source/core/xmltoken.cxx | 1 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 9 | ||||
-rw-r--r-- | xmloff/source/text/xmlcontentcontrolcontext.cxx | 13 | ||||
-rw-r--r-- | xmloff/source/text/xmlcontentcontrolcontext.hxx | 1 | ||||
-rw-r--r-- | xmloff/source/token/tokens.txt | 1 |
5 files changed, 25 insertions, 0 deletions
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 1606dbc68ab3..71d10f72d338 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -3504,6 +3504,7 @@ namespace xmloff::token { TOKEN("picture", XML_PICTURE), TOKEN("date-format", XML_DATE_FORMAT), TOKEN("date-rfc-language-tag", XML_DATE_RFC_LANGUAGE_TAG), + TOKEN("plain-text", XML_PLAIN_TEXT), TOKEN("fill-use-slide-background", XML_FILL_USE_SLIDE_BACKGROUND), diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 13378e3902e2..7305d5a20842 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -4008,6 +4008,15 @@ void XMLTextParagraphExport::ExportContentControl( { GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_CURRENT_DATE, aCurrentDate); } + + bool bPlainText = false; + xPropertySet->getPropertyValue("PlainText") >>= bPlainText; + if (bPlainText) + { + OUStringBuffer aBuffer; + sax::Converter::convertBool(aBuffer, bPlainText); + GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, XML_PLAIN_TEXT, aBuffer.makeStringAndClear()); + } } SvXMLElementExport aElem(GetExport(), bExport, XML_NAMESPACE_LO_EXT, XML_CONTENT_CONTROL, false, diff --git a/xmloff/source/text/xmlcontentcontrolcontext.cxx b/xmloff/source/text/xmlcontentcontrolcontext.cxx index a597a28a686c..ea3b90299664 100644 --- a/xmloff/source/text/xmlcontentcontrolcontext.cxx +++ b/xmloff/source/text/xmlcontentcontrolcontext.cxx @@ -117,6 +117,14 @@ void XMLContentControlContext::startFastElement( m_aCurrentDate = rIter.toString(); break; } + case XML_ELEMENT(LO_EXT, XML_PLAIN_TEXT): + { + if (sax::Converter::convertBool(bTmp, rIter.toView())) + { + m_bPlainText = bTmp; + } + break; + } default: XMLOFF_WARN_UNKNOWN("xmloff", rIter); } @@ -202,6 +210,11 @@ void XMLContentControlContext::endFastElement(sal_Int32) { xPropertySet->setPropertyValue("CurrentDate", uno::Any(m_aCurrentDate)); } + + if (m_bPlainText) + { + xPropertySet->setPropertyValue("PlainText", uno::Any(m_bPlainText)); + } } css::uno::Reference<css::xml::sax::XFastContextHandler> diff --git a/xmloff/source/text/xmlcontentcontrolcontext.hxx b/xmloff/source/text/xmlcontentcontrolcontext.hxx index 2c3ecfb9cafb..59c852419b6c 100644 --- a/xmloff/source/text/xmlcontentcontrolcontext.hxx +++ b/xmloff/source/text/xmlcontentcontrolcontext.hxx @@ -48,6 +48,7 @@ class XMLContentControlContext : public SvXMLImportContext OUString m_aDateFormat; OUString m_aDateLanguage; OUString m_aCurrentDate; + bool m_bPlainText = false; public: XMLContentControlContext(SvXMLImport& rImport, sal_Int32 nElement, XMLHints_Impl& rHints, diff --git a/xmloff/source/token/tokens.txt b/xmloff/source/token/tokens.txt index 568122e0f582..0a3b256d2b99 100644 --- a/xmloff/source/token/tokens.txt +++ b/xmloff/source/token/tokens.txt @@ -3247,5 +3247,6 @@ display-text picture date-format date-rfc-language-tag +plain-text fill-use-slide-background TOKEN_END_DUMMY |