65#include <com/sun/star/text/XTextDocument.hpp>
66#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
84 if (rSource.
GetNext() == &rSource)
96 while (pPam != &rSource);
103struct FrameClientSortListLess
113 void lcl_CollectFrameAtNodeWithLayout(
const SwContentFrame* pCFrame,
120 for(
const auto pAnchoredObj : *pObjs)
130 rFrames.emplace_back(nIdx, nOrder, std::make_unique<sw::FrameClient>(&rFormat));
139 const bool bAtCharAnchoredObjs )
148 const auto nChkType = bAtCharAnchoredObjs ? RndStdIds::FLY_AT_CHAR : RndStdIds::FLY_AT_PARA;
155 lcl_CollectFrameAtNodeWithLayout(pCFrame, rFrames, nChkType);
162 const SwNode* pAnchorNode;
165 *pAnchorNode == rNd )
171 sal_uInt32 nOrder = rAnchor.
GetOrder();
173 rFrames.emplace_back(
nIndex, nOrder, std::make_unique<sw::FrameClient>(pSpz));
176 std::sort(rFrames.begin(), rFrames.end(), FrameClientSortListLess());
252 const SetAttrMode nAttrMode,
const bool bTableMode)
264 if (rCurrent.HasMark() &&
266 (*rCurrent.GetPoint() != *rCurrent.GetMark()) ))
293 SfxItemSet & rSet,
const bool bOnlyTextAttr,
const bool bGetFromChrFormat)
295 static const sal_uLong nMaxLookup = 1000;
300 SwPosition const & rStart( *rCurrent.Start() );
321 const sal_Int32 nStart = (
n == nSttNd)
323 const sal_Int32 nEnd = (
n == nEndNd)
360 uno::Reference< text::XText >
const m_xParentText;
366 SwTable const*
const m_pOwnTable;
368 sal_Int32 m_nFirstParaStart;
369 sal_Int32 m_nLastParaEnd;
370 bool m_bFirstParagraph;
371 uno::Reference< text::XTextContent > m_xNextPara;
374 SwXParagraphEnumerationImpl(
375 uno::Reference< text::XText > xParent,
376 const std::shared_ptr<SwUnoCursor>& pCursor,
379 : m_xParentText(
std::move( xParent ))
380 , m_eCursorType(
eType )
383 , m_pOwnStartNode( pStartNode )
386 , m_pOwnTable( pTable )
387 , m_nEndIndex( pCursor->
End()->GetNodeIndex() )
388 , m_nFirstParaStart( -1 )
389 , m_nLastParaEnd( -1 )
390 , m_bFirstParagraph( true )
393 OSL_ENSURE(m_xParentText.is(),
"SwXParagraphEnumeration: no parent?");
396 || (m_pOwnTable && m_pOwnStartNode));
409 virtual ~SwXParagraphEnumerationImpl()
override
410 { m_pCursor.
reset(
nullptr); }
411 virtual void SAL_CALL release() noexcept
override
414 OWeakObject::release();
419 {
return "SwXParagraphEnumeration"; }
423 {
return {
"com.sun.star.text.ParagraphEnumeration"}; };
426 virtual sal_Bool SAL_CALL hasMoreElements()
override;
427 virtual css::uno::Any SAL_CALL nextElement()
override;
430 {
return *m_pCursor; }
434 uno::Reference< text::XTextContent > NextElement_Impl();
440 bool IgnoreLastElement(
SwUnoCursor& rCursor,
bool bMovedFromTable);
446 uno::Reference< text::XText >
const& xParent,
447 const std::shared_ptr<SwUnoCursor>& pCursor,
452 SwTable const* pTable(
nullptr);
465 pCursor->GetPoint()->GetNode().FindTableNode());
466 pStartNode = pTableNode;
473 return new SwXParagraphEnumerationImpl(xParent, pCursor,
eType, pStartNode, pTable);
477SwXParagraphEnumerationImpl::hasMoreElements()
480 return m_bFirstParagraph || m_xNextPara.is();
492 pTmp !=
nullptr && &pTmp->
GetTable() != pOwnTable;
493 pTmp = pTmp->StartOfSectionNode()->FindTableNode() )
508 if (pUnoCursor && pOwnStartNode)
517bool SwXParagraphEnumerationImpl::IgnoreLastElement(
SwUnoCursor& rCursor,
bool bMovedFromTable)
528 if (!bMovedFromTable)
531 return m_nLastParaEnd == 0;
534uno::Reference< text::XTextContent >
535SwXParagraphEnumerationImpl::NextElement_Impl()
540 if (!m_bFirstParagraph &&
549 aNewCursor->SetRemainInSection(
false );
555 bool bMovedFromTable =
false;
560 bMovedFromTable =
true;
566 if (m_nEndIndex < aNewCursor->
Start()->GetNodeIndex())
571 if (IgnoreLastElement(*aNewCursor, bMovedFromTable))
577 bool bInTable =
false;
578 if (!m_bFirstParagraph)
584 if (pTableNode && (&pTableNode->
GetTable() != m_pOwnTable))
596 uno::Reference< text::XTextContent > xRef;
600 (m_bFirstParagraph || bInTable ||
613 const sal_Int32 nFirstContent =
614 m_bFirstParagraph ? m_nFirstParaStart : -1;
615 const sal_Int32 nLastContent =
616 (m_nEndIndex == pStart->
GetNodeIndex()) ? m_nLastParaEnd : -1;
622 pTableNode && (&pTableNode->
GetTable() != m_pOwnTable))
630 text::XText *
const pText = m_xParentText.get();
633 static_cast<SwXText*
>(pText), nFirstContent, nLastContent);
640uno::Any SAL_CALL SwXParagraphEnumerationImpl::nextElement()
643 if (m_bFirstParagraph)
645 m_xNextPara = NextElement_Impl();
646 m_bFirstParagraph =
false;
648 const uno::Reference< text::XTextContent > xRef = m_xNextPara;
651 throw container::NoSuchElementException();
653 m_xNextPara = NextElement_Impl();
673 uno::Reference<text::XText> xParent =
nullptr)
724 if(rHint.
GetId() == SfxHintId::Dying)
733 const uno::Reference< text::XText > & xParent,
746 SwPaM aPam( *pTableNode );
753 new
SwXTextRange::
Impl(*rSectionFormat.GetDoc(), RANGE_IS_SECTION, &rSectionFormat) )
804 throw uno::RuntimeException(
"not possible for table");
819 throw uno::RuntimeException(
"disposed?");
886 m_pImpl->m_rDoc.getIDocumentContentOperations().DeleteAndJoin(aCursor,
893 m_pImpl->m_rDoc, aCursor, aText,
bool(
eMode & ::sw::DeleteAndInsertMode::ForceExpandHints));
896 aCursor.
Left(aText.size());
905 return "SwXTextRange";
913uno::Sequence< OUString > SAL_CALL
917 "com.sun.star.text.TextRange",
918 "com.sun.star.style.CharacterProperties",
919 "com.sun.star.style.CharacterPropertiesAsian",
920 "com.sun.star.style.CharacterPropertiesComplex",
921 "com.sun.star.style.ParagraphProperties",
922 "com.sun.star.style.ParagraphPropertiesAsian",
923 "com.sun.star.style.ParagraphPropertiesComplex"
927uno::Reference< text::XText > SAL_CALL
932 if (!
m_pImpl->m_xParentText.is() &&
m_pImpl->m_pTableOrSectionFormat)
934 std::optional<SwPosition> oPosition;
939 oPosition.emplace(*pTableNode);
945 oPosition.emplace(pSectFormat->GetContent().GetContentIdx()->GetNode());
950 OSL_ENSURE(
m_pImpl->m_xParentText.is(),
"SwXTextRange::getText: no text");
954uno::Reference< text::XTextRange > SAL_CALL
959 uno::Reference< text::XTextRange > xRet;
961 if (!
m_pImpl->m_xParentText.is())
976 &&
m_pImpl->m_pTableOrSectionFormat)
979 SwPaM aPaM(*pSectFormat->GetContent().GetContentIdx());
986 throw uno::RuntimeException(
"disposed?");
991uno::Reference< text::XTextRange > SAL_CALL
996 uno::Reference< text::XTextRange > xRet;
998 if (!
m_pImpl->m_xParentText.is())
1013 &&
m_pImpl->m_pTableOrSectionFormat)
1016 SwPaM aPaM(*pSectFormat->GetContent().GetContentIdx()->GetNode().EndOfSectionNode());
1018 assert(*pSectFormat->GetContent().GetContentIdx() < aPaM.
GetPoint()->
GetNode());
1023 throw uno::RuntimeException(
"disposed?");
1056 if (
eMode == ::sw::TextRangeMode::AllowNonTextNode)
1058 SwNodeIndex const*
const pSectionNode(pSectFormat->GetContent().GetContentIdx());
1059 assert(pSectionNode);
1070 SwPaM aPaM(*pSectFormat->GetContent().GetContentIdx());
1074 *aPaM.
GetPoint() =
SwPosition(*pSectFormat->GetContent().GetContentIdx()->GetNode().EndOfSectionNode());
1076 assert(*pSectFormat->GetContent().GetContentIdx() < aPaM.
GetPoint()->
GetNode());
1109 const uno::Reference<text::XTextRange> & xTextRange,
1121 OTextCursorHelper* pCursor;
1128 xTextCursor->gotoEnd(
true);
1129 pCursor = xTextCursor.get();
1130 pCursor->GetPaM()->Normalize();
1132 else if (
SwXText* pText =
dynamic_cast<SwXText*
>(xTextRange.get()))
1134 xTextCursor = pText->createXTextCursor();
1135 xTextCursor->gotoEnd(
true);
1136 pCursor = xTextCursor.get();
1140 pCursor =
dynamic_cast<OTextCursorHelper*
>(xTextRange.get());
1150 bRet = pPara->SelectPaM(rToFill);
1154 SwDoc* pDoc =
nullptr;
1155 const SwPaM* pUnoCursor =
nullptr;
1158 pDoc = pCursor->GetDoc();
1159 pUnoCursor = pCursor->GetPaM();
1163 pDoc = &pPortion->GetCursor().GetDoc();
1164 pUnoCursor = &pPortion->GetCursor();
1166 if (pUnoCursor && pDoc == &rToFill.
GetDoc())
1169 "what to do about rings?");
1199 if (pHeadFootFormat)
1208 if (pCurSttNode && (pCurSttNode == pSttNode))
1210 rpFormat = pHeadFootFormat;
1224 const uno::Reference<text::XText> xParentText(
1229 pNewCursor->SetMark();
1230 *pNewCursor->GetMark() = *pMark;
1232 const bool isCell(
dynamic_cast<SwXCell*
>(xParentText.get()) );
1239uno::Reference< text::XText >
1242 uno::Reference< text::XText > xParentText;
1260 :
new SwXCell( pTableFormat, *pSttNode );
1266 if (
nullptr != pFormat)
1277 for(
size_t i = 0;
i < nPDescCount;
i++)
1301 if (pHeadFootFormat)
1304 *pHeadFootFormat, bHeader);
1312 for (
size_t n = 0;
n < nFootnoteCnt; ++
n )
1333 const uno::Reference<frame::XModel>
xModel = pDocSh->GetBaseModel();
1334 const uno::Reference< text::XTextDocument > xDoc(
1336 xParentText = xDoc->getText();
1340 OSL_ENSURE(xParentText.is(),
"no parent text?");
1346uno::Reference< container::XEnumeration > SAL_CALL
1351 if ( rServiceName !=
"com.sun.star.text.TextContent" )
1353 throw uno::RuntimeException(
"unsupported service");
1358 throw uno::RuntimeException(
"range has no mark (table?)");
1361 const auto pNewCursor(
m_pImpl->m_rDoc.CreateUnoCursor(aPos));
1364 throw uno::RuntimeException(
"range has no positions");
1370uno::Reference< container::XEnumeration > SAL_CALL
1377 throw uno::RuntimeException(
"range has no mark (table?)");
1380 auto pNewCursor(
m_pImpl->m_rDoc.CreateUnoCursor(aPos));
1383 throw uno::RuntimeException(
"range has no positions");
1385 if (!
m_pImpl->m_xParentText.is())
1405uno::Sequence< OUString > SAL_CALL
1408 uno::Sequence<OUString> aRet {
"com.sun.star.text.TextContent" };
1412uno::Reference< beans::XPropertySetInfo > SAL_CALL
1417 static uno::Reference< beans::XPropertySetInfo > xRef =
1418 m_pImpl->m_rPropSet.getPropertySetInfo();
1424 const OUString& rPropertyName,
const uno::Any& rValue)
1430 throw uno::RuntimeException(
"range has no mark (table?)");
1435 rPropertyName, rValue);
1445 throw uno::RuntimeException(
"range has no mark (table?)");
1456 const uno::Reference< beans::XPropertyChangeListener >& )
1458 OSL_FAIL(
"SwXTextRange::addPropertyChangeListener(): not implemented");
1464 const uno::Reference< beans::XPropertyChangeListener >& )
1466 OSL_FAIL(
"SwXTextRange::removePropertyChangeListener(): not implemented");
1472 const uno::Reference< beans::XVetoableChangeListener >& )
1474 OSL_FAIL(
"SwXTextRange::addVetoableChangeListener(): not implemented");
1480 const uno::Reference< beans::XVetoableChangeListener >& )
1482 OSL_FAIL(
"SwXTextRange::removeVetoableChangeListener(): not implemented");
1485beans::PropertyState SAL_CALL
1492 throw uno::RuntimeException(
"range has no mark (table?)");
1500uno::Sequence< beans::PropertyState > SAL_CALL
1507 throw uno::RuntimeException(
"range has no mark (table?)");
1521 throw uno::RuntimeException(
"range has no mark (table?)");
1536 throw uno::RuntimeException(
"range has no mark (table?)");
1546 const OUString& rRedlineType,
1547 const uno::Sequence< beans::PropertyValue >& rRedlineProperties )
1553 throw uno::RuntimeException(
"range has no mark (table?)");
1567 {
return "SwXTextRanges"; };
1571 {
return {
"com.sun.star.text.TextRanges" }; };
1574 virtual css::uno::Type SAL_CALL getElementType()
override
1576 virtual sal_Bool SAL_CALL hasElements()
override
1577 {
return getCount() > 0; };
1579 virtual sal_Int32 SAL_CALL getCount()
override;
1580 virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex)
override;
1582 explicit SwXTextRangesImpl(
SwPaM *
const pPaM)
1591 virtual void SAL_CALL release() noexcept
override
1594 OWeakObject::release();
1597 {
return &(*m_pUnoCursor); };
1599 std::vector< rtl::Reference<SwXTextRange> > m_Ranges;
1605void SwXTextRangesImpl::MakeRanges()
1610 for(
SwPaM& rTmpCursor : GetCursor()->GetRingContainer())
1614 rTmpCursor.GetDoc(),
1615 *rTmpCursor.GetPoint(), rTmpCursor.GetMark()));
1618 m_Ranges.push_back(xRange);
1624 {
return new SwXTextRangesImpl(pPaM); }
1632sal_Int32 SAL_CALL SwXTextRangesImpl::getCount()
1635 return static_cast<sal_Int32
>(m_Ranges.size());
1638uno::Any SAL_CALL SwXTextRangesImpl::getByIndex(sal_Int32 nIndex)
1642 throw lang::IndexOutOfBoundsException();
1643 uno::Any ret(uno::Reference<text::XTextRange>(m_Ranges.at(nIndex)));
1657 if (!aString.empty())
1660 rDoc, rCursor, aString,
false ) );
1661 OSL_ENSURE( bSuccess,
"DocInsertStringSplitCR" );
1663 rCursor.
Left(aString.size());
1674 {
return "SwXParaFrameEnumeration"; };
1678 {
return {
"com.sun.star.util.ContentEnumeration"}; };
1681 virtual sal_Bool SAL_CALL hasMoreElements()
override;
1682 virtual css::uno::Any SAL_CALL nextElement()
override;
1685 virtual void SAL_CALL release() noexcept
override
1688 OWeakObject::release();
1691 {
return *m_pUnoCursor; }
1692 void PurgeFrameClients()
1697 m_xNextObject =
nullptr;
1702 const auto iter = std::remove_if(m_vFrames.begin(), m_vFrames.end(),
1703 [] (std::unique_ptr<sw::FrameClient>& rEntry) ->
bool { return !rEntry->GetRegisteredIn(); });
1704 m_vFrames.erase(iter, m_vFrames.end());
1708 bool CreateNextObject();
1709 uno::Reference< text::XTextContent > m_xNextObject;
1710 std::deque< std::unique_ptr<sw::FrameClient> > m_vFrames;
1717 {
return new SwXParaFrameEnumerationImpl(rPaM, eParaFrameMode, pFormat); }
1719SwXParaFrameEnumerationImpl::SwXParaFrameEnumerationImpl(
1722 : m_pUnoCursor(rPaM.GetDoc().CreateUnoCursor(*rPaM.GetPoint()))
1726 GetCursor().SetMark();
1727 *GetCursor().GetMark() = *rPaM.
GetMark();
1733 std::transform(vFrames.begin(), vFrames.end(),
1734 std::back_inserter(m_vFrames),
1739 m_vFrames.push_back(std::make_unique<sw::FrameClient>(pFormat));
1749 const auto pFrameFormat =
const_cast<SwFrameFormat*
>(&rFlyFrame.GetFormat());
1750 m_vFrames.push_back(std::make_unique<sw::FrameClient>(pFrameFormat));
1759void SwXParaFrameEnumerationImpl::FillFrame()
1761 if(!m_pUnoCursor->GetPointNode().IsTextNode())
1764 const auto pTextAttr = m_pUnoCursor->GetPointNode().GetTextNode()->GetTextAttrForCharAt(
1770 m_vFrames.push_back(std::make_unique<sw::FrameClient>(pFrameFormat));
1773bool SwXParaFrameEnumerationImpl::CreateNextObject()
1775 if (m_vFrames.empty())
1779 m_vFrames.front()->GetRegisteredIn());
1780 m_vFrames.pop_front();
1789 m_xNextObject.set(
pObject->getUnoShape(), uno::UNO_QUERY);
1794 OSL_ENSURE(pIdx,
"where is the index?");
1801 *pFormat->
GetDoc(), pFormat).get());
1806 *pFormat->
GetDoc(), pFormat));
1812 *pFormat->
GetDoc(), pFormat));
1815 return m_xNextObject.is();
1819SwXParaFrameEnumerationImpl::hasMoreElements()
1822 PurgeFrameClients();
1823 return m_xNextObject.is() || CreateNextObject();
1826uno::Any SAL_CALL SwXParaFrameEnumerationImpl::nextElement()
1829 PurgeFrameClients();
1830 if (!m_xNextObject.is() && !m_vFrames.empty())
1832 if (!m_xNextObject.is())
1833 throw container::NoSuchElementException();
1835 aRet <<= m_xNextObject;
1836 m_xNextObject =
nullptr;
@ ArtificialSelection
keyboard delete, artificial selection, avoid deleting flys
virtual bool DeleteAndJoin(SwPaM &, SwDeleteFlags flags=SwDeleteFlags::Default)=0
complete delete of a given PaM
virtual void InsertItemSet(const SwPaM &rRg, const SfxItemSet &, const SetAttrMode nFlags=SetAttrMode::DEFAULT, SwRootFrame const *pLayout=nullptr)=0
virtual const SwRootFrame * GetCurrentLayout() const =0
virtual const SwViewShell * GetCurrentViewShell() const =0
Returns the layout set at the document.
Provides access to the marks of a document.
virtual ::sw::mark::IMark * makeMark(const SwPaM &rPaM, const OUString &rProposedName, MarkType eMark, ::sw::mark::InsertMode eMode, SwPosition const *pSepPos=nullptr)=0
Generates a new mark in the document for a certain selection.
virtual std::unique_ptr< ILazyDeleter > deleteMark(const IDocumentMarkAccess::const_iterator_t &ppMark, bool isMoveNodes)=0
Deletes a mark.
void MergeValues(const SfxItemSet &rSet)
const WhichRangesContainer & GetRanges() const
SfxItemPool * GetPool() const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
void InvalidateAllItems()
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
bool StartListening(SvtBroadcaster &rBroadcaster)
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
bool Left(sal_uInt16 nCnt)
bool MovePara(SwWhichPara, SwMoveFnCollection const &)
size_t GetPageDescCnt() const
IDocumentContentOperations const & getIDocumentContentOperations() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
SwFootnoteIdxs & GetFootnoteIdxs()
IDocumentMarkAccess * getIDocumentMarkAccess()
SwPosFlyFrames GetAllFlyFormats(const SwPaM *, bool bDrawAlso, bool bAsCharAlso=false) const
Returns positions of all FlyFrames in the document.
std::shared_ptr< SwUnoCursor > CreateUnoCursor(const SwPosition &rPos, bool bTableCursor=false)
bool DeleteRowCol(const SwSelBoxes &rBoxes, RowColMode eMode=RowColMode::DeleteRow)
const sw::FrameFormats< sw::SpzFrameFormat * > * GetSpzFrameFormats() const
SwDocShell * GetDocShell()
const SwPageDesc & GetPageDesc(const size_t i) const
Ends a section of nodes in the document model.
Content, content of frame (header, footer, fly).
const SwNodeIndex * GetContentIdx() const
const SwSortedObjs * GetDrawObjs() const
Marks a node in the document model.
const SwNodes & GetNodes() const
SwNodeOffset GetIndex() const
Base class of the Writer document model elements.
SwFrameFormat * GetFlyFormat() const
If node is in a fly return the respective format.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeOffset GetIndex() const
bool IsNoTextNode() const
SwTableBox * GetTableBox() const
If node is in a table return the respective table box.
bool IsSectionNode() const
SwTableNode * FindTableNode()
Search table node, in which it is.
SwStartNode * FindSttNodeByType(SwStartNodeType eTyp)
const SwStartNode * StartOfSectionNode() const
SwNodeOffset EndOfSectionIndex() const
SwContentNode * GetContentNode()
SwTableNode * GetTableNode()
SwNodeType GetNodeType() const
const SwEndNode * EndOfSectionNode() const
bool IsDocNodes() const
Is the NodesArray the regular one of Doc? (and not the UndoNds, ...) Implementation in doc....
void UpdateOutlineNode(SwNode &rNd)
Update all Nodes - Rule/Format-Change.
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.
void Normalize(bool bPointFirst=true)
Normalizes PaM, i.e.
bool IsMultiSelection() const
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
const SwPosition * End() const
const SwPosition * GetPoint() const
const SwPosition * Start() const
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
SwFrameFormat & GetMaster()
SwFrameFormat & GetFirstLeft()
SwFrameFormat & GetFirstMaster()
SwFrameFormat & GetLeft()
For querying current flys in document.
The root element of a Writer document layout.
void StartAllAction()
Set up Start-/EndAction for all Shells on an as high as possible (Shell section) level.
void UnoRestoreAllActions()
void UnoRemoveAllActions()
Certain UNO Actions (e.g.
A section node represents the start of a section on the UI, i.e.
Starts a section of nodes in the document model.
SwStartNodeType GetStartNodeType() const
SwTableBox is one table cell in the document model.
const SwStartNode * GetSttNd() const
const SwTable & GetTable() const
SwTable is one table in the document model, containing rows (which contain cells).
SwTableNode * GetTableNode() const
SwTableFormat * GetFrameFormat()
static SwTable * FindTable(SwFrameFormat const *const pFormat)
SwTableSortBoxes & GetTabSortBoxes()
const SwFormatFootnote & GetFootnote() const
static bool isTextBox(const SwFrameFormat *pFormat, sal_uInt16 nType, const SdrObject *pObject=nullptr)
Is the frame format a text box?
SwTextNode is a paragraph in the document model.
bool GetParaAttr(SfxItemSet &rSet, sal_Int32 nStt, sal_Int32 nEnd, const bool bOnlyTextAttr=false, const bool bGetFromChrFormat=true, const bool bMergeIndentValuesOfNumRule=false, SwRootFrame const *pLayout=nullptr) const
Query the attributes of textnode over the range.
const OUString & GetText() const
void SetRemainInSection(bool bFlag)
static rtl::Reference< SwXCell > CreateXCell(SwFrameFormat *pTableFormat, SwTableBox *pBox, SwTable *pTable=nullptr)
static rtl::Reference< SwXParagraph > CreateXParagraph(SwDoc &rDoc, SwTextNode *pTextNode, css::uno::Reference< css::text::XText > const &xParentText=nullptr, const sal_Int32 nSelStart=-1, const sal_Int32 nSelEnd=- 1)
static rtl::Reference< SwXTextEmbeddedObject > CreateXTextEmbeddedObject(SwDoc &rDoc, SwFrameFormat *pFrameFormat)
static SW_DLLPUBLIC rtl::Reference< SwXTextFrame > CreateXTextFrame(SwDoc &rDoc, SwFrameFormat *pFrameFormat)
static rtl::Reference< SwXTextGraphicObject > CreateXTextGraphicObject(SwDoc &rDoc, SwFrameFormat *pFrameFormat)
static rtl::Reference< SwXTextTable > CreateXTextTable(SwFrameFormat *pFrameFormat)
UnoActionContext(SwDoc *const pDoc)
~UnoActionContext() COVERITY_NOEXCEPT_FALSE
~UnoActionRemoveContext() COVERITY_NOEXCEPT_FALSE
UnoActionRemoveContext(SwDoc *const pDoc)
css::uno::Type const & get()
std::pair< const_iterator, bool > insert(Value &&x)
void MoveTo(value_type *pDestRing)
Removes this item from its current ring container and adds it to another ring container.
ring_container GetRingContainer()
void reset(std::shared_ptr< SwUnoCursor > pNew)
virtual const SwPosition & GetOtherMarkPos() const =0
virtual bool IsExpanded() const =0
virtual const SwPosition & GetMarkEnd() const =0
virtual const SwPosition & GetMarkStart() const =0
virtual const SwPosition & GetMarkPos() const =0
EmbeddedObjectRef * pObject
constexpr TypedWhichId< SwFormatHeader > RES_HEADER(102)
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(162)
constexpr TypedWhichId< SwFormatFooter > RES_FOOTER(103)
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(165)
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(58)
constexpr TypedWhichId< SfxUInt16Item > RES_PARATR_OUTLINELEVEL(79)
void SetPropertyValue(SwPaM &rPaM, const SfxItemPropertySet &rPropSet, const OUString &rPropertyName, const css::uno::Any &rValue, const SetAttrMode nAttrMode=SetAttrMode::DEFAULT)
void SetCursorAttr(SwPaM &rPam, const SfxItemSet &rSet, const SetAttrMode nAttrMode, const bool bTableMode=false)
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)
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 SetString(SwCursor &rCursor, std::u16string_view aString)
css::uno::Any GetPropertyValue(SwPaM &rPaM, const SfxItemPropertySet &rPropSet, std::u16string_view rPropertyName)
void GetTextFromPam(SwPaM &rPam, OUString &rBuffer, SwRootFrame const *pLayout=nullptr)
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)
css::uno::Any GetPropertyDefault(SwPaM const &rPaM, const SfxItemPropertySet &rPropSet, std::u16string_view rPropertyName)
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
Dialog to specify the properties of date form field.
uno::Reference< text::XText > CreateParentXText(SwDoc &rDoc, const SwPosition &rPos)
bool XTextRangeToSwPaM(SwUnoInternalPaM &rToFill, const uno::Reference< text::XTextRange > &xTextRange, ::sw::TextRangeMode const eMode)
void DeepCopyPaM(SwPaM const &rSource, SwPaM &rTarget)
static bool lcl_IsStartNodeInFormat(const bool bHeader, SwStartNode const *const pSttNode, SwFrameFormat const *const pFrameFormat, SwFrameFormat *&rpFormat)
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
bool GoInNode(SwPaM &rPam, SwMoveFnCollection const &fnMove)
bool GoNextPara(SwPaM &rPam, SwMoveFnCollection const &aPosPara)
bool GoInContent(SwPaM &rPam, SwMoveFnCollection const &fnMove)
SwMoveFnCollection const & fnParaStart
SwMoveFnCollection const & fnMoveBackward
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
Marks a position in the document model.
void Assign(const SwNode &rNd, SwNodeOffset nDelta, sal_Int32 nContentOffset=0)
These all set both nNode and nContent.
void AssignEndIndex(const SwContentNode &rNd)
Set nNode to rNd, and nContent to the end of rNd.
const SwContentNode * GetContentNode() const
SwNodeOffset GetNodeIndex() const
sal_Int32 GetContentIndex() const
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)
Reference< XModel > xModel
SwUnoPropertyMapProvider aSwMapProvider
#define PROPERTY_MAP_TEXT_CURSOR
static SwDoc * lcl_IsNewStyleTable(SwUnoTableCursor const &rCursor)
static bool lcl_CursorIsInSection(SwUnoCursor const *const pUnoCursor, SwStartNode const *const pOwnStartNode)
static SwTableNode * lcl_FindTopLevelTable(SwTableNode *const pTableNode, SwTable const *const pOwnTable)
! compare to SwShellTableCursor::FillRects() in viscrs.cxx
static void lcl_RemoveImpl(SwDoc *const pDoc)
void CollectFrameAtNode(const SwNode &rNd, FrameClientSortList_t &rFrames, const bool bAtCharAnchoredObjs)
static void DeleteTable(SwDoc &rDoc, SwTable &rTable)
std::deque< FrameClientSortListEntry > FrameClientSortList_t
@ PARAFRAME_PORTION_TEXTRANGE
@ PARAFRAME_PORTION_PARAGRAPH