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