64#include <com/sun/star/text/XTextDocument.hpp>
65#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
83 if (rSource.
GetNext() == &rSource)
95 while (pPam != &rSource);
102struct FrameClientSortListLess
112 void lcl_CollectFrameAtNodeWithLayout(
const SwContentFrame* pCFrame,
119 for(
const auto pAnchoredObj : *pObjs)
129 rFrames.emplace_back(nIdx, nOrder, std::make_unique<sw::FrameClient>(&rFormat));
138 const bool bAtCharAnchoredObjs )
147 const auto nChkType = bAtCharAnchoredObjs ? RndStdIds::FLY_AT_CHAR : RndStdIds::FLY_AT_PARA;
154 lcl_CollectFrameAtNodeWithLayout(pCFrame, rFrames, nChkType);
159 const size_t nSize = rFormats.
size();
160 for (
size_t i = 0;
i < nSize;
i++)
164 const SwNode* pAnchorNode;
167 *pAnchorNode == rNd )
173 sal_uInt32 nOrder = rAnchor.
GetOrder();
175 rFrames.emplace_back(
nIndex, nOrder, std::make_unique<sw::FrameClient>(
const_cast<SwFrameFormat*
>(pFormat)));
178 std::sort(rFrames.begin(), rFrames.end(), FrameClientSortListLess());
254 const SetAttrMode nAttrMode,
const bool bTableMode)
266 if (rCurrent.HasMark() &&
268 (*rCurrent.GetPoint() != *rCurrent.GetMark()) ))
295 SfxItemSet & rSet,
const bool bOnlyTextAttr,
const bool bGetFromChrFormat)
297 static const sal_uLong nMaxLookup = 1000;
302 SwPosition const & rStart( *rCurrent.Start() );
323 const sal_Int32 nStart = (
n == nSttNd)
325 const sal_Int32 nEnd = (
n == nEndNd)
362 uno::Reference< text::XText >
const m_xParentText;
368 SwTable const*
const m_pOwnTable;
370 sal_Int32 m_nFirstParaStart;
371 sal_Int32 m_nLastParaEnd;
372 bool m_bFirstParagraph;
373 uno::Reference< text::XTextContent > m_xNextPara;
376 SwXParagraphEnumerationImpl(
377 uno::Reference< text::XText > xParent,
378 const std::shared_ptr<SwUnoCursor>& pCursor,
381 : m_xParentText(
std::move( xParent ))
382 , m_eCursorType(
eType )
385 , m_pOwnStartNode( pStartNode )
388 , m_pOwnTable( pTable )
389 , m_nEndIndex( pCursor->
End()->GetNodeIndex() )
390 , m_nFirstParaStart( -1 )
391 , m_nLastParaEnd( -1 )
392 , m_bFirstParagraph( true )
395 OSL_ENSURE(m_xParentText.is(),
"SwXParagraphEnumeration: no parent?");
398 || (m_pOwnTable && m_pOwnStartNode));
411 virtual ~SwXParagraphEnumerationImpl()
override
412 { m_pCursor.
reset(
nullptr); }
413 virtual void SAL_CALL release() noexcept
override
416 OWeakObject::release();
421 {
return "SwXParagraphEnumeration"; }
425 {
return {
"com.sun.star.text.ParagraphEnumeration"}; };
428 virtual sal_Bool SAL_CALL hasMoreElements()
override;
429 virtual css::uno::Any SAL_CALL nextElement()
override;
432 {
return *m_pCursor; }
436 uno::Reference< text::XTextContent > NextElement_Impl();
442 bool IgnoreLastElement(
SwUnoCursor& rCursor,
bool bMovedFromTable);
448 uno::Reference< text::XText >
const& xParent,
449 const std::shared_ptr<SwUnoCursor>& pCursor,
454 SwTable const* pTable(
nullptr);
467 pCursor->GetPoint()->GetNode().FindTableNode());
468 pStartNode = pTableNode;
475 return new SwXParagraphEnumerationImpl(xParent, pCursor,
eType, pStartNode, pTable);
479SwXParagraphEnumerationImpl::hasMoreElements()
482 return m_bFirstParagraph || m_xNextPara.is();
494 pTmp !=
nullptr && &pTmp->
GetTable() != pOwnTable;
495 pTmp = pTmp->StartOfSectionNode()->FindTableNode() )
510 if (pUnoCursor && pOwnStartNode)
519bool SwXParagraphEnumerationImpl::IgnoreLastElement(
SwUnoCursor& rCursor,
bool bMovedFromTable)
530 if (!bMovedFromTable)
533 return m_nLastParaEnd == 0;
536uno::Reference< text::XTextContent >
537SwXParagraphEnumerationImpl::NextElement_Impl()
542 if (!m_bFirstParagraph &&
551 aNewCursor->SetRemainInSection(
false );
557 bool bMovedFromTable =
false;
562 bMovedFromTable =
true;
568 if (m_nEndIndex < aNewCursor->
Start()->GetNodeIndex())
573 if (IgnoreLastElement(*aNewCursor, bMovedFromTable))
579 bool bInTable =
false;
580 if (!m_bFirstParagraph)
586 if (pTableNode && (&pTableNode->
GetTable() != m_pOwnTable))
598 uno::Reference< text::XTextContent > xRef;
602 (m_bFirstParagraph || bInTable ||
615 const sal_Int32 nFirstContent =
616 m_bFirstParagraph ? m_nFirstParaStart : -1;
617 const sal_Int32 nLastContent =
618 (m_nEndIndex == pStart->
GetNodeIndex()) ? m_nLastParaEnd : -1;
624 pTableNode && (&pTableNode->
GetTable() != m_pOwnTable))
632 text::XText *
const pText = m_xParentText.get();
635 static_cast<SwXText*
>(pText), nFirstContent, nLastContent);
642uno::Any SAL_CALL SwXParagraphEnumerationImpl::nextElement()
645 if (m_bFirstParagraph)
647 m_xNextPara = NextElement_Impl();
648 m_bFirstParagraph =
false;
650 const uno::Reference< text::XTextContent > xRef = m_xNextPara;
653 throw container::NoSuchElementException();
655 m_xNextPara = NextElement_Impl();
675 uno::Reference<text::XText> xParent =
nullptr)
726 if(rHint.
GetId() == SfxHintId::Dying)
735 const uno::Reference< text::XText > & xParent,
748 SwPaM aPam( *pTableNode );
755 new
SwXTextRange::
Impl(*rSectionFormat.GetDoc(), RANGE_IS_SECTION, &rSectionFormat) )
806 throw uno::RuntimeException(
"not possible for table");
821 throw uno::RuntimeException(
"disposed?");
888 m_pImpl->m_rDoc.getIDocumentContentOperations().DeleteAndJoin(aCursor,
895 m_pImpl->m_rDoc, aCursor, aText,
bool(
eMode & ::sw::DeleteAndInsertMode::ForceExpandHints));
898 aCursor.
Left(aText.size());
907 return "SwXTextRange";
915uno::Sequence< OUString > SAL_CALL
919 "com.sun.star.text.TextRange",
920 "com.sun.star.style.CharacterProperties",
921 "com.sun.star.style.CharacterPropertiesAsian",
922 "com.sun.star.style.CharacterPropertiesComplex",
923 "com.sun.star.style.ParagraphProperties",
924 "com.sun.star.style.ParagraphPropertiesAsian",
925 "com.sun.star.style.ParagraphPropertiesComplex"
929uno::Reference< text::XText > SAL_CALL
934 if (!
m_pImpl->m_xParentText.is() &&
m_pImpl->m_pTableOrSectionFormat)
936 std::optional<SwPosition> oPosition;
941 oPosition.emplace(*pTableNode);
947 oPosition.emplace(pSectFormat->GetContent().GetContentIdx()->GetNode());
952 OSL_ENSURE(
m_pImpl->m_xParentText.is(),
"SwXTextRange::getText: no text");
956uno::Reference< text::XTextRange > SAL_CALL
961 uno::Reference< text::XTextRange > xRet;
963 if (!
m_pImpl->m_xParentText.is())
978 &&
m_pImpl->m_pTableOrSectionFormat)
981 SwPaM aPaM(*pSectFormat->GetContent().GetContentIdx());
988 throw uno::RuntimeException(
"disposed?");
993uno::Reference< text::XTextRange > SAL_CALL
998 uno::Reference< text::XTextRange > xRet;
1000 if (!
m_pImpl->m_xParentText.is())
1015 &&
m_pImpl->m_pTableOrSectionFormat)
1018 SwPaM aPaM(*pSectFormat->GetContent().GetContentIdx()->GetNode().EndOfSectionNode());
1020 assert(*pSectFormat->GetContent().GetContentIdx() < aPaM.
GetPoint()->
GetNode());
1025 throw uno::RuntimeException(
"disposed?");
1055 &&
eMode == ::sw::TextRangeMode::AllowNonTextNode)
1059 SwNodeIndex const*
const pSectionNode(pSectFormat->GetContent().GetContentIdx());
1060 assert(pSectionNode);
1091 const uno::Reference<text::XTextRange> & xTextRange,
1097 OTextCursorHelper* pCursor =
dynamic_cast<OTextCursorHelper*
>(xTextRange.get());
1107 uno::Reference< text::XTextCursor > xTextCursor;
1114 xTextCursor->gotoEnd(
true);
1115 pCursor =
dynamic_cast<OTextCursorHelper*
>(xTextCursor.get());
1116 assert(pCursor &&
"cant must succeed");
1117 pCursor->GetPaM()->Normalize();
1123 xTextCursor->gotoEnd(
true);
1124 pCursor =
dynamic_cast<OTextCursorHelper*
>(xTextCursor.get());
1125 assert(pCursor &&
"cant must succeed");
1139 SwDoc*
const pDoc = pCursor ? pCursor->GetDoc()
1141 const SwPaM*
const pUnoCursor = pCursor ? pCursor->GetPaM()
1142 : (pPortion ? &pPortion->
GetCursor() :
nullptr);
1143 if (pUnoCursor && pDoc == &rToFill.
GetDoc())
1146 "what to do about rings?");
1177 if (pHeadFootFormat)
1186 if (pCurSttNode && (pCurSttNode == pSttNode))
1188 rpFormat = pHeadFootFormat;
1202 const uno::Reference<text::XText> xParentText(
1207 pNewCursor->SetMark();
1208 *pNewCursor->GetMark() = *pMark;
1210 const bool isCell(
dynamic_cast<SwXCell*
>(xParentText.get()) );
1217uno::Reference< text::XText >
1220 uno::Reference< text::XText > xParentText;
1238 :
new SwXCell( pTableFormat, *pSttNode );
1244 if (
nullptr != pFormat)
1255 for(
size_t i = 0;
i < nPDescCount;
i++)
1279 if (pHeadFootFormat)
1282 *pHeadFootFormat, bHeader);
1290 for (
size_t n = 0;
n < nFootnoteCnt; ++
n )
1309 const uno::Reference<frame::XModel>
xModel =
1311 const uno::Reference< text::XTextDocument > xDoc(
1313 xParentText = xDoc->getText();
1316 OSL_ENSURE(xParentText.is(),
"no parent text?");
1322uno::Reference< container::XEnumeration > SAL_CALL
1327 if ( rServiceName !=
"com.sun.star.text.TextContent" )
1329 throw uno::RuntimeException(
"unsupported service");
1334 throw uno::RuntimeException(
"range has no mark (table?)");
1337 const auto pNewCursor(
m_pImpl->m_rDoc.CreateUnoCursor(aPos));
1340 throw uno::RuntimeException(
"range has no positions");
1346uno::Reference< container::XEnumeration > SAL_CALL
1353 throw uno::RuntimeException(
"range has no mark (table?)");
1356 auto pNewCursor(
m_pImpl->m_rDoc.CreateUnoCursor(aPos));
1359 throw uno::RuntimeException(
"range has no positions");
1361 if (!
m_pImpl->m_xParentText.is())
1381uno::Sequence< OUString > SAL_CALL
1384 uno::Sequence<OUString> aRet {
"com.sun.star.text.TextContent" };
1388uno::Reference< beans::XPropertySetInfo > SAL_CALL
1393 static uno::Reference< beans::XPropertySetInfo > xRef =
1394 m_pImpl->m_rPropSet.getPropertySetInfo();
1400 const OUString& rPropertyName,
const uno::Any& rValue)
1406 throw uno::RuntimeException(
"range has no mark (table?)");
1411 rPropertyName, rValue);
1421 throw uno::RuntimeException(
"range has no mark (table?)");
1432 const uno::Reference< beans::XPropertyChangeListener >& )
1434 OSL_FAIL(
"SwXTextRange::addPropertyChangeListener(): not implemented");
1440 const uno::Reference< beans::XPropertyChangeListener >& )
1442 OSL_FAIL(
"SwXTextRange::removePropertyChangeListener(): not implemented");
1448 const uno::Reference< beans::XVetoableChangeListener >& )
1450 OSL_FAIL(
"SwXTextRange::addVetoableChangeListener(): not implemented");
1456 const uno::Reference< beans::XVetoableChangeListener >& )
1458 OSL_FAIL(
"SwXTextRange::removeVetoableChangeListener(): not implemented");
1461beans::PropertyState SAL_CALL
1468 throw uno::RuntimeException(
"range has no mark (table?)");
1476uno::Sequence< beans::PropertyState > SAL_CALL
1483 throw uno::RuntimeException(
"range has no mark (table?)");
1497 throw uno::RuntimeException(
"range has no mark (table?)");
1512 throw uno::RuntimeException(
"range has no mark (table?)");
1522 const OUString& rRedlineType,
1523 const uno::Sequence< beans::PropertyValue >& rRedlineProperties )
1529 throw uno::RuntimeException(
"range has no mark (table?)");
1543 {
return "SwXTextRanges"; };
1547 {
return {
"com.sun.star.text.TextRanges" }; };
1550 virtual css::uno::Type SAL_CALL getElementType()
override
1552 virtual sal_Bool SAL_CALL hasElements()
override
1553 {
return getCount() > 0; };
1555 virtual sal_Int32 SAL_CALL getCount()
override;
1556 virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex)
override;
1558 explicit SwXTextRangesImpl(
SwPaM *
const pPaM)
1567 virtual void SAL_CALL release() noexcept
override
1570 OWeakObject::release();
1573 {
return &(*m_pUnoCursor); };
1575 std::vector< rtl::Reference<SwXTextRange> > m_Ranges;
1581void SwXTextRangesImpl::MakeRanges()
1586 for(
SwPaM& rTmpCursor : GetCursor()->GetRingContainer())
1590 rTmpCursor.GetDoc(),
1591 *rTmpCursor.GetPoint(), rTmpCursor.GetMark()));
1594 m_Ranges.push_back(xRange);
1600 {
return new SwXTextRangesImpl(pPaM); }
1608sal_Int32 SAL_CALL SwXTextRangesImpl::getCount()
1611 return static_cast<sal_Int32
>(m_Ranges.size());
1614uno::Any SAL_CALL SwXTextRangesImpl::getByIndex(sal_Int32 nIndex)
1618 throw lang::IndexOutOfBoundsException();
1619 uno::Any ret(uno::Reference<text::XTextRange>(m_Ranges.at(nIndex)));
1633 if (!aString.empty())
1636 rDoc, rCursor, aString,
false ) );
1637 OSL_ENSURE( bSuccess,
"DocInsertStringSplitCR" );
1639 rCursor.
Left(aString.size());
1650 {
return "SwXParaFrameEnumeration"; };
1654 {
return {
"com.sun.star.util.ContentEnumeration"}; };
1657 virtual sal_Bool SAL_CALL hasMoreElements()
override;
1658 virtual css::uno::Any SAL_CALL nextElement()
override;
1661 virtual void SAL_CALL release() noexcept
override
1664 OWeakObject::release();
1667 {
return *m_pUnoCursor; }
1668 void PurgeFrameClients()
1673 m_xNextObject =
nullptr;
1678 const auto iter = std::remove_if(m_vFrames.begin(), m_vFrames.end(),
1679 [] (std::unique_ptr<sw::FrameClient>& rEntry) ->
bool { return !rEntry->GetRegisteredIn(); });
1680 m_vFrames.erase(iter, m_vFrames.end());
1684 bool CreateNextObject();
1685 uno::Reference< text::XTextContent > m_xNextObject;
1686 std::deque< std::unique_ptr<sw::FrameClient> > m_vFrames;
1693 {
return new SwXParaFrameEnumerationImpl(rPaM, eParaFrameMode, pFormat); }
1695SwXParaFrameEnumerationImpl::SwXParaFrameEnumerationImpl(
1698 : m_pUnoCursor(rPaM.GetDoc().CreateUnoCursor(*rPaM.GetPoint()))
1702 GetCursor().SetMark();
1703 *GetCursor().GetMark() = *rPaM.
GetMark();
1709 std::transform(vFrames.begin(), vFrames.end(),
1710 std::back_inserter(m_vFrames),
1715 m_vFrames.push_back(std::make_unique<sw::FrameClient>(pFormat));
1725 const auto pFrameFormat =
const_cast<SwFrameFormat*
>(&rFlyFrame.GetFormat());
1726 m_vFrames.push_back(std::make_unique<sw::FrameClient>(pFrameFormat));
1735void SwXParaFrameEnumerationImpl::FillFrame()
1737 if(!m_pUnoCursor->GetPointNode().IsTextNode())
1740 const auto pTextAttr = m_pUnoCursor->GetPointNode().GetTextNode()->GetTextAttrForCharAt(
1746 m_vFrames.push_back(std::make_unique<sw::FrameClient>(pFrameFormat));
1749bool SwXParaFrameEnumerationImpl::CreateNextObject()
1751 if (m_vFrames.empty())
1755 m_vFrames.front()->GetRegisteredIn());
1756 m_vFrames.pop_front();
1765 m_xNextObject.set(
pObject->getUnoShape(), uno::UNO_QUERY);
1770 OSL_ENSURE(pIdx,
"where is the index?");
1777 *pFormat->
GetDoc(), pFormat).get());
1782 *pFormat->
GetDoc(), pFormat));
1788 *pFormat->
GetDoc(), pFormat));
1791 return m_xNextObject.is();
1795SwXParaFrameEnumerationImpl::hasMoreElements()
1798 PurgeFrameClients();
1799 return m_xNextObject.is() || CreateNextObject();
1802uno::Any SAL_CALL SwXParaFrameEnumerationImpl::nextElement()
1805 PurgeFrameClients();
1806 if (!m_xNextObject.is() && !m_vFrames.empty())
1808 if (!m_xNextObject.is())
1809 throw container::NoSuchElementException();
1811 aRet <<= m_xNextObject;
1812 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
css::uno::Reference< css::frame::XModel3 > GetBaseModel() 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 SwFrameFormats * 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 EndAllAction(bool bVirDev=false)
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)
bool SelectPaM(SwPaM &rPaM)
make rPaM select the paragraph
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)
SwUnoCursor & GetCursor() const
static rtl::Reference< SwXTextTable > CreateXTextTable(SwFrameFormat *pFrameFormat)
virtual css::uno::Reference< css::text::XTextCursor > CreateCursor()
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(96)
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(156)
constexpr TypedWhichId< SwFormatFooter > RES_FOOTER(97)
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(159)
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