1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: shapeuno.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_SHAPEUNO_HXX
32 #define SC_SHAPEUNO_HXX
34 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_
35 #include <com/sun/star/beans/XPropertyState.hpp>
37 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
38 #include <com/sun/star/beans/XPropertySet.hpp>
40 #ifndef _COM_SUN_STAR_TEXT_XTEXTCONTENT_HPP_
41 #include <com/sun/star/text/XTextContent.hpp>
43 #ifndef _COM_SUN_STAR_TEXT_XTEXT_HPP_
44 #include <com/sun/star/text/XText.hpp>
46 #ifndef _COM_SUN_STAR_LANG_XTYPEPROVIDER_HPP_
47 #include <com/sun/star/lang/XTypeProvider.hpp>
50 #ifndef _CPPUHELPER_WEAK_HXX_
51 #include <cppuhelper/weak.hxx>
54 namespace com
{ namespace sun
{ namespace star
{
62 struct SvEventDescription
;
67 //------------------------------------------------------------------------
69 // object which aggregates all svx shape objects,
70 // to add own properties
72 class ScShapeObj
: public ::cppu::OWeakObject
,
73 public ::com::sun::star::beans::XPropertySet
,
74 public ::com::sun::star::beans::XPropertyState
,
75 public ::com::sun::star::text::XTextContent
,
76 public ::com::sun::star::text::XText
,
77 public ::com::sun::star::lang::XTypeProvider
80 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XAggregation
> mxShapeAgg
;
81 ::com::sun::star::uno::Sequence
< sal_Int8
>* pImplementationId
;
84 SdrObject
* GetSdrObject() const throw();
87 static const SvEventDescription
* GetSupportedMacroItems();
89 // ctor modifies xShape parameter
90 ScShapeObj( ::com::sun::star::uno::Reference
<
91 ::com::sun::star::drawing::XShape
> & xShape
);
92 virtual ~ScShapeObj();
95 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(
96 const ::com::sun::star::uno::Type
& rType
)
97 throw(::com::sun::star::uno::RuntimeException
);
98 virtual void SAL_CALL
acquire() throw();
99 virtual void SAL_CALL
release() throw();
102 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
>
103 SAL_CALL
getPropertySetInfo()
104 throw(::com::sun::star::uno::RuntimeException
);
105 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
,
106 const ::com::sun::star::uno::Any
& aValue
)
107 throw(::com::sun::star::beans::UnknownPropertyException
,
108 ::com::sun::star::beans::PropertyVetoException
,
109 ::com::sun::star::lang::IllegalArgumentException
,
110 ::com::sun::star::lang::WrappedTargetException
,
111 ::com::sun::star::uno::RuntimeException
);
112 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue(
113 const ::rtl::OUString
& PropertyName
)
114 throw(::com::sun::star::beans::UnknownPropertyException
,
115 ::com::sun::star::lang::WrappedTargetException
,
116 ::com::sun::star::uno::RuntimeException
);
117 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
118 const ::com::sun::star::uno::Reference
<
119 ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
120 throw(::com::sun::star::beans::UnknownPropertyException
,
121 ::com::sun::star::lang::WrappedTargetException
,
122 ::com::sun::star::uno::RuntimeException
);
123 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
124 const ::com::sun::star::uno::Reference
<
125 ::com::sun::star::beans::XPropertyChangeListener
>& aListener
)
126 throw(::com::sun::star::beans::UnknownPropertyException
,
127 ::com::sun::star::lang::WrappedTargetException
,
128 ::com::sun::star::uno::RuntimeException
);
129 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
130 const ::com::sun::star::uno::Reference
<
131 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
132 throw(::com::sun::star::beans::UnknownPropertyException
,
133 ::com::sun::star::lang::WrappedTargetException
,
134 ::com::sun::star::uno::RuntimeException
);
135 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
136 const ::com::sun::star::uno::Reference
<
137 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
138 throw(::com::sun::star::beans::UnknownPropertyException
,
139 ::com::sun::star::lang::WrappedTargetException
,
140 ::com::sun::star::uno::RuntimeException
);
143 virtual ::com::sun::star::beans::PropertyState SAL_CALL
getPropertyState(
144 const ::rtl::OUString
& PropertyName
)
145 throw(::com::sun::star::beans::UnknownPropertyException
,
146 ::com::sun::star::uno::RuntimeException
);
147 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyState
> SAL_CALL
148 getPropertyStates( const ::com::sun::star::uno::Sequence
<
149 ::rtl::OUString
>& aPropertyName
)
150 throw(::com::sun::star::beans::UnknownPropertyException
,
151 ::com::sun::star::uno::RuntimeException
);
152 virtual void SAL_CALL
setPropertyToDefault( const ::rtl::OUString
& PropertyName
)
153 throw(::com::sun::star::beans::UnknownPropertyException
,
154 ::com::sun::star::uno::RuntimeException
);
155 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyDefault(
156 const ::rtl::OUString
& aPropertyName
)
157 throw(::com::sun::star::beans::UnknownPropertyException
,
158 ::com::sun::star::lang::WrappedTargetException
,
159 ::com::sun::star::uno::RuntimeException
);
162 virtual void SAL_CALL
attach(const ::com::sun::star::uno::Reference
<
163 ::com::sun::star::text::XTextRange
> & xTextRange
)
164 throw( ::com::sun::star::lang::IllegalArgumentException
,
165 ::com::sun::star::uno::RuntimeException
);
166 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
> SAL_CALL
167 getAnchor(void) throw( ::com::sun::star::uno::RuntimeException
);
170 virtual void SAL_CALL
dispose(void) throw( ::com::sun::star::uno::RuntimeException
);
171 virtual void SAL_CALL
addEventListener(const ::com::sun::star::uno::Reference
<
172 ::com::sun::star::lang::XEventListener
> & aListener
)
173 throw( ::com::sun::star::uno::RuntimeException
);
174 virtual void SAL_CALL
removeEventListener(const ::com::sun::star::uno::Reference
<
175 ::com::sun::star::lang::XEventListener
> & aListener
)
176 throw( ::com::sun::star::uno::RuntimeException
);
179 virtual void SAL_CALL
insertTextContent( const ::com::sun::star::uno::Reference
<
180 ::com::sun::star::text::XTextRange
>& xRange
,
181 const ::com::sun::star::uno::Reference
<
182 ::com::sun::star::text::XTextContent
>& xContent
,
184 throw(::com::sun::star::lang::IllegalArgumentException
,
185 ::com::sun::star::uno::RuntimeException
);
186 virtual void SAL_CALL
removeTextContent( const ::com::sun::star::uno::Reference
<
187 ::com::sun::star::text::XTextContent
>& xContent
)
188 throw(::com::sun::star::container::NoSuchElementException
,
189 ::com::sun::star::uno::RuntimeException
);
192 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextCursor
> SAL_CALL
193 createTextCursor() throw(::com::sun::star::uno::RuntimeException
);
194 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextCursor
> SAL_CALL
195 createTextCursorByRange( const ::com::sun::star::uno::Reference
<
196 ::com::sun::star::text::XTextRange
>& aTextPosition
)
197 throw(::com::sun::star::uno::RuntimeException
);
198 virtual void SAL_CALL
insertString( const ::com::sun::star::uno::Reference
<
199 ::com::sun::star::text::XTextRange
>& xRange
,
200 const ::rtl::OUString
& aString
, sal_Bool bAbsorb
)
201 throw(::com::sun::star::uno::RuntimeException
);
202 virtual void SAL_CALL
insertControlCharacter( const ::com::sun::star::uno::Reference
<
203 ::com::sun::star::text::XTextRange
>& xRange
,
204 sal_Int16 nControlCharacter
, sal_Bool bAbsorb
)
205 throw(::com::sun::star::lang::IllegalArgumentException
,
206 ::com::sun::star::uno::RuntimeException
);
209 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XText
> SAL_CALL
210 getText() throw(::com::sun::star::uno::RuntimeException
);
211 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
> SAL_CALL
212 getStart() throw(::com::sun::star::uno::RuntimeException
);
213 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
> SAL_CALL
214 getEnd() throw(::com::sun::star::uno::RuntimeException
);
215 virtual ::rtl::OUString SAL_CALL
getString() throw(::com::sun::star::uno::RuntimeException
);
216 virtual void SAL_CALL
setString( const ::rtl::OUString
& aString
)
217 throw(::com::sun::star::uno::RuntimeException
);
220 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes()
221 throw(::com::sun::star::uno::RuntimeException
);
222 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId()
223 throw(::com::sun::star::uno::RuntimeException
);
226 } //namespace binfilter