1*4c5491eaSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*4c5491eaSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*4c5491eaSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*4c5491eaSAndrew Rist * distributed with this work for additional information 6*4c5491eaSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*4c5491eaSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*4c5491eaSAndrew Rist * "License"); you may not use this file except in compliance 9*4c5491eaSAndrew Rist * with the License. You may obtain a copy of the License at 10*4c5491eaSAndrew Rist * 11*4c5491eaSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*4c5491eaSAndrew Rist * 13*4c5491eaSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*4c5491eaSAndrew Rist * software distributed under the License is distributed on an 15*4c5491eaSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*4c5491eaSAndrew Rist * KIND, either express or implied. See the License for the 17*4c5491eaSAndrew Rist * specific language governing permissions and limitations 18*4c5491eaSAndrew Rist * under the License. 19*4c5491eaSAndrew Rist * 20*4c5491eaSAndrew Rist *************************************************************/ 21*4c5491eaSAndrew Rist 22*4c5491eaSAndrew Rist 23cdf0e10cSrcweir #ifndef _SVXACCFG_HXX 24cdf0e10cSrcweir #define _SVXACCFG_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir // include --------------------------------------------------------------- 27cdf0e10cSrcweir 28cdf0e10cSrcweir #include "editeng/editengdllapi.h" 29cdf0e10cSrcweir #include <unotools/configitem.hxx> 30cdf0e10cSrcweir /* -----------------------------12.10.00 11:40-------------------------------- 31cdf0e10cSrcweir 32cdf0e10cSrcweir ---------------------------------------------------------------------------*/ 33cdf0e10cSrcweir class SvxAutoCorrect; 34cdf0e10cSrcweir class SvxAutoCorrCfg; 35cdf0e10cSrcweir class EDITENG_DLLPUBLIC SvxBaseAutoCorrCfg : public utl::ConfigItem 36cdf0e10cSrcweir { 37cdf0e10cSrcweir SvxAutoCorrCfg& rParent; 38cdf0e10cSrcweir com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames(); 39cdf0e10cSrcweir 40cdf0e10cSrcweir public: 41cdf0e10cSrcweir SvxBaseAutoCorrCfg(SvxAutoCorrCfg& rParent); 42cdf0e10cSrcweir ~SvxBaseAutoCorrCfg(); 43cdf0e10cSrcweir 44cdf0e10cSrcweir void Load(sal_Bool bInit); 45cdf0e10cSrcweir virtual void Commit(); 46cdf0e10cSrcweir virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); SetModified()47cdf0e10cSrcweir void SetModified() {ConfigItem::SetModified();} 48cdf0e10cSrcweir }; 49cdf0e10cSrcweir /* -----------------------------12.10.00 11:40-------------------------------- 50cdf0e10cSrcweir 51cdf0e10cSrcweir ---------------------------------------------------------------------------*/ 52cdf0e10cSrcweir class EDITENG_DLLPUBLIC SvxSwAutoCorrCfg : public utl::ConfigItem 53cdf0e10cSrcweir { 54cdf0e10cSrcweir SvxAutoCorrCfg& rParent; 55cdf0e10cSrcweir com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames(); 56cdf0e10cSrcweir 57cdf0e10cSrcweir public: 58cdf0e10cSrcweir SvxSwAutoCorrCfg(SvxAutoCorrCfg& rParent); 59cdf0e10cSrcweir ~SvxSwAutoCorrCfg(); 60cdf0e10cSrcweir 61cdf0e10cSrcweir void Load(sal_Bool bInit); 62cdf0e10cSrcweir virtual void Commit(); 63cdf0e10cSrcweir virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); SetModified()64cdf0e10cSrcweir void SetModified() {ConfigItem::SetModified();} 65cdf0e10cSrcweir }; 66cdf0e10cSrcweir /*-------------------------------------------------------------------- 67cdf0e10cSrcweir Beschreibung: Konfiguration fuer Auto Correction 68cdf0e10cSrcweir --------------------------------------------------------------------*/ 69cdf0e10cSrcweir class EDITENG_DLLPUBLIC SvxAutoCorrCfg 70cdf0e10cSrcweir { 71cdf0e10cSrcweir friend class SvxBaseAutoCorrCfg; 72cdf0e10cSrcweir friend class SvxSwAutoCorrCfg; 73cdf0e10cSrcweir 74cdf0e10cSrcweir SvxAutoCorrect* pAutoCorrect; 75cdf0e10cSrcweir 76cdf0e10cSrcweir SvxBaseAutoCorrCfg aBaseConfig; 77cdf0e10cSrcweir SvxSwAutoCorrCfg aSwConfig; 78cdf0e10cSrcweir 79cdf0e10cSrcweir // Flags f"ur Autotext: 80cdf0e10cSrcweir sal_Bool bFileRel; 81cdf0e10cSrcweir sal_Bool bNetRel; 82cdf0e10cSrcweir // Tiphilfe f"ur Autotext w"ahrend der Eingabe 83cdf0e10cSrcweir sal_Bool bAutoTextTip; 84cdf0e10cSrcweir sal_Bool bAutoTextPreview; 85cdf0e10cSrcweir sal_Bool bAutoFmtByInput; 86cdf0e10cSrcweir sal_Bool bSearchInAllCategories; 87cdf0e10cSrcweir 88cdf0e10cSrcweir public: SetModified()89cdf0e10cSrcweir void SetModified() 90cdf0e10cSrcweir { 91cdf0e10cSrcweir aBaseConfig.SetModified(); 92cdf0e10cSrcweir aSwConfig.SetModified(); 93cdf0e10cSrcweir } Commit()94cdf0e10cSrcweir void Commit() 95cdf0e10cSrcweir { 96cdf0e10cSrcweir aBaseConfig.Commit(); 97cdf0e10cSrcweir aSwConfig.Commit(); 98cdf0e10cSrcweir } 99cdf0e10cSrcweir GetAutoCorrect()100cdf0e10cSrcweir SvxAutoCorrect* GetAutoCorrect() { return pAutoCorrect; } GetAutoCorrect() const101cdf0e10cSrcweir const SvxAutoCorrect* GetAutoCorrect() const { return pAutoCorrect; } 102cdf0e10cSrcweir // der Pointer geht in den Besitz des ConfigItems! 103cdf0e10cSrcweir void SetAutoCorrect( SvxAutoCorrect* ); 104cdf0e10cSrcweir IsAutoFmtByInput() const105cdf0e10cSrcweir sal_Bool IsAutoFmtByInput() const { return bAutoFmtByInput; } SetAutoFmtByInput(sal_Bool bSet)106cdf0e10cSrcweir void SetAutoFmtByInput( sal_Bool bSet ) { bAutoFmtByInput = bSet;aSwConfig.SetModified();} 107cdf0e10cSrcweir IsSaveRelFile() const108cdf0e10cSrcweir sal_Bool IsSaveRelFile() const { return bFileRel; } SetSaveRelFile(sal_Bool bSet)109cdf0e10cSrcweir void SetSaveRelFile( sal_Bool bSet ) { bFileRel = bSet; aSwConfig.SetModified(); } 110cdf0e10cSrcweir IsSaveRelNet() const111cdf0e10cSrcweir sal_Bool IsSaveRelNet() const { return bNetRel; } SetSaveRelNet(sal_Bool bSet)112cdf0e10cSrcweir void SetSaveRelNet( sal_Bool bSet ) { bNetRel = bSet; aSwConfig.SetModified();} 113cdf0e10cSrcweir IsAutoTextPreview() const114cdf0e10cSrcweir sal_Bool IsAutoTextPreview() const {return bAutoTextPreview;} SetAutoTextPreview(sal_Bool bSet)115cdf0e10cSrcweir void SetAutoTextPreview(sal_Bool bSet) {bAutoTextPreview = bSet; aSwConfig.SetModified();} 116cdf0e10cSrcweir IsAutoTextTip() const117cdf0e10cSrcweir sal_Bool IsAutoTextTip() const { return bAutoTextTip; } SetAutoTextTip(sal_Bool bSet)118cdf0e10cSrcweir void SetAutoTextTip(sal_Bool bSet ) { bAutoTextTip = bSet;aSwConfig.SetModified();} 119cdf0e10cSrcweir IsSearchInAllCategories() const120cdf0e10cSrcweir sal_Bool IsSearchInAllCategories() const { return bSearchInAllCategories;} SetSearchInAllCategories(sal_Bool bSet)121cdf0e10cSrcweir void SetSearchInAllCategories(sal_Bool bSet ) { bSearchInAllCategories = bSet; aSwConfig.SetModified(); } 122cdf0e10cSrcweir 123cdf0e10cSrcweir SvxAutoCorrCfg(); 124cdf0e10cSrcweir virtual ~SvxAutoCorrCfg(); 125cdf0e10cSrcweir static SvxAutoCorrCfg* Get(); 126cdf0e10cSrcweir }; 127cdf0e10cSrcweir 128cdf0e10cSrcweir 129cdf0e10cSrcweir #endif 130