42 #include <com/sun/star/embed/EmbedStates.hpp>
52 mpCurrentView( nullptr )
115 bool bHeader =
false;
119 case RndStdIds::HEADER:
120 case RndStdIds::HEADERL:
121 case RndStdIds::HEADERR:
126 case RndStdIds::FOOTER:
129 (bHeader ?
"Right header" :
"Right footer"),
138 ? ( eRequest == RndStdIds::HEADERL
140 : eRequest == RndStdIds::HEADERR
157 case RndStdIds::DRAW_OBJECT:
166 std::make_unique<SwUndoInsLayFormat>(pFormat, 0, 0));
171 #if OSL_DEBUG_LEVEL > 0
172 case RndStdIds::FLY_AT_PAGE:
173 case RndStdIds::FLY_AT_CHAR:
174 case RndStdIds::FLY_AT_FLY:
175 case RndStdIds::FLY_AT_PARA:
176 case RndStdIds::FLY_AS_CHAR:
177 OSL_FAIL(
"use new interface instead: SwDoc::MakeFlySection!" );
183 "LayoutFormat was requested with an invalid Request." );
222 catch ( uno::Exception& )
232 const sal_uInt16 nWh = pFormat->
Which();
252 std::vector<SwFrameFormat*> aToDeleteFrameFormats;
255 for (
size_t i = 0;
i < pTable->
size(); ++
i )
259 if ( rAnch.
GetAnchorId() == RndStdIds::FLY_AT_FLY &&
262 aToDeleteFrameFormats.push_back( pTmpFormat );
267 while ( !aToDeleteFrameFormats.empty() )
272 aToDeleteFrameFormats.pop_back();
328 OSL_ENSURE( bFly || bDraw,
"this method only works for fly or draw" );
336 bool bMayNotCopy =
false;
340 bool bCheckControlLayer =
false;
343 bCheckControlLayer &&
344 ((RndStdIds::FLY_AT_PARA == rNewAnchor.
GetAnchorId()) || (RndStdIds::FLY_AT_FLY == rNewAnchor.
GetAnchorId()) || (RndStdIds::FLY_AT_CHAR == rNewAnchor.
GetAnchorId())) &&
401 SwNodeType nNdTyp = aRg.aStart.GetNode().GetNodeType();
403 OUString sOld( pDest->
GetName() );
423 aIdx = *pSttNd->EndOfSectionNode();
453 if (bSetTextFlyAtt && (RndStdIds::FLY_AS_CHAR == rNewAnchor.
GetAnchorId()))
468 if (RndStdIds::FLY_AS_CHAR == boxAnchor.
GetAnchorId())
471 boxAnchor.
SetType(RndStdIds::FLY_AT_CHAR);
475 || boxAnchor.
GetAnchorId() == RndStdIds::FLY_AT_PAGE);
477 boxAnchor, bSetTextFlyAtt, bMakeFrames);
479 SwFormatContent aContent(pDestTextBox->GetContent().GetContentIdx()->GetNode().GetStartNode());
485 pDestTextBox->SetOtherTextBoxFormat(pDest);
488 if (pDest->
GetName().isEmpty())
const SwEndNode * EndOfSectionNode() const
Starts a section of nodes in the document model.
OUString GetUniqueGrfName() const
bool IsInMailMerge() const
virtual bool HasLayout() const override
SwNode & GetEndOfAutotext() const
Section for all Flys/Header/Footers.
OUString GetUniqueOLEName() const
Marks a position in the document model.
const SwOLEObj & GetOLEObj() const
virtual void SetModified()=0
Must be called manually at changes of format.
css::uno::Reference< css::embed::XEmbeddedObject > const & GetOleRef()
static void ClearObjsTmpConsiderWrapInfluence(const SwDoc &_rDoc)
OUString GetUniqueFrameName() const
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(57)
SwFrameFormat * CopyFrameFormat(const SwFrameFormat &)
copy the frame format
Content, content of frame (header, footer, fly).
Dialog to specify the properties of date form field.
IDocumentUndoRedo & GetIDocumentUndoRedo()
SwDrawFrameFormat * MakeDrawFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom)
IDocumentContentOperations const & getIDocumentContentOperations() const
The root element of a Writer document layout.
virtual const SwRootFrame * GetCurrentLayout() const override
static SwFrameFormat * getOtherTextBoxFormat(const SwFrameFormat *pFormat, sal_uInt16 nType)
If we have an associated TextFrame, then return that.
const SwFrameFormats * GetSpzFrameFormats() const
void SetNewContentIdx(const SwNodeIndex *pIdx)
bool IsInHeaderFooter(const SwNodeIndex &rIdx) const
SwFlyFrameFormat * MakeFlyFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom)
Create the formats.
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...
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
SwViewShell * mpCurrentView
virtual ~DocumentLayoutManager() override
virtual void DelLayoutFormat(SwFrameFormat *pFormat) override
Deletes the denoted format and its content.
void SetAttr(const SfxPoolItem &, SwFormat &)
Set attribute in given format.1y If Undo is enabled, the old values is added to the Undo history...
sal_uLong GetIndex() const
virtual void DelLayoutFormat(SwFrameFormat *pFormat)=0
SwTextAttr * InsertItem(SfxPoolItem &rAttr, const sal_Int32 nStart, const sal_Int32 nEnd, const SetAttrMode nMode=SetAttrMode::DEFAULT)
create new text attribute from rAttr and insert it
virtual void DeleteSection(SwNode *pNode)=0
Delete section containing the node.
virtual SwFrameFormat * CopyLayoutFormat(const SwFrameFormat &rSrc, const SwFormatAnchor &rNewAnchor, bool bSetTextFlyAtt, bool bMakeFrames) override
Copies the stated format (pSrc) to pDest and returns pDest.
virtual bool DoesUndo() const =0
Is Undo enabled?
virtual const SwViewShell * GetCurrentViewShell() const override
Returns the layout set at the document.
SwStartNode * MakeTextSection(const SwNodeIndex &rWhere, SwStartNodeType eSttNdTyp, SwTextFormatColl *pColl)
virtual void AppendUndo(std::unique_ptr< SwUndo > pUndo)=0
Add new Undo action.
const SwFlyFrameFormat * FindFlyByName(const OUString &rName, SwNodeType nNdTyp=SwNodeType::NONE) const
std::unique_ptr< SwLayouter > mpLayouter
css::frame::Controller for complex layout formatting like footnote/endnote in sections ...
virtual const SwLayouter * GetLayouter() const override
virtual bool IsModified() const =0
Changes of document?
::sw::DocumentContentOperationsManager const & GetDocumentContentOperationsManager() const
static SdrObject * GetOrCreateSdrObject(SwFlyFrameFormat &rFormat)
Marks a character position inside a document model node.
IDocumentState const & getIDocumentState() const
virtual void SetCurrentViewShell(SwViewShell *pNew) override
!!!The old layout must be deleted!!!
Marks a node in the document model.
virtual void SetLayouter(SwLayouter *pNew) override
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
constexpr TypedWhichId< SwFormatContent > RES_CNTNT(95)
const SwNodeIndex * GetContentIdx() const
const SwFrameFormat * GetDfltFrameFormat() const
bool IsOleRef() const
To avoid unnecessary loading of object.
void EraseText(const SwIndex &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...
SwTextNode is a paragraph in the document model.
constexpr TypedWhichId< SwFormatChain > RES_CHAIN(114)
void CopyWithFlyInFly(const SwNodeRange &rRg, const SwNodeIndex &rInsPos, const std::pair< const SwPaM &, const SwPosition & > *pCopiedPaM=nullptr, bool bMakeNewFrames=true, bool bDelRedlines=true, bool bCopyFlyAtFly=false, SwCopyFlags flags=SwCopyFlags::Default) const
note: rRg/rInsPos exclude a partially selected start text node; pCopiedPaM includes a partially selec...
bool IsCopyIsMove() const
static void ClearMoveBwdLayoutInfo(const SwDoc &p_rDoc)
DocumentLayoutManager(SwDoc &i_rSwdoc)
sal_Int32 GetIndex() const
virtual SwFrameFormat * MakeLayoutFormat(RndStdIds eRequest, const SfxItemSet *pSet) override
Create a new format whose settings fit to the Request by default.
virtual SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return "Auto-Collection with ID.
const SwModify * GetRegisteredIn() const
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(157)
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(154)
virtual void CallSwClientNotify(const SfxHint &rHint) const override
void DelFrameFormat(SwFrameFormat *pFormat, bool bBroadcast=false)
void ClearSwLayouterEntries()
SwRootFrame * GetLayout() const
const SwAttrPool & GetAttrPool() const
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
static void ClearMovedFwdFrames(const SwDoc &_rDoc)
virtual void ResetModified()=0
const SwFormatFlyCnt & GetFlyCnt() const
static SwStartNode * MakeEmptySection(const SwNodeIndex &rIdx, SwStartNodeType=SwNormalStartNode)
Create an empty section of Start- and EndNote.
Base class of the Writer document model elements.