24#include <com/sun/star/beans/PropertyAttribute.hpp>
25#include <com/sun/star/container/XIndexReplace.hpp>
26#include <com/sun/star/frame/XModel.hpp>
27#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
28#include <com/sun/star/text/ChapterFormat.hpp>
29#include <com/sun/star/text/ReferenceFieldPart.hpp>
30#include <com/sun/star/text/BibliographyDataField.hpp>
31#include <com/sun/star/text/XTextDocument.hpp>
75 throw lang::IllegalArgumentException();
83 T & rBitMask,
const T nBit)
85 rBitMask = lcl_AnyToType<bool>(rValue)
92 const T nBitMask,
const T nBit)
94 const bool bRet(nBitMask &
nBit);
103 for(sal_uInt16 nUser = 0; nUser < nUserCount; nUser++)
124#define USER_AND_SUFFIXLEN 19
162typedef ::cppu::WeakImplHelper
164, container::XIndexReplace
184 virtual uno::Sequence< OUString > SAL_CALL
192 virtual sal_Int32 SAL_CALL
getCount()
override;
196 virtual void SAL_CALL
201typedef ::cppu::WeakImplHelper
203, container::XIndexReplace
224 virtual uno::Sequence< OUString > SAL_CALL
232 virtual sal_Int32 SAL_CALL
getCount()
override;
236 virtual void SAL_CALL
243class SwDocIndexDescriptorProperties_Impl
246 std::unique_ptr<SwTOXBase> m_pTOXBase;
247 OUString m_sUserTOXTypeName;
250 explicit SwDocIndexDescriptorProperties_Impl(
SwTOXType const*
const pType);
252 SwTOXBase & GetTOXBase() {
return *m_pTOXBase; }
253 const OUString& GetTypeName()
const {
return m_sUserTOXTypeName; }
254 void SetTypeName(
const OUString& rSet) { m_sUserTOXTypeName =
rSet; }
259SwDocIndexDescriptorProperties_Impl::SwDocIndexDescriptorProperties_Impl(
263 m_pTOXBase.reset(
new SwTOXBase(pType, aForm,
303 std::optional<SwDocIndexDescriptorProperties_Impl>
m_oProps;
314 ?
std::optional<SwDocIndexDescriptorProperties_Impl>(rDoc.GetTOXType(
eType, 0))
336 ? &
const_cast<SwDocIndexDescriptorProperties_Impl&
>(*m_oProps).GetTOXBase()
342 throw uno::RuntimeException(
343 "SwXDocumentIndex: disposed or invalid",
nullptr);
361 if (rHint.
GetId() == SfxHintId::SwLegacyModify)
367 else if(rHint.
GetId() == SfxHintId::Dying)
387 rDoc, rBaseSection.
SwTOXBase::GetType(), & rBaseSection) )
422 xIndex->m_pImpl->m_wThis = xIndex.get();
430 return "SwXDocumentIndex";
439uno::Sequence< OUString > SAL_CALL
444 uno::Sequence< OUString > aRet(2);
445 OUString* pArray = aRet.getArray();
446 pArray[0] =
"com.sun.star.text.BaseIndex";
450 pArray[1] =
"com.sun.star.text.DocumentIndex";
453 pArray[1] =
"com.sun.star.text.ContentIndex";
456 pArray[1] =
"com.sun.star.text.TableIndex";
459 pArray[1] =
"com.sun.star.text.IllustrationsIndex";
462 pArray[1] =
"com.sun.star.text.ObjectIndex";
465 pArray[1] =
"com.sun.star.text.Bibliography";
469 pArray[1] =
"com.sun.star.text.UserDefinedIndex";
504uno::Reference< beans::XPropertySetInfo > SAL_CALL
509 const uno::Reference< beans::XPropertySetInfo > xRef =
510 m_pImpl->m_rPropSet.getPropertySetInfo();
516 const OUString& rPropertyName,
const uno::Any& rValue)
521 m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
524 throw beans::UnknownPropertyException(
525 "Unknown property: " + rPropertyName,
528 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
530 throw beans::PropertyVetoException(
531 "Property is read-only: " + rPropertyName,
545 switch (pEntry->
nWID)
550 if (!(rValue >>= sNewName))
552 throw lang::IllegalArgumentException();
560 if (!(rValue >>= sNewName))
562 throw lang::IllegalArgumentException();
570 if (!(rValue >>= sNewName))
572 throw lang::IllegalArgumentException();
576 "tox type name can only be changed for user indexes");
587 m_pImpl->m_oProps->SetTypeName(sNewName);
593 lang::Locale aLocale;
594 if (!(rValue>>= aLocale))
596 throw lang::IllegalArgumentException();
604 if (!(rValue >>= sTmp))
606 throw lang::IllegalArgumentException();
613 rTOXBase.
SetLevel(lcl_AnyToType<sal_Int16>(rValue));
651 bool bSet = lcl_AnyToType<bool>(rValue);
694 lcl_AnyToType<OUString>(rValue) ) );
699 const sal_Int16 nVal = lcl_AnyToType<sal_Int16>(rValue);
703 case text::ReferenceFieldPart::TEXT:
706 case text::ReferenceFieldPart::CATEGORY_AND_NUMBER:
709 case text::ReferenceFieldPart::ONLY_CAPTION:
713 throw lang::IllegalArgumentException();
786 if (rValue >>= style)
790 throw lang::IllegalArgumentException();
803 throw lang::IllegalArgumentException();
835 m_pImpl->m_rPropSet.setPropertyValue(
836 rPropertyName, rValue, aAttrSet);
839 for (
size_t i = 0;
i < rSects.
size(); ++
i)
842 if (pTmpFormat == pSectionFormat)
846 m_pImpl->m_pDoc->UpdateSection(
i, tmpData, & aAttrSet);
871 m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
874 throw beans::UnknownPropertyException(
875 "Unknown property: " + rPropertyName,
881 throw uno::RuntimeException(
"Getting GraphicURL property is not supported");
890 else if (
m_pImpl->m_bIsDescriptor)
892 pTOXBase = &
m_pImpl->m_oProps->GetTOXBase();
909 const uno::Reference <text::XTextSection> xContentSect =
911 aRet <<= xContentSect;
913 else if (pSectionFormat)
922 const uno::Reference <text::XTextSection> xHeader =
924 pSect->GetFormat() );
941 OUString sTmp((!
m_pImpl->m_bIsDescriptor)
943 :
m_pImpl->m_oProps->GetTypeName());
956 aRet <<= static_cast<sal_Int16>(pTOXBase->
GetLevel());
1029 sal_Int16 nSet = text::ReferenceFieldPart::TEXT;
1033 nSet = text::ReferenceFieldPart::TEXT;
1036 nSet = text::ReferenceFieldPart::CATEGORY_AND_NUMBER;
1039 nSet = text::ReferenceFieldPart::ONLY_CAPTION;
1053 uno::Reference< container::XIndexReplace > xTokenAccess(
1055 if (!xTokenAccess.is())
1058 m_pImpl->m_wTokenAccess = xTokenAccess;
1060 aRet <<= xTokenAccess;
1065 uno::Reference< container::XIndexReplace > xStyleAccess(
1067 if (!xStyleAccess.is())
1070 m_pImpl->m_wStyleAccess = xStyleAccess;
1072 aRet <<= xStyleAccess;
1121 if (!rStyle.isEmpty())
1184 uno::Sequence< uno::Reference<text::XDocumentIndexMark> > aXMarks(aMarks.size());
1185 uno::Reference<text::XDocumentIndexMark>* pxMarks = aXMarks.getArray();
1186 for(
size_t i = 0;
i < aMarks.size(); ++
i)
1201 aRet =
m_pImpl->m_rPropSet.getPropertyValue(
1202 rPropertyName,
rSet);
1212 const uno::Reference< beans::XPropertyChangeListener >& )
1214 OSL_FAIL(
"SwXDocumentIndex::addPropertyChangeListener(): not implemented");
1220 const uno::Reference< beans::XPropertyChangeListener >& )
1222 OSL_FAIL(
"SwXDocumentIndex::removePropertyChangeListener(): not implemented");
1228 const uno::Reference< beans::XVetoableChangeListener >& )
1230 OSL_FAIL(
"SwXDocumentIndex::addVetoableChangeListener(): not implemented");
1236 const uno::Reference< beans::XVetoableChangeListener >& )
1238 OSL_FAIL(
"SwXDocumentIndex::removeVetoableChangeListener(): not implemented");
1255 else if (pViewShell)
1272 throw uno::RuntimeException(
1273 "SwXDocumentIndex::refresh: must be in attached state",
1276 pTOXBase->
Update(
nullptr,
m_pImpl->m_pDoc->getIDocumentLayoutAccess().GetCurrentLayout());
1285 std::unique_lock g(
m_pImpl->m_Mutex);
1286 if (
m_pImpl->m_RefreshListeners.getLength(g))
1289 m_pImpl->m_RefreshListeners.notifyEach(g, & util::XRefreshListener::refreshed, event);
1294 const uno::Reference<util::XRefreshListener>& xListener)
1297 std::unique_lock g(
m_pImpl->m_Mutex);
1298 m_pImpl->m_RefreshListeners.addInterface(g, xListener);
1302 const uno::Reference<util::XRefreshListener>& xListener)
1305 std::unique_lock g(
m_pImpl->m_Mutex);
1306 m_pImpl->m_RefreshListeners.removeInterface(g, xListener);
1314 if (!
m_pImpl->m_bIsDescriptor)
1316 throw uno::RuntimeException();
1319 OTextCursorHelper *
const pCursor =
dynamic_cast<OTextCursorHelper*
>(xTextRange.get());
1322 pRange ? &pRange->
GetDoc() : (pCursor ? pCursor->GetDoc() :
nullptr);
1325 throw lang::IllegalArgumentException();
1335 throw lang::IllegalArgumentException();
1350 m_pImpl->m_pDoc->getIDocumentLayoutAccess().GetCurrentLayout());
1361 m_pImpl->m_bIsDescriptor =
false;
1364uno::Reference< text::XTextRange > SAL_CALL
1370 if (!pSectionFormat)
1372 throw uno::RuntimeException();
1405 const uno::Reference< lang::XEventListener > & xListener)
1408 std::unique_lock g(
m_pImpl->m_Mutex);
1409 m_pImpl->m_EventListeners.addInterface(g, xListener);
1414 const uno::Reference< lang::XEventListener > & xListener)
1417 std::unique_lock g(
m_pImpl->m_Mutex);
1418 m_pImpl->m_EventListeners.removeInterface(g, xListener);
1428 return m_pImpl->m_oProps->GetTOXBase().GetTOXName();
1433 throw uno::RuntimeException();
1444 if (rName.isEmpty())
1446 throw uno::RuntimeException();
1452 m_pImpl->m_oProps->GetTOXBase().SetTOXName(rName);
1454 else if (pSectionFormat)
1460 throw uno::RuntimeException();
1465 throw uno::RuntimeException();
1473 return pSectionFormat;
1482 return pShell ? pShell->
GetModel() :
nullptr;
1577 OSL_FAIL(
"ReplaceTOXMark() failed!");
1578 lang::EventObject
const ev(
1580 std::unique_lock aGuard(
m_Mutex);
1599 std::unique_lock aGuard(
m_Mutex);
1613 if(
auto pNewType =
dynamic_cast<const SwTOXType*
>(pModifyChangedHint->m_pNew))
1614 m_pTOXType = pNewType;
1660 xTOXMark->m_pImpl->m_wThis = xTOXMark.get();
1672 return "SwXDocumentIndexMark";
1680uno::Sequence< OUString > SAL_CALL
1686 uno::Sequence< OUString > aRet(nCnt);
1687 OUString* pArray = aRet.getArray();
1688 pArray[0] =
"com.sun.star.text.BaseIndexMark";
1689 pArray[1] =
"com.sun.star.text.TextContent";
1693 pArray[2] =
"com.sun.star.text.UserIndexMark";
1696 pArray[2] =
"com.sun.star.text.ContentIndexMark";
1699 pArray[2] =
"com.sun.star.text.DocumentIndexMark";
1700 pArray[3] =
"com.sun.star.text.DocumentIndexMarkAsian";
1715 if (pType &&
m_pImpl->m_pTOXMark)
1717 return m_pImpl->m_pTOXMark->GetAlternativeText();
1720 if (!
m_pImpl->m_bIsDescriptor)
1722 throw uno::RuntimeException();
1734 if (pType &&
m_pImpl->m_pTOXMark)
1739 m_pImpl->m_pTOXMark->GetTextTOXMark();
1742 if(pTextMark->
End())
1749 m_pImpl->ReplaceTOXMark(*pType, aMark, aPam);
1751 else if (
m_pImpl->m_bIsDescriptor)
1753 m_pImpl->m_sAltText = rIndexEntry;
1757 throw uno::RuntimeException();
1763 const uno::Reference< text::XTextRange > & xTextRange)
1767 if (!
m_pImpl->m_bIsDescriptor)
1769 throw uno::RuntimeException();
1774 OTextCursorHelper *
const pCursor =
1775 dynamic_cast<OTextCursorHelper*
>(xTextRange.get());
1777 pRange ? &pRange->
GetDoc() : (pCursor ? pCursor->GetDoc() :
nullptr);
1780 throw lang::IllegalArgumentException();
1793 if (
m_pImpl->m_sUserIndexName.isEmpty())
1799 const sal_uInt16
nCount =
1825 throw lang::IllegalArgumentException();
1832 if (!
m_pImpl->m_sAltText.isEmpty())
1839 if (!
m_pImpl->m_sPrimaryKey.isEmpty())
1843 if (!
m_pImpl->m_sSecondaryKey.isEmpty())
1847 if (!
m_pImpl->m_sTextReading.isEmpty())
1851 if (!
m_pImpl->m_sPrimaryKeyReading.isEmpty())
1855 if (!
m_pImpl->m_sSecondaryKeyReading.isEmpty())
1866 if (USHRT_MAX !=
m_pImpl->m_nLevel)
1879 m_pImpl->m_bIsDescriptor =
false;
1884template<
typename T>
struct NotContainedIn
1886 std::vector<T>
const& m_rVector;
1887 explicit NotContainedIn(std::vector<T>
const& rVector)
1888 : m_rVector(rVector) { }
1889 bool operator() (T
const& rT) {
1890 return std::find(m_rVector.begin(), m_rVector.end(), rT)
1918 const bool bForceExpandHints( !bMark && pTextCursor && pTextCursor->
IsAtEndOfMeta() );
1919 const SetAttrMode nInsertFlags = bForceExpandHints
1928 nullptr, &pNewTextAttr);
1936 throw uno::RuntimeException(
1937 "SwXDocumentIndexMark::InsertTOXMark(): cannot insert attribute",
1949uno::Reference< text::XTextRange > SAL_CALL
1955 if (!pType || !
m_pImpl->m_pTOXMark)
1957 throw uno::RuntimeException();
1959 if (!
m_pImpl->m_pTOXMark->GetTextTOXMark())
1961 throw uno::RuntimeException();
1966 if(pTextMark->
End())
1974 const uno::Reference< frame::XModel >
xModel =
1975 m_pImpl->m_pDoc->GetDocShell()->GetBaseModel();
1976 const uno::Reference< text::XTextDocument > xTDoc(
xModel, uno::UNO_QUERY);
1977 const uno::Reference< text::XTextRange > xRet =
1989 if (pType &&
m_pImpl->m_pTOXMark)
1997 const uno::Reference< lang::XEventListener > & xListener)
2000 std::unique_lock aGuard(
m_pImpl->m_Mutex);
2001 m_pImpl->m_EventListeners.addInterface(aGuard, xListener);
2006 const uno::Reference< lang::XEventListener > & xListener)
2009 std::unique_lock aGuard(
m_pImpl->m_Mutex);
2010 m_pImpl->m_EventListeners.removeInterface(aGuard, xListener);
2013uno::Reference< beans::XPropertySetInfo > SAL_CALL
2018 static uno::Reference< beans::XPropertySetInfo > xInfos[3];
2028 if(!xInfos[
nPos].is())
2030 const uno::Reference< beans::XPropertySetInfo > xInfo =
2031 m_pImpl->m_rPropSet.getPropertySetInfo();
2033 const uno::Sequence<beans::Property> aPropSeq = xInfo->getProperties();
2039 return xInfos[
nPos];
2044 const OUString& rPropertyName,
const uno::Any& rValue)
2049 m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
2052 throw beans::UnknownPropertyException(
2053 "Unknown property: " + rPropertyName,
2056 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
2058 throw beans::PropertyVetoException(
2059 "Property is read-only: " + rPropertyName,
2064 if (pType &&
m_pImpl->m_pTOXMark)
2067 switch(pEntry->
nWID)
2074 static_cast<sal_Int8>(lcl_AnyToType<sal_Int16>(rValue)+1)));
2099 m_pImpl->m_pTOXMark->GetTextTOXMark();
2102 if(pTextMark->
End())
2111 m_pImpl->ReplaceTOXMark(*pType, aMark, aPam);
2113 else if (
m_pImpl->m_bIsDescriptor)
2115 switch(pEntry->
nWID)
2118 m_pImpl->m_sAltText = lcl_AnyToType<OUString>(rValue);
2122 const sal_Int16 nVal = lcl_AnyToType<sal_Int16>(rValue);
2125 throw lang::IllegalArgumentException();
2132 m_pImpl->m_aBookmarkName = lcl_AnyToType<OUString>(rValue);
2136 m_pImpl->m_sPrimaryKey = lcl_AnyToType<OUString>(rValue);
2139 m_pImpl->m_sSecondaryKey = lcl_AnyToType<OUString>(rValue);
2142 m_pImpl->m_sTextReading = lcl_AnyToType<OUString>(rValue);
2145 m_pImpl->m_sPrimaryKeyReading = lcl_AnyToType<OUString>(rValue);
2148 m_pImpl->m_sSecondaryKeyReading = lcl_AnyToType<OUString>(rValue);
2152 OUString sTmp(lcl_AnyToType<OUString>(rValue));
2154 m_pImpl->m_sUserIndexName = sTmp;
2158 m_pImpl->m_bMainEntry = lcl_AnyToType<bool>(rValue);
2167 throw uno::RuntimeException();
2178 m_pImpl->m_rPropSet.getPropertyMap().getByName(rPropertyName);
2181 throw beans::UnknownPropertyException(
2182 "Unknown property: " + rPropertyName,
2191 if (pType &&
m_pImpl->m_pTOXMark)
2193 switch(pEntry->
nWID)
2196 aRet <<=
m_pImpl->m_pTOXMark->GetAlternativeText();
2199 aRet <<= static_cast<sal_Int16>(
2200 m_pImpl->m_pTOXMark->GetLevel() - 1);
2203 aRet <<=
m_pImpl->m_pTOXMark->GetBookmarkName();
2206 aRet <<=
m_pImpl->m_pTOXMark->GetPrimaryKey();
2209 aRet <<=
m_pImpl->m_pTOXMark->GetSecondaryKey();
2212 aRet <<=
m_pImpl->m_pTOXMark->GetTextReading();
2215 aRet <<=
m_pImpl->m_pTOXMark->GetPrimaryKeyReading();
2218 aRet <<=
m_pImpl->m_pTOXMark->GetSecondaryKeyReading();
2229 const bool bTemp =
m_pImpl->m_pTOXMark->IsMainEntry();
2235 else if (
m_pImpl->m_bIsDescriptor)
2237 switch(pEntry->
nWID)
2243 aRet <<= static_cast<sal_Int16>(
m_pImpl->m_nLevel);
2246 aRet <<=
m_pImpl->m_aBookmarkName;
2249 aRet <<=
m_pImpl->m_sPrimaryKey;
2252 aRet <<=
m_pImpl->m_sSecondaryKey;
2255 aRet <<=
m_pImpl->m_sTextReading;
2258 aRet <<=
m_pImpl->m_sPrimaryKeyReading;
2261 aRet <<=
m_pImpl->m_sSecondaryKeyReading;
2264 aRet <<=
m_pImpl->m_sUserIndexName;
2267 aRet <<=
m_pImpl->m_bMainEntry;
2273 throw uno::RuntimeException();
2281 const uno::Reference< beans::XPropertyChangeListener >& )
2283 OSL_FAIL(
"SwXDocumentIndexMark::addPropertyChangeListener(): not implemented");
2289 const uno::Reference< beans::XPropertyChangeListener >& )
2291 OSL_FAIL(
"SwXDocumentIndexMark::removePropertyChangeListener(): not implemented");
2297 const uno::Reference< beans::XVetoableChangeListener >& )
2299 OSL_FAIL(
"SwXDocumentIndexMark::addVetoableChangeListener(): not implemented");
2305 const uno::Reference< beans::XVetoableChangeListener >& )
2307 OSL_FAIL(
"SwXDocumentIndexMark::removeVetoableChangeListener(): not implemented");
2322 return "SwXDocumentIndexes";
2330uno::Sequence< OUString > SAL_CALL
2333 return {
"com.sun.star.text.DocumentIndexes" };
2342 throw uno::RuntimeException();
2344 sal_uInt32 nRet = 0;
2346 for(
size_t n = 0;
n < rFormats.
size(); ++
n )
2348 const SwSection* pSect = rFormats[
n ]->GetSection();
2364 throw uno::RuntimeException();
2369 for(
size_t n = 0;
n < rFormats.
size(); ++
n )
2371 SwSection* pSect = rFormats[
n ]->GetSection();
2376 const uno::Reference< text::XDocumentIndex > xTmp =
2385 throw lang::IndexOutOfBoundsException();
2394 throw uno::RuntimeException();
2397 for(
size_t n = 0;
n < rFormats.
size(); ++
n )
2399 SwSection* pSect = rFormats[
n ]->GetSection();
2405 const uno::Reference< text::XDocumentIndex > xTmp =
2413 throw container::NoSuchElementException();
2416uno::Sequence< OUString > SAL_CALL
2422 throw uno::RuntimeException();
2426 for(
size_t n = 0;
n < rFormats.
size(); ++
n )
2428 SwSection const*
const pSect = rFormats[
n ]->GetSection();
2436 uno::Sequence< OUString > aRet(
nCount);
2437 OUString* pArray = aRet.getArray();
2439 for(
size_t n = 0;
n < rFormats.
size(); ++
n )
2441 SwSection const*
const pSect = rFormats[
n ]->GetSection();
2445 pArray[nCnt++] =
static_cast<SwTOXBaseSection const*
>(pSect)->GetTOXName();
2457 throw uno::RuntimeException();
2460 for(
size_t n = 0;
n < rFormats.
size(); ++
n )
2462 SwSection const*
const pSect = rFormats[
n ]->GetSection();
2490 : m_xParent(&rParentIdx)
2501 return "SwXDocumentIndex::StyleAccess_Impl";
2510uno::Sequence< OUString > SAL_CALL
2513 return {
"com.sun.star.text.DocumentIndexParagraphStyles" };
2518 sal_Int32 nIndex,
const uno::Any& rElement)
2522 if(nIndex < 0 || nIndex >=
MAXLEVEL)
2524 throw lang::IndexOutOfBoundsException();
2527 SwTOXBase & rTOXBase( m_xParent->m_pImpl->GetTOXSectionOrThrow() );
2529 uno::Sequence<OUString>
aSeq;
2530 if(!(rElement >>=
aSeq))
2532 throw lang::IllegalArgumentException();
2535 const sal_Int32 nStyles =
aSeq.getLength();
2536 const OUString* pStyles =
aSeq.getConstArray();
2537 OUStringBuffer sSetStyles;
2539 for(sal_Int32
i = 0;
i < nStyles;
i++)
2547 sSetStyles.append(aString);
2549 rTOXBase.
SetStyleNames(sSetStyles.makeStringAndClear(), o3tl::narrowing<sal_uInt16>(
nIndex));
2563 if(nIndex < 0 || nIndex >=
MAXLEVEL)
2565 throw lang::IndexOutOfBoundsException();
2568 SwTOXBase & rTOXBase( m_xParent->m_pImpl->GetTOXSectionOrThrow() );
2570 const OUString& rStyles =
2573 uno::Sequence<OUString> aStyles(nStyles);
2574 OUString* pStyles = aStyles.getArray();
2577 for(sal_Int32
i = 0;
i < nStyles; ++
i)
2583 pStyles[
i] = aString;
2603 : m_xParent(&rParentIdx)
2614 return "SwXDocumentIndex::TokenAccess_Impl";
2618 const OUString& rServiceName)
2623uno::Sequence< OUString > SAL_CALL
2626 return {
"com.sun.star.text.DocumentIndexLevelFormat" };
2654 sal_Int32 nIndex,
const uno::Any& rElement)
2658 SwTOXBase & rTOXBase( m_xParent->m_pImpl->GetTOXSectionOrThrow() );
2662 throw lang::IndexOutOfBoundsException();
2665 uno::Sequence<beans::PropertyValues>
aSeq;
2666 if(!(rElement >>=
aSeq))
2668 throw lang::IllegalArgumentException();
2671 OUStringBuffer sPattern;
2672 for(
const beans::PropertyValues& rToken : std::as_const(
aSeq))
2674 const beans::PropertyValue* pProperties = rToken.getConstArray();
2680 if ( pProperties[j].
Name ==
"TokenType" )
2682 const OUString sTokenType =
2683 lcl_AnyToType<OUString>(pProperties[j].
Value);
2685 pTokenType->pName; ++pTokenType)
2687 if (sTokenType.equalsAscii(pTokenType->pName))
2694 else if ( pProperties[j].
Name ==
"CharacterStyleName" )
2698 lcl_AnyToType<OUString>(pProperties[j].
Value),
2705 else if ( pProperties[j].
Name ==
"TabStopRightAligned" )
2707 const bool bRight = lcl_AnyToType<bool>(pProperties[j].
Value);
2709 SvxTabAdjust::End : SvxTabAdjust::Left;
2711 else if ( pProperties[j].
Name ==
"TabStopPosition" )
2713 sal_Int32 nPosition = 0;
2714 if (!(pProperties[j].
Value >>= nPosition))
2716 throw lang::IllegalArgumentException();
2721 throw lang::IllegalArgumentException();
2725 else if ( pProperties[j].
Name ==
"TabStopFillCharacter" )
2727 const OUString sFillChar =
2728 lcl_AnyToType<OUString>(pProperties[j].
Value);
2729 if (sFillChar.getLength() > 1)
2731 throw lang::IllegalArgumentException();
2734 sFillChar.isEmpty() ?
' ' : sFillChar[0];
2736 else if ( pProperties[j].
Name ==
"Text" )
2738 aToken.
sText = lcl_AnyToType<OUString>(pProperties[j].
Value);
2740 else if ( pProperties[j].
Name ==
"ChapterFormat" )
2742 sal_Int16 nFormat = lcl_AnyToType<sal_Int16>(pProperties[j].
Value);
2745 case text::ChapterFormat::NUMBER:
2751 case text::ChapterFormat::NAME_NUMBER:
2754 case text::ChapterFormat::NO_PREFIX_SUFFIX:
2757 case text::ChapterFormat::DIGIT:
2761 throw lang::IllegalArgumentException();
2766 else if ( pProperties[j].
Name ==
"ChapterLevel" )
2768 const sal_Int16 nLevel = lcl_AnyToType<sal_Int16>(pProperties[j].
Value);
2769 if( nLevel < 1 || nLevel >
MAXLEVEL )
2771 throw lang::IllegalArgumentException();
2775 else if ( pProperties[j].
Name ==
"BibliographyDataField" )
2777 sal_Int16
nType = 0;
2778 pProperties[j].Value >>=
nType;
2779 if(nType < 0 || nType > text::BibliographyDataField::LOCAL_URL)
2781 lang::IllegalArgumentException aExcept;
2782 aExcept.Message =
"BibliographyDataField - wrong value";
2783 aExcept.ArgumentPosition =
static_cast< sal_Int16
>(j);
2789 else if ( pProperties[j].
Name ==
"WithTab" )
2791 aToken.
bWithTab = lcl_AnyToType<bool>(pProperties[j].
Value);
2798 throw lang::IllegalArgumentException();
2819 throw lang::IllegalArgumentException();
2834 aForm.
SetPattern(o3tl::narrowing<sal_uInt16>(
nIndex), sPattern.makeStringAndClear());
2843 const sal_Int32 nRet = m_xParent->m_pImpl->GetFormMax();
2852 SwTOXBase & rTOXBase( m_xParent->m_pImpl->GetTOXSectionOrThrow() );
2856 throw lang::IndexOutOfBoundsException();
2861 GetPattern(o3tl::narrowing<sal_uInt16>(
nIndex));
2863 sal_Int32 nTokenCount = 0;
2864 uno::Sequence< beans::PropertyValues > aRetSeq;
2865 OUString aProgCharStyle;
2869 aRetSeq.realloc(nTokenCount);
2870 beans::PropertyValues* pTokenProps = aRetSeq.getArray();
2872 uno::Sequence< beans::PropertyValue >& rCurTokenSeq =
2873 pTokenProps[nTokenCount-1];
2875 aToken.sCharStyleName,
2878 switch(aToken.eTokenType)
2885 sal_Int32 nCurrentElement = 0;
2892 if( aToken.nOutlineLevel !=
MAXLEVEL )
2899 beans::PropertyValue* pArr = rCurTokenSeq.getArray();
2901 pArr[nCurrentElement].Name =
"TokenType";
2902 pArr[nCurrentElement++].Value <<=
2903 OUString(
"TokenEntryNumber");
2905 pArr[nCurrentElement].Name =
"CharacterStyleName";
2906 pArr[nCurrentElement++].Value <<= aProgCharStyle;
2907 if( aToken.nChapterFormat !=
CF_NUMBER )
2909 pArr[nCurrentElement].Name =
"ChapterFormat";
2914 switch(aToken.nChapterFormat)
2918 nVal = text::ChapterFormat::NUMBER;
2921 nVal = text::ChapterFormat::DIGIT;
2924 pArr[nCurrentElement++].Value <<= nVal;
2928 if (aToken.nOutlineLevel !=
MAXLEVEL)
2930 pArr[nCurrentElement].Name =
"ChapterLevel";
2931 pArr[nCurrentElement].Value <<= aToken.nOutlineLevel;
2938 rCurTokenSeq.realloc( 2 );
2939 beans::PropertyValue* pArr = rCurTokenSeq.getArray();
2941 pArr[0].Name =
"TokenType";
2942 pArr[0].Value <<= OUString(
"TokenEntryText");
2944 pArr[1].Name =
"CharacterStyleName";
2945 pArr[1].Value <<= aProgCharStyle;
2950 rCurTokenSeq.realloc(5);
2951 beans::PropertyValue* pArr = rCurTokenSeq.getArray();
2953 pArr[0].Name =
"TokenType";
2954 pArr[0].Value <<= OUString(
"TokenTabStop");
2956 if(SvxTabAdjust::End == aToken.eTabAlign)
2958 pArr[1].Name =
"TabStopRightAligned";
2959 pArr[1].Value <<=
true;
2963 pArr[1].Name =
"TabStopPosition";
2967 pArr[1].Value <<=
nPos;
2969 pArr[2].Name =
"TabStopFillCharacter";
2970 pArr[2].Value <<= OUString(aToken.cTabFillChar);
2971 pArr[3].Name =
"CharacterStyleName";
2972 pArr[3].Value <<= aProgCharStyle;
2974 pArr[4].Name =
"WithTab";
2975 pArr[4].Value <<= aToken.bWithTab;
2980 rCurTokenSeq.realloc( 3 );
2981 beans::PropertyValue* pArr = rCurTokenSeq.getArray();
2983 pArr[0].Name =
"TokenType";
2984 pArr[0].Value <<= OUString(
"TokenText");
2986 pArr[1].Name =
"CharacterStyleName";
2987 pArr[1].Value <<= aProgCharStyle;
2989 pArr[2].Name =
"Text";
2990 pArr[2].Value <<= aToken.sText;
2995 rCurTokenSeq.realloc( 2 );
2996 beans::PropertyValue* pArr = rCurTokenSeq.getArray();
2998 pArr[0].Name =
"TokenType";
2999 pArr[0].Value <<= OUString(
"TokenPageNumber");
3001 pArr[1].Name =
"CharacterStyleName";
3002 pArr[1].Value <<= aProgCharStyle;
3007 rCurTokenSeq.realloc( 4 );
3008 beans::PropertyValue* pArr = rCurTokenSeq.getArray();
3010 pArr[0].Name =
"TokenType";
3011 pArr[0].Value <<= OUString(
"TokenChapterInfo");
3013 pArr[1].Name =
"CharacterStyleName";
3014 pArr[1].Value <<= aProgCharStyle;
3016 pArr[2].Name =
"ChapterFormat";
3017 sal_Int16 nVal = text::ChapterFormat::NUMBER;
3018 switch(aToken.nChapterFormat)
3021 nVal = text::ChapterFormat::NUMBER;
3027 nVal = text::ChapterFormat::NAME_NUMBER;
3030 nVal = text::ChapterFormat::NO_PREFIX_SUFFIX;
3033 nVal = text::ChapterFormat::DIGIT;
3036 pArr[2].Value <<= nVal;
3038 pArr[3].Name =
"ChapterLevel";
3039 pArr[3].Value <<= aToken.nOutlineLevel;
3044 rCurTokenSeq.realloc( 2 );
3045 beans::PropertyValue* pArr = rCurTokenSeq.getArray();
3047 pArr[0].Name =
"TokenType";
3049 OUString(
"TokenHyperlinkStart");
3050 pArr[1].Name =
"CharacterStyleName";
3051 pArr[1].Value <<= aProgCharStyle;
3056 rCurTokenSeq.realloc( 1 );
3057 beans::PropertyValue* pArr = rCurTokenSeq.getArray();
3059 pArr[0].Name =
"TokenType";
3061 OUString(
"TokenHyperlinkEnd");
3066 rCurTokenSeq.realloc( 3 );
3067 beans::PropertyValue* pArr = rCurTokenSeq.getArray();
3069 pArr[0].Name =
"TokenType";
3071 OUString(
"TokenBibliographyDataField");
3073 pArr[1].Name =
"CharacterStyleName";
3074 pArr[1].Value <<= aProgCharStyle;
3076 pArr[2].Name =
"BibliographyDataField";
3077 pArr[2].Value <<= sal_Int16(aToken.nAuthorityField);
constexpr auto convertTwipToMm100(N n)
@ CF_NUM_TITLE
number and title
@ CF_NUMBER
only the chapter number
@ CF_NUMBER_NOPREPST
only chapter number without post-/prefix
@ CF_NUM_NOPREPST_TITLE
chapter number without post-/prefix and title
virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem &, const SetAttrMode nFlags=SetAttrMode::DEFAULT, SwRootFrame const *pLayout=nullptr, SwTextAttr **ppNewTextAttr=nullptr)=0
Insert an attribute.
virtual const SwViewShell * GetCurrentViewShell() const =0
Returns the layout set at the document.
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
static LanguageType convertToLanguageType(const css::lang::Locale &rLocale, bool bResolveSystem=true)
css::uno::Reference< css::frame::XModel3 > GetModel() const
bool StartListening(SvtBroadcaster &rBroadcaster)
const SwTOXType * InsertTOXType(const SwTOXType &rTyp)
static const SwAttrSet & GetTOXBaseAttrSet(const SwTOXBase &rTOX)
SwTOXBaseSection * InsertTableOf(const SwPosition &rPos, const SwTOXBase &rTOX, const SfxItemSet *pSet=nullptr, bool bExpand=false, SwRootFrame const *pLayout=nullptr)
SwSectionFormats & GetSections()
bool DeleteTOX(const SwTOXBase &rTOXBase, bool bDelNodes)
Delete table of contents.
sal_uInt16 GetTOXTypeCount(TOXTypes eTyp) const
Manage table of content types.
IDocumentContentOperations const & getIDocumentContentOperations() const
static SwTOXBase * GetCurTOX(const SwPosition &rPos)
Get current table of contents.
SwEditShell const * GetEditShell() const
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
void DeleteTOXMark(const SwTOXMark *pTOXMark)
Delete table of contents Mark.
bool SetTOXBaseName(const SwTOXBase &rTOXBase, const OUString &rName)
const SwTOXType * GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const
SwDocShell * GetDocShell()
virtual void CalcLayout() override
To enable set up of StartActions and EndActions.
const SwNodeIndex * GetContentIdx() const
Marks a node in the document model.
SwNodes & GetNodes()
Node is in which nodes-array/doc?
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.
const SwPosition * GetMark() const
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
void Normalize(bool bPointFirst=true)
Normalizes PaM, i.e.
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
const SwPosition * GetPoint() const
const SwPosition * Start() const
const OUString & GetSectionName() const
SwSectionFormat * GetFormat()
SectionType GetType() const
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
static void FillProgName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
static SW_DLLPUBLIC const OUString & GetSpecialExtraProgName(const OUString &rExtraUIName)
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
static const OUString & GetSpecialExtraUIName(const OUString &rExtraProgName)
void UpdatePageNum()
Calculate PageNumber and insert after formatting.
void Update(const SfxItemSet *pAttr=nullptr, SwRootFrame const *pLayout=nullptr, const bool _bNewTOX=false)
Collect table of contents content.
void SetTOXName(const OUString &rSet)
void SetMainEntryCharStyle(const OUString &rSet)
const OUString & GetSequenceName() const
const OUString & GetSortAlgorithm() const
void SetOptions(SwTOIOptions nOpt)
bool IsLevelFromChapter() const
void SetStyleNames(const OUString &rSet, sal_uInt16 nLevel)
void SetTOXForm(const SwForm &rForm)
void SetProtected(bool bSet)
LanguageType GetLanguage() const
SwTOXElement GetCreateType() const
bool IsFromChapter() const
SwTOOElements GetOLEOptions() const
const SwForm & GetTOXForm() const
void SetOLEOptions(SwTOOElements nOpt)
void SetLevelFromChapter(bool bSet)
const OUString & GetTOXName() const
void SetSortAlgorithm(const OUString &rSet)
const OUString & GetMainEntryCharStyle() const
const SwTOXType * GetTOXType() const
void SetLanguage(LanguageType nLang)
void SetCreate(SwTOXElement)
void RegisterToTOXType(SwTOXType &rMark)
sal_uInt16 GetLevel() const
void SetCaptionDisplay(SwCaptionDisplay eSet)
bool IsFromObjectNames() const
OUString const & GetStyleNames(sal_uInt16 nLevel) const
void SetSequenceName(const OUString &rSet)
void SetBookmarkName(const OUString &bName)
SwTOIOptions GetOptions() const
void SetFromObjectNames(bool bSet)
void SetTitle(const OUString &rTitle)
void SetFromChapter(bool bSet)
const OUString & GetBookmarkName() const
void SetLevel(sal_uInt16)
const OUString & GetTitle() const
SwCaptionDisplay GetCaptionDisplay() const
void SetAlternativeText(const OUString &rAlt)
const SwTOXType * GetTOXType() const
void SetTextReading(const OUString &rStr)
void SetSecondaryKey(const OUString &rStr)
const OUString & GetAlternativeText() const
void SetBookmarkName(const OUString &bName)
void SetPrimaryKeyReading(const OUString &rStr)
void SetSecondaryKeyReading(const OUString &rStr)
void SetMainEntry(bool bSet)
void SetPrimaryKey(const OUString &rStr)
SAL_DLLPRIVATE unotools::WeakReference< SwXDocumentIndexMark > const & GetXTOXMark() const
SAL_DLLPRIVATE void SetXTOXMark(rtl::Reference< SwXDocumentIndexMark > const &xMark)
void SetLevel(sal_uInt16 nLevel)
const OUString & GetTypeName() const
void CollectTextMarks(SwTOXMarks &rMarks) const
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
const sal_Int32 * End() const
sal_Int32 GetStart() const
const SwTextNode & GetTextNode() const
o3tl::span< const SfxItemPropertyMapEntry > GetPropertyMapEntries(sal_uInt16 PropertyId)
static ShellResource * GetShellRes()
virtual void CalcLayout()
void InsertTOXMark(const SwTOXType &rTOXType, SwTOXMark &rMark, SwPaM &rPam, SwXTextCursor const *const pTextCursor)
SwTOXType * GetTOXType() const
const SwTOXType * m_pTOXType
OUString m_sUserIndexName
void ReplaceTOXMark(const SwTOXType &rTOXType, SwTOXMark &rMark, SwPaM &rPam)
virtual void Notify(const SfxHint &) override
OUString m_sSecondaryKeyReading
const SwTOXMark * m_pTOXMark
::comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > m_EventListeners
Impl(SwXDocumentIndexMark &rThis, SwDoc *const pDoc, const enum TOXTypes eType, const SwTOXType *pType, SwTOXMark const *pMark)
SfxItemPropertySet const & m_rPropSet
unotools::WeakReference< SwXDocumentIndexMark > m_wThis
SwXDocumentIndexMark & m_rThis
OUString m_sPrimaryKeyReading
const TOXTypes m_eTOXType
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
static rtl::Reference< SwXDocumentIndexMark > CreateXDocumentIndexMark(SwDoc &rDoc, SwTOXMark *pMark, TOXTypes eType=TOX_INDEX)
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
virtual ~SwXDocumentIndexMark() override
::sw::UnoImplPtr< Impl > m_pImpl
SwXDocumentIndexMark(SwDoc &rDoc, const SwTOXType &rType, const SwTOXMark &rMark)
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
virtual OUString SAL_CALL getMarkEntry() override
virtual void SAL_CALL dispose() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual void SAL_CALL setMarkEntry(const OUString &rIndexEntry) override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Impl(SwDoc &rDoc, const TOXTypes eType, SwTOXBaseSection *const pBaseSection)
sal_Int32 GetFormMax() const
uno::WeakReference< container::XIndexReplace > m_wTokenAccess
SfxItemPropertySet const & m_rPropSet
SwTOXBase & GetTOXSectionOrThrow() const
SwSectionFormat * GetSectionFormat() const
SwSectionFormat * m_pFormat
void SetSectionFormat(SwSectionFormat &rFormat)
unotools::WeakReference< SwXDocumentIndex > m_wThis
std::optional< SwDocIndexDescriptorProperties_Impl > m_oProps
::comphelper::OInterfaceContainerHelper4< lang::XEventListener > m_EventListeners
::comphelper::OInterfaceContainerHelper4< util::XRefreshListener > m_RefreshListeners
const TOXTypes m_eTOXType
virtual void Notify(const SfxHint &) override
uno::WeakReference< container::XIndexReplace > m_wStyleAccess
::rtl::Reference< SwXDocumentIndex > m_xParent
can be destroyed threadsafely, so no UnoImplPtr here
virtual void SAL_CALL replaceByIndex(sal_Int32 Index, const uno::Any &rElement) override
virtual ~StyleAccess_Impl() override
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual uno::Type SAL_CALL getElementType() override
virtual sal_Int32 SAL_CALL getCount() override
virtual OUString SAL_CALL getImplementationName() override
virtual uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override
StyleAccess_Impl(SwXDocumentIndex &rParentIdx)
virtual sal_Bool SAL_CALL hasElements() override
virtual sal_Int32 SAL_CALL getCount() override
virtual OUString SAL_CALL getImplementationName() override
virtual ~TokenAccess_Impl() override
TokenAccess_Impl(SwXDocumentIndex &rParentIdx)
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
virtual sal_Bool SAL_CALL hasElements() override
virtual uno::Type SAL_CALL getElementType() override
virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL replaceByIndex(sal_Int32 Index, const uno::Any &rElement) override
virtual uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override
::rtl::Reference< SwXDocumentIndex > m_xParent
can be destroyed threadsafely, so no UnoImplPtr here
static rtl::Reference< SwXDocumentIndex > CreateXDocumentIndex(SwDoc &rDoc, SwTOXBaseSection *pSection, TOXTypes eTypes=TOX_INDEX)
virtual ::sfx2::Metadatable * GetCoreObject() override
virtual css::uno::Reference< css::frame::XModel > GetModel() override
virtual void SAL_CALL dispose() override
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
SwXDocumentIndex(SwTOXBaseSection &, SwDoc &)
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual void SAL_CALL refresh() override
virtual ~SwXDocumentIndex() override
virtual OUString SAL_CALL getServiceName() override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual void SAL_CALL update() override
virtual void SAL_CALL addRefreshListener(const css::uno::Reference< css::util::XRefreshListener > &xListener) override
virtual void SAL_CALL setName(const OUString &rName) override
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
::sw::UnoImplPtr< Impl > m_pImpl
virtual OUString SAL_CALL getName() override
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void SAL_CALL removeRefreshListener(const css::uno::Reference< css::util::XRefreshListener > &xListener) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Any SAL_CALL getByName(const OUString &rName) override
SwXDocumentIndexes(SwDoc *const pDoc)
virtual sal_Bool SAL_CALL hasElements() override
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
virtual css::uno::Type SAL_CALL getElementType() override
virtual sal_Bool SAL_CALL hasByName(const OUString &rName) override
virtual sal_Int32 SAL_CALL getCount() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual ~SwXDocumentIndexes() override
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
static OUString GetProviderName(SwServiceType nObjectType)
bool IsAtEndOfMeta() const
static rtl::Reference< SwXTextSection > CreateXTextSection(SwSectionFormat *const pFormat, const bool bIndexHeader=false)
void disposeAndClear(::std::unique_lock<::std::mutex > &rGuard, const css::lang::EventObject &rEvt)
css::uno::Type const & get()
virtual SotClipboardFormatId GetFormat(const TransferableDataHelper &aHelper) override
constexpr TypedWhichId< SwPtrMsgPoolItem > RES_REMOVE_UNO_OBJECT(181)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(111)
Sequence< sal_Int8 > aSeq
sal_Int32 getTokenCount(std::string_view rIn, char cTok)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr auto toTwips(N number, Length from)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
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)
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
bool GoInContent(SwPaM &rPam, SwMoveFnCollection const &fnMove)
SwMoveFnCollection const & fnMoveBackward
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
std::vector< SwSection * > SwSections
void Assign(const SwNode &rNd, SwNodeOffset nDelta, sal_Int32 nContentOffset=0)
These all set both nNode and nContent.
void SetContent(sal_Int32 nContentIndex)
Set content index, only valid to call this if the position points to a SwContentNode subclass.
void AdjustContent(sal_Int32 nDelta)
Adjust content index, only valid to call this if the position points to a SwContentNode subclass.
Reference< XModel > xModel
OUString SwResId(TranslateId aId)
@ FORCEHINTEXPAND
Force hint expand (only matters for hints with CH_TXTATR).
constexpr sal_uInt8 MAXLEVEL
std::vector< SwTOXMark * > SwTOXMarks
#define TOX_STYLE_DELIMITER
std::vector< SwFormToken > SwFormTokens
Vector of tokens.
SwServiceType
entries in this enum are mapped in an array in unocoll.cxx
::cppu::WeakImplHelper< lang::XServiceInfo, container::XIndexReplace > SwXDocumentIndexTokenAccess_Base
#define USER_AND_SUFFIXLEN
::cppu::WeakImplHelper< lang::XServiceInfo, container::XIndexReplace > SwXDocumentIndexStyleAccess_Base
static void lcl_ConvertTOUNameToUserName(OUString &rTmp)
static sal_uInt16 lcl_TypeToPropertyMap_Mark(const TOXTypes eType)
static sal_uInt16 lcl_TypeToPropertyMap_Index(const TOXTypes eType)
constexpr OUStringLiteral cUserDefined
static void lcl_ReAssignTOXType(SwDoc &rDoc, SwTOXBase &rTOXBase, const OUString &rNewName)
static void lcl_BitMaskToAny(uno::Any &o_rValue, const T nBitMask, const T nBit)
static void lcl_ConvertTOUNameToProgrammaticName(OUString &rTmp)
static void lcl_AnyToBitMask(uno::Any const &rValue, T &rBitMask, const T nBit)
const struct TokenType_ g_TokenTypes[]
static void lcl_CalcLayout(SwDoc *pDoc)
static T lcl_AnyToType(uno::Any const &rVal)
SwUnoPropertyMapProvider aSwMapProvider
#define WID_CREATE_FROM_STAR_MATH
#define PROPERTY_MAP_INDEX_USER
#define WID_LEVEL_PARAGRAPH_STYLES
#define WID_CREATE_FROM_CHAPTER
#define WID_CREATE_FROM_LABELS
#define WID_CREATE_FROM_PARAGRAPH_STYLE
#define PROPERTY_MAP_INDEX_IDX
#define WID_HIDE_TABLEADER_PAGENUMBERS
#define WID_IDX_CONTENT_SECTION
#define WID_MAIN_ENTRY_CHARACTER_STYLE_NAME
#define WID_TOC_PARAGRAPH_OUTLINE_LEVEL
#define WID_PRIMARY_KEY_READING
#define WID_IS_COMMA_SEPARATED
#define PROPERTY_MAP_BIBLIOGRAPHY
#define WID_IDX_HEADER_SECTION
#define PROPERTY_MAP_INDEX_MARK
#define WID_IS_RELATIVE_TABSTOPS
#define WID_USER_IDX_NAME
#define PROPERTY_MAP_USER_MARK
#define WID_CREATE_FROM_OTHER_EMBEDDED_OBJECTS
#define WID_CREATE_FROM_MARKS
#define PROPERTY_MAP_PARAGRAPH_EXTENSIONS
#define WID_USE_ALPHABETICAL_SEPARATORS
#define WID_CREATE_FROM_GRAPHIC_OBJECTS
#define PROPERTY_MAP_INDEX_CNTNT
#define WID_CREATE_FROM_EMBEDDED_OBJECTS
#define WID_CREATE_FROM_OUTLINE
#define WID_CREATE_FROM_TEXT_FRAMES
#define WID_USE_UPPER_CASE
#define WID_SECONDARY_KEY
#define WID_CREATE_FROM_STAR_CHART
#define PROPERTY_MAP_INDEX_ILLUSTRATIONS
#define WID_CREATE_FROM_PARAGRAPH_STYLES
#define WID_USE_COMBINED_ENTRIES
#define WID_CREATE_FROM_TABLES
#define WID_USE_LEVEL_FROM_SOURCE
#define PROPERTY_MAP_CNTIDX_MARK
#define PROPERTY_MAP_INDEX_OBJECTS
#define WID_CREATE_FROM_STAR_DRAW
#define WID_LABEL_DISPLAY_TYPE
#define WID_LABEL_CATEGORY
#define WID_IDX_SORT_ALGORITHM
#define PROPERTY_MAP_INDEX_TABLES
#define WID_IS_CASE_SENSITIVE
#define WID_CREATE_FROM_STAR_CALC
#define PROPERTY_MAP_FLDTYP_BIBLIOGRAPHY
#define WID_USE_KEY_AS_ENTRY
#define WID_SECONDARY_KEY_READING