LCOV - code coverage report
Current view: top level - libreoffice/svx/inc/svx - svdograf.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 4 0.0 %
Date: 2012-12-17 Functions: 0 3 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef _SVDOGRAF_HXX
      21             : #define _SVDOGRAF_HXX
      22             : 
      23             : #include <com/sun/star/io/XInputStream.hpp>
      24             : #include <vcl/graph.hxx>
      25             : #include <svx/svdorect.hxx>
      26             : #include <svtools/grfmgr.hxx>
      27             : #include "svx/svxdllapi.h"
      28             : 
      29             : //////////////////////////////////////////////////////////////////////////////
      30             : // predeclarations
      31             : 
      32             : namespace sdr
      33             : {
      34             :     namespace properties
      35             :     {
      36             :         class GraphicProperties;
      37             :     } // end of namespace properties
      38             :     namespace contact
      39             :     {
      40             :         class ViewObjectContactOfGraphic;
      41             :     } // end of namespace contact
      42             : } // end of namespace sdr
      43             : 
      44             : // -----------
      45             : // - Defines -
      46             : // -----------
      47             : 
      48             : #define SDRGRAFOBJ_TRANSFORMATTR_NONE       0x00000000UL
      49             : #define SDRGRAFOBJ_TRANSFORMATTR_COLOR      0x00000001UL
      50             : #define SDRGRAFOBJ_TRANSFORMATTR_MIRROR     0x00000002UL
      51             : #define SDRGRAFOBJ_TRANSFORMATTR_ROTATE     0x00000004UL
      52             : #define SDRGRAFOBJ_TRANSFORMATTR_ALL        0xffffffffUL
      53             : 
      54             : // ---------------------
      55             : // - SdrGrafObjGeoData -
      56             : // ---------------------
      57             : 
      58             : // #109872#
      59           0 : class SdrGrafObjGeoData : public SdrTextObjGeoData
      60             : {
      61             : public:
      62             :     sal_Bool                    bMirrored;
      63             : 
      64           0 :     SdrGrafObjGeoData()
      65           0 :     :   bMirrored(false)
      66             :     {
      67           0 :     }
      68             : };
      69             : 
      70             : // --------------
      71             : // - SdrGrafObj -
      72             : // --------------
      73             : 
      74             : class GraphicObject;
      75             : class SdrGraphicLink;
      76             : 
      77             : /**
      78             :  * This class represents an embedded or linked bitmap graphic object.
      79             :  */
      80             : class SVX_DLLPUBLIC SdrGrafObj : public SdrRectObj
      81             : {
      82             : private:
      83             :     // to allow sdr::properties::GraphicProperties access to SetXPolyDirty()
      84             :     friend class sdr::properties::GraphicProperties;
      85             : 
      86             :     // to allow sdr::contact::ViewObjectContactOfGraphic access to ImpUpdateGraphicLink()
      87             :     friend class sdr::contact::ViewObjectContactOfGraphic;
      88             :     friend class SdrGraphicLink;
      89             : 
      90             : private:
      91             :     virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
      92             :     virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties();
      93             : 
      94             :     void                    ImpSetAttrToGrafInfo(); // Werte vom Pool kopieren
      95             :     GraphicAttr             aGrafInfo;
      96             : 
      97             :     rtl::OUString aFileName;          // Wenn es sich um einen Link handelt, steht hier der Dateiname drin.
      98             :     rtl::OUString aFilterName;
      99             :     GraphicObject*          pGraphic;           // Zur Beschleunigung von Bitmapausgaben, besonders von gedrehten.
     100             :     GraphicObject*          mpReplacementGraphic;
     101             :     SdrGraphicLink*         pGraphicLink;       // Und hier noch ein Pointer fuer gelinkte Grafiken
     102             :     bool                    bMirrored:1;        // True bedeutet, die Grafik ist horizontal, d.h. ueber die Y-Achse gespiegelt auszugeben.
     103             : 
     104             :     // #111096#
     105             :     // Flag for allowing text animation. Default is sal_true.
     106             :     bool mbGrafAnimationAllowed:1;
     107             : 
     108             :     // #i25616#
     109             :     bool mbInsidePaint:1;
     110             :     bool mbIsPreview:1;
     111             : 
     112             : private:
     113             : 
     114             :     void                    ImpLinkAnmeldung();
     115             :     void                    ImpLinkAbmeldung();
     116             :     bool                    ImpUpdateGraphicLink( bool bAsynchron = true ) const;
     117             :     void                    ImpSetLinkedGraphic( const Graphic& rGraphic );
     118             :                             DECL_LINK( ImpSwapHdl, GraphicObject* );
     119             : 
     120             : public:
     121             :                             TYPEINFO();
     122             : 
     123             :                             SdrGrafObj();
     124             :                             SdrGrafObj(const Graphic& rGrf);
     125             :                             SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect);
     126             :     virtual                 ~SdrGrafObj();
     127             : 
     128             :     void                    SetGraphicObject( const GraphicObject& rGrfObj );
     129             :     const GraphicObject&    GetGraphicObject(bool bForceSwapIn = false) const;
     130             :     const GraphicObject*    GetReplacementGraphicObject() const;
     131             : 
     132             :     void                    NbcSetGraphic(const Graphic& rGrf);
     133             :     void                    SetGraphic(const Graphic& rGrf);
     134             :     const Graphic&          GetGraphic() const;
     135             : 
     136             :     Graphic                 GetTransformedGraphic( sal_uIntPtr nTransformFlags = SDRGRAFOBJ_TRANSFORMATTR_ALL ) const;
     137             : 
     138             :     GraphicType             GetGraphicType() const;
     139             : 
     140             :     // #111096#
     141             :     // Keep ATM for SD.
     142             :     bool IsAnimated() const;
     143             :     bool IsEPS() const;
     144             :     bool IsSwappedOut() const;
     145             : 
     146             :     const MapMode&          GetGrafPrefMapMode() const;
     147             :     const Size&             GetGrafPrefSize() const;
     148             : 
     149             :     void                    SetGrafStreamURL( const String& rGraphicStreamURL );
     150             :     String                  GetGrafStreamURL() const;
     151             : 
     152             :     void                    ForceSwapIn() const;
     153             :     void                    ForceSwapOut() const;
     154             : 
     155             :     void                    SetGraphicLink(const rtl::OUString& rFileName, const String& rFilterName);
     156             :     void                    ReleaseGraphicLink();
     157             :     bool IsLinkedGraphic() const;
     158             : 
     159             :     const rtl::OUString& GetFileName() const;
     160             :     const rtl::OUString& GetFilterName() const;
     161             : 
     162             :     void                    StartAnimation(OutputDevice* pOutDev, const Point& rPoint, const Size& rSize, long nExtraData=0L);
     163             : 
     164             :     virtual void            TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
     165             :     virtual sal_uInt16          GetObjIdentifier() const;
     166             : 
     167             :     virtual void            TakeObjNameSingul(String& rName) const;
     168             :     virtual void            TakeObjNamePlural(String& rName) const;
     169             : 
     170             :     // #i25616#
     171             :     virtual basegfx::B2DPolyPolygon TakeXorPoly() const;
     172             : 
     173             :     virtual SdrGrafObj* Clone() const;
     174             :     SdrGrafObj&             operator=(const SdrGrafObj& rObj);
     175             : 
     176             :     virtual sal_uInt32 GetHdlCount() const;
     177             :     virtual SdrHdl*         GetHdl(sal_uInt32 nHdlNum) const;
     178             : 
     179             :     virtual void            NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
     180             :     virtual void            NbcRotate(const Point& rRef, long nWink, double sn, double cs);
     181             :     virtual void            NbcMirror(const Point& rRef1, const Point& rRef2);
     182             :     virtual void            NbcShear (const Point& rRef, long nWink, double tn, bool bVShear);
     183             :     virtual void            NbcSetSnapRect(const Rectangle& rRect);
     184             :     virtual void            NbcSetLogicRect(const Rectangle& rRect);
     185             :     virtual SdrObjGeoData*  NewGeoData() const;
     186             :     virtual void            SaveGeoData(SdrObjGeoData& rGeo) const;
     187             :     virtual void            RestGeoData(const SdrObjGeoData& rGeo);
     188             : 
     189             :     bool                    HasGDIMetaFile() const;
     190             : 
     191             :     virtual void            SetPage(SdrPage* pNewPage);
     192             :     virtual void            SetModel(SdrModel* pNewModel);
     193             : 
     194             :     bool isEmbeddedSvg() const;
     195             :     GDIMetaFile getMetafileFromEmbeddedSvg() const;
     196             : 
     197             :     virtual SdrObject*      DoConvertToPolyObj(sal_Bool bBezier, bool bAddText) const;
     198             : 
     199             :     virtual void            AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly = false );
     200             : 
     201             :     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
     202             : 
     203             :     bool IsMirrored() const;
     204             :     void SetMirrored( bool _bMirrored );
     205             : 
     206             :     // #111096#
     207             :     // Access to GrafAnimationAllowed flag
     208             :     void SetGrafAnimationAllowed(bool bNew);
     209             : 
     210             :     ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > getInputStream();
     211             : 
     212             :     // #i103116# FullDrag support
     213             :     virtual SdrObject* getFullDragClone() const;
     214             : };
     215             : 
     216             : #endif //_SVDOGRAF_HXX
     217             : 
     218             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10