1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include "editeng/editengdllapi.h"
23 #include <unotools/configitem.hxx>
27 class EDITENG_DLLPUBLIC SvxBaseAutoCorrCfg
: public utl::ConfigItem
29 SvxAutoCorrCfg
& rParent
;
30 com::sun::star::uno::Sequence
<OUString
> GetPropertyNames();
33 SvxBaseAutoCorrCfg(SvxAutoCorrCfg
& rParent
);
34 ~SvxBaseAutoCorrCfg();
36 void Load(sal_Bool bInit
);
37 virtual void Commit();
38 virtual void Notify( const com::sun::star::uno::Sequence
<OUString
>& aPropertyNames
);
39 void SetModified() {ConfigItem::SetModified();}
42 class EDITENG_DLLPUBLIC SvxSwAutoCorrCfg
: public utl::ConfigItem
44 SvxAutoCorrCfg
& rParent
;
45 com::sun::star::uno::Sequence
<OUString
> GetPropertyNames();
48 SvxSwAutoCorrCfg(SvxAutoCorrCfg
& rParent
);
51 void Load(sal_Bool bInit
);
52 virtual void Commit();
53 virtual void Notify( const com::sun::star::uno::Sequence
<OUString
>& aPropertyNames
);
54 void SetModified() {ConfigItem::SetModified();}
56 /*--------------------------------------------------------------------
57 Description: Configuration for Auto Correction
58 --------------------------------------------------------------------*/
59 class EDITENG_DLLPUBLIC SvxAutoCorrCfg
61 friend class SvxBaseAutoCorrCfg
;
62 friend class SvxSwAutoCorrCfg
;
64 SvxAutoCorrect
* pAutoCorrect
;
66 SvxBaseAutoCorrCfg aBaseConfig
;
67 SvxSwAutoCorrCfg aSwConfig
;
69 // Flags for Autotext:
72 // Help tip for Autotext as you type
73 sal_Bool bAutoTextTip
;
74 sal_Bool bAutoTextPreview
;
75 sal_Bool bAutoFmtByInput
;
76 sal_Bool bSearchInAllCategories
;
81 aBaseConfig
.SetModified();
82 aSwConfig
.SetModified();
90 SvxAutoCorrect
* GetAutoCorrect() { return pAutoCorrect
; }
91 const SvxAutoCorrect
* GetAutoCorrect() const { return pAutoCorrect
; }
92 // the pointer is transferred to the possession of the ConfigItems!
93 void SetAutoCorrect( SvxAutoCorrect
* );
95 sal_Bool
IsAutoFmtByInput() const { return bAutoFmtByInput
; }
96 void SetAutoFmtByInput( sal_Bool bSet
) { bAutoFmtByInput
= bSet
;aSwConfig
.SetModified();}
98 sal_Bool
IsSaveRelFile() const { return bFileRel
; }
99 void SetSaveRelFile( sal_Bool bSet
) { bFileRel
= bSet
; aSwConfig
.SetModified(); }
101 sal_Bool
IsSaveRelNet() const { return bNetRel
; }
102 void SetSaveRelNet( sal_Bool bSet
) { bNetRel
= bSet
; aSwConfig
.SetModified();}
104 sal_Bool
IsAutoTextPreview() const {return bAutoTextPreview
;}
105 void SetAutoTextPreview(sal_Bool bSet
) {bAutoTextPreview
= bSet
; aSwConfig
.SetModified();}
107 sal_Bool
IsAutoTextTip() const { return bAutoTextTip
; }
108 void SetAutoTextTip(sal_Bool bSet
) { bAutoTextTip
= bSet
;aSwConfig
.SetModified();}
110 sal_Bool
IsSearchInAllCategories() const { return bSearchInAllCategories
;}
111 void SetSearchInAllCategories(sal_Bool bSet
) { bSearchInAllCategories
= bSet
; aSwConfig
.SetModified(); }
114 virtual ~SvxAutoCorrCfg();
115 static SvxAutoCorrCfg
& Get();
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */