29#include <osl/diagnose.h>
64 const Point& rRelAttr,
65 const Point& rRelPos )
69 std::unique_ptr<SwFlyNotify, o3tl::default_delete<SwFlyNotify>> xNotify;
80 aRectFnSet.
SetPos( aFrm, rPoint + rRelPos );
97 if (rHint.
GetId() != SfxHintId::SwLegacyModify)
100 std::pair<std::unique_ptr<SwAttrSetChg>, std::unique_ptr<SwAttrSetChg>> aTweakedChgs;
101 std::pair<const SfxPoolItem*, const SfxPoolItem*> aSuperArgs(
nullptr,
nullptr);
102 switch(pLegacy->GetWhich())
106 auto pOldAttrSetChg =
static_cast<const SwAttrSetChg*
>(pLegacy->m_pOld);
107 auto pNewAttrSetChg =
static_cast<const SwAttrSetChg*
>(pLegacy->m_pNew);
110 && ((SfxItemState::SET == pNewAttrSetChg->GetChgSet()->GetItemState(
RES_SURROUND,
false))
111 || (SfxItemState::SET == pNewAttrSetChg->GetChgSet()->GetItemState(
RES_FRMMACRO,
false))))
113 aTweakedChgs.second = std::make_unique<SwAttrSetChg>(*pOldAttrSetChg);
116 if(aTweakedChgs.second->Count())
118 aTweakedChgs.first = std::make_unique<SwAttrSetChg>(*pOldAttrSetChg);
121 aSuperArgs = std::pair<const SfxPoolItem*, const SfxPoolItem*>(aTweakedChgs.first.get(), aTweakedChgs.second.get());
123 }
else if (pNewAttrSetChg && pNewAttrSetChg->GetChgSet()->Count())
124 aSuperArgs = std::pair<const SfxPoolItem*, const SfxPoolItem*>(pLegacy->m_pOld, pLegacy->m_pNew);
131 aSuperArgs = std::pair<const SfxPoolItem*, const SfxPoolItem*>(pLegacy->m_pOld, pLegacy->m_pNew);
133 if(aSuperArgs.second)
149 { pContent->
Calc(pRenderContext);
179 pFormat->LockModify();
181 pFormat->UnlockModify();
210 OSL_ENSURE( pPage,
"Register Flys without pages?" );
@ CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
constexpr tools::Long X() const
const SwFrame * GetAnchorFrame() const
void SetCurrRelPos(Point _aRelPos)
const SwRect & GetObjRectWithSpaces() const
method to determine object area inclusive its spacing
void InvalidateObjRectWithSpaces() const
const Point & GetCurrRelPos() const
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
SwContentFrame * GetNextContentFrame() const
general base class for all free-flowing frames
const SwVirtFlyDrawObj * GetVirtDrawObj() const
virtual void DestroyImpl() override
void MakeContentPos(const SwBorderAttrs &rAttrs)
virtual const SwFlyFrameFormat * GetFormat() const override
virtual SwFrameFormat & GetFrameFormat() override
virtual void SwClientNotify(const SwModify &rMod, const SfxHint &rHint) override
virtual void Format(vcl::RenderContext *pRenderContext, const SwBorderAttrs *pAttrs=nullptr) override
"Formats" the Frame; Frame and PrtArea.
void MakePrtArea(const SwBorderAttrs &rAttrs)
bool m_bInCnt
RndStdIds::FLY_AS_CHAR, anchored as character.
virtual const IDocumentDrawModelAccess & getIDocumentDrawModelAccess() override
virtual void Calc(vcl::RenderContext *pRenderContext) const override
virtual void NotifyBackground(SwPageFrame *pPage, const SwRect &rRect, PrepareHint eHint) override
method to trigger notification of 'background'
virtual ~SwFlyInContentFrame() override
SwFlyInContentFrame(SwFlyFrameFormat *, SwFrame *, SwFrame *pAnchor)
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
virtual void ActionOnInvalidation(const InvalidationType _nInvalid) override
method to perform additional actions on an invalidation
virtual void MakeObjPos() override
Calculate object position.
Point const & GetRelPos() const
virtual void MakeAll(vcl::RenderContext *pRenderContext) override
void SetRefPoint(const Point &rPoint, const Point &rRelAttr, const Point &rRelPos)
virtual void DestroyImpl() override
virtual void Format(vcl::RenderContext *pRenderContext, const SwBorderAttrs *pAttrs=nullptr) override
Here the content gets formatted initially.
const SwRect & getFrameArea() const
bool isFrameAreaPositionValid() const
const SwRect & getFramePrintArea() const
void setFramePrintAreaValid(bool bNew)
void setFrameAreaPositionValid(bool bNew)
bool isFramePrintAreaValid() const
bool isFrameAreaSizeValid() const
void setFrameAreaSizeValid(bool bNew)
Base class of the Writer layout elements.
virtual bool Prepare(const PrepareHint ePrep=PrepareHint::Clear, const void *pVoid=nullptr, bool bNotify=true)
InvalidationType
enumeration for the different invalidations #i28701#
virtual void Calc(vcl::RenderContext *pRenderContext) const
static SwCache & GetCache()
void InvalidatePage(const SwPageFrame *pPage=nullptr) const
Invalidates the page in which the Frame is currently placed.
SwRootFrame * getRootFrame()
SwPageFrame * FindPageFrame()
const SwContentFrame * ContainsContent() const
Checks if the frame contains one or more ContentFrame's anywhere in his subsidiary structure; if so t...
A page of the document layout.
void SetPos(SwRect &rRect, const Point &rNew) const
Of course Writer needs its own rectangles.
void Left(const tools::Long nLeft)
void Width(tools::Long nNew)
constexpr TypedWhichId< SwAttrSetChg > RES_ATTRSET_CHG(169)
constexpr TypedWhichId< SvxMacroItem > RES_FRMMACRO(114)
constexpr TypedWhichId< SwFormatSurround > RES_SURROUND(107)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
@ FlyFrameAttributesChanged