LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/include/svx - svdograf.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 4 0.0 %
Date: 2013-07-09 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             : namespace sdr
      30             : {
      31             :     namespace properties
      32             :     {
      33             :         class GraphicProperties;
      34             :     } // end of namespace properties
      35             :     namespace contact
      36             :     {
      37             :         class ViewObjectContactOfGraphic;
      38             :     } // end of namespace contact
      39             : } // end of namespace sdr
      40             : 
      41             : #define SDRGRAFOBJ_TRANSFORMATTR_NONE       0x00000000UL
      42             : #define SDRGRAFOBJ_TRANSFORMATTR_COLOR      0x00000001UL
      43             : #define SDRGRAFOBJ_TRANSFORMATTR_MIRROR     0x00000002UL
      44             : #define SDRGRAFOBJ_TRANSFORMATTR_ROTATE     0x00000004UL
      45             : #define SDRGRAFOBJ_TRANSFORMATTR_ALL        0xffffffffUL
      46             : 
      47           0 : class SdrGrafObjGeoData : public SdrTextObjGeoData
      48             : {
      49             : public:
      50             :     sal_Bool                    bMirrored;
      51             : 
      52           0 :     SdrGrafObjGeoData()
      53           0 :     :   bMirrored(false)
      54             :     {
      55           0 :     }
      56             : };
      57             : 
      58             : class GraphicObject;
      59             : class SdrGraphicLink;
      60             : 
      61             : /**
      62             :  * This class represents an embedded or linked bitmap graphic object.
      63             :  */
      64             : class SVX_DLLPUBLIC SdrGrafObj : public SdrRectObj
      65             : {
      66             : private:
      67             :     // to allow sdr::properties::GraphicProperties access to SetXPolyDirty()
      68             :     friend class sdr::properties::GraphicProperties;
      69             : 
      70             :     // to allow sdr::contact::ViewObjectContactOfGraphic access to ImpUpdateGraphicLink()
      71             :     friend class sdr::contact::ViewObjectContactOfGraphic;
      72             :     friend class SdrGraphicLink;
      73             : 
      74             : private:
      75             :     virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
      76             :     virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties();
      77             : 
      78             :     void                    ImpSetAttrToGrafInfo(); // Werte vom Pool kopieren
      79             :     GraphicAttr             aGrafInfo;
      80             : 
      81             :     OUString aFileName;          // Wenn es sich um einen Link handelt, steht hier der Dateiname drin.
      82             :     OUString aFilterName;
      83             :     GraphicObject*          pGraphic;           // Zur Beschleunigung von Bitmapausgaben, besonders von gedrehten.
      84             :     GraphicObject*          mpReplacementGraphic;
      85             :     SdrGraphicLink*         pGraphicLink;       // Und hier noch ein Pointer fuer gelinkte Grafiken
      86             :     bool                    bMirrored:1;        // True bedeutet, die Grafik ist horizontal, d.h. ueber die Y-Achse gespiegelt auszugeben.
      87             : 
      88             :     // #111096#
      89             :     // Flag for allowing text animation. Default is sal_true.
      90             :     bool mbGrafAnimationAllowed:1;
      91             : 
      92             :     // #i25616#
      93             :     bool mbInsidePaint:1;
      94             :     bool mbIsPreview:1;
      95             : 
      96             : private:
      97             : 
      98             :     void                    ImpLinkAnmeldung();
      99             :     void                    ImpLinkAbmeldung();
     100             :     bool                    ImpUpdateGraphicLink( bool bAsynchron = true ) const;
     101             :     void                    ImpSetLinkedGraphic( const Graphic& rGraphic );
     102             :                             DECL_LINK( ImpSwapHdl, GraphicObject* );
     103             :     void onGraphicChanged();
     104             : 
     105             : public:
     106             :                             TYPEINFO();
     107             : 
     108             :                             SdrGrafObj();
     109             :                             SdrGrafObj(const Graphic& rGrf);
     110             :                             SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect);
     111             :     virtual                 ~SdrGrafObj();
     112             : 
     113             :     void                    SetGraphicObject( const GraphicObject& rGrfObj );
     114             :     const GraphicObject&    GetGraphicObject(bool bForceSwapIn = false) const;
     115             :     const GraphicObject*    GetReplacementGraphicObject() const;
     116             : 
     117             :     void                    NbcSetGraphic(const Graphic& rGrf);
     118             :     void                    SetGraphic(const Graphic& rGrf);
     119             :     const Graphic&          GetGraphic() const;
     120             : 
     121             :     Graphic                 GetTransformedGraphic( sal_uIntPtr nTransformFlags = SDRGRAFOBJ_TRANSFORMATTR_ALL ) const;
     122             : 
     123             :     GraphicType             GetGraphicType() const;
     124             : 
     125             :     // #111096#
     126             :     // Keep ATM for SD.
     127             :     bool IsAnimated() const;
     128             :     bool IsEPS() const;
     129             :     bool IsSwappedOut() const;
     130             : 
     131             :     const MapMode&          GetGrafPrefMapMode() const;
     132             :     const Size&             GetGrafPrefSize() const;
     133             : 
     134             :     void                    SetGrafStreamURL( const String& rGraphicStreamURL );
     135             :     String                  GetGrafStreamURL() const;
     136             : 
     137             :     void                    ForceSwapIn() const;
     138             :     void                    ForceSwapOut() const;
     139             : 
     140             :     void                    SetGraphicLink(const OUString& rFileName, const String& rFilterName);
     141             :     void                    ReleaseGraphicLink();
     142             :     bool IsLinkedGraphic() const;
     143             : 
     144             :     const OUString& GetFileName() const;
     145             :     const OUString& GetFilterName() const;
     146             : 
     147             :     void                    StartAnimation(OutputDevice* pOutDev, const Point& rPoint, const Size& rSize, long nExtraData=0L);
     148             : 
     149             :     virtual void            TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
     150             :     virtual sal_uInt16          GetObjIdentifier() const;
     151             : 
     152             :     virtual void            TakeObjNameSingul(String& rName) const;
     153             :     virtual void            TakeObjNamePlural(String& rName) const;
     154             : 
     155             :     // #i25616#
     156             :     virtual basegfx::B2DPolyPolygon TakeXorPoly() const;
     157             : 
     158             :     virtual SdrGrafObj* Clone() const;
     159             :     SdrGrafObj&             operator=(const SdrGrafObj& rObj);
     160             : 
     161             :     virtual sal_uInt32 GetHdlCount() const;
     162             :     virtual SdrHdl*         GetHdl(sal_uInt32 nHdlNum) const;
     163             : 
     164             :     virtual void            NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
     165             :     virtual void            NbcRotate(const Point& rRef, long nWink, double sn, double cs);
     166             :     virtual void            NbcMirror(const Point& rRef1, const Point& rRef2);
     167             :     virtual void            NbcShear (const Point& rRef, long nWink, double tn, bool bVShear);
     168             :     virtual void            NbcSetSnapRect(const Rectangle& rRect);
     169             :     virtual void            NbcSetLogicRect(const Rectangle& rRect);
     170             :     virtual SdrObjGeoData*  NewGeoData() const;
     171             :     virtual void            SaveGeoData(SdrObjGeoData& rGeo) const;
     172             :     virtual void            RestGeoData(const SdrObjGeoData& rGeo);
     173             : 
     174             :     bool                    HasGDIMetaFile() const;
     175             : 
     176             :     virtual void            SetPage(SdrPage* pNewPage);
     177             :     virtual void            SetModel(SdrModel* pNewModel);
     178             : 
     179             :     bool isEmbeddedSvg() const;
     180             :     GDIMetaFile getMetafileFromEmbeddedSvg() const;
     181             : 
     182             :     virtual SdrObject*      DoConvertToPolyObj(sal_Bool bBezier, bool bAddText) const;
     183             : 
     184             :     virtual void            AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly = false );
     185             : 
     186             :     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
     187             : 
     188             :     bool IsMirrored() const;
     189             :     void SetMirrored( bool _bMirrored );
     190             : 
     191             :     // #111096#
     192             :     // Access to GrafAnimationAllowed flag
     193             :     void SetGrafAnimationAllowed(bool bNew);
     194             : 
     195             :     ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > getInputStream();
     196             : 
     197             :     // #i103116# FullDrag support
     198             :     virtual SdrObject* getFullDragClone() const;
     199             : };
     200             : 
     201             : #endif //_SVDOGRAF_HXX
     202             : 
     203             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10