38 #include <osl/diagnose.h>
62 #include <viewimp.hxx>
83 SwNodeIndex aEndNdIdx( *aSttIdx.GetNode().EndOfSectionNode() );
85 if (!pTextNd || !pTextNd->GetText().isEmpty() ||
101 ((RndStdIds::FLY_AT_PARA == pAnchor->
GetAnchorId()) ||
102 (RndStdIds::FLY_AT_CHAR == pAnchor->
GetAnchorId())) &&
103 aSttIdx <= pAPos->
nNode && pAPos->
nNode <= aEndNdIdx )
116 pTextNd->InsertText( *pNewClpText,
SwIndex( pTextNd ) );
131 if ((RndStdIds::FLY_AT_PARA == aAnchor.GetAnchorId()) ||
132 (RndStdIds::FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
133 (RndStdIds::FLY_AT_FLY == aAnchor.GetAnchorId()) ||
134 (RndStdIds::FLY_AS_CHAR == aAnchor.GetAnchorId()))
137 if ( RndStdIds::FLY_AS_CHAR == aAnchor.GetAnchorId() )
141 aAnchor.SetAnchor( &aPos );
148 if( rSpzFrameFormats[ 0 ] != pFlyFormat )
154 assert( !inserted &&
"Fly not contained in Spz-Array" );
157 if ( RndStdIds::FLY_AS_CHAR == aAnchor.GetAnchorId() )
165 pTextNd->GetTextAttrForCharAt(
170 pTextNd->EraseText( rIdx, 1 );
188 aAnchor.SetAnchor( &aPos );
202 if ((RndStdIds::FLY_AT_PARA == aAnchor.GetAnchorId()) ||
203 (RndStdIds::FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
204 (RndStdIds::FLY_AT_FLY == aAnchor.GetAnchorId()) ||
205 (RndStdIds::FLY_AS_CHAR == aAnchor.GetAnchorId()))
229 pF = static_cast<const SwContentFrame*>(pF)->GetFollow();
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 )
346 rDestShell, aAnchor, aNewAnch,
false );
355 pCursor->
GetNode(),
nullptr, rInsPt,
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 );
428 for (
size_t i = 0, nMrkCnt = aList.GetMarkCount();
i < nMrkCnt; ++
i )
430 SdrObject *pObj = aList.GetMark(
i )->GetMarkedSdrObj();
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()) ||
479 (RndStdIds::FLY_AS_CHAR == aAnchor.GetAnchorId()))
481 if (
this == &rDestShell )
504 rDestShell, aAnchor, aNewAnch,
true );
514 pFly, rInsPt, rDestShell, aAnchor,
515 aNewAnch,
GetDoc() == rDestShell.GetDoc());
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::unique_ptr<SwPosition> pDstPos;
581 if(
this == &rDestShell )
588 if( !pDstPos->nNode.GetNode().IsNoTextNode() )
603 bIsMove &&
this == &rDestShell &&
604 aBoxes.
size() == pTableNd->GetTable().
605 GetTabSortBoxes().size(),
606 this != &rDestShell );
608 if(
this != &rDestShell )
617 if(
this == &rDestShell )
625 if(
this == &rDestShell )
642 mxDoc->SetCopyIsMove( bCopyIsMove );
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())
805 assert(dynamic_cast<SwFlyFrameFormat*>(pNew));
815 assert(dynamic_cast<SwDrawFrameFormat*>(pNew));
820 rDrawView.MarkObj(pObj, rDrawView.GetSdrPageView());
827 SAL_WARN(
"sw.core",
"unknown fly type");
841 pAtEnd->MakeEndIndex(&aCpyPam.GetPoint()->nContent);
866 std::vector< Insertion > aCopyVector;
868 const SwNodeOffset nSelCount = aCpyPam.GetPoint()->nNode.GetIndex()
869 - aCpyPam.GetMark()->nNode.GetIndex();
873 SwPaM* pCurrCursor = pStartCursor;
882 pCurrCursor = pCurrCursor->
GetNext();
883 pStartCursor = pCurrCursor;
887 bool bCompletePara =
false;
888 sal_uInt16 nMove = 0;
892 OSL_ENSURE( aIdx.GetNode().GetContentNode(),
"Who filled the clipboard?!" );
893 if( aIdx.GetNode().GetContentNode() )
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()->
nNode = aIdx;
923 aInsertion.first->GetPoint()->nContent =
924 aInsertion.first->GetContentNode()->Len();
925 aCopyVector.push_back( aInsertion );
930 if( !nCount && nCursorCount )
932 nCount =
min( nSelCount, 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 )
1032 SwContentNode *
const pContentNode( rNode.GetContentNode() );
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()
1055 inserted.emplace_back(
1056 lcl_PasteFlyOrDrawFormat(rPaM, pFlyFormat, *
this));
1059 for (
auto const pFlyFormat : inserted)
1061 lcl_SelectFlyFormat(pFlyFormat, *
this);
1074 FindTableBoxStartNode();
1077 aCpyPam.GetPoint()->nNode != aCpyPam.GetMark()->nNode )
1106 nIdx <= nEndIdx; ++nIdx)
1108 SwTextNode *
const pTextNode = rDestNodes[nIdx]->GetTextNode();
1132 for( ; nActCnt; --nActCnt )
1151 ::std::optional<SwPaM> oSourcePam( *
GetCursor()->GetPoint() );
1172 SwPaM aTmp(aBefore);
1179 oSourcePam->SetMark();
1197 SwPaM aPara( aIdx );
1202 if( !
GetDoc()->GetSpzFrameFormats()->empty() )
1208 for (
auto pCpyFormat : *
GetDoc()->GetSpzFrameFormats() )
1211 if ((RndStdIds::FLY_AT_PAGE == aAnchor.GetAnchorId()) &&
1212 aAnchor.GetPageNum() >= nStartPage && aAnchor.GetPageNum() <= nEndPage)
1214 aAnchor.
SetPageNum( aAnchor.GetPageNum() - nStartPage + 1);
1231 OSL_ENSURE(
Imp()->
HasDrawView(),
"GetDrawObjGraphic without DrawView?" );
1233 bool bConvert =
true;
1246 if( SotClipboardFormatId::GDIMETAFILE == nFormat )
1248 if( GraphicType::Bitmap != aGrf.
GetType() )
1260 pVirtDev->EnableOutput(
false );
1264 pVirtDev->SetMapMode( aTmp );
1268 aGrf.
Draw(*pVirtDev, aPt, aSz);
1275 else if( GraphicType::Bitmap == aGrf.
GetType() )
1288 MapMode aTmp( MapUnit::MapTwip );
1289 pVirtDev->SetMapMode( aTmp );
1290 if( pVirtDev->SetOutputSize( aSz ) )
1293 rGrf = pVirtDev->GetBitmapEx(
Point(), aSz );
1304 else if( SotClipboardFormatId::GDIMETAFILE == nFormat )
1306 else if( SotClipboardFormatId::BITMAP == nFormat || SotClipboardFormatId::PNG == nFormat )
1321 while( aIter.IsMore() )
1334 aGraphic = *pGraphic;
1359 std::unique_ptr< FmFormModel > pModel(
1362 GetDoc()->GetDocShell()));
1364 pModel->GetItemPool().FreezeIdRanges();
1378 if( pModel->GetPageCount() > 0 &&
1379 1 == pModel->GetPage(0)->GetObjCount() &&
1386 SdrObject* pClpObj = pModel->GetPage(0)->GetObj(0);
1389 if(
SwPasteSdr::SetAttr == nAction && dynamic_cast<const SwVirtFlyDrawObj*>( pOldObj) !=
nullptr )
1397 const SwFrame* pAnchor(
nullptr);
1398 if( dynamic_cast<const SwVirtFlyDrawObj*>( pOldObj) !=
nullptr )
1417 Size aOldObjSize( aOldObjRect.GetSize() );
1419 Size aNewSize( aNewRect.GetSize() );
1421 Fraction aScaleWidth( aOldObjSize.Width(), aNewSize.Width() );
1422 Fraction aScaleHeight( aOldObjSize.Height(), aNewSize.Height());
1423 pNewObj->
NbcResize( aNewRect.TopLeft(), aScaleWidth, aScaleHeight);
1425 Point aVec = aOldObjRect.TopLeft() - aNewRect.TopLeft();
1428 if( dynamic_cast<const SdrUnoObj*>( pNewObj) != nullptr )
1430 else if( dynamic_cast<const SdrUnoObj*>( pOldObj) !=
nullptr )
1435 if( dynamic_cast<const SwVirtFlyDrawObj*>( pOldObj) != nullptr )
1447 OSL_ENSURE( pTmp,
"Where's my Master?" );
1451 if(
auto pCaptionObj = dynamic_cast<SdrCaptionObj*>( pOldObj))
1452 aNullPt = pCaptionObj->GetTailPos();
1454 aNullPt = aOldObjRect.TopLeft();
1507 if(GraphicType::NONE != rGraphic.
GetType() && GraphicType::Default != rGraphic.
GetType())
1541 pView->
Paste(*pModel, aPos,
nullptr, SdrInsertFlags::NONE);
1546 const Point aNull( 0, 0 );
1547 for(
size_t i=0;
i < nCnt; ++
i )
1557 if( dynamic_cast<const SdrUnoObj*>( pObj) !=
nullptr )
1595 if(dynamic_cast< SdrGrafObj* >(pObj))
1607 pNewGrafObj->SetGraphicLink(rURL);
1609 pResult = pNewGrafObj;
1613 pView->
AddUndo(std::make_unique<SdrUndoAttrObj>(*pObj));
static SwFrameFormat * getOtherTextBoxFormat(const SwFrameFormat *pFormat, sal_uInt16 nType, const SdrObject *pObject=nullptr)
If we have an associated TextFrame, then return that.
bool IsTableComplex() const
Instances of SwFields and those derived from it occur 0 to n times.
SwFrame * FindFooterOrHeader()
const SwEndNode * EndOfSectionNode() const
Starts a section of nodes in the document model.
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
bool GotoPage(sal_uInt16 nPage)
bool Paste(SwDoc &rClpDoc, bool bNestedTable=false)
Base class of the Writer layout elements.
Represents the visualization of a paragraph.
SwNode & GetNode(bool bPoint=true) const
virtual const SwFlyFrameFormat * GetFormat() const override
SwNodeOffset EndOfSectionIndex() const
size_t GetMarkCount() const
Marks a position in the document model.
virtual const tools::Rectangle & GetCurrentBoundRect() const
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)...
void SetDesignMode(bool bOn=true)
const SwTableBox * GetTableBox(const OUString &rName, const bool bPerformValidCheck=false) const
bool UpdateParRsid(SwTextNode *pTextNode, sal_uInt32 nVal=0)
void SaveTableBoxContent(const SwPosition *pPos=nullptr)
bool Set(const SfxItemSet &, bool bDeep=true)
void PastePages(SwFEShell &rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage)
Paste some pages into another doc - used in mailmerge.
void ReplaceObjectAtView(SdrObject *pOldObj, SdrPageView &rPV, SdrObject *pNewObj, bool bMark=true)
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact)
virtual void SetRedlineFlags_intern(RedlineFlags eMode)=0
Set a new redline mode.
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)
virtual bool Paste(const SdrModel &rMod, const Point &rPos, SdrObjList *pLst, SdrInsertFlags nOptions)
SdrObject * CloneSdrObj(const SdrObject &, bool bMoveWithinDoc=false, bool bInsInPage=true)
const SwPosition * GetMark() const
bool IsDesignMode() const
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
virtual SwUndoId EndUndo(SwUndoId const eUndoId, SwRewriter const *const pRewriter)=0
Closes undo block.
virtual SwFrameFormat * CopyLayoutFormat(const SwFrameFormat &rSrc, const SwFormatAnchor &rNewAnchor, bool bSetTextFlyAtt, bool bMakeFrames)=0
sal_uInt64 Seek(sal_uInt64 nPos)
bool IsColumnSelection() const
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
void Draw(OutputDevice &rOutDev, const Point &rDestPt) const
SdrMark * GetMark(size_t nNum) const
void Pos(const Point &rNew)
bool GetGrfSize(Size &) const
IDocumentUndoRedo & GetIDocumentUndoRedo()
bool HasShellFocus() const
comphelper::OInterfaceContainerHelper3< css::text::XPasteListener > & GetPasteListeners()
static void Free(SdrObject *&_rpObject)
SwFlyFrame * GetSelectedFlyFrame() const
IDocumentContentOperations const & getIDocumentContentOperations() const
SwLayoutFrame * GetThisFrame(const SwLayoutFrame *pFrame)
bool HasWriterListeners() const
The root element of a Writer document layout.
SAL_DLLPRIVATE bool CopyDrawSel(SwFEShell &rDestShell, const Point &rSttPt, const Point &rInsPt, bool bIsMove, bool bSelectInsert)
Methods for copying of draw objects.
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 >)
const SwFrameFormats * GetSpzFrameFormats() const
void ClearBoxNumAttrs(const SwNodeIndex &rNode)
bool InsertObjectAtView(SdrObject *pObj, SdrPageView &rPV, SdrInsertFlags nOptions=SdrInsertFlags::NONE)
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(156)
const OUString & GetName() const
void ImpSetAnchorPos(const Point &rPnt)
virtual const tools::Rectangle & GetSnapRect() const
void SelectFlyFrame(SwFlyFrame &rFrame)
virtual void LockExpFields()=0
IDocumentContentOperations & getIDocumentContentOperations()
Provides access to the content operations interface.
virtual void UpdateExpFields(SwTextField *pField, bool bUpdateRefFields)=0
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
virtual bool GetModelPositionForViewPoint(SwPosition *, Point &, SwCursorMoveState *=nullptr, bool bTestBackground=false) const override
Primary passes the call to the first page.
SwTableNode * GetTableNode()
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(159)
rtl::Reference< SwDoc > mxDoc
The document; never 0.
bool Delete(bool isArtificialSelection=false)
Delete content of all ranges.
const SwRect & getFrameArea() const
const SwTextFormatColl * GetDfltTextFormatColl() const
check if target position is in fly anchored at source range
void SetGraphic(const Graphic &rGrf)
virtual void DelLayoutFormat(SwFrameFormat *pFormat)=0
virtual bool IsExpFieldsLocked() const =0
virtual void DoUndo(bool const bDoUndo)=0
Enable/Disable Undo.
const SwTable & GetTable() const
static bool isTextBox(const SwFrameFormat *pFormat, sal_uInt16 nType, const SdrObject *pObject=nullptr)
Is the frame format a text box?
SwNodeOffset GetIndex() const
SwFlyFrame * FindFlyFrame()
const IDocumentDrawModelAccess & getIDocumentDrawModelAccess() const
Provides access to the document draw model interface.
bool IsUpperOf(const SwFlyFrame &_rLower) const
bool MovePage(SwWhichPage, SwPosPage)
GDIMetaFile GetMarkedObjMetaFile(bool bNoVDevIfOneMtfMarked=false) const
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
SdrObject * GetMarkedSdrObj() const
PaM is Point and Mark: a selection of the document model.
const SfxItemPool & GetAttrPool() const
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
virtual void SetLayer(SdrLayerID nLayer)
comphelper::OInterfaceContainerHelper3< css::text::XPasteListener > m_aPasteListeners
bool ParkTableCursor()
Invalidate cursors.
virtual SwUndoId StartUndo(SwUndoId const eUndoId, SwRewriter const *const pRewriter)=0
Opens undo block.
bool IsContentFrame() const
void MakeUniqueNumRules(const SwPaM &rPaM)
void Copy(SwDoc &rClpDoc, const OUString *pNewClpText=nullptr)
Copy and Paste methods for internal clipboard.
void GetTableSel(const SwCursorShell &rShell, SwSelBoxes &rBoxes, const SwTableSearchType eSearchType)
SwContentFrame * GetLastSub(const SwLayoutFrame *pLayout)
const SwPosition * GetPoint() const
virtual bool CopyRange(SwPaM &rPam, SwPosition &rPos, SwCopyFlags flags) const =0
Copy a selected content range to a position.
GraphicType GetType() const
SwIndex & Assign(SwIndexReg *, sal_Int32)
const Graphic & GetGraphic() const
SwPageFrame * FindPageFrame()
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(58)
void Push()
store a copy of the current cursor on the cursor stack
sal_uInt16 GetPhyPageNum() const
Phy: real page count.
bool CopySelToDoc(SwDoc &rInsDoc)
For copying via ClipBoard: If table is copied into table, move all cursors away from it...
SwContentNode * GetContentNode()
SwNodeOffset GetIndex() const
const SdrMarkList & GetMarkedObjectList() const
void SetOrigin(const Point &rOrigin)
const SwPageDesc & GetPageDesc(size_t i) const
DECL_LISTENERMULTIPLEXER_END void SAL_CALL inserted(::sal_Int32 ID) override
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
bool SetAttributes(const SfxItemSet &rSet, bool bReplaceAll=false)
const SdrPage * GetPage(sal_uInt16 nPgNum) const
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
void SetMergedItemSetAndBroadcast(const SfxItemSet &rSet, bool bClearAllItems=false)
Marks a character position inside a document model node.
void SetSelection(const SwPaM &rCursor)
void Undo(sal_uInt16 const nCount=1, sal_uInt16 nOffset=0)
SdrModel & getSdrModelFromSdrObject() const
void SetCurrentObj(SdrObjKind nIdent, SdrInventor nInvent=SdrInventor::Default)
sal_uInt32 GetOrdNum() const
static void lcl_ConvertSdrOle2ObjsToSdrGrafObjs(SdrModel &_rModel)
bool IsNoTextNode() const
Marks a node in the document model.
bool UpDown(bool bUp, sal_uInt16 nCnt, Point const *pPt, tools::Long nUpDownX, SwRootFrame &rLayout)
ring_container GetRingContainer()
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
const Graphic * GetGraphic(bool bWait=true) const
stay with the cursor inside text
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
SwContentFrame * GetFirstSub(const SwLayoutFrame *pLayout)
const SwPosition * Start() const
bool Contains(const Point &rPOINT) const
virtual SdrLayerID GetLayer() const
const SwNodeIndex * GetContentIdx() const
SAL_DLLPRIVATE bool ImpEndCreate()
IDocumentUndoRedo const & GetIDocumentUndoRedo() const
Provides access to the document undo/redo interface.
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SwTextNode is a paragraph in the document model.
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
virtual SwDrawFrameFormat * InsertDrawObj(const SwPaM &rRg, SdrObject &rDrawObj, const SfxItemSet &rFlyAttrSet)=0
Insert a DrawObject.
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
static void ReplaceMarkedDrawVirtObjs(SdrMarkView &_rMarkView)
replace marked -objects by its reference object for delete marked objects.
virtual SdrObject * ReplaceObject(SdrObject *pNewObj, size_t nObjNum)
SwDrawView * GetDrawView()
general base class for all free-flowing frames
virtual void NbcSetSnapRect(const tools::Rectangle &rRect)
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...
SwTextFrame * FindMaster() const
bool GetDrawObjGraphic(SotClipboardFormatId nFormat, Graphic &rGrf) const
Get selected DrawObj as graphics (MetaFile/Bitmap).
vcl::Window * GetWin() const
sal_uInt16 GetCntType() const
Determine form of content. Return Type at CurrentCursor->SPoint.
virtual void NbcMove(const Size &rSiz)
virtual bool DelFullPara(SwPaM &)=0
Delete full paragraphs.
sal_Int32 GetIndex() const
const SfxItemSet & GetMergedItemSet() const
const SwPosition * End() const
virtual SdrObject * CloneSdrObject(SdrModel &rTargetModel) const
const SwRect & GetCharRect() const
SwTableBox is one table cell in the document model.
void PaMCorrAbs(const SwPaM &rRange, const SwPosition &rNewPos)
Function declarations so that everything below the CursorShell can move the Cursor once in a while...
void Delete(const SwNodeIndex &rPos, SwNodeOffset nNodes=SwNodeOffset(1))
delete nodes
size_t IsObjSelected() const
static const Point & lcl_FindBasePos(const SwFrame *pFrame, const Point &rPt)
bool HasDrawView() const
New Interface for StarView Drawing.
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
BitmapEx GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked=false, const sal_uInt32 nMaximumQuadraticPixels=500000, const std::optional< Size > &rTargetDPI=std::nullopt) const
static void syncFlyFrameAttr(SwFrameFormat &rShape, SfxItemSet const &rSet, SdrObject *pObj)
Similar to syncProperty(), but used by the internal API (e.g. for UI purposes).
const Point & GetAnchorPos() const
const SwStartNode * FindTableBoxStartNode() const
SdrObject * getParentSdrObjectFromSdrObject() const
virtual void CallSwClientNotify(const SfxHint &rHint) const override
SdrPageView * GetSdrPageView() const
SwTableNode * FindTableNode()
Search table node, in which it is.
bool Copy(SwEditShell &rDestShell)
Copy content of all ranges at current position of cursor to given Shell.
SwPageDesc * FindPageDescByName(const OUString &rName, bool bGetFromPool=false, size_t *pPos=nullptr)
const SwStartNode * FindFlyStartNode() const
virtual void SetSnapRect(const tools::Rectangle &rRect)
SVXCORE_DLLPUBLIC bool SvxDrawingLayerImport(SdrModel *pModel, const css::uno::Reference< css::io::XInputStream > &xInputStream)
reference_type * get() const
virtual RedlineFlags GetRedlineFlags() const =0
Query the currently set redline mode.
#define SAL_WARN(area, stream)
const SfxItemPool & GetItemPool() const
virtual void NbcSetAnchorPos(const Point &rPnt)
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
virtual SwFieldType * GetSysFieldType(const SwFieldIds eWhich) const =0
sal_uInt16 GetPageNumber(const Point &rPoint) const
Page number of the page containing Point, O if no page.
const SwFrame * GetAnchorFrame() const
bool Pop(PopMode)
delete cursor
SdrObjList * getParentSdrObjListFromSdrObject() const
virtual void UnlockExpFields()=0
virtual void UpdateFields(bool bCloseDB)=0
std::pair< const_iterator, bool > insert(Value &&x)
void ChgCurPageDesc(const SwPageDesc &)
PageDescriptor-interface.
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
::sw::DocumentFieldsManager & GetDocumentFieldsManager()
void StartAllAction()
For all views of this document.
SwRootFrame * GetLayout() const
void GCFieldTypes()
Remove all unreferenced field types of a document.
size_t GetCurPageDesc(const bool bCalcFrame=true) const
Point GetFrameAnchorPos(bool bIgnoreFlysAnchoredAtThisFrame) const
returns the position for anchors based on frame direction
SdrModel * GetModel() const
virtual void NbcSetRelativePos(const Point &rPnt)
SdrObjUserCall * GetUserCall() const
virtual SdrObject * getSdrObjectFromSdrObjList() const
Point & GetCursorDocPos() const
bool IsGroupEntered() const
SwContentNode * GoNext(SwNodeIndex *) const
bool IsFrameSelected() const
sal_uInt16 GetPageCount() const
const SwAttrPool & GetAttrPool() const
SdrPageView * GetPageView()
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
const Graphic * GetGraphic() const
SwTextNode * MakeTextNode(const SwNodeIndex &rWhere, SwTextFormatColl *pColl, bool bNewFrames=true)
Implementations of "Make...Node" are in the given .cxx-files.
bool m_bDetectedRangeSegmentation false
void MoveMarkedObj(const Size &rSiz, bool bCopy=false)
const SwFormatFlyCnt & GetFlyCnt() const
Base class of the Writer document model elements.