1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef INCLUDED_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX 29 #define INCLUDED_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX 30 31 #include <drawinglayer/primitive2d/baseprimitive2d.hxx> 32 #include <basegfx/matrix/b2dhommatrix.hxx> 33 #include <svx/svdobj.hxx> 34 35 ////////////////////////////////////////////////////////////////////////////// 36 // predefinitions 37 38 class SdrOle2Obj; 39 40 ////////////////////////////////////////////////////////////////////////////// 41 42 namespace drawinglayer 43 { 44 namespace primitive2d 45 { 46 class SdrOleContentPrimitive2D : public BufferedDecompositionPrimitive2D 47 { 48 private: 49 SdrObjectWeakRef mpSdrOle2Obj; 50 basegfx::B2DHomMatrix maObjectTransform; 51 52 // #i104867# The GraphicVersion number to identify in operator== if 53 // the graphic has changed, but without fetching it (which may 54 // be expensive, e.g. triggering chart creation) 55 sal_uInt32 mnGraphicVersion; 56 57 // bitfield 58 unsigned mbHighContrast : 1; 59 60 protected: 61 // local decomposition. 62 virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; 63 64 public: 65 SdrOleContentPrimitive2D( 66 const SdrOle2Obj& rSdrOle2Obj, 67 const basegfx::B2DHomMatrix& rObjectTransform, 68 sal_uInt32 nGraphicVersion, 69 bool bHighContrast); 70 71 // compare operator 72 virtual bool operator==(const BasePrimitive2D& rPrimitive) const; 73 74 // The default implementation will use getDecomposition results to create the range 75 virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; 76 77 // data access 78 const basegfx::B2DHomMatrix& getObjectTransform() const { return maObjectTransform; } 79 sal_uInt32 getGraphicVersion() const { return mnGraphicVersion; } 80 bool getHighContrast() const { return mbHighContrast; } 81 82 // provide unique ID 83 DeclPrimitrive2DIDBlock() 84 }; 85 } // end of namespace primitive2d 86 } // end of namespace drawinglayer 87 88 ////////////////////////////////////////////////////////////////////////////// 89 90 #endif //INCLUDED_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX 91 92 // eof 93