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>
47 #include <section.hxx>
71 struct 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;
128 , m_bIndexHeader(bIndexHeader)
129 , m_bIsDescriptor(nullptr == pFormat)
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();
193 uno::Reference< text::XTextSection >
199 uno::Reference< text::XTextSection > xSection;
204 if ( !xSection.is() )
213 pNew->m_pImpl->m_wThis = xSection;
231 return theSwXTextSectionUnoTunnelId.
getSeq();
237 return comphelper::getSomethingImpl<SwXTextSection>(rId,
this);
240 uno::Reference< text::XTextSection > SAL_CALL
248 const uno::Reference< text::XTextSection > xRet =
253 uno::Sequence< uno::Reference< text::XTextSection > > SAL_CALL
262 uno::Sequence<uno::Reference<text::XTextSection> >
aSeq(aChildren.size());
263 uno::Reference< text::XTextSection > * pArray =
aSeq.getArray();
264 for (
size_t i = 0;
i < aChildren.size(); ++
i)
279 throw uno::RuntimeException();
282 uno::Reference<lang::XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY);
283 SwXTextRange* pRange = comphelper::getFromUnoTunnel<SwXTextRange>(xRangeTunnel);
284 OTextCursorHelper* pCursor = comphelper::getFromUnoTunnel<OTextCursorHelper>(xRangeTunnel);
287 pRange ? &pRange->
GetDoc() : (pCursor ? pCursor->GetDoc() :
nullptr);
290 throw lang::IllegalArgumentException();
299 if (
m_pImpl->m_sName.isEmpty())
301 m_pImpl->m_sName =
"TextSection";
304 if(
m_pImpl->m_pProps->m_bDDE )
306 else if(
m_pImpl->m_pProps->m_sLinkFileName.isEmpty() &&
m_pImpl->m_pProps->m_sSectionRegion.isEmpty() )
322 GetChildSections(aSectionsArr);
325 const size_t nCount = aSectionsArr.size();
326 bool bHeaderPresent =
false;
327 for(
size_t i = 0;
i < nCount; ++
i)
330 bHeaderPresent =
true;
332 if (! bHeaderPresent)
341 aSect.SetLinkFileName(
m_pImpl->m_pProps->m_sLinkFileName +
343 m_pImpl->m_pProps->m_sSectionFilter +
345 m_pImpl->m_pProps->m_sSectionRegion);
347 aSect.SetHidden(
m_pImpl->m_pProps->m_bHidden);
348 aSect.SetProtectFlag(
m_pImpl->m_pProps->m_bProtect);
349 aSect.SetEditInReadonlyFlag(
m_pImpl->m_pProps->m_bEditInReadonly);
357 aSet(pDoc->GetAttrPool());
358 if (
m_pImpl->m_pProps->m_pBrushItem)
362 if (
m_pImpl->m_pProps->m_pColItem)
364 aSet.Put(*
m_pImpl->m_pProps->m_pColItem);
366 if (
m_pImpl->m_pProps->m_pFootnoteItem)
368 aSet.Put(*
m_pImpl->m_pProps->m_pFootnoteItem);
370 if (
m_pImpl->m_pProps->m_pEndItem)
372 aSet.Put(*
m_pImpl->m_pProps->m_pEndItem);
374 if (
m_pImpl->m_pProps->m_pXMLAttr)
376 aSet.Put(*
m_pImpl->m_pProps->m_pXMLAttr);
378 if (
m_pImpl->m_pProps->m_pNoBalanceItem)
380 aSet.Put(*
m_pImpl->m_pProps->m_pNoBalanceItem);
382 if (
m_pImpl->m_pProps->m_pFrameDirItem)
384 aSet.Put(*
m_pImpl->m_pProps->m_pFrameDirItem);
386 if (
m_pImpl->m_pProps->m_pLRSpaceItem)
388 aSet.Put(*
m_pImpl->m_pProps->m_pLRSpaceItem);
391 if (
m_pImpl->m_pProps->m_Password.hasElements())
393 aSect.SetPassword(
m_pImpl->m_pProps->m_Password);
397 pDoc->InsertSwSection( aPam, aSect,
nullptr, aSet.Count() ? &aSet : nullptr );
402 throw lang::IllegalArgumentException(
403 "SwXTextSection::attach(): invalid TextRange",
404 static_cast< ::cppu::OWeakObject*>(
this), 0);
411 if (!
m_pImpl->m_pProps->m_sCondition.isEmpty())
424 SfxLinkUpdateMode::ALWAYS : SfxLinkUpdateMode::ONCALL );
430 m_pImpl->m_bIsDescriptor =
false;
433 uno::Reference< text::XTextRange > SAL_CALL
438 uno::Reference< text::XTextRange > xRet;
443 if(
nullptr != ( pSectFormat->
GetSection() ) &&
447 bool isMoveIntoTable(
false);
454 isMoveIntoTable =
true;
458 SwPaM aEnd(*pEndNode);
463 isMoveIntoTable =
true;
467 uno::Reference<text::XText>
const xParentText(
493 const uno::Reference< lang::XEventListener > & xListener)
496 std::unique_lock aGuard(
m_pImpl->m_Mutex);
497 m_pImpl->m_EventListeners.addInterface(aGuard, xListener);
501 const uno::Reference< lang::XEventListener > & xListener)
504 std::unique_lock aGuard(
m_pImpl->m_Mutex);
505 m_pImpl->m_EventListeners.removeInterface(aGuard, xListener);
508 uno::Reference< beans::XPropertySetInfo > SAL_CALL
512 return m_pImpl->m_rPropSet.getPropertySetInfo();
526 ? SfxLinkUpdateMode::ALWAYS : SfxLinkUpdateMode::ONCALL );
532 std::unique_ptr<SwSectionData>
const& pSectionData,
533 std::optional<SfxItemSet>
const& oItemSet,
534 bool const bLinkModeChanged,
bool const bLinkUpdateAlways =
true)
543 for (
size_t i = 0;
i < rFormats.
size(); ++
i)
545 if (rFormats[
i]->GetSection()->GetSectionName()
548 pDoc->
UpdateSection(
i, *pSectionData, oItemSet ? &*oItemSet :
nullptr,
556 if (bLinkModeChanged)
567 const uno::Sequence< OUString >& rPropertyNames,
568 const uno::Sequence< uno::Any >& rValues)
570 if(rPropertyNames.getLength() != rValues.getLength())
572 throw lang::IllegalArgumentException();
577 throw uno::RuntimeException();
580 std::unique_ptr<SwSectionData>
const pSectionData(
583 OUString
const*
const pPropertyNames = rPropertyNames.getConstArray();
585 std::optional<SfxItemSet> oItemSet;
586 bool bLinkModeChanged =
false;
587 bool bLinkMode =
false;
589 for (sal_Int32 nProperty = 0; nProperty < rPropertyNames.getLength();
596 throw beans::UnknownPropertyException(
597 "Unknown property: " + pPropertyNames[nProperty],
598 static_cast<cppu::OWeakObject *>(&
m_rThis));
600 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
602 throw beans::PropertyVetoException(
603 "Property is read-only: " + pPropertyNames[nProperty],
604 static_cast<cppu::OWeakObject *>(&
m_rThis));
606 switch (pEntry->
nWID)
611 pValues[nProperty] >>= uTmp;
618 pSectionData->SetCondition(uTmp);
627 pValues[nProperty] >>= sTmp;
642 OUString sLinkFileName(pSectionData->GetLinkFileName());
651 pSectionData->SetLinkFileName(sLinkFileName);
658 if (!(pValues[nProperty] >>= bVal))
660 throw lang::IllegalArgumentException();
668 bLinkModeChanged =
true;
675 text::SectionFileLink aLink;
676 if (!(pValues[nProperty] >>= aLink))
678 throw lang::IllegalArgumentException();
683 m_pProps->m_sLinkFileName = aLink.FileURL;
684 m_pProps->m_sSectionFilter = aLink.FilterName;
689 !aLink.FileURL.isEmpty())
693 const OUString sTmp(!aLink.FileURL.isEmpty()
698 const OUString sFileName(
702 pSectionData->SetLinkFileName(sFileName);
703 if (sFileName.getLength() < 3)
713 pValues[nProperty] >>= sLink;
726 OUString sSectLink(pSectionData->GetLinkFileName());
733 pSectionData->SetLinkFileName(sSectLink);
734 if (sSectLink.getLength() < 3)
744 if (!(pValues[nProperty] >>= bVal))
746 throw lang::IllegalArgumentException();
754 pSectionData->SetHidden(!bVal);
761 if (!(pValues[nProperty] >>= bVal))
763 throw lang::IllegalArgumentException();
771 if (!pSectionData->GetCondition().isEmpty())
773 pSectionData->SetCondHidden(!bVal);
781 if (!(pValues[nProperty] >>= bVal))
783 throw lang::IllegalArgumentException();
791 pSectionData->SetProtectFlag(bVal);
798 if (!(pValues[nProperty] >>= bVal))
800 throw lang::IllegalArgumentException();
808 pSectionData->SetEditInReadonlyFlag(bVal);
814 uno::Sequence<sal_Int8>
aSeq;
815 pValues[nProperty] >>= aSeq;
822 pSectionData->SetPassword(aSeq);
832 oItemSet->
Put(rOldAttrSet);
834 pValues[nProperty], *oItemSet);
845 pPutItem =
m_pProps->m_pColItem.get();
854 pPutItem =
m_pProps->m_pBrushItem.get();
862 pPutItem =
m_pProps->m_pFootnoteItem.get();
870 pPutItem =
m_pProps->m_pEndItem.get();
880 pPutItem =
m_pProps->m_pXMLAttr.get();
889 pPutItem =
m_pProps->m_pNoBalanceItem.get();
899 pPutItem =
m_pProps->m_pFrameDirItem.get();
908 pPutItem =
m_pProps->m_pLRSpaceItem.get();
912 pPutItem->
PutValue(pValues[nProperty],
926 const uno::Sequence< OUString >& rPropertyNames,
927 const uno::Sequence< uno::Any >& rValues)
934 m_pImpl->SetPropertyValues_Impl( rPropertyNames, rValues );
936 catch (
const beans::UnknownPropertyException &rException)
940 lang::WrappedTargetException aWExc;
941 aWExc.TargetException <<= rException;
947 const OUString& rPropertyName,
const uno::Any& rValue)
951 m_pImpl->SetPropertyValues_Impl( { rPropertyName } , { rValue } );
954 uno::Sequence< uno::Any >
956 const uno::Sequence< OUString > & rPropertyNames )
959 if (!pFormat && !m_bIsDescriptor)
961 throw uno::RuntimeException(
"non-descriptor section without format");
964 uno::Sequence< uno::Any > aRet(rPropertyNames.getLength());
967 const OUString* pPropertyNames = rPropertyNames.getConstArray();
969 for (sal_Int32 nProperty = 0; nProperty < rPropertyNames.getLength();
973 m_rPropSet.getPropertyMap().getByName(pPropertyNames[nProperty]);
976 throw beans::UnknownPropertyException(
977 "Unknown property: " + pPropertyNames[nProperty],
978 static_cast<cppu::OWeakObject *>(& m_rThis));
984 const OUString uTmp( m_bIsDescriptor
985 ? m_pProps->m_sCondition
987 pRet[nProperty] <<= uTmp;
997 if (m_pProps->m_bDDE)
999 sRet = m_pProps->m_sLinkFileName;
1017 pRet[nProperty] <<= bTemp;
1023 text::SectionFileLink aLink;
1024 if (m_bIsDescriptor)
1026 if (!m_pProps->m_bDDE)
1028 aLink.FileURL = m_pProps->m_sLinkFileName;
1029 aLink.FilterName = m_pProps->m_sSectionFilter;
1041 pRet[nProperty] <<= aLink;
1047 if (m_bIsDescriptor)
1049 sRet = m_pProps->m_sSectionRegion;
1056 pRet[nProperty] <<= sRet;
1061 const bool bTemp = m_bIsDescriptor
1062 ? !m_pProps->m_bHidden : !pSect->
IsHidden();
1063 pRet[nProperty] <<= bTemp;
1068 const bool bTemp = m_bIsDescriptor
1070 pRet[nProperty] <<= bTemp;
1075 const bool bTemp = m_bIsDescriptor
1076 ? m_pProps->m_bProtect : pSect->
IsProtect();
1077 pRet[nProperty] <<= bTemp;
1082 const bool bTemp = m_bIsDescriptor
1084 pRet[nProperty] <<= bTemp;
1099 while ((pEnclosingSection !=
nullptr) &&
1102 pEnclosingSection = pEnclosingSection->
GetParent();
1109 const uno::Reference<text::XDocumentIndex> xIndex =
1112 pRet[nProperty] <<= xIndex;
1120 pRet[nProperty] <<= bRet;
1127 pRet[nProperty],
u"", pEntry->
nWID);
1143 const SwNode& rRedPointNode = pRedline->GetNode();
1144 const SwNode& rRedMarkNode = pRedline->GetNode(
false);
1145 if ((&rRedPointNode == pSectNode) ||
1146 (&rRedMarkNode == pSectNode))
1148 const SwNode& rStartOfRedline =
1151 ? rRedPointNode : rRedMarkNode;
1152 const bool bIsStart = (&rStartOfRedline == pSectNode);
1155 *pRedline, bIsStart);
1163 pRet[nProperty] <<= m_bIsDescriptor
1171 m_rPropSet.getPropertyValue(*pEntry,
1179 if (!m_pProps->m_pColItem)
1183 pQueryItem = m_pProps->m_pColItem.get();
1187 if (!m_pProps->m_pBrushItem)
1189 m_pProps->m_pBrushItem.reset(
1192 pQueryItem = m_pProps->m_pBrushItem.get();
1196 if (!m_pProps->m_pFootnoteItem)
1200 pQueryItem = m_pProps->m_pFootnoteItem.get();
1204 if (!m_pProps->m_pEndItem)
1208 pQueryItem = m_pProps->m_pEndItem.get();
1212 if (!m_pProps->m_pXMLAttr)
1214 m_pProps->m_pXMLAttr.reset(
1217 pQueryItem = m_pProps->m_pXMLAttr.get();
1221 if (!m_pProps->m_pNoBalanceItem)
1223 m_pProps->m_pNoBalanceItem.reset(
1226 pQueryItem = m_pProps->m_pNoBalanceItem.get();
1230 if (!m_pProps->m_pFrameDirItem)
1232 m_pProps->m_pFrameDirItem.reset(
1236 pQueryItem = m_pProps->m_pFrameDirItem.get();
1240 if (!m_pProps->m_pLRSpaceItem)
1242 m_pProps->m_pLRSpaceItem.reset(
1245 pQueryItem = m_pProps->m_pLRSpaceItem.get();
1259 uno::Sequence< uno::Any > SAL_CALL
1261 const uno::Sequence< OUString >& rPropertyNames)
1264 uno::Sequence< uno::Any > aValues;
1269 aValues =
m_pImpl->GetPropertyValues_Impl( rPropertyNames );
1271 catch (beans::UnknownPropertyException &)
1274 throw lang::WrappedTargetRuntimeException(
"Unknown property exception caught",
1275 static_cast < cppu::OWeakObject * > (
this ), anyEx );
1277 catch (lang::WrappedTargetException &)
1280 throw lang::WrappedTargetRuntimeException(
"WrappedTargetException caught",
1281 static_cast < cppu::OWeakObject * > (
this ), anyEx );
1292 uno::Sequence< OUString > aPropertyNames { rPropertyName };
1293 return m_pImpl->GetPropertyValues_Impl(aPropertyNames).getConstArray()[0];
1297 const uno::Sequence< OUString >& ,
1298 const uno::Reference< beans::XPropertiesChangeListener >& )
1300 OSL_FAIL(
"SwXTextSection::addPropertiesChangeListener(): not implemented");
1304 const uno::Reference< beans::XPropertiesChangeListener >& )
1306 OSL_FAIL(
"SwXTextSection::removePropertiesChangeListener(): not implemented");
1310 const uno::Sequence< OUString >& ,
1311 const uno::Reference< beans::XPropertiesChangeListener >& )
1313 OSL_FAIL(
"SwXTextSection::firePropertiesChangeEvent(): not implemented");
1319 const uno::Reference< beans::XPropertyChangeListener >& )
1321 OSL_FAIL(
"SwXTextSection::addPropertyChangeListener(): not implemented");
1327 const uno::Reference< beans::XPropertyChangeListener >& )
1329 OSL_FAIL(
"SwXTextSection::removePropertyChangeListener(): not implemented");
1335 const uno::Reference< beans::XVetoableChangeListener >& )
1337 OSL_FAIL(
"SwXTextSection::addVetoableChangeListener(): not implemented");
1343 const uno::Reference< beans::XVetoableChangeListener >& )
1345 OSL_FAIL(
"SwXTextSection::removeVetoableChangeListener(): not implemented");
1348 beans::PropertyState SAL_CALL
1353 uno::Sequence< OUString > aNames { rPropertyName };
1357 uno::Sequence< beans::PropertyState > SAL_CALL
1359 const uno::Sequence< OUString >& rPropertyNames)
1364 if (!pFormat && !
m_pImpl->m_bIsDescriptor)
1366 throw uno::RuntimeException();
1369 uno::Sequence< beans::PropertyState > aStates(rPropertyNames.getLength());
1370 beans::PropertyState *
const pStates = aStates.getArray();
1371 const OUString* pNames = rPropertyNames.getConstArray();
1372 for (sal_Int32
i = 0;
i < rPropertyNames.getLength();
i++)
1374 pStates[
i] = beans::PropertyState_DEFAULT_VALUE;
1376 m_pImpl->m_rPropSet.getPropertyMap().getByName( pNames[
i]);
1379 throw beans::UnknownPropertyException(
1380 "Unknown property: " + pNames[i],
1381 static_cast< cppu::OWeakObject* >(
this));
1383 switch (pEntry->
nWID)
1399 pStates[i] = beans::PropertyState_DIRECT_VALUE;
1405 pStates[i] =
m_pImpl->m_rPropSet.getPropertyState(
1412 if (!
m_pImpl->m_pProps->m_pColItem)
1414 pStates[i] = beans::PropertyState_DEFAULT_VALUE;
1418 pStates[i] = beans::PropertyState_DIRECT_VALUE;
1423 if (!
m_pImpl->m_pProps->m_pBrushItem)
1425 pStates[i] = beans::PropertyState_DEFAULT_VALUE;
1429 pStates[i] = beans::PropertyState_DIRECT_VALUE;
1445 if (!pFormat && !
m_pImpl->m_bIsDescriptor)
1447 throw uno::RuntimeException();
1451 m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
1454 throw beans::UnknownPropertyException(
1455 "Unknown property: " + rPropertyName,
1456 static_cast< cppu::OWeakObject* >(
this));
1458 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
1460 throw uno::RuntimeException(
1461 "Property is read-only: " + rPropertyName,
1462 static_cast<cppu::OWeakObject *>(
this));
1465 std::unique_ptr<SwSectionData>
const pSectionData(
1468 std::optional<SfxItemSet> oNewAttrSet;
1469 bool bLinkModeChanged =
false;
1471 switch (pEntry->
nWID)
1477 m_pImpl->m_pProps->m_sCondition.clear();
1481 pSectionData->SetCondition(OUString());
1492 m_pImpl->m_pProps->m_bDDE =
false;
1493 m_pImpl->m_pProps->m_sLinkFileName.clear();
1494 m_pImpl->m_pProps->m_sSectionRegion.clear();
1495 m_pImpl->m_pProps->m_sSectionFilter.clear();
1505 m_pImpl->m_pProps->m_bUpdateType =
true;
1509 bLinkModeChanged =
true;
1516 m_pImpl->m_pProps->m_bHidden =
false;
1520 pSectionData->SetHidden(
false);
1528 m_pImpl->m_pProps->m_bProtect =
false;
1532 pSectionData->SetProtectFlag(
false);
1540 m_pImpl->m_pProps->m_bEditInReadonly =
false;
1544 pSectionData->SetEditInReadonlyFlag(
false);
1560 oNewAttrSet.emplace(*rOldAttrSet.
GetPool(), pEntry->
nWID, pEntry->
nWID);
1567 m_pImpl->m_pProps->m_pColItem.reset();
1571 m_pImpl->m_pProps->m_pBrushItem.reset();
1589 m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
1592 throw beans::UnknownPropertyException(
1593 "Unknown property: " + rPropertyName,
1594 static_cast<cppu::OWeakObject *>(
this));
1597 switch(pEntry->
nWID)
1605 aRet <<= OUString();
1608 aRet <<= text::SectionFileLink();
1645 else if (
m_pImpl->m_bIsDescriptor)
1651 throw uno::RuntimeException();
1668 size_t nApplyPos = SIZE_MAX;
1669 for(
size_t i = 0;
i < rFormats.
size(); ++
i )
1671 if(rFormats[
i]->GetSection() == pSect)
1675 else if (rName == rFormats[
i]->GetSection()->GetSectionName())
1677 throw uno::RuntimeException();
1680 if (nApplyPos != SIZE_MAX)
1693 else if (
m_pImpl->m_bIsDescriptor)
1699 throw uno::RuntimeException();
1706 return "SwXTextSection";
1714 uno::Sequence< OUString > SAL_CALL
1718 "com.sun.star.text.TextContent",
1719 "com.sun.star.text.TextSection",
1720 "com.sun.star.document.LinkTarget"
1728 return pSectionFormat;
1736 SwDocShell const*
const pShell( pSectionFormat->GetDoc()->GetDocShell() );
1737 return pShell ? pShell->
GetModel() :
nullptr;
void disposeAndClear(::std::unique_lock<::std::mutex > &rGuard, const css::lang::EventObject &rEvt)
SwSectionNode * FindSectionNode()
Search section node, in which it is.
const SwEndNode * EndOfSectionNode() const
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(120)
constexpr TypedWhichId< SwFormatEndAtTextEnd > RES_END_AT_TXTEND(118)
constexpr TypedWhichId< SvXMLAttrContainerItem > RES_UNKNOWNATR_CONTAINER(RES_UNKNOWNATR_BEGIN)
std::vector< SwSection * > SwSections
bool GoInContent(SwPaM &rPam, SwMoveFnCollection const &fnMove)
Marks a position in the document model.
void setPropertyValue(const SfxItemPropertyMapEntry &rEntry, const css::uno::Any &aVal, SfxItemSet &rSet) const
bool IsSectionNode() const
virtual void SAL_CALL dispose() override
SwDocShell * GetDocShell()
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
constexpr TypedWhichId< SwFormatCol > RES_COL(109)
css::uno::Sequence< sal_Int8 > const & GetPassword() const
void DelSectionFormat(SwSectionFormat *pFormat, bool bDelNodes=false)
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
static SwTOXBase * GetCurTOX(const SwPosition &rPos)
Get current table of contents.
void CreateLink(LinkCreateType eType)
const sal_Unicode cTokenSeparator
css::uno::Reference< css::frame::XModel3 > GetModel() const
SwXTextSection(SwSectionFormat *const pFormat, const bool bIndexHeader)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
#define WID_SECT_DDE_FILE
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
SwSectionFormat * GetFormat()
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &rIdentifier) override
SwSection * GetParent() const
uno::Sequence< uno::Any > GetPropertyValues_Impl(const uno::Sequence< OUString > &rPropertyNames)
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
OUString const & GetLinkFileName() const
virtual ~SwXTextSection() override
bool IsCondHidden() const
SfxLinkUpdateMode GetUpdateType() const
OUString const & GetCondition() const
static css::uno::Reference< css::text::XTextSection > CreateXTextSection(SwSectionFormat *const pFormat, const bool bIndexHeader=false)
const SfxItemPropertyMapEntry * getByName(std::u16string_view rName) const
SwSectionFormat * GetSectionFormat() const
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
virtual OUString SAL_CALL getName() override
#define WID_SECT_PASSWORD
virtual void SAL_CALL setPropertyToDefault(const OUString &rPropertyName) override
Any SAL_CALL getCaughtException()
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
virtual ::sfx2::Metadatable * GetCoreObject() override
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId)
SwSectionFormat * m_pFormat
sal_Int32 getTokenCount(std::string_view rIn, char cTok)
#define WID_SECT_PROTECTED
virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
const css::uno::Sequence< sal_Int8 > & getSeq() const
PaM is Point and Mark: a selection of the document model.
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
bool GetDefaultTextContentValue(css::uno::Any &rAny, std::u16string_view rPropertyName, sal_uInt16 nWID=0)
void Attach(SwSectionFormat *pFormat)
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
std::unique_ptr< SwTextSectionProperties_Impl > m_pProps
const OUString & GetSectionName() const
const SwPosition * GetPoint() const
void SetCondHidden(bool const bFlag)
const bool m_bIndexHeader
SVL_DLLPUBLIC Link< OUString *, bool > const & GetMaybeFileHdl()
virtual css::uno::Sequence< css::uno::Reference< css::text::XTextSection > > SAL_CALL getChildSections() override
virtual void SAL_CALL setName(const OUString &rName) override
void SetPropertyValues_Impl(const uno::Sequence< OUString > &rPropertyNames, const uno::Sequence< uno::Any > &aValues)
const SfxItemPropertySet & m_rPropSet
#define WID_SECT_DDE_AUTOUPDATE
virtual void Notify(const SfxHint &rHint) override
#define WID_SECT_DDE_ELEMENT
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &rPropertyName) override
const SfxItemPropertyMap & getPropertyMap() const
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
static css::uno::Reference< css::text::XDocumentIndex > CreateXDocumentIndex(SwDoc &rDoc, SwTOXBaseSection *pSection, TOXTypes eTypes=TOX_INDEX)
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
Marks a node in the document model.
SwNodes & GetNodes()
Node is in which nodes-array/doc?
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
bool StartListening(SvtBroadcaster &rBroadcaster)
bool IsEditInReadonly() const
#define WID_SECT_CONDITION
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
Impl(SwXTextSection &rThis, SwSectionFormat *const pFormat, const bool bIndexHeader)
SfxItemPool * GetPool() const
void SetCondition(OUString const &rNew)
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
const SwPosition * Start() const
#define WID_SECT_CURRENTLY_VISIBLE
bool XTextRangeToSwPaM(SwUnoInternalPaM &rToFill, const uno::Reference< text::XTextRange > &xTextRange,::sw::TextRangeMode const eMode)
const SwNodeIndex * GetContentIdx() const
::sw::UnoImplPtr< Impl > m_pImpl
SvtBroadcaster & GetNotifier()
#define PROPERTY_MAP_SECTION
const PropertyValue * pValues
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &rPropertyName) override
static css::uno::Sequence< css::beans::PropertyValue > CreateRedlineProperties(SwRangeRedline const &rRedline, bool const bIsStart)
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
static void lcl_UpdateLinkType(SwSection &rSection, bool const bLinkUpdateAlways)
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
void UpdateSection(size_t const nSect, SwSectionData &, SfxItemSet const *const =nullptr, bool const bPreventLinkUpdate=false)
void SetUpdateType(SfxLinkUpdateMode nType)
virtual css::uno::Reference< css::frame::XModel > GetModel() override
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Sequence< css::uno::Any > &rValues) override
constexpr TypedWhichId< SwFormatNoBalancedColumns > RES_COLUMNBALANCE(119)
#define FN_PARAM_LINK_DISPLAY_NAME
uno::WeakReference< uno::XInterface > m_wThis
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
#define FN_UNO_ANCHOR_TYPE
SwSectionFormat & GetSectionFormatOrThrow() const
#define WID_SECT_EDIT_IN_READONLY
SwSectionFormat * GetFormat() const
::comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > m_EventListeners
const INetURLObject & GetURLObject() const
OUString setToken(const OUString &rIn, sal_Int32 nToken, sal_Unicode cTok, std::u16string_view rNewToken)
SwUnoPropertyMapProvider aSwMapProvider
Sequence< sal_Int8 > aSeq
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
virtual OUString SAL_CALL getImplementationName() override
#define FN_UNO_ANCHOR_TYPES
#define FN_UNO_REDLINE_NODE_START
SwMoveFnCollection const & fnMoveBackward
SwTableNode * FindTableNode()
Search table node, in which it is.
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &rPropertyNames) override
bool IsDocNodes() const
Is the NodesArray the regular one of Doc? (and not the UndoNds, ...) Implementation in doc...
Ends a section of nodes in the document model.
SectionType GetType() const
virtual const SwRedlineTable & GetRedlineTable() const =0
#define FN_UNO_REDLINE_NODE_END
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(const css::uno::Sequence< OUString > &rPropertyNames) override
SwSectionFormats & GetSections()
#define WID_SECT_DDE_TYPE
virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
constexpr TypedWhichId< SwFormatFootnoteAtTextEnd > RES_FTN_AT_TXTEND(117)
#define WID_SECT_DOCUMENT_INDEX
uno::Reference< text::XText > CreateParentXText(SwDoc &rDoc, const SwPosition &rPos)
static bool IsWhich(sal_uInt16 nId)
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)
const SwAttrPool & GetAttrPool() const
#define WID_SECT_IS_GLOBAL_DOC_SECTION
bool m_bDetectedRangeSegmentation false
virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
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)
void SetSectionName(OUString const &rName)
Base class of the Writer document model elements.
virtual css::uno::Reference< css::text::XTextSection > SAL_CALL getParentSection() override
SfxMedium * GetMedium() const