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