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 .
20 #ifndef EE_SVXSWAFOPT_HXX
21 #define EE_SVXSWAFOPT_HXX
23 #include <o3tl/sorted_vector.hxx>
25 #include <tools/string.hxx>
27 #include <vcl/font.hxx>
28 #include "editeng/editengdllapi.h"
34 class EDITENG_DLLPUBLIC IAutoCompleteString
39 explicit IAutoCompleteString(String
const& rString
) : m_String(rString
) {}
40 virtual ~IAutoCompleteString() {}
41 String
const& GetAutoCompleteString() const { return m_String
; }
44 struct CompareAutoCompleteString
46 bool operator()(IAutoCompleteString
*const& lhs
,
47 IAutoCompleteString
*const& rhs
) const
49 return lhs
->GetAutoCompleteString().CompareIgnoreCaseToAscii(
50 rhs
->GetAutoCompleteString()) == COMPARE_LESS
;
54 class SortedAutoCompleteStrings
55 : public o3tl::sorted_vector
<IAutoCompleteString
*, CompareAutoCompleteString
>
58 ~SortedAutoCompleteStrings() { DeleteAndDestroyAll(); }
61 } // namespace editeng
63 // Class of options for AutoFormat
64 struct EDITENG_DLLPUBLIC SvxSwAutoFmtFlags
67 Font aByInputBulletFont
;
68 /// only valid inside the Dialog!!!
69 const editeng::SortedAutoCompleteStrings
* m_pAutoCompleteList
;
70 SmartTagMgr
* pSmartTagMgr
;
73 sal_Unicode cByInputBullet
;
75 sal_uInt16 nAutoCmpltWordLen
, nAutoCmpltListLen
;
76 sal_uInt16 nAutoCmpltExpandKey
;
78 sal_uInt8 nRightMargin
;
80 sal_Bool bAutoCorrect
: 1;
81 sal_Bool bCptlSttSntnc
: 1;
82 sal_Bool bCptlSttWrd
: 1;
83 sal_Bool bChkFontAttr
: 1;
85 sal_Bool bChgUserColl
: 1;
86 sal_Bool bChgEnumNum
: 1;
88 sal_Bool bAFmtByInput
: 1;
89 sal_Bool bDelEmptyNode
: 1;
90 sal_Bool bSetNumRule
: 1;
92 sal_Bool bChgOrdinalNumber
: 1;
93 sal_Bool bChgToEnEmDash
: 1;
94 sal_Bool bAddNonBrkSpace
: 1;
95 sal_Bool bChgWeightUnderl
: 1;
96 sal_Bool bSetINetAttr
: 1;
98 sal_Bool bSetBorder
: 1;
99 sal_Bool bCreateTable
: 1;
100 sal_Bool bReplaceStyles
: 1;
103 sal_Bool bWithRedlining
: 1;
105 sal_Bool bRightMargin
: 1;
107 sal_Bool bAutoCompleteWords
: 1;
108 sal_Bool bAutoCmpltCollectWords
: 1;
109 sal_Bool bAutoCmpltEndless
: 1;
110 // -- under NT here starts a new long
111 sal_Bool bAutoCmpltAppendBlanc
: 1;
112 sal_Bool bAutoCmpltShowAsTip
: 1;
114 sal_Bool bAFmtDelSpacesAtSttEnd
: 1;
115 sal_Bool bAFmtDelSpacesBetweenLines
: 1;
116 sal_Bool bAFmtByInpDelSpacesAtSttEnd
: 1;
117 sal_Bool bAFmtByInpDelSpacesBetweenLines
: 1;
119 sal_Bool bAutoCmpltKeepList
: 1;
121 // some dummies for any new options
122 sal_Bool bDummy6
: 1,
128 SvxSwAutoFmtFlags( const SvxSwAutoFmtFlags
& rAFFlags
) { *this = rAFFlags
; }
129 SvxSwAutoFmtFlags
& operator=( const SvxSwAutoFmtFlags
& );
134 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */