1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef SC_OPTUNO_HXX 25 #define SC_OPTUNO_HXX 26 27 #include "docuno.hxx" 28 #include "docoptio.hxx" 29 30 #define PROP_UNO_CALCASSHOWN 1 31 #define PROP_UNO_DEFTABSTOP 2 32 #define PROP_UNO_IGNORECASE 3 33 #define PROP_UNO_ITERENABLED 4 34 #define PROP_UNO_ITERCOUNT 5 35 #define PROP_UNO_ITEREPSILON 6 36 #define PROP_UNO_LOOKUPLABELS 7 37 #define PROP_UNO_MATCHWHOLE 8 38 #define PROP_UNO_NULLDATE 9 39 #define PROP_UNO_SPELLONLINE 10 40 #define PROP_UNO_STANDARDDEC 11 41 #define PROP_UNO_REGEXENABLED 12 42 43 44 class ScDocOptionsHelper 45 { 46 public: 47 static const SfxItemPropertyMapEntry* GetPropertyMap(); 48 49 static sal_Bool setPropertyValue( ScDocOptions& rOptions, 50 const SfxItemPropertyMap& rPropMap, 51 const ::rtl::OUString& aPropertyName, 52 const ::com::sun::star::uno::Any& aValue ); 53 static ::com::sun::star::uno::Any getPropertyValue( 54 const ScDocOptions& rOptions, 55 const SfxItemPropertyMap& rPropMap, 56 const ::rtl::OUString& PropertyName ); 57 }; 58 59 60 // empty doc object to supply only doc options 61 62 class ScDocOptionsObj : public ScModelObj 63 { 64 private: 65 ScDocOptions aOptions; 66 67 public: 68 ScDocOptionsObj( const ScDocOptions& rOpt ); 69 virtual ~ScDocOptionsObj(); 70 71 // get/setPropertyValue overloaded to used stored options instead of document 72 73 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, 74 const ::com::sun::star::uno::Any& aValue ) 75 throw(::com::sun::star::beans::UnknownPropertyException, 76 ::com::sun::star::beans::PropertyVetoException, 77 ::com::sun::star::lang::IllegalArgumentException, 78 ::com::sun::star::lang::WrappedTargetException, 79 ::com::sun::star::uno::RuntimeException); 80 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( 81 const ::rtl::OUString& PropertyName ) 82 throw(::com::sun::star::beans::UnknownPropertyException, 83 ::com::sun::star::lang::WrappedTargetException, 84 ::com::sun::star::uno::RuntimeException); 85 }; 86 87 88 #endif 89 90