24#include <rtl/ustrbuf.hxx>
27#include <osl/diagnose.h>
28#include <com/sun/star/lang/XServiceInfo.hpp>
29#include <com/sun/star/container/XEnumerationAccess.hpp>
30#include <com/sun/star/container/XEnumeration.hpp>
31#include <com/sun/star/container/XIndexReplace.hpp>
32#include <com/sun/star/beans/XPropertySet.hpp>
33#include <com/sun/star/beans/XMultiPropertySet.hpp>
34#include <com/sun/star/beans/XPropertyState.hpp>
35#include <com/sun/star/beans/UnknownPropertyException.hpp>
36#include <com/sun/star/graphic/XGraphic.hpp>
37#include <com/sun/star/text/XTextDocument.hpp>
38#include <com/sun/star/text/XTextSectionsSupplier.hpp>
39#include <com/sun/star/text/XTextTablesSupplier.hpp>
40#include <com/sun/star/text/XNumberingRulesSupplier.hpp>
41#include <com/sun/star/text/XChapterNumberingSupplier.hpp>
42#include <com/sun/star/text/XTextTable.hpp>
43#include <com/sun/star/text/XText.hpp>
44#include <com/sun/star/text/XTextContent.hpp>
45#include <com/sun/star/text/XTextRange.hpp>
46#include <com/sun/star/text/XTextField.hpp>
47#include <com/sun/star/container/XNamed.hpp>
48#include <com/sun/star/container/XContentEnumerationAccess.hpp>
49#include <com/sun/star/text/XTextFrame.hpp>
50#include <com/sun/star/container/XNameAccess.hpp>
51#include <com/sun/star/text/SizeType.hpp>
52#include <com/sun/star/text/HoriOrientation.hpp>
53#include <com/sun/star/text/VertOrientation.hpp>
54#include <com/sun/star/text/TextContentAnchorType.hpp>
55#include <com/sun/star/text/XTextFramesSupplier.hpp>
56#include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
57#include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp>
58#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
59#include <com/sun/star/document/XEmbeddedObjectSupplier.hpp>
60#include <com/sun/star/document/XEventsSupplier.hpp>
61#include <com/sun/star/document/XRedlinesSupplier.hpp>
62#include <com/sun/star/text/XFormField.hpp>
63#include <com/sun/star/text/XTextSection.hpp>
64#include <com/sun/star/drawing/XShape.hpp>
65#include <com/sun/star/style/XAutoStylesSupplier.hpp>
66#include <com/sun/star/style/XAutoStyleFamily.hpp>
67#include <com/sun/star/text/XTextFieldsSupplier.hpp>
68#include <com/sun/star/drawing/XControlShape.hpp>
69#include <com/sun/star/util/DateTime.hpp>
101#include <com/sun/star/embed/ElementModes.hpp>
102#include <com/sun/star/embed/XTransactedObject.hpp>
103#include <com/sun/star/document/XStorageBasedDocument.hpp>
105#include <com/sun/star/rdf/XMetadatable.hpp>
107#include <unordered_map>
112#include <officecfg/Office/Common.hxx>
162constexpr OUStringLiteral
gsRuby(u
"Ruby");
170constexpr OUStringLiteral
gsText(u
"Text");
194 typedef std::list<Reference<XTextContent>> contents_t;
195 typedef std::back_insert_iterator<contents_t> inserter_t;
196 typedef contents_t::const_iterator const_iterator_t;
198 inserter_t getInserter()
199 {
return std::back_insert_iterator<contents_t>(m_vTextContents); };
200 const_iterator_t getBegin()
const
201 {
return m_vTextContents.begin(); };
202 const_iterator_t getEnd()
const
203 {
return m_vTextContents.end(); };
206 contents_t m_vTextContents;
211 size_t operator()(
const Reference<XTextFrame>& rFrame)
const
212 {
return sal::static_int_cast<size_t>(
reinterpret_cast<sal_uIntPtr
>(rFrame.get())); }
215 bool lcl_TextContentsUnfiltered(
const Reference<XTextContent>&)
218 bool lcl_ShapeFilter(
const Reference<XTextContent>& xTxtContent)
220 Reference<XShape> xShape(xTxtContent, UNO_QUERY);
223 Reference<XServiceInfo> xServiceInfo(xTxtContent, UNO_QUERY);
224 return !xServiceInfo->supportsService(
"com.sun.star.text.TextFrame") &&
225 !xServiceInfo->supportsService(
"com.sun.star.text.TextGraphicObject") &&
226 !xServiceInfo->supportsService(
"com.sun.star.text.TextEmbeddedObject");
232 typedef bool (*filter_t)(
const Reference<XTextContent>&);
234 const Reference<XEnumerationAccess>& rEnumAccess,
235 const filter_t& rFilter)
236 : m_xEnumAccess(rEnumAccess)
242 const TextContentSet& GetPageBoundContents()
const
243 {
return m_vPageBounds; };
244 const TextContentSet* GetFrameBoundContents(
const Reference<XTextFrame>& rParentFrame)
const
246 framebound_map_t::const_iterator it = m_vFrameBoundsOf.find(rParentFrame);
247 if(it == m_vFrameBoundsOf.end())
249 return &(it->second);
251 Reference<XEnumeration> createEnumeration()
const
253 if(!m_xEnumAccess.is())
254 return Reference<XEnumeration>();
255 return m_xEnumAccess->createEnumeration();
259 typedef std::unordered_map<
260 Reference<XTextFrame>,
262 FrameRefHash> framebound_map_t;
263 TextContentSet m_vPageBounds;
264 framebound_map_t m_vFrameBoundsOf;
265 const Reference<XEnumerationAccess> m_xEnumAccess;
266 void Fill(
const filter_t& rFilter);
269 class FieldParamExporter
272 FieldParamExporter(
SvXMLExport*
const pExport, Reference<XNameContainer>
const & xFieldParams)
274 , m_xFieldParams(xFieldParams)
280 const Reference<XNameContainer> m_xFieldParams;
287 OUString href,
name, targetFrame, ustyleName, vstyleName;
288 bool serverMap =
false;
289 css::uno::Reference<css::container::XNameReplace> events;
291 HyperlinkData() =
default;
292 HyperlinkData(
const css::uno::Reference<css::beans::XPropertySet>& rPropSet);
301 HyperlinkData::HyperlinkData(
const css::uno::Reference<css::beans::XPropertySet>& rPropSet)
303 const css::uno::Reference<css::beans::XPropertyState> xPropState(rPropSet, UNO_QUERY);
304 const auto xPropSetInfo(rPropSet->getPropertySetInfo());
307 || PropertyState_DIRECT_VALUE == xPropState->getPropertyState(
gsHyperLinkURL)))
317 || PropertyState_DIRECT_VALUE == xPropState->getPropertyState(
gsHyperLinkName)))
324 || PropertyState_DIRECT_VALUE == xPropState->getPropertyState(
gsHyperLinkTarget)))
331 || PropertyState_DIRECT_VALUE == xPropState->getPropertyState(
gsServerMap)))
333 serverMap = *o3tl::doAccess<bool>(rPropSet->getPropertyValue(
gsServerMap));
338 || PropertyState_DIRECT_VALUE
346 || PropertyState_DIRECT_VALUE
352 static constexpr OUStringLiteral sHyperLinkEvents(u
"HyperLinkEvents");
353 if (xPropSetInfo->hasPropertyByName(sHyperLinkEvents))
355 events.set(rPropSet->getPropertyValue(sHyperLinkEvents), uno::UNO_QUERY);
361 if (href != rOther.href || name != rOther.name || targetFrame != rOther.targetFrame
362 || ustyleName != rOther.ustyleName || vstyleName != rOther.vstyleName
363 || serverMap != rOther.serverMap)
366 if (events == rOther.events)
368 if (!events || !rOther.events)
371 const css::uno::Sequence<OUString> aNames = events->getElementNames();
372 if (aNames != rOther.events->getElementNames())
374 for (
const auto& rName : aNames)
376 const css::uno::Any aAny = events->getByName(rName);
377 const css::uno::Any aOtherAny = rOther.events->getByName(rName);
378 if (aAny != aOtherAny)
384 bool HyperlinkData::addHyperlinkAttributes(
SvXMLExport& rExport)
389 OSL_ENSURE(
false,
"hyperlink without a URL --> no export to ODF");
399 if (!targetFrame.isEmpty())
409 if (!ustyleName.isEmpty())
413 if (!vstyleName.isEmpty())
420 void HyperlinkData::exportEvents(
SvXMLExport& rExport)
478 "ParaConditionalStyleName",
485enum eParagraphPropertyNamesEnumAuto
487 NUMBERING_RULES_AUTO = 0,
488 PARA_CONDITIONAL_STYLE_NAME_AUTO = 1,
489 PARA_STYLE_NAME_AUTO = 2
497 "NumberingStyleName",
499 "ParaConditionalStyleName",
502 "OutlineContentVisible",
508enum eParagraphPropertyNamesEnum
510 NUMBERING_IS_NUMBER = 0,
511 PARA_NUMBERING_STYLENAME = 1,
512 PARA_OUTLINE_LEVEL=2,
513 PARA_CONDITIONAL_STYLE_NAME = 3,
516 PARA_OUTLINE_CONTENT_VISIBLE = 6
521void BoundFrames::Fill(
const filter_t& rFilter)
523 if(!m_xEnumAccess.is())
525 const Reference< XEnumeration > xEnum = m_xEnumAccess->createEnumeration();
528 static constexpr OUStringLiteral our_sAnchorType(u
"AnchorType");
529 static constexpr OUStringLiteral our_sAnchorFrame(u
"AnchorFrame");
530 while(xEnum->hasMoreElements())
532 Reference<XPropertySet> xPropSet(xEnum->nextElement(), UNO_QUERY);
533 Reference<XTextContent> xTextContent(xPropSet, UNO_QUERY);
534 if(!xPropSet.is() || !xTextContent.is())
536 TextContentAnchorType eAnchor;
537 xPropSet->getPropertyValue(our_sAnchorType) >>= eAnchor;
538 if(TextContentAnchorType_AT_PAGE != eAnchor && TextContentAnchorType_AT_FRAME != eAnchor)
540 if(!rFilter(xTextContent))
543 TextContentSet::inserter_t pInserter = m_vPageBounds.getInserter();
544 if(TextContentAnchorType_AT_FRAME == eAnchor)
546 Reference<XTextFrame> xAnchorTxtFrame(
547 xPropSet->getPropertyValue(our_sAnchorFrame),
549 pInserter = m_vFrameBoundsOf[xAnchorTxtFrame].getInserter();
551 *pInserter++ = xTextContent;
555BoundFrameSets::BoundFrameSets(
const Reference<XInterface>& rModel)
556 : m_pTexts(new BoundFrames())
557 , m_pGraphics(new BoundFrames())
558 , m_pEmbeddeds(new BoundFrames())
559 , m_pShapes(new BoundFrames())
561 const Reference<XTextFramesSupplier> xTFS(rModel, UNO_QUERY);
562 const Reference<XTextGraphicObjectsSupplier> xGOS(rModel, UNO_QUERY);
563 const Reference<XTextEmbeddedObjectsSupplier> xEOS(rModel, UNO_QUERY);
564 const Reference<XDrawPageSupplier> xDPS(rModel, UNO_QUERY);
567 Reference<XEnumerationAccess>(xTFS->getTextFrames(), UNO_QUERY),
568 &lcl_TextContentsUnfiltered));
571 Reference<XEnumerationAccess>(xGOS->getGraphicObjects(), UNO_QUERY),
572 &lcl_TextContentsUnfiltered));
575 Reference<XEnumerationAccess>(xEOS->getEmbeddedObjects(), UNO_QUERY),
576 &lcl_TextContentsUnfiltered));
579 Reference<XEnumerationAccess>(xDPS->getDrawPage(), UNO_QUERY),
583void FieldParamExporter::Export()
589 const Sequence<OUString> vParameters(m_xFieldParams->getElementNames());
590 for(
const auto & rParameter : vParameters)
592 const Any aValue = m_xFieldParams->getByName(rParameter);
593 const Type& aValueType = aValue.getValueType();
594 if(aValueType == aStringType)
603 Reference< embed::XStorage > xTargetStg = m_pExport->GetTargetStorage();
604 if (xTargetStg.is()) {
605 Reference< embed::XStorage > xDstStg = xTargetStg->openStorageElement(
606 "OLELinks", embed::ElementModes::WRITE );
608 if ( !xDstStg->hasByName( sValue ) ) {
609 Reference< XStorageBasedDocument > xStgDoc (
610 m_pExport->GetModel( ), UNO_QUERY );
611 Reference< embed::XStorage > xDocStg = xStgDoc->getDocumentStorage();
612 Reference< embed::XStorage > xOleStg = xDocStg->openStorageElement(
613 "OLELinks", embed::ElementModes::READ );
615 xOleStg->copyElementTo( sValue, xDstStg, sValue );
616 Reference< embed::XTransactedObject > xTransact( xDstStg, UNO_QUERY );
617 if ( xTransact.is( ) )
618 xTransact->commit( );
621 SAL_WARN(
"xmloff",
"no target storage");
625 else if(aValueType == aBoolType)
631 else if(aValueType == aSeqType)
633 Sequence<OUString> vValue;
635 for(
const OUString & i : std::as_const(vValue))
640 else if(aValueType == aIntType)
658 const Reference < XPropertySet > & rPropSet,
666 xPropMapper = GetParaPropMapper();
669 xPropMapper = GetTextPropMapper();
672 xPropMapper = GetAutoFramePropMapper();
675 xPropMapper = GetSectionPropMapper();
678 xPropMapper = GetRubyPropMapper();
682 SAL_WARN_IF( !xPropMapper.is(),
"xmloff",
"There is the property mapper?" );
684 std::vector< XMLPropertyState > aPropStates =
685 xPropMapper->Filter(GetExport(), rPropSet);
687 aPropStates.insert( aPropStates.end(), aAddStates.
begin(), aAddStates.
end() );
689 if( aPropStates.empty() )
692 Reference< XPropertySetInfo > xPropSetInfo(rPropSet->getPropertySetInfo());
693 OUString sParent, sCondParent;
697 if( xPropSetInfo->hasPropertyByName( gsParaStyleName ) )
699 rPropSet->getPropertyValue( gsParaStyleName ) >>= sParent;
707 Reference < XIndexReplace > xNumRule(rPropSet->getPropertyValue(
gsNumberingRules ), uno::UNO_QUERY);
708 if( xNumRule.is() && xNumRule->getCount() )
710 Reference < XNamed > xNamed( xNumRule, UNO_QUERY );
713 sName = xNamed->getName();
714 bool bAdd =
sName.isEmpty();
717 Reference < XPropertySet > xNumPropSet( xNumRule,
719 if( xNumPropSet.is() &&
720 xNumPropSet->getPropertySetInfo()
721 ->hasPropertyByName(
"IsAutomatic" ) )
723 bAdd = *o3tl::doAccess<bool>(xNumPropSet->getPropertyValue(
"IsAutomatic" ));
726 xNumPropSet->getPropertySetInfo()
727 ->hasPropertyByName(
"NumberingIsOutline" ) )
729 bAdd = !(*o3tl::doAccess<bool>(xNumPropSet->getPropertyValue(
"NumberingIsOutline" )));
738 maListAutoPool.Add( xNumRule );
746 sal_uInt16 nIgnoreProps = 0;
747 for( ::std::vector< XMLPropertyState >::iterator
i(aPropStates.begin());
748 nIgnoreProps < 2 && i != aPropStates.end(); )
750 if(
i->mnIndex == -1 )
756 switch( xPM->GetEntryContextId(
i->mnIndex) )
762 i = aPropStates.erase( i );
772 if( xPropSetInfo->hasPropertyByName( gsFrameStyleName ) )
774 rPropSet->getPropertyValue( gsFrameStyleName ) >>= sParent;
783 if (aPropStates.size())
785 GetAutoStylePool().Add( nFamily, sParent, std::vector(aPropStates), bDontSeek );
786 if( !sCondParent.isEmpty() && sParent != sCondParent )
787 GetAutoStylePool().Add( nFamily, sCondParent, std::move(aPropStates) );
798 const Reference < XPropertySet > & rPropSet)
804 xPropMapper = GetParaPropMapper();
808 SAL_WARN_IF( !xPropMapper.is(),
"xmloff",
"There is the property mapper?" );
810 std::vector<XMLPropertyState> aPropStates(xPropMapper->Filter(GetExport(), rPropSet));
812 if( rPropSetHelper.
hasProperty( NUMBERING_RULES_AUTO ) )
814 Reference < XIndexReplace > xNumRule(rPropSetHelper.
getValue( NUMBERING_RULES_AUTO,
815 rPropSet,
true ), uno::UNO_QUERY);
816 if( xNumRule.is() && xNumRule->getCount() )
818 Reference < XNamed > xNamed( xNumRule, UNO_QUERY );
821 sName = xNamed->getName();
822 bool bAdd =
sName.isEmpty();
825 Reference < XPropertySet > xNumPropSet( xNumRule,
827 if( xNumPropSet.is() &&
828 xNumPropSet->getPropertySetInfo()
829 ->hasPropertyByName(
"IsAutomatic" ) )
831 bAdd = *o3tl::doAccess<bool>(xNumPropSet->getPropertyValue(
"IsAutomatic" ));
834 xNumPropSet->getPropertySetInfo()
835 ->hasPropertyByName(
"NumberingIsOutline" ) )
837 bAdd = !(*o3tl::doAccess<bool>(xNumPropSet->getPropertyValue(
"NumberingIsOutline" )));
846 maListAutoPool.Add( xNumRule );
850 if( aPropStates.empty() )
853 OUString sParent, sCondParent;
857 if( rPropSetHelper.
hasProperty( PARA_STYLE_NAME_AUTO ) )
859 rPropSetHelper.
getValue( PARA_STYLE_NAME_AUTO, rPropSet,
862 if( rPropSetHelper.
hasProperty( PARA_CONDITIONAL_STYLE_NAME_AUTO ) )
864 rPropSetHelper.
getValue( PARA_CONDITIONAL_STYLE_NAME_AUTO,
865 rPropSet,
true ) >>= sCondParent;
874 GetAutoStylePool().Add( nFamily, sParent, std::vector(aPropStates) );
875 if( !sCondParent.isEmpty() && sParent != sCondParent )
876 GetAutoStylePool().Add( nFamily, sCondParent, std::move(aPropStates) );
882 const Reference < XPropertySet > & rPropSet,
883 const OUString& rParent,
886 OUString
sName( rParent );
891 xPropMapper = GetParaPropMapper();
894 xPropMapper = GetAutoFramePropMapper();
897 xPropMapper = GetSectionPropMapper();
900 xPropMapper = GetRubyPropMapper();
904 SAL_WARN_IF( !xPropMapper.is(),
"xmloff",
"There is the property mapper?" );
905 if( !xPropMapper.is() )
907 std::vector<XMLPropertyState> aPropStates(xPropMapper->Filter(GetExport(), rPropSet));
908 aPropStates.insert( aPropStates.end(), aAddStates.
begin(), aAddStates.
end() );
910 sName = GetAutoStylePool().Find( nFamily,
sName, aPropStates );
916 const Reference < XPropertySet > & rPropSet,
917 bool& rbHasCharStyle,
918 bool& rbHasAutoStyle,
922 std::vector<XMLPropertyState> aPropStates(xPropMapper->Filter(GetExport(), rPropSet));
926 rbHasCharStyle = rbHasAutoStyle =
false;
927 sal_uInt16 nIgnoreProps = 0;
929 ::std::vector< XMLPropertyState >::iterator aFirstDel = aPropStates.end();
930 ::std::vector< XMLPropertyState >::iterator aSecondDel = aPropStates.end();
932 for( ::std::vector< XMLPropertyState >::iterator
933 i = aPropStates.begin();
934 nIgnoreProps < 2 &&
i != aPropStates.end();
937 if(
i->mnIndex == -1 )
940 switch( xPM->GetEntryContextId(
i->mnIndex) )
945 rbHasCharStyle = !
sName.isEmpty();
964 while( *ppAddStates )
966 aPropStates.push_back( **ppAddStates );
970 if (aPropStates.size() - nIgnoreProps)
979 aPropStates.erase( aSecondDel );
980 aPropStates.erase( aFirstDel );
982 sName = GetAutoStylePool().Find(
986 rbHasAutoStyle =
true;
1000 sal_uInt32 nListLevelsToBeClosed = 0;
1005 nListLevelsToBeClosed = rPrevInfo.
GetLevel();
1013 if ( nListLevelsToBeClosed > 0 &&
1014 maListElements.size() >= 2 * nListLevelsToBeClosed )
1017 for(
size_t j = 0; j < 2; ++j)
1019 OUString aElem(maListElements.back());
1020 maListElements.pop_back();
1021 GetExport().EndElement(aElem,
true);
1025 mpTextListsHelper->PopListFromStack();
1027 --nListLevelsToBeClosed;
1028 }
while ( nListLevelsToBeClosed > 0 );
1035 bool bRootListToBeStarted =
false;
1036 sal_Int16 nListLevelsToBeOpened = 0;
1041 bRootListToBeStarted =
true;
1042 nListLevelsToBeOpened = rNextInfo.
GetLevel();
1050 if ( nListLevelsToBeOpened > 0 )
1055 const OUString& sListId( rNextInfo.
GetListId() );
1056 bool bExportListStyle(
true );
1057 bool bRestartNumberingAtContinuedList(
false );
1058 sal_Int32 nRestartValueForContinuedList( -1 );
1059 bool bContinueingPreviousSubList = !bRootListToBeStarted &&
1062 GetExport().CheckAttrList();
1064 if ( bRootListToBeStarted )
1066 if ( !mpTextListsHelper->IsListProcessed( sListId ) )
1068 if ( ExportListId() &&
1078 mpTextListsHelper->KeepListAsProcessed( sListId,
1084 const OUString sNewListId(
1085 mpTextListsHelper->GenerateNewListId() );
1086 if ( ExportListId() &&
1097 const OUString sContinueListId =
1098 mpTextListsHelper->GetLastContinuingListId( sListId );
1101 mpTextListsHelper->StoreLastContinuingList( sListId,
1103 if ( sListStyleName ==
1104 mpTextListsHelper->GetListStyleOfLastProcessedList() &&
1107 mpTextListsHelper->GetLastProcessedListId() )
1115 if ( ExportListId() &&
1116 !sListId.isEmpty() )
1125 ( nListLevelsToBeOpened != 1 ||
1128 bRestartNumberingAtContinuedList =
true;
1129 nRestartValueForContinuedList =
1133 mpTextListsHelper->KeepListAsProcessed( sNewListId,
1139 GetExport().EncodeStyleName( sListStyleName ) );
1140 bExportListStyle =
false;
1142 bRootListToBeStarted =
false;
1144 else if ( bExportListStyle &&
1145 !mpTextListsHelper->EqualsToTopListStyleOnStack( sListStyleName ) )
1148 GetExport().EncodeStyleName( sListStyleName ) );
1149 bExportListStyle =
false;
1157 bRestartNumberingAtContinuedList =
true;
1158 nRestartValueForContinuedList =
1163 if ( bContinueingPreviousSubList )
1167 bContinueingPreviousSubList =
false;
1172 OUString aElem(GetExport().GetNamespaceMap().GetQNameByKey(
1175 GetExport().IgnorableWhitespace();
1176 GetExport().StartElement(aElem,
false);
1178 maListElements.push_back(aElem);
1180 mpTextListsHelper->PushListOnStack( sListId,
1184 GetExport().CheckAttrList();
1187 if ( nListLevelsToBeOpened == 1 )
1191 OUString aTmp = OUString::number(
static_cast<sal_Int32
>(rNextInfo.
GetStartValue()) );
1195 else if (bRestartNumberingAtContinuedList)
1199 OUString::number(nRestartValueForContinuedList) );
1200 bRestartNumberingAtContinuedList =
false;
1204 eLName = ( rNextInfo.
IsNumbered() || nListLevelsToBeOpened > 1 )
1207 aElem = GetExport().GetNamespaceMap().GetQNameByKey(
1210 GetExport().IgnorableWhitespace();
1211 GetExport().StartElement(aElem,
false);
1212 maListElements.push_back(aElem);
1215 if ( GetExport().exportTextNumberElement() &&
1219 const OUString aTextNumberElem =
1220 GetExport().GetNamespaceMap().GetQNameByKey(
1223 GetExport().IgnorableWhitespace();
1224 GetExport().StartElement( aTextNumberElem,
false );
1226 GetExport().EndElement( aTextNumberElem,
true );
1228 --nListLevelsToBeOpened;
1229 }
while ( nListLevelsToBeOpened > 0 );
1233 bool bEndElement =
false;
1240 assert(maListElements.size() >= 2 &&
"list elements missing");
1241 bEndElement = maListElements.size() >= 2;
1248 GetExport().EndElement(maListElements.back(),
true );
1249 maListElements.pop_back();
1256 GetExport().EndElement(maListElements.back(),
true );
1257 GetExport().IgnorableWhitespace();
1258 GetExport().StartElement(maListElements.back(),
false);
1262 GetExport().CheckAttrList();
1265 OUString aTmp = OUString::number(
static_cast<sal_Int32
>(rNextInfo.
GetStartValue()) );
1279 if ( !mpTextListsHelper->EqualsToTopListStyleOnStack( sListStyleName ) )
1283 GetExport().EncodeStyleName( sListStyleName ) );
1286 OUString aElem( GetExport().GetNamespaceMap().GetQNameByKey(
1289 GetExport().IgnorableWhitespace();
1290 GetExport().StartElement(aElem,
false );
1291 maListElements.push_back(aElem);
1294 if ( GetExport().exportTextNumberElement() &&
1297 const OUString aTextNumberElem =
1298 GetExport().GetNamespaceMap().GetQNameByKey(
1301 GetExport().IgnorableWhitespace();
1302 GetExport().StartElement( aTextNumberElem,
false );
1304 GetExport().EndElement( aTextNumberElem,
true );
1317 assert(m_FieldMarkMap.find(i_xFieldMark) == m_FieldMarkMap.end());
1318 sal_Int32
const ret(m_FieldMarkMap.size());
1319 m_FieldMarkMap.insert(::std::make_pair(i_xFieldMark, ret));
1324 FieldMarkMap_t::const_iterator
const it(
1325 m_FieldMarkMap.find(i_xFieldMark));
1328 assert(it != m_FieldMarkMap.end());
1346 css::uno::Sequence<css::uno::Sequence<css::uno::Any>> nodes;
1347 if (
auto xPropSet =
xModel.query<css::beans::XPropertySet>())
1352 xPropSet->getPropertyValue(
"ODFExport_ListNodes") >>= nodes;
1354 catch (css::beans::UnknownPropertyException&)
1360 docListNodes.reserve(nodes.getLength());
1361 for (
const auto& node : nodes)
1363 assert(node.getLength() == 3);
1364 docListNodes.push_back({ node[0].get<sal_Int32>(), node[1].get<sal_uInt64>(),
1365 node[2].get<OUString>() });
1368 std::sort(docListNodes.begin(), docListNodes.end(),
1369 [](
const NodeData& lhs,
const NodeData& rhs) { return lhs.index < rhs.index; });
1373 if (docListNodes.empty())
1376 if (
auto xPropSet = xTextContent.query<css::beans::XPropertySet>())
1378 sal_Int32
index = 0;
1382 xPropSet->getPropertyValue(
"ODFExport_NodeIndex") >>=
index;
1384 catch (css::beans::UnknownPropertyException&)
1390 auto it = std::lower_bound(docListNodes.begin(), docListNodes.end(),
index,
1391 [](
const NodeData& lhs, sal_Int32 rhs)
1392 { return lhs.index < rhs; });
1393 if (it == docListNodes.end() || it->index !=
index)
1399 for (
auto next = it + 1; next != docListNodes.end(); ++next)
1401 if (it->list_id != next->list_id)
1405 return std::find_if(next + 1, docListNodes.end(),
1406 [list_id = it->list_id](
const NodeData& data)
1407 { return data.list_id == list_id; })
1408 == docListNodes.end();
1411 if (it->style_id != next->style_id)
1416 if (it->index + 1 != next->index)
1439 m_rAutoStylePool( rASP ),
1440 m_pBoundFrameSets(new BoundFrameSets(GetExport().GetModel())),
1441 maListAutoPool( GetExport() ),
1442 m_bProgress( false ),
1444 m_bOpenRuby( false ),
1445 mpTextListsHelper( nullptr ),
1447 m_aCharStyleNamesPropInfoCache( gsCharStyleNames )
1454 OUString aPrefix(
u'P');
1497 Reference<XRedlinesSupplier>(
GetExport().GetModel(), UNO_QUERY ).is())
1523 "misusage of text lists helper stack - it is not empty. Serious defect" );
1560 const TextContentSet& rTexts =
m_pBoundFrameSets->GetTexts()->GetPageBoundContents();
1561 const TextContentSet& rGraphics =
m_pBoundFrameSets->GetGraphics()->GetPageBoundContents();
1562 const TextContentSet& rEmbeddeds =
m_pBoundFrameSets->GetEmbeddeds()->GetPageBoundContents();
1563 const TextContentSet& rShapes =
m_pBoundFrameSets->GetShapes()->GetPageBoundContents();
1564 for(TextContentSet::const_iterator_t it = rTexts.getBegin();
1565 it != rTexts.getEnd();
1568 for(TextContentSet::const_iterator_t it = rGraphics.getBegin();
1569 it != rGraphics.getEnd();
1572 for(TextContentSet::const_iterator_t it = rEmbeddeds.getBegin();
1573 it != rEmbeddeds.getEnd();
1576 for(TextContentSet::const_iterator_t it = rShapes.getBegin();
1577 it != rShapes.getEnd();
1585 const Reference < XTextFrame >& rParentTxtFrame )
1587 const TextContentSet*
const pTexts =
m_pBoundFrameSets->GetTexts()->GetFrameBoundContents(rParentTxtFrame);
1589 for(TextContentSet::const_iterator_t it = pTexts->getBegin();
1590 it != pTexts->getEnd();
1593 const TextContentSet*
const pGraphics =
m_pBoundFrameSets->GetGraphics()->GetFrameBoundContents(rParentTxtFrame);
1595 for(TextContentSet::const_iterator_t it = pGraphics->getBegin();
1596 it != pGraphics->getEnd();
1599 const TextContentSet*
const pEmbeddeds =
m_pBoundFrameSets->GetEmbeddeds()->GetFrameBoundContents(rParentTxtFrame);
1601 for(TextContentSet::const_iterator_t it = pEmbeddeds->getBegin();
1602 it != pEmbeddeds->getEnd();
1605 const TextContentSet*
const pShapes =
m_pBoundFrameSets->GetShapes()->GetFrameBoundContents(rParentTxtFrame);
1607 for(TextContentSet::const_iterator_t it = pShapes->getBegin();
1608 it != pShapes->getEnd();
1630 const bool bAutoStyles =
true;
1631 const bool bExportContent =
false;
1634 Reference< XAutoStylesSupplier > xAutoStylesSupp(
GetExport().GetModel(), UNO_QUERY );
1635 if ( xAutoStylesSupp.is() )
1637 Reference< XAutoStyles > xAutoStyleFamilies = xAutoStylesSupp->getAutoStyles();
1638 const auto collectFamily = [
this, &xAutoStyleFamilies](
const OUString&
sName,
1640 Any aAny = xAutoStyleFamilies->getByName(
sName );
1641 Reference< XAutoStyleFamily > xAutoStyles = *o3tl::doAccess<Reference<XAutoStyleFamily>>(aAny);
1642 Reference < XEnumeration > xAutoStylesEnum( xAutoStyles->createEnumeration() );
1644 while ( xAutoStylesEnum->hasMoreElements() )
1646 aAny = xAutoStylesEnum->nextElement();
1647 Reference< XAutoStyle > xAutoStyle = *o3tl::doAccess<Reference<XAutoStyle>>(aAny);
1648 Reference < XPropertySet > xPSet( xAutoStyle, uno::UNO_QUERY );
1649 Add( nFamily, xPSet, {}, true );
1658 Reference< XTextFieldsSupplier > xTextFieldsSupp(
GetExport().GetModel(), UNO_QUERY );
1659 if ( xTextFieldsSupp.is() )
1661 Reference< XEnumerationAccess > xTextFields = xTextFieldsSupp->getTextFields();
1662 Reference < XEnumeration > xTextFieldsEnum( xTextFields->createEnumeration() );
1664 while ( xTextFieldsEnum->hasMoreElements() )
1666 Any aAny = xTextFieldsEnum->nextElement();
1667 Reference< XTextField > xTextField = *o3tl::doAccess<Reference<XTextField>>(aAny);
1669 !xAutoStylesSupp.is(),
nullptr );
1672 Reference < XPropertySet > xSet( xTextField, UNO_QUERY );
1673 Reference < XText > xText;
1674 Any a = xSet->getPropertyValue(
"TextRange");
1678 exportText( xText,
true, bIsProgress, bExportContent );
1680 ->collectTextAutoStyles( xText );
1690 Reference<XEnumeration> xTextFramesEnum =
m_pBoundFrameSets->GetTexts()->createEnumeration();
1691 if(xTextFramesEnum.is())
1692 while(xTextFramesEnum->hasMoreElements())
1694 Reference<XTextContent> xTxtCntnt(xTextFramesEnum->nextElement(), UNO_QUERY);
1700 Reference<XEnumeration> xGraphicsEnum =
m_pBoundFrameSets->GetGraphics()->createEnumeration();
1701 if(xGraphicsEnum.is())
1702 while(xGraphicsEnum->hasMoreElements())
1704 Reference<XTextContent> xTxtCntnt(xGraphicsEnum->nextElement(), UNO_QUERY);
1710 Reference<XEnumeration> xEmbeddedsEnum =
m_pBoundFrameSets->GetEmbeddeds()->createEnumeration();
1711 if(xEmbeddedsEnum.is())
1712 while(xEmbeddedsEnum->hasMoreElements())
1714 Reference<XTextContent> xTxtCntnt(xEmbeddedsEnum->nextElement(), UNO_QUERY);
1720 Reference<XEnumeration> xShapesEnum =
m_pBoundFrameSets->GetShapes()->createEnumeration();
1721 if(xShapesEnum.is())
1722 while(xShapesEnum->hasMoreElements())
1724 Reference<XTextContent> xTxtCntnt(xShapesEnum->nextElement(), UNO_QUERY);
1727 Reference<XServiceInfo> xServiceInfo(xTxtCntnt, UNO_QUERY);
1735 Reference< XTextSectionsSupplier > xSectionsSupp(
GetExport().GetModel(), UNO_QUERY );
1736 if ( xSectionsSupp.is() )
1738 Reference< XIndexAccess > xSections( xSectionsSupp->getTextSections(), UNO_QUERY );
1739 if ( xSections.is() )
1741 nCount = xSections->getCount();
1744 Any aAny = xSections->getByIndex(
i );
1745 Reference< XTextSection > xSection = *o3tl::doAccess<Reference<XTextSection>>(aAny);
1746 Reference < XPropertySet > xPSet( xSection, uno::UNO_QUERY );
1753 Reference< XTextTablesSupplier > xTablesSupp(
GetExport().GetModel(), UNO_QUERY );
1754 if ( xTablesSupp.is() )
1756 Reference< XIndexAccess > xTables( xTablesSupp->getTextTables(), UNO_QUERY );
1759 nCount = xTables->getCount();
1762 Any aAny = xTables->getByIndex(
i );
1763 Reference< XTextTable > xTable = *o3tl::doAccess<Reference<XTextTable>>(aAny);
1769 Reference< XNumberingRulesSupplier > xNumberingRulesSupp(
GetExport().GetModel(), UNO_QUERY );
1770 if ( xNumberingRulesSupp.is() )
1772 Reference< XIndexAccess > xNumberingRules = xNumberingRulesSupp->getNumberingRules();
1773 nCount = xNumberingRules->getCount();
1777 Reference< XIndexReplace > xNumRule( xNumberingRules->getByIndex(
i ), UNO_QUERY );
1778 if( xNumRule.is() && xNumRule->getCount() )
1780 Reference < XNamed > xNamed( xNumRule, UNO_QUERY );
1783 sName = xNamed->getName();
1784 bool bAdd =
sName.isEmpty();
1787 Reference < XPropertySet > xNumPropSet( xNumRule,
1789 if( xNumPropSet.is() &&
1790 xNumPropSet->getPropertySetInfo()
1791 ->hasPropertyByName(
"IsAutomatic" ) )
1793 bAdd = *o3tl::doAccess<bool>(xNumPropSet->getPropertyValue(
"IsAutomatic" ));
1796 xNumPropSet->getPropertySetInfo()
1797 ->hasPropertyByName(
"NumberingIsOutline" ) )
1799 bAdd = !(*o3tl::doAccess<bool>(xNumPropSet->getPropertyValue(
"NumberingIsOutline" )));
1816 const Reference < XText > & rText,
1819 bool bExportParagraph,
1825 Reference < XEnumerationAccess > xEA( rText, UNO_QUERY );
1829 Reference < XEnumeration > xParaEnum(xEA->createEnumeration());
1830 Reference < XPropertySet > xPropertySet( rText, UNO_QUERY );
1831 Reference < XTextSection > xBaseSection;
1835 SAL_WARN_IF( !xParaEnum.is(),
"xmloff",
"We need a paragraph enumeration" );
1836 if( ! xParaEnum.is() )
1839 if (xPropertySet.is())
1841 Reference < XPropertySetInfo > xInfo ( xPropertySet->getPropertySetInfo() );
1847 xPropertySet->getPropertyValue(
gsTextSection) >>= xBaseSection ;
1857 bIsProgress, bExportParagraph,
nullptr, eExtensionNS );
1863 const Reference < XText > & rText,
1864 const Reference < XTextSection > & rBaseSection,
1867 bool bExportParagraph)
1872 Reference < XEnumerationAccess > xEA( rText, UNO_QUERY );
1873 Reference < XEnumeration > xParaEnum(xEA->createEnumeration());
1876 if( ! xParaEnum.is() )
1881 Reference<XPropertySet> xPropertySet;
1884 xPropertySet.set(rText, uno::UNO_QUERY );
1888 bIsProgress, bExportParagraph );
1913 const Reference < XEnumeration > & rContEnum,
1915 const Reference < XTextSection > & rBaseSection,
1917 bool bExportParagraph,
1918 const Reference < XPropertySet > *pRangePropSet,
1921 SAL_WARN_IF( !rContEnum.is(),
"xmloff",
"No enumeration to export!" );
1922 bool bHasMoreElements = rContEnum->hasMoreElements();
1923 if( !bHasMoreElements )
1929 bool bHasContent =
false;
1930 Reference<XTextSection> xCurrentTextSection(rBaseSection);
1936 bool bHoldElement =
false;
1937 Reference < XTextContent > xTxtCntnt;
1938 while( bHoldElement || bHasMoreElements )
1942 bHoldElement =
false;
1946 xTxtCntnt.set(rContEnum->nextElement(), uno::UNO_QUERY);
1952 Reference<XServiceInfo> xServiceInfo( xTxtCntnt, UNO_QUERY );
1958 aPrevNumInfo, aNextNumInfo,
1967 aNextNumInfo.
Set( xTxtCntnt,
1968 GetExport().writeOutlineStyleAsNormalListStyle(),
1975 aPrevNumInfo, aNextNumInfo,
1986 while (rContEnum->hasMoreElements() &&
1990 xTxtCntnt.set(rContEnum->nextElement(), uno::UNO_QUERY);
1992 aNextNumInfo.
Reset();
2001 bExportParagraph, aPropSetHelper, eExtensionNS );
2008 aNextNumInfo.
Reset();
2012 aPrevNumInfo, aNextNumInfo,
2021 exportTable( xTxtCntnt, bAutoStyles, bIsProgress );
2026 else if( !bAutoStyles )
2036 exportTextFrame( xTxtCntnt, bAutoStyles, bIsProgress,
true, pRangePropSet );
2048 exportShape( xTxtCntnt, bAutoStyles, pRangePropSet );
2052 SAL_WARN_IF( xTxtCntnt.is(),
"xmloff",
"unknown text content" );
2057 aPrevNumInfo = aNextNumInfo;
2060 bHasMoreElements = rContEnum->hasMoreElements();
2063 if( bHasContent && !bAutoStyles )
2065 aNextNumInfo.
Reset();
2069 aPrevNumInfo, aNextNumInfo,
2075 const Reference < XTextContent > & rTextContent,
2076 bool bAutoStyles,
bool bIsProgress,
bool bExportParagraph,
2079 sal_Int16 nOutlineLevel = -1;
2088 Reference<XMultiPropertySet> xMultiPropSet( rTextContent, UNO_QUERY );
2089 Reference<XPropertySet> xPropSet( rTextContent, UNO_QUERY );
2093 rPropSetHelper.
hasProperties( xPropSet->getPropertySetInfo() );
2100 if( bExportParagraph )
2113 if( rPropSetHelper.
hasProperty( PARA_STYLE_NAME ) )
2115 if( xMultiPropSet.is() )
2116 rPropSetHelper.
getValue( PARA_STYLE_NAME,
2117 xMultiPropSet ) >>= sStyle;
2119 rPropSetHelper.
getValue( PARA_STYLE_NAME,
2120 xPropSet ) >>= sStyle;
2123 if( rTextContent.is() )
2126 if( !rIdentifier.isEmpty() )
2132 uno::Reference<rdf::XMetadatable>
const xMeta(rTextContent,
2134 OSL_ENSURE(!xMeta.is(),
"paragraph that implements "
2135 "XMetadatable used in interfaceToIdentifierMapper?");
2142 if ( sAutoStyle.isEmpty() )
2143 sAutoStyle = sStyle;
2144 if( !sAutoStyle.isEmpty() )
2146 GetExport().EncodeStyleName( sAutoStyle ) );
2148 if( rPropSetHelper.
hasProperty( PARA_CONDITIONAL_STYLE_NAME ) )
2150 OUString sCondStyle;
2151 if( xMultiPropSet.is() )
2152 rPropSetHelper.
getValue( PARA_CONDITIONAL_STYLE_NAME,
2153 xMultiPropSet ) >>= sCondStyle;
2155 rPropSetHelper.
getValue( PARA_CONDITIONAL_STYLE_NAME,
2156 xPropSet ) >>= sCondStyle;
2157 if( sCondStyle != sStyle )
2161 if( !sCondStyle.isEmpty() )
2164 GetExport().EncodeStyleName( sCondStyle ) );
2168 if( rPropSetHelper.
hasProperty( PARA_OUTLINE_LEVEL ) )
2170 if( xMultiPropSet.is() )
2171 rPropSetHelper.
getValue( PARA_OUTLINE_LEVEL,
2172 xMultiPropSet ) >>= nOutlineLevel;
2174 rPropSetHelper.
getValue( PARA_OUTLINE_LEVEL,
2175 xPropSet ) >>= nOutlineLevel;
2177 if( 0 < nOutlineLevel )
2181 OUString::number( sal_Int32( nOutlineLevel) ) );
2183 if ( rPropSetHelper.
hasProperty( PARA_OUTLINE_CONTENT_VISIBLE ) )
2185 uno::Sequence<beans::PropertyValue> propList;
2186 bool bIsOutlineContentVisible =
true;
2187 if( xMultiPropSet.is() )
2189 PARA_OUTLINE_CONTENT_VISIBLE, xMultiPropSet ) >>= propList;
2192 PARA_OUTLINE_CONTENT_VISIBLE, xPropSet ) >>= propList;
2193 for (
const auto& rProp : std::as_const(propList))
2195 OUString propName = rProp.Name;
2196 if (propName ==
"OutlineContentVisibleAttr")
2198 rProp.Value >>= bIsOutlineContentVisible;
2202 if (!bIsOutlineContentVisible)
2210 if( rPropSetHelper.
hasProperty( NUMBERING_IS_NUMBER ) )
2212 bool bIsNumber =
false;
2213 if( xMultiPropSet.is() )
2215 NUMBERING_IS_NUMBER, xMultiPropSet ) >>= bIsNumber;
2218 NUMBERING_IS_NUMBER, xPropSet ) >>= bIsNumber;
2220 OUString sListStyleName;
2221 if( xMultiPropSet.is() )
2223 PARA_NUMBERING_STYLENAME, xMultiPropSet ) >>= sListStyleName;
2226 PARA_NUMBERING_STYLENAME, xPropSet ) >>= sListStyleName;
2228 bool bAssignedtoOutlineStyle =
false;
2230 Reference< XChapterNumberingSupplier > xCNSupplier(
GetExport().GetModel(), UNO_QUERY );
2232 if (xCNSupplier.is())
2234 Reference< XIndexReplace > xNumRule ( xCNSupplier->getChapterNumberingRules() );
2235 SAL_WARN_IF( !xNumRule.is(),
"xmloff",
"no chapter numbering rules" );
2239 Reference< XPropertySet > xNumRulePropSet( xNumRule, UNO_QUERY );
2240 OUString sOutlineName;
2241 xNumRulePropSet->getPropertyValue(
2242 "Name" ) >>= sOutlineName;
2243 bAssignedtoOutlineStyle = ( sListStyleName == sOutlineName );
2248 if( ! bIsNumber && bAssignedtoOutlineStyle )
2255 bool bIsRestartNumbering =
false;
2257 Reference< XPropertySetInfo >
2258 xPropSetInfo(xMultiPropSet.is() ?
2259 xMultiPropSet->getPropertySetInfo():
2260 xPropSet->getPropertySetInfo());
2263 hasPropertyByName(
"ParaIsNumberingRestart"))
2265 xPropSet->getPropertyValue(
"ParaIsNumberingRestart")
2266 >>= bIsRestartNumbering;
2269 if (bIsRestartNumbering)
2276 hasPropertyByName(
"NumberingStartValue"))
2278 sal_Int32 nStartValue = 0;
2280 xPropSet->getPropertyValue(
"NumberingStartValue")
2286 OUString::number(nStartValue));
2300 css::uno::Any aVal = xPropSet->getPropertyValue(
"ParaMarkerAutoStyleSpan");
2301 if (
auto xFakeSpan = aVal.query<css::beans::XPropertySet>())
2309 bool bIsUICharStyle, bHasAutoStyle;
2310 OUString sStyle =
FindTextStyle(xFakeSpan, bIsUICharStyle, bHasAutoStyle);
2311 if (!sStyle.isEmpty())
2319 catch (
const css::beans::UnknownPropertyException&)
2326 Reference < XEnumerationAccess > xEA( rTextContent, UNO_QUERY );
2327 Reference < XEnumeration > xTextEnum = xEA->createEnumeration();
2328 const bool bHasPortions = xTextEnum.is();
2330 Reference < XEnumeration> xContentEnum;
2331 Reference < XContentEnumerationAccess > xCEA( rTextContent, UNO_QUERY );
2334 const bool bHasContentEnum = xContentEnum.is() &&
2335 xContentEnum->hasMoreElements();
2337 Reference < XTextSection > xSection;
2338 if( bHasContentEnum )
2346 if( xPropSet->getPropertySetInfo()->hasPropertyByName(
gsTextSection ) )
2348 xSection.set(xPropSet->getPropertyValue(
gsTextSection ), uno::UNO_QUERY);
2360 bool bPrevCharIsSpace(
true);
2364 if( bHasContentEnum )
2366 xContentEnum, bAutoStyles, xSection,
2379 if( bHasContentEnum )
2382 xContentEnum, bAutoStyles, xSection,
2390 const Reference < XEnumeration > & rTextEnum,
2391 bool bAutoStyles,
bool bIsProgress,
2392 bool & rPrevCharIsSpace)
2394 static const char sFieldMarkName[] =
"__FieldMark_";
2400 std::optional<SvXMLElementExport> oTextA;
2401 HyperlinkData aHyperlinkData;
2403 while( rTextEnum->hasMoreElements() )
2405 Reference<XPropertySet> xPropSet(rTextEnum->nextElement(), UNO_QUERY);
2406 Reference < XTextRange > xTxtRange(xPropSet, uno::UNO_QUERY);
2407 Reference<XPropertySetInfo> xPropInfo(xPropSet->getPropertySetInfo());
2411 if (HyperlinkData aNewHyperlinkData(xPropSet); aNewHyperlinkData != aHyperlinkData)
2413 aHyperlinkData = aNewHyperlinkData;
2415 if (aHyperlinkData.addHyperlinkAttributes(
GetExport()))
2418 aHyperlinkData.exportEvents(
GetExport());
2431 rPrevCharIsSpace, openFieldMark);
2435 exportTextField(xTxtRange, bAutoStyles, bIsProgress, &rPrevCharIsSpace);
2437 else if (
sType ==
"Annotation" )
2439 exportTextField(xTxtRange, bAutoStyles, bIsProgress, &rPrevCharIsSpace);
2441 else if (
sType ==
"AnnotationEnd" )
2445 Reference<XNamed> xBookmark(xPropSet->getPropertyValue(
gsBookmark), UNO_QUERY);
2446 const OUString& rName = xBookmark->getName();
2447 if (!rName.isEmpty())
2456 Reference < XEnumeration> xContentEnum;
2457 Reference < XContentEnumerationAccess > xCEA( xTxtRange,
2460 xContentEnum.set(xCEA->createContentEnumeration(
2463 Reference<XTextSection> xSection;
2464 if( xContentEnum.is() )
2467 xSection, bIsProgress,
true,
2474 xTxtRange->getString(),
2475 bAutoStyles, bIsProgress );
2504 else if (
sType ==
"InContentMetadata")
2506 exportMeta(xPropSet, bAutoStyles, bIsProgress, rPrevCharIsSpace);
2508 else if (
sType ==
"ContentControl")
2514 Reference< css::text::XFormField > xFormField(xPropSet->getPropertyValue(
gsBookmark), UNO_QUERY);
2521 Reference<XNamed> xBookmark(xPropSet->getPropertyValue(
gsBookmark), UNO_QUERY);
2527 if (xFormField.is())
2533 if (xFormField.is())
2535 FieldParamExporter(&
GetExport(), xFormField->getParameters()).Export();
2542 if (xFormField.is())
2545 Reference< css::container::XNameAccess > xParameters = xFormField->getParameters();
2546 if (xParameters.is() && xParameters->hasByName(
"Name"))
2548 const Any aValue = xParameters->getByName(
"Name");
2551 if (
sName.isEmpty())
2554 sName = sFieldMarkName + OUString::number(
2555 m_xImpl->AddFieldMarkStart(xFormField));
2562 const OUString sFieldType = xFormField->getFieldType();
2565 openFieldMark =
TEXT;
2569 openFieldMark =
CHECK;
2573 openFieldMark =
NONE;
2595 Reference< css::text::XFormField > xFormField(xPropSet->getPropertyValue(
gsBookmark), UNO_QUERY);
2605 if (xFormField.is())
2608 Reference< css::container::XNameAccess > xParameters = xFormField->getParameters();
2609 if (xParameters.is() && xParameters->hasByName(
"Name"))
2611 const Any aValue = xParameters->getByName(
"Name");
2614 if (
sName.isEmpty())
2617 sName = sFieldMarkName + OUString::number(
2618 m_xImpl->GetFieldMarkIndex(xFormField));
2635 Reference<XNamed> xBookmark(xPropSet->getPropertyValue(
gsBookmark), UNO_QUERY);
2640 Reference< css::text::XFormField > xFormField(xPropSet->getPropertyValue(
gsBookmark), UNO_QUERY);
2641 if (xFormField.is())
2646 if (xFormField.is())
2648 FieldParamExporter(&
GetExport(), xFormField->getParameters()).Export();
2654 Reference<XNamed> xBookmark(xPropSet->getPropertyValue(
gsBookmark), UNO_QUERY);
2670 else if (
sType ==
"LineBreak")
2676 OSL_FAIL(
"unknown text portion type");
2681 Reference<XServiceInfo> xServiceInfo( xTxtRange, UNO_QUERY );
2684 exportTextField(xTxtRange, bAutoStyles, bIsProgress, &rPrevCharIsSpace);
2689 exportTextRange(xTxtRange, bAutoStyles, rPrevCharIsSpace, openFieldMark);
2699 const Reference < XTextContent > &,
2705 const Reference < XTextRange > & rTextRange,
2706 bool bAutoStyles,
bool bIsProgress,
bool *
const pPrevCharIsSpace)
2708 Reference < XPropertySet > xPropSet( rTextRange, UNO_QUERY );
2710 if (!xPropSet->getPropertySetInfo()->hasPropertyByName(
gsTextField ))
2713 Reference < XTextField > xTxtFld(xPropSet->getPropertyValue(
gsTextField ), uno::UNO_QUERY);
2714 SAL_WARN_IF( !xTxtFld.is(),
"xmloff",
"text field missing" );
2717 exportTextField(xTxtFld, bAutoStyles, bIsProgress,
true, pPrevCharIsSpace);
2727 const Reference < XTextField > & xTextField,
2728 const bool bAutoStyles,
const bool bIsProgress,
2729 const bool bRecursive,
bool *
const pPrevCharIsSpace)
2738 assert(pPrevCharIsSpace);
2739 m_pFieldExport->ExportField(xTextField, bIsProgress, *pPrevCharIsSpace);
2751 const uno::Reference<beans::XPropertySet>& xPropSet)
2760 uno::Reference<text::XTextContent> xLineBreak;
2761 xPropSet->getPropertyValue(
"LineBreak") >>= xLineBreak;
2762 if (!xLineBreak.is())
2767 uno::Reference<beans::XPropertySet> xLineBreakProps(xLineBreak, uno::UNO_QUERY);
2768 if (!xLineBreakProps.is())
2774 xLineBreakProps->getPropertyValue(
"Clear") >>= eClear;
2785 const Reference<XPropertySet> & rPropSet,
2786 const OUString& rProperty,
2802 Reference<XNamed> xName(rPropSet->getPropertyValue(rProperty), UNO_QUERY);
2808 if( *o3tl::doAccess<bool>(rPropSet->getPropertyValue(
gsIsCollapsed)) )
2814 nElement = *o3tl::doAccess<bool>(rPropSet->getPropertyValue(
gsIsStart)) ? 1 : 2;
2818 if( nElement < 2 ) {
2820 const uno::Reference<text::XTextContent> xTextContent(
2821 xName, uno::UNO_QUERY_THROW);
2828 Reference<XPropertySet> bkmkProps(rPropSet->getPropertyValue(rProperty), UNO_QUERY);
2829 Reference<XPropertySetInfo> bkmkPropInfo = bkmkProps->getPropertySetInfo();
2830 OUString
sHidden(
"BookmarkHidden");
2831 if (bkmkPropInfo->hasPropertyByName(
sHidden))
2833 bool bHidden =
false;
2834 bkmkProps->getPropertyValue(
sHidden) >>= bHidden;
2838 OUString sCondition(
"BookmarkCondition");
2839 if (bkmkPropInfo->hasPropertyByName(sCondition))
2841 OUString sBookmarkCondition;
2842 bkmkProps->getPropertyValue(sCondition) >>= sBookmarkCondition;
2850 assert(pElements !=
nullptr);
2851 assert(0 <= nElement && nElement <= 2);
2859 const Reference < XPropertySet > & rPropSet,
2860 const Reference < XPropertySetInfo > & rPropSetInfo )
2862 bool bIsBoundAsChar =
false;
2863 OUString sAnchorType(
"AnchorType" );
2864 if( rPropSetInfo->hasPropertyByName( sAnchorType ) )
2866 TextContentAnchorType eAnchor;
2867 rPropSet->getPropertyValue( sAnchorType ) >>= eAnchor;
2868 bIsBoundAsChar = TextContentAnchorType_AS_CHARACTER == eAnchor;
2871 return bIsBoundAsChar;
2875 const Reference < XPropertySet >& rPropSet,
2878 OUString* pMinHeightValue,
2879 OUString* pMinWidthValue)
2887 Reference < XNamed > xNamed( rPropSet, UNO_QUERY );
2890 OUString
sName( xNamed->getName() );
2891 if( !
sName.isEmpty() )
2893 xNamed->getName() );
2897 OUStringBuffer sValue;
2900 TextContentAnchorType eAnchor = TextContentAnchorType_AT_PARAGRAPH;
2901 rPropSet->getPropertyValue(
gsAnchorType ) >>= eAnchor;
2911 if( TextContentAnchorType_AT_PAGE == eAnchor )
2913 sal_Int16 nPage = 0;
2916 "ERROR: writing invalid anchor-page-number 0");
2918 OUString::number( nPage ) );
2928 eAnchor != TextContentAnchorType_AS_CHARACTER )
2931 sal_Int16 nHoriOrient = HoriOrientation::NONE;
2932 rPropSet->getPropertyValue(
gsHoriOrient ) >>= nHoriOrient;
2933 if( HoriOrientation::NONE == nHoriOrient )
2940 sValue.makeStringAndClear() );
2941 if(
nullptr != pCenter)
2948 else if( TextContentAnchorType_AS_CHARACTER == eAnchor )
2951 if( !bShape || TextContentAnchorType_AS_CHARACTER == eAnchor )
2954 sal_Int16 nVertOrient = VertOrientation::NONE;
2955 rPropSet->getPropertyValue(
gsVertOrient ) >>= nVertOrient;
2956 if( VertOrientation::NONE == nVertOrient )
2963 sValue.makeStringAndClear() );
2964 if(
nullptr != pCenter)
2974 Reference< XPropertySetInfo > xPropSetInfo(rPropSet->getPropertySetInfo());
2976 bool bSyncWidth =
false;
2981 sal_Int16 nRelWidth = 0;
2986 bool bSyncHeight =
false;
2991 sal_Int16 nRelHeight = 0;
2996 awt::Size aLayoutSize;
2997 if ((nRelWidth > 0 || nRelHeight > 0) && xPropSetInfo->hasPropertyByName(
"LayoutSize"))
2999 rPropSet->getPropertyValue(
"LayoutSize") >>= aLayoutSize;
3002 bool bUseLayoutSize =
true;
3003 if (bSyncWidth && bSyncHeight)
3007 bUseLayoutSize =
false;
3009 if (aLayoutSize.Width <= 0 || aLayoutSize.Height <= 0)
3012 bUseLayoutSize =
false;
3016 sal_Int16 nWidthType = SizeType::FIX;
3017 if( xPropSetInfo->hasPropertyByName(
gsWidthType ) )
3019 rPropSet->getPropertyValue(
gsWidthType ) >>= nWidthType;
3021 if( xPropSetInfo->hasPropertyByName(
gsWidth ) )
3023 sal_Int32 nWidth = 0;
3025 if( SizeType::VARIABLE != nWidthType )
3027 rPropSet->getPropertyValue(
gsWidth ) >>= nWidth;
3030 if( SizeType::FIX != nWidthType )
3032 assert(pMinWidthValue);
3035 *pMinWidthValue = sValue.makeStringAndClear();
3040 if ((nRelWidth > 0 || bSyncWidth) && bUseLayoutSize)
3043 sValue.setLength(0);
3048 sValue.makeStringAndClear() );
3049 if(
nullptr != pCenter)
3052 pCenter->
setX(pCenter->
getX() + (0.5 * nWidth));
3062 if( !bSyncWidth && xPropSetInfo->hasPropertyByName(
gsRelativeWidth ) )
3064 SAL_WARN_IF( nRelWidth < 0 || nRelWidth > 254,
"xmloff",
3065 "Got illegal relative width from API" );
3070 sValue.makeStringAndClear() );
3075 sal_Int16 nSizeType = SizeType::FIX;
3076 if( xPropSetInfo->hasPropertyByName(
gsSizeType ) )
3078 rPropSet->getPropertyValue(
gsSizeType ) >>= nSizeType;
3080 if( xPropSetInfo->hasPropertyByName(
gsHeight ) )
3082 sal_Int32 nHeight = 0;
3083 if( SizeType::VARIABLE != nSizeType )
3085 rPropSet->getPropertyValue(
gsHeight ) >>= nHeight;
3089 if( SizeType::FIX != nSizeType && 0==nRelHeight && !bSyncHeight &&
3092 *pMinHeightValue = sValue.makeStringAndClear();
3096 if ((nRelHeight > 0 || bSyncHeight) && bUseLayoutSize)
3099 sValue.setLength(0);
3104 sValue.makeStringAndClear() );
3105 if(
nullptr != pCenter)
3108 pCenter->
setY(pCenter->
getY() + (0.5 * nHeight));
3118 else if( nRelHeight > 0 )
3121 if( SizeType::MIN == nSizeType )
3123 assert(pMinHeightValue);
3124 if (pMinHeightValue)
3126 *pMinHeightValue = sValue.makeStringAndClear();
3131 sValue.makeStringAndClear() );
3134 OUString sZOrder(
"ZOrder" );
3135 if( xPropSetInfo->hasPropertyByName( sZOrder ) )
3137 sal_Int32 nZIndex = 0;
3138 rPropSet->getPropertyValue( sZOrder ) >>= nZIndex;
3142 OUString::number( nZIndex ) );
3146 if (xPropSetInfo->hasPropertyByName(
"IsSplitAllowed")
3147 && rPropSet->getPropertyValue(
"IsSplitAllowed").get<
bool>())
3152 return nShapeFeatures;
3156 const Reference < XTextContent > & rTxtCntnt,
3160 bool bExportContent,
3161 const Reference < XPropertySet > *pRangePropSet)
3163 Reference < XPropertySet > xPropSet( rTxtCntnt, UNO_QUERY );
3174 xPropSet->getPropertySetInfo() ) )
3182 if ( bExportContent )
3184 Reference < XTextFrame > xTxtFrame( rTxtCntnt, UNO_QUERY );
3188 SAL_WARN(
"xmloff",
"loop in frame export, ditching");
3195 Reference < XText > xTxt(xTxtFrame->getText());
3197 exportText( xTxt, bAutoStyles, bIsProgress,
true );
3204 Reference < XShape > xShape( rTxtCntnt, UNO_QUERY );
3208 SAL_WARN(
"xmloff",
"loop in shape export, ditching");
3225 Reference< XPropertySetInfo > xPropSetInfo(xPropSet->getPropertySetInfo());
3227 bool bAddCharStyles = pRangePropSet &&
3230 bool bIsUICharStyle;
3231 bool bHasAutoStyle =
false;
3235 if( bAddCharStyles )
3236 sStyle =
FindTextStyle( *pRangePropSet, bIsUICharStyle, bHasAutoStyle );
3238 bIsUICharStyle =
false;
3240 bool bDoSomething = bIsUICharStyle
3243 GetExport(), bDoSomething, bHasAutoStyle,
3244 bDoSomething ? *pRangePropSet : Reference<XPropertySet>(),
3247 if( !sStyle.isEmpty() )
3249 GetExport().EncodeStyleName( sStyle ) );
3256 HyperlinkData(xPropSet).addHyperlinkAttributes(
GetExport()),
3271 Reference < XShape > xShape( rTxtCntnt, UNO_QUERY );
3275 ->exportShape( xShape, nFeatures );
3286 const Reference < XPropertySet > & rPropSet,
3287 const Reference < XPropertySetInfo > & rPropSetInfo,
3290 Reference < XTextFrame > xTxtFrame( rPropSet, UNO_QUERY );
3291 Reference < XText > xTxt(xTxtFrame->getText());
3299 OUString aMinHeightValue;
3300 OUString sMinWidthValue;
3302 if ( sAutoStyle.isEmpty() )
3303 sAutoStyle = sStyle;
3304 if( !sAutoStyle.isEmpty() )
3306 GetExport().EncodeStyleName( sAutoStyle ) );
3312 if( !aMinHeightValue.isEmpty() )
3316 if (!sMinWidthValue.isEmpty())
3326 if( (rPropSet->getPropertyValue(
gsChainNextName ) >>= sNext) && !sNext.isEmpty() )
3339 exportText( xTxt,
false, bIsProgress,
true );
3343 Reference<XEventsSupplier> xEventsSupp( xTxtFrame, UNO_QUERY );
3354 const Reference < XPropertySet > & rPropSet,
3355 const Reference < XPropertySetInfo > & rPropSetInfo )
3362 PointSequenceSequence aSourcePolyPolygon;
3366 aSourcePolyPolygon));
3367 const sal_uInt32 nPolygonCount(aPolyPolygon.
count());
3379 bPixel = *o3tl::doAccess<bool>(rPropSet->getPropertyValue(
gsIsPixelContour ));
3383 OUStringBuffer aStringBuffer( 10 );
3413 if(1 == nPolygonCount )
3416 const OUString aPointString(
3427 const OUString aPolygonString(
3441 bool bTmp = *o3tl::doAccess<bool>(rPropSet->getPropertyValue(
3453 const Reference < XPropertySet > & rPropSet,
3454 const Reference < XPropertySetInfo > & rPropSetInfo )
3463 if ( sAutoStyle.isEmpty() )
3464 sAutoStyle = sStyle;
3465 if( !sAutoStyle.isEmpty() )
3467 GetExport().EncodeStyleName( sAutoStyle ) );
3470 sal_Int16 nRotation(0);
3472 const bool bUseRotation(0 != nRotation);
3495 const double fRotate(basegfx::deg2rad<10>(nRotation));
3522 uno::Reference<graphic::XGraphic> xGraphic;
3523 rPropSet->getPropertyValue(
"Graphic") >>= xGraphic;
3525 OUString sInternalURL;
3526 OUString sOutMimeType;
3534 if (!sInternalURL.isEmpty())
3543 OUString sGrfFilter;
3545 if( !sGrfFilter.isEmpty() )
3551 if (sOutMimeType.isEmpty())
3555 if (!sOutMimeType.isEmpty())
3561 "mime-type", sOutMimeType);
3574 const bool bAddReplacementImages = officecfg::Office::Common::Save::Graphic::AddReplacementImages::get();
3575 if (bAddReplacementImages)
3579 uno::Reference<graphic::XGraphic> xReplacementGraphic;
3580 rPropSet->getPropertyValue(
"ReplacementGraphic") >>= xReplacementGraphic;
3582 OUString sInternalURL;
3583 OUString sOutMimeType;
3587 if (xReplacementGraphic.is())
3593 if (!sInternalURL.isEmpty())
3603 if (sOutMimeType.isEmpty())
3607 if (!sOutMimeType.isEmpty())
3613 "mime-type", sOutMimeType);
3619 if (xReplacementGraphic.is())
3627 Reference<XEventsSupplier> xEventsSupp( rPropSet, UNO_QUERY );
3642 SAL_WARN(
"xmloff",
"no API implementation available" );
3646 const Reference < XPropertySet > &,
3647 const Reference < XPropertySetInfo > & )
3649 SAL_WARN(
"xmloff",
"no API implementation available" );
3655 Reference<XEventsSupplier> xEventsSupp( rPropSet, UNO_QUERY );
3659 if (rPropSet->getPropertySetInfo()->hasPropertyByName(
"ImageMap"))
3665 const Reference < XPropertySet > & rPropSet,
3666 const Reference < XPropertySetInfo > & rPropSetInfo )
3669 if( rPropSetInfo->hasPropertyByName(
gsTitle ) )
3672 rPropSet->getPropertyValue(
gsTitle ) >>= sObjTitle;
3673 if( !sObjTitle.isEmpty() )
3686 if( !sObjDesc.isEmpty() )
3696 const css::uno::Reference< css::text::XTextRange > & rTextRange,
3697 Reference< XPropertySet >
const & xPropSet,
3698 Reference < XPropertySetInfo > & xPropSetInfo,
3699 const bool bIsUICharStyle,
3700 const bool bHasAutoStyle,
3701 const OUString& sStyle,
3702 bool& rPrevCharIsSpace,
3712 if ( !sStyle.isEmpty() )
3718 const OUString aText( rTextRange->getString() );
3723 openFieldMark =
NONE;
3728 const Reference< XTextRange > & rTextRange,
3730 bool& rPrevCharIsSpace,
3733 Reference< XPropertySet > xPropSet( rTextRange, UNO_QUERY );
3740 bool bIsUICharStyle =
false;
3741 bool bHasAutoStyle =
false;
3742 const OUString sStyle(
3745 Reference < XPropertySetInfo > xPropSetInfo;
3746 exportTextRangeSpan( rTextRange, xPropSet, xPropSetInfo, bIsUICharStyle, bHasAutoStyle, sStyle, rPrevCharIsSpace, openFieldMark );
3751 bool& rPrevCharIsSpace )
3753 sal_Int32 nExpStartPos = 0;
3754 sal_Int32 nEndPos = rText.getLength();
3755 sal_Int32 nSpaceChars = 0;
3759 bool bExpCharAsText =
true;
3760 bool bExpCharAsElement =
false;
3761 bool bCurrCharIsSpace =
false;
3767 bExpCharAsElement =
true;
3768 bExpCharAsText =
false;
3773 if( rPrevCharIsSpace )
3777 bExpCharAsText =
false;
3779 bCurrCharIsSpace =
true;
3782 if( cChar < 0x0020 )
3787 "illegal character in text content" );
3790 bExpCharAsText =
false;
3797 if(
nPos > nExpStartPos && !bExpCharAsText )
3799 SAL_WARN_IF( 0 != nSpaceChars,
"xmloff",
"pending spaces" );
3800 OUString sExp( rText.copy( nExpStartPos,
nPos - nExpStartPos ) );
3802 nExpStartPos =
nPos;
3808 if( nSpaceChars > 0 && !bCurrCharIsSpace )
3812 if( nSpaceChars > 1 )
3815 OUString::number(nSpaceChars) );
3819 XML_S,
false,
false );
3826 if( bExpCharAsElement )
3850 if( bCurrCharIsSpace && rPrevCharIsSpace )
3852 rPrevCharIsSpace = bCurrCharIsSpace;
3856 if( !bExpCharAsText )
3858 SAL_WARN_IF( nExpStartPos !=
nPos,
"xmloff",
"wrong export start pos" );
3859 nExpStartPos =
nPos+1;
3863 if( nExpStartPos < nEndPos )
3865 SAL_WARN_IF( 0 != nSpaceChars,
"xmloff",
" pending spaces " );
3866 OUString sExp( rText.copy( nExpStartPos, nEndPos - nExpStartPos ) );
3871 if( nSpaceChars > 0 )
3873 if( nSpaceChars > 1 )
3876 OUString::number(nSpaceChars) );
3890 Reference<XPropertySet> xPropertySet(
GetExport().GetModel(), UNO_QUERY );
3891 if (!xPropertySet.is())
3895 OUString sIndexAutoMarkFileURL(
3896 "IndexAutoMarkFileURL");
3897 if (!xPropertySet->getPropertySetInfo()->hasPropertyByName(
3898 sIndexAutoMarkFileURL))
3901 xPropertySet->getPropertyValue(sIndexAutoMarkFileURL) >>= sUrl;
3902 if (!sUrl.isEmpty())
3905 GetExport().GetRelativeReference(sUrl) );
3914 const Reference<XText> & rText )
3931 const Reference<XText> & rText,
3939 const Reference<XText> & rText )
3973 const Reference<XPropertySet> & rPropSet,
3977 if (*o3tl::doAccess<bool>(rPropSet->getPropertyValue(
gsIsCollapsed)))
3981 bool bStart = *o3tl::doAccess<bool>(rPropSet->getPropertyValue(
gsIsStart));
3996 assert(!
m_bOpenRuby &&
"Can't open a ruby inside of ruby!");
4007 SAL_WARN_IF(sStyleName.isEmpty(),
"xmloff",
"Can't find ruby style!");
4023 assert(
m_bOpenRuby &&
"Can't close a ruby if none is open!");
4053 const Reference<XPropertySet> & i_xPortion,
4054 bool i_bAutoStyles,
bool i_isProgress,
bool & rPrevCharIsSpace)
4056 bool doExport(!i_bAutoStyles);
4058 switch (
GetExport().getSaneDefaultVersion()) {
4064 const Reference< XTextContent > xTextContent(
4065 i_xPortion->getPropertyValue(
"InContentMetadata"), UNO_QUERY_THROW);
4066 const Reference< XEnumerationAccess > xEA( xTextContent, UNO_QUERY_THROW );
4067 const Reference< XEnumeration > xTextEnum( xEA->createEnumeration() );
4071 const Reference<rdf::XMetadatable> xMeta(xTextContent, UNO_QUERY_THROW);
4074 xMeta->ensureMetadataReference();
4089 const uno::Reference<beans::XPropertySet>& xPortion,
bool bAutoStyles,
bool isProgress,
4090 bool& rPrevCharIsSpace)
4093 bool bExport = !bAutoStyles;
4099 uno::Reference<text::XTextContent> xTextContent(xPortion->getPropertyValue(
"ContentControl"),
4100 uno::UNO_QUERY_THROW);
4101 uno::Reference<container::XEnumerationAccess> xEA(xTextContent, uno::UNO_QUERY_THROW);
4102 uno::Reference<container::XEnumeration> xTextEnum = xEA->createEnumeration();
4104 uno::Reference<beans::XPropertySet> xPropertySet(xTextContent, uno::UNO_QUERY_THROW);
4107 bool bShowingPlaceHolder =
false;
4108 xPropertySet->getPropertyValue(
"ShowingPlaceHolder") >>= bShowingPlaceHolder;
4109 if (bShowingPlaceHolder)
4114 aBuffer.makeStringAndClear());
4117 bool bCheckbox =
false;
4118 xPropertySet->getPropertyValue(
"Checkbox") >>= bCheckbox;
4126 bool bChecked =
false;
4127 xPropertySet->getPropertyValue(
"Checked") >>= bChecked;
4135 OUString aCheckedState;
4136 xPropertySet->getPropertyValue(
"CheckedState") >>= aCheckedState;
4137 if (!aCheckedState.isEmpty())
4142 OUString aUncheckedState;
4143 xPropertySet->getPropertyValue(
"UncheckedState") >>= aUncheckedState;
4144 if (!aUncheckedState.isEmpty())
4149 bool bPicture =
false;
4150 xPropertySet->getPropertyValue(
"Picture") >>= bPicture;
4156 aBuffer.makeStringAndClear());
4160 xPropertySet->getPropertyValue(
"Date") >>= bDate;
4168 OUString aDateFormat;
4169 xPropertySet->getPropertyValue(
"DateFormat") >>= aDateFormat;
4170 if (!aDateFormat.isEmpty())
4175 OUString aDateLanguage;
4176 xPropertySet->getPropertyValue(
"DateLanguage") >>= aDateLanguage;
4177 if (!aDateLanguage.isEmpty())
4181 OUString aCurrentDate;
4182 xPropertySet->getPropertyValue(
"CurrentDate") >>= aCurrentDate;
4183 if (!aCurrentDate.isEmpty())
4188 bool bPlainText =
false;
4189 xPropertySet->getPropertyValue(
"PlainText") >>= bPlainText;
4197 bool bComboBox =
false;
4198 xPropertySet->getPropertyValue(
"ComboBox") >>= bComboBox;
4206 bool bDropDown =
false;
4207 xPropertySet->getPropertyValue(
"DropDown") >>= bDropDown;
4216 xPropertySet->getPropertyValue(
"Alias") >>= aAlias;
4217 if (!aAlias.isEmpty())
4223 xPropertySet->getPropertyValue(
"Tag") >>= aTag;
4224 if (!aTag.isEmpty())
4230 xPropertySet->getPropertyValue(
"Id") >>=
nId;
4236 sal_uInt32 nTabIndex = 0;
4237 if ((xPropertySet->getPropertyValue(
"TabIndex") >>= nTabIndex) && nTabIndex)
4240 OUString::number(nTabIndex));
4244 xPropertySet->getPropertyValue(
"Lock") >>= aLock;
4245 if (!aLock.isEmpty())
4257 uno::Sequence<beans::PropertyValues> aListItems;
4258 xPropertySet->getPropertyValue(
"ListItems") >>= aListItems;
4259 for (
const auto& rListItem : aListItems)
4262 auto it =
aMap.find(
"DisplayText");
4264 if (it !=
aMap.end() && (it->second >>= aValue) && !aValue.isEmpty())
4269 it =
aMap.find(
"Value");
4270 if (it !=
aMap.end() && (it->second >>= aValue))
4285 const Reference<XIndexAccess> & rShapes,
4289 if( ( ! rShapes.is() ) || ( ! xFormExport.is() ) )
4296 Reference<XEnumeration> xShapesEnum =
m_pBoundFrameSets->GetShapes()->createEnumeration();
4297 if(!xShapesEnum.is())
4299 while( xShapesEnum->hasMoreElements() )
4307 Reference<XControlShape> xControlShape(xShapesEnum->nextElement(), UNO_QUERY);
4308 if( xControlShape.is() )
4314 Reference<XTextContent> xTextContent( xControlShape, UNO_QUERY );
4315 if( xTextContent.is() )
4323 xFormExport->excludeFromExport(
4324 xControlShape->getControl() );
constexpr OUStringLiteral sHidden
The MultiPropertySetHelper performs the following functions:
void hasProperties(const css::uno::Reference< css::beans::XPropertySetInfo > &)
Call hasPropertiesByName for the provided XPropertySetInfo and build list of allowed properties.
const css::uno::Any & getValue(sal_Int16 nIndex)
Get a value from the values array.
bool hasProperty(sal_Int16 nIndex)
Find out if this property is supported.
bool checkedProperties()
Return whether hasProperties was called (i.e.
void SetValue(sal_Int32 nValue)
sal_Int32 GetValue() const
const OUString & GetExportString()
bool hasProperty(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, css::uno::Reference< css::beans::XPropertySetInfo > &rPropSetInfo)
void AddFamily(XmlStyleFamily nFamily, const OUString &rStrName, SvXMLExportPropertyMapper *pMapper, const OUString &aStrPrefix)
register a new family with its appropriate instance of a derivation of XMLPropertySetMapper for famil...
void exportXML(XmlStyleFamily nFamily) const
Export all item sets ofs a certain class in the order in that they have been added.
ProgressBarHelper * GetProgressBarHelper()
::comphelper::UnoInterfaceToUniqueIdentifierMapper & getInterfaceToIdentifierMapper()
OUString GetRelativeReference(const OUString &rValue)
void AddAttributeXmlId(css::uno::Reference< css::uno::XInterface > const &i_xIfc)
add xml:id attribute (for RDF metadata)
XMLEventExport & GetEventExport()
get Event export, with handlers for script types "None" and "StarBasic" already registered; other han...
void StartElement(sal_uInt16 nPrefix, enum ::xmloff::token::XMLTokenEnum eName, bool bIgnWSOutside)
rtl::Reference< XMLTextParagraphExport > const & GetTextParagraphExport()
void AddAttribute(sal_uInt16 nPrefix, const OUString &rName, const OUString &rValue)
void Characters(const OUString &rChars)
bool GetGraphicMimeTypeFromStream(css::uno::Reference< css::graphic::XGraphic > const &rxGraphic, OUString &rOutMimeType)
void SAL_DLLPRIVATE AddAttributeIdLegacy(sal_uInt16 const nLegacyPrefix, OUString const &rValue)
add xml:id and legacy namespace id
SvtSaveOptions::ODFSaneDefaultVersion getSaneDefaultVersion() const
returns the deterministic version for odf export
rtl::Reference< XMLShapeExport > const & GetShapeExport()
OUString EncodeStyleName(const OUString &rName, bool *pEncoded=nullptr) const
bool AddEmbeddedXGraphicAsBase64(css::uno::Reference< css::graphic::XGraphic > const &rxGraphic)
XMLImageMapExport & GetImageMapExport()
get the export for image maps
const SvXMLUnitConverter & GetMM100UnitConverter() const
void AddAttributesRDFa(css::uno::Reference< css::text::XTextContent > const &i_xTextContent)
add RDFa attributes for a metadatable text content
void EndElement(sal_uInt16 nPrefix, enum ::xmloff::token::XMLTokenEnum eName, bool bIgnWSInside)
OUString AddEmbeddedXGraphic(css::uno::Reference< css::graphic::XGraphic > const &rxGraphic, OUString &rOutMimeType, OUString const &rRequestedName=OUString())
void convertMeasureToXML(OUStringBuffer &rBuffer, sal_Int32 nMeasure) const
convert measure to string: from meCoreMeasureUnit to meXMLMeasureUnit
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Exports the given value according to the XML-data-type corresponding to the derived class.
void Export(css::uno::Reference< css::document::XEventsSupplier > const &xAccess, bool bUseWhitespace=true)
export the events (calls EventExport::Export(Reference<XNameAccess>) )
void Export(const css::uno::Reference< css::beans::XPropertySet > &rPropertySet)
Get the ImageMap object from the "ImageMap" property and subsequently export the map (if present).
This class handles the export of index marks for table of content, alphabetical and user index.
This class handles the export of redline portions.
This class handles the export of sections and indices (which are, internally, just sections).
static bool IsInSection(const css::uno::Reference< css::text::XTextSection > &rEnclosingSection, const css::uno::Reference< css::text::XTextContent > &rContent, bool bDefault)
Determine whether rContent is contained in rEnclosingSection.
SvXMLExport & GetExport()
OUString Add(const css::uno::Reference< css::container::XIndexReplace > &rNumRules)
information about list and list style for a certain paragraph
const OUString & GetNumRulesName() const
const OUString & ListLabelString() const
const OUString & GetListId() const
sal_Int16 GetListLevelStartValue() const
sal_Int16 GetLevel() const
bool IsListIdDefault() const
void Set(const css::uno::Reference< css::text::XTextContent > &rTextContent, bool bOutlineStyleAsNormalListStyle, const XMLTextListAutoStylePool &rListAutoPool, bool bExportTextNumberElement, bool bListIdIsDefault)
bool BelongsToSameList(const XMLTextNumRuleInfo &rCmp) const
bool HasStartValue() const
sal_uInt32 GetStartValue() const
bool IsContinueingPreviousSubTree() const
void recordTrackedChangesForXText(const css::uno::Reference< css::text::XText > &rText)
Record tracked changes for this particular XText (empty reference stop recording) This should be used...
std::unique_ptr< XMLRedlineExport > m_pRedlineExport
may be NULL (if no redlines should be exported; e.g. in block mode)
SvXMLAutoStylePoolP & GetAutoStylePool()
void exportTextFrame(const css::uno::Reference< css::text::XTextContent > &rTextContent, bool bAutoStyles, bool bProgress, bool bExportContent, const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet=nullptr)
virtual void _exportTextEmbedded(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, const css::uno::Reference< css::beans::XPropertySetInfo > &rPropSetInfo)
void exportShape(const css::uno::Reference< css::text::XTextContent > &rTextContent, bool bAutoStyles, const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet=nullptr)
virtual void _collectTextEmbeddedAutoStyles(const css::uno::Reference< css::beans::XPropertySet > &rPropSet)
void exportTextField(const css::uno::Reference< css::text::XTextRange > &rTextRange, bool bAutoStyles, bool bProgress, bool *pPrevCharIsSpace)
std::unique_ptr< XMLSectionExport > m_pSectionExport
std::unique_ptr< XMLIndexMarkExport > m_pIndexMarkExport
rtl::Reference< SvXMLExportPropertyMapper > m_xRubyPropMapper
virtual void exportTableAutoStyles()
void PreventExportOfControlsInMuteSections(const css::uno::Reference< css::container::XIndexAccess > &rShapes, const rtl::Reference< xmloff::OFormLayerXMLExport > &xFormExport)
exclude form controls which are in mute sections.
void exportTextDeclarations()
This method exports (text field) declarations etc.
bool ShouldSkipListId(const css::uno::Reference< css::text::XTextContent > &xTextContent)
void exportTitleAndDescription(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, const css::uno::Reference< css::beans::XPropertySetInfo > &rPropSetInfo)
static constexpr OUStringLiteral gsCharStyleNames
const ::std::unique_ptr< ::xmloff::BoundFrameSets > m_pBoundFrameSets
virtual ~XMLTextParagraphExport() override
rtl::Reference< SvXMLExportPropertyMapper > m_xFramePropMapper
rtl::Reference< SvXMLExportPropertyMapper > m_xParaPropMapper
XMLTextListsHelper * mpTextListsHelper
void exportFrameFrames(bool bAutoStyles, bool bProgress, const css::uno::Reference< css::text::XTextFrame > &rParentTxtFrame)
::std::vector< std::unique_ptr< XMLTextListsHelper > > maTextListsHelperStack
void exportTextGraphic(const css::uno::Reference< css::text::XTextContent > &rTextContent, bool bAutoStyles, const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet=nullptr)
void exportContour(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, const css::uno::Reference< css::beans::XPropertySetInfo > &rPropSetInfo)
std::unique_ptr< DocumentListNodes > mpDocumentListNodes
virtual void exportTable(const css::uno::Reference< css::text::XTextContent > &rTextContent, bool bAutoStyles, bool bProgress)
OUString m_sOpenRubyCharStyle
void PushNewTextListsHelper()
void collectTextAutoStylesOptimized(bool bIsProgress)
void exportTextRangeEnumeration(const css::uno::Reference< css::container::XEnumeration > &rRangeEnum, bool bAutoStyles, bool bProgress, bool &rPrevCharIsSpace)
static constexpr OUStringLiteral gsFootnote
void _exportTextFrame(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, const css::uno::Reference< css::beans::XPropertySetInfo > &rPropSetInfo, bool bProgress)
void exportMeta(const css::uno::Reference< css::beans::XPropertySet > &i_xPortion, bool i_bAutoStyles, bool i_isProgress, bool &rPrevCharIsSpace)
export a text:meta
void exportListAndSectionChange(css::uno::Reference< css::text::XTextSection > &rOldSection, const css::uno::Reference< css::text::XTextSection > &rNewSection, const XMLTextNumRuleInfo &rOldList, const XMLTextNumRuleInfo &rNewList, bool bAutoStyles)
check if current section or current list has changed; calls exportListChange as appropriate
void exportTextRange(const css::uno::Reference< css::text::XTextRange > &rTextRange, bool bAutoStyles, bool &rPrevCharWasSpace, FieldmarkType &openFieldmarkType)
void exportTextContentEnumeration(const css::uno::Reference< css::container::XEnumeration > &rContentEnum, bool bAutoStyles, const css::uno::Reference< css::text::XTextSection > &rBaseSection, bool bProgress, bool bExportParagraph=true, const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet=nullptr, TextPNS eExtensionNS=TextPNS::ODF)
void exportTextLineBreak(const css::uno::Reference< css::beans::XPropertySet > &xPropSet)
void exportTextEmbedded(const css::uno::Reference< css::text::XTextContent > &rTextContent, bool bAutoStyles, const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet=nullptr)
OUString FindTextStyle(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, bool &rbHasCharStyle, bool &rbHasAutoStyle, const XMLPropertyState **pAddState=nullptr) const
std::unique_ptr< XMLTextFieldExport > m_pFieldExport
static SvXMLExportPropertyMapper * CreateShapeExtPropMapper(SvXMLExport &rExport)
rtl::Reference< SvXMLExportPropertyMapper > m_xSectionPropMapper
void exportRuby(const css::uno::Reference< css::beans::XPropertySet > &rPortionPropSet, bool bAutoStyles)
export a ruby
void exportTextFootnote(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, const OUString &sString, bool bAutoStyles, bool bProgress)
export a footnote and styles
XMLTextListAutoStylePool maListAutoPool
static SvXMLExportPropertyMapper * CreateParaDefaultExtPropMapper(SvXMLExport &rExport)
void exportPageFrames(bool bProgress)
const XMLTextListAutoStylePool & GetListAutoStylePool() const
static constexpr OUStringLiteral gsFrameStyleName
static constexpr OUStringLiteral gsTextSection
o3tl::sorted_vector< css::uno::Reference< css::text::XTextFrame > > maFrameRecurseGuard
void ExportContentControl(const css::uno::Reference< css::beans::XPropertySet > &xPortion, bool bAutoStyles, bool isProgress, bool &rPrevCharIsSpace)
Exports a <loext:content-control> element.
rtl::Reference< SvXMLExportPropertyMapper > m_xAutoFramePropMapper
void exportTextAutoStyles()
void exportCharacterData(const OUString &rText, bool &rPrevCharWasSpace)
void recordTrackedChangesNoXText()
Stop recording tracked changes.
o3tl::sorted_vector< css::uno::Reference< css::drawing::XShape > > maShapeRecurseGuard
std::unique_ptr< Impl > m_xImpl
SinglePropertySetInfoCache m_aCharStyleNamesPropInfoCache
void Add(XmlStyleFamily nFamily, MultiPropertySetHelper &rPropSetHelper, const css::uno::Reference< css::beans::XPropertySet > &rPropSet)
add autostyle for specified family
void exportSoftPageBreak()
bool ExportListId() const
XMLShapeExportFlags addTextFrameAttributes(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, bool bShape, basegfx::B2DPoint *pCenter=nullptr, OUString *pMinHeightValue=nullptr, OUString *pMinWidthValue=nullptr)
void exportTextMark(const css::uno::Reference< css::beans::XPropertySet > &xPropSet, const OUString &rProperty, const enum ::xmloff::token::XMLTokenEnum pElements[], bool bAutoStyles)
static SvXMLExportPropertyMapper * CreateCharExtPropMapper(SvXMLExport &rExport)
void exportListChange(const XMLTextNumRuleInfo &rPrvInfo, const XMLTextNumRuleInfo &rNextInfo)
OUString Find(XmlStyleFamily nFamily, const css::uno::Reference< css::beans::XPropertySet > &rPropSet, const OUString &rParent, const o3tl::span< const XMLPropertyState > aAddStates={}) const
find style name for specified family and parent
void exportUsedDeclarations()
export all declarations
void exportTextRangeSpan(const css::uno::Reference< css::text::XTextRange > &rTextRange, css::uno::Reference< css::beans::XPropertySet > const &xPropSet, css::uno::Reference< css::beans::XPropertySetInfo > &xPropSetInfo, const bool bIsUICharStyle, const bool bHasAutoStyle, const OUString &sStyle, bool &rPrevCharIsSpace, FieldmarkType &openFieldMark)
void exportEvents(const css::uno::Reference< css::beans::XPropertySet > &rPropSet)
void _exportTextGraphic(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, const css::uno::Reference< css::beans::XPropertySetInfo > &rPropSetInfo)
void exportTrackedChanges(bool bAutoStyle)
Export the list of change information (enclosed by <tracked-changes>) (or the necessary automatic sty...
XMLTextParagraphExport(SvXMLExport &rExp, SvXMLAutoStylePoolP &rASP)
SvXMLAutoStylePoolP & m_rAutoStylePool
void exportAnyTextFrame(const css::uno::Reference< css::text::XTextContent > &rTextContent, FrameType eTxpe, bool bAutoStyles, bool bProgress, bool bExportContent, const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet)
void exportParagraph(const css::uno::Reference< css::text::XTextContent > &rTextContent, bool bAutoStyles, bool bProgress, bool bExportParagraph, MultiPropertySetHelper &rPropSetHelper, TextPNS eExtensionNS)
rtl::Reference< SvXMLExportPropertyMapper > m_xTextPropMapper
void exportText(const css::uno::Reference< css::text::XText > &rText, bool bAutoStyles, bool bProgress, bool bExportParagraph, TextPNS eExtensionNS=TextPNS::ODF)
void PopTextListsHelper()
static SvXMLExportPropertyMapper * CreateParaExtPropMapper(SvXMLExport &rExport)
B2DPolygon const & getB2DPolygon(sal_uInt32 nIndex) const
B2DRange getB2DRange() const
const OUString & getIdentifier(const css::uno::Reference< css::uno::XInterface > &rInterface) const
css::uno::Type const & get()
size_type erase(const Value &x)
std::pair< const_iterator, bool > insert(Value &&x)
constexpr iterator begin() const noexcept
constexpr iterator end() const noexcept
static bool convertMeasurePx(sal_Int32 &rValue, std::u16string_view rString)
static bool convertPercent(sal_Int32 &rValue, std::u16string_view rString)
static bool convertBool(bool &rBool, std::u16string_view rString)
std::unique_ptr< BoundFrames > m_pEmbeddeds
const BoundFrames * GetShapes() const
const BoundFrames * GetGraphics() const
std::unique_ptr< BoundFrames > m_pShapes
const BoundFrames * GetEmbeddeds() const
BoundFrameSets(const Reference< XInterface > &rModel)
std::unique_ptr< BoundFrames > m_pGraphics
const BoundFrames * GetTexts() const
std::unique_ptr< BoundFrames > m_pTexts
constexpr OUStringLiteral XML_STYLE_FAMILY_SD_GRAPHICS_NAME
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
#define SAL_N_ELEMENTS(arr)
OUString exportToSvgD(const B2DPolyPolygon &rPolyPoly, bool bUseRelativeCoordinates, bool bDetectQuadraticBeziers, bool bHandleRelativeNextPointCompatible, bool bOOXMLMotionPath=false)
OUString exportToSvgPoints(const B2DPolygon &rPoly)
B2DPolyPolygon UnoPointSequenceSequenceToB2DPolyPolygon(const css::drawing::PointSequenceSequence &rPointSequenceSequenceSource)
double normalizeToRange(double v, const double fRange)
B2IRange fround(const B2DRange &rRange)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
Handling of tokens in XML:
XMLTokenEnum
The enumeration of all XML tokens.
@ XML_MAY_BREAK_BETWEEN_PAGES
@ XML_SHOWING_PLACE_HOLDER
@ XML_ALPHABETICAL_INDEX_AUTO_MARK_FILE
@ XML_OUTLINE_CONTENT_VISIBLE
@ XML_FIELDMARK_SEPARATOR
@ XML_REFERENCE_MARK_START
@ XML_DATE_RFC_LANGUAGE_TAG
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
return the OUString representation for eToken
bool operator==(const AttributeDescription &i_lhs, const AttributeDescription &i_rhs)
HashMap_OWString_Interface aMap
constexpr OUStringLiteral ODF_FORMTEXT
constexpr OUStringLiteral ODF_FORMCHECKBOX
constexpr OUStringLiteral ODF_OLE_PARAM
static void ExportParameter(OUStringBuffer &rStrBuffer, const css::drawing::EnhancedCustomShapeParameter &rParameter)
Smart struct to transport an Any with an index to the appropriate property-name.
bool ShouldSkipListId(const Reference< XTextContent > &xTextContent) const
DocumentListNodes(const css::uno::Reference< css::frame::XModel > &xModel)
std::vector< NodeData > docListNodes
sal_Int32 GetFieldMarkIndex(Reference< XFormField > const &i_xFieldMark)
sal_Int32 AddFieldMarkStart(Reference< XFormField > const &i_xFieldMark)
::std::map< Reference< XFormField >, sal_Int32 > FieldMarkMap_t
FieldMarkMap_t m_FieldMarkMap
Reference< XModel > xModel
constexpr OUStringLiteral gsTextFieldStartEnd(u"TextFieldStartEnd")
constexpr OUStringLiteral gsParagraphService(u"com.sun.star.text.Paragraph")
constexpr OUStringLiteral gsChainNextName(u"ChainNextName")
constexpr OUStringLiteral gsRelativeWidth(u"RelativeWidth")
constexpr OUStringLiteral gsVisitedCharStyleName(u"VisitedCharStyleName")
constexpr OUStringLiteral gsAnchorType(u"AnchorType")
constexpr OUStringLiteral gsVertOrientPosition(u"VertOrientPosition")
constexpr OUStringLiteral gsSizeType(u"SizeType")
static const char * aParagraphPropertyNamesAuto[]
constexpr OUStringLiteral gsReferenceMark(u"ReferenceMark")
constexpr OUStringLiteral gsContourPolyPolygon(u"ContourPolyPolygon")
constexpr OUStringLiteral gsTextContentService(u"com.sun.star.text.TextContent")
enum XMLTokenEnum lcl_XmlBookmarkElements[]
constexpr OUStringLiteral gsTableService(u"com.sun.star.text.TextTable")
constexpr OUStringLiteral gsBookmark(u"Bookmark")
constexpr OUStringLiteral gsTextFieldSep(u"TextFieldSeparator")
constexpr OUStringLiteral gsHoriOrientPosition(u"HoriOrientPosition")
constexpr OUStringLiteral gsFrame(u"Frame")
constexpr OUStringLiteral gsHyperLinkURL(u"HyperLinkURL")
constexpr OUStringLiteral gsDescription(u"Description")
constexpr OUStringLiteral gsHoriOrient(u"HoriOrient")
constexpr OUStringLiteral gsNumberingRules(u"NumberingRules")
constexpr OUStringLiteral gsServerMap(u"ServerMap")
static bool lcl_txtpara_isBoundAsChar(const Reference< XPropertySet > &rPropSet, const Reference< XPropertySetInfo > &rPropSetInfo)
constexpr OUStringLiteral gsParaConditionalStyleName(u"ParaConditionalStyleName")
static const char * aParagraphPropertyNames[]
constexpr OUStringLiteral gsDocumentIndexMark(u"DocumentIndexMark")
constexpr OUStringLiteral gsText(u"Text")
constexpr OUStringLiteral gsHyperLinkName(u"HyperLinkName")
constexpr OUStringLiteral gsRubyCharStyleName(u"RubyCharStyleName")
constexpr OUStringLiteral gsIsPixelContour(u"IsPixelContour")
constexpr OUStringLiteral gsWidthType(u"WidthType")
constexpr OUStringLiteral gsHeight(u"Height")
constexpr OUStringLiteral gsTextFieldStart(u"TextFieldStart")
constexpr OUStringLiteral gsTextField(u"TextField")
constexpr OUStringLiteral gsRuby(u"Ruby")
constexpr OUStringLiteral gsIsStart(u"IsStart")
constexpr OUStringLiteral gsGraphicRotation(u"GraphicRotation")
constexpr OUStringLiteral gsTextFieldEnd(u"TextFieldEnd")
constexpr OUStringLiteral gsIsSyncHeightToWidth(u"IsSyncHeightToWidth")
constexpr OUStringLiteral gsUnvisitedCharStyleName(u"UnvisitedCharStyleName")
static bool lcl_validPropState(const XMLPropertyState &rState)
constexpr OUStringLiteral gsTextFrameService(u"com.sun.star.text.TextFrame")
constexpr OUStringLiteral gsTitle(u"Title")
constexpr OUStringLiteral gsTextGraphicService(u"com.sun.star.text.TextGraphicObject")
constexpr OUStringLiteral gsTextEmbeddedService(u"com.sun.star.text.TextEmbeddedObject")
constexpr OUStringLiteral gsIsAutomaticContour(u"IsAutomaticContour")
constexpr OUStringLiteral gsWidth(u"Width")
constexpr OUStringLiteral gsShapeService(u"com.sun.star.drawing.Shape")
constexpr OUStringLiteral gsTextFieldService(u"com.sun.star.text.TextField")
constexpr OUStringLiteral gsVertOrient(u"VertOrient")
static bool txtparae_bContainsIllegalCharacters
constexpr OUStringLiteral gsHyperLinkTarget(u"HyperLinkTarget")
constexpr OUStringLiteral gsIsSyncWidthToHeight(u"IsSyncWidthToHeight")
constexpr OUStringLiteral gsRedline(u"Redline")
constexpr OUStringLiteral gsIsCollapsed(u"IsCollapsed")
constexpr OUStringLiteral gsGraphicFilter(u"GraphicFilter")
constexpr OUStringLiteral gsTextPortionType(u"TextPortionType")
constexpr OUStringLiteral gsRelativeHeight(u"RelativeHeight")
constexpr OUStringLiteral gsSoftPageBreak(u"SoftPageBreak")
constexpr OUStringLiteral gsAnchorPageNo(u"AnchorPageNo")
enum XMLTokenEnum lcl_XmlReferenceElements[]
constexpr OUStringLiteral gsRubyText(u"RubyText")
#define CTF_HYPERLINK_URL
@ TEXT_ADDITIONAL_DEFAULTS
#define CTF_CHAR_STYLE_NAME
std::unique_ptr< char[]> aBuffer
bool operator!=(const XclExpString &rLeft, const XclExpString &rRight)
constexpr sal_uInt16 XML_NAMESPACE_DRAW
constexpr sal_uInt16 XML_NAMESPACE_FIELD
constexpr sal_uInt16 XML_NAMESPACE_XLINK
constexpr sal_uInt16 XML_NAMESPACE_SVG
constexpr sal_uInt16 XML_NAMESPACE_TEXT
constexpr sal_uInt16 XML_NAMESPACE_XML
constexpr sal_uInt16 XML_NAMESPACE_LO_EXT
constexpr sal_uInt16 XML_NAMESPACE_OFFICE
constexpr sal_uInt16 XML_NAMESPACE_STYLE
constexpr sal_uInt16 XML_NAMESPACE_FO