diff options
author | Armin Le Grand <alg@apache.org> | 2012-05-15 10:16:23 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-03-16 10:18:02 +0000 |
commit | bd55f05b332c1573bd410fd9e21ea7fcf977e1b0 (patch) | |
tree | 08f503f79525d95d88b36a9546b1e41cc00b1cfb /sw/inc/ndgrf.hxx | |
parent | 409ba4cc0b55e3dc1d3a08c2fb543bc59c4c0da9 (diff) |
Resolves: #i118780# Moved ObjectInfoPrimitive2D extractor to drawinglayer...
changed name to be the filename only, added code to SW to set Title and Desc
Conflicts:
drawinglayer/Library_drawinglayer.mk
drawinglayer/Package_inc.mk
svx/source/svdraw/svdograf.cxx
sw/inc/ndgrf.hxx
sw/source/core/doc/doc.cxx
sw/source/core/doc/notxtfrm.cxx
sw/source/core/docnode/swbaslnk.cxx
sw/source/core/graphic/ndgrf.cxx
sw/source/filter/rtf/rtffly.cxx
Change-Id: Id433031958529498441574dafe2fbd5261371efc
Notes
Notes:
merged as: 977a0eff5415a2a4716e02bfab8e69ffb64ad7ce
Diffstat (limited to 'sw/inc/ndgrf.hxx')
-rw-r--r-- | sw/inc/ndgrf.hxx | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx index bf01d924ce46..e970615e9fe8 100644 --- a/sw/inc/ndgrf.hxx +++ b/sw/inc/ndgrf.hxx @@ -37,7 +37,7 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode { friend class SwNodes; - GraphicObject aGrfObj; + GraphicObject maGrfObj; GraphicObject *mpReplacementGraphic; ::sfx2::SvBaseLinkRef refLink; ///< If graphics only as link then pointer is set. Size nGrfSize; @@ -76,7 +76,7 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode void InsertLink( const String& rGrfName, const String& rFltName ); sal_Bool ImportGraphic( SvStream& rStrm ); - sal_Bool HasStreamName() const { return aGrfObj.HasUserData(); } + sal_Bool HasStreamName() const { return maGrfObj.HasUserData(); } /** adjust return type and rename method to indicate that its an private one. */ @@ -128,20 +128,31 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode public: virtual ~SwGrfNode(); - const Graphic& GetGrf() const { return aGrfObj.GetGraphic(); } - const GraphicObject& GetGrfObj() const { return aGrfObj; } - GraphicObject& GetGrfObj() { return aGrfObj; } + const Graphic& GetGrf() const { return maGrfObj.GetGraphic(); } + const GraphicObject& GetGrfObj() const { return maGrfObj; } const GraphicObject* GetReplacementGrfObj() const; - virtual SwCntntNode *SplitCntntNode( const SwPosition & ); + /// isolated only way to set GraphicObject to allow more actions when doing so + void SetGraphic(const Graphic& rGraphic, const String& rLink); + + /// wrappers for non-const calls at GraphicObject + void ReleaseGraphicFromCache() { maGrfObj.ReleaseFromCache(); } + void DrawGraphicWithPDFHandling(OutputDevice& rOutDev, const Point& rPt, const Size& rSz, const GraphicAttr* pGrfAttr = NULL, const sal_uLong nFlags = GRFMGR_DRAW_STANDARD) { maGrfObj.DrawWithPDFHandling(rOutDev, rPt, rSz, pGrfAttr, nFlags); } + void StartGraphicAnimation(OutputDevice* pOut, const Point& rPt, const Size& rSz, long nExtraData = 0, const GraphicAttr* pAttr = NULL, sal_uLong nFlags = GRFMGR_DRAW_STANDARD, OutputDevice* pFirstFrameOutDev = NULL) { maGrfObj.StartAnimation(pOut, rPt, rSz, nExtraData, pAttr, nFlags, pFirstFrameOutDev); } + void StopGraphicAnimation(OutputDevice* pOut = NULL, long nExtraData = 0) { maGrfObj.StopAnimation(pOut, nExtraData); } + + /// allow reaction on change of content of GraphicObject, so always call + /// when GraphicObject content changes + void onGraphicChanged(); + virtual Size GetTwipSize() const; #ifndef _FESHVIEW_ONLY_INLINE_NEEDED void SetTwipSize( const Size& rSz ); sal_Bool IsTransparent() const; - inline sal_Bool IsAnimated() const { return aGrfObj.IsAnimated(); } + inline sal_Bool IsAnimated() const { return maGrfObj.IsAnimated(); } inline sal_Bool IsChgTwipSize() const { return bChgTwipSize; } inline sal_Bool IsChgTwipSizeFromPixel() const { return bChgTwipSizeFromPixel; } @@ -171,7 +182,7 @@ public: /// Remove graphic in order to free memory. short SwapOut(); /// Access to storage stream-name. - void SetStreamName( const String& r ) { aGrfObj.SetUserData( r ); } + void SetStreamName( const String& r ) { maGrfObj.SetUserData( r ); } void SetNewStreamName( const String& r ) { aNewStrmName = r; } /// Is this node selected by any shell? sal_Bool IsSelected() const; |