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: unostyle.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 ************************************************************************/
33 #include <boost/shared_ptr.hpp>
34 #include <svtools/style.hxx>
35 #include <svtools/lstner.hxx>
36 #include <unocoll.hxx>
38 #include <com/sun/star/style/XStyle.hpp>
39 #include <com/sun/star/lang/XUnoTunnel.hpp>
40 #include <com/sun/star/style/XStyleLoader.hpp>
41 #include <com/sun/star/container/XNameContainer.hpp>
42 #include <com/sun/star/beans/XPropertySet.hpp>
43 #include <com/sun/star/beans/XMultiPropertySet.hpp>
44 #include <com/sun/star/beans/XPropertyState.hpp>
45 #include <com/sun/star/beans/XMultiPropertyStates.hpp>
46 #include <cppuhelper/implbase7.hxx>
47 #include <com/sun/star/document/XEventsSupplier.hpp>
51 #include <com/sun/star/style/XAutoStyleFamily.hpp>
52 #include <com/sun/star/style/XAutoStyles.hpp>
53 #include <com/sun/star/style/XAutoStyle.hpp>
55 #include <istyleaccess.hxx>
58 class SfxItemPropertySet
;
60 class SwStyleProperties_Impl
;
61 class SwAutoStylesEnumImpl
;
64 typedef boost::shared_ptr
<SfxItemSet
> SfxItemSet_Pointer_t
;
66 /******************************************************************************
68 ******************************************************************************/
69 /*-----------------12.02.98 08:27-------------------
71 --------------------------------------------------*/
72 class SwXStyleFamilies
: public cppu::WeakImplHelper4
74 ::com::sun::star::container::XIndexAccess
,
75 ::com::sun::star::container::XNameAccess
,
76 ::com::sun::star::lang::XServiceInfo
,
77 ::com::sun::star::style::XStyleLoader
79 public SwUnoCollection
81 SwDocShell
* pDocShell
;
83 ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
> * pxCharStyles
;
84 ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
> * pxParaStyles
;
85 ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
> * pxFrameStyles
;
86 ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
> * pxPageStyles
;
87 ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
> * pxNumberingStyles
;
89 virtual ~SwXStyleFamilies();
91 SwXStyleFamilies(SwDocShell
& rDocShell
);
95 virtual ::com::sun::star::uno::Any SAL_CALL
getByName(const rtl::OUString
& Name
) throw( ::com::sun::star::container::NoSuchElementException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
96 virtual ::com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getElementNames(void) throw( ::com::sun::star::uno::RuntimeException
);
97 virtual sal_Bool SAL_CALL
hasByName(const rtl::OUString
& Name
) throw( ::com::sun::star::uno::RuntimeException
);
100 virtual sal_Int32 SAL_CALL
getCount(void) throw( ::com::sun::star::uno::RuntimeException
);
101 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex(sal_Int32 nIndex
) throw( ::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
104 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType( ) throw(::com::sun::star::uno::RuntimeException
);
105 virtual sal_Bool SAL_CALL
hasElements( ) throw(::com::sun::star::uno::RuntimeException
);
108 virtual void SAL_CALL
loadStylesFromURL(const rtl::OUString
& rURL
, const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>& aOptions
) throw( ::com::sun::star::io::IOException
, ::com::sun::star::uno::RuntimeException
);
109 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
> SAL_CALL
getStyleLoaderOptions(void) throw( ::com::sun::star::uno::RuntimeException
);
113 virtual rtl::OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
114 virtual BOOL SAL_CALL
supportsService(const rtl::OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
115 virtual ::com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
118 /* -----------------26.05.98 10:56-------------------
120 * --------------------------------------------------*/
121 class SwXStyleFamily
: public cppu::WeakImplHelper4
123 ::com::sun::star::container::XNameContainer
,
124 ::com::sun::star::lang::XServiceInfo
,
125 ::com::sun::star::container::XIndexAccess
,
126 ::com::sun::star::beans::XPropertySet
130 SfxStyleFamily eFamily
; // Familie
131 SfxStyleSheetBasePool
* pBasePool
;
132 // const SfxItemPropertyMap* _pPropMap;
133 SwDocShell
* pDocShell
;
135 SwXStyle
* _FindStyle(const String
& rStyleName
) const;
137 SwXStyleFamily(SwDocShell
* pDocShell
, sal_uInt16 nFamily
);
141 virtual sal_Int32 SAL_CALL
getCount(void) throw( ::com::sun::star::uno::RuntimeException
);
142 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex(sal_Int32 nIndex
) throw( ::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
145 virtual ::com::sun::star::uno::Type SAL_CALL SAL_CALL
getElementType( ) throw(::com::sun::star::uno::RuntimeException
);
146 virtual sal_Bool SAL_CALL SAL_CALL
hasElements( ) throw(::com::sun::star::uno::RuntimeException
);
149 virtual ::com::sun::star::uno::Any SAL_CALL
getByName(const rtl::OUString
& Name
) throw( ::com::sun::star::container::NoSuchElementException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
150 virtual ::com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getElementNames(void) throw( ::com::sun::star::uno::RuntimeException
);
151 virtual sal_Bool SAL_CALL
hasByName(const rtl::OUString
& Name
) throw( ::com::sun::star::uno::RuntimeException
);
154 virtual void SAL_CALL
insertByName(const rtl::OUString
& Name
, const ::com::sun::star::uno::Any
& Element
) throw( ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::container::ElementExistException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
155 virtual void SAL_CALL
replaceByName(const rtl::OUString
& Name
, const ::com::sun::star::uno::Any
& Element
) throw( ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::container::NoSuchElementException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
156 virtual void SAL_CALL
removeByName(const rtl::OUString
& Name
) throw( ::com::sun::star::container::NoSuchElementException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
159 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException
);
160 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Any
& aValue
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
161 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const ::rtl::OUString
& PropertyName
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
162 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& xListener
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
163 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& aListener
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
164 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
165 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
168 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
171 virtual rtl::OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
172 virtual BOOL SAL_CALL
supportsService(const rtl::OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
173 virtual ::com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
175 /* -----------------20.05.98 09:51-------------------
177 * --------------------------------------------------*/
178 class SwXStyle
: public cppu::WeakImplHelper7
180 ::com::sun::star::style::XStyle
,
181 ::com::sun::star::beans::XPropertySet
,
182 ::com::sun::star::beans::XMultiPropertySet
,
183 ::com::sun::star::lang::XServiceInfo
,
184 ::com::sun::star::lang::XUnoTunnel
,
185 ::com::sun::star::beans::XPropertyState
,
186 ::com::sun::star::beans::XMultiPropertyStates
191 friend class SwXStyleFamily
;
194 SfxStyleSheetBasePool
* pBasePool
;
195 SfxStyleFamily eFamily
; // fuer Notify
197 sal_Bool bIsDescriptor
: 1;
198 sal_Bool bIsConditional
: 1;
199 String sParentStyleName
;
200 SwStyleProperties_Impl
* pPropImpl
;
202 void ApplyDescriptorProperties();
206 const SfxStyleSheetBasePool
* GetBasePool() const {return pBasePool
;}
207 SfxStyleSheetBasePool
* GetBasePool() {return pBasePool
;}
209 void SetStyleName(const String
& rSet
){ sStyleName
= rSet
;}
210 SwStyleProperties_Impl
* GetPropImpl(){return pPropImpl
;}
211 com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> mxStyleData
;
212 com::sun::star::uno::Reference
< ::com::sun::star::container::XNameAccess
> mxStyleFamily
;
214 void SAL_CALL
SetPropertyValues_Impl( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
, const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>& aValues
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
215 ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> SAL_CALL
GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
218 SwXStyle(SwDoc
* pDoc
, SfxStyleFamily eFam
= SFX_STYLE_FAMILY_PARA
, BOOL bConditional
= FALSE
);
219 SwXStyle(SfxStyleSheetBasePool
& rPool
, SfxStyleFamily eFam
,
221 const String
& rStyleName
);//,
222 //const SfxItemPropertyMap* _pMap);
227 static const ::com::sun::star::uno::Sequence
< sal_Int8
> & getUnoTunnelId();
230 virtual sal_Int64 SAL_CALL
getSomething( const ::com::sun::star::uno::Sequence
< sal_Int8
>& aIdentifier
) throw(::com::sun::star::uno::RuntimeException
);
233 virtual rtl::OUString SAL_CALL
getName(void) throw( ::com::sun::star::uno::RuntimeException
);
234 virtual void SAL_CALL
setName(const rtl::OUString
& Name_
) throw( ::com::sun::star::uno::RuntimeException
);
237 virtual sal_Bool SAL_CALL
isUserDefined(void) throw( ::com::sun::star::uno::RuntimeException
);
238 virtual sal_Bool SAL_CALL
isInUse(void) throw( ::com::sun::star::uno::RuntimeException
);
239 virtual rtl::OUString SAL_CALL
getParentStyle(void) throw( ::com::sun::star::uno::RuntimeException
);
240 virtual void SAL_CALL
setParentStyle(const rtl::OUString
& aParentStyle
) throw( ::com::sun::star::container::NoSuchElementException
, ::com::sun::star::uno::RuntimeException
);
243 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException
);
244 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Any
& aValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
245 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const ::rtl::OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
246 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& xListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
247 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
248 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
249 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
252 // virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
253 virtual void SAL_CALL
setPropertyValues( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
, const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>& aValues
) throw(::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
254 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> SAL_CALL
getPropertyValues( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
) throw(::com::sun::star::uno::RuntimeException
);
255 virtual void SAL_CALL
addPropertiesChangeListener( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertiesChangeListener
>& xListener
) throw(::com::sun::star::uno::RuntimeException
);
256 virtual void SAL_CALL
removePropertiesChangeListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertiesChangeListener
>& xListener
) throw(::com::sun::star::uno::RuntimeException
);
257 virtual void SAL_CALL
firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertiesChangeListener
>& xListener
) throw(::com::sun::star::uno::RuntimeException
);
260 virtual ::com::sun::star::beans::PropertyState SAL_CALL
getPropertyState( const ::rtl::OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
261 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyState
> SAL_CALL
getPropertyStates( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
262 virtual void SAL_CALL
setPropertyToDefault( const ::rtl::OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
263 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyDefault( const ::rtl::OUString
& aPropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
265 //XMultiPropertyStates
266 //virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
267 virtual void SAL_CALL
setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException
);
268 virtual void SAL_CALL
setPropertiesToDefault( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
269 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> SAL_CALL
getPropertyDefaults( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
272 virtual rtl::OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
273 virtual BOOL SAL_CALL
supportsService(const rtl::OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
274 virtual ::com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
277 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
279 const String
& GetStyleName() const { return sStyleName
;}
280 SfxStyleFamily
GetFamily() const {return eFamily
;}
282 sal_Bool
IsDescriptor() const {return bIsDescriptor
;}
283 sal_Bool
IsConditional() const { return bIsConditional
;}
284 const String
& GetParentStyleName() const { return sParentStyleName
;}
285 void SetDoc(SwDoc
* pDc
, SfxStyleSheetBasePool
* pPool
)
287 bIsDescriptor
= sal_False
; m_pDoc
= pDc
;
289 StartListening(*pBasePool
);
291 SwDoc
* GetDoc() const { return m_pDoc
; }
292 virtual void Modify( SfxPoolItem
*pOld
, SfxPoolItem
*pNew
);
294 /* -----------------------------15.12.00 14:25--------------------------------
296 ---------------------------------------------------------------------------*/
297 class SwXFrameStyle
: public SwXStyle
,
298 public com::sun::star::document::XEventsSupplier
301 SwXFrameStyle(SfxStyleSheetBasePool
& rPool
,
303 const String
& rStyleName
) :
304 SwXStyle(rPool
, SFX_STYLE_FAMILY_FRAME
, pDoc
, rStyleName
){}
305 SwXFrameStyle( SwDoc
*pDoc
);
308 virtual void SAL_CALL
acquire( ) throw(){SwXStyle::acquire();}
309 virtual void SAL_CALL
release( ) throw(){SwXStyle::release();}
311 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw(::com::sun::star::uno::RuntimeException
);
312 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface( const ::com::sun::star::uno::Type
& aType
) throw(::com::sun::star::uno::RuntimeException
);
314 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameReplace
> SAL_CALL
getEvents( ) throw(::com::sun::star::uno::RuntimeException
);
316 friend class SwFrameStyleEventDescriptor
;
318 /* -----------------24.08.98 16:04-------------------
320 * --------------------------------------------------*/
321 class SwXPageStyle
: public SwXStyle
323 SwDocShell
* pDocShell
;
326 void SAL_CALL
SetPropertyValues_Impl( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
, const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>& aValues
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
327 ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> SAL_CALL
GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
330 SwXPageStyle(SfxStyleSheetBasePool
& rPool
, SwDocShell
* pDocSh
, SfxStyleFamily eFam
,
331 const String
& rStyleName
);//,
332 //const SfxItemPropertyMap* _pMap);
333 SwXPageStyle(SwDocShell
* pDocSh
);
336 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Any
& aValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
337 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const ::rtl::OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
339 virtual void SAL_CALL
setPropertyValues( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
, const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>& aValues
) throw(::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
340 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> SAL_CALL
getPropertyValues( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
) throw(::com::sun::star::uno::RuntimeException
);
343 /*-- 19.05.2006 11:20:22---------------------------------------------------
344 access to all automatic style families
345 -----------------------------------------------------------------------*/
346 class SwXAutoStyles
:
347 public cppu::WeakImplHelper1
< ::com::sun::star::style::XAutoStyles
>,
348 public SwUnoCollection
350 SwDocShell
*pDocShell
;
351 ::com::sun::star::uno::Reference
< ::com::sun::star::style::XAutoStyleFamily
> xAutoCharStyles
;
352 ::com::sun::star::uno::Reference
< ::com::sun::star::style::XAutoStyleFamily
> xAutoRubyStyles
;
353 ::com::sun::star::uno::Reference
< ::com::sun::star::style::XAutoStyleFamily
> xAutoParaStyles
;
354 ::com::sun::star::uno::Reference
< ::com::sun::star::style::XAutoStyleFamily
> xAutoNotxtStyles
;
355 virtual ~SwXAutoStyles();
358 SwXAutoStyles(SwDocShell
& rDocShell
);
361 virtual sal_Int32 SAL_CALL
getCount(void) throw( ::com::sun::star::uno::RuntimeException
);
362 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex(sal_Int32 nIndex
) throw( ::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
365 virtual ::com::sun::star::uno::Type SAL_CALL SAL_CALL
getElementType( ) throw(::com::sun::star::uno::RuntimeException
);
366 virtual sal_Bool SAL_CALL SAL_CALL
hasElements( ) throw(::com::sun::star::uno::RuntimeException
);
369 virtual ::com::sun::star::uno::Any SAL_CALL
getByName(const rtl::OUString
& Name
) throw( ::com::sun::star::container::NoSuchElementException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
370 virtual ::com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getElementNames(void) throw( ::com::sun::star::uno::RuntimeException
);
371 virtual sal_Bool SAL_CALL
hasByName(const rtl::OUString
& Name
) throw( ::com::sun::star::uno::RuntimeException
);
374 /*-- 19.05.2006 11:20:12---------------------------------------------------
375 access to a family of automatic styles (character or paragraph or ...)
376 -----------------------------------------------------------------------*/
377 class SwXAutoStyleFamily
: public cppu::WeakImplHelper1
< com::sun::star::style::XAutoStyleFamily
>,
380 SwDocShell
*pDocShell
;
381 IStyleAccess::SwAutoStyleFamily eFamily
;
384 SwXAutoStyleFamily(SwDocShell
* pDocShell
, IStyleAccess::SwAutoStyleFamily eFamily
);
385 virtual ~SwXAutoStyleFamily();
386 virtual void Modify( SfxPoolItem
*pOld
, SfxPoolItem
*pNew
);
389 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::style::XAutoStyle
> SAL_CALL
insertStyle( const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>& Values
) throw (::com::sun::star::uno::RuntimeException
);
392 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
createEnumeration( ) throw (::com::sun::star::uno::RuntimeException
);
395 virtual ::com::sun::star::uno::Type SAL_CALL SAL_CALL
getElementType( ) throw(::com::sun::star::uno::RuntimeException
);
396 virtual sal_Bool SAL_CALL SAL_CALL
hasElements( ) throw(::com::sun::star::uno::RuntimeException
);
399 class SwXAutoStylesEnumerator
: public cppu::WeakImplHelper1
< ::com::sun::star::container::XEnumeration
>,
402 SwAutoStylesEnumImpl
*pImpl
;
404 SwXAutoStylesEnumerator( SwDoc
* pDoc
, IStyleAccess::SwAutoStyleFamily eFam
);
405 virtual ~SwXAutoStylesEnumerator();
406 virtual void Modify( SfxPoolItem
*pOld
, SfxPoolItem
*pNew
);
409 virtual sal_Bool SAL_CALL
hasMoreElements( ) throw (::com::sun::star::uno::RuntimeException
);
410 virtual ::com::sun::star::uno::Any SAL_CALL
nextElement( ) throw (::com::sun::star::container::NoSuchElementException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
413 /*-- 19.05.2006 11:20:02---------------------------------------------------
415 -----------------------------------------------------------------------*/
417 class SwXAutoStyle
: public cppu::WeakImplHelper3
419 ::com::sun::star::beans::XPropertySet
,
420 ::com::sun::star::beans::XPropertyState
,
421 ::com::sun::star::style::XAutoStyle
425 SfxItemSet_Pointer_t pSet
;
426 IStyleAccess::SwAutoStyleFamily eFamily
;
428 ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> SAL_CALL
GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
432 SwXAutoStyle( SwDoc
* pDoc
, SfxItemSet_Pointer_t pInitSet
, IStyleAccess::SwAutoStyleFamily eFam
);
433 virtual ~SwXAutoStyle();
434 virtual void Modify( SfxPoolItem
*pOld
, SfxPoolItem
*pNew
);
437 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException
);
438 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Any
& aValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
439 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const ::rtl::OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
440 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& xListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
441 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
442 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
443 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
446 // virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException);
447 virtual void SAL_CALL
setPropertyValues( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
, const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>& aValues
) throw (::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
448 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> SAL_CALL
getPropertyValues( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
) throw (::com::sun::star::uno::RuntimeException
);
449 virtual void SAL_CALL
addPropertiesChangeListener( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertiesChangeListener
>& xListener
) throw (::com::sun::star::uno::RuntimeException
);
450 virtual void SAL_CALL
removePropertiesChangeListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertiesChangeListener
>& xListener
) throw (::com::sun::star::uno::RuntimeException
);
451 virtual void SAL_CALL
firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertiesChangeListener
>& xListener
) throw (::com::sun::star::uno::RuntimeException
);
454 virtual ::com::sun::star::beans::PropertyState SAL_CALL
getPropertyState( const ::rtl::OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
455 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyState
> SAL_CALL
getPropertyStates( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
456 virtual void SAL_CALL
setPropertyToDefault( const ::rtl::OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
457 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyDefault( const ::rtl::OUString
& aPropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
459 //XMultiPropertyStates
460 // virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
461 virtual void SAL_CALL
setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException
);
462 virtual void SAL_CALL
setPropertiesToDefault( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
463 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> SAL_CALL
getPropertyDefaults( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
466 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
> SAL_CALL
getProperties() throw (::com::sun::star::uno::RuntimeException
);