42#include <com/sun/star/embed/EmbedStates.hpp>
45#include <osl/diagnose.h>
54 mpCurrentView( nullptr )
117 bool bHeader =
false;
121 case RndStdIds::HEADER:
122 case RndStdIds::HEADERL:
123 case RndStdIds::HEADERR:
128 case RndStdIds::FOOTER:
131 (bHeader ?
"Right header" :
"Right footer"),
140 ? ( eRequest == RndStdIds::HEADERL
142 : eRequest == RndStdIds::HEADERR
159 case RndStdIds::DRAW_OBJECT:
168 std::make_unique<SwUndoInsLayFormat>(pFormat,
SwNodeOffset(0), 0));
173#if OSL_DEBUG_LEVEL > 0
174 case RndStdIds::FLY_AT_PAGE:
175 case RndStdIds::FLY_AT_CHAR:
176 case RndStdIds::FLY_AT_FLY:
177 case RndStdIds::FLY_AT_PARA:
178 case RndStdIds::FLY_AS_CHAR:
179 OSL_FAIL(
"use new interface instead: SwDoc::MakeFlySection!" );
185 "LayoutFormat was requested with an invalid Request." );
224 catch ( uno::Exception& )
234 const sal_uInt16 nWh = pFormat->
Which();
254 std::vector<SwFrameFormat*> aToDeleteFrameFormats;
260 if ( rAnch.
GetAnchorId() == RndStdIds::FLY_AT_FLY &&
263 aToDeleteFrameFormats.push_back(pSpz);
268 while ( !aToDeleteFrameFormats.empty() )
273 aToDeleteFrameFormats.pop_back();
327 OSL_ENSURE( bFly || bDraw,
"this method only works for fly or draw" );
335 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())) &&
366 SwXFrame::GetOrCreateSdrObject(*pFormat);
402 OUString sOld( pDest->
GetName() );
452 if (bSetTextFlyAtt && (RndStdIds::FLY_AS_CHAR == rNewAnchor.
GetAnchorId()))
456 assert(pAnchorNode->
GetTextNode() &&
"sw.core: text node expected");
464 if (pDest->
GetName().isEmpty())
474 pTextBoxes->Clone(&
m_rDoc, rNewAnchor, pDest, bSetTextFlyAtt, bMakeFrames);
virtual void DeleteSection(SwNode *pNode)=0
Delete section containing the node.
virtual void DelLayoutFormat(SwFrameFormat *pFormat)=0
virtual void ResetModified()=0
virtual void SetModified()=0
Must be called manually at changes of format.
virtual bool IsModified() const =0
Changes of document?
virtual SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return "Auto-Collection with ID.
virtual const OUString & GetName() const
bool IsCopyIsMove() const
OUString GetUniqueOLEName() const
SwFlyFrameFormat * MakeFlyFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom)
Create the formats.
IDocumentState const & getIDocumentState() const
OUString GetUniqueGrfName(std::u16string_view rPrefix=std::u16string_view()) const
void SetAttr(const SfxPoolItem &, SwFormat &)
Set attribute in given format.1y If Undo is enabled, the old values is added to the Undo history.
IDocumentContentOperations const & getIDocumentContentOperations() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
const SwFlyFrameFormat * FindFlyByName(const OUString &rName, SwNodeType nNdTyp=SwNodeType::NONE) const
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
SwFrameFormat * CopyFrameFormat(const SwFrameFormat &)
copy the frame format
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
::sw::DocumentContentOperationsManager const & GetDocumentContentOperationsManager() const
void DelFrameFormat(SwFrameFormat *pFormat, bool bBroadcast=false)
const SwAttrPool & GetAttrPool() const
OUString GetUniqueFrameName() const
const SwFrameFormat * GetDfltFrameFormat() const
bool IsInMailMerge() const
SwDrawFrameFormat * MakeDrawFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom)
const sw::FrameFormats< sw::SpzFrameFormat * > * GetSpzFrameFormats() const
bool IsInHeaderFooter(const SwNode &) const
Content, content of frame (header, footer, fly).
void SetNewContentIdx(const SwNodeIndex *pIdx)
const SwNodeIndex * GetContentIdx() const
static void ClearMovedFwdFrames(const SwDoc &_rDoc)
static void ClearMoveBwdLayoutInfo(const SwDoc &p_rDoc)
static void ClearObjsTmpConsiderWrapInfluence(const SwDoc &_rDoc)
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
SwNodeType GetNodeType() const
const SwEndNode * EndOfSectionNode() const
SwNode & GetEndOfAutotext() const
Section for all Flys/Header/Footers.
static SwStartNode * MakeEmptySection(SwNode &rWhere, SwStartNodeType=SwNormalStartNode)
Create an empty section of Start- and EndNote.
SwStartNode * MakeTextSection(const SwNode &rWhere, SwStartNodeType eSttNdTyp, SwTextFormatColl *pColl)
const SwOLEObj & GetOLEObj() const
bool IsOleRef() const
To avoid unnecessary loading of object.
css::uno::Reference< css::embed::XEmbeddedObject > const & GetOleRef()
The root element of a Writer document layout.
Starts a section of nodes in the document model.
const SwFormatFlyCnt & GetFlyCnt() const
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...
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...
SwRootFrame * GetLayout() const
void CopyWithFlyInFly(const SwNodeRange &rRg, SwNode &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...
SwViewShell * mpCurrentView
void ClearSwLayouterEntries()
std::unique_ptr< SwLayouter > mpLayouter
css::frame::Controller for complex layout formatting like footnote/endnote in sections
virtual const SwLayouter * GetLayouter() const override
virtual void SetCurrentViewShell(SwViewShell *pNew) override
!!!The old layout must be deleted!!!
virtual void DelLayoutFormat(SwFrameFormat *pFormat) override
Deletes the denoted format and its content.
virtual void SetLayouter(SwLayouter *pNew) override
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 HasLayout() const override
virtual const SwRootFrame * GetCurrentLayout() const override
virtual ~DocumentLayoutManager() override
DocumentLayoutManager(SwDoc &i_rSwdoc)
virtual SwFrameFormat * MakeLayoutFormat(RndStdIds eRequest, const SfxItemSet *pSet) override
Create a new format whose settings fit to the Request by default.
virtual const SwViewShell * GetCurrentViewShell() const override
Returns the layout set at the document.
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(162)
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(165)
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(58)
constexpr TypedWhichId< SwFormatChain > RES_CHAIN(120)
constexpr TypedWhichId< SwFormatContent > RES_CNTNT(101)
Dialog to specify the properties of date form field.
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
@ RES_POOLCOLL_HEADER
Header Left&Right.
@ RES_POOLCOLL_HEADERL
Header Left.
@ RES_POOLCOLL_HEADERR
Header Right.
@ RES_POOLCOLL_FOOTER
Subgroup footer.