tblafmt.hxx (1d2dbeb0) tblafmt.hxx (7114c7e9)
1/**************************************************************
1/**************************************************************
2 *
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
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 *
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
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.
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 *
19 *
20 *************************************************************/
21
22
20 *************************************************************/
21
22
23
23#ifndef _TBLAFMT_HXX
24#define _TBLAFMT_HXX
25/*************************************************************************
26!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27
28JP 20.07.95:
29
30 Die akt. Struktur der Autoformatierung darf nicht mehr veraendert werden.
24#ifndef _TBLAFMT_HXX
25#define _TBLAFMT_HXX
26/*************************************************************************
27!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
28
29JP 20.07.95:
30
31 Die akt. Struktur der Autoformatierung darf nicht mehr veraendert werden.
31 Diese wird durch unterschiedlichen Code vom StartWriter und vom StarCalc
32 Diese wird durch unterschiedlichen Code von Writer und Calc
32 eingelesen/geschrieben.
33 eingelesen/geschrieben.
33 Sollte sich doch mal eine Aenderung nicht vermeiden lassen, dann auf
34 jedenfall in beiden Applikationen aendern.
34 Sollte sich doch mal eine Änderung nicht vermeiden lassen, dann auf
35 jeden Fall in beiden Applikationen ändern.
35
36
36 The structure of table auto formatting should not changed. It is used
37 by different code of Writer and Calc. If a change is necessary, the
38 source code of both applications must be changed!
37 The structure of table auto formatting should not changed. It is used
38 by different code of Writer and Calc. If a change is necessary, the
39 source code of both applications must be changed!
39
40!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
41**************************************************************************/
42
43#include <svl/svarray.hxx>
44#include "hintids.hxx" //_immmer_ vor den solar-items!
45#include <svx/algitem.hxx>
46#include <editeng/fontitem.hxx>

--- 16 unchanged lines hidden (view full) ---

63#include "swdllapi.h"
64
65struct SwAfVersions;
66
67class SvNumberFormatter;
68
69class SwBoxAutoFmt
70{
40
41!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
42**************************************************************************/
43
44#include <svl/svarray.hxx>
45#include "hintids.hxx" //_immmer_ vor den solar-items!
46#include <svx/algitem.hxx>
47#include <editeng/fontitem.hxx>

--- 16 unchanged lines hidden (view full) ---

64#include "swdllapi.h"
65
66struct SwAfVersions;
67
68class SvNumberFormatter;
69
70class SwBoxAutoFmt
71{
71 // common attributes of Calc and Writer
72 // --- from 641 on: CJK and CTL font settings
73 SvxFontItem aFont;
74 SvxFontHeightItem aHeight;
75 SvxWeightItem aWeight;
76 SvxPostureItem aPosture;
72 // common attributes of Calc and Writer
73 // --- from 641 on: CJK and CTL font settings
74 SvxFontItem aFont;
75 SvxFontHeightItem aHeight;
76 SvxWeightItem aWeight;
77 SvxPostureItem aPosture;
77
78
78 SvxFontItem aCJKFont;
79 SvxFontHeightItem aCJKHeight;
80 SvxWeightItem aCJKWeight;
81 SvxPostureItem aCJKPosture;
79 SvxFontItem aCJKFont;
80 SvxFontHeightItem aCJKHeight;
81 SvxWeightItem aCJKWeight;
82 SvxPostureItem aCJKPosture;
82
83
83 SvxFontItem aCTLFont;
84 SvxFontHeightItem aCTLHeight;
85 SvxWeightItem aCTLWeight;
86 SvxPostureItem aCTLPosture;
84 SvxFontItem aCTLFont;
85 SvxFontHeightItem aCTLHeight;
86 SvxWeightItem aCTLWeight;
87 SvxPostureItem aCTLPosture;
87
88 SvxUnderlineItem aUnderline;
89 SvxOverlineItem aOverline;
90 SvxCrossedOutItem aCrossedOut;
91 SvxContourItem aContour;
92 SvxShadowedItem aShadowed;
93 SvxColorItem aColor;
94 SvxBoxItem aBox;
88
89 SvxUnderlineItem aUnderline;
90 SvxOverlineItem aOverline;
91 SvxCrossedOutItem aCrossedOut;
92 SvxContourItem aContour;
93 SvxShadowedItem aShadowed;
94 SvxColorItem aColor;
95 SvxBoxItem aBox;
95 SvxLineItem aTLBR;
96 SvxLineItem aBLTR;
96 SvxLineItem aTLBR;
97 SvxLineItem aBLTR;
97 SvxBrushItem aBackground;
98
98 SvxBrushItem aBackground;
99
99 // Writer specific
100 // Writer specific
100 SvxAdjustItem aAdjust;
101
101 SvxAdjustItem aAdjust;
102
102 // Calc specific
103 // Calc specific
103 SvxHorJustifyItem aHorJustify;
104 SvxVerJustifyItem aVerJustify;
104 SvxHorJustifyItem aHorJustify;
105 SvxVerJustifyItem aVerJustify;
105 SfxBoolItem aStacked;
106 SfxBoolItem aStacked;
106 SvxMarginItem aMargin;
107 SfxBoolItem aLinebreak;
108 SfxInt32Item aRotateAngle;
109 SvxRotateModeItem aRotateMode;
110
107 SvxMarginItem aMargin;
108 SfxBoolItem aLinebreak;
109 SfxInt32Item aRotateAngle;
110 SvxRotateModeItem aRotateMode;
111
111 // number format
112 // number format
112 String sNumFmtString;
113 LanguageType eSysLanguage, eNumFmtLanguage;
114
115public:
116 SwBoxAutoFmt();
117 SwBoxAutoFmt( const SwBoxAutoFmt& rNew );
118 ~SwBoxAutoFmt();
119
120 int operator==( const SwBoxAutoFmt& rCmp ) const;
121 SwBoxAutoFmt& operator=( const SwBoxAutoFmt& rNew );
122
123 // die Get-Methoden
124 const SvxFontItem &GetFont() const { return aFont; }
113 String sNumFmtString;
114 LanguageType eSysLanguage, eNumFmtLanguage;
115
116public:
117 SwBoxAutoFmt();
118 SwBoxAutoFmt( const SwBoxAutoFmt& rNew );
119 ~SwBoxAutoFmt();
120
121 int operator==( const SwBoxAutoFmt& rCmp ) const;
122 SwBoxAutoFmt& operator=( const SwBoxAutoFmt& rNew );
123
124 // die Get-Methoden
125 const SvxFontItem &GetFont() const { return aFont; }
125 const SvxFontHeightItem &GetHeight() const { return aHeight; }
126 const SvxWeightItem &GetWeight() const { return aWeight; }
127 const SvxPostureItem &GetPosture() const { return aPosture; }
128 const SvxFontItem &GetCJKFont() const { return aCJKFont; }
129 const SvxFontHeightItem &GetCJKHeight() const { return aCJKHeight; }
130 const SvxWeightItem &GetCJKWeight() const { return aCJKWeight; }
131 const SvxPostureItem &GetCJKPosture() const { return aCJKPosture; }
132 const SvxFontItem &GetCTLFont() const { return aCTLFont; }
133 const SvxFontHeightItem &GetCTLHeight() const { return aCTLHeight; }
134 const SvxWeightItem &GetCTLWeight() const { return aCTLWeight; }
135 const SvxPostureItem &GetCTLPosture() const { return aCTLPosture; }
136 const SvxUnderlineItem &GetUnderline() const { return aUnderline; }
137 const SvxOverlineItem &GetOverline() const { return aOverline; }
138 const SvxCrossedOutItem &GetCrossedOut() const { return aCrossedOut; }
139 const SvxContourItem &GetContour() const { return aContour; }
140 const SvxShadowedItem &GetShadowed() const { return aShadowed; }
141 const SvxColorItem &GetColor() const { return aColor; }
126 const SvxFontHeightItem &GetHeight() const { return aHeight; }
127 const SvxWeightItem &GetWeight() const { return aWeight; }
128 const SvxPostureItem &GetPosture() const { return aPosture; }
129 const SvxFontItem &GetCJKFont() const { return aCJKFont; }
130 const SvxFontHeightItem &GetCJKHeight() const { return aCJKHeight; }
131 const SvxWeightItem &GetCJKWeight() const { return aCJKWeight; }
132 const SvxPostureItem &GetCJKPosture() const { return aCJKPosture; }
133 const SvxFontItem &GetCTLFont() const { return aCTLFont; }
134 const SvxFontHeightItem &GetCTLHeight() const { return aCTLHeight; }
135 const SvxWeightItem &GetCTLWeight() const { return aCTLWeight; }
136 const SvxPostureItem &GetCTLPosture() const { return aCTLPosture; }
137 const SvxUnderlineItem &GetUnderline() const { return aUnderline; }
138 const SvxOverlineItem &GetOverline() const { return aOverline; }
139 const SvxCrossedOutItem &GetCrossedOut() const { return aCrossedOut; }
140 const SvxContourItem &GetContour() const { return aContour; }
141 const SvxShadowedItem &GetShadowed() const { return aShadowed; }
142 const SvxColorItem &GetColor() const { return aColor; }
142 const SvxAdjustItem &GetAdjust() const { return aAdjust; }
143 const SvxAdjustItem &GetAdjust() const { return aAdjust; }
143 const SvxBoxItem &GetBox() const { return aBox; }
144 const SvxLineItem &GetTLBR() const { return aTLBR; }
145 const SvxLineItem &GetBLTR() const { return aBLTR; }
146 const SvxBrushItem &GetBackground() const { return aBackground; }
144 const SvxBoxItem &GetBox() const { return aBox; }
145 const SvxLineItem &GetTLBR() const { return aTLBR; }
146 const SvxLineItem &GetBLTR() const { return aBLTR; }
147 const SvxBrushItem &GetBackground() const { return aBackground; }
147 void GetValueFormat( String& rFmt, LanguageType& rLng, LanguageType& rSys ) const
148 { rFmt = sNumFmtString; rLng = eNumFmtLanguage; rSys = eSysLanguage; }
149
150 // die SetMethoden
148 void GetValueFormat( String& rFmt, LanguageType& rLng, LanguageType& rSys ) const
149 { rFmt = sNumFmtString; rLng = eNumFmtLanguage; rSys = eSysLanguage; }
150
151 // die SetMethoden
151 void SetFont( const SvxFontItem& rNew ) { aFont = rNew; }
152 void SetHeight( const SvxFontHeightItem& rNew ) { aHeight = rNew; }
153 void SetWeight( const SvxWeightItem& rNew ) { aWeight = rNew; }
154 void SetPosture( const SvxPostureItem& rNew ) { aPosture = rNew; }
155 void SetCJKFont( const SvxFontItem& rNew ) { aCJKFont = rNew; }
156 void SetCJKHeight( const SvxFontHeightItem& rNew ) { aCJKHeight = rNew; }
157 void SetCJKWeight( const SvxWeightItem& rNew ) { aCJKWeight = rNew; }
158 void SetCJKPosture( const SvxPostureItem& rNew ) { aCJKPosture = rNew; }
159 void SetCTLFont( const SvxFontItem& rNew ) { aCTLFont = rNew; }
160 void SetCTLHeight( const SvxFontHeightItem& rNew ) { aCTLHeight = rNew; }
161 void SetCTLWeight( const SvxWeightItem& rNew ) { aCTLWeight = rNew; }
162 void SetCTLPosture( const SvxPostureItem& rNew ) { aCTLPosture = rNew; }
163 void SetUnderline( const SvxUnderlineItem& rNew ) { aUnderline = rNew; }
164 void SetOverline( const SvxOverlineItem& rNew ) { aOverline = rNew; }
152 void SetFont( const SvxFontItem& rNew ) { aFont = rNew; }
153 void SetHeight( const SvxFontHeightItem& rNew ) { aHeight = rNew; }
154 void SetWeight( const SvxWeightItem& rNew ) { aWeight = rNew; }
155 void SetPosture( const SvxPostureItem& rNew ) { aPosture = rNew; }
156 void SetCJKFont( const SvxFontItem& rNew ) { aCJKFont = rNew; }
157 void SetCJKHeight( const SvxFontHeightItem& rNew ) { aCJKHeight = rNew; }
158 void SetCJKWeight( const SvxWeightItem& rNew ) { aCJKWeight = rNew; }
159 void SetCJKPosture( const SvxPostureItem& rNew ) { aCJKPosture = rNew; }
160 void SetCTLFont( const SvxFontItem& rNew ) { aCTLFont = rNew; }
161 void SetCTLHeight( const SvxFontHeightItem& rNew ) { aCTLHeight = rNew; }
162 void SetCTLWeight( const SvxWeightItem& rNew ) { aCTLWeight = rNew; }
163 void SetCTLPosture( const SvxPostureItem& rNew ) { aCTLPosture = rNew; }
164 void SetUnderline( const SvxUnderlineItem& rNew ) { aUnderline = rNew; }
165 void SetOverline( const SvxOverlineItem& rNew ) { aOverline = rNew; }
165 void SetCrossedOut( const SvxCrossedOutItem& rNew ) { aCrossedOut = rNew; }
166 void SetCrossedOut( const SvxCrossedOutItem& rNew ) { aCrossedOut = rNew; }
166 void SetContour( const SvxContourItem& rNew ) { aContour = rNew; }
167 void SetShadowed( const SvxShadowedItem& rNew ) { aShadowed = rNew; }
168 void SetColor( const SvxColorItem& rNew ) { aColor = rNew; }
167 void SetContour( const SvxContourItem& rNew ) { aContour = rNew; }
168 void SetShadowed( const SvxShadowedItem& rNew ) { aShadowed = rNew; }
169 void SetColor( const SvxColorItem& rNew ) { aColor = rNew; }
169 void SetAdjust( const SvxAdjustItem& rNew )
170 {
171 aAdjust.SetAdjust( rNew.GetAdjust() );
172 aAdjust.SetOneWord( rNew.GetOneWord() );
173 aAdjust.SetLastBlock( rNew.GetLastBlock() );
174 }
170 void SetAdjust( const SvxAdjustItem& rNew )
171 {
172 aAdjust.SetAdjust( rNew.GetAdjust() );
173 aAdjust.SetOneWord( rNew.GetOneWord() );
174 aAdjust.SetLastBlock( rNew.GetLastBlock() );
175 }
175 void SetBox( const SvxBoxItem& rNew ) { aBox = rNew; }
176 void SetBackground( const SvxBrushItem& rNew ) { aBackground = rNew; }
176 void SetBox( const SvxBoxItem& rNew ) { aBox = rNew; }
177 void SetBackground( const SvxBrushItem& rNew ) { aBackground = rNew; }
177 void SetValueFormat( const String& rFmt, LanguageType eLng, LanguageType eSys )
178 { sNumFmtString = rFmt; eNumFmtLanguage = eLng; eSysLanguage = eSys; }
179
180 sal_Bool Load( SvStream& rStream, const SwAfVersions& rVersions, sal_uInt16 nVer );
181 sal_Bool Save( SvStream& rStream ) const;
178 void SetValueFormat( const String& rFmt, LanguageType eLng, LanguageType eSys )
179 { sNumFmtString = rFmt; eNumFmtLanguage = eLng; eSysLanguage = eSys; }
180
181 sal_Bool Load( SvStream& rStream, const SwAfVersions& rVersions, sal_uInt16 nVer );
182 sal_Bool Save( SvStream& rStream ) const;
182 sal_Bool SaveVerionNo( SvStream& rStream ) const;
183 sal_Bool SaveVersionNo( SvStream& rStream ) const;
183
184#ifdef READ_OLDVERS
185 // lade alte Version
186 sal_Bool LoadOld( SvStream& rStream, sal_uInt16 aLoadVer[] );
187#endif
188};
189
190class SW_DLLPUBLIC SwTableAutoFmt
191{
192 friend void _FinitCore(); // zum Zerstoeren des dflt. Pointers
193 static SwBoxAutoFmt* pDfltBoxAutoFmt;
194
195 String aName;
196 sal_uInt16 nStrResId;
197
184
185#ifdef READ_OLDVERS
186 // lade alte Version
187 sal_Bool LoadOld( SvStream& rStream, sal_uInt16 aLoadVer[] );
188#endif
189};
190
191class SW_DLLPUBLIC SwTableAutoFmt
192{
193 friend void _FinitCore(); // zum Zerstoeren des dflt. Pointers
194 static SwBoxAutoFmt* pDfltBoxAutoFmt;
195
196 String aName;
197 sal_uInt16 nStrResId;
198
198 // common flags of Calc and Writer
199 // common flags of Calc and Writer
199 sal_Bool bInclFont : 1;
200 sal_Bool bInclJustify : 1;
201 sal_Bool bInclFrame : 1;
202 sal_Bool bInclBackground : 1;
203 sal_Bool bInclValueFormat : 1;
204
200 sal_Bool bInclFont : 1;
201 sal_Bool bInclJustify : 1;
202 sal_Bool bInclFrame : 1;
203 sal_Bool bInclBackground : 1;
204 sal_Bool bInclValueFormat : 1;
205
205 // Calc specific flags
206 // Calc specific flags
206 sal_Bool bInclWidthHeight : 1;
207
208 SwBoxAutoFmt* aBoxAutoFmt[ 16 ];
209
210public:
211 SwTableAutoFmt( const String& rName );
212 SwTableAutoFmt( const SwTableAutoFmt& rNew );
213 ~SwTableAutoFmt();

--- 7 unchanged lines hidden (view full) ---

221 const String& GetName() const { return aName; }
222
223 enum UpdateFlags { UPDATE_CHAR = 1, UPDATE_BOX = 2, UPDATE_ALL = 3 };
224 SwBoxAutoFmt& UpdateFromSet( sal_uInt8 nPos, const SfxItemSet& rSet,
225 UpdateFlags eFlags, SvNumberFormatter* );
226 void UpdateToSet( sal_uInt8 nPos, SfxItemSet& rSet, UpdateFlags eFlags,
227 SvNumberFormatter* ) const ;
228
207 sal_Bool bInclWidthHeight : 1;
208
209 SwBoxAutoFmt* aBoxAutoFmt[ 16 ];
210
211public:
212 SwTableAutoFmt( const String& rName );
213 SwTableAutoFmt( const SwTableAutoFmt& rNew );
214 ~SwTableAutoFmt();

--- 7 unchanged lines hidden (view full) ---

222 const String& GetName() const { return aName; }
223
224 enum UpdateFlags { UPDATE_CHAR = 1, UPDATE_BOX = 2, UPDATE_ALL = 3 };
225 SwBoxAutoFmt& UpdateFromSet( sal_uInt8 nPos, const SfxItemSet& rSet,
226 UpdateFlags eFlags, SvNumberFormatter* );
227 void UpdateToSet( sal_uInt8 nPos, SfxItemSet& rSet, UpdateFlags eFlags,
228 SvNumberFormatter* ) const ;
229
229 sal_Bool IsFont() const { return bInclFont; }
230 sal_Bool IsJustify() const { return bInclJustify; }
231 sal_Bool IsFrame() const { return bInclFrame; }
230 sal_Bool IsFont() const { return bInclFont; }
231 sal_Bool IsJustify() const { return bInclJustify; }
232 sal_Bool IsFrame() const { return bInclFrame; }
232 sal_Bool IsBackground() const { return bInclBackground; }
233 sal_Bool IsValueFormat() const { return bInclValueFormat; }
234
235 void SetFont( const sal_Bool bNew ) { bInclFont = bNew; }
233 sal_Bool IsBackground() const { return bInclBackground; }
234 sal_Bool IsValueFormat() const { return bInclValueFormat; }
235
236 void SetFont( const sal_Bool bNew ) { bInclFont = bNew; }
236 void SetJustify( const sal_Bool bNew ) { bInclJustify = bNew; }
237 void SetJustify( const sal_Bool bNew ) { bInclJustify = bNew; }
237 void SetFrame( const sal_Bool bNew ) { bInclFrame = bNew; }
238 void SetBackground( const sal_Bool bNew ) { bInclBackground = bNew; }
239 void SetValueFormat( const sal_Bool bNew ) { bInclValueFormat = bNew; }
240 void SetWidthHeight( const sal_Bool bNew ) { bInclWidthHeight = bNew; }
241
242 sal_Bool Load( SvStream& rStream, const SwAfVersions& );
243 sal_Bool Save( SvStream& rStream ) const;
244

--- 22 unchanged lines hidden ---
238 void SetFrame( const sal_Bool bNew ) { bInclFrame = bNew; }
239 void SetBackground( const sal_Bool bNew ) { bInclBackground = bNew; }
240 void SetValueFormat( const sal_Bool bNew ) { bInclValueFormat = bNew; }
241 void SetWidthHeight( const sal_Bool bNew ) { bInclWidthHeight = bNew; }
242
243 sal_Bool Load( SvStream& rStream, const SwAfVersions& );
244 sal_Bool Save( SvStream& rStream ) const;
245

--- 22 unchanged lines hidden ---