xref: /AOO41X/main/editeng/source/misc/swafopt.cxx (revision 190118d08a3be86671f4129b3e9a490e144719cd)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_editeng.hxx"
26 #include <vcl/keycodes.hxx>
27 #include <tools/string.hxx>
28 
29 #include <editeng/swafopt.hxx>
30 
31 /*------------------------------------------------------------------------
32  Beschreibung:
33 ------------------------------------------------------------------------*/
34 
SvxSwAutoFmtFlags()35 SvxSwAutoFmtFlags::SvxSwAutoFmtFlags()
36     : aBulletFont( String::CreateFromAscii(
37                         RTL_CONSTASCII_STRINGPARAM( "StarSymbol" )),
38                     Size( 0, 14 ) )
39 {
40     bAutoCorrect =
41     bCptlSttSntnc =
42     bCptlSttWrd =
43     bChkFontAttr =
44     bChgUserColl =
45     bChgEnumNum =
46     bAddNonBrkSpace =
47     bChgOrdinalNumber =
48     bChgToEnEmDash =
49     bChgWeightUnderl =
50     bSetINetAttr =
51     bAFmtDelSpacesAtSttEnd =
52     bAFmtDelSpacesBetweenLines =
53     bAFmtByInpDelSpacesAtSttEnd =
54     bAFmtByInpDelSpacesBetweenLines =
55     bDummy = sal_True;
56 
57     bReplaceStyles =
58     bDelEmptyNode =
59     bWithRedlining =
60     bAutoCmpltEndless =
61     bAutoCmpltAppendBlanc =
62     bAutoCmpltShowAsTip = sal_False;
63 
64     bSetBorder =
65     bCreateTable =
66     bSetNumRule =
67     bAFmtByInput =
68     bRightMargin =
69     bAutoCompleteWords =
70     bAutoCmpltCollectWords =
71     bAutoCmpltKeepList = sal_True;
72 
73     bDummy6 = bDummy7 = bDummy8 =
74          sal_False;
75 
76     nRightMargin = 50;      // dflt. 50 %
77     nAutoCmpltExpandKey = KEY_RETURN;
78 
79     aBulletFont.SetCharSet( RTL_TEXTENCODING_SYMBOL );
80     aBulletFont.SetFamily( FAMILY_DONTKNOW );
81     aBulletFont.SetPitch( PITCH_DONTKNOW );
82     aBulletFont.SetWeight( WEIGHT_DONTKNOW );
83     aBulletFont.SetTransparent( sal_True );
84 
85     cBullet = 0x2022;
86     cByInputBullet = cBullet;
87     aByInputBulletFont = aBulletFont;
88 
89     nAutoCmpltWordLen = 10;
90     nAutoCmpltListLen = 500;
91     pAutoCmpltList = 0;
92     pSmartTagMgr = 0;
93 }
94 
95 
operator =(const SvxSwAutoFmtFlags & rAFFlags)96 SvxSwAutoFmtFlags& SvxSwAutoFmtFlags::operator=( const SvxSwAutoFmtFlags& rAFFlags )
97 {
98     bAutoCorrect = rAFFlags.bAutoCorrect;
99     bCptlSttSntnc = rAFFlags.bCptlSttSntnc;
100     bCptlSttWrd = rAFFlags.bCptlSttWrd;
101     bChkFontAttr = rAFFlags.bChkFontAttr;
102 
103     bChgUserColl = rAFFlags.bChgUserColl;
104     bChgEnumNum = rAFFlags.bChgEnumNum;
105     bDelEmptyNode = rAFFlags.bDelEmptyNode;
106     bSetNumRule = rAFFlags.bSetNumRule;
107     bAFmtByInput = rAFFlags.bAFmtByInput;
108 
109     bAddNonBrkSpace = rAFFlags.bAddNonBrkSpace;
110     bChgOrdinalNumber = rAFFlags.bChgOrdinalNumber;
111     bChgToEnEmDash = rAFFlags.bChgToEnEmDash;
112     bChgWeightUnderl = rAFFlags.bChgWeightUnderl;
113     bSetINetAttr = rAFFlags.bSetINetAttr;
114     bSetBorder = rAFFlags.bSetBorder;
115     bCreateTable = rAFFlags.bCreateTable;
116     bReplaceStyles = rAFFlags.bReplaceStyles;
117     bAFmtDelSpacesAtSttEnd = rAFFlags.bAFmtDelSpacesAtSttEnd;
118     bAFmtDelSpacesBetweenLines = rAFFlags.bAFmtDelSpacesBetweenLines;
119     bAFmtByInpDelSpacesAtSttEnd = rAFFlags.bAFmtByInpDelSpacesAtSttEnd;
120     bAFmtByInpDelSpacesBetweenLines = rAFFlags.bAFmtByInpDelSpacesBetweenLines;
121 
122     bDummy = rAFFlags.bDummy;
123 
124     bDummy6 = rAFFlags.bDummy6;
125     bDummy7 = rAFFlags.bDummy7;
126     bDummy8 = rAFFlags.bDummy8;
127 
128     bWithRedlining = rAFFlags.bWithRedlining;
129 
130     bRightMargin = rAFFlags.bRightMargin;
131     nRightMargin = rAFFlags.nRightMargin;
132 
133     cBullet = rAFFlags.cBullet;
134     aBulletFont = rAFFlags.aBulletFont;
135 
136     cByInputBullet = rAFFlags.cByInputBullet;
137     aByInputBulletFont = rAFFlags.aByInputBulletFont;
138 
139     bAutoCompleteWords = rAFFlags.bAutoCompleteWords;
140     bAutoCmpltCollectWords = rAFFlags.bAutoCmpltCollectWords;
141     bAutoCmpltKeepList = rAFFlags.bAutoCmpltKeepList;
142     bAutoCmpltEndless = rAFFlags.bAutoCmpltEndless;
143     bAutoCmpltAppendBlanc = rAFFlags.bAutoCmpltAppendBlanc;
144     bAutoCmpltShowAsTip = rAFFlags.bAutoCmpltShowAsTip;
145     pAutoCmpltList = rAFFlags.pAutoCmpltList;
146     pSmartTagMgr = rAFFlags.pSmartTagMgr;
147     nAutoCmpltExpandKey = rAFFlags.nAutoCmpltExpandKey;
148 
149     nAutoCmpltWordLen = rAFFlags.nAutoCmpltWordLen;
150     nAutoCmpltListLen = rAFFlags.nAutoCmpltListLen;
151 
152     return *this;
153 }
154 
155