Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / svx / inc / sdr / primitive2d / sdrolecontentprimitive2d.hxx
blobb16a7fd1795f7fc789b0946ebba7544f5ba32508
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX
21 #define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX
23 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
24 #include <basegfx/matrix/b2dhommatrix.hxx>
25 #include <svx/svdobj.hxx>
28 // predefinitions
30 class SdrOle2Obj;
33 namespace drawinglayer
35 namespace primitive2d
37 class SdrOleContentPrimitive2D : public BufferedDecompositionPrimitive2D
39 private:
40 tools::WeakReference<SdrOle2Obj> mpSdrOle2Obj;
41 basegfx::B2DHomMatrix const maObjectTransform;
43 // #i104867# The GraphicVersion number to identify in operator== if
44 // the graphic has changed, but without fetching it (which may
45 // be expensive, e.g. triggering chart creation)
46 sal_uInt32 const mnGraphicVersion;
48 protected:
49 // local decomposition.
50 virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override;
52 public:
53 SdrOleContentPrimitive2D(
54 const SdrOle2Obj& rSdrOle2Obj,
55 const basegfx::B2DHomMatrix& rObjectTransform,
56 sal_uInt32 nGraphicVersion
59 // compare operator
60 virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
62 // The default implementation will use getDecomposition results to create the range
63 virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
65 // data access
66 const basegfx::B2DHomMatrix& getObjectTransform() const { return maObjectTransform; }
68 // provide unique ID
69 DeclPrimitive2DIDBlock()
71 } // end of namespace primitive2d
72 } // end of namespace drawinglayer
75 #endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */