sync master with lastest vba changes
[ooovba.git] / binfilter / inc / bf_svtools / FilterConfigItem.hxx
blob2fa2d700c2cb3e5c052c078a300bd60f134469ac
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: FilterConfigItem.hxx,v $
10 * $Revision: 1.4 $
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 ************************************************************************/
32 #ifndef _FILTER_CONFIG_ITEM_HXX_
33 #define _FILTER_CONFIG_ITEM_HXX_
35 #ifndef INCLUDED_SVTDLLAPI_H
36 #include "bf_svtools/svtdllapi.h"
37 #endif
39 #ifndef _STRING_HXX
40 #include <tools/string.hxx>
41 #endif
42 #ifndef _COM_SUN_STAR_AWT_SIZE_HPP_
43 #include <com/sun/star/awt/Size.hpp>
44 #endif
46 #ifndef _COM_SUN_STAR_UNO_ANY_H_
47 #include <com/sun/star/uno/Any.h>
48 #endif
49 #ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
50 #include <com/sun/star/uno/Reference.h>
51 #endif
52 #ifndef _COM_SUN_STAR_UNO_XINTERFACE_HPP_
53 #include <com/sun/star/uno/XInterface.hpp>
54 #endif
55 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
56 #include <com/sun/star/beans/XPropertySet.hpp>
57 #endif
58 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYACCESS_HPP_
59 #include <com/sun/star/beans/XPropertyAccess.hpp>
60 #endif
61 #ifndef _COM_SUN_STAR_TASK_XSTATUSINDICATOR_HPP_
62 #include <com/sun/star/task/XStatusIndicator.hpp>
63 #endif
65 namespace binfilter
68 class FilterConfigItem
70 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xUpdatableView;
71 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xPropSet;
72 ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aFilterData;
74 sal_Bool bModified;
76 sal_Bool ImplGetPropertyValue( ::com::sun::star::uno::Any& rAny,
77 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rXPropSet,
78 const ::rtl::OUString& rPropName,
79 sal_Bool bTestPropertyAvailability );
81 void ImpInitTree( const String& rTree );
84 static ::com::sun::star::beans::PropertyValue* GetPropertyValue(
85 ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rPropSeq,
86 const ::rtl::OUString& rName );
87 static sal_Bool WritePropertyValue(
88 ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rPropSeq,
89 const ::com::sun::star::beans::PropertyValue& rPropValue );
91 public :
93 FilterConfigItem( const ::rtl::OUString& rSubTree );
94 FilterConfigItem( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData );
95 ~FilterConfigItem();
97 // all read methods are trying to return values in following order:
98 // 1. FilterData PropertySequence
99 // 2. configuration
100 // 3. given default
101 sal_Bool ReadBool( const ::rtl::OUString& rKey, sal_Bool bDefault );
102 sal_Int32 ReadInt32( const ::rtl::OUString& rKey, sal_Int32 nDefault );
104 // try to store to configuration
105 // and always stores into the FilterData sequence
106 void WriteInt32( const ::rtl::OUString& rKey, sal_Int32 nValue );
108 // GetStatusIndicator is returning the "StatusIndicator" property of the FilterData sequence
109 ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > GetStatusIndicator() const;
114 #endif // _FILTER_CONFIG_ITEM_HXX_