tdf#125181 maxY is 50000 in prstGeom for star24 and star32
[LibreOffice.git] / sc / inc / shapeuno.hxx
blobe4678427c76242d1b031327d179e043cdfe42ee9
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_SC_INC_SHAPEUNO_HXX
21 #define INCLUDED_SC_INC_SHAPEUNO_HXX
23 #include <com/sun/star/beans/XPropertyState.hpp>
24 #include <com/sun/star/beans/XPropertySet.hpp>
25 #include <com/sun/star/text/XTextContent.hpp>
26 #include <com/sun/star/text/XText.hpp>
27 #include <com/sun/star/lang/XServiceInfo.hpp>
28 #include <com/sun/star/document/XEventsSupplier.hpp>
29 #include <com/sun/star/container/XChild.hpp>
31 #include <cppuhelper/implbase.hxx>
32 #include <cppuhelper/implbase1.hxx>
34 namespace com { namespace sun { namespace star {
35 namespace uno {
36 class XAggregation;
38 namespace drawing {
39 class XShape;
41 }}}
43 class SdrObject;
44 struct SvEventDescription;
45 class ScMacroInfo;
47 // object which aggregates all svx shape objects,
48 // to add own properties
50 typedef ::cppu::WeakImplHelper < css::beans::XPropertySet
51 , css::beans::XPropertyState
52 , css::text::XTextContent
53 , css::document::XEventsSupplier
54 , css::lang::XServiceInfo
55 > ScShapeObj_Base;
56 typedef ::cppu::ImplHelper1 < css::text::XText
57 > ScShapeObj_TextBase;
58 typedef ::cppu::ImplHelper1 < css::container::XChild
59 > ScShapeObj_ChildBase;
60 class ScShapeObj :public ScShapeObj_Base
61 ,public ScShapeObj_TextBase
62 ,public ScShapeObj_ChildBase
64 private:
65 friend ScMacroInfo* ScShapeObj_getShapeHyperMacroInfo( const ScShapeObj* pShape, bool bCreate );
66 css::uno::Reference< css::uno::XAggregation > mxShapeAgg;
67 // cached pointers to avoid repeated queryAggregation calls:
68 css::beans::XPropertySet* pShapePropertySet;
69 css::beans::XPropertyState* pShapePropertyState;
70 css::uno::Reference< css::beans::XPropertySetInfo > mxPropSetInfo;
71 bool bIsTextShape;
72 bool bIsNoteCaption;
74 SdrObject* GetSdrObject() const throw();
76 void GetShapePropertySet();
77 void GetShapePropertyState();
79 friend class ShapeUnoEventAccessImpl;
81 public:
82 static const SvEventDescription* GetSupportedMacroItems();
84 // ctor modifies xShape parameter
85 ScShapeObj( css::uno::Reference<
86 css::drawing::XShape > & xShape );
87 virtual ~ScShapeObj() override;
89 // XInterface
90 virtual css::uno::Any SAL_CALL queryInterface(
91 const css::uno::Type & rType ) override;
92 virtual void SAL_CALL acquire() throw() override;
93 virtual void SAL_CALL release() throw() override;
95 // XPropertySet
96 virtual css::uno::Reference< css::beans::XPropertySetInfo >
97 SAL_CALL getPropertySetInfo() override;
98 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName,
99 const css::uno::Any& aValue ) override;
100 virtual css::uno::Any SAL_CALL getPropertyValue(
101 const OUString& PropertyName ) override;
102 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName,
103 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
104 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName,
105 const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
106 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName,
107 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
108 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName,
109 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
111 // XPropertyState
112 virtual css::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName ) override;
113 virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL
114 getPropertyStates( const css::uno::Sequence< OUString >& aPropertyName ) override;
115 virtual void SAL_CALL setPropertyToDefault( const OUString& PropertyName ) override;
116 virtual css::uno::Any SAL_CALL getPropertyDefault( const OUString& aPropertyName ) override;
118 // XTextContent
119 virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > & xTextRange) override;
120 virtual css::uno::Reference< css::text::XTextRange > SAL_CALL
121 getAnchor() override;
123 // XComponent
124 virtual void SAL_CALL dispose() override;
125 virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) override;
126 virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) override;
128 // XText
129 virtual void SAL_CALL insertTextContent( const css::uno::Reference< css::text::XTextRange >& xRange,
130 const css::uno::Reference< css::text::XTextContent >& xContent,
131 sal_Bool bAbsorb ) override;
132 virtual void SAL_CALL removeTextContent( const css::uno::Reference< css::text::XTextContent >& xContent ) override;
134 // XSimpleText
135 virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL
136 createTextCursor() override;
137 virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL
138 createTextCursorByRange( const css::uno::Reference< css::text::XTextRange >& aTextPosition ) override;
139 virtual void SAL_CALL insertString( const css::uno::Reference< css::text::XTextRange >& xRange,
140 const OUString& aString, sal_Bool bAbsorb ) override;
141 virtual void SAL_CALL insertControlCharacter( const css::uno::Reference< css::text::XTextRange >& xRange,
142 sal_Int16 nControlCharacter, sal_Bool bAbsorb ) override;
144 // XTextRange
145 virtual css::uno::Reference< css::text::XText > SAL_CALL
146 getText() override;
147 virtual css::uno::Reference< css::text::XTextRange > SAL_CALL
148 getStart() override;
149 virtual css::uno::Reference< css::text::XTextRange > SAL_CALL
150 getEnd() override;
151 virtual OUString SAL_CALL getString() override;
152 virtual void SAL_CALL setString( const OUString& aString ) override;
154 // XChild
155 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent() override;
156 virtual void SAL_CALL setParent( const css::uno::Reference< css::uno::XInterface >& xParent ) override;
158 // XTypeProvider
159 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
160 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
162 // XEventsSupplier
163 virtual css::uno::Reference< css::container::XNameReplace > SAL_CALL getEvents() override;
165 // XServiceInfo
166 virtual OUString SAL_CALL getImplementationName( ) override ;
167 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
168 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
171 #endif
173 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */