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 _SDR_CONTACT_VIEWCONTACTOFSDROLE2OBJ_HXX
21 : #define _SDR_CONTACT_VIEWCONTACTOFSDROLE2OBJ_HXX
22 :
23 : #include <svx/sdr/contact/viewcontactofsdrrectobj.hxx>
24 : #include <basegfx/matrix/b2dhommatrix.hxx>
25 :
26 : //////////////////////////////////////////////////////////////////////////////
27 : // predeclarations
28 :
29 : class SdrOle2Obj;
30 : class Graphic;
31 :
32 : //////////////////////////////////////////////////////////////////////////////
33 :
34 : namespace sdr
35 : {
36 : namespace contact
37 : {
38 : class ViewContactOfSdrOle2Obj : public ViewContactOfSdrRectObj
39 : {
40 : protected:
41 : // Create a Object-Specific ViewObjectContact, set ViewContact and
42 : // ObjectContact. Always needs to return something.
43 : virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
44 :
45 : public:
46 : // access to SdrOle2Obj
47 369 : SdrOle2Obj& GetOle2Obj() const
48 : {
49 369 : return (SdrOle2Obj&)GetSdrObject();
50 : }
51 :
52 : /// helper to create transformation from SdrObject
53 : basegfx::B2DHomMatrix createObjectTransform() const;
54 :
55 : // basic constructor, used from SdrObject.
56 : explicit ViewContactOfSdrOle2Obj(SdrOle2Obj& rOle2Obj);
57 : virtual ~ViewContactOfSdrOle2Obj();
58 :
59 : // helper for creating a OLE sequence for this object. It takes care od attributes, needed
60 : // scaling (e.g. for EmptyPresObj's), the correct graphic and other stuff. It is used from
61 : // createViewIndependentPrimitive2DSequence with false, and with evtl. HighContrast true
62 : // from the VOC which knows that
63 : drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceWithParameters() const;
64 :
65 : protected:
66 : // This method is responsible for creating the graphical visualisation data
67 : // ONLY based on model data, just wraps to call createPrimitive2DSequenceWithParameters(false)
68 : virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
69 : };
70 : } // end of namespace contact
71 : } // end of namespace sdr
72 :
73 : //////////////////////////////////////////////////////////////////////////////
74 :
75 : #endif //_SDR_CONTACT_VIEWCONTACTOFSDROLE2OBJ_HXX
76 :
77 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|