23#include <com/sun/star/beans/PropertyAttribute.hpp>
24#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
25#include <com/sun/star/text/SectionFileLink.hpp>
39#include <osl/diagnose.h>
71struct SwTextSectionProperties_Impl
73 uno::Sequence<sal_Int8> m_Password;
74 OUString m_sCondition;
75 OUString m_sLinkFileName;
76 OUString m_sSectionFilter;
77 OUString m_sSectionRegion;
79 std::unique_ptr<SwFormatCol> m_pColItem;
80 std::unique_ptr<SvxBrushItem> m_pBrushItem;
81 std::unique_ptr<SwFormatFootnoteAtTextEnd> m_pFootnoteItem;
82 std::unique_ptr<SwFormatEndAtTextEnd> m_pEndItem;
83 std::unique_ptr<SvXMLAttrContainerItem> m_pXMLAttr;
84 std::unique_ptr<SwFormatNoBalancedColumns> m_pNoBalanceItem;
85 std::unique_ptr<SvxFrameDirectionItem> m_pFrameDirItem;
86 std::unique_ptr<SvxLRSpaceItem> m_pLRSpaceItem;
92 bool m_bEditInReadonly;
95 SwTextSectionProperties_Impl()
98 , m_bCondHidden(false)
100 , m_bEditInReadonly(false)
101 , m_bUpdateType(true)
121 std::unique_ptr<SwTextSectionProperties_Impl>
m_pProps;
130 ,
m_pProps(pFormat ? nullptr : new SwTextSectionProperties_Impl())
150 throw uno::RuntimeException(
"SwXTextSection: disposed or invalid",
nullptr);
161 const uno::Sequence< OUString >& rPropertyNames,
162 const uno::Sequence< uno::Any >& aValues);
166 uno::Sequence< uno::Any >
168 const uno::Sequence< OUString >& rPropertyNames);
174 if(rHint.
GetId() == SfxHintId::Dying)
177 uno::Reference<uno::XInterface>
const xThis(
m_wThis);
182 lang::EventObject
const ev(xThis);
183 std::unique_lock aGuard(
m_Mutex);
190 return m_pImpl->GetSectionFormat();
204 if ( !xSection.is() )
213 pNew->m_pImpl->m_wThis = xSection.get();
228uno::Reference< text::XTextSection > SAL_CALL
236 const uno::Reference< text::XTextSection > xRet =
241uno::Sequence< uno::Reference< text::XTextSection > > SAL_CALL
250 uno::Sequence<uno::Reference<text::XTextSection> >
aSeq(aChildren.size());
251 uno::Reference< text::XTextSection > * pArray =
aSeq.getArray();
252 for (
size_t i = 0;
i < aChildren.size(); ++
i)
267 throw uno::RuntimeException();
271 OTextCursorHelper* pCursor =
dynamic_cast<OTextCursorHelper*
>(xTextRange.get());
274 pRange ? &pRange->
GetDoc() : (pCursor ? pCursor->GetDoc() :
nullptr);
277 throw lang::IllegalArgumentException();
286 if (
m_pImpl->m_sName.isEmpty())
288 m_pImpl->m_sName =
"TextSection";
291 if(
m_pImpl->m_pProps->m_bDDE )
293 else if(
m_pImpl->m_pProps->m_sLinkFileName.isEmpty() &&
m_pImpl->m_pProps->m_sSectionRegion.isEmpty() )
309 GetChildSections(aSectionsArr);
312 const size_t nCount = aSectionsArr.size();
313 bool bHeaderPresent =
false;
317 bHeaderPresent =
true;
319 if (! bHeaderPresent)
330 m_pImpl->m_pProps->m_sSectionFilter +
332 m_pImpl->m_pProps->m_sSectionRegion);
345 if (
m_pImpl->m_pProps->m_pBrushItem)
347 aSet.Put(*
m_pImpl->m_pProps->m_pBrushItem);
349 if (
m_pImpl->m_pProps->m_pColItem)
351 aSet.Put(*
m_pImpl->m_pProps->m_pColItem);
353 if (
m_pImpl->m_pProps->m_pFootnoteItem)
355 aSet.Put(*
m_pImpl->m_pProps->m_pFootnoteItem);
357 if (
m_pImpl->m_pProps->m_pEndItem)
359 aSet.Put(*
m_pImpl->m_pProps->m_pEndItem);
361 if (
m_pImpl->m_pProps->m_pXMLAttr)
363 aSet.Put(*
m_pImpl->m_pProps->m_pXMLAttr);
365 if (
m_pImpl->m_pProps->m_pNoBalanceItem)
367 aSet.Put(*
m_pImpl->m_pProps->m_pNoBalanceItem);
369 if (
m_pImpl->m_pProps->m_pFrameDirItem)
371 aSet.Put(*
m_pImpl->m_pProps->m_pFrameDirItem);
373 if (
m_pImpl->m_pProps->m_pLRSpaceItem)
375 aSet.Put(*
m_pImpl->m_pProps->m_pLRSpaceItem);
378 if (
m_pImpl->m_pProps->m_Password.hasElements())
384 pDoc->
InsertSwSection( aPam, aSect,
nullptr, aSet.Count() ? &aSet :
nullptr );
389 throw lang::IllegalArgumentException(
390 "SwXTextSection::attach(): invalid TextRange",
398 if (!
m_pImpl->m_pProps->m_sCondition.isEmpty())
411 SfxLinkUpdateMode::ALWAYS : SfxLinkUpdateMode::ONCALL );
417 m_pImpl->m_bIsDescriptor =
false;
420uno::Reference< text::XTextRange > SAL_CALL
430 if(
nullptr != ( pSectFormat->
GetSection() ) &&
434 bool isMoveIntoTable(
false);
441 isMoveIntoTable =
true;
445 SwPaM aEnd(*pEndNode);
450 isMoveIntoTable =
true;
454 uno::Reference<text::XText>
const xParentText(
480 const uno::Reference< lang::XEventListener > & xListener)
483 std::unique_lock aGuard(
m_pImpl->m_Mutex);
484 m_pImpl->m_EventListeners.addInterface(aGuard, xListener);
488 const uno::Reference< lang::XEventListener > & xListener)
491 std::unique_lock aGuard(
m_pImpl->m_Mutex);
492 m_pImpl->m_EventListeners.removeInterface(aGuard, xListener);
495uno::Reference< beans::XPropertySetInfo > SAL_CALL
499 return m_pImpl->m_rPropSet.getPropertySetInfo();
513 ? SfxLinkUpdateMode::ALWAYS : SfxLinkUpdateMode::ONCALL );
519 std::unique_ptr<SwSectionData>
const& pSectionData,
520 std::optional<SfxItemSet>
const& oItemSet,
521 bool const bLinkModeChanged,
bool const bLinkUpdateAlways =
true)
530 for (
size_t i = 0;
i < rFormats.
size(); ++
i)
532 if (rFormats[
i]->GetSection()->GetSectionName()
535 pDoc->
UpdateSection(
i, *pSectionData, oItemSet ? &*oItemSet :
nullptr,
543 if (bLinkModeChanged)
554 const uno::Sequence< OUString >& rPropertyNames,
555 const uno::Sequence< uno::Any >& rValues)
557 if(rPropertyNames.getLength() != rValues.getLength())
559 throw lang::IllegalArgumentException();
564 throw uno::RuntimeException();
567 std::unique_ptr<SwSectionData>
const pSectionData(
570 OUString
const*
const pPropertyNames = rPropertyNames.getConstArray();
572 std::optional<SfxItemSet> oItemSet;
573 bool bLinkModeChanged =
false;
574 bool bLinkMode =
false;
576 for (sal_Int32 nProperty = 0; nProperty < rPropertyNames.getLength();
583 throw beans::UnknownPropertyException(
584 "Unknown property: " + pPropertyNames[nProperty],
587 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
589 throw beans::PropertyVetoException(
590 "Property is read-only: " + pPropertyNames[nProperty],
593 switch (pEntry->
nWID)
605 pSectionData->SetCondition(uTmp);
629 OUString sLinkFileName(pSectionData->GetLinkFileName());
638 pSectionData->SetLinkFileName(sLinkFileName);
645 if (!(
pValues[nProperty] >>= bVal))
647 throw lang::IllegalArgumentException();
655 bLinkModeChanged =
true;
662 text::SectionFileLink aLink;
663 if (!(
pValues[nProperty] >>= aLink))
665 throw lang::IllegalArgumentException();
670 m_pProps->m_sLinkFileName = aLink.FileURL;
671 m_pProps->m_sSectionFilter = aLink.FilterName;
676 !aLink.FileURL.isEmpty())
680 const OUString sTmp(!aLink.FileURL.isEmpty()
685 const OUString sFileName(
689 pSectionData->SetLinkFileName(sFileName);
690 if (sFileName.getLength() < 3)
713 OUString sSectLink(pSectionData->GetLinkFileName());
720 pSectionData->SetLinkFileName(sSectLink);
721 if (sSectLink.getLength() < 3)
731 if (!(
pValues[nProperty] >>= bVal))
733 throw lang::IllegalArgumentException();
741 pSectionData->SetHidden(!bVal);
748 if (!(
pValues[nProperty] >>= bVal))
750 throw lang::IllegalArgumentException();
758 if (!pSectionData->GetCondition().isEmpty())
760 pSectionData->SetCondHidden(!bVal);
768 if (!(
pValues[nProperty] >>= bVal))
770 throw lang::IllegalArgumentException();
778 pSectionData->SetProtectFlag(bVal);
785 if (!(
pValues[nProperty] >>= bVal))
787 throw lang::IllegalArgumentException();
795 pSectionData->SetEditInReadonlyFlag(bVal);
801 uno::Sequence<sal_Int8>
aSeq;
809 pSectionData->SetPassword(
aSeq);
819 oItemSet->
Put(rOldAttrSet);
821 pValues[nProperty], *oItemSet);
832 pPutItem =
m_pProps->m_pColItem.get();
841 pPutItem =
m_pProps->m_pBrushItem.get();
849 pPutItem =
m_pProps->m_pFootnoteItem.get();
857 pPutItem =
m_pProps->m_pEndItem.get();
867 pPutItem =
m_pProps->m_pXMLAttr.get();
876 pPutItem =
m_pProps->m_pNoBalanceItem.get();
886 pPutItem =
m_pProps->m_pFrameDirItem.get();
895 pPutItem =
m_pProps->m_pLRSpaceItem.get();
913 const uno::Sequence< OUString >& rPropertyNames,
914 const uno::Sequence< uno::Any >& rValues)
921 m_pImpl->SetPropertyValues_Impl( rPropertyNames, rValues );
923 catch (
const beans::UnknownPropertyException &rException)
927 lang::WrappedTargetException aWExc;
928 aWExc.TargetException <<= rException;
934 const OUString& rPropertyName,
const uno::Any& rValue)
938 m_pImpl->SetPropertyValues_Impl( { rPropertyName } , { rValue } );
941uno::Sequence< uno::Any >
943 const uno::Sequence< OUString > & rPropertyNames )
946 if (!pFormat && !m_bIsDescriptor)
948 throw uno::RuntimeException(
"non-descriptor section without format");
951 uno::Sequence< uno::Any > aRet(rPropertyNames.getLength());
954 const OUString* pPropertyNames = rPropertyNames.getConstArray();
956 for (sal_Int32 nProperty = 0; nProperty < rPropertyNames.getLength();
960 m_rPropSet.getPropertyMap().getByName(pPropertyNames[nProperty]);
963 throw beans::UnknownPropertyException(
964 "Unknown property: " + pPropertyNames[nProperty],
971 const OUString uTmp( m_bIsDescriptor
972 ? m_pProps->m_sCondition
974 pRet[nProperty] <<= uTmp;
984 if (m_pProps->m_bDDE)
986 sRet = m_pProps->m_sLinkFileName;
1004 pRet[nProperty] <<= bTemp;
1010 text::SectionFileLink aLink;
1011 if (m_bIsDescriptor)
1013 if (!m_pProps->m_bDDE)
1015 aLink.FileURL = m_pProps->m_sLinkFileName;
1016 aLink.FilterName = m_pProps->m_sSectionFilter;
1028 pRet[nProperty] <<= aLink;
1034 if (m_bIsDescriptor)
1036 sRet = m_pProps->m_sSectionRegion;
1043 pRet[nProperty] <<= sRet;
1048 const bool bTemp = m_bIsDescriptor
1049 ? !m_pProps->m_bHidden : !pSect->
IsHidden();
1050 pRet[nProperty] <<= bTemp;
1055 const bool bTemp = m_bIsDescriptor
1057 pRet[nProperty] <<= bTemp;
1062 const bool bTemp = m_bIsDescriptor
1063 ? m_pProps->m_bProtect : pSect->
IsProtect();
1064 pRet[nProperty] <<= bTemp;
1069 const bool bTemp = m_bIsDescriptor
1071 pRet[nProperty] <<= bTemp;
1086 while ((pEnclosingSection !=
nullptr) &&
1089 pEnclosingSection = pEnclosingSection->
GetParent();
1096 const uno::Reference<text::XDocumentIndex> xIndex =
1099 pRet[nProperty] <<= xIndex;
1107 pRet[nProperty] <<= bRet;
1114 pRet[nProperty],
u"", pEntry->
nWID);
1130 const SwNode& rRedPointNode = pRedline->GetPointNode();
1131 const SwNode& rRedMarkNode = pRedline->GetMarkNode();
1132 if ((&rRedPointNode == pSectNode) ||
1133 (&rRedMarkNode == pSectNode))
1135 const SwNode& rStartOfRedline =
1138 ? rRedPointNode : rRedMarkNode;
1139 const bool bIsStart = (&rStartOfRedline == pSectNode);
1142 *pRedline, bIsStart);
1150 pRet[nProperty] <<= m_bIsDescriptor
1158 m_rPropSet.getPropertyValue(*pEntry,
1166 if (!m_pProps->m_pColItem)
1170 pQueryItem = m_pProps->m_pColItem.get();
1174 if (!m_pProps->m_pBrushItem)
1176 m_pProps->m_pBrushItem.reset(
1179 pQueryItem = m_pProps->m_pBrushItem.get();
1183 if (!m_pProps->m_pFootnoteItem)
1187 pQueryItem = m_pProps->m_pFootnoteItem.get();
1191 if (!m_pProps->m_pEndItem)
1195 pQueryItem = m_pProps->m_pEndItem.get();
1199 if (!m_pProps->m_pXMLAttr)
1201 m_pProps->m_pXMLAttr.reset(
1204 pQueryItem = m_pProps->m_pXMLAttr.get();
1208 if (!m_pProps->m_pNoBalanceItem)
1210 m_pProps->m_pNoBalanceItem.reset(
1213 pQueryItem = m_pProps->m_pNoBalanceItem.get();
1217 if (!m_pProps->m_pFrameDirItem)
1219 m_pProps->m_pFrameDirItem.reset(
1223 pQueryItem = m_pProps->m_pFrameDirItem.get();
1227 if (!m_pProps->m_pLRSpaceItem)
1229 m_pProps->m_pLRSpaceItem.reset(
1232 pQueryItem = m_pProps->m_pLRSpaceItem.get();
1246uno::Sequence< uno::Any > SAL_CALL
1248 const uno::Sequence< OUString >& rPropertyNames)
1251 uno::Sequence< uno::Any > aValues;
1256 aValues =
m_pImpl->GetPropertyValues_Impl( rPropertyNames );
1258 catch (beans::UnknownPropertyException &)
1261 throw lang::WrappedTargetRuntimeException(
"Unknown property exception caught",
1264 catch (lang::WrappedTargetException &)
1267 throw lang::WrappedTargetRuntimeException(
"WrappedTargetException caught",
1279 uno::Sequence< OUString > aPropertyNames { rPropertyName };
1280 return m_pImpl->GetPropertyValues_Impl(aPropertyNames).getConstArray()[0];
1284 const uno::Sequence< OUString >& ,
1285 const uno::Reference< beans::XPropertiesChangeListener >& )
1287 OSL_FAIL(
"SwXTextSection::addPropertiesChangeListener(): not implemented");
1291 const uno::Reference< beans::XPropertiesChangeListener >& )
1293 OSL_FAIL(
"SwXTextSection::removePropertiesChangeListener(): not implemented");
1297 const uno::Sequence< OUString >& ,
1298 const uno::Reference< beans::XPropertiesChangeListener >& )
1300 OSL_FAIL(
"SwXTextSection::firePropertiesChangeEvent(): not implemented");
1306 const uno::Reference< beans::XPropertyChangeListener >& )
1308 OSL_FAIL(
"SwXTextSection::addPropertyChangeListener(): not implemented");
1314 const uno::Reference< beans::XPropertyChangeListener >& )
1316 OSL_FAIL(
"SwXTextSection::removePropertyChangeListener(): not implemented");
1322 const uno::Reference< beans::XVetoableChangeListener >& )
1324 OSL_FAIL(
"SwXTextSection::addVetoableChangeListener(): not implemented");
1330 const uno::Reference< beans::XVetoableChangeListener >& )
1332 OSL_FAIL(
"SwXTextSection::removeVetoableChangeListener(): not implemented");
1335beans::PropertyState SAL_CALL
1340 uno::Sequence< OUString > aNames { rPropertyName };
1344uno::Sequence< beans::PropertyState > SAL_CALL
1346 const uno::Sequence< OUString >& rPropertyNames)
1351 if (!pFormat && !
m_pImpl->m_bIsDescriptor)
1353 throw uno::RuntimeException();
1356 uno::Sequence< beans::PropertyState > aStates(rPropertyNames.getLength());
1357 beans::PropertyState *
const pStates = aStates.getArray();
1358 const OUString* pNames = rPropertyNames.getConstArray();
1359 for (sal_Int32
i = 0;
i < rPropertyNames.getLength();
i++)
1361 pStates[
i] = beans::PropertyState_DEFAULT_VALUE;
1363 m_pImpl->m_rPropSet.getPropertyMap().getByName( pNames[
i]);
1366 throw beans::UnknownPropertyException(
1367 "Unknown property: " + pNames[
i],
1370 switch (pEntry->
nWID)
1386 pStates[
i] = beans::PropertyState_DIRECT_VALUE;
1392 pStates[
i] =
m_pImpl->m_rPropSet.getPropertyState(
1399 if (!
m_pImpl->m_pProps->m_pColItem)
1401 pStates[
i] = beans::PropertyState_DEFAULT_VALUE;
1405 pStates[
i] = beans::PropertyState_DIRECT_VALUE;
1410 if (!
m_pImpl->m_pProps->m_pBrushItem)
1412 pStates[
i] = beans::PropertyState_DEFAULT_VALUE;
1416 pStates[
i] = beans::PropertyState_DIRECT_VALUE;
1432 if (!pFormat && !
m_pImpl->m_bIsDescriptor)
1434 throw uno::RuntimeException();
1438 m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
1441 throw beans::UnknownPropertyException(
1442 "Unknown property: " + rPropertyName,
1445 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
1447 throw uno::RuntimeException(
1448 "Property is read-only: " + rPropertyName,
1452 std::unique_ptr<SwSectionData>
const pSectionData(
1455 std::optional<SfxItemSet> oNewAttrSet;
1456 bool bLinkModeChanged =
false;
1458 switch (pEntry->
nWID)
1464 m_pImpl->m_pProps->m_sCondition.clear();
1468 pSectionData->SetCondition(OUString());
1479 m_pImpl->m_pProps->m_bDDE =
false;
1480 m_pImpl->m_pProps->m_sLinkFileName.clear();
1481 m_pImpl->m_pProps->m_sSectionRegion.clear();
1482 m_pImpl->m_pProps->m_sSectionFilter.clear();
1492 m_pImpl->m_pProps->m_bUpdateType =
true;
1496 bLinkModeChanged =
true;
1503 m_pImpl->m_pProps->m_bHidden =
false;
1507 pSectionData->SetHidden(
false);
1515 m_pImpl->m_pProps->m_bProtect =
false;
1519 pSectionData->SetProtectFlag(
false);
1527 m_pImpl->m_pProps->m_bEditInReadonly =
false;
1531 pSectionData->SetEditInReadonlyFlag(
false);
1547 oNewAttrSet.emplace(*rOldAttrSet.
GetPool(), pEntry->
nWID, pEntry->
nWID);
1554 m_pImpl->m_pProps->m_pColItem.reset();
1558 m_pImpl->m_pProps->m_pBrushItem.reset();
1576 m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
1579 throw beans::UnknownPropertyException(
1580 "Unknown property: " + rPropertyName,
1584 switch(pEntry->
nWID)
1592 aRet <<= OUString();
1595 aRet <<= text::SectionFileLink();
1632 else if (
m_pImpl->m_bIsDescriptor)
1638 throw uno::RuntimeException();
1655 size_t nApplyPos = SIZE_MAX;
1656 for(
size_t i = 0;
i < rFormats.
size(); ++
i )
1658 if(rFormats[
i]->GetSection() == pSect)
1662 else if (rName == rFormats[
i]->GetSection()->GetSectionName())
1664 throw uno::RuntimeException();
1667 if (nApplyPos != SIZE_MAX)
1680 else if (
m_pImpl->m_bIsDescriptor)
1686 throw uno::RuntimeException();
1693 return "SwXTextSection";
1701uno::Sequence< OUString > SAL_CALL
1705 "com.sun.star.text.TextContent",
1706 "com.sun.star.text.TextSection",
1707 "com.sun.star.document.LinkTarget"
1715 return pSectionFormat;
1724 return pShell ? pShell->
GetModel() :
nullptr;
const PropertyValue * pValues
virtual const SwRedlineTable & GetRedlineTable() const =0
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
static bool IsWhich(sal_uInt16 nId)
const SfxItemPropertyMapEntry * getByName(std::u16string_view rName) const
void setPropertyValue(const SfxItemPropertyMapEntry &rEntry, const css::uno::Any &aVal, SfxItemSet &rSet) const
const SfxItemPropertyMap & getPropertyMap() const
SfxItemPool * GetPool() const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const INetURLObject & GetURLObject() const
SfxMedium * GetMedium() const
css::uno::Reference< css::frame::XModel3 > GetModel() const
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId)
bool StartListening(SvtBroadcaster &rBroadcaster)
SwSectionFormats & GetSections()
SwSection * InsertSwSection(SwPaM const &rRange, SwSectionData &, std::tuple< SwTOXBase const *, sw::RedlineMode, sw::FieldmarkMode, sw::ParagraphBreakMode > const *pTOXBase, SfxItemSet const *const pAttr, bool const bUpdate=true)
IDocumentUndoRedo & GetIDocumentUndoRedo()
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
static SwTOXBase * GetCurTOX(const SwPosition &rPos)
Get current table of contents.
void DelSectionFormat(SwSectionFormat *pFormat, bool bDelNodes=false)
OUString GetUniqueSectionName(const OUString *pChkStr=nullptr) const
void UpdateSection(size_t const nSect, SwSectionData &, SfxItemSet const *const =nullptr, bool const bPreventLinkUpdate=false)
const SwAttrPool & GetAttrPool() const
SwDocShell * GetDocShell()
Ends a section of nodes in the document model.
const SwNodeIndex * GetContentIdx() const
Marks a node in the document model.
Base class of the Writer document model elements.
SwNodes & GetNodes()
Node is in which nodes-array/doc?
bool IsSectionNode() const
SwTableNode * FindTableNode()
Search table node, in which it is.
SwSectionNode * FindSectionNode()
Search section node, in which it is.
const SwEndNode * EndOfSectionNode() const
bool IsDocNodes() const
Is the NodesArray the regular one of Doc? (and not the UndoNds, ...) Implementation in doc....
PaM is Point and Mark: a selection of the document model.
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
const SwPosition * GetPoint() const
const SwPosition * Start() const
void SetHidden(bool const bFlag)
SAL_DLLPRIVATE void SetProtectFlag(bool const bFlag)
void SetEditInReadonlyFlag(bool const bFlag)
void SetSectionName(OUString const &rName)
void SetCondition(OUString const &rNew)
void SetLinkFileName(OUString const &rNew)
void SetPassword(css::uno::Sequence< sal_Int8 > const &rNew)
OUString const & GetCondition() const
bool IsEditInReadonly() const
void SetUpdateType(SfxLinkUpdateMode nType)
OUString const & GetLinkFileName() const
css::uno::Sequence< sal_Int8 > const & GetPassword() const
SwSection * GetParent() const
void SetCondHidden(bool const bFlag)
const OUString & GetSectionName() const
SwSectionFormat * GetFormat()
SectionType GetType() const
SfxLinkUpdateMode GetUpdateType() const
bool IsCondHidden() const
void CreateLink(LinkCreateType eType)
static rtl::Reference< SwXDocumentIndex > CreateXDocumentIndex(SwDoc &rDoc, SwTOXBaseSection *pSection, TOXTypes eTypes=TOX_INDEX)
static css::uno::Sequence< css::beans::PropertyValue > CreateRedlineProperties(SwRangeRedline const &rRedline, bool const bIsStart)
uno::Sequence< uno::Any > GetPropertyValues_Impl(const uno::Sequence< OUString > &rPropertyNames)
SwSectionFormat * GetSectionFormat() const
const SfxItemPropertySet & m_rPropSet
SwSectionFormat * m_pFormat
const bool m_bIndexHeader
::comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > m_EventListeners
void SetPropertyValues_Impl(const uno::Sequence< OUString > &rPropertyNames, const uno::Sequence< uno::Any > &aValues)
void Attach(SwSectionFormat *pFormat)
virtual void Notify(const SfxHint &rHint) override
std::unique_ptr< SwTextSectionProperties_Impl > m_pProps
Impl(SwXTextSection &rThis, SwSectionFormat *const pFormat, const bool bIndexHeader)
SwSectionFormat & GetSectionFormatOrThrow() const
unotools::WeakReference< SwXTextSection > m_wThis
virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual ::sfx2::Metadatable * GetCoreObject() override
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual css::uno::Reference< css::frame::XModel > GetModel() override
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(const css::uno::Sequence< OUString > &rPropertyNames) override
virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual OUString SAL_CALL getName() override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
virtual ~SwXTextSection() override
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Sequence< css::uno::Any > &rValues) override
virtual css::uno::Reference< css::text::XTextSection > SAL_CALL getParentSection() override
virtual void SAL_CALL dispose() override
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &rPropertyNames) override
SwSectionFormat * GetFormat() const
SwXTextSection(SwSectionFormat *const pFormat, const bool bIndexHeader)
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &rPropertyName) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
::sw::UnoImplPtr< Impl > m_pImpl
virtual void SAL_CALL setPropertyToDefault(const OUString &rPropertyName) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual void SAL_CALL setName(const OUString &rName) override
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &rPropertyName) override
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
static rtl::Reference< SwXTextSection > CreateXTextSection(SwSectionFormat *const pFormat, const bool bIndexHeader=false)
virtual css::uno::Sequence< css::uno::Reference< css::text::XTextSection > > SAL_CALL getChildSections() override
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
virtual OUString SAL_CALL getImplementationName() override
void disposeAndClear(::std::unique_lock<::std::mutex > &rGuard, const css::lang::EventObject &rEvt)
#define FN_UNO_ANCHOR_TYPE
#define FN_PARAM_LINK_DISPLAY_NAME
#define FN_UNO_REDLINE_NODE_START
#define FN_UNO_REDLINE_NODE_END
#define FN_UNO_ANCHOR_TYPES
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(126)
constexpr TypedWhichId< SwFormatEndAtTextEnd > RES_END_AT_TXTEND(124)
constexpr TypedWhichId< SwFormatFootnoteAtTextEnd > RES_FTN_AT_TXTEND(123)
constexpr TypedWhichId< SwFormatCol > RES_COL(115)
constexpr TypedWhichId< SvXMLAttrContainerItem > RES_UNKNOWNATR_CONTAINER(RES_UNKNOWNATR_BEGIN)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(111)
constexpr TypedWhichId< SwFormatNoBalancedColumns > RES_COLUMNBALANCE(125)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(97)
Sequence< sal_Int8 > aSeq
SVL_DLLPUBLIC Link< OUString *, bool > const & GetMaybeFileHdl()
SVL_DLLPUBLIC OUString SmartRel2Abs(INetURLObject const &rTheBaseURIRef, OUString const &rTheRelURIRef, Link< OUString *, bool > const &rMaybeFileHdl=Link< OUString *, bool >(), bool bCheckFileExists=true, bool bIgnoreFragment=false, INetURLObject::EncodeMechanism eEncodeMechanism=INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism eDecodeMechanism=INetURLObject::DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
OUString setToken(const OUString &rIn, sal_Int32 nToken, sal_Unicode cTok, std::u16string_view rNewToken)
sal_Int32 getTokenCount(std::string_view rIn, char cTok)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
Any SAL_CALL getCaughtException()
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
const sal_Unicode cTokenSeparator
uno::Reference< text::XText > CreateParentXText(SwDoc &rDoc, const SwPosition &rPos)
bool XTextRangeToSwPaM(SwUnoInternalPaM &rToFill, const uno::Reference< text::XTextRange > &xTextRange, ::sw::TextRangeMode const eMode)
bool GetDefaultTextContentValue(css::uno::Any &rAny, std::u16string_view rPropertyName, sal_uInt16 nWID=0)
bool GoInContent(SwPaM &rPam, SwMoveFnCollection const &fnMove)
SwMoveFnCollection const & fnMoveBackward
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
std::vector< SwSection * > SwSections
Marks a position in the document model.
SwUnoPropertyMapProvider aSwMapProvider
#define WID_SECT_DDE_AUTOUPDATE
#define PROPERTY_MAP_SECTION
#define WID_SECT_DDE_ELEMENT
#define WID_SECT_IS_GLOBAL_DOC_SECTION
#define WID_SECT_DOCUMENT_INDEX
#define WID_SECT_PASSWORD
#define WID_SECT_DDE_TYPE
#define WID_SECT_DDE_FILE
#define WID_SECT_CURRENTLY_VISIBLE
#define WID_SECT_CONDITION
#define WID_SECT_PROTECTED
#define WID_SECT_EDIT_IN_READONLY
static void lcl_UpdateSection(SwSectionFormat *const pFormat, std::unique_ptr< SwSectionData > const &pSectionData, std::optional< SfxItemSet > const &oItemSet, bool const bLinkModeChanged, bool const bLinkUpdateAlways=true)
static void lcl_UpdateLinkType(SwSection &rSection, bool const bLinkUpdateAlways)