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 #ifndef _SVX_SRCHCFG_HXX 24 #define _SVX_SRCHCFG_HXX 25 26 #include <unotools/configitem.hxx> 27 #include <com/sun/star/uno/Sequence.h> 28 #include <svl/svldllapi.h> 29 30 //----------------------------------------------------------------------------- 31 struct SvxSearchConfig_Impl; 32 struct SvxSearchEngineData 33 { 34 rtl::OUString sEngineName; 35 36 rtl::OUString sAndPrefix; 37 rtl::OUString sAndSuffix; 38 rtl::OUString sAndSeparator; 39 sal_Int32 nAndCaseMatch; 40 41 rtl::OUString sOrPrefix; 42 rtl::OUString sOrSuffix; 43 rtl::OUString sOrSeparator; 44 sal_Int32 nOrCaseMatch; 45 46 rtl::OUString sExactPrefix; 47 rtl::OUString sExactSuffix; 48 rtl::OUString sExactSeparator; 49 sal_Int32 nExactCaseMatch; 50 SvxSearchEngineDataSvxSearchEngineData51 SvxSearchEngineData() : 52 nAndCaseMatch(0), 53 nOrCaseMatch(0), 54 nExactCaseMatch(0){} 55 56 sal_Bool operator==(const SvxSearchEngineData& rData); 57 }; 58 class SVL_DLLPUBLIC SvxSearchConfig : public utl::ConfigItem 59 { 60 SvxSearchConfig_Impl* pImpl; 61 62 public: 63 SvxSearchConfig(sal_Bool bEnableNotify = sal_True); 64 virtual ~SvxSearchConfig(); 65 66 void Load(); 67 virtual void Commit(); 68 virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); 69 70 sal_uInt16 Count(); 71 const SvxSearchEngineData& GetData(sal_uInt16 nPos); 72 const SvxSearchEngineData* GetData(const rtl::OUString& rEngineName); 73 void SetData(const SvxSearchEngineData& rData); 74 void RemoveData(const rtl::OUString& rEngineName); 75 }; 76 77 #endif 78 79