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 _SVXACCFG_HXX 24 #define _SVXACCFG_HXX 25 26 // include --------------------------------------------------------------- 27 28 #include "editeng/editengdllapi.h" 29 #include <unotools/configitem.hxx> 30 /* -----------------------------12.10.00 11:40-------------------------------- 31 32 ---------------------------------------------------------------------------*/ 33 class SvxAutoCorrect; 34 class SvxAutoCorrCfg; 35 class EDITENG_DLLPUBLIC SvxBaseAutoCorrCfg : public utl::ConfigItem 36 { 37 SvxAutoCorrCfg& rParent; 38 com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames(); 39 40 public: 41 SvxBaseAutoCorrCfg(SvxAutoCorrCfg& rParent); 42 ~SvxBaseAutoCorrCfg(); 43 44 void Load(sal_Bool bInit); 45 virtual void Commit(); 46 virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); SetModified()47 void SetModified() {ConfigItem::SetModified();} 48 }; 49 /* -----------------------------12.10.00 11:40-------------------------------- 50 51 ---------------------------------------------------------------------------*/ 52 class EDITENG_DLLPUBLIC SvxSwAutoCorrCfg : public utl::ConfigItem 53 { 54 SvxAutoCorrCfg& rParent; 55 com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames(); 56 57 public: 58 SvxSwAutoCorrCfg(SvxAutoCorrCfg& rParent); 59 ~SvxSwAutoCorrCfg(); 60 61 void Load(sal_Bool bInit); 62 virtual void Commit(); 63 virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); SetModified()64 void SetModified() {ConfigItem::SetModified();} 65 }; 66 /*-------------------------------------------------------------------- 67 Beschreibung: Konfiguration fuer Auto Correction 68 --------------------------------------------------------------------*/ 69 class EDITENG_DLLPUBLIC SvxAutoCorrCfg 70 { 71 friend class SvxBaseAutoCorrCfg; 72 friend class SvxSwAutoCorrCfg; 73 74 SvxAutoCorrect* pAutoCorrect; 75 76 SvxBaseAutoCorrCfg aBaseConfig; 77 SvxSwAutoCorrCfg aSwConfig; 78 79 // Flags f"ur Autotext: 80 sal_Bool bFileRel; 81 sal_Bool bNetRel; 82 // Tiphilfe f"ur Autotext w"ahrend der Eingabe 83 sal_Bool bAutoTextTip; 84 sal_Bool bAutoTextPreview; 85 sal_Bool bAutoFmtByInput; 86 sal_Bool bSearchInAllCategories; 87 88 public: SetModified()89 void SetModified() 90 { 91 aBaseConfig.SetModified(); 92 aSwConfig.SetModified(); 93 } Commit()94 void Commit() 95 { 96 aBaseConfig.Commit(); 97 aSwConfig.Commit(); 98 } 99 GetAutoCorrect()100 SvxAutoCorrect* GetAutoCorrect() { return pAutoCorrect; } GetAutoCorrect() const101 const SvxAutoCorrect* GetAutoCorrect() const { return pAutoCorrect; } 102 // der Pointer geht in den Besitz des ConfigItems! 103 void SetAutoCorrect( SvxAutoCorrect* ); 104 IsAutoFmtByInput() const105 sal_Bool IsAutoFmtByInput() const { return bAutoFmtByInput; } SetAutoFmtByInput(sal_Bool bSet)106 void SetAutoFmtByInput( sal_Bool bSet ) { bAutoFmtByInput = bSet;aSwConfig.SetModified();} 107 IsSaveRelFile() const108 sal_Bool IsSaveRelFile() const { return bFileRel; } SetSaveRelFile(sal_Bool bSet)109 void SetSaveRelFile( sal_Bool bSet ) { bFileRel = bSet; aSwConfig.SetModified(); } 110 IsSaveRelNet() const111 sal_Bool IsSaveRelNet() const { return bNetRel; } SetSaveRelNet(sal_Bool bSet)112 void SetSaveRelNet( sal_Bool bSet ) { bNetRel = bSet; aSwConfig.SetModified();} 113 IsAutoTextPreview() const114 sal_Bool IsAutoTextPreview() const {return bAutoTextPreview;} SetAutoTextPreview(sal_Bool bSet)115 void SetAutoTextPreview(sal_Bool bSet) {bAutoTextPreview = bSet; aSwConfig.SetModified();} 116 IsAutoTextTip() const117 sal_Bool IsAutoTextTip() const { return bAutoTextTip; } SetAutoTextTip(sal_Bool bSet)118 void SetAutoTextTip(sal_Bool bSet ) { bAutoTextTip = bSet;aSwConfig.SetModified();} 119 IsSearchInAllCategories() const120 sal_Bool IsSearchInAllCategories() const { return bSearchInAllCategories;} SetSearchInAllCategories(sal_Bool bSet)121 void SetSearchInAllCategories(sal_Bool bSet ) { bSearchInAllCategories = bSet; aSwConfig.SetModified(); } 122 123 SvxAutoCorrCfg(); 124 virtual ~SvxAutoCorrCfg(); 125 static SvxAutoCorrCfg* Get(); 126 }; 127 128 129 #endif 130