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() )
202 if ((RndStdIds::FLY_AT_PARA == aAnchor.
GetAnchorId()) ||
203 (RndStdIds::FLY_AT_CHAR == aAnchor.
GetAnchorId()) ||
204 (RndStdIds::FLY_AT_FLY == aAnchor.
GetAnchorId()) ||
241 Point& rNewPos,
bool bCheckFlyRecur )
245 std::pair<Point, bool>
const tmp(rInsPt,
false);
249 if( pTmpFly && bCheckFlyRecur && pFly->
IsUpperOf( *pTmpFly ) )
253 else if ( RndStdIds::FLY_AT_FLY == rAnchor.
GetAnchorId() )
264 rAnchor.
SetType( RndStdIds::FLY_AT_PAGE );
276 const Point& rInsPt,
bool bIsMove,
bool bSelectInsert )
286 else if( bSelectInsert )
295 Size aSiz( rInsPt.X() - rSttPt.X(), rInsPt.Y() - rSttPt.Y() );
296 for(
size_t i = 0;
i < nMarkCount; ++
i )
304 bool bInsWithFormat =
true;
310 if( pSrcDrwView->IsGroupEntered() ||
311 (RndStdIds::FLY_AS_CHAR != rAnchor.
GetAnchorId()) )
315 GetDoc() == pDestDoc, false );
318 bInsWithFormat =
false;
327 if ((RndStdIds::FLY_AT_PARA == aAnchor.
GetAnchorId()) ||
328 (RndStdIds::FLY_AT_CHAR == aAnchor.
GetAnchorId()) ||
329 (RndStdIds::FLY_AT_FLY == aAnchor.
GetAnchorId()) ||
332 if (
this == &rDestShell )
342 if( (pNd = &aPos.
GetNode())->IsNoTextNode() )
346 rDestShell, aAnchor, aNewAnch,
false );
360 else if ( RndStdIds::FLY_AT_PAGE == aAnchor.
GetAnchorId() )
371 if( pSrcDrwView->IsGroupEntered() ||
389 if ( RndStdIds::FLY_AS_CHAR != aAnchor.
GetAnchorId() )
391 Point aPos( rInsPt );
401 pDrawFormat->PosAttrSet();
409 pDestDrwView->
MarkObj( pNew, pDestPgView );
415 if ( bIsMove && bRet )
417 if( &rDestShell ==
this )
419 const SdrMarkList aList( pSrcDrwView->GetMarkedObjectList() );
420 pSrcDrwView->UnmarkAll();
422 for (
size_t i = 0, nMrkCnt = aMrkList.
GetMarkCount();
i < nMrkCnt; ++
i )
425 pSrcDrwView->MarkObj( pObj, pSrcPgView );
431 pSrcDrwView->MarkObj( pObj, pSrcPgView );
442 const Point& rInsPt,
bool bIsMove,
bool bSelectInsert )
446 OSL_ENSURE(
this == &rDestShell || !rDestShell.
IsObjSelected(),
447 "Dest-Shell cannot be in Obj-Mode" );
455 bool bCopyIsMove =
mxDoc->IsCopyIsMove();
458 mxDoc->SetCopyIsMove(
true );
476 if ((RndStdIds::FLY_AT_PARA == aAnchor.
GetAnchorId()) ||
477 (RndStdIds::FLY_AT_CHAR == aAnchor.
GetAnchorId()) ||
478 (RndStdIds::FLY_AT_FLY == aAnchor.
GetAnchorId()) ||
481 if (
this == &rDestShell )
491 if( (pNd = &aPos.
GetNode())->IsNoTextNode() )
504 rDestShell, aAnchor, aNewAnch,
true );
514 pFly, rInsPt, rDestShell, aAnchor,
518 else if ( RndStdIds::FLY_AT_PAGE == aAnchor.
GetAnchorId() )
527 OSL_ENSURE(
false,
"what anchor is it?" );
535 if ( RndStdIds::FLY_AS_CHAR != aAnchor.
GetAnchorId() )
537 Point aPos( rInsPt );
566 bRet =
CopyDrawSel( rDestShell, rSttPt, rInsPt, bIsMove, bSelectInsert );
577 aBoxes.
empty() ?
nullptr : aBoxes[0]->GetSttNd()->FindTableNode());
578 if (
nullptr != pTableNd)
580 std::optional<SwPosition> oDstPos;
581 if(
this == &rDestShell )
585 oDstPos.emplace( *
GetCursor()->GetPoint() );
588 if( !oDstPos->GetNode().IsNoTextNode() )
603 bIsMove &&
this == &rDestShell &&
605 GetTabSortBoxes().
size(),
606 this != &rDestShell );
608 if(
this != &rDestShell )
617 if(
this == &rDestShell )
625 if(
this == &rDestShell )
642 mxDoc->SetCopyIsMove( bCopyIsMove );
645 if( pTableFieldTyp->HasWriterListeners() )
650 for( nActCnt = 0; rDestShell.
ActionPend(); ++nActCnt )
653 for( ; nActCnt; --nActCnt )
666 typedef std::shared_ptr<SwPaM> PaMPtr;
667 typedef std::shared_ptr<SwPosition> PositionPtr;
668 typedef std::pair< PaMPtr, PositionPtr > Insertion;
670 bool PamHasSelection(
const SwPaM& rPaM)
698 const SwNodeIndex* pIdx = pSpzFormat->GetContent().GetContentIdx();
699 if (!pIdx || pFlyNode != &pIdx->
GetNode())
714 auto& rImp = *rSh.
Imp();
715 auto& rDoc = *rSh.
GetDoc();
716 auto& rDrawView = *rImp.GetDrawView();
717 if(rDrawView.IsGroupEntered() &&
724 SdrObject* pNew = rDoc.CloneSdrObj(*pSdrObj,
false,
false);
732 const Point aPoint(0, 0);
739 rDrawView.InsertObjectAtView(pNew, *rImp.GetPageView());
741 Point aGrpAnchor(0, 0);
747 if(
nullptr != pOwner)
748 aGrpAnchor =
pOwner->GetAnchorPos();
759 if ((RndStdIds::FLY_AT_PARA == aAnchor.GetAnchorId()) ||
760 (RndStdIds::FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
761 (RndStdIds::FLY_AS_CHAR == aAnchor.GetAnchorId()))
781 aAnchor.SetAnchor(pPos);
783 else if(RndStdIds::FLY_AT_PAGE == aAnchor.GetAnchorId())
787 else if(RndStdIds::FLY_AT_FLY == aAnchor.GetAnchorId())
793 SwFrameFormat* pNew = rDoc.getIDocumentLayoutAccess().CopyLayoutFormat(*pCpyFormat, aAnchor,
true,
true);
801 switch(pNew->
Which())
820 rDrawView.MarkObj(pObj, rDrawView.GetSdrPageView());
827 SAL_WARN(
"sw.core",
"unknown fly type");
866 std::vector< Insertion > aCopyVector;
873 SwPaM* pCurrCursor = pStartCursor;
882 pCurrCursor = pCurrCursor->
GetNext();
883 pStartCursor = pCurrCursor;
887 bool bCompletePara =
false;
888 sal_uInt16 nMove = 0;
895 Insertion aInsertion( std::make_shared<SwPaM>( aIdx ),
896 std::make_shared<SwPosition>( aInsertPos ) );
898 aInsertion.first->SetMark();
899 if( pStartCursor == pCurrCursor->
GetNext() )
902 aStartPos = aInsertPos;
903 SwCursor aCursor( aStartPos,
nullptr);
914 pCurrCursor = pCurrCursor->
GetNext();
915 aInsertPos = *pCurrCursor->
GetPoint();
921 aInsertion.first->GetPoint()->Assign(aIdx);
923 aInsertion.first->GetPoint()->SetContent(
924 aInsertion.first->GetPointContentNode()->Len() );
925 aCopyVector.push_back( aInsertion );
930 if( !
nCount && nCursorCount )
936 for (
auto const& item : aCopyVector)
939 SwPaM& rCopy = *item.first;
964 bool bDelTable =
true;
970 if (pSrcNd &&
nullptr != pDestNd &&
985 bool bParkTableCursor =
false;
995 bParkTableCursor =
true;
997 else if( !PamHasSelection(rPaM) && rPaM.
GetNext() == &rPaM &&
1004 OSL_ENSURE( pBox,
"Box is not in this table" );
1009 if( !bParkTableCursor )
1022 if( bParkTableCursor )
1033 SwPaM const tmpPam(rNode, 0,
1034 rNode, pContentNode ? pContentNode->
Len() : 0);
1045 ::std::vector<SwFrameFormat*>
inserted;
1052 if (RndStdIds::FLY_AT_PAGE == rAnchor.
GetAnchorId()
1056 lcl_PasteFlyOrDrawFormat(rPaM, pFlyFormat, *
this));
1059 for (
auto const pFlyFormat :
inserted)
1061 lcl_SelectFlyFormat(pFlyFormat, *
this);
1074 FindTableBoxStartNode();
1105 nIdx <= nEndIdx; ++nIdx)
1107 SwTextNode *
const pTextNode = rDestNodes[nIdx]->GetTextNode();
1123 if( pTableFieldTyp->HasWriterListeners() )
1131 for( ; nActCnt; --nActCnt )
1150 ::std::optional<SwPaM> oSourcePam( *
GetCursor()->GetPoint() );
1171 SwPaM aTmp(aBefore);
1178 oSourcePam->SetMark();
1200 if( !
GetDoc()->GetSpzFrameFormats()->empty() )
1206 for (
auto pCpyFormat : *
GetDoc()->GetSpzFrameFormats() )
1209 if ((RndStdIds::FLY_AT_PAGE == aAnchor.
GetAnchorId()) &&
1229 OSL_ENSURE(
Imp()->
HasDrawView(),
"GetDrawObjGraphic without DrawView?" );
1231 bool bConvert =
true;
1244 if( SotClipboardFormatId::GDIMETAFILE == nFormat )
1246 if( GraphicType::Bitmap != aGrf.
GetType() )
1258 pVirtDev->EnableOutput(
false );
1262 pVirtDev->SetMapMode( aTmp );
1266 aGrf.
Draw(*pVirtDev, aPt, aSz);
1273 else if( GraphicType::Bitmap == aGrf.
GetType() )
1286 MapMode aTmp( MapUnit::MapTwip );
1287 pVirtDev->SetMapMode( aTmp );
1288 if( pVirtDev->SetOutputSize( aSz ) )
1291 rGrf = pVirtDev->GetBitmapEx(
Point(), aSz );
1302 else if( SotClipboardFormatId::GDIMETAFILE == nFormat )
1304 else if( SotClipboardFormatId::BITMAP == nFormat || SotClipboardFormatId::PNG == nFormat )
1332 aGraphic = *pGraphic;
1341 pGraphicObj->SetLayer( pOle2Obj->
GetLayer() );
1356 std::unique_ptr< FmFormModel > pModel(
1359 GetDoc()->GetDocShell()));
1361 pModel->GetItemPool().FreezeIdRanges();
1375 if( pModel->GetPageCount() > 0 &&
1376 1 == pModel->GetPage(0)->GetObjCount() &&
1383 SdrObject* pClpObj = pModel->GetPage(0)->GetObj(0);
1394 const SwFrame* pAnchor(
nullptr);
1420 pNewObj->NbcResize( aNewRect.
TopLeft(), aScaleWidth, aScaleHeight);
1423 pNewObj->NbcMove(
Size(aVec.getX(), aVec.getY()));
1425 if(
dynamic_cast<const SdrUnoObj*
>( pNewObj.get()) !=
nullptr )
1427 else if(
dynamic_cast<const SdrUnoObj*
>( pOldObj) !=
nullptr )
1430 pNewObj->SetLayer( pOldObj->
GetLayer() );
1444 OSL_ENSURE( pTmp,
"Where's my Master?" );
1445 }
while( pTmp->IsFollow() );
1448 if(
auto pCaptionObj =
dynamic_cast<SdrCaptionObj*
>( pOldObj))
1449 aNullPt = pCaptionObj->GetTailPos();
1451 aNullPt = aOldObjRect.
TopLeft();
1456 pNewObj->NbcSetRelativePos( aNullPt - aNewAnchor );
1457 pNewObj->NbcSetAnchorPos( aNewAnchor );
1504 if(GraphicType::NONE != rGraphic.
GetType() && GraphicType::Default != rGraphic.
GetType())
1538 pView->
Paste(*pModel, aPos,
nullptr, SdrInsertFlags::NONE);
1543 const Point aNull( 0, 0 );
1544 for(
size_t i=0;
i < nCnt; ++
i )
1554 if(
dynamic_cast<const SdrUnoObj*
>( pObj) !=
nullptr )
1592 if(
auto pGrafObj =
dynamic_cast< SdrGrafObj*
>(pObj))
1596 pNewGrafObj->SetGraphic(rGrf);
1604 pNewGrafObj->SetGraphicLink(rURL);
1606 pResult = pNewGrafObj.get();
1610 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)
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
virtual void NbcSetAnchorPos(const Point &rPnt)
SdrObjUserCall * GetUserCall() const
const Point & GetAnchorPos() 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
virtual void NbcSetSnapRect(const tools::Rectangle &rRect)
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
virtual void SetSnapRect(const tools::Rectangle &rRect)
const SfxItemSet & GetMergedItemSet() const
SdrObject * getParentSdrObjectFromSdrObject() const
virtual SdrLayerID GetLayer() const
virtual void SetLayer(SdrLayerID nLayer)
virtual void NbcMove(const Size &rSiz)
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
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
const SwTextFormatColl * GetDfltTextFormatColl() const
bool UpdateParRsid(SwTextNode *pTextNode, sal_uInt32 nVal=0)
const SwAttrPool & GetAttrPool() const
const SwFrameFormats * GetSpzFrameFormats() const
void ClearBoxNumAttrs(SwNode &rNode)
void MakeUniqueNumRules(const SwPaM &rPaM)
SdrObject * CloneSdrObj(const SdrObject &, bool bMoveWithinDoc=false, bool bInsInPage=true)
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)