Line data Source code
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 :
20 : #include <vcl/keycodes.hxx>
21 : #include <tools/string.hxx>
22 :
23 : #include <editeng/swafopt.hxx>
24 :
25 48 : SvxSwAutoFmtFlags::SvxSwAutoFmtFlags()
26 : : aBulletFont( rtl::OUString("StarSymbol"),
27 48 : Size( 0, 14 ) )
28 : {
29 : bAutoCorrect =
30 : bCptlSttSntnc =
31 : bCptlSttWrd =
32 : bChkFontAttr =
33 : bChgUserColl =
34 : bChgEnumNum =
35 : bAddNonBrkSpace =
36 : bChgOrdinalNumber =
37 : bChgToEnEmDash =
38 : bChgWeightUnderl =
39 : bSetINetAttr =
40 : bAFmtDelSpacesAtSttEnd =
41 : bAFmtDelSpacesBetweenLines =
42 : bAFmtByInpDelSpacesAtSttEnd =
43 : bAFmtByInpDelSpacesBetweenLines =
44 48 : bDummy = sal_True;
45 :
46 : bReplaceStyles =
47 : bDelEmptyNode =
48 : bWithRedlining =
49 : bAutoCmpltEndless =
50 : bAutoCmpltAppendBlanc =
51 48 : bAutoCmpltShowAsTip = sal_False;
52 :
53 : bSetBorder =
54 : bCreateTable =
55 : bSetNumRule =
56 : bAFmtByInput =
57 : bRightMargin =
58 : bAutoCompleteWords =
59 : bAutoCmpltCollectWords =
60 48 : bAutoCmpltKeepList = sal_True;
61 :
62 : bDummy6 = bDummy7 = bDummy8 =
63 48 : sal_False;
64 :
65 48 : nRightMargin = 50; // dflt. 50 %
66 48 : nAutoCmpltExpandKey = KEY_RETURN;
67 :
68 48 : aBulletFont.SetCharSet( RTL_TEXTENCODING_SYMBOL );
69 48 : aBulletFont.SetFamily( FAMILY_DONTKNOW );
70 48 : aBulletFont.SetPitch( PITCH_DONTKNOW );
71 48 : aBulletFont.SetWeight( WEIGHT_DONTKNOW );
72 48 : aBulletFont.SetTransparent( sal_True );
73 :
74 48 : cBullet = 0x2022;
75 48 : cByInputBullet = cBullet;
76 48 : aByInputBulletFont = aBulletFont;
77 :
78 48 : nAutoCmpltWordLen = 10;
79 48 : nAutoCmpltListLen = 500;
80 48 : m_pAutoCompleteList = 0;
81 48 : pSmartTagMgr = 0;
82 48 : }
83 :
84 :
85 24 : SvxSwAutoFmtFlags& SvxSwAutoFmtFlags::operator=( const SvxSwAutoFmtFlags& rAFFlags )
86 : {
87 24 : bAutoCorrect = rAFFlags.bAutoCorrect;
88 24 : bCptlSttSntnc = rAFFlags.bCptlSttSntnc;
89 24 : bCptlSttWrd = rAFFlags.bCptlSttWrd;
90 24 : bChkFontAttr = rAFFlags.bChkFontAttr;
91 :
92 24 : bChgUserColl = rAFFlags.bChgUserColl;
93 24 : bChgEnumNum = rAFFlags.bChgEnumNum;
94 24 : bDelEmptyNode = rAFFlags.bDelEmptyNode;
95 24 : bSetNumRule = rAFFlags.bSetNumRule;
96 24 : bAFmtByInput = rAFFlags.bAFmtByInput;
97 :
98 24 : bAddNonBrkSpace = rAFFlags.bAddNonBrkSpace;
99 24 : bChgOrdinalNumber = rAFFlags.bChgOrdinalNumber;
100 24 : bChgToEnEmDash = rAFFlags.bChgToEnEmDash;
101 24 : bChgWeightUnderl = rAFFlags.bChgWeightUnderl;
102 24 : bSetINetAttr = rAFFlags.bSetINetAttr;
103 24 : bSetBorder = rAFFlags.bSetBorder;
104 24 : bCreateTable = rAFFlags.bCreateTable;
105 24 : bReplaceStyles = rAFFlags.bReplaceStyles;
106 24 : bAFmtDelSpacesAtSttEnd = rAFFlags.bAFmtDelSpacesAtSttEnd;
107 24 : bAFmtDelSpacesBetweenLines = rAFFlags.bAFmtDelSpacesBetweenLines;
108 24 : bAFmtByInpDelSpacesAtSttEnd = rAFFlags.bAFmtByInpDelSpacesAtSttEnd;
109 24 : bAFmtByInpDelSpacesBetweenLines = rAFFlags.bAFmtByInpDelSpacesBetweenLines;
110 :
111 24 : bDummy = rAFFlags.bDummy;
112 :
113 24 : bDummy6 = rAFFlags.bDummy6;
114 24 : bDummy7 = rAFFlags.bDummy7;
115 24 : bDummy8 = rAFFlags.bDummy8;
116 :
117 24 : bWithRedlining = rAFFlags.bWithRedlining;
118 :
119 24 : bRightMargin = rAFFlags.bRightMargin;
120 24 : nRightMargin = rAFFlags.nRightMargin;
121 :
122 24 : cBullet = rAFFlags.cBullet;
123 24 : aBulletFont = rAFFlags.aBulletFont;
124 :
125 24 : cByInputBullet = rAFFlags.cByInputBullet;
126 24 : aByInputBulletFont = rAFFlags.aByInputBulletFont;
127 :
128 24 : bAutoCompleteWords = rAFFlags.bAutoCompleteWords;
129 24 : bAutoCmpltCollectWords = rAFFlags.bAutoCmpltCollectWords;
130 24 : bAutoCmpltKeepList = rAFFlags.bAutoCmpltKeepList;
131 24 : bAutoCmpltEndless = rAFFlags.bAutoCmpltEndless;
132 24 : bAutoCmpltAppendBlanc = rAFFlags.bAutoCmpltAppendBlanc;
133 24 : bAutoCmpltShowAsTip = rAFFlags.bAutoCmpltShowAsTip;
134 24 : m_pAutoCompleteList = rAFFlags.m_pAutoCompleteList;
135 24 : pSmartTagMgr = rAFFlags.pSmartTagMgr;
136 24 : nAutoCmpltExpandKey = rAFFlags.nAutoCmpltExpandKey;
137 :
138 24 : nAutoCmpltWordLen = rAFFlags.nAutoCmpltWordLen;
139 24 : nAutoCmpltListLen = rAFFlags.nAutoCmpltListLen;
140 :
141 24 : return *this;
142 : }
143 :
144 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|