summaryrefslogtreecommitdiff
path: root/xmloff/source/text/txtparai.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/text/txtparai.cxx')
-rw-r--r--xmloff/source/text/txtparai.cxx22
1 files changed, 21 insertions, 1 deletions
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 5fffc202612a..bf905114a89c 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -41,6 +41,7 @@
#include <sax/tools/converter.hxx>
+#include <xmloff/prstylei.hxx>
#include <xmloff/xmlictxt.hxx>
#include <xmloff/xmlimp.hxx>
#include <xmloff/xmltoken.hxx>
@@ -1675,6 +1676,10 @@ XMLParaContext::XMLParaContext(
nStartValue = sal::static_int_cast< sal_Int16 >(aIter.toInt32());
}
break;
+ case XML_ELEMENT(LO_EXT, XML_MARKER_STYLE_NAME):
+ if (auto pStyle = rImport.GetTextImport()->FindAutoCharStyle(aIter.toString()))
+ m_aMarkerStyleName = pStyle->GetAutoName();
+ break;
default:
XMLOFF_WARN_UNKNOWN("xmloff", aIter);
}
@@ -1720,6 +1725,21 @@ void XMLParaContext::endFastElement(sal_Int32 )
// insert a paragraph break
xTxtImport->InsertControlCharacter( ControlCharacter::APPEND_PARAGRAPH );
+ if (m_aMarkerStyleName.hasValue())
+ {
+ if (auto xPropSet = xStart.query<css::beans::XPropertySet>())
+ {
+ try
+ {
+ xPropSet->setPropertyValue("ListAutoFormat", m_aMarkerStyleName);
+ }
+ catch (const css::beans::UnknownPropertyException&)
+ {
+ // no problem
+ }
+ }
+ }
+
// create a cursor that select the whole last paragraph
Reference < XTextCursor > xAttrCursor;
try {
@@ -1832,7 +1852,7 @@ void XMLParaContext::endFastElement(sal_Int32 )
{
bool bSetNoFormatAttr = false;
uno::Reference<beans::XPropertySet> xCursorProps(xAttrCursor, uno::UNO_QUERY);
- if (m_xHints->GetHints().size() > 1)
+ if (m_xHints->GetHints().size() > 1 || m_aMarkerStyleName.hasValue())
{
// We have multiple hints, then make try to ask the cursor to not upgrade our character
// attributes to paragraph-level formatting, which would lead to incorrect rendering.