xref: /trunk/main/sc/inc/optuno.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef SC_OPTUNO_HXX
29 #define SC_OPTUNO_HXX
30 
31 #include "docuno.hxx"
32 #include "docoptio.hxx"
33 
34 #define PROP_UNO_CALCASSHOWN    1
35 #define PROP_UNO_DEFTABSTOP     2
36 #define PROP_UNO_IGNORECASE     3
37 #define PROP_UNO_ITERENABLED    4
38 #define PROP_UNO_ITERCOUNT      5
39 #define PROP_UNO_ITEREPSILON    6
40 #define PROP_UNO_LOOKUPLABELS   7
41 #define PROP_UNO_MATCHWHOLE     8
42 #define PROP_UNO_NULLDATE       9
43 #define PROP_UNO_SPELLONLINE    10
44 #define PROP_UNO_STANDARDDEC    11
45 #define PROP_UNO_REGEXENABLED   12
46 
47 
48 class ScDocOptionsHelper
49 {
50 public:
51     static const SfxItemPropertyMapEntry* GetPropertyMap();
52 
53 	static sal_Bool setPropertyValue( ScDocOptions& rOptions,
54                                     const SfxItemPropertyMap& rPropMap,
55 									const ::rtl::OUString& aPropertyName,
56 									const ::com::sun::star::uno::Any& aValue );
57 	static ::com::sun::star::uno::Any getPropertyValue(
58 									const ScDocOptions& rOptions,
59                                     const SfxItemPropertyMap& rPropMap,
60 									const ::rtl::OUString& PropertyName );
61 };
62 
63 
64 //	empty doc object to supply only doc options
65 
66 class ScDocOptionsObj : public ScModelObj
67 {
68 private:
69 	ScDocOptions	aOptions;
70 
71 public:
72 							ScDocOptionsObj( const ScDocOptions& rOpt );
73 	virtual					~ScDocOptionsObj();
74 
75 	// get/setPropertyValue overloaded to used stored options instead of document
76 
77 	virtual void SAL_CALL	setPropertyValue( const ::rtl::OUString& aPropertyName,
78 									const ::com::sun::star::uno::Any& aValue )
79 								throw(::com::sun::star::beans::UnknownPropertyException,
80 									::com::sun::star::beans::PropertyVetoException,
81 									::com::sun::star::lang::IllegalArgumentException,
82 									::com::sun::star::lang::WrappedTargetException,
83 									::com::sun::star::uno::RuntimeException);
84 	virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
85 									const ::rtl::OUString& PropertyName )
86 								throw(::com::sun::star::beans::UnknownPropertyException,
87 									::com::sun::star::lang::WrappedTargetException,
88 									::com::sun::star::uno::RuntimeException);
89 };
90 
91 
92 #endif
93 
94