20#include <com/sun/star/table/TableSortField.hpp>
26#include <osl/endian.h>
56#include <unoprnms.hxx>
60#include <com/sun/star/text/TextMarkupType.hpp>
67#include <com/sun/star/beans/PropertyAttribute.hpp>
68#include <com/sun/star/beans/NamedValue.hpp>
69#include <com/sun/star/i18n/WordType.hpp>
82 SwPaM(rDoc.GetNodes())
97 const SwPaM* pTmp = &rPaM;
106 while(&rPaM != (pTmp = pTmp->
GetNext()))
140 aStream.
SetEndian( SvStreamEndian::BIG );
142 aStream.
SetEndian( SvStreamEndian::LITTLE );
151 xWrt->m_bASCII_NoLastLineEnd =
true;
152 xWrt->m_bExportParagraphNumbering =
false;
155 xWrt->SetAsciiOptions( aOpt );
156 xWrt->m_bUCS2_WithStartChar =
false;
158 const bool bOldShowProgress = xWrt->m_bShowProgress;
159 xWrt->m_bShowProgress =
false;
160 xWrt->m_bHideDeleteRedlines = pLayout && pLayout->
IsHideRedlines();
172 rtl_uString *pStr = rtl_uString_alloc(lUniLen);
174 rBuffer = OUString(pStr, SAL_NO_ACQUIRE);
177 xWrt->m_bShowProgress = bOldShowProgress;
191 if (!(rValue >>= uStyle))
193 throw lang::IllegalArgumentException();
202 throw lang::IllegalArgumentException();
214 if (!(rValue >>= uStyle))
216 throw lang::IllegalArgumentException();
218 std::shared_ptr<SfxItemSet> pStyle = bPara ?
223 throw lang::IllegalArgumentException();
261 if (!(rValue >>= sStyle))
267 std::shared_ptr<SfxItemSet> pStyle
300 throw lang::IllegalArgumentException();
306 SwPaM *pTmpCursor = &rPaM;
309 pTmpCursor = pTmpCursor->
GetNext();
310 }
while ( pTmpCursor != &rPaM );
319 if (!(rValue >>= uDescName))
323 std::unique_ptr<SwFormatPageDesc> pNewDesc;
335 if (!pNewDesc->GetPageDesc() ||
336 (pNewDesc->GetPageDesc()->GetName() != sDescName))
339 if (!sDescName.isEmpty())
344 throw lang::IllegalArgumentException();
346 pNewDesc->RegisterToPageDesc(*pPageDesc);
367 sal_uInt16 nStt = (nTmp < 0 ? USHRT_MAX : o3tl::narrowing<sal_uInt16>(nTmp));
371 if( rCursor.
GetNext() != &rCursor )
376 for(
size_t n = 0;
n < aRangeArr.
Count(); ++
n )
394 uno::Sequence<OUString> aCharStyles;
395 if (!(rValue >>= aCharStyles))
400 for (sal_Int32 nStyle = 0; nStyle < aCharStyles.getLength(); nStyle++)
404 aStyle <<= aCharStyles.getConstArray()[nStyle];
423 if (!(rValue >>= uStyle))
425 throw lang::IllegalArgumentException();
437 throw lang::IllegalArgumentException();
439 std::unique_ptr<SwFormatDrop> pDrop;
449 pDrop->SetCharFormat(xStyle->GetCharFormat());
450 rItemSet.
Put(std::move(pDrop));
457 if (!(rValue >>= sTmp))
459 throw lang::IllegalArgumentException();
462 std::unique_ptr<SwFormatRuby> pRuby;
474 pRuby->SetCharFormatName(sStyle);
475 pRuby->SetCharFormatId(0);
476 if (!sStyle.isEmpty())
480 pRuby->SetCharFormatId(
nId);
482 rItemSet.
Put(std::move(pRuby));
490 if (!(rEntry.
nFlags & beans::PropertyAttribute::MAYBEVOID) &&
508 rValue, rItemSet,
false);
518 rValue, rItemSet,
true);
536 throw lang::IllegalArgumentException();
540 sal_Int16 nLevel = 0;
541 if (rValue >>= nLevel)
543 if (nLevel < 0 ||
MAXLEVEL <= nLevel)
545 throw lang::IllegalArgumentException(
546 "invalid NumberingLevel",
nullptr, 0);
555 if (rValue >>= sListId)
562 bool bIsNumber(
false);
563 if ((rValue >>= bIsNumber) && !bIsNumber)
570 uno::Sequence<beans::NamedValue>
props;
571 if (rValue >>= props)
582 for (beans::NamedValue
const & prop : std::as_const(props))
585 rMap.getByName(prop.Name);
588 if (prop.Name ==
"CharStyleName")
593 throw beans::UnknownPropertyException(
594 "Unknown property: " + prop.Name);
596 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
598 throw beans::PropertyVetoException(
599 "Property is read-only: " + prop.Name);
601 rPropSet.setPropertyValue(*pEntry, prop.Value, items);
606 const std::shared_ptr<SfxItemSet> pAutoStyle
610 item.SetStyleHandle(pAutoStyle);
620 if (!(rValue >>= bVal))
622 throw lang::IllegalArgumentException();
659 rValue, rPam.
GetDoc(), rItemSet);
676 static const sal_uLong nMaxLookup = 1000;
679 SwPaM *pTmpCursor = &rPaM;
694 SwTextNode const*
const pNd = rNds[
n ]->GetTextNode();
703 else if( pFormat != pNdFormat )
711 pTmpCursor = pTmpCursor->
GetNext();
712 }
while ( pTmpCursor != &rPaM );
713 return bError ? nullptr : pFormat;
733 uno::Reference< text::XText > xParent,
739 , m_xParentText(
std::move(xParent))
740 , m_pUnoCursor(rDoc.CreateUnoCursor(rPos))
753 , m_xParentText(
std::move(xParent))
754 , m_pUnoCursor(rSourceCursor.GetDoc().CreateUnoCursor(*rSourceCursor.GetPoint()))
777 SwDoc& rDoc = pUnoCursor->GetDoc();
779 const sal_Int32 nTextLen = aText.size();
781 auto pCurrent = pUnoCursor;
784 if (pCurrent->HasMark())
794 rDoc, *pCurrent, aText,
bool(
eMode & ::sw::DeleteAndInsertMode::ForceExpandHints)));
795 OSL_ENSURE( bSuccess,
"Doc->Insert(Str) failed." );
798 pCurrent->Left(aText.size());
800 pCurrent = pCurrent->GetNext();
801 }
while (pCurrent != pUnoCursor);
807enum ForceIntoMetaMode { META_CHECK_BOTH, META_INIT_START, META_INIT_END };
809enum ForceIntoContentControlMode
811 CONTENT_CONTROL_CHECK_BOTH,
812 CONTENT_CONTROL_INIT_START,
813 CONTENT_CONTROL_INIT_END
819 uno::Reference<text::XText>
const & xParentText,
820 const enum ForceIntoMetaMode eMode)
823 SwXMeta const *
const pXMeta(
dynamic_cast<SwXMeta*
>(xParentText.get()) );
824 OSL_ENSURE(pXMeta,
"no parent?");
826 throw uno::RuntimeException();
830 const bool bSuccess( pXMeta->
SetContentRange(pTextNode, nStart, nEnd) );
831 OSL_ENSURE(bSuccess,
"no pam?");
833 throw uno::RuntimeException();
839 case META_INIT_START:
845 case META_CHECK_BOTH:
863bool lcl_ForceIntoContentControl(
SwPaM& rCursor,
const uno::Reference<text::XText>& xParentText,
864 ForceIntoContentControlMode eMode)
868 if (!pXContentControl)
870 SAL_WARN(
"sw.core",
"lcl_ForceIntoContentControl: no parent text");
871 throw uno::RuntimeException();
877 bool bSuccess = pXContentControl->SetContentRange(pTextNode, nStart, nEnd);
880 SAL_WARN(
"sw.core",
"lcl_ForceIntoContentControl: SetContentRange() failed");
881 throw uno::RuntimeException();
889 case CONTENT_CONTROL_INIT_START:
893 case CONTENT_CONTROL_INIT_END:
897 case CONTENT_CONTROL_CHECK_BOTH:
898 if (*rCursor.
Start() < aStart)
900 *rCursor.
Start() = aStart;
904 if (*rCursor.
End() > aEnd)
906 *rCursor.
End() = aEnd;
923 OSL_ENSURE(pXMeta,
"no meta?");
924 if (pCursor && pXMeta)
931 OSL_ENSURE(bSuccess,
"no pam?");
935 if ( (*pCursor->GetPoint() ==
end)
936 || (*pCursor->GetMark() ==
end))
951 auto pXContentControl(
953 if (!pXContentControl)
955 SAL_WARN(
"sw.core",
"SwXTextCursor::IsAtEndOfContentControl: no content control");
957 if (pCursor && pXContentControl)
963 pXContentControl->SetContentRange(pTextNode, nStart, nEnd) );
966 SAL_WARN(
"sw.core",
"SwXTextCursor::IsAtEndOfContentControl: no pam");
971 if ( (*pCursor->GetPoint() ==
end)
972 || (*pCursor->GetMark() ==
end))
984 return "SwXTextCursor";
992uno::Sequence< OUString > SAL_CALL
996 "com.sun.star.text.TextCursor",
997 "com.sun.star.style.CharacterProperties",
998 "com.sun.star.style.CharacterPropertiesAsian",
999 "com.sun.star.style.CharacterPropertiesComplex",
1000 "com.sun.star.style.ParagraphProperties",
1001 "com.sun.star.style.ParagraphPropertiesAsian",
1002 "com.sun.star.style.ParagraphPropertiesComplex",
1003 "com.sun.star.text.TextSortable"
1045 if(pUnoCursor && pUnoCursor->GetMark())
1047 bRet = (*pUnoCursor->GetPoint() == *pUnoCursor->GetMark());
1069 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH)
1092 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH)
1127 rUnoCursor.
GetPoint(),
true,
false);
1146 lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_INIT_START);
1178 lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_INIT_END);
1184 const uno::Reference< text::XTextRange > & xRange,
sal_Bool bExpand)
1190 throw uno::RuntimeException();
1196 OTextCursorHelper* pCursor =
dynamic_cast<OTextCursorHelper*
>(xRange.get());
1198 if (!pRange && !pCursor)
1200 throw uno::RuntimeException();
1204 const SwPaM * pPam(
nullptr);
1207 pPam = pCursor->GetPaM();
1219 throw uno::RuntimeException();
1238 while ( pOwnStartNode !=
nullptr
1246 while ( pTmp !=
nullptr
1254 if (!pOwnStartNode || !pTmp)
1256 throw uno::RuntimeException();
1261 throw uno::RuntimeException();
1266 if ( pOwnStartNode != pTmp )
1268 throw uno::RuntimeException();
1280 throw uno::RuntimeException(
1281 "gotoRange: parameter range not contained in nesting"
1282 " text content for which this cursor was created",
1283 static_cast<text::XWordCursor*
>(
this));
1289 if (!lcl_ForceIntoContentControl(aPaM,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH))
1291 throw uno::RuntimeException(
"gotoRange: xRange is out of bounds of the content control",
1292 static_cast<text::XWordCursor*
>(
this));
1307 if (aOwnRight > rParamRight)
1308 *rOwnCursor.
GetPoint() = aOwnRight;
1310 *rOwnCursor.
GetPoint() = rParamRight;
1312 if (aOwnLeft < rParamLeft)
1313 *rOwnCursor.
GetMark() = aOwnLeft;
1315 *rOwnCursor.
GetMark() = rParamLeft;
1340 rUnoCursor.
IsStartWordWT( i18n::WordType::DICTIONARY_WORD );
1351 rUnoCursor.
IsEndWordWT( i18n::WordType::DICTIONARY_WORD );
1376 rUnoCursor.
Right(1);
1381 rUnoCursor.
GoNextWordWT( i18n::WordType::DICTIONARY_WORD );
1391 bRet = (&pPoint->
GetNode() != pOldNode) ||
1400 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH);
1427 rUnoCursor.
GoPrevWordWT( i18n::WordType::DICTIONARY_WORD );
1435 bRet = (&pPoint->
GetNode() != pOldNode) ||
1444 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH);
1462 const sal_Int16 nWordType = i18n::WordType::DICTIONARY_WORD;
1474 pPoint->
Assign(rOldNode, nOldIndex);
1483 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH);
1501 const sal_Int16 nWordType = i18n::WordType::DICTIONARY_WORD;
1513 pPoint->
Assign(rOldNode, nOldIndex);
1522 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH);
1540 if (!bRet && (!rUnoCursor.
HasMark() ||
1546 bRet = aOrigPos == *aCursor.
GetPoint();
1564 if (!bRet && (!rUnoCursor.
HasMark() ||
1570 bRet = aOrigPos == *aCursor.
GetPoint();
1593 if (!rUnoCursor.
IsStartWordWT(css::i18n::WordType::ANYWORD_IGNOREWHITESPACES))
1595 const bool bNextWord = rUnoCursor.
GoNextWordWT(i18n::WordType::ANYWORD_IGNOREWHITESPACES);
1596 if (bWasEOS && !bNextWord)
1609 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH)
1642 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH)
1670 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH)
1688 bool bRet = !bAlreadyParaEnd
1699 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH)
1748 OSL_ENSURE( bRet,
"gotoStartOfParagraph failed" );
1773 OSL_ENSURE( bRet,
"gotoEndOfParagraph failed" );
1809uno::Reference< text::XText > SAL_CALL
1817uno::Reference< text::XTextRange > SAL_CALL
1824 uno::Reference< text::XTextRange > xRet;
1826 const uno::Reference< text::XText > xParent =
getText();
1833 pXCursor->gotoStart(
false);
1834 xRet =
static_cast<text::XWordCursor*
>(pXCursor.get());
1843uno::Reference< text::XTextRange > SAL_CALL
1850 uno::Reference< text::XTextRange > xRet;
1852 const uno::Reference< text::XText > xParent =
getText();
1859 pXCursor->gotoEnd(
false);
1860 xRet =
static_cast<text::XWordCursor*
>(pXCursor.get());
1889 .CheckForOwnMemberMeta(*
GetPaM(),
true) );
1895 std::u16string_view rPropertyName)
1903 throw beans::UnknownPropertyException(
1904 OUString::Concat(
"Unknown property: ") + rPropertyName,
1908 beans::PropertyState eTemp;
1910 *pEntry, rPaM, &aAny, eTemp );
1929 const OUString& rPropertyName,
1951 const uno::Sequence< beans::PropertyValue > &rPropertyValues,
1968 OUString aUnknownExMsg, aPropertyVetoExMsg;
1972 std::vector<std::pair<const SfxItemPropertyMapEntry*, const uno::Any&>>
aEntries;
1974 for (
const auto& rPropVal : aPropertyValues)
1976 const OUString &rPropertyName = rPropVal.Name;
1984 aUnknownExMsg +=
"Unknown property: '" + rPropertyName +
"' ";
1987 else if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
1989 aPropertyVetoExMsg +=
"Property is read-only: '" + rPropertyName +
"' ";
1993 aEntries.emplace_back(pEntry, rPropVal.Value);
2001 bool bPreviousPropertyCausesSideEffectsInNodes =
false;
2005 bool bPropertyCausesSideEffectsInNodes =
2009 if (i == 0 || bPreviousPropertyCausesSideEffectsInNodes)
2011 aItemSet.ClearItem();
2020 if (i + 1 ==
aEntries.size() || bPropertyCausesSideEffectsInNodes)
2023 bPreviousPropertyCausesSideEffectsInNodes = bPropertyCausesSideEffectsInNodes;
2027 if (!aUnknownExMsg.isEmpty())
2028 throw beans::UnknownPropertyException(aUnknownExMsg,
static_cast<cppu::OWeakObject *
>(
nullptr));
2029 if (!aPropertyVetoExMsg.isEmpty())
2030 throw beans::PropertyVetoException(aPropertyVetoExMsg,
static_cast<cppu::OWeakObject *
>(
nullptr));
2035 bool NotInRange(sal_uInt16 nWID, sal_uInt16 nStart, sal_uInt16 nEnd)
2037 return nWID < nStart || nWID > nEnd;
2041uno::Sequence< beans::PropertyState >
2044 const uno::Sequence< OUString >& rPropertyNames,
2047 const OUString* pNames = rPropertyNames.getConstArray();
2048 uno::Sequence< beans::PropertyState > aRet(rPropertyNames.getLength());
2049 beans::PropertyState* pStates = aRet.getArray();
2051 std::optional<SfxItemSet> oSet;
2052 std::optional<SfxItemSet> oSetParent;
2054 for (sal_Int32 i = 0, nEnd = rPropertyNames.getLength(); i < nEnd; i++)
2064 pStates[
i] = beans::PropertyState_DEFAULT_VALUE;
2071 pStates[
i] = beans::PropertyState::PropertyState_MAKE_FIXED_SIZE;
2076 throw beans::UnknownPropertyException(
2077 "Unknown property: " + pNames[i],
2086 pStates[
i] = beans::PropertyState_DEFAULT_VALUE;
2094 *pEntry, rPaM,
nullptr, pStates[i] );
2105 svl::Items<RES_CHRATR_BEGIN, RES_TXTATR_END> );
2123 pStates[
i] = ( oSet->Count() )
2125 : beans::PropertyState_DEFAULT_VALUE;
2128 if( beans::PropertyState_DIRECT_VALUE == pStates[i] )
2132 oSetParent.emplace(oSet->CloneAsValue(
false ));
2135 rPaM, *oSetParent,
true,
false );
2138 pStates[
i] = ( oSetParent->Count() )
2140 : beans::PropertyState_DEFAULT_VALUE;
2150 const OUString& rPropertyName)
2152 uno::Sequence< OUString > aStrings { rPropertyName };
2153 uno::Sequence< beans::PropertyState >
aSeq =
2172 *pTemp->GetPoint() = aEnd;
2183 std::u16string_view rPropertyName)
2190 throw beans::UnknownPropertyException(
2191 OUString::Concat(
"Unknown property: ") + rPropertyName,
2195 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
2197 throw uno::RuntimeException(
2198 OUString::Concat(
"setPropertyToDefault: property is read-only: ")
2199 + rPropertyName,
nullptr);
2222 std::u16string_view rPropertyName)
2228 throw beans::UnknownPropertyException(
2229 OUString::Concat(
"Unknown property: ") + rPropertyName,
2244uno::Reference< beans::XPropertySetInfo > SAL_CALL
2249 static uno::Reference< beans::XPropertySetInfo > xRef = [&]()
2257 const uno::Reference< beans::XPropertySetInfo > xInfo =
2260 const uno::Sequence<beans::Property> aPropSeq = xInfo->getProperties();
2270 const OUString& rPropertyName,
const uno::Any& rValue)
2279 if (!(rValue >>= bSet))
2281 throw lang::IllegalArgumentException();
2288 if (!(rValue >>= bSet))
2290 throw lang::IllegalArgumentException();
2306 if (!(rValue >>= bSet))
2308 throw lang::IllegalArgumentException();
2355 const uno::Reference< beans::XPropertyChangeListener >& )
2357 OSL_FAIL(
"SwXTextCursor::addPropertyChangeListener(): not implemented");
2363 const uno::Reference< beans::XPropertyChangeListener >& )
2365 OSL_FAIL(
"SwXTextCursor::removePropertyChangeListener(): not implemented");
2371 const uno::Reference< beans::XVetoableChangeListener >& )
2373 OSL_FAIL(
"SwXTextCursor::addVetoableChangeListener(): not implemented");
2379 const uno::Reference< beans::XVetoableChangeListener >& )
2381 OSL_FAIL(
"SwXTextCursor::removeVetoableChangeListener(): not implemented");
2384beans::PropertyState SAL_CALL
2396uno::Sequence< beans::PropertyState > SAL_CALL
2398 const uno::Sequence< OUString >& rPropertyNames)
2412 uno::Sequence < OUString > aSequence ( &rPropertyName, 1 );
2420 const uno::Sequence < OUString > aSequence ( &rPropertyName, 1 );
2425 const uno::Sequence< OUString >& aPropertyNames,
2426 const uno::Sequence< uno::Any >& aValues )
2428 if( aValues.getLength() != aPropertyNames.getLength() )
2430 OSL_FAIL(
"mis-matched property value sequences" );
2431 throw lang::IllegalArgumentException();
2439 uno::Sequence< beans::PropertyValue >
aPropertyValues( aValues.getLength() );
2441 for ( sal_Int32
i = 0;
i < aPropertyNames.getLength();
i++ )
2447 OSL_FAIL(
"invalid property name for batch setting");
2448 throw lang::IllegalArgumentException();
2450 aPropertyValuesRange[
i ].Name = aPropertyNames[
i ];
2451 aPropertyValuesRange[
i ].Value = aValues[
i ];
2457 catch (
const css::beans::UnknownPropertyException& e)
2460 throw lang::WrappedTargetException(
2461 "wrapped Exception " + e.Message,
2462 uno::Reference<uno::XInterface>(),
a);
2466uno::Sequence< uno::Any > SAL_CALL
2470 uno::Sequence< uno::Any > aValues( aPropertyNames.getLength() );
2471 std::transform(aPropertyNames.begin(), aPropertyNames.end(), aValues.getArray(),
2472 [
this](
const OUString& rName) ->
uno::Any { return getPropertyValue( rName ); });
2477 const uno::Sequence< OUString >& ,
2478 const uno::Reference< css::beans::XPropertiesChangeListener >& )
2480 OSL_FAIL(
"SwXTextCursor::addPropertiesChangeListener(): not implemented");
2483 const uno::Reference< css::beans::XPropertiesChangeListener >& )
2485 OSL_FAIL(
"SwXTextCursor::removePropertiesChangeListener(): not implemented");
2489 const uno::Sequence< OUString >& ,
2490 const uno::Reference< css::beans::XPropertiesChangeListener >& )
2492 OSL_FAIL(
"SwXTextCursor::firePropertiesChangeEvent(): not implemented");
2519 const sal_uInt16 nStart = *pIdRange++;
2520 const sal_uInt16 nEnd = *pIdRange++;
2521 for (sal_uInt16
nId = nStart + 1;
nId <= nEnd; ++
nId)
2539 if (!aParaWhichIds.
empty())
2544 if (!aWhichIds.
empty())
2552 const uno::Sequence< OUString >& rPropertyNames)
2558 if ( !rPropertyNames.hasElements() )
2564 for (
const OUString& rName : rPropertyNames)
2575 throw beans::UnknownPropertyException(
2576 "Unknown property: " + rName,
2579 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
2581 throw uno::RuntimeException(
2582 "setPropertiesToDefault: property is read-only: " + rName,
2603 if (!aParaWhichIds.
empty())
2607 if (!aWhichIds.
empty())
2609 rDoc.
ResetAttrs(rUnoCursor,
true, aWhichIds);
2613uno::Sequence< uno::Any > SAL_CALL
2615 const uno::Sequence< OUString >& rPropertyNames)
2621 const sal_Int32
nCount = rPropertyNames.getLength();
2622 uno::Sequence< uno::Any > aRet(
nCount);
2626 const OUString *pNames = rPropertyNames.getConstArray();
2640 throw beans::UnknownPropertyException(
2641 "Unknown property: " + pNames[
i],
2665 if (txtNode ==
nullptr)
return;
2667 if ( text::TextMarkupType::SPELLCHECK ==
nType )
2672 else if( text::TextMarkupType::PROOFREADING ==
nType )
2677 else if ( text::TextMarkupType::SMARTTAG ==
nType )
2686 if (fmtColl ==
nullptr)
return;
2694 const OUString& rRedlineType,
2695 const uno::Sequence< beans::PropertyValue >& rRedlineProperties)
2705 const uno::Sequence< beans::PropertyValue >& rOptions)
2714uno::Sequence< beans::PropertyValue >
2717 uno::Sequence< beans::PropertyValue > aRet(5);
2718 beans::PropertyValue* pArray = aRet.getArray();
2721 aVal <<= bFromTable;
2722 pArray[0] = beans::PropertyValue(
"IsSortInTable", -1, aVal,
2723 beans::PropertyState_DIRECT_VALUE);
2726 pArray[1] = beans::PropertyValue(
"Delimiter", -1, aVal,
2727 beans::PropertyState_DIRECT_VALUE);
2730 pArray[2] = beans::PropertyValue(
"IsSortColumns", -1, aVal,
2731 beans::PropertyState_DIRECT_VALUE);
2733 aVal <<= sal_Int32(3);
2734 pArray[3] = beans::PropertyValue(
"MaxSortFieldsCount", -1, aVal,
2735 beans::PropertyState_DIRECT_VALUE);
2739 uno::Sequence< OUString >
aSeq(
2741 const bool bHasElements =
aSeq.hasElements();
2742 OSL_ENSURE( bHasElements,
"list of collator algorithms is empty!");
2746 aCollAlg =
aSeq.getConstArray()[0];
2749 uno::Sequence< table::TableSortField > aFields
2752 { 1,
true,
false, table::TableSortFieldType_ALPHANUMERIC, aLang, aCollAlg },
2753 { 1,
true,
false, table::TableSortFieldType_ALPHANUMERIC, aLang, aCollAlg },
2754 { 1,
true,
false, table::TableSortFieldType_ALPHANUMERIC, aLang, aCollAlg }
2758 pArray[4] = beans::PropertyValue(
"SortFields", -1, aVal,
2759 beans::PropertyState_DIRECT_VALUE);
2764uno::Sequence< beans::PropertyValue > SAL_CALL
2773 const uno::Sequence< beans::PropertyValue >& rDescriptor,
2779 rSortOpt.
cDeli =
' ';
2796 SwSortKey* aKeys[3] = {&aKey1, &aKey2, &aKey3};
2798 bool bOldSortdescriptor(
false);
2799 bool bNewSortdescriptor(
false);
2801 for (
const beans::PropertyValue& rProperty : rDescriptor)
2803 uno::Any aValue( rProperty.Value );
2804 const OUString& rPropName = rProperty.Name;
2807 if ( rPropName ==
"IsSortInTable" )
2818 else if ( rPropName ==
"Delimiter" )
2822 if (aValue >>= uChar)
2824 rSortOpt.
cDeli = uChar;
2826 else if (aValue >>= nChar)
2830 rSortOpt.
cDeli = nChar;
2838 else if ( rPropName ==
"SortColumns" )
2840 bOldSortdescriptor =
true;
2842 if (aValue >>= bTemp)
2851 else if ( rPropName ==
"IsCaseSensitive" )
2853 bOldSortdescriptor =
true;
2855 if (aValue >>= bTemp)
2864 else if ( rPropName ==
"CollatorLocale" )
2866 bOldSortdescriptor =
true;
2867 lang::Locale aLocale;
2868 if (aValue >>= aLocale)
2877 else if (rPropName.startsWith(
"CollatorAlgorithm") &&
2878 rPropName.getLength() == 18 &&
2879 (rPropName[17] >=
'0' && rPropName[17] <=
'9'))
2881 bOldSortdescriptor =
true;
2882 sal_uInt16
nIndex = rPropName[17];
2885 if ((aValue >>= aText) && nIndex < 3)
2894 else if (rPropName.startsWith(
"SortRowOrColumnNo") &&
2895 rPropName.getLength() == 18 &&
2896 (rPropName[17] >=
'0' && rPropName[17] <=
'9'))
2898 bOldSortdescriptor =
true;
2899 sal_uInt16
nIndex = rPropName[17];
2901 sal_Int16 nCol = -1;
2916 else if (rPropName.startsWith(
"IsSortNumeric") &&
2917 rPropName.getLength() == 14 &&
2918 (rPropName[13] >=
'0' && rPropName[13] <=
'9'))
2920 bOldSortdescriptor =
true;
2921 sal_uInt16
nIndex = rPropName[13];
2924 if (bTemp && nIndex < 3)
2933 else if (rPropName.startsWith(
"IsSortAscending") &&
2934 rPropName.getLength() == 16 &&
2935 (rPropName[15] >=
'0' && rPropName[15] <=
'9'))
2937 bOldSortdescriptor =
true;
2938 sal_uInt16
nIndex = rPropName[15];
2941 if (bTemp && nIndex < 3)
2952 else if ( rPropName ==
"IsSortColumns" )
2954 bNewSortdescriptor =
true;
2964 else if ( rPropName ==
"SortFields" )
2966 bNewSortdescriptor =
true;
2967 uno::Sequence < table::TableSortField > aFields;
2968 if (aValue >>= aFields)
2970 sal_Int32
nCount(aFields.getLength());
2973 table::TableSortField* pFields = aFields.getArray();
2974 for (sal_Int32 i = 0;
i <
nCount; ++
i)
2979 aKeys[
i]->
sSortType = pFields[
i].CollatorAlgorithm;
2981 o3tl::narrowing<sal_uInt16>(pFields[i].Field);
2983 table::TableSortFieldType_NUMERIC);
3000 if (bNewSortdescriptor && bOldSortdescriptor)
3002 OSL_FAIL(
"someone tried to set the old deprecated and "
3003 "the new sortdescriptor");
3009 rSortOpt.
aKeys.push_back(aKey1);
3013 rSortOpt.
aKeys.push_back(aKey2);
3017 rSortOpt.
aKeys.push_back(aKey3);
3020 return bRet && !rSortOpt.
aKeys.empty();
3036 throw uno::RuntimeException(
"Bad sort properties");
3053 sal_Int32 nLen = pCNd->
Len();
3067uno::Reference< container::XEnumeration > SAL_CALL
3071 if (rServiceName !=
"com.sun.star.text.TextContent")
3072 throw uno::RuntimeException();
3077uno::Reference< container::XEnumeration > SAL_CALL
3085 OSL_ENSURE(pParentText,
"parent is not a SwXText");
3088 throw uno::RuntimeException();
3094 pNewCursor->SetMark();
3095 *pNewCursor->GetMark() = *rUnoCursor.
GetMark();
3113uno::Sequence< OUString > SAL_CALL
3116 uno::Sequence<OUString> aRet {
"com.sun.star.text.TextContent" };
@ ArtificialSelection
keyboard delete, artificial selection, avoid deleting flys
PropertyValueVector_t aPropertyValues
virtual bool DeleteAndJoin(SwPaM &, SwDeleteFlags flags=SwDeleteFlags::Default)=0
complete delete of a given PaM
virtual std::shared_ptr< SfxItemSet > getByName(const OUString &rName, SwAutoStyleFamily eFamily)=0
It's slow to iterate through a stylepool looking for a special name, but if the style has been insert...
virtual std::shared_ptr< SfxItemSet > getAutomaticStyle(const SfxItemSet &rSet, SwAutoStyleFamily eFamily, const OUString *pParentName=nullptr)=0
static LanguageType convertToLanguageType(const css::lang::Locale &rLocale, bool bResolveSystem=true)
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
const SfxItemPropertyMapEntry * getByName(std::u16string_view rName) const
css::beans::PropertyState getPropertyState(const OUString &rName, const SfxItemSet &rSet) const
void setPropertyValue(const SfxItemPropertyMapEntry &rEntry, const css::uno::Any &aVal, SfxItemSet &rSet) const
const SfxItemPropertyMap & getPropertyMap() const
void getPropertyValue(const SfxItemPropertyMapEntry &rEntry, const SfxItemSet &rSet, css::uno::Any &rAny) const
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All) const
virtual void ResetError() override
void SetEndian(SvStreamEndian SvStreamEndian)
SvStream & WriteUInt16(sal_uInt16 nUInt16)
sal_uInt64 Seek(sal_uInt64 nPos)
std::size_t ReadBytes(void *pData, std::size_t nSize)
void SetCharSet(rtl_TextEncoding nVal)
SwFormatColl * GetFormatColl() const
virtual sal_Int32 Len() const
SwFormatColl & GetAnyFormatColl() const
bool MoveSection(SwWhichSection, SwMoveFnCollection const &)
bool Left(sal_uInt16 nCnt)
bool GoNextWordWT(sal_Int16 nWordType, SwRootFrame const *pLayout=nullptr)
bool GoPrevWordWT(sal_Int16 nWordType, SwRootFrame const *pLayout=nullptr)
bool IsEndWordWT(sal_Int16 nWordType, SwRootFrame const *pLayout=nullptr) const
bool Right(sal_uInt16 nCnt)
bool MovePara(SwWhichPara, SwMoveFnCollection const &)
bool GoEndWordWT(sal_Int16 nWordType, SwRootFrame const *pLayout=nullptr)
bool GoStartWordWT(sal_Int16 nWordType, SwRootFrame const *pLayout=nullptr)
bool IsStartWordWT(sal_Int16 nWordType, SwRootFrame const *pLayout=nullptr) const
bool GoSentence(SentenceMoveType eMoveType, SwRootFrame const *pLayout=nullptr)
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
SwCharFormat * GetCharFormat()
SwTextFormatColl * GetCollection()
void SetNodeNumStart(const SwPosition &rPos, sal_uInt16 nStt)
const SwCharFormat * GetDfltCharFormat() const
bool SortText(const SwPaM &, const SwSortOptions &)
Sort Text in the Document.
IDocumentContentOperations const & getIDocumentContentOperations() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
IStyleAccess & GetIStyleAccess()
void SetNumRuleStart(const SwPosition &rPos, bool bFlag=true)
void ResetAttrs(const SwPaM &rRg, bool bTextAttr=true, const o3tl::sorted_vector< sal_uInt16 > &rAttrs=o3tl::sorted_vector< sal_uInt16 >(), const bool bSendDataChangedEvents=true, SwRootFrame const *pLayout=nullptr)
Reset attributes.
std::shared_ptr< SwUnoCursor > CreateUnoCursor(const SwPosition &rPos, bool bTableCursor=false)
const SwAttrPool & GetAttrPool() const
bool SetTextFormatColl(const SwPaM &rRg, SwTextFormatColl *pFormat, const bool bReset=true, const bool bResetListAttrs=false, SwRootFrame const *pLayout=nullptr)
Add 4th optional parameter <bResetListAttrs>.
SwDocShell * GetDocShell()
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
Marks a node in the document model.
Base class of the Writer document model elements.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
bool IsSectionNode() const
SwTableNode * FindTableNode()
Search table node, in which it is.
SwStartNode * FindSttNodeByType(SwStartNodeType eTyp)
const SwStartNode * StartOfSectionNode() const
const SwEndNode * EndOfSectionNode() const
SwContentNode * GoNext(SwNodeIndex *) const
SwContentNode * GoNextSection(SwNodeIndex *, bool bSkipHidden=true, bool bSkipProtect=true) const
Go to next content-node that is not protected or hidden (Both set FALSE ==> GoNext/GoPrevious!...
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
SwNode & GetPointNode() const
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
SwContentNode * GetPointContentNode() const
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
const SwPosition * End() const
SwPaM(SwPaM const &rPaM)=delete
const SwPosition * GetPoint() const
const SwPosition * Start() const
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
static SwPageDesc * GetByName(SwDoc &rDoc, std::u16string_view rName)
SwPaM & SetPam(size_t nArrPos, SwPaM &rPam)
The root element of a Writer document layout.
bool IsHideRedlines() const
Replacement for sw::DocumentRedlineManager::GetRedlineFlags() (this is layout-level redline hiding).
A section node represents the start of a section on the UI, i.e.
const SwSection & GetSection() const
bool IsHiddenFlag() const
Starts a section of nodes in the document model.
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
Represents the style of a paragraph.
SwTextNode is a paragraph in the document model.
void SetAttrListLevel(int nLevel)
Sets the list level of this text node.
void SetWrongDirty(sw::WrongState eNew) const
virtual sal_Int32 Len() const override
void SetGrammarCheckDirty(bool bNew) const
virtual bool SetAttr(const SfxPoolItem &) override
overriding to handle change of certain paragraph attributes
void SetSmartTagDirty(bool bNew) const
void SetCountedInList(bool bCounted)
void SetListId(OUString const &rListId)
virtual bool ResetAttr(sal_uInt16 nWhich1, sal_uInt16 nWhich2=0) override
virtual bool IsSkipOverHiddenSections() const override
virtual bool IsSkipOverProtectSections() const override
void SetSkipOverHiddenSections(bool bFlag)
void SetSkipOverProtectSections(bool bFlag)
SwUnoInternalPaM(const SwUnoInternalPaM &)=delete
virtual ~SwUnoInternalPaM() override
SwUnoInternalPaM & operator=(const SwPaM &rPaM)
const SfxItemPropertySet * GetPropertySet(sal_uInt16 PropertyId)
ErrCode Write(WriterRef const &rxWriter, const OUString *=nullptr)
UNO API wrapper around an SwContentControl, exposed as the com.sun.star.text.ContentControl service.
virtual sal_Bool SAL_CALL gotoNextSentence(sal_Bool Expand) override
virtual css::uno::Reference< css::text::XText > SAL_CALL getText() override
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Sequence< css::uno::Any > &aValues) override
virtual sal_Bool SAL_CALL gotoEndOfWord(sal_Bool bExpand) override
virtual void SAL_CALL setString(const OUString &rString) override
virtual sal_Bool SAL_CALL gotoPreviousWord(sal_Bool bExpand) override
SwXTextCursor(SwDoc &rDoc, css::uno::Reference< css::text::XText > xParent, const CursorType eType, SwPosition const &rPos, SwPosition const *const pMark=nullptr)
virtual void SAL_CALL collapseToEnd() override
virtual sal_Bool SAL_CALL gotoStartOfWord(sal_Bool bExpand) override
virtual ~SwXTextCursor() override
virtual sal_Bool SAL_CALL isEndOfParagraph() override
SwUnoCursor & GetCursorOrThrow()
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &rPropertyName) override
virtual void SAL_CALL collapseToStart() override
virtual sal_Bool SAL_CALL gotoNextWord(sal_Bool bExpand) override
virtual sal_Bool SAL_CALL gotoPreviousSentence(sal_Bool Expand) override
virtual void SAL_CALL insertDocumentFromURL(const OUString &rURL, const css::uno::Sequence< css::beans::PropertyValue > &rOptions) override
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &rPropertyName) override
virtual sal_Bool SAL_CALL isStartOfSentence() override
virtual sal_Bool SAL_CALL goRight(sal_Int16 nCount, sal_Bool bExpand) override
virtual sal_Bool SAL_CALL gotoStartOfParagraph(sal_Bool Expand) override
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL createSortDescriptor() override
virtual void SAL_CALL setPropertiesToDefault(const css::uno::Sequence< OUString > &rPropertyNames) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames) override
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL setAllPropertiesToDefault() override
sw::UnoCursorPointer m_pUnoCursor
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &rPropertyName) override
virtual const SwPaM * GetPaM() const override
SwUnoCursor & GetCursor()
const SfxItemPropertySet & m_rPropSet
virtual sal_Bool SAL_CALL gotoEndOfParagraph(sal_Bool Expand) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createContentEnumeration(const OUString &rServiceName) override
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override
virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual const SwDoc * GetDoc() const override
virtual sal_Bool SAL_CALL gotoNextParagraph(sal_Bool Expand) override
virtual void SAL_CALL sort(const css::uno::Sequence< css::beans::PropertyValue > &xDescriptor) override
virtual sal_Bool SAL_CALL goLeft(sal_Int16 nCount, sal_Bool bExpand) override
virtual void SAL_CALL makeRedline(const OUString &rRedlineType, const css::uno::Sequence< css::beans::PropertyValue > &RedlineProperties) override
virtual sal_Bool SAL_CALL hasElements() override
virtual sal_Bool SAL_CALL isStartOfWord() override
virtual void SAL_CALL gotoStart(sal_Bool bExpand) override
virtual void SAL_CALL gotoEnd(sal_Bool bExpand) override
virtual css::uno::Type SAL_CALL getElementType() override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getStart() override
virtual void SAL_CALL removePropertyChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getEnd() override
virtual OUString SAL_CALL getString() override
virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
bool IsAtEndOfContentControl() const
virtual sal_Bool SAL_CALL gotoPreviousParagraph(sal_Bool Expand) override
virtual void SAL_CALL setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue) override
virtual void SAL_CALL setPropertyToDefault(const OUString &rPropertyName) override
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
virtual sal_Bool SAL_CALL isEndOfSentence() override
virtual sal_Bool SAL_CALL isEndOfWord() override
virtual sal_Bool SAL_CALL gotoEndOfSentence(sal_Bool Expand) override
void DeleteAndInsert(std::u16string_view aText, ::sw::DeleteAndInsertMode eMode)
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &rPropertyNames) override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
bool IsAtEndOfMeta() const
virtual void SAL_CALL gotoRange(const css::uno::Reference< css::text::XTextRange > &xRange, sal_Bool bExpand) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual sal_Bool SAL_CALL isCollapsed() override
const css::uno::Reference< css::text::XText > m_xParentText
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyDefaults(const css::uno::Sequence< OUString > &rPropertyNames) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL isStartOfParagraph() override
virtual void SAL_CALL addVetoableChangeListener(const OUString &rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &xListener) override
virtual sal_Bool SAL_CALL gotoStartOfSentence(sal_Bool Expand) override
virtual void SAL_CALL invalidateMarkings(::sal_Int32 nType) override
css::uno::Type const & get()
std::pair< const_iterator, bool > insert(Value &&x)
SwUnoCursor * get() const
void reset(std::shared_ptr< SwUnoCursor > pNew)
#define FN_UNO_RANGE_BEGIN
#define FN_UNO_NUM_START_VALUE
#define FN_UNO_PARA_NUM_AUTO_FORMAT
#define FN_UNO_PAGE_STYLE
#define FN_SKIP_HIDDEN_TEXT
#define FN_UNO_CHARFMT_SEQUENCE
#define FN_NUMBER_NEWSTART
#define FN_SKIP_PROTECTED_TEXT
#define FN_UNO_PARA_STYLE
ScXMLEditAttributeMap::Entry const aEntries[]
const EnumerationType m_eType
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
constexpr sal_uInt16 RES_CHRATR_END(46)
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
constexpr sal_uInt16 RES_UNKNOWNATR_END(160)
constexpr TypedWhichId< SvXMLAttrContainerItem > RES_UNKNOWNATR_CONTAINER(RES_UNKNOWNATR_BEGIN)
constexpr TypedWhichId< SwFormatAutoFormat > RES_TXTATR_AUTOFMT(50)
constexpr sal_uInt16 RES_FRMATR_END(141)
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(99)
constexpr sal_uInt16 RES_PARATR_END(82)
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
constexpr sal_uInt16 RES_PARATR_LIST_BEGIN(RES_PARATR_END)
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
constexpr sal_uInt16 RES_UNKNOWNATR_BEGIN(RES_BOXATR_END)
constexpr TypedWhichId< SwFormatAutoFormat > RES_AUTO_STYLE(133)
constexpr sal_uInt16 RES_PARATR_LIST_END(88)
constexpr TypedWhichId< SwFormatAutoFormat > RES_PARATR_LIST_AUTOFMT(87)
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(100)
constexpr TypedWhichId< SwFormatDrop > RES_PARATR_DROP(70)
constexpr TypedWhichId< SvXMLAttrContainerItem > RES_TXTATR_UNKNOWN_CONTAINER(54)
constexpr TypedWhichId< SwFormatRuby > RES_TXTATR_CJK_RUBY(53)
constexpr sal_uInt16 RES_TXTATR_END(RES_TXTATR_NOEND_END)
CollatorWrapper & GetAppCollator()
constexpr OUStringLiteral FILTER_TEXT_DLG
text filter with encoding dialog
Sequence< sal_Int8 > aSeq
#define SAL_WARN(area, stream)
void GetWriter(std::u16string_view rFltName, const OUString &rBaseURL, WriterRef &xRet)
Return writer based on the name.
void SetPropertyValue(SwPaM &rPaM, const SfxItemPropertySet &rPropSet, const OUString &rPropertyName, const css::uno::Any &rValue, const SetAttrMode nAttrMode=SetAttrMode::DEFAULT)
void SetPropertyValues(SwPaM &rPaM, const SfxItemPropertySet &rPropSet, const css::uno::Sequence< css::beans::PropertyValue > &rPropertyValues, const SetAttrMode nAttrMode=SetAttrMode::DEFAULT)
bool SetCursorPropertyValue(SfxItemPropertyMapEntry const &rEntry, css::uno::Any const &rValue, SwPaM &rPam, SfxItemSet &rItemSet)
SwFormatColl * GetCurTextFormatColl(SwPaM &rPam, const bool bConditional)
void SetCursorAttr(SwPaM &rPam, const SfxItemSet &rSet, const SetAttrMode nAttrMode, const bool bTableMode=false)
void setNumberingProperty(const Any &rValue, SwPaM &rPam)
css::beans::PropertyState GetPropertyState(SwPaM &rPaM, const SfxItemPropertySet &rPropSet, const OUString &rPropertyName)
void makeRedline(SwPaM const &rPaM, std::u16string_view rRedlineType, const uno::Sequence< beans::PropertyValue > &rRedlineProperties)
css::uno::Sequence< css::beans::PropertyValue > CreateSortDescriptor(const bool bFromTable)
void GetCursorAttr(SwPaM &rPam, SfxItemSet &rSet, const bool bOnlyTextAttr=false, const bool bGetFromChrFormat=true)
bool DocInsertStringSplitCR(SwDoc &rDoc, const SwPaM &rNewCursor, std::u16string_view rText, const bool bForceExpandHints)
void SetPropertyToDefault(SwPaM &rPaM, const SfxItemPropertySet &rPropSet, std::u16string_view rPropertyName)
void SetTextFormatColl(const css::uno::Any &rAny, SwPaM &rPaM)
bool IsStartOfPara(SwPaM &rUnoCursor)
css::uno::Any GetPropertyValue(SwPaM &rPaM, const SfxItemPropertySet &rPropSet, std::u16string_view rPropertyName)
bool getCursorPropertyValue(const SfxItemPropertyMapEntry &rEntry, SwPaM &rPam, Any *pAny, PropertyState &eState, const SwTextNode *pNode)
void GetTextFromPam(SwPaM &rPam, OUString &rBuffer, SwRootFrame const *pLayout=nullptr)
bool ConvertSortProperties(const css::uno::Sequence< css::beans::PropertyValue > &rDescriptor, SwSortOptions &rSortOpt)
bool IsEndOfPara(SwPaM &rUnoCursor)
void resetCursorPropertyValue(const SfxItemPropertyMapEntry &rEntry, SwPaM &rPam)
css::uno::Sequence< css::beans::PropertyState > GetPropertyStates(SwPaM &rPaM, const SfxItemPropertySet &rPropSet, const css::uno::Sequence< OUString > &rPropertyNames, const SwGetPropertyStatesCaller eCaller=SW_PROPERTY_STATE_CALLER_DEFAULT)
void SelectPam(SwPaM &rPam, const bool bExpand)
void InsertFile(SwUnoCursor *pUnoCursor, const OUString &rURL, const uno::Sequence< beans::PropertyValue > &rOptions)
css::uno::Any GetPropertyDefault(SwPaM const &rPaM, const SfxItemPropertySet &rPropSet, std::u16string_view rPropertyName)
bool SetPageDesc(const css::uno::Any &rValue, SwDoc &rDoc, SfxItemSet &rSet)
const LanguageTag & getLocale()
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
Any SAL_CALL getCaughtException()
detail::Optional< bool >::type tryAccess< bool >(css::uno::Any const &any)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
static constexpr auto Items
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
bool GoCurrPara(SwPaM &rPam, SwMoveFnCollection const &aPosPara)
bool GoPrevPara(SwPaM &rPam, SwMoveFnCollection const &aPosPara)
bool GoInDoc(SwPaM &rPam, SwMoveFnCollection const &fnMove)
bool GoNextPara(SwPaM &rPam, SwMoveFnCollection const &aPosPara)
bool GoCurrSection(SwPaM &rPam, SwMoveFnCollection const &fnMove)
SwMoveFnCollection const & fnParaStart
SwMoveFnCollection const & fnSectionEnd
SwMoveFnCollection const & fnParaEnd
SwMoveFnCollection const & fnMoveBackward
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
SwMoveFnCollection const & fnSectionStart
Marks a position in the document model.
void Adjust(SwNodeOffset nDelta)
Adjust node position, and resets content position to zero.
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.
SwNodeOffset GetNodeIndex() const
sal_Int32 GetContentIndex() const
std::vector< SwSortKey > aKeys
SwSortDirection eDirection
static rtl::Reference< SwXParaFrameEnumeration > Create(const SwPaM &rPaM, const enum ParaFrameMode eParaFrameMode, SwFrameFormat *const pFormat=nullptr)
static rtl::Reference< SwXParagraphEnumeration > Create(css::uno::Reference< css::text::XText > const &xParent, const std::shared_ptr< SwUnoCursor > &pCursor, const CursorType eType, SwTableBox const *const pTableBox=nullptr)
SAL_WARN_UNUSED_RESULT WhichRangesContainer MergeRange(sal_uInt16 nFrom, sal_uInt16 nTo) const
constexpr sal_uInt8 MAXLEVEL
SwGetPropertyStatesCaller
@ SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION_TOLERANT
@ SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION
@ SW_PROPERTY_STATE_CALLER_SINGLE_VALUE_ONLY
SwUnoPropertyMapProvider aSwMapProvider
#define PROPERTY_MAP_TEXT_CURSOR
#define PROPERTY_MAP_CHAR_AUTO_STYLE
#define MID_PAGEDESC_PAGEDESCNAME
#define MID_DROPCAP_CHAR_STYLE_NAME
#define MID_RUBY_CHARSTYLE
static void lcl_setCharStyle(SwDoc &rDoc, const uno::Any &rValue, SfxItemSet &rSet)
static void lcl_EnumerateIds(sal_uInt16 const *pIdRange, o3tl::sorted_vector< sal_uInt16 > &rWhichIds)
static sal_uInt16 g_ResetableSetRange[]
static void lcl_SelectParaAndReset(SwPaM &rPaM, SwDoc &rDoc, o3tl::sorted_vector< sal_uInt16 > const &rWhichIds)
static sal_uInt16 g_ParaResetableSetRange[]
static void lcl_SetNodeNumStart(SwPaM &rCursor, uno::Any const &rValue)
static bool propertyCausesSideEffectsInNodes(sal_uInt16 nWID)
static void lcl_setAutoStyle(IStyleAccess &rStyleAccess, const uno::Any &rValue, SfxItemSet &rSet, const bool bPara)
static bool lcl_ForceIntoMeta(SwPaM &rCursor, uno::Reference< text::XText > const &xParentText, const enum ForceIntoMetaMode eMode)
static void lcl_setDropcapCharStyle(SwPaM const &rPam, SfxItemSet &rItemSet, uno::Any const &rValue)
static bool lcl_setCharFormatSequence(SwPaM &rPam, uno::Any const &rValue)
static bool lcl_setListAutoStyle(SwPaM &rPam, const uno::Any &rValue, SfxItemSet &rItemSet)
Tries to map rValue to RES_PARATR_LIST_AUTOFMT on the current paragraph, returns true on success.
static void lcl_setRubyCharstyle(SfxItemSet &rItemSet, uno::Any const &rValue)
@ PARAFRAME_PORTION_TEXTRANGE
constexpr OUStringLiteral UNO_NAME_IS_SKIP_PROTECTED_TEXT
constexpr OUStringLiteral UNO_NAME_NO_FORMAT_ATTR
constexpr OUStringLiteral UNO_NAME_IS_SKIP_HIDDEN_TEXT
constexpr OUStringLiteral UNO_NAME_RESET_PARAGRAPH_LIST_ATTRIBUTES