1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
33 namespace drawinglayer
37 class SdrOleContentPrimitive2D
: public BufferedDecompositionPrimitive2D
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
;
49 // local decomposition.
50 virtual void create2DDecomposition(Primitive2DContainer
& rContainer
, const geometry::ViewInformation2D
& aViewInformation
) const override
;
53 SdrOleContentPrimitive2D(
54 const SdrOle2Obj
& rSdrOle2Obj
,
55 const basegfx::B2DHomMatrix
& rObjectTransform
,
56 sal_uInt32 nGraphicVersion
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
;
66 const basegfx::B2DHomMatrix
& getObjectTransform() const { return maObjectTransform
; }
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: */