38#include <osl/diagnose.h>
85 if (!pTextNd || !pTextNd->
GetText().isEmpty() ||
101 ((RndStdIds::FLY_AT_PARA == pAnchor->
GetAnchorId()) ||
102 (RndStdIds::FLY_AT_CHAR == pAnchor->
GetAnchorId())) &&
103 aSttIdx <= *pAnchorNode && *pAnchorNode <= aEndNdIdx.
GetNode() )
131 if ((RndStdIds::FLY_AT_PARA == aAnchor.
GetAnchorId()) ||
132 (RndStdIds::FLY_AT_CHAR == aAnchor.
GetAnchorId()) ||
133 (RndStdIds::FLY_AT_FLY == aAnchor.
GetAnchorId()) ||
137 if ( RndStdIds::FLY_AS_CHAR == aAnchor.
GetAnchorId() )
148 if( rSpzFrameFormats[ 0 ] != pFlyFormat )
154 assert( !
inserted &&
"Fly not contained in Spz-Array" );
157 if ( RndStdIds::FLY_AS_CHAR == aAnchor.
GetAnchorId() )
201 if ((RndStdIds::FLY_AT_PARA == aAnchor.
GetAnchorId()) ||
202 (RndStdIds::FLY_AT_CHAR == aAnchor.
GetAnchorId()) ||
203 (RndStdIds::FLY_AT_FLY == aAnchor.
GetAnchorId()) ||
240 Point& rNewPos,
bool bCheckFlyRecur )
244 std::pair<Point, bool>
const tmp(rInsPt,
false);
248 if( pTmpFly && bCheckFlyRecur && pFly->
IsUpperOf( *pTmpFly ) )
252 else if ( RndStdIds::FLY_AT_FLY == rAnchor.
GetAnchorId() )
263 rAnchor.
SetType( RndStdIds::FLY_AT_PAGE );
275 const Point& rInsPt,
bool bIsMove,
bool bSelectInsert )
285 else if( bSelectInsert )
294 Size aSiz( rInsPt.
X() - rSttPt.
X(), rInsPt.
Y() - rSttPt.
Y() );
295 for(
size_t i = 0;
i < nMarkCount; ++
i )
303 bool bInsWithFormat =
true;
309 if( pSrcDrwView->IsGroupEntered() ||
310 (RndStdIds::FLY_AS_CHAR != rAnchor.
GetAnchorId()) )
314 GetDoc() == pDestDoc, false );
315 xNew->NbcMove( aSiz );
317 bInsWithFormat =
false;
326 if ((RndStdIds::FLY_AT_PARA == aAnchor.
GetAnchorId()) ||
327 (RndStdIds::FLY_AT_CHAR == aAnchor.
GetAnchorId()) ||
328 (RndStdIds::FLY_AT_FLY == aAnchor.
GetAnchorId()) ||
331 if (
this == &rDestShell )
341 if( (pNd = &aPos.
GetNode())->IsNoTextNode() )
345 rDestShell, aAnchor, aNewAnch,
false );
359 else if ( RndStdIds::FLY_AT_PAGE == aAnchor.
GetAnchorId() )
370 if( pSrcDrwView->IsGroupEntered() ||
388 if ( RndStdIds::FLY_AS_CHAR != aAnchor.
GetAnchorId() )
390 Point aPos( rInsPt );
400 pDrawFormat->PosAttrSet();
408 pDestDrwView->
MarkObj( pNew, pDestPgView );
414 if ( bIsMove && bRet )
416 if( &rDestShell ==
this )
418 const SdrMarkList aList( pSrcDrwView->GetMarkedObjectList() );
419 pSrcDrwView->UnmarkAll();
421 for (
size_t i = 0, nMrkCnt = aMrkList.
GetMarkCount();
i < nMrkCnt; ++
i )
424 pSrcDrwView->MarkObj( pObj, pSrcPgView );
430 pSrcDrwView->MarkObj( pObj, pSrcPgView );
441 const Point& rInsPt,
bool bIsMove,
bool bSelectInsert )
445 OSL_ENSURE(
this == &rDestShell || !rDestShell.
IsObjSelected(),
446 "Dest-Shell cannot be in Obj-Mode" );
454 bool bCopyIsMove =
mxDoc->IsCopyIsMove();
457 mxDoc->SetCopyIsMove(
true );
475 if ((RndStdIds::FLY_AT_PARA == aAnchor.
GetAnchorId()) ||
476 (RndStdIds::FLY_AT_CHAR == aAnchor.
GetAnchorId()) ||
477 (RndStdIds::FLY_AT_FLY == aAnchor.
GetAnchorId()) ||
480 if (
this == &rDestShell )
490 if( (pNd = &aPos.
GetNode())->IsNoTextNode() )
503 rDestShell, aAnchor, aNewAnch,
true );
513 pFly, rInsPt, rDestShell, aAnchor,
517 else if ( RndStdIds::FLY_AT_PAGE == aAnchor.
GetAnchorId() )
526 OSL_ENSURE(
false,
"what anchor is it?" );
534 if ( RndStdIds::FLY_AS_CHAR != aAnchor.
GetAnchorId() )
536 Point aPos( rInsPt );
565 bRet =
CopyDrawSel( rDestShell, rSttPt, rInsPt, bIsMove, bSelectInsert );
576 aBoxes.
empty() ?
nullptr : aBoxes[0]->GetSttNd()->FindTableNode());
577 if (
nullptr != pTableNd)
579 std::optional<SwPosition> oDstPos;
580 if(
this == &rDestShell )
584 oDstPos.emplace( *
GetCursor()->GetPoint() );
587 if( !oDstPos->GetNode().IsNoTextNode() )
602 bIsMove &&
this == &rDestShell &&
604 GetTabSortBoxes().
size(),
605 this != &rDestShell );
607 if(
this != &rDestShell )
616 if(
this == &rDestShell )
624 if(
this == &rDestShell )
641 mxDoc->SetCopyIsMove( bCopyIsMove );
644 if( pTableFieldTyp->HasWriterListeners() )
649 for( nActCnt = 0; rDestShell.
ActionPend(); ++nActCnt )
652 for( ; nActCnt; --nActCnt )
665 typedef std::shared_ptr<SwPaM> PaMPtr;
666 typedef std::shared_ptr<SwPosition> PositionPtr;
667 typedef std::pair< PaMPtr, PositionPtr > Insertion;
669 bool PamHasSelection(
const SwPaM& rPaM)
697 const SwNodeIndex* pIdx = pSpzFormat->GetContent().GetContentIdx();
698 if (!pIdx || pFlyNode != &pIdx->
GetNode())
713 auto& rImp = *rSh.
Imp();
714 auto& rDoc = *rSh.
GetDoc();
715 auto& rDrawView = *rImp.GetDrawView();
716 if(rDrawView.IsGroupEntered() &&
729 if(xNew->GetAnchorPos().X() || xNew->GetAnchorPos().Y())
731 const Point aPoint(0, 0);
734 xNew->NbcSetAnchorPos(aPoint);
735 xNew->NbcSetSnapRect(aSnapRect);
738 rDrawView.InsertObjectAtView(xNew.get(), *rImp.GetPageView());
740 Point aGrpAnchor(0, 0);
741 SdrObjList* pList = xNew->getParentSdrObjListFromSdrObject();
746 if(
nullptr != pOwner)
747 aGrpAnchor =
pOwner->GetAnchorPos();
752 xNew->NbcSetAnchorPos(aGrpAnchor);
753 xNew->SetSnapRect(aSnapRect);
758 if ((RndStdIds::FLY_AT_PARA == aAnchor.GetAnchorId()) ||
759 (RndStdIds::FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
760 (RndStdIds::FLY_AS_CHAR == aAnchor.GetAnchorId()))
780 aAnchor.SetAnchor(pPos);
782 else if(RndStdIds::FLY_AT_PAGE == aAnchor.GetAnchorId())
786 else if(RndStdIds::FLY_AT_FLY == aAnchor.GetAnchorId())
800 switch(pNew->
Which())
819 rDrawView.MarkObj(pObj, rDrawView.GetSdrPageView());
826 SAL_WARN(
"sw.core",
"unknown fly type");
865 std::vector< Insertion > aCopyVector;
872 SwPaM* pCurrCursor = pStartCursor;
881 pCurrCursor = pCurrCursor->
GetNext();
882 pStartCursor = pCurrCursor;
886 bool bCompletePara =
false;
887 sal_uInt16 nMove = 0;
894 Insertion aInsertion( std::make_shared<SwPaM>( aIdx ),
895 std::make_shared<SwPosition>( aInsertPos ) );
897 aInsertion.first->SetMark();
898 if( pStartCursor == pCurrCursor->
GetNext() )
901 aStartPos = aInsertPos;
902 SwCursor aCursor( aStartPos,
nullptr);
913 pCurrCursor = pCurrCursor->
GetNext();
914 aInsertPos = *pCurrCursor->
GetPoint();
920 aInsertion.first->GetPoint()->Assign(aIdx);
922 aInsertion.first->GetPoint()->SetContent(
923 aInsertion.first->GetPointContentNode()->Len() );
924 aCopyVector.push_back( aInsertion );
929 if( !
nCount && nCursorCount )
935 for (
auto const& item : aCopyVector)
938 SwPaM& rCopy = *item.first;
963 bool bDelTable =
true;
969 if (pSrcNd &&
nullptr != pDestNd &&
984 bool bParkTableCursor =
false;
994 bParkTableCursor =
true;
996 else if( !PamHasSelection(rPaM) && rPaM.
GetNext() == &rPaM &&
1003 OSL_ENSURE( pBox,
"Box is not in this table" );
1008 if( !bParkTableCursor )
1021 if( bParkTableCursor )
1032 SwPaM const tmpPam(rNode, 0,
1033 rNode, pContentNode ? pContentNode->
Len() : 0);
1044 ::std::vector<SwFrameFormat*>
inserted;
1051 if (RndStdIds::FLY_AT_PAGE == rAnchor.
GetAnchorId()
1055 lcl_PasteFlyOrDrawFormat(rPaM, pFlyFormat, *
this));
1058 for (
auto const pFlyFormat :
inserted)
1060 lcl_SelectFlyFormat(pFlyFormat, *
this);
1073 FindTableBoxStartNode();
1104 nIdx <= nEndIdx; ++nIdx)
1106 SwTextNode *
const pTextNode = rDestNodes[nIdx]->GetTextNode();
1122 if( pTableFieldTyp->HasWriterListeners() )
1130 for( ; nActCnt; --nActCnt )
1149 ::std::optional<SwPaM> oSourcePam( *
GetCursor()->GetPoint() );
1170 SwPaM aTmp(aBefore);
1177 oSourcePam->SetMark();
1199 if( !
GetDoc()->GetSpzFrameFormats()->empty() )
1208 if ((RndStdIds::FLY_AT_PAGE == aAnchor.
GetAnchorId()) &&
1228 OSL_ENSURE(
Imp()->
HasDrawView(),
"GetDrawObjGraphic without DrawView?" );
1230 bool bConvert =
true;
1243 if( SotClipboardFormatId::GDIMETAFILE == nFormat )
1245 if( GraphicType::Bitmap != aGrf.
GetType() )
1257 pVirtDev->EnableOutput(
false );
1261 pVirtDev->SetMapMode( aTmp );
1265 aGrf.
Draw(*pVirtDev, aPt, aSz);
1272 else if( GraphicType::Bitmap == aGrf.
GetType() )
1285 MapMode aTmp( MapUnit::MapTwip );
1286 pVirtDev->SetMapMode( aTmp );
1287 if( pVirtDev->SetOutputSize( aSz ) )
1290 rGrf = pVirtDev->GetBitmapEx(
Point(), aSz );
1301 else if( SotClipboardFormatId::GDIMETAFILE == nFormat )
1303 else if( SotClipboardFormatId::BITMAP == nFormat || SotClipboardFormatId::PNG == nFormat )
1331 aGraphic = *pGraphic;
1340 pGraphicObj->SetLayer( pOle2Obj->
GetLayer() );
1355 std::unique_ptr< FmFormModel > pModel(
1358 GetDoc()->GetDocShell()));
1360 pModel->GetItemPool().FreezeIdRanges();
1374 if( pModel->GetPageCount() > 0 &&
1375 1 == pModel->GetPage(0)->GetObjCount() &&
1382 SdrObject* pClpObj = pModel->GetPage(0)->GetObj(0);
1393 const SwFrame* pAnchor(
nullptr);
1419 pNewObj->NbcResize( aNewRect.
TopLeft(), aScaleWidth, aScaleHeight);
1424 if(
dynamic_cast<const SdrUnoObj*
>( pNewObj.get()) !=
nullptr )
1426 else if(
dynamic_cast<const SdrUnoObj*
>( pOldObj) !=
nullptr )
1429 pNewObj->SetLayer( pOldObj->
GetLayer() );
1443 OSL_ENSURE( pTmp,
"Where's my Master?" );
1444 }
while( pTmp->IsFollow() );
1447 if(
auto pCaptionObj =
dynamic_cast<SdrCaptionObj*
>( pOldObj))
1448 aNullPt = pCaptionObj->GetTailPos();
1450 aNullPt = aOldObjRect.
TopLeft();
1455 pNewObj->NbcSetRelativePos( aNullPt - aNewAnchor );
1456 pNewObj->NbcSetAnchorPos( aNewAnchor );
1503 if(GraphicType::NONE != rGraphic.
GetType() && GraphicType::Default != rGraphic.
GetType())
1537 pView->
Paste(*pModel, aPos,
nullptr, SdrInsertFlags::NONE);
1542 const Point aNull( 0, 0 );
1543 for(
size_t i=0;
i < nCnt; ++
i )
1553 if(
dynamic_cast<const SdrUnoObj*
>( pObj) !=
nullptr )
1591 if(
auto pGrafObj =
dynamic_cast< SdrGrafObj*
>(pObj))
1595 pNewGrafObj->SetGraphic(rGrf);
1603 pNewGrafObj->SetGraphicLink(rURL);
1605 pResult = pNewGrafObj.get();
1609 pView->
AddUndo(std::make_unique<SdrUndoAttrObj>(*pObj));
@ CheckPosInFly
check if target position is in fly anchored at source range
GraphicType GetType() const
void Draw(OutputDevice &rOutDev, const Point &rDestPt) const
virtual SwDrawFrameFormat * InsertDrawObj(const SwPaM &rRg, SdrObject &rDrawObj, const SfxItemSet &rFlyAttrSet)=0
Insert a DrawObject.
virtual bool CopyRange(SwPaM &rPam, SwPosition &rPos, SwCopyFlags flags) const =0
Copy a selected content range to a position.
virtual bool DelFullPara(SwPaM &)=0
Delete full paragraphs.
virtual SwFieldType * GetSysFieldType(const SwFieldIds eWhich) const =0
virtual void LockExpFields()=0
virtual void UpdateFields(bool bCloseDB)=0
virtual bool IsExpFieldsLocked() const =0
virtual void UpdateExpFields(SwTextField *pField, bool bUpdateRefFields)=0
virtual void UnlockExpFields()=0
virtual SwFrameFormat * CopyLayoutFormat(const SwFrameFormat &rSrc, const SwFormatAnchor &rNewAnchor, bool bSetTextFlyAtt, bool bMakeFrames)=0
virtual void DelLayoutFormat(SwFrameFormat *pFormat)=0
virtual void SetRedlineFlags_intern(RedlineFlags eMode)=0
Set a new redline mode.
virtual RedlineFlags GetRedlineFlags() const =0
Query the currently set redline mode.
void SetOrigin(const Point &rOrigin)
constexpr tools::Long Y() const
constexpr tools::Long X() const
constexpr tools::Long getX() const
constexpr tools::Long getY() const
void SetCurrentObj(SdrObjKind nIdent, SdrInventor nInvent=SdrInventor::Default)
void ReplaceObjectAtView(SdrObject *pOldObj, SdrPageView &rPV, SdrObject *pNewObj, bool bMark=true)
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
bool InsertObjectAtView(SdrObject *pObj, SdrPageView &rPV, SdrInsertFlags nOptions=SdrInsertFlags::NONE)
void MoveMarkedObj(const Size &rSiz, bool bCopy=false)
GDIMetaFile GetMarkedObjMetaFile(bool bNoVDevIfOneMtfMarked=false) const
virtual bool Paste(const SdrModel &rMod, const Point &rPos, SdrObjList *pLst, SdrInsertFlags nOptions)
BitmapEx GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked=false, const sal_uInt32 nMaximumQuadraticPixels=500000, const std::optional< Size > &rTargetDPI=std::nullopt) const
const Graphic & GetGraphic() const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
const SdrMarkList & GetMarkedObjectList() const
bool IsDesignMode() const
void SetDesignMode(bool bOn=true)
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
SdrObject * GetMarkedSdrObj() const
const SfxItemPool & GetItemPool() const
const SdrPage * GetPage(sal_uInt16 nPgNum) const
sal_uInt16 GetPageCount() const
virtual rtl::Reference< SdrObject > ReplaceObject(SdrObject *pNewObj, size_t nObjNum)
virtual SdrObject * getSdrObjectFromSdrObjList() const
SdrObjUserCall * GetUserCall() const
void ImpSetAnchorPos(const Point &rPnt)
sal_uInt32 GetOrdNum() const
static rtl::Reference< T > Clone(T const &rObj, SdrModel &rTargetModel)
virtual const tools::Rectangle & GetCurrentBoundRect() const
SdrObjList * getParentSdrObjListFromSdrObject() const
SdrModel & getSdrModelFromSdrObject() const
virtual const tools::Rectangle & GetSnapRect() const
void SetMergedItemSetAndBroadcast(const SfxItemSet &rSet, bool bClearAllItems=false)
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const=0
const SfxItemSet & GetMergedItemSet() const
SdrObject * getParentSdrObjectFromSdrObject() const
virtual SdrLayerID GetLayer() const
virtual void SetLayer(SdrLayerID nLayer)
void Connect(SvxOle2Shape *pCreator=nullptr)
const Graphic * GetGraphic() const
bool IsGroupEntered() const
SdrPageView * GetSdrPageView() const
SdrModel & GetModel() const
bool SetAttributes(const SfxItemSet &rSet, bool bReplaceAll=false)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
bool Set(const SfxItemSet &, bool bDeep=true)
constexpr tools::Long Height() const
constexpr tools::Long Width() const
sal_uInt64 Seek(sal_uInt64 nPos)
const SwFrame * GetAnchorFrame() const
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
SwTextFrame * FindMaster() const
Marks a character position inside a document model content node (SwContentNode)
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
virtual sal_Int32 Len() const
bool Pop(PopMode, ::std::optional< SwCallLink > &roLink)
void Push()
store a copy of the current cursor on the cursor stack
const SwRect & GetCharRect() const
Point & GetCursorDocPos() const
void SetSelection(const SwPaM &rCursor)
bool ParkTableCursor()
Invalidate cursors.
bool GotoPage(sal_uInt16 nPage)
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
bool MovePage(SwWhichPage, SwPosPage)
bool HasShellFocus() const
void SaveTableBoxContent(const SwPosition *pPos=nullptr)
bool UpDown(bool bUp, sal_uInt16 nCnt, Point const *pPt, tools::Long nUpDownX, SwRootFrame &rLayout)
static SwTableNode * IsInTable(const SwNode &)
::sw::DocumentFieldsManager & GetDocumentFieldsManager()
bool InsCopyOfTable(SwPosition &rInsPos, const SwSelBoxes &rBoxes, const SwTable *pCpyTable, bool bCpyName=false, bool bCorrPos=false, const OUString &rStyleName="")
Copies a Table from the same or another Doc into itself We create a new Table or an existing one is f...
bool IsColumnSelection() const
IDocumentContentOperations const & getIDocumentContentOperations() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
rtl::Reference< SdrObject > CloneSdrObj(const SdrObject &, bool bMoveWithinDoc=false, bool bInsInPage=true)
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
const SwTextFormatColl * GetDfltTextFormatColl() const
bool UpdateParRsid(SwTextNode *pTextNode, sal_uInt32 nVal=0)
const SwAttrPool & GetAttrPool() const
void ClearBoxNumAttrs(SwNode &rNode)
void MakeUniqueNumRules(const SwPaM &rPaM)
const sw::FrameFormats< sw::SpzFrameFormat * > * GetSpzFrameFormats() const
static void ReplaceMarkedDrawVirtObjs(SdrMarkView &_rMarkView)
replace marked <SwDrawVirtObj>-objects by its reference object for delete marked objects.
sal_uInt16 GetCntType() const
Determine form of content. Return Type at CurrentCursor->SPoint.
void StartAllAction()
For all views of this document.
bool CopySelToDoc(SwDoc &rInsDoc)
For copying via ClipBoard: If table is copied into table, move all cursors away from it.
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
bool Delete(bool isArtificialSelection=false)
Delete content of all ranges.
bool GetGrfSize(Size &) const
void Undo(sal_uInt16 const nCount=1, sal_uInt16 nOffset=0)
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
const Graphic * GetGraphic(bool bWait=true) const
bool Copy(SwEditShell &rDestShell)
Copy content of all ranges at current position of cursor to given Shell.
SwFlyFrame * GetSelectedFlyFrame() const
void PastePages(SwFEShell &rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage)
Paste some pages into another doc - used in mailmerge.
comphelper::OInterfaceContainerHelper3< css::text::XPasteListener > & GetPasteListeners()
SwPageDesc * FindPageDescByName(const OUString &rName, bool bGetFromPool=false, size_t *pPos=nullptr)
bool Paste(SwDoc &rClpDoc, bool bNestedTable=false)
SAL_DLLPRIVATE bool ImpEndCreate()
bool IsFrameSelected() const
comphelper::OInterfaceContainerHelper3< css::text::XPasteListener > m_aPasteListeners
SAL_DLLPRIVATE bool CopyDrawSel(SwFEShell &rDestShell, const Point &rSttPt, const Point &rInsPt, bool bIsMove, bool bSelectInsert)
Methods for copying of draw objects.
size_t GetCurPageDesc(const bool bCalcFrame=true) const
bool GetDrawObjGraphic(SotClipboardFormatId nFormat, Graphic &rGrf) const
Get selected DrawObj as graphics (MetaFile/Bitmap).
sal_uInt16 GetPhyPageNum() const
Phy: real page count.
void Copy(SwDoc &rClpDoc, const OUString *pNewClpText=nullptr)
Copy and Paste methods for internal clipboard.
void ChgCurPageDesc(const SwPageDesc &)
PageDescriptor-interface.
size_t IsObjSelected() const
const SwPageDesc & GetPageDesc(size_t i) const
sal_uInt16 GetPageNumber(const Point &rPoint) const
Page number of the page containing Point, O if no page.
void SelectFlyFrame(SwFlyFrame &rFrame)
Instances of SwFields and those derived from it occur 0 to n times.
general base class for all free-flowing frames
virtual const SwFlyFrameFormat * GetFormat() const override
bool IsUpperOf(const SwFlyFrame &_rLower) const
const SwNodeIndex * GetContentIdx() const
const SwRect & getFrameArea() const
Base class of the Writer layout elements.
SwFlyFrame * FindFlyFrame()
Point GetFrameAnchorPos(bool bIgnoreFlysAnchoredAtThisFrame) const
returns the position for anchors based on frame direction
bool IsContentFrame() const
SwPageFrame * FindPageFrame()
SwFrame * FindFooterOrHeader()
Marks a node in the document model.
SwNodeOffset GetIndex() const
Base class of the Writer document model elements.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeOffset GetIndex() const
const SwStartNode * FindTableBoxStartNode() const
bool IsNoTextNode() const
const SwStartNode * FindFlyStartNode() const
SwTableNode * FindTableNode()
Search table node, in which it is.
SwNodeOffset EndOfSectionIndex() const
SwContentNode * GetContentNode()
SwTableNode * GetTableNode()
const SwEndNode * EndOfSectionNode() const
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
SwTextNode * MakeTextNode(SwNode &rWhere, SwTextFormatColl *pColl, bool bNewFrames=true)
Implementations of "Make...Node" are in the given .cxx-files.
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
void Delete(const SwNodeIndex &rPos, SwNodeOffset nNodes=SwNodeOffset(1))
SwContentNode * GoNext(SwNodeIndex *) const
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
SwNode & GetPointNode() const
const SwPosition * End() const
SwNode & GetMarkNode() const
const SwPosition * GetPoint() const
const SwPosition * Start() const
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
const OUString & GetName() const
void Pos(const Point &rNew)
bool Contains(const Point &rPOINT) const
The root element of a Writer document layout.
const SwPageFrame * GetPageAtPos(const Point &rPt, const Size *pSize=nullptr, bool bExtend=false) const
Point rPt: The point that should be used to find the page Size pSize: If given, we return the (first)...
virtual bool GetModelPositionForViewPoint(SwPosition *, Point &, SwCursorMoveState *=nullptr, bool bTestBackground=false) const override
Primary passes the call to the first page.
Starts a section of nodes in the document model.
SwTableBox is one table cell in the document model.
const SwTable & GetTable() const
bool IsTableComplex() const
const SwTableBox * GetTableBox(const OUString &rName, const bool bPerformValidCheck=false) const
const SwFormatFlyCnt & GetFlyCnt() const
static SwFrameFormat * getOtherTextBoxFormat(const SwFrameFormat *pFormat, sal_uInt16 nType, const SdrObject *pObject=nullptr)
If we have an associated TextFrame, then return that.
static void syncFlyFrameAttr(SwFrameFormat &rShape, SfxItemSet const &rSet, SdrObject *pObj)
Similar to syncProperty(), but used by the internal API (e.g. for UI purposes).
static bool isTextBox(const SwFrameFormat *pFormat, sal_uInt16 nType, const SdrObject *pObject=nullptr)
Is the frame format a text box?
Represents the visualization of a paragraph.
SwTextNode is a paragraph in the document model.
void EraseText(const SwContentIndex &rIdx, const sal_Int32 nCount=SAL_MAX_INT32, const SwInsertFlags nMode=SwInsertFlags::DEFAULT)
delete text content ATTENTION: must not be called with a range that overlaps the start of an attribut...
OUString InsertText(const OUString &rStr, const SwContentIndex &rIdx, const SwInsertFlags nMode=SwInsertFlags::DEFAULT)
insert text content
const OUString & GetText() const
SwTextAttr * GetTextAttrForCharAt(const sal_Int32 nIndex, const sal_uInt16 nWhich=RES_TXTATR_END) const
get the text attribute at position nIndex which owns the dummy character CH_TXTATR_* at that position...
SwDrawView * GetDrawView()
SdrPageView * GetPageView()
IDocumentContentOperations & getIDocumentContentOperations()
Provides access to the content operations interface.
rtl::Reference< SwDoc > mxDoc
The document; never 0.
SwRootFrame * GetLayout() const
vcl::Window * GetWin() const
const IDocumentDrawModelAccess & getIDocumentDrawModelAccess() const
Provides access to the document draw model interface.
IDocumentUndoRedo const & GetIDocumentUndoRedo() const
Provides access to the document undo/redo interface.
const SfxItemPool & GetAttrPool() const
reference_type * get() const
std::pair< const_iterator, bool > insert(Value &&x)
void GCFieldTypes()
Remove all unreferenced field types of a document.
ring_container GetRingContainer()
@ SetOnlyText
stay with the cursor inside text
void PaMCorrAbs(const SwPaM &rRange, const SwPosition &rNewPos)
Function declarations so that everything below the CursorShell can move the Cursor once in a while.
static const Point & lcl_FindBasePos(const SwFrame *pFrame, const Point &rPt)
static bool lcl_SetAnchor(const SwPosition &rPos, const SwNode &rNd, SwFlyFrame const *pFly, const Point &rInsPt, SwFEShell const &rDestShell, SwFormatAnchor &rAnchor, Point &rNewPos, bool bCheckFlyRecur)
static void lcl_ConvertSdrOle2ObjsToSdrGrafObjs(SdrModel &_rModel)
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(162)
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(165)
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(58)
WhichRangesContainer const aFrameFormatSetRange(svl::Items< RES_FRMATR_BEGIN, RES_FRMATR_END-1, RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1, XATTR_FILL_FIRST, XATTR_FILL_LAST >)
DECL_LISTENERMULTIPLEXER_END void SAL_CALL inserted(::sal_Int32 ID) override
#define SAL_WARN(area, stream)
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
Marks a position in the document model.
void AssignEndIndex(const SwContentNode &rNd)
Set nNode to rNd, and nContent to the end of rNd.
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
void GetTableSel(const SwCursorShell &rShell, SwSelBoxes &rBoxes, const SwTableSearchType eSearchType)
SwContentFrame * GetLastSub(const SwLayoutFrame *pLayout)
SwContentFrame * GetFirstSub(const SwLayoutFrame *pLayout)
SwLayoutFrame * GetThisFrame(const SwLayoutFrame *pFrame)
SVXCORE_DLLPUBLIC bool SvxDrawingLayerImport(SdrModel *pModel, const css::uno::Reference< css::io::XInputStream > &xInputStream)