1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: acorrcfg.hxx,v $
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 ************************************************************************/
33 // include ---------------------------------------------------------------
35 #include "svx/svxdllapi.h"
36 #include <unotools/configitem.hxx>
37 /* -----------------------------12.10.00 11:40--------------------------------
39 ---------------------------------------------------------------------------*/
42 class SVX_DLLPUBLIC SvxBaseAutoCorrCfg
: public utl::ConfigItem
44 SvxAutoCorrCfg
& rParent
;
45 com::sun::star::uno::Sequence
<rtl::OUString
> GetPropertyNames();
48 SvxBaseAutoCorrCfg(SvxAutoCorrCfg
& rParent
);
49 ~SvxBaseAutoCorrCfg();
51 void Load(sal_Bool bInit
);
52 virtual void Commit();
53 virtual void Notify( const com::sun::star::uno::Sequence
<rtl::OUString
>& aPropertyNames
);
54 void SetModified() {ConfigItem::SetModified();}
56 /* -----------------------------12.10.00 11:40--------------------------------
58 ---------------------------------------------------------------------------*/
59 class SVX_DLLPUBLIC SvxSwAutoCorrCfg
: public utl::ConfigItem
61 SvxAutoCorrCfg
& rParent
;
62 com::sun::star::uno::Sequence
<rtl::OUString
> GetPropertyNames();
65 SvxSwAutoCorrCfg(SvxAutoCorrCfg
& rParent
);
68 void Load(sal_Bool bInit
);
69 virtual void Commit();
70 virtual void Notify( const com::sun::star::uno::Sequence
<rtl::OUString
>& aPropertyNames
);
71 void SetModified() {ConfigItem::SetModified();}
73 /*--------------------------------------------------------------------
74 Beschreibung: Konfiguration fuer Auto Correction
75 --------------------------------------------------------------------*/
76 class SVX_DLLPUBLIC SvxAutoCorrCfg
78 friend class SvxBaseAutoCorrCfg
;
79 friend class SvxSwAutoCorrCfg
;
81 SvxAutoCorrect
* pAutoCorrect
;
83 SvxBaseAutoCorrCfg aBaseConfig
;
84 SvxSwAutoCorrCfg aSwConfig
;
86 // Flags f"ur Autotext:
89 // Tiphilfe f"ur Autotext w"ahrend der Eingabe
90 sal_Bool bAutoTextTip
;
91 sal_Bool bAutoTextPreview
;
92 sal_Bool bAutoFmtByInput
;
93 sal_Bool bSearchInAllCategories
;
98 aBaseConfig
.SetModified();
99 aSwConfig
.SetModified();
103 aBaseConfig
.Commit();
107 SvxAutoCorrect
* GetAutoCorrect() { return pAutoCorrect
; }
108 const SvxAutoCorrect
* GetAutoCorrect() const { return pAutoCorrect
; }
109 // der Pointer geht in den Besitz des ConfigItems!
110 void SetAutoCorrect( SvxAutoCorrect
* );
112 sal_Bool
IsAutoFmtByInput() const { return bAutoFmtByInput
; }
113 void SetAutoFmtByInput( sal_Bool bSet
) { bAutoFmtByInput
= bSet
;aSwConfig
.SetModified();}
115 sal_Bool
IsSaveRelFile() const { return bFileRel
; }
116 void SetSaveRelFile( sal_Bool bSet
) { bFileRel
= bSet
; aSwConfig
.SetModified(); }
118 sal_Bool
IsSaveRelNet() const { return bNetRel
; }
119 void SetSaveRelNet( sal_Bool bSet
) { bNetRel
= bSet
; aSwConfig
.SetModified();}
121 sal_Bool
IsAutoTextPreview() const {return bAutoTextPreview
;}
122 void SetAutoTextPreview(sal_Bool bSet
) {bAutoTextPreview
= bSet
; aSwConfig
.SetModified();}
124 sal_Bool
IsAutoTextTip() const { return bAutoTextTip
; }
125 void SetAutoTextTip(sal_Bool bSet
) { bAutoTextTip
= bSet
;aSwConfig
.SetModified();}
127 sal_Bool
IsSearchInAllCategories() const { return bSearchInAllCategories
;}
128 void SetSearchInAllCategories(sal_Bool bSet
) { bSearchInAllCategories
= bSet
; aSwConfig
.SetModified(); }
131 virtual ~SvxAutoCorrCfg();
132 static SvxAutoCorrCfg
* Get();