25#include <com/sun/star/beans/XPropertySet.hpp>
26#include <com/sun/star/text/XTextSection.hpp>
36using ::com::sun::star::beans::XPropertySet;
39 Reference<XTextSection> & rPrevSection,
40 const Reference<XTextContent> & rNextSectionContent,
45 Reference<XTextSection> xNextSection;
48 Reference<XPropertySet> xPropSet(rNextSectionContent, UNO_QUERY);
51 if (xPropSet->getPropertySetInfo()->hasPropertyByName(
gsTextSection))
59 rPrevRule, rNextRule, bAutoStyles);
63 Reference<XTextSection> & rPrevSection,
65 sal_Int16 nTextSectionId,
66 const Reference<XTextContent> & rNextSectionContent,
71 Reference<XTextSection> xNextSection;
74 Reference<XPropertySet> xPropSet(rNextSectionContent, UNO_QUERY);
78 rPropSetHelper.
hasProperties( xPropSet->getPropertySetInfo() );
81 xNextSection.set(rPropSetHelper.
getValue( nTextSectionId , xPropSet,
82 true ), uno::UNO_QUERY);
88 rPrevRule, rNextRule, bAutoStyles);
92 Reference<XTextSection> & rPrevSection,
93 const Reference<XTextSection> & rNextSection,
99 if (rPrevSection != rNextSection)
110 std::vector< Reference<XTextSection> > aOldStack;
111 Reference<XTextSection> aCurrent(rPrevSection);
119 aOldStack.push_back(aCurrent);
120 aCurrent.set(aCurrent->getParentSection());
123 std::vector< Reference<XTextSection> > aNewStack;
124 aCurrent.set(rNextSection);
136 aNewStack.push_back(aCurrent);
137 aCurrent.set(aCurrent->getParentSection());
141 std::vector<Reference<XTextSection> > ::reverse_iterator aOld =
143 std::vector<Reference<XTextSection> > ::reverse_iterator aNew =
146 while ( (aOld != aOldStack.rend()) &&
147 (aNew != aNewStack.rend()) &&
156 if (aOld != aOldStack.rend())
158 std::vector<Reference<XTextSection> > ::iterator aOldForward(
160 while ((aOldForward != aOldStack.end()) &&
161 (*aOldForward != *aOld))
169 if (aOldForward != aOldStack.end())
180 while (aNew != aNewStack.rend())
189 if ( !bAutoStyles && !bMute )
200 rPrevSection.set(rNextSection);
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.
information about list and list style for a certain paragraph
std::unique_ptr< XMLRedlineExport > m_pRedlineExport
may be NULL (if no redlines should be exported; e.g. in block mode)
std::unique_ptr< XMLSectionExport > m_pSectionExport
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
static constexpr OUStringLiteral gsTextSection
void exportListChange(const XMLTextNumRuleInfo &rPrvInfo, const XMLTextNumRuleInfo &rNextInfo)