LibreOffice Module editeng (master) 1
acorrcfg.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#ifndef INCLUDED_EDITENG_ACORRCFG_HXX
20#define INCLUDED_EDITENG_ACORRCFG_HXX
21
24#include <memory>
25
26class SvxAutoCorrect;
27class SvxAutoCorrCfg;
28
30{
31private:
33 static css::uno::Sequence<OUString> GetPropertyNames();
34
35 virtual void ImplCommit() override;
36
37public:
39 virtual ~SvxBaseAutoCorrCfg() override;
40
41 void Load(bool bInit);
42 virtual void Notify( const css::uno::Sequence<OUString>& aPropertyNames) override;
43 using ConfigItem::SetModified;
44};
45
47{
48private:
50 static css::uno::Sequence<OUString> GetPropertyNames();
51
52 virtual void ImplCommit() override;
53
54public:
56 virtual ~SvxSwAutoCorrCfg() override;
57
58 void Load(bool bInit);
59 virtual void Notify( const css::uno::Sequence<OUString>& aPropertyNames) override;
60 using ConfigItem::SetModified;
61};
62/*--------------------------------------------------------------------
63 Description: Configuration for Auto Correction
64 --------------------------------------------------------------------*/
66{
67 friend class SvxBaseAutoCorrCfg;
68 friend class SvxSwAutoCorrCfg;
69
70 std::unique_ptr<SvxAutoCorrect> pAutoCorrect;
71
74
75 // Flags for Autotext:
77 bool bNetRel;
78 // Help tip for Autotext as you type
83
84public:
86 {
87 aBaseConfig.SetModified();
88 aSwConfig.SetModified();
89 }
90 void Commit()
91 {
92 aBaseConfig.Commit();
93 aSwConfig.Commit();
94 }
95
96 SvxAutoCorrect* GetAutoCorrect() { return pAutoCorrect.get(); }
97 const SvxAutoCorrect* GetAutoCorrect() const { return pAutoCorrect.get(); }
98 // the pointer is transferred to the possession of the ConfigItems!
99 void SetAutoCorrect( SvxAutoCorrect* );
100
101 bool IsAutoFormatByInput() const { return bAutoFmtByInput; }
102 void SetAutoFormatByInput( bool bSet ) { bAutoFmtByInput = bSet;aSwConfig.SetModified();}
103
104 bool IsSaveRelFile() const { return bFileRel; }
105 void SetSaveRelFile( bool bSet ) { bFileRel = bSet; aSwConfig.SetModified(); }
106
107 bool IsSaveRelNet() const { return bNetRel; }
108 void SetSaveRelNet( bool bSet ) { bNetRel = bSet; aSwConfig.SetModified();}
109
110 bool IsAutoTextTip() const { return bAutoTextTip; }
111 void SetAutoTextTip(bool bSet ) { bAutoTextTip = bSet;aSwConfig.SetModified();}
112
113 bool IsSearchInAllCategories() const { return bSearchInAllCategories;}
114
117 static SvxAutoCorrCfg& Get();
118};
119
120
121#endif
122
123/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetSaveRelNet(bool bSet)
Definition: acorrcfg.hxx:108
SvxSwAutoCorrCfg aSwConfig
Definition: acorrcfg.hxx:73
bool bAutoTextTip
Definition: acorrcfg.hxx:79
bool IsSaveRelNet() const
Definition: acorrcfg.hxx:107
bool bAutoFmtByInput
Definition: acorrcfg.hxx:81
void SetSaveRelFile(bool bSet)
Definition: acorrcfg.hxx:105
bool IsSearchInAllCategories() const
Definition: acorrcfg.hxx:113
std::unique_ptr< SvxAutoCorrect > pAutoCorrect
Definition: acorrcfg.hxx:70
const SvxAutoCorrect * GetAutoCorrect() const
Definition: acorrcfg.hxx:97
void Commit()
Definition: acorrcfg.hxx:90
bool bSearchInAllCategories
Definition: acorrcfg.hxx:82
void SetModified()
Definition: acorrcfg.hxx:85
bool bAutoTextPreview
Definition: acorrcfg.hxx:80
SvxBaseAutoCorrCfg aBaseConfig
Definition: acorrcfg.hxx:72
bool IsAutoFormatByInput() const
Definition: acorrcfg.hxx:101
SvxAutoCorrect * GetAutoCorrect()
Definition: acorrcfg.hxx:96
bool IsAutoTextTip() const
Definition: acorrcfg.hxx:110
bool IsSaveRelFile() const
Definition: acorrcfg.hxx:104
void SetAutoTextTip(bool bSet)
Definition: acorrcfg.hxx:111
void SetAutoFormatByInput(bool bSet)
Definition: acorrcfg.hxx:102
SvxBaseAutoCorrCfg(SvxAutoCorrCfg &rParent)
Definition: acorrcfg.cxx:314
void Load(bool bInit)
Definition: acorrcfg.cxx:199
virtual void ImplCommit() override
Definition: acorrcfg.cxx:324
virtual ~SvxBaseAutoCorrCfg() override
Definition: acorrcfg.cxx:320
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: acorrcfg.cxx:367
SvxAutoCorrCfg & rParent
Definition: acorrcfg.hxx:32
static css::uno::Sequence< OUString > GetPropertyNames()
Definition: acorrcfg.cxx:165
virtual ~SvxSwAutoCorrCfg() override
Definition: acorrcfg.cxx:587
SvxAutoCorrCfg & rParent
Definition: acorrcfg.hxx:49
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: acorrcfg.cxx:683
static css::uno::Sequence< OUString > GetPropertyNames()
Definition: acorrcfg.cxx:372
SvxSwAutoCorrCfg(SvxAutoCorrCfg &rParent)
Definition: acorrcfg.cxx:581
void Load(bool bInit)
Definition: acorrcfg.cxx:433
virtual void ImplCommit() override
Definition: acorrcfg.cxx:591
#define EDITENG_DLLPUBLIC
Definition: editengdllapi.h:28
SVXCORE_DLLPUBLIC MSO_SPT Get(const OUString &)