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_SC_INC_DEFLTUNO_HXX
21 #define INCLUDED_SC_INC_DEFLTUNO_HXX
23 #include <svl/lstner.hxx>
24 #include <com/sun/star/lang/XServiceInfo.hpp>
25 #include <com/sun/star/beans/XPropertySet.hpp>
26 #include <com/sun/star/beans/XPropertyState.hpp>
27 #include <cppuhelper/implbase3.hxx>
28 #include <svl/itemprop.hxx>
33 class ScDocDefaultsObj
: public ::cppu::WeakImplHelper3
<
34 ::com::sun::star::beans::XPropertySet
,
35 ::com::sun::star::beans::XPropertyState
,
36 ::com::sun::star::lang::XServiceInfo
>,
40 ScDocShell
* pDocShell
;
41 SfxItemPropertyMap aPropertyMap
;
46 ScDocDefaultsObj(ScDocShell
* pDocSh
);
47 virtual ~ScDocDefaultsObj();
49 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) SAL_OVERRIDE
;
52 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
>
53 SAL_CALL
getPropertySetInfo()
54 throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
55 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
,
56 const ::com::sun::star::uno::Any
& aValue
)
57 throw(::com::sun::star::beans::UnknownPropertyException
,
58 ::com::sun::star::beans::PropertyVetoException
,
59 ::com::sun::star::lang::IllegalArgumentException
,
60 ::com::sun::star::lang::WrappedTargetException
,
61 ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
62 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue(
63 const OUString
& PropertyName
)
64 throw(::com::sun::star::beans::UnknownPropertyException
,
65 ::com::sun::star::lang::WrappedTargetException
,
66 ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
67 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
,
68 const ::com::sun::star::uno::Reference
<
69 ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
70 throw(::com::sun::star::beans::UnknownPropertyException
,
71 ::com::sun::star::lang::WrappedTargetException
,
72 ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
73 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
,
74 const ::com::sun::star::uno::Reference
<
75 ::com::sun::star::beans::XPropertyChangeListener
>& aListener
)
76 throw(::com::sun::star::beans::UnknownPropertyException
,
77 ::com::sun::star::lang::WrappedTargetException
,
78 ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
79 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
,
80 const ::com::sun::star::uno::Reference
<
81 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
82 throw(::com::sun::star::beans::UnknownPropertyException
,
83 ::com::sun::star::lang::WrappedTargetException
,
84 ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
85 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
,
86 const ::com::sun::star::uno::Reference
<
87 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
88 throw(::com::sun::star::beans::UnknownPropertyException
,
89 ::com::sun::star::lang::WrappedTargetException
,
90 ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
93 virtual ::com::sun::star::beans::PropertyState SAL_CALL
getPropertyState(
94 const OUString
& PropertyName
)
95 throw(::com::sun::star::beans::UnknownPropertyException
,
96 ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
97 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyState
> SAL_CALL
98 getPropertyStates( const ::com::sun::star::uno::Sequence
<
99 OUString
>& aPropertyName
)
100 throw(::com::sun::star::beans::UnknownPropertyException
,
101 ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
102 virtual void SAL_CALL
setPropertyToDefault( const OUString
& PropertyName
)
103 throw(::com::sun::star::beans::UnknownPropertyException
,
104 ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
105 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyDefault(
106 const OUString
& aPropertyName
)
107 throw(::com::sun::star::beans::UnknownPropertyException
,
108 ::com::sun::star::lang::WrappedTargetException
,
109 ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
112 virtual OUString SAL_CALL
getImplementationName()
113 throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
114 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
115 throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
116 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
117 throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */