xref: /trunk/main/editeng/source/misc/swafopt.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_editeng.hxx"
30 #include <vcl/keycodes.hxx>
31 #include <tools/string.hxx>
32 
33 #include <editeng/swafopt.hxx>
34 
35 /*------------------------------------------------------------------------
36  Beschreibung:
37 ------------------------------------------------------------------------*/
38 
39 SvxSwAutoFmtFlags::SvxSwAutoFmtFlags()
40     : aBulletFont( String::CreateFromAscii(
41                         RTL_CONSTASCII_STRINGPARAM( "StarSymbol" )),
42                     Size( 0, 14 ) )
43 {
44     bAutoCorrect =
45     bCptlSttSntnc =
46     bCptlSttWrd =
47     bChkFontAttr =
48     bChgUserColl =
49     bChgEnumNum =
50     bAddNonBrkSpace =
51     bChgOrdinalNumber =
52     bChgToEnEmDash =
53     bChgWeightUnderl =
54     bSetINetAttr =
55     bAFmtDelSpacesAtSttEnd =
56     bAFmtDelSpacesBetweenLines =
57     bAFmtByInpDelSpacesAtSttEnd =
58     bAFmtByInpDelSpacesBetweenLines =
59     bDummy = sal_True;
60 
61     bReplaceStyles =
62     bDelEmptyNode =
63     bWithRedlining =
64     bAutoCmpltEndless =
65     bAutoCmpltAppendBlanc =
66     bAutoCmpltShowAsTip = sal_False;
67 
68     bSetBorder =
69     bCreateTable =
70     bSetNumRule =
71     bAFmtByInput =
72     bRightMargin =
73     bAutoCompleteWords =
74     bAutoCmpltCollectWords =
75     bAutoCmpltKeepList = sal_True;
76 
77     bDummy6 = bDummy7 = bDummy8 =
78          sal_False;
79 
80     nRightMargin = 50;      // dflt. 50 %
81     nAutoCmpltExpandKey = KEY_RETURN;
82 
83     aBulletFont.SetCharSet( RTL_TEXTENCODING_SYMBOL );
84     aBulletFont.SetFamily( FAMILY_DONTKNOW );
85     aBulletFont.SetPitch( PITCH_DONTKNOW );
86     aBulletFont.SetWeight( WEIGHT_DONTKNOW );
87     aBulletFont.SetTransparent( sal_True );
88 
89     cBullet = 0x2022;
90     cByInputBullet = cBullet;
91     aByInputBulletFont = aBulletFont;
92 
93     nAutoCmpltWordLen = 10;
94     nAutoCmpltListLen = 500;
95     pAutoCmpltList = 0;
96     pSmartTagMgr = 0;
97 }
98 
99 
100 SvxSwAutoFmtFlags& SvxSwAutoFmtFlags::operator=( const SvxSwAutoFmtFlags& rAFFlags )
101 {
102     bAutoCorrect = rAFFlags.bAutoCorrect;
103     bCptlSttSntnc = rAFFlags.bCptlSttSntnc;
104     bCptlSttWrd = rAFFlags.bCptlSttWrd;
105     bChkFontAttr = rAFFlags.bChkFontAttr;
106 
107     bChgUserColl = rAFFlags.bChgUserColl;
108     bChgEnumNum = rAFFlags.bChgEnumNum;
109     bDelEmptyNode = rAFFlags.bDelEmptyNode;
110     bSetNumRule = rAFFlags.bSetNumRule;
111     bAFmtByInput = rAFFlags.bAFmtByInput;
112 
113     bAddNonBrkSpace = rAFFlags.bAddNonBrkSpace;
114     bChgOrdinalNumber = rAFFlags.bChgOrdinalNumber;
115     bChgToEnEmDash = rAFFlags.bChgToEnEmDash;
116     bChgWeightUnderl = rAFFlags.bChgWeightUnderl;
117     bSetINetAttr = rAFFlags.bSetINetAttr;
118     bSetBorder = rAFFlags.bSetBorder;
119     bCreateTable = rAFFlags.bCreateTable;
120     bReplaceStyles = rAFFlags.bReplaceStyles;
121     bAFmtDelSpacesAtSttEnd = rAFFlags.bAFmtDelSpacesAtSttEnd;
122     bAFmtDelSpacesBetweenLines = rAFFlags.bAFmtDelSpacesBetweenLines;
123     bAFmtByInpDelSpacesAtSttEnd = rAFFlags.bAFmtByInpDelSpacesAtSttEnd;
124     bAFmtByInpDelSpacesBetweenLines = rAFFlags.bAFmtByInpDelSpacesBetweenLines;
125 
126     bDummy = rAFFlags.bDummy;
127 
128     bDummy6 = rAFFlags.bDummy6;
129     bDummy7 = rAFFlags.bDummy7;
130     bDummy8 = rAFFlags.bDummy8;
131 
132     bWithRedlining = rAFFlags.bWithRedlining;
133 
134     bRightMargin = rAFFlags.bRightMargin;
135     nRightMargin = rAFFlags.nRightMargin;
136 
137     cBullet = rAFFlags.cBullet;
138     aBulletFont = rAFFlags.aBulletFont;
139 
140     cByInputBullet = rAFFlags.cByInputBullet;
141     aByInputBulletFont = rAFFlags.aByInputBulletFont;
142 
143     bAutoCompleteWords = rAFFlags.bAutoCompleteWords;
144     bAutoCmpltCollectWords = rAFFlags.bAutoCmpltCollectWords;
145     bAutoCmpltKeepList = rAFFlags.bAutoCmpltKeepList;
146     bAutoCmpltEndless = rAFFlags.bAutoCmpltEndless;
147     bAutoCmpltAppendBlanc = rAFFlags.bAutoCmpltAppendBlanc;
148     bAutoCmpltShowAsTip = rAFFlags.bAutoCmpltShowAsTip;
149     pAutoCmpltList = rAFFlags.pAutoCmpltList;
150     pSmartTagMgr = rAFFlags.pSmartTagMgr;
151     nAutoCmpltExpandKey = rAFFlags.nAutoCmpltExpandKey;
152 
153     nAutoCmpltWordLen = rAFFlags.nAutoCmpltWordLen;
154     nAutoCmpltListLen = rAFFlags.nAutoCmpltListLen;
155 
156     return *this;
157 }
158 
159