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 INCLUDED_SVX_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX
21 : #define INCLUDED_SVX_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX
22 :
23 : #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
24 : #include <basegfx/matrix/b2dhommatrix.hxx>
25 : #include <svx/svdobj.hxx>
26 :
27 :
28 : // predefinitions
29 :
30 : class SdrOle2Obj;
31 :
32 :
33 :
34 : namespace drawinglayer
35 : {
36 : namespace primitive2d
37 : {
38 0 : class SdrOleContentPrimitive2D : public BufferedDecompositionPrimitive2D
39 : {
40 : private:
41 : SdrObjectWeakRef mpSdrOle2Obj;
42 : basegfx::B2DHomMatrix maObjectTransform;
43 :
44 : // #i104867# The GraphicVersion number to identify in operator== if
45 : // the graphic has changed, but without fetching it (which may
46 : // be expensive, e.g. triggering chart creation)
47 : sal_uInt32 mnGraphicVersion;
48 :
49 : protected:
50 : // local decomposition.
51 : virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const SAL_OVERRIDE;
52 :
53 : public:
54 : SdrOleContentPrimitive2D(
55 : const SdrOle2Obj& rSdrOle2Obj,
56 : const basegfx::B2DHomMatrix& rObjectTransform,
57 : sal_uInt32 nGraphicVersion
58 : );
59 :
60 : // compare operator
61 : virtual bool operator==(const BasePrimitive2D& rPrimitive) const SAL_OVERRIDE;
62 :
63 : // The default implementation will use getDecomposition results to create the range
64 : virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
65 :
66 : // data access
67 0 : const basegfx::B2DHomMatrix& getObjectTransform() const { return maObjectTransform; }
68 0 : sal_uInt32 getGraphicVersion() const { return mnGraphicVersion; }
69 :
70 : // provide unique ID
71 : DeclPrimitive2DIDBlock()
72 : };
73 : } // end of namespace primitive2d
74 : } // end of namespace drawinglayer
75 :
76 :
77 :
78 : #endif // INCLUDED_SVX_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX
79 :
80 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|