update emoji autocorrect entries from po-files
[LibreOffice.git] / include / editeng / acorrcfg.hxx
blobe2fd887ad02e62a1a803e3afad0a40747b920c6e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef INCLUDED_EDITENG_ACORRCFG_HXX
20 #define INCLUDED_EDITENG_ACORRCFG_HXX
22 #include <editeng/editengdllapi.h>
23 #include <unotools/configitem.hxx>
25 class SvxAutoCorrect;
26 class SvxAutoCorrCfg;
27 class EDITENG_DLLPUBLIC SvxBaseAutoCorrCfg : public utl::ConfigItem
29 private:
30 SvxAutoCorrCfg& rParent;
31 static com::sun::star::uno::Sequence<OUString> GetPropertyNames();
33 virtual void ImplCommit() SAL_OVERRIDE;
35 public:
36 SvxBaseAutoCorrCfg(SvxAutoCorrCfg& rParent);
37 virtual ~SvxBaseAutoCorrCfg();
39 void Load(bool bInit);
40 virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames) SAL_OVERRIDE;
41 void SetModified() {ConfigItem::SetModified();}
44 class EDITENG_DLLPUBLIC SvxSwAutoCorrCfg : public utl::ConfigItem
46 private:
47 SvxAutoCorrCfg& rParent;
48 static com::sun::star::uno::Sequence<OUString> GetPropertyNames();
50 virtual void ImplCommit() SAL_OVERRIDE;
52 public:
53 SvxSwAutoCorrCfg(SvxAutoCorrCfg& rParent);
54 virtual ~SvxSwAutoCorrCfg();
56 void Load(bool bInit);
57 virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames) SAL_OVERRIDE;
58 void SetModified() {ConfigItem::SetModified();}
60 /*--------------------------------------------------------------------
61 Description: Configuration for Auto Correction
62 --------------------------------------------------------------------*/
63 class EDITENG_DLLPUBLIC SvxAutoCorrCfg
65 friend class SvxBaseAutoCorrCfg;
66 friend class SvxSwAutoCorrCfg;
68 SvxAutoCorrect* pAutoCorrect;
70 SvxBaseAutoCorrCfg aBaseConfig;
71 SvxSwAutoCorrCfg aSwConfig;
73 // Flags for Autotext:
74 bool bFileRel;
75 bool bNetRel;
76 // Help tip for Autotext as you type
77 bool bAutoTextTip;
78 bool bAutoTextPreview;
79 bool bAutoFmtByInput;
80 bool bSearchInAllCategories;
82 public:
83 void SetModified()
85 aBaseConfig.SetModified();
86 aSwConfig.SetModified();
88 void Commit()
90 aBaseConfig.Commit();
91 aSwConfig.Commit();
94 SvxAutoCorrect* GetAutoCorrect() { return pAutoCorrect; }
95 const SvxAutoCorrect* GetAutoCorrect() const { return pAutoCorrect; }
96 // the pointer is transferred to the possession of the ConfigItems!
97 void SetAutoCorrect( SvxAutoCorrect* );
99 bool IsAutoFormatByInput() const { return bAutoFmtByInput; }
100 void SetAutoFormatByInput( bool bSet ) { bAutoFmtByInput = bSet;aSwConfig.SetModified();}
102 bool IsSaveRelFile() const { return bFileRel; }
103 void SetSaveRelFile( bool bSet ) { bFileRel = bSet; aSwConfig.SetModified(); }
105 bool IsSaveRelNet() const { return bNetRel; }
106 void SetSaveRelNet( bool bSet ) { bNetRel = bSet; aSwConfig.SetModified();}
108 bool IsAutoTextPreview() const {return bAutoTextPreview;}
109 void SetAutoTextPreview(bool bSet) {bAutoTextPreview = bSet; aSwConfig.SetModified();}
111 bool IsAutoTextTip() const { return bAutoTextTip; }
112 void SetAutoTextTip(bool bSet ) { bAutoTextTip = bSet;aSwConfig.SetModified();}
114 bool IsSearchInAllCategories() const { return bSearchInAllCategories;}
115 void SetSearchInAllCategories(bool bSet ) { bSearchInAllCategories = bSet; aSwConfig.SetModified(); }
117 SvxAutoCorrCfg();
118 virtual ~SvxAutoCorrCfg();
119 static SvxAutoCorrCfg& Get();
123 #endif
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */