1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef INCLUDED_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX 25 #define INCLUDED_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX 26 27 #include <drawinglayer/primitive2d/baseprimitive2d.hxx> 28 #include <basegfx/matrix/b2dhommatrix.hxx> 29 #include <svx/svdobj.hxx> 30 31 ////////////////////////////////////////////////////////////////////////////// 32 // predefinitions 33 34 class SdrOle2Obj; 35 36 ////////////////////////////////////////////////////////////////////////////// 37 38 namespace drawinglayer 39 { 40 namespace primitive2d 41 { 42 class SdrOleContentPrimitive2D : public BufferedDecompositionPrimitive2D 43 { 44 private: 45 SdrObjectWeakRef mpSdrOle2Obj; 46 basegfx::B2DHomMatrix maObjectTransform; 47 48 // #i104867# The GraphicVersion number to identify in operator== if 49 // the graphic has changed, but without fetching it (which may 50 // be expensive, e.g. triggering chart creation) 51 sal_uInt32 mnGraphicVersion; 52 53 // bitfield 54 unsigned mbHighContrast : 1; 55 56 protected: 57 // local decomposition. 58 virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; 59 60 public: 61 SdrOleContentPrimitive2D( 62 const SdrOle2Obj& rSdrOle2Obj, 63 const basegfx::B2DHomMatrix& rObjectTransform, 64 sal_uInt32 nGraphicVersion, 65 bool bHighContrast); 66 67 // compare operator 68 virtual bool operator==(const BasePrimitive2D& rPrimitive) const; 69 70 // The default implementation will use getDecomposition results to create the range 71 virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; 72 73 // data access getObjectTransform() const74 const basegfx::B2DHomMatrix& getObjectTransform() const { return maObjectTransform; } getGraphicVersion() const75 sal_uInt32 getGraphicVersion() const { return mnGraphicVersion; } getHighContrast() const76 bool getHighContrast() const { return mbHighContrast; } 77 78 // provide unique ID 79 DeclPrimitrive2DIDBlock() 80 }; 81 } // end of namespace primitive2d 82 } // end of namespace drawinglayer 83 84 ////////////////////////////////////////////////////////////////////////////// 85 86 #endif //INCLUDED_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX 87 88 // eof 89