22 #include <osl/diagnose.h>
52 const OUString& rMimeType,
const uno::Any & rValue )
56 OSL_ENSURE(
false,
"DataChanged without ContentNode" );
60 SwDoc& rDoc = m_pContentNode->GetDoc();
61 if( rDoc.
IsInDtor() || ChkNoDataFlag() )
68 if( m_pContentNode->IsNoTextNode() &&
74 if( rValue.
hasValue() && ( rValue >>= sState ))
77 switch( sState.toInt32() )
85 if( nEvent != SvMacroItemId::NONE &&
nullptr != ( pFormat = m_pContentNode->GetFlyFormat() ))
96 bool bFrameInPaint =
false;
101 if (m_pContentNode->IsGrfNode())
104 assert(pSwGrfNode &&
"Error, pSwGrfNode expected when node answers IsGrfNode() with true (!)");
116 ( GraphicType::Default != aGrf.
GetType() ||
117 GraphicType::Default != rGrfObj.
GetType() ) )
134 else if( m_pContentNode->IsOLENode() )
137 if ( !bUpdate || bFrameInPaint )
150 std::unique_ptr<CurrShell> pCurr;
154 Size aSz = rOrigGrfSize;
161 if (
nullptr != pFormat)
182 if( rOldAttr.
GetSize() != aCalcSz )
204 const sal_uInt16 nBrowseWidth =
208 pLayout->
Resize( nBrowseWidth,
true,
true,
227 if( !GetObj() && ( bNativFormat || ( !IsSynchron() && bWaitForData ) ))
240 (
void)GetObj()->GetData( aValue, aMimeType, !IsSynchron() && bWaitForData );
242 if( bWaitForData && !GetObj() )
244 OSL_ENSURE(
false,
"The SvxFileObject was deleted in a GetData!" );
255 else if( !IsSynchron() && bWaitForData )
259 SetSynchron(
false );
269 if( m_pContentNode && !m_pContentNode->GetDoc().IsInDtor() )
272 if( m_pContentNode->IsGrfNode() )
273 static_cast<SwGrfNode*>(m_pContentNode)->ReleaseLink();
275 SvBaseLink::Closed();
282 SwFrameFormat *
const pFormat = m_pContentNode->GetFlyFormat();
288 ((RndStdIds::FLY_AS_CHAR == rAnchor.
GetAnchorId()) ||
289 (RndStdIds::FLY_AT_CHAR == rAnchor.
GetAnchorId()) ||
290 (RndStdIds::FLY_AT_FLY == rAnchor.
GetAnchorId()) ||
291 (RndStdIds::FLY_AT_PARA == rAnchor.
GetAnchorId())))
299 OSL_ENSURE(
false,
"GetAnchor is not shadowed" );
Marks a position in the document model.
bool IsLinkInServer(const SwBaseLink *) const
void setWidth(tools::Long nWidth)
bool IsFrameInPaint() const
virtual ~SwBaseLink() override
IDocumentLinksAdministration const & getIDocumentLinksAdministration() const
virtual bool IsInRange(sal_uLong nSttNd, sal_uLong nEndNd) const
virtual const SwNode * GetAnchor() const
constexpr tools::Long Width() const
sal_uInt16 CallEvent(SvMacroItemId nEvent, const SwCallMouseEvent &rCallEvent, bool bChkPtr=false)
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
const SwTable & GetTable() const
bool IsRecursion(const SwBaseLink *pChkLnk) const
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
static bool SetGrfFlySize(const Size &rGrfSz, SwGrfNode *pGrfNd, const Size &rOrigGrfSize)
sal_uInt16 GetBrowseWidthByTable(const SwDoc &rDoc) const
Calculates available width by the table-frame or static GetBrowseWidth if no layout exists...
void SetGraphic(const Graphic &rGraphic)
isolated only way to set GraphicObject to allow more actions when doing so
GraphicType GetType() const
SwEditShell const * GetEditShell() const
bool IsChgTwipSize() const
const char *const aMimeType[]
void TriggerGraphicArrived()
virtual void Closed() override
bool Resize(sal_uInt16 nAbsAvail, bool bRecalc=false, bool bForce=false, sal_uLong nDelay=0)
Recalculation of table widths for available width that has been passed.
static OUString GetFormatMimeType(SotClipboardFormatId nFormat)
virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(const OUString &rMimeType, const css::uno::Any &rValue) override
void SetTwipSize(const Size &rSz)
bool GetGraphicFromAny(const OUString &rMimeType, const css::uno::Any &rValue, Graphic &rGrf, weld::Window *pParentWin)
const GraphicObject & GetGrfObj(bool bWait=false) const
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
GraphicType GetType() const
virtual Size GetTwipSize() const override
void Set(SwCallEventObjectType eTyp, const SwFrameFormat *pFormat)
sal_uInt16 DecGrfsThatResize()
constexpr tools::Long Height() const
virtual const SwViewShell * GetCurrentViewShell() const =0
Returns the layout set at the document.
static SotClipboardFormatId GetFormatIdFromMimeType(const OUString &rMimeType)
SwHTMLTableLayout * GetHTMLTableLayout()
tools::Long AdjustWidth(tools::Long n)
void SetSize(const Size &rSize)
tools::Long AdjustHeight(tools::Long n)
SwTableNode * FindTableNode()
Search table node, in which it is.
sal_uInt16 CalcLineSpace(SvxBoxItemLine nLine, bool bEvenIfNoLine=false) const
virtual sfx2::LinkManager & GetLinkManager()=0
void setHeight(tools::Long nHeight)
static SotClipboardFormatId RegisterStatusInfoId()
SwFrameFormat * GetFlyFormat() const
If node is in a fly return the respective format.
#define HTMLTABLE_RESIZE_NOW
const Size & GetSize() const
bool SwapIn(bool bWaitForData=false, bool bNativFormat=false)
Size GetGraphicSizeTwip(const Graphic &rGraphic, vcl::RenderContext *pOutDev)
Base class of the Writer document model elements.