20#include <com/sun/star/table/TableSortField.hpp>
26#include <osl/endian.h>
58#include <unoprnms.hxx>
62#include <com/sun/star/text/TextMarkupType.hpp>
69#include <com/sun/star/beans/PropertyAttribute.hpp>
70#include <com/sun/star/beans/NamedValue.hpp>
71#include <com/sun/star/i18n/WordType.hpp>
86 SwPaM(rDoc.GetNodes())
101 const SwPaM* pTmp = &rPaM;
110 while(&rPaM != (pTmp = pTmp->
GetNext()))
144 aStream.
SetEndian( SvStreamEndian::BIG );
146 aStream.
SetEndian( SvStreamEndian::LITTLE );
155 xWrt->m_bASCII_NoLastLineEnd =
true;
156 xWrt->m_bExportParagraphNumbering =
false;
159 xWrt->SetAsciiOptions( aOpt );
160 xWrt->m_bUCS2_WithStartChar =
false;
162 const bool bOldShowProgress = xWrt->m_bShowProgress;
163 xWrt->m_bShowProgress =
false;
164 xWrt->m_bHideDeleteRedlines = pLayout && pLayout->
IsHideRedlines();
181 rtl_uString *pStr = rtl_uString_alloc(lUniLen);
183 rBuffer = OUString(pStr, SAL_NO_ACQUIRE);
186 xWrt->m_bShowProgress = bOldShowProgress;
200 if (!(rValue >>= uStyle))
202 throw lang::IllegalArgumentException();
211 throw lang::IllegalArgumentException();
223 if (!(rValue >>= uStyle))
225 throw lang::IllegalArgumentException();
227 std::shared_ptr<SfxItemSet> pStyle = bPara ?
232 throw lang::IllegalArgumentException();
258 throw lang::IllegalArgumentException();
264 SwPaM *pTmpCursor = &rPaM;
267 pTmpCursor = pTmpCursor->
GetNext();
268 }
while ( pTmpCursor != &rPaM );
277 if (!(rValue >>= uDescName))
281 std::unique_ptr<SwFormatPageDesc> pNewDesc;
293 if (!pNewDesc->GetPageDesc() ||
294 (pNewDesc->GetPageDesc()->GetName() != sDescName))
297 if (!sDescName.isEmpty())
302 throw lang::IllegalArgumentException();
304 pNewDesc->RegisterToPageDesc(*pPageDesc);
325 sal_uInt16 nStt = (nTmp < 0 ? USHRT_MAX : o3tl::narrowing<sal_uInt16>(nTmp));
329 if( rCursor.
GetNext() != &rCursor )
334 for(
size_t n = 0;
n < aRangeArr.
Count(); ++
n )
352 uno::Sequence<OUString> aCharStyles;
353 if (!(rValue >>= aCharStyles))
358 for (sal_Int32 nStyle = 0; nStyle < aCharStyles.getLength(); nStyle++)
362 aStyle <<= aCharStyles.getConstArray()[nStyle];
381 if (!(rValue >>= uStyle))
383 throw lang::IllegalArgumentException();
395 throw lang::IllegalArgumentException();
397 std::unique_ptr<SwFormatDrop> pDrop;
407 pDrop->SetCharFormat(xStyle->GetCharFormat());
408 rItemSet.
Put(std::move(pDrop));
415 if (!(rValue >>= sTmp))
417 throw lang::IllegalArgumentException();
420 std::unique_ptr<SwFormatRuby> pRuby;
432 pRuby->SetCharFormatName(sStyle);
433 pRuby->SetCharFormatId(0);
434 if (!sStyle.isEmpty())
438 pRuby->SetCharFormatId(
nId);
440 rItemSet.
Put(std::move(pRuby));
448 if (!(rEntry.
nFlags & beans::PropertyAttribute::MAYBEVOID) &&
461 rValue, rItemSet,
false);
471 rValue, rItemSet,
true);
489 throw lang::IllegalArgumentException();
493 sal_Int16 nLevel = 0;
494 if (rValue >>= nLevel)
496 if (nLevel < 0 ||
MAXLEVEL <= nLevel)
498 throw lang::IllegalArgumentException(
499 "invalid NumberingLevel",
nullptr, 0);
508 if (rValue >>= sListId)
515 bool bIsNumber(
false);
516 if ((rValue >>= bIsNumber) && !bIsNumber)
523 std::shared_ptr<SfxItemSet> pAutoStyle;
524 if (uno::Sequence<beans::NamedValue> props; rValue >>=
props)
535 for (beans::NamedValue
const & prop : std::as_const(props))
538 rMap.getByName(prop.Name);
541 if (prop.Name ==
"CharStyleName")
546 throw beans::UnknownPropertyException(
547 "Unknown property: " + prop.Name);
549 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
551 throw beans::PropertyVetoException(
552 "Property is read-only: " + prop.Name);
554 rPropSet.setPropertyValue(*pEntry, prop.Value, items);
561 else if (OUString styleName; rValue >>= styleName)
570 item.SetStyleHandle(pAutoStyle);
580 if (!(rValue >>= bVal))
582 throw lang::IllegalArgumentException();
619 rValue, rPam.
GetDoc(), rItemSet);
636 static const sal_uLong nMaxLookup = 1000;
639 SwPaM *pTmpCursor = &rPaM;
654 SwTextNode const*
const pNd = rNds[
n ]->GetTextNode();
663 else if( pFormat != pNdFormat )
671 pTmpCursor = pTmpCursor->
GetNext();
672 }
while ( pTmpCursor != &rPaM );
673 return bError ? nullptr : pFormat;
693 uno::Reference< text::XText > xParent,
699 , m_xParentText(
std::move(xParent))
700 , m_pUnoCursor(rDoc.CreateUnoCursor(rPos))
713 , m_xParentText(
std::move(xParent))
714 , m_pUnoCursor(rSourceCursor.GetDoc().CreateUnoCursor(*rSourceCursor.GetPoint()))
737 SwDoc& rDoc = pUnoCursor->GetDoc();
739 const sal_Int32 nTextLen = aText.size();
741 auto pCurrent = pUnoCursor;
744 if (pCurrent->HasMark())
754 rDoc, *pCurrent, aText,
bool(
eMode & ::sw::DeleteAndInsertMode::ForceExpandHints)));
755 OSL_ENSURE( bSuccess,
"Doc->Insert(Str) failed." );
758 pCurrent->Left(aText.size());
760 pCurrent = pCurrent->GetNext();
761 }
while (pCurrent != pUnoCursor);
767enum ForceIntoMetaMode { META_CHECK_BOTH, META_INIT_START, META_INIT_END };
769enum ForceIntoContentControlMode
771 CONTENT_CONTROL_CHECK_BOTH,
772 CONTENT_CONTROL_INIT_START,
773 CONTENT_CONTROL_INIT_END
779 uno::Reference<text::XText>
const & xParentText,
780 const enum ForceIntoMetaMode eMode)
783 SwXMeta const *
const pXMeta(
dynamic_cast<SwXMeta*
>(xParentText.get()) );
784 OSL_ENSURE(pXMeta,
"no parent?");
786 throw uno::RuntimeException();
790 const bool bSuccess( pXMeta->
SetContentRange(pTextNode, nStart, nEnd) );
791 OSL_ENSURE(bSuccess,
"no pam?");
793 throw uno::RuntimeException();
799 case META_INIT_START:
805 case META_CHECK_BOTH:
823bool lcl_ForceIntoContentControl(
SwPaM& rCursor,
const uno::Reference<text::XText>& xParentText,
824 ForceIntoContentControlMode eMode)
828 if (!pXContentControl)
830 SAL_WARN(
"sw.core",
"lcl_ForceIntoContentControl: no parent text");
831 throw uno::RuntimeException();
837 bool bSuccess = pXContentControl->SetContentRange(pTextNode, nStart, nEnd);
840 SAL_WARN(
"sw.core",
"lcl_ForceIntoContentControl: SetContentRange() failed");
841 throw uno::RuntimeException();
849 case CONTENT_CONTROL_INIT_START:
853 case CONTENT_CONTROL_INIT_END:
857 case CONTENT_CONTROL_CHECK_BOTH:
858 if (*rCursor.
Start() < aStart)
860 *rCursor.
Start() = aStart;
864 if (*rCursor.
End() > aEnd)
866 *rCursor.
End() = aEnd;
883 OSL_ENSURE(pXMeta,
"no meta?");
884 if (pCursor && pXMeta)
891 OSL_ENSURE(bSuccess,
"no pam?");
895 if ( (*pCursor->GetPoint() ==
end)
896 || (*pCursor->GetMark() ==
end))
911 auto pXContentControl(
913 if (!pXContentControl)
915 SAL_WARN(
"sw.core",
"SwXTextCursor::IsAtEndOfContentControl: no content control");
917 if (pCursor && pXContentControl)
923 pXContentControl->SetContentRange(pTextNode, nStart, nEnd) );
926 SAL_WARN(
"sw.core",
"SwXTextCursor::IsAtEndOfContentControl: no pam");
931 if ( (*pCursor->GetPoint() ==
end)
932 || (*pCursor->GetMark() ==
end))
944 return "SwXTextCursor";
952uno::Sequence< OUString > SAL_CALL
956 "com.sun.star.text.TextCursor",
957 "com.sun.star.style.CharacterProperties",
958 "com.sun.star.style.CharacterPropertiesAsian",
959 "com.sun.star.style.CharacterPropertiesComplex",
960 "com.sun.star.style.ParagraphProperties",
961 "com.sun.star.style.ParagraphPropertiesAsian",
962 "com.sun.star.style.ParagraphPropertiesComplex",
963 "com.sun.star.text.TextSortable"
1005 if(pUnoCursor && pUnoCursor->GetMark())
1007 bRet = (*pUnoCursor->GetPoint() == *pUnoCursor->GetMark());
1029 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH)
1052 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH)
1087 rUnoCursor.
GetPoint(),
true,
false);
1106 lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_INIT_START);
1138 lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_INIT_END);
1144 const uno::Reference< text::XTextRange > & xRange,
sal_Bool bExpand)
1150 throw uno::RuntimeException();
1156 OTextCursorHelper* pCursor =
dynamic_cast<OTextCursorHelper*
>(xRange.get());
1158 if (!pRange && !pCursor)
1160 throw uno::RuntimeException();
1164 const SwPaM * pPam(
nullptr);
1167 pPam = pCursor->GetPaM();
1179 throw uno::RuntimeException();
1198 while ( pOwnStartNode !=
nullptr
1206 while ( pTmp !=
nullptr
1214 if (!pOwnStartNode || !pTmp)
1216 throw uno::RuntimeException();
1221 throw uno::RuntimeException();
1226 if ( pOwnStartNode != pTmp )
1228 throw uno::RuntimeException();
1240 throw uno::RuntimeException(
1241 "gotoRange: parameter range not contained in nesting"
1242 " text content for which this cursor was created",
1243 static_cast<text::XWordCursor*
>(
this));
1249 if (!lcl_ForceIntoContentControl(aPaM,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH))
1251 throw uno::RuntimeException(
"gotoRange: xRange is out of bounds of the content control",
1252 static_cast<text::XWordCursor*
>(
this));
1267 if (aOwnRight > rParamRight)
1268 *rOwnCursor.
GetPoint() = aOwnRight;
1270 *rOwnCursor.
GetPoint() = rParamRight;
1272 if (aOwnLeft < rParamLeft)
1273 *rOwnCursor.
GetMark() = aOwnLeft;
1275 *rOwnCursor.
GetMark() = rParamLeft;
1300 rUnoCursor.
IsStartWordWT( i18n::WordType::DICTIONARY_WORD );
1311 rUnoCursor.
IsEndWordWT( i18n::WordType::DICTIONARY_WORD );
1336 rUnoCursor.
Right(1);
1341 rUnoCursor.
GoNextWordWT( i18n::WordType::DICTIONARY_WORD );
1351 bRet = (&pPoint->
GetNode() != pOldNode) ||
1360 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH);
1387 rUnoCursor.
GoPrevWordWT( i18n::WordType::DICTIONARY_WORD );
1395 bRet = (&pPoint->
GetNode() != pOldNode) ||
1404 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH);
1422 const sal_Int16 nWordType = i18n::WordType::DICTIONARY_WORD;
1434 pPoint->
Assign(rOldNode, nOldIndex);
1443 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH);
1461 const sal_Int16 nWordType = i18n::WordType::DICTIONARY_WORD;
1473 pPoint->
Assign(rOldNode, nOldIndex);
1482 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH);
1500 if (!bRet && (!rUnoCursor.
HasMark() ||
1506 bRet = aOrigPos == *aCursor.
GetPoint();
1524 if (!bRet && (!rUnoCursor.
HasMark() ||
1530 bRet = aOrigPos == *aCursor.
GetPoint();
1553 if (!rUnoCursor.
IsStartWordWT(css::i18n::WordType::ANYWORD_IGNOREWHITESPACES))
1555 const bool bNextWord = rUnoCursor.
GoNextWordWT(i18n::WordType::ANYWORD_IGNOREWHITESPACES);
1556 if (bWasEOS && !bNextWord)
1569 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH)
1602 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH)
1630 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH)
1648 bool bRet = !bAlreadyParaEnd
1659 bRet = lcl_ForceIntoContentControl(rUnoCursor,
m_xParentText, CONTENT_CONTROL_CHECK_BOTH)
1708 OSL_ENSURE( bRet,
"gotoStartOfParagraph failed" );
1733 OSL_ENSURE( bRet,
"gotoEndOfParagraph failed" );
1769uno::Reference< text::XText > SAL_CALL
1777uno::Reference< text::XTextRange > SAL_CALL
1784 uno::Reference< text::XTextRange > xRet;
1786 const uno::Reference< text::XText > xParent =
getText();
1793 pXCursor->gotoStart(
false);
1794 xRet =
static_cast<text::XWordCursor*
>(pXCursor.get());
1803uno::Reference< text::XTextRange > SAL_CALL
1810 uno::Reference< text::XTextRange > xRet;
1812 const uno::Reference< text::XText > xParent =
getText();
1819 pXCursor->gotoEnd(
false);
1820 xRet =
static_cast<text::XWordCursor*
>(pXCursor.get());
1849 .CheckForOwnMemberMeta(*
GetPaM(),
true) );
1855 std::u16string_view rPropertyName)
1863 throw beans::UnknownPropertyException(
1864 OUString::Concat(
"Unknown property: ") + rPropertyName,
1868 beans::PropertyState eTemp;
1870 *pEntry, rPaM, &aAny, eTemp );
1889 const OUString& rPropertyName,
1911 const uno::Sequence< beans::PropertyValue > &rPropertyValues,
1928 OUString aUnknownExMsg, aPropertyVetoExMsg;
1932 std::vector<std::pair<const SfxItemPropertyMapEntry*, const uno::Any&>> aSideEffectsEntries;
1933 std::vector<std::pair<const SfxItemPropertyMapEntry*, const uno::Any&>>
aEntries;
1935 for (
const auto& rPropVal : aPropertyValues)
1937 const OUString &rPropertyName = rPropVal.Name;
1945 aUnknownExMsg +=
"Unknown property: '" + rPropertyName +
"' ";
1948 else if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
1950 aPropertyVetoExMsg +=
"Property is read-only: '" + rPropertyName +
"' ";
1955 aSideEffectsEntries.emplace_back(pEntry, rPropVal.Value);
1960 aEntries.emplace_back(pEntry, rPropVal.Value);
1965 for (
const auto& [pEntry, rValue] : aSideEffectsEntries)
1983 for (
const auto& [pEntry, rValue] : aEntries)
1993 if (!aUnknownExMsg.isEmpty())
1994 throw beans::UnknownPropertyException(aUnknownExMsg,
static_cast<cppu::OWeakObject *
>(
nullptr));
1995 if (!aPropertyVetoExMsg.isEmpty())
1996 throw beans::PropertyVetoException(aPropertyVetoExMsg,
static_cast<cppu::OWeakObject *
>(
nullptr));
2001 bool NotInRange(sal_uInt16 nWID, sal_uInt16 nStart, sal_uInt16 nEnd)
2003 return nWID < nStart || nWID > nEnd;
2007uno::Sequence< beans::PropertyState >
2010 const uno::Sequence< OUString >& rPropertyNames,
2013 const OUString* pNames = rPropertyNames.getConstArray();
2014 uno::Sequence< beans::PropertyState > aRet(rPropertyNames.getLength());
2015 beans::PropertyState* pStates = aRet.getArray();
2017 std::optional<SfxItemSet> oSet;
2018 std::optional<SfxItemSet> oSetParent;
2020 for (sal_Int32 i = 0, nEnd = rPropertyNames.getLength(); i < nEnd; i++)
2030 pStates[
i] = beans::PropertyState_DEFAULT_VALUE;
2037 pStates[
i] = beans::PropertyState::PropertyState_MAKE_FIXED_SIZE;
2042 throw beans::UnknownPropertyException(
2043 "Unknown property: " + pNames[i],
2052 pStates[
i] = beans::PropertyState_DEFAULT_VALUE;
2060 *pEntry, rPaM,
nullptr, pStates[i] );
2071 svl::Items<RES_CHRATR_BEGIN, RES_TXTATR_END> );
2089 pStates[
i] = ( oSet->Count() )
2091 : beans::PropertyState_DEFAULT_VALUE;
2094 if( beans::PropertyState_DIRECT_VALUE == pStates[i] )
2098 oSetParent.emplace(oSet->CloneAsValue(
false ));
2101 rPaM, *oSetParent,
true,
false );
2104 pStates[
i] = ( oSetParent->Count() )
2106 : beans::PropertyState_DEFAULT_VALUE;
2116 const OUString& rPropertyName)
2118 uno::Sequence< OUString > aStrings { rPropertyName };
2119 uno::Sequence< beans::PropertyState >
aSeq =
2138 *pTemp->GetPoint() = aEnd;
2149 std::u16string_view rPropertyName)
2156 throw beans::UnknownPropertyException(
2157 OUString::Concat(
"Unknown property: ") + rPropertyName,
2161 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
2163 throw uno::RuntimeException(
2164 OUString::Concat(
"setPropertyToDefault: property is read-only: ")
2165 + rPropertyName,
nullptr);
2188 std::u16string_view rPropertyName)
2194 throw beans::UnknownPropertyException(
2195 OUString::Concat(
"Unknown property: ") + rPropertyName,
2210uno::Reference< beans::XPropertySetInfo > SAL_CALL
2215 static uno::Reference< beans::XPropertySetInfo > xRef = [&]()
2223 const uno::Reference< beans::XPropertySetInfo > xInfo =
2226 const uno::Sequence<beans::Property> aPropSeq = xInfo->getProperties();
2236 const OUString& rPropertyName,
const uno::Any& rValue)
2245 if (!(rValue >>= bSet))
2247 throw lang::IllegalArgumentException();
2254 if (!(rValue >>= bSet))
2256 throw lang::IllegalArgumentException();
2263 if (!(rValue >>= bSet))
2265 throw lang::IllegalArgumentException();
2276 else if (rPropertyName ==
"ParaAutoStyleDef")
2283 uno::Sequence<beans::PropertyValue> def;
2284 if (!(rValue >>= def))
2285 throw lang::IllegalArgumentException();
2293 for (
auto& rPropVal : def)
2296 pPropSet->getPropertyMap().getByName(rPropVal.Name);
2303 if (!aRanges.
empty())
2362 const uno::Reference< beans::XPropertyChangeListener >& )
2364 OSL_FAIL(
"SwXTextCursor::addPropertyChangeListener(): not implemented");
2370 const uno::Reference< beans::XPropertyChangeListener >& )
2372 OSL_FAIL(
"SwXTextCursor::removePropertyChangeListener(): not implemented");
2378 const uno::Reference< beans::XVetoableChangeListener >& )
2380 OSL_FAIL(
"SwXTextCursor::addVetoableChangeListener(): not implemented");
2386 const uno::Reference< beans::XVetoableChangeListener >& )
2388 OSL_FAIL(
"SwXTextCursor::removeVetoableChangeListener(): not implemented");
2391beans::PropertyState SAL_CALL
2403uno::Sequence< beans::PropertyState > SAL_CALL
2405 const uno::Sequence< OUString >& rPropertyNames)
2419 uno::Sequence < OUString > aSequence ( &rPropertyName, 1 );
2427 const uno::Sequence < OUString > aSequence ( &rPropertyName, 1 );
2432 const uno::Sequence< OUString >& aPropertyNames,
2433 const uno::Sequence< uno::Any >& aValues )
2435 if( aValues.getLength() != aPropertyNames.getLength() )
2437 OSL_FAIL(
"mis-matched property value sequences" );
2438 throw lang::IllegalArgumentException();
2446 uno::Sequence< beans::PropertyValue >
aPropertyValues( aValues.getLength() );
2448 for ( sal_Int32
i = 0;
i < aPropertyNames.getLength();
i++ )
2454 OSL_FAIL(
"invalid property name for batch setting");
2455 throw lang::IllegalArgumentException();
2457 aPropertyValuesRange[
i ].Name = aPropertyNames[
i ];
2458 aPropertyValuesRange[
i ].Value = aValues[
i ];
2464 catch (
const css::beans::UnknownPropertyException& e)
2467 throw lang::WrappedTargetException(
2468 "wrapped Exception " + e.Message,
2469 uno::Reference<uno::XInterface>(),
a);
2473uno::Sequence< uno::Any > SAL_CALL
2477 uno::Sequence< uno::Any > aValues( aPropertyNames.getLength() );
2478 std::transform(aPropertyNames.begin(), aPropertyNames.end(), aValues.getArray(),
2479 [
this](
const OUString& rName) ->
uno::Any { return getPropertyValue( rName ); });
2484 const uno::Sequence< OUString >& ,
2485 const uno::Reference< css::beans::XPropertiesChangeListener >& )
2487 OSL_FAIL(
"SwXTextCursor::addPropertiesChangeListener(): not implemented");
2490 const uno::Reference< css::beans::XPropertiesChangeListener >& )
2492 OSL_FAIL(
"SwXTextCursor::removePropertiesChangeListener(): not implemented");
2496 const uno::Sequence< OUString >& ,
2497 const uno::Reference< css::beans::XPropertiesChangeListener >& )
2499 OSL_FAIL(
"SwXTextCursor::firePropertiesChangeEvent(): not implemented");
2526 const sal_uInt16 nStart = *pIdRange++;
2527 const sal_uInt16 nEnd = *pIdRange++;
2528 for (sal_uInt16
nId = nStart + 1;
nId <= nEnd; ++
nId)
2546 if (!aParaWhichIds.
empty())
2551 if (!aWhichIds.
empty())
2559 const uno::Sequence< OUString >& rPropertyNames)
2565 if ( !rPropertyNames.hasElements() )
2571 for (
const OUString& rName : rPropertyNames)
2582 throw beans::UnknownPropertyException(
2583 "Unknown property: " + rName,
2586 if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
2588 throw uno::RuntimeException(
2589 "setPropertiesToDefault: property is read-only: " + rName,
2610 if (!aParaWhichIds.
empty())
2614 if (!aWhichIds.
empty())
2616 rDoc.
ResetAttrs(rUnoCursor,
true, aWhichIds);
2620uno::Sequence< uno::Any > SAL_CALL
2622 const uno::Sequence< OUString >& rPropertyNames)
2628 const sal_Int32
nCount = rPropertyNames.getLength();
2629 uno::Sequence< uno::Any > aRet(
nCount);
2633 const OUString *pNames = rPropertyNames.getConstArray();
2647 throw beans::UnknownPropertyException(
2648 "Unknown property: " + pNames[
i],
2672 if (txtNode ==
nullptr)
return;
2674 if ( text::TextMarkupType::SPELLCHECK ==
nType )
2679 else if( text::TextMarkupType::PROOFREADING ==
nType )
2684 else if ( text::TextMarkupType::SMARTTAG ==
nType )
2693 if (fmtColl ==
nullptr)
return;
2701 const OUString& rRedlineType,
2702 const uno::Sequence< beans::PropertyValue >& rRedlineProperties)
2712 const uno::Sequence< beans::PropertyValue >& rOptions)
2721uno::Sequence< beans::PropertyValue >
2724 uno::Sequence< beans::PropertyValue > aRet(5);
2725 beans::PropertyValue* pArray = aRet.getArray();
2728 aVal <<= bFromTable;
2729 pArray[0] = beans::PropertyValue(
"IsSortInTable", -1, aVal,
2730 beans::PropertyState_DIRECT_VALUE);
2733 pArray[1] = beans::PropertyValue(
"Delimiter", -1, aVal,
2734 beans::PropertyState_DIRECT_VALUE);
2737 pArray[2] = beans::PropertyValue(
"IsSortColumns", -1, aVal,
2738 beans::PropertyState_DIRECT_VALUE);
2740 aVal <<= sal_Int32(3);
2741 pArray[3] = beans::PropertyValue(
"MaxSortFieldsCount", -1, aVal,
2742 beans::PropertyState_DIRECT_VALUE);
2746 uno::Sequence< OUString >
aSeq(
2748 const bool bHasElements =
aSeq.hasElements();
2749 OSL_ENSURE( bHasElements,
"list of collator algorithms is empty!");
2753 aCollAlg =
aSeq.getConstArray()[0];
2756 uno::Sequence< table::TableSortField > aFields
2759 { 1,
true,
false, table::TableSortFieldType_ALPHANUMERIC, aLang, aCollAlg },
2760 { 1,
true,
false, table::TableSortFieldType_ALPHANUMERIC, aLang, aCollAlg },
2761 { 1,
true,
false, table::TableSortFieldType_ALPHANUMERIC, aLang, aCollAlg }
2765 pArray[4] = beans::PropertyValue(
"SortFields", -1, aVal,
2766 beans::PropertyState_DIRECT_VALUE);
2771uno::Sequence< beans::PropertyValue > SAL_CALL
2780 const uno::Sequence< beans::PropertyValue >& rDescriptor,
2786 rSortOpt.
cDeli =
' ';
2803 SwSortKey* aKeys[3] = {&aKey1, &aKey2, &aKey3};
2805 bool bOldSortdescriptor(
false);
2806 bool bNewSortdescriptor(
false);
2808 for (
const beans::PropertyValue& rProperty : rDescriptor)
2810 uno::Any aValue( rProperty.Value );
2811 const OUString& rPropName = rProperty.Name;
2814 if ( rPropName ==
"IsSortInTable" )
2825 else if ( rPropName ==
"Delimiter" )
2829 if (aValue >>= uChar)
2831 rSortOpt.
cDeli = uChar;
2833 else if (aValue >>= nChar)
2837 rSortOpt.
cDeli = nChar;
2845 else if ( rPropName ==
"SortColumns" )
2847 bOldSortdescriptor =
true;
2849 if (aValue >>= bTemp)
2858 else if ( rPropName ==
"IsCaseSensitive" )
2860 bOldSortdescriptor =
true;
2862 if (aValue >>= bTemp)
2871 else if ( rPropName ==
"CollatorLocale" )
2873 bOldSortdescriptor =
true;
2874 lang::Locale aLocale;
2875 if (aValue >>= aLocale)
2884 else if (rPropName.startsWith(
"CollatorAlgorithm") &&
2885 rPropName.getLength() == 18 &&
2886 (rPropName[17] >=
'0' && rPropName[17] <=
'9'))
2888 bOldSortdescriptor =
true;
2889 sal_uInt16
nIndex = rPropName[17];
2892 if ((aValue >>= aText) && nIndex < 3)
2901 else if (rPropName.startsWith(
"SortRowOrColumnNo") &&
2902 rPropName.getLength() == 18 &&
2903 (rPropName[17] >=
'0' && rPropName[17] <=
'9'))
2905 bOldSortdescriptor =
true;
2906 sal_uInt16
nIndex = rPropName[17];
2908 sal_Int16 nCol = -1;
2923 else if (rPropName.startsWith(
"IsSortNumeric") &&
2924 rPropName.getLength() == 14 &&
2925 (rPropName[13] >=
'0' && rPropName[13] <=
'9'))
2927 bOldSortdescriptor =
true;
2928 sal_uInt16
nIndex = rPropName[13];
2931 if (bTemp && nIndex < 3)
2940 else if (rPropName.startsWith(
"IsSortAscending") &&
2941 rPropName.getLength() == 16 &&
2942 (rPropName[15] >=
'0' && rPropName[15] <=
'9'))
2944 bOldSortdescriptor =
true;
2945 sal_uInt16
nIndex = rPropName[15];
2948 if (bTemp && nIndex < 3)
2959 else if ( rPropName ==
"IsSortColumns" )
2961 bNewSortdescriptor =
true;
2971 else if ( rPropName ==
"SortFields" )
2973 bNewSortdescriptor =
true;
2974 uno::Sequence < table::TableSortField > aFields;
2975 if (aValue >>= aFields)
2977 sal_Int32
nCount(aFields.getLength());
2980 table::TableSortField* pFields = aFields.getArray();
2981 for (sal_Int32 i = 0;
i <
nCount; ++
i)
2986 aKeys[
i]->
sSortType = pFields[
i].CollatorAlgorithm;
2988 o3tl::narrowing<sal_uInt16>(pFields[i].Field);
2990 table::TableSortFieldType_NUMERIC);
3007 if (bNewSortdescriptor && bOldSortdescriptor)
3009 OSL_FAIL(
"someone tried to set the old deprecated and "
3010 "the new sortdescriptor");
3016 rSortOpt.
aKeys.push_back(aKey1);
3020 rSortOpt.
aKeys.push_back(aKey2);
3024 rSortOpt.
aKeys.push_back(aKey3);
3027 return bRet && !rSortOpt.
aKeys.empty();
3043 throw uno::RuntimeException(
"Bad sort properties");
3060 sal_Int32 nLen = pCNd->
Len();
3074uno::Reference< container::XEnumeration > SAL_CALL
3078 if (rServiceName !=
"com.sun.star.text.TextContent")
3079 throw uno::RuntimeException();
3084uno::Reference< container::XEnumeration > SAL_CALL
3092 OSL_ENSURE(pParentText,
"parent is not a SwXText");
3095 throw uno::RuntimeException();
3101 pNewCursor->SetMark();
3102 *pNewCursor->GetMark() = *rUnoCursor.
GetMark();
3120uno::Sequence< OUString > SAL_CALL
3123 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)
void SetRanges(const WhichRangesContainer &)
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
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
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 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()
WhichRangesContainer const aTextNodeSetRange(svl::Items< RES_CHRATR_BEGIN, RES_CHRATR_END-1, RES_PARATR_BEGIN, RES_PARATR_END-1, RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1, RES_FRMATR_BEGIN, RES_FRMATR_END-1, RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1, XATTR_FILL_FIRST, XATTR_FILL_LAST >)
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)
bool empty() const noexcept
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_PARA_AUTO_STYLE
#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 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
std::shared_ptr< SfxItemSet > PropValuesToAutoStyleItemSet(SwDoc &rDoc, IStyleAccess::SwAutoStyleFamily eFamily, const uno::Sequence< beans::PropertyValue > &Values, SwAttrSet &aSet)