LibreOffice Module sc (master)  1
xlstyle.hxx
Go to the documentation of this file.
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 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_XLSTYLE_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_XLSTYLE_HXX
22 
23 #include <map>
24 #include <com/sun/star/awt/FontSlant.hpp>
25 #include <tools/color.hxx>
26 #include <tools/fontenum.hxx>
27 #include <editeng/svxenum.hxx>
28 #include <editeng/frmdir.hxx>
29 #include <svl/zforlist.hxx>
30 #include "fapihelper.hxx"
31 
32 class XclRoot;
33 
34 // Constants and Enumerations =================================================
35 
36 // Line styles ----------------------------------------------------------------
37 
38 const sal_uInt8 EXC_LINE_NONE = 0x00;
39 const sal_uInt8 EXC_LINE_THIN = 0x01;
45 const sal_uInt8 EXC_LINE_HAIR = 0x07;
52 
53 // Background patterns --------------------------------------------------------
54 
55 const sal_uInt8 EXC_PATT_NONE = 0x00;
62 
63 // (0x001E, 0x041E) FORMAT ----------------------------------------------------
64 
65 const sal_uInt16 EXC_ID2_FORMAT = 0x001E;
66 const sal_uInt16 EXC_ID4_FORMAT = 0x041E;
67 
68 const sal_uInt16 EXC_FORMAT_OFFSET5 = 164;
69 const sal_uInt16 EXC_FORMAT_OFFSET8 = 164;
70 const sal_uInt16 EXC_FORMAT_NOTFOUND = 0xFFFF;
71 
72 // (0x0031) FONT --------------------------------------------------------------
73 
74 const sal_uInt16 EXC_ID2_FONT = 0x0031;
75 const sal_uInt16 EXC_ID3_FONT = 0x0231;
76 
77 const sal_uInt16 EXC_FONT_APP = 0;
78 const sal_uInt16 EXC_FONT_NOTFOUND = 0xFFFF;
79 
80 const size_t EXC_FONT_MAXCOUNT4 = 0x00FF;
81 const size_t EXC_FONT_MAXCOUNT5 = 0x00FF;
82 const size_t EXC_FONT_MAXCOUNT8 = 0xFFFF;
83 
84 // families
92 
93 // charsets
95 
96 // attributes
97 const sal_uInt16 EXC_FONTATTR_NONE = 0x0000;
98 const sal_uInt16 EXC_FONTATTR_BOLD = 0x0001;
99 const sal_uInt16 EXC_FONTATTR_ITALIC = 0x0002;
100 const sal_uInt16 EXC_FONTATTR_UNDERLINE = 0x0004;
101 const sal_uInt16 EXC_FONTATTR_STRIKEOUT = 0x0008;
102 const sal_uInt16 EXC_FONTATTR_OUTLINE = 0x0010;
103 const sal_uInt16 EXC_FONTATTR_SHADOW = 0x0020;
104 
105 // weight
106 const sal_uInt16 EXC_FONTWGHT_DONTKNOW = 0;
107 const sal_uInt16 EXC_FONTWGHT_THIN = 100;
108 const sal_uInt16 EXC_FONTWGHT_ULTRALIGHT = 200;
109 const sal_uInt16 EXC_FONTWGHT_LIGHT = 300;
110 const sal_uInt16 EXC_FONTWGHT_SEMILIGHT = 350;
111 const sal_uInt16 EXC_FONTWGHT_NORMAL = 400;
112 const sal_uInt16 EXC_FONTWGHT_MEDIUM = 500;
113 const sal_uInt16 EXC_FONTWGHT_SEMIBOLD = 600;
114 const sal_uInt16 EXC_FONTWGHT_BOLD = 700;
115 const sal_uInt16 EXC_FONTWGHT_ULTRABOLD = 800;
116 const sal_uInt16 EXC_FONTWGHT_BLACK = 900;
117 
118 // underline
124 
125 // escapement
126 const sal_uInt16 EXC_FONTESC_NONE = 0x00;
127 const sal_uInt16 EXC_FONTESC_SUPER = 0x01;
128 const sal_uInt16 EXC_FONTESC_SUB = 0x02;
129 
130 // (0x0043, 0x0243, 0x0443, 0x00E0) XF ----------------------------------------
131 
132 const sal_uInt16 EXC_ID2_XF = 0x0043;
133 const sal_uInt16 EXC_ID3_XF = 0x0243;
134 const sal_uInt16 EXC_ID4_XF = 0x0443;
135 const sal_uInt16 EXC_ID5_XF = 0x00E0;
136 
137 const sal_uInt32 EXC_XF_MAXCOUNT = 4050;
138 const sal_uInt32 EXC_XF_MAXSTYLECOUNT = 1536;
139 const sal_uInt16 EXC_XF_DEFAULTSTYLE = 0;
140 const sal_uInt16 EXC_XF_DEFAULTCELL = 15;
141 const sal_uInt16 EXC_XF_NOTFOUND = 0xFFFF;
142 
143 const sal_uInt32 EXC_XFID_NOTFOUND = 0xFFFFFFFF;
144 
145 const sal_uInt16 EXC_XF_LOCKED = 0x0001;
146 const sal_uInt16 EXC_XF_HIDDEN = 0x0002;
147 const sal_uInt16 EXC_XF_STYLE = 0x0004;
148 const sal_uInt16 EXC_XF_STYLEPARENT = 0x0FFF;
149 const sal_uInt16 EXC_XF_LINEBREAK = 0x0008;
150 const sal_uInt16 EXC_XF_SHRINK = 0x0010;
151 
158 
167 
173 
177 
186 
187 const sal_uInt16 EXC_XF8_SHRINK = 0x0010;
188 const sal_uInt16 EXC_XF8_MERGE = 0x0020;
189 
190 const sal_uInt32 EXC_XF_DIAGONAL_TL_TO_BR = 0x40000000;
191 const sal_uInt32 EXC_XF_DIAGONAL_BL_TO_TR = 0x80000000;
192 const sal_uInt32 EXC_XF_DIAGONAL_BOTH = 0xC0000000;
193 
194 // (0x0045) EFONT -------------------------------------------------------------
195 
196 const sal_uInt16 EXC_ID_EFONT = 0x0045;
197 
198 // (0x0092) PALETTE -----------------------------------------------------------
199 
200 const sal_uInt16 EXC_ID_PALETTE = 0x0092;
201 
202 const sal_uInt16 EXC_COLOR_BIFF2_BLACK = 0;
203 const sal_uInt16 EXC_COLOR_BIFF2_WHITE = 1;
204 
205 const sal_uInt16 EXC_COLOR_USEROFFSET = 8;
206 const sal_uInt16 EXC_COLOR_WINDOWTEXT3 = 24;
207 const sal_uInt16 EXC_COLOR_WINDOWBACK3 = 25;
208 const sal_uInt16 EXC_COLOR_WINDOWTEXT = 64;
209 const sal_uInt16 EXC_COLOR_WINDOWBACK = 65;
210 const sal_uInt16 EXC_COLOR_BUTTONBACK = 67;
211 const sal_uInt16 EXC_COLOR_CHWINDOWTEXT = 77;
212 const sal_uInt16 EXC_COLOR_CHWINDOWBACK = 78;
213 const sal_uInt16 EXC_COLOR_CHBORDERAUTO = 79;
214 const sal_uInt16 EXC_COLOR_NOTEBACK = 80;
215 const sal_uInt16 EXC_COLOR_NOTETEXT = 81;
216 const sal_uInt16 EXC_COLOR_FONTAUTO = 0x7FFF;
217 
218 // (0x0293) STYLE -------------------------------------------------------------
219 
220 const sal_uInt16 EXC_ID_STYLE = 0x0293;
221 
222 const sal_uInt16 EXC_STYLE_BUILTIN = 0x8000;
223 const sal_uInt16 EXC_STYLE_XFMASK = 0x0FFF;
224 
236 
239 
240 // (0x0892) STYLEEXT ----------------------------------------------------------
241 
242 const sal_uInt16 EXC_ID_STYLEEXT = 0x0892;
243 
247 
248 // Color data =================================================================
249 
252 {
253 public:
254  explicit XclDefaultPalette( const XclRoot& rRoot );
255 
257  sal_uInt32 GetColorCount() const { return mnTableSize - EXC_COLOR_USEROFFSET; }
258 
260  Color GetDefColor( sal_uInt16 nXclIndex ) const;
261 
263  bool IsSystemColor( sal_uInt16 nXclIndex ) const { return nXclIndex >= mnTableSize; }
264 
265 private:
272  sal_uInt32 mnTableSize;
273 };
274 
275 // Font data ==================================================================
276 
277 namespace vcl { class Font; }
278 class SvxFont;
279 
287 {
288  OUString maName;
289  OUString maStyle;
291  sal_uInt16 mnHeight;
292  sal_uInt16 mnWeight;
293  sal_uInt16 mnEscapem;
297  bool mbItalic;
298  bool mbStrikeout;
299  bool mbOutline;
300  bool mbShadow;
301 
303  explicit XclFontData();
305  explicit XclFontData( const vcl::Font& rFont );
307  explicit XclFontData( const SvxFont& rFont );
308 
310  void Clear();
312  void FillFromVclFont( const vcl::Font& rFont );
314  void FillFromSvxFont( const SvxFont& rFont );
315 
316 // *** conversion of VCL/SVX constants *** ------------------------------------
317 
319  FontFamily GetScFamily( rtl_TextEncoding eDefTextEnc ) const;
321  rtl_TextEncoding GetFontEncoding() const;
323  FontItalic GetScPosture() const;
325  FontWeight GetScWeight() const;
332 
334  void SetScHeight( sal_Int32 nTwips );
336  void SetScFamily( FontFamily eScFamily );
338  void SetFontEncoding( rtl_TextEncoding eFontEnc );
340  void SetScPosture( FontItalic eScPosture );
342  void SetScWeight( FontWeight eScWeight );
344  void SetScUnderline( FontLineStyle eScUnderl );
346  void SetScEscapement( short nScEscapem );
348  void SetScStrikeout( FontStrikeout eScStrikeout );
349 
350 // *** conversion of API constants *** ----------------------------------------
351 
353  float GetApiHeight() const;
355  sal_Int16 GetApiFamily() const;
357  sal_Int16 GetApiFontEncoding() const;
359  css::awt::FontSlant GetApiPosture() const;
361  float GetApiWeight() const;
363  sal_Int16 GetApiUnderline() const;
365  sal_Int16 GetApiEscapement() const;
367  sal_Int16 GetApiStrikeout() const;
368 
370  void SetApiHeight( float fPoint );
372  void SetApiFamily( sal_Int16 nApiFamily );
374  void SetApiPosture( css::awt::FontSlant eApiPosture );
376  void SetApiWeight( float fApiWeight );
378  void SetApiUnderline( sal_Int16 nApiUnderl );
380  void SetApiEscapement( sal_Int16 nApiEscapem );
382  void SetApiStrikeout( sal_Int16 nApiStrikeout );
383 };
384 
385 bool operator==( const XclFontData& rLeft, const XclFontData& rRight );
386 
388 enum class XclFontItemType
389 {
390  Cell,
391  Editeng,
392  HeaderFooter
393 };
394 
397 {
400 };
401 
404 {
405 public:
406  explicit XclFontPropSetHelper();
407 
409  void ReadFontProperties( XclFontData& rFontData,
410  const ScfPropertySet& rPropSet, XclFontPropSetType eType,
411  sal_Int16 nScript = -1 );
412 
414  void WriteFontProperties(
415  ScfPropertySet& rPropSet, XclFontPropSetType eType,
416  const XclFontData& rFontData,
417  bool bHasWstrn, bool bHasAsian, bool bHasCmplx,
418  const Color* pFontColor );
419 
420 private:
422  ScfPropSetHelper& GetChartHelper( sal_Int16 nScript );
423 
424 private:
434 };
435 
436 // Number formats =============================================================
437 
438 struct XclNumFmt
439 {
440  OUString maFormat;
443 };
444 
446 {
447 public:
448  explicit XclNumFmtBuffer( const XclRoot& rRoot );
449 
451  sal_uInt32 GetStdScNumFmt() const { return mnStdScNumFmt; }
452 
453 protected:
454  typedef ::std::map< sal_uInt16, XclNumFmt > XclNumFmtMap;
455 
457  void InitializeImport();
458 
460  const XclNumFmtMap& GetFormatMap() const { return maFmtMap; }
461 
463  void InsertFormat( sal_uInt16 nXclNumFmt, const OUString& rFormat );
464 
465 private:
467  void InsertBuiltinFormats();
468 
469  XclNumFmtMap maFmtMap;
471  const sal_uInt32 mnStdScNumFmt;
472 };
473 
474 // Cell formatting data (XF) ==================================================
475 
478 {
479  bool mbLocked;
480  bool mbHidden;
481 
482  explicit XclCellProt();
483 };
484 
485 bool operator==( const XclCellProt& rLeft, const XclCellProt& rRight );
486 
489 {
496  bool mbLineBreak;
497  bool mbShrink;
498 
499  explicit XclCellAlign();
500 
511 
513  void SetScHorAlign( SvxCellHorJustify eHorJust );
515  void SetScVerAlign( SvxCellVerJustify eVerJust );
517  void SetScFrameDir( SvxFrameDirection eFrameDir );
518 };
519 
520 bool operator==( const XclCellAlign& rLeft, const XclCellAlign& rRight );
521 
524 {
525  sal_uInt16 mnLeftColor;
526  sal_uInt16 mnRightColor;
527  sal_uInt16 mnTopColor;
528  sal_uInt16 mnBottomColor;
529  sal_uInt16 mnDiagColor;
537 
538  explicit XclCellBorder();
539 };
540 
541 bool operator==( const XclCellBorder& rLeft, const XclCellBorder& rRight );
542 
545 {
546  sal_uInt16 mnForeColor;
547  sal_uInt16 mnBackColor;
549 
550  explicit XclCellArea();
551 
553  bool IsTransparent() const;
554 };
555 
556 bool operator==( const XclCellArea& rLeft, const XclCellArea& rRight );
557 
563 {
564 public:
565  explicit XclXFBase( bool bCellXF );
566  virtual ~XclXFBase();
567 
568  XclXFBase(XclXFBase const &) = default;
569  XclXFBase(XclXFBase &&) = default;
570  XclXFBase & operator =(XclXFBase const &) = default;
571  XclXFBase & operator =(XclXFBase &&) = default;
572 
574  void SetAllUsedFlags( bool bUsed );
576  bool HasUsedFlags() const;
577 
579  bool IsCellXF() const { return mbCellXF; }
581  bool IsStyleXF() const { return !IsCellXF(); }
582 
583 protected:
585  bool Equals( const XclXFBase& rCmp ) const;
586 
587 protected:
588  sal_uInt16 mnParent;
589  bool mbCellXF;
590  bool mbProtUsed;
591  bool mbFontUsed;
592  bool mbFmtUsed;
593  bool mbAlignUsed;
595  bool mbAreaUsed;
596 };
597 
598 #endif
599 
600 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
XclFontPropSetType
Enumerates different types for objects with font settings (using different property names)...
Definition: xlstyle.hxx:396
sal_uInt16 mnBottomColor
Palette index for top line.
Definition: xlstyle.hxx:528
void FillFromVclFont(const vcl::Font &rFont)
Fills all members (except color and escapement) from the passed font.
Definition: xlstyle.cxx:202
sal_uInt8 mnTopLine
Style of right line.
Definition: xlstyle.hxx:532
bool mbShrink
true = Multi-line text.
Definition: xlstyle.hxx:497
bool mbAreaUsed
true = border data used.
Definition: xlstyle.hxx:595
SvxCellHorJustify
const sal_uInt8 EXC_XF_VER_CENTER
Definition: xlstyle.hxx:169
const sal_uInt8 EXC_XF_HOR_JUSTIFY
Definition: xlstyle.hxx:164
const sal_uInt8 EXC_XF_HOR_CENTER
Definition: xlstyle.hxx:161
bool mbDiagBLtoTR
true = Top-left to bottom-right on.
Definition: xlstyle.hxx:536
sal_uInt32 GetStdScNumFmt() const
Returns the core index of the current standard number format.
Definition: xlstyle.hxx:451
sal_uInt8 mnCharSet
Windows font family.
Definition: xlstyle.hxx:295
const sal_uInt8 EXC_XF_TEXTDIR_CONTEXT
Definition: xlstyle.hxx:174
const sal_uInt16 EXC_FONTWGHT_THIN
Definition: xlstyle.hxx:107
sal_uInt16 mnDiagColor
Palette index for bottom line.
Definition: xlstyle.hxx:529
sal_uInt8 mnOrient
Vertical alignment.
Definition: xlstyle.hxx:492
bool mbShadow
true = Outlined.
Definition: xlstyle.hxx:300
const sal_uInt16 EXC_XF_LINEBREAK
Styles don't have a parent.
Definition: xlstyle.hxx:149
void SetAllUsedFlags(bool bUsed)
Sets all "attribute used" flags to the passed state.
Definition: xlstyle.cxx:1718
const sal_uInt16 EXC_XF_DEFAULTCELL
Excel index to default style XF.
Definition: xlstyle.hxx:140
const sal_uInt8 EXC_XF_HOR_DISTRIB
Definition: xlstyle.hxx:166
const sal_uInt8 EXC_XF_DIFF_VALFMT
Shrink to fit into cell.
Definition: xlstyle.hxx:152
const sal_uInt8 EXC_PATT_6_25_PERC
Definition: xlstyle.hxx:61
const sal_uInt16 EXC_ID_STYLEEXT
Default value for unused level.
Definition: xlstyle.hxx:242
css::awt::FontSlant GetApiPosture() const
Returns the API font posture.
Definition: xlstyle.cxx:416
sal_Int16 GetApiFontEncoding() const
Returns the API font text encoding.
Definition: xlstyle.cxx:410
const sal_uInt16 EXC_XF_LOCKED
Definition: xlstyle.hxx:145
bool mbDiagTLtoBR
Style of diagonal line(s).
Definition: xlstyle.hxx:535
const sal_uInt32 mnStdScNumFmt
Current system language.
Definition: xlstyle.hxx:471
Color mnNoteBack
Note text color.
Definition: xlstyle.hxx:271
const sal_uInt16 EXC_STYLE_XFMASK
Definition: xlstyle.hxx:223
const sal_uInt16 EXC_COLOR_BUTTONBACK
System window background color (>=BIFF5).
Definition: xlstyle.hxx:210
const sal_uInt8 EXC_LINE_MEDIUM_DASHDOTDOT
Definition: xlstyle.hxx:50
const sal_uInt8 EXC_LINE_DOTTED
Definition: xlstyle.hxx:42
const XclNumFmtMap & GetFormatMap() const
Returns the current number format map.
Definition: xlstyle.hxx:460
ScfPropSetHelper maHlpChCommon
Definition: xlstyle.hxx:425
const sal_uInt8 EXC_XF_HOR_RIGHT
Definition: xlstyle.hxx:162
Color mnNoteText
System button background color.
Definition: xlstyle.hxx:270
bool mbCellXF
Index to parent style XF.
Definition: xlstyle.hxx:589
sal_Int16 GetApiEscapement() const
Returns the API escapement style.
Definition: xlstyle.cxx:439
This struct helps reading and writing Excel fonts.
Definition: xlstyle.hxx:286
const size_t EXC_FONT_MAXCOUNT4
Definition: xlstyle.hxx:80
XclNumFmtMap maFmtMap
Definition: xlstyle.hxx:469
sal_uInt8 mnRightLine
Style of left line.
Definition: xlstyle.hxx:531
SvxEscapement GetScEscapement() const
Returns the Calc escapement style.
Definition: xlstyle.cxx:290
const sal_uInt16 EXC_COLOR_NOTEBACK
Automatic frame border for series (BIFF8 charts).
Definition: xlstyle.hxx:214
ScfPropSetHelper maHlpChCmplx
Chart properties for Asian script.
Definition: xlstyle.hxx:428
const sal_uInt16 EXC_XF8_MERGE
Shrink to fit into cell.
Definition: xlstyle.hxx:188
const sal_uInt8 EXC_LINE_THIN_DASHDOTDOT
Definition: xlstyle.hxx:49
bool mbFmtUsed
true = font index used.
Definition: xlstyle.hxx:592
XclFontData()
true = Shadowed.
Definition: xlstyle.cxx:172
Stores all default colors for a specific BIFF version.
Definition: xlstyle.hxx:251
const Color * mpnColorTable
Definition: xlstyle.hxx:266
sal_uInt16 mnHeight
Font color.
Definition: xlstyle.hxx:291
const sal_uInt16 EXC_XF_NOTFOUND
Excel index to default cell XF.
Definition: xlstyle.hxx:141
const sal_uInt16 EXC_FONTATTR_UNDERLINE
Definition: xlstyle.hxx:100
SvxFrameDirection
rtl_TextEncoding GetFontEncoding() const
Returns the font text encoding.
Definition: xlstyle.cxx:247
const sal_uInt16 EXC_FONTWGHT_DONTKNOW
Definition: xlstyle.hxx:106
ScfPropSetHelper maHlpChEscapement
Chart properties for Complex script, no font name.
Definition: xlstyle.hxx:432
Use Calc Which-IDs (ATTR_*).
const sal_uInt8 EXC_XF_VER_JUSTIFY
Definition: xlstyle.hxx:171
const sal_uInt16 EXC_FONTWGHT_SEMILIGHT
Definition: xlstyle.hxx:110
const sal_uInt8 EXC_FONTFAM_SWISS
Definition: xlstyle.hxx:87
const sal_uInt16 EXC_COLOR_USEROFFSET
Definition: xlstyle.hxx:205
sal_uInt32 GetColorCount() const
Returns the color count in the current palette.
Definition: xlstyle.hxx:257
const sal_uInt16 EXC_FONTATTR_ITALIC
Definition: xlstyle.hxx:99
const sal_uInt8 EXC_STYLE_USERDEF
"Followed_Hyperlink" style.
Definition: xlstyle.hxx:235
void SetScFrameDir(SvxFrameDirection eFrameDir)
Sets the Calc frame direction.
Definition: xlstyle.cxx:1640
const sal_uInt8 EXC_STYLE_COMMA_0
"Percent" style.
Definition: xlstyle.hxx:231
const sal_uInt16 EXC_FONTWGHT_LIGHT
Definition: xlstyle.hxx:109
sal_uInt32 mnTableSize
Note background color.
Definition: xlstyle.hxx:272
SvxCellVerJustify GetScVerAlign() const
Returns the Calc vertical alignment.
Definition: xlstyle.cxx:1579
FontItalic GetScPosture() const
Returns the Calc font posture.
Definition: xlstyle.cxx:253
const sal_uInt8 EXC_XF_HOR_GENERAL
Definition: xlstyle.hxx:159
const sal_uInt8 EXC_PATT_25_PERC
Definition: xlstyle.hxx:59
const sal_uInt16 EXC_FORMAT_NOTFOUND
Definition: xlstyle.hxx:70
const sal_uInt8 EXC_LINE_THIN
Definition: xlstyle.hxx:39
const sal_uInt16 EXC_FONTESC_SUB
Definition: xlstyle.hxx:128
const sal_uInt8 EXC_LINE_HAIR
Definition: xlstyle.hxx:45
const sal_uInt16 EXC_COLOR_BIFF2_BLACK
Definition: xlstyle.hxx:202
const sal_uInt8 EXC_STYLE_CURRENCY
"Comma" style.
Definition: xlstyle.hxx:229
const sal_uInt16 EXC_FONTWGHT_BOLD
Definition: xlstyle.hxx:114
SvxCellJustifyMethod GetScVerJustifyMethod() const
Returns vertical justification method as Calc's attribute.
Definition: xlstyle.cxx:1594
const sal_uInt8 EXC_FONTFAM_ROMAN
Definition: xlstyle.hxx:86
::std::map< sal_uInt16, XclNumFmt > XclNumFmtMap
Definition: xlstyle.hxx:454
const sal_uInt16 EXC_FONT_APP
Definition: xlstyle.hxx:77
void SetApiWeight(float fApiWeight)
Sets the API font weight.
Definition: xlstyle.cxx:483
Helper class for usage of property sets.
Definition: xlstyle.hxx:403
SvxCellVerJustify
const sal_uInt16 EXC_FONT_NOTFOUND
Application font index.
Definition: xlstyle.hxx:78
const sal_uInt16 EXC_COLOR_NOTETEXT
Note background color.
Definition: xlstyle.hxx:215
const sal_uInt8 EXC_PATT_75_PERC
Definition: xlstyle.hxx:58
const sal_uInt16 EXC_FONTWGHT_BLACK
Definition: xlstyle.hxx:116
const sal_uInt8 EXC_LINE_MEDIUM_SLANT_DASHDOT
Definition: xlstyle.hxx:51
ScfPropSetHelper maHlpControl
Chart properties for font escapement.
Definition: xlstyle.hxx:433
bool mbOutline
true = Struck out.
Definition: xlstyle.hxx:299
const size_t EXC_FONT_MAXCOUNT8
Definition: xlstyle.hxx:82
sal_uInt16 mnBackColor
Palette index to foreground color.
Definition: xlstyle.hxx:547
bool IsStyleXF() const
Returns true, if this is a cell style.
Definition: xlstyle.hxx:581
XclCellArea()
Fill pattern.
Definition: xlstyle.cxx:1688
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)
Definition: xlstyle.cxx:517
const sal_uInt16 EXC_FONTESC_NONE
Definition: xlstyle.hxx:126
NfIndexTableOffset
const sal_uInt16 EXC_FONTWGHT_MEDIUM
Definition: xlstyle.hxx:112
const sal_uInt8 EXC_XF_DIFF_ALIGN
Definition: xlstyle.hxx:154
void SetScWeight(FontWeight eScWeight)
Sets the Calc font weight.
Definition: xlstyle.cxx:339
LanguageType meLanguage
SvNumberFormatter format index, if maFormat is empty.
Definition: xlstyle.hxx:442
sal_uInt8 mnDiagLine
Style of bottom line.
Definition: xlstyle.hxx:534
sal_uInt16 mnRightColor
Palette index for left line.
Definition: xlstyle.hxx:526
sal_uInt16 mnForeColor
Definition: xlstyle.hxx:546
void SetApiPosture(css::awt::FontSlant eApiPosture)
Sets the API font posture.
Definition: xlstyle.cxx:474
sal_uInt16 mnTopColor
Palette index for right line.
Definition: xlstyle.hxx:527
bool mbItalic
Underline style.
Definition: xlstyle.hxx:297
bool IsCellXF() const
Returns true, if this is a hard cell format.
Definition: xlstyle.hxx:579
const sal_uInt32 EXC_XF_MAXCOUNT
Definition: xlstyle.hxx:137
const sal_uInt16 EXC_COLOR_WINDOWTEXT3
First user defined color.
Definition: xlstyle.hxx:206
const sal_uInt8 EXC_PATT_12_5_PERC
Definition: xlstyle.hxx:60
void InsertBuiltinFormats()
Inserts built-in number formats for the current system language.
Definition: xlstyle.cxx:1477
const sal_uInt8 EXC_STYLE_ROWLEVEL
"Normal" style.
Definition: xlstyle.hxx:226
const sal_uInt8 EXC_STYLE_HYPERLINK
"Currency [0]" style.
Definition: xlstyle.hxx:233
Color mnWindowBack
System window text color.
Definition: xlstyle.hxx:268
const sal_uInt8 EXC_FONTFAM_SCRIPT
Definition: xlstyle.hxx:90
const sal_uInt8 EXC_STYLEEXT_HIDDEN
Definition: xlstyle.hxx:245
bool mbFontUsed
true = cell protection used.
Definition: xlstyle.hxx:591
const sal_uInt8 EXC_XF2_LEFTLINE
Definition: xlstyle.hxx:181
bool mbAlignUsed
true = number format used.
Definition: xlstyle.hxx:593
sal_uInt8 mnVerAlign
Horizontal alignment.
Definition: xlstyle.hxx:491
const sal_uInt16 EXC_ID_EFONT
Both.
Definition: xlstyle.hxx:196
sal_uInt16 mnLeftColor
Definition: xlstyle.hxx:525
DocumentType eType
const sal_uInt16 EXC_XF_STYLEPARENT
Definition: xlstyle.hxx:148
const sal_uInt8 EXC_LINE_DASHED
Definition: xlstyle.hxx:41
ScfPropSetHelper maHlpChAsian
Chart properties for Western script.
Definition: xlstyle.hxx:427
NfIndexTableOffset meOffset
Format string, may be empty (meOffset used then).
Definition: xlstyle.hxx:441
FontWeight GetScWeight() const
Returns the Calc font weight.
Definition: xlstyle.cxx:258
XclFontItemType
Enumerates different types of Which-IDs for font items.
Definition: xlstyle.hxx:388
XclNumFmtBuffer(const XclRoot &rRoot)
Definition: xlstyle.cxx:1453
const sal_uInt8 EXC_STYLE_PERCENT
"Currency" style.
Definition: xlstyle.hxx:230
sal_uInt16 mnEscapem
Boldness: 400=normal, 700=bold.
Definition: xlstyle.hxx:293
void SetScEscapement(short nScEscapem)
Sets the Calc escapement style.
Definition: xlstyle.cxx:370
bool IsTransparent() const
Returns true, if the area represents transparent state.
Definition: xlstyle.cxx:1695
const sal_uInt8 EXC_XF_HOR_FILL
Definition: xlstyle.hxx:163
const sal_uInt16 EXC_FONTWGHT_ULTRABOLD
Definition: xlstyle.hxx:115
FontStrikeout GetScStrikeout() const
Returns the Calc strike-out style.
Definition: xlstyle.cxx:301
const sal_uInt16 EXC_ID2_FORMAT
Definition: xlstyle.hxx:65
OUString maFormat
Definition: xlstyle.hxx:440
OUString maStyle
Font name.
Definition: xlstyle.hxx:289
void SetScVerAlign(SvxCellVerJustify eVerJust)
Sets the Calc vertical alignment.
Definition: xlstyle.cxx:1627
sal_uInt8 mnUnderline
Windows character set.
Definition: xlstyle.hxx:296
ScfPropSetHelper maHlpChWstrnNoName
Chart properties for Complex script.
Definition: xlstyle.hxx:429
const sal_uInt16 EXC_FONTATTR_BOLD
Definition: xlstyle.hxx:98
const sal_uInt8 EXC_FONTUNDERL_DOUBLE_ACC
Definition: xlstyle.hxx:123
Contains all cell protection attributes.
Definition: xlstyle.hxx:477
Contains all cell alignment attributes.
Definition: xlstyle.hxx:488
const sal_uInt8 EXC_XF_DIFF_PROT
Definition: xlstyle.hxx:157
const sal_uInt16 EXC_COLOR_WINDOWTEXT
System window background color (BIFF3-BIFF4).
Definition: xlstyle.hxx:208
float GetApiWeight() const
Returns the API font weight.
Definition: xlstyle.cxx:421
void SetApiStrikeout(sal_Int16 nApiStrikeout)
Sets the API font strike-out style.
Definition: xlstyle.cxx:510
SvxCellJustifyMethod GetScHorJustifyMethod() const
Returns horizontal justification method as Calc's attribute.
Definition: xlstyle.cxx:1574
const sal_uInt16 EXC_COLOR_CHWINDOWTEXT
System button background color (face color).
Definition: xlstyle.hxx:211
const sal_uInt8 EXC_LINE_MEDIUM_DASHED
Definition: xlstyle.hxx:46
const sal_uInt32 EXC_XF_DIAGONAL_TL_TO_BR
Definition: xlstyle.hxx:190
Color GetDefColor(sal_uInt16 nXclIndex) const
Returns the default color for a (non-zero-based) Excel color or COL_AUTO on error.
Definition: xlstyle.cxx:140
const sal_uInt8 EXC_STYLE_LEVELCOUNT
No built-in style.
Definition: xlstyle.hxx:237
const sal_uInt8 EXC_FONTFAM_DECORATIVE
Definition: xlstyle.hxx:91
const sal_uInt8 EXC_LINE_DOUBLE
Definition: xlstyle.hxx:44
const sal_uInt8 EXC_XF2_VALFMT_MASK
Definition: xlstyle.hxx:178
bool mbLocked
Definition: xlstyle.hxx:479
sal_uInt8 mnHorAlign
Definition: xlstyle.hxx:490
XclCellAlign()
true = Shrink to fit cell size.
Definition: xlstyle.cxx:1544
const sal_uInt8 EXC_XF2_BACKGROUND
Definition: xlstyle.hxx:185
const sal_uInt8 EXC_XF2_TOPLINE
Definition: xlstyle.hxx:183
const sal_uInt8 EXC_STYLEEXT_BUILTIN
Definition: xlstyle.hxx:244
const sal_uInt8 EXC_XF2_HIDDEN
Definition: xlstyle.hxx:180
const sal_uInt32 EXC_XF_DIAGONAL_BOTH
Bottom-left to top-right.
Definition: xlstyle.hxx:192
const sal_uInt8 EXC_XF_DIFF_FONT
Definition: xlstyle.hxx:153
const sal_uInt8 EXC_XF_DIFF_AREA
Definition: xlstyle.hxx:156
void SetApiHeight(float fPoint)
Sets the API font height.
Definition: xlstyle.cxx:455
const sal_uInt16 EXC_STYLE_BUILTIN
Definition: xlstyle.hxx:222
const sal_uInt8 EXC_XF_VER_TOP
Definition: xlstyle.hxx:168
const sal_uInt16 EXC_ID_STYLE
Font auto color (system window text color).
Definition: xlstyle.hxx:220
bool mbLineBreak
Indentation.
Definition: xlstyle.hxx:496
const sal_uInt16 EXC_ID3_XF
Definition: xlstyle.hxx:133
const sal_uInt8 EXC_XF_HOR_CENTER_AS
Definition: xlstyle.hxx:165
const sal_uInt16 EXC_FORMAT_OFFSET8
Definition: xlstyle.hxx:69
const sal_uInt32 EXC_XF_MAXSTYLECOUNT
Maximum number of all XF records.
Definition: xlstyle.hxx:138
const sal_uInt8 EXC_STYLE_NOLEVEL
Number of outline level styles.
Definition: xlstyle.hxx:238
const sal_uInt8 EXC_XF_HOR_LEFT
Definition: xlstyle.hxx:160
bool IsSystemColor(sal_uInt16 nXclIndex) const
Returns true, if the passed Excel color index is a system color.
Definition: xlstyle.hxx:263
sal_uInt8 mnPattern
Palette index to background color.
Definition: xlstyle.hxx:548
const sal_uInt8 EXC_FONTUNDERL_SINGLE
Definition: xlstyle.hxx:120
const size_t EXC_FONT_MAXCOUNT5
Definition: xlstyle.hxx:81
void SetScUnderline(FontLineStyle eScUnderl)
Sets the Calc underline style.
Definition: xlstyle.cxx:358
const sal_uInt16 EXC_FONTWGHT_NORMAL
Definition: xlstyle.hxx:111
ScfPropSetHelper maHlpChAsianNoName
Chart properties for Western script, no font name.
Definition: xlstyle.hxx:430
sal_uInt8 mnLeftLine
Palette index for diagonal line(s).
Definition: xlstyle.hxx:530
void SetScFamily(FontFamily eScFamily)
Sets the Calc font family.
Definition: xlstyle.cxx:311
const sal_uInt16 EXC_ID4_FORMAT
Definition: xlstyle.hxx:66
const sal_uInt8 EXC_XF_DIFF_BORDER
Definition: xlstyle.hxx:155
const sal_uInt8 EXC_STYLE_COLLEVEL
"RowLevel_*" styles.
Definition: xlstyle.hxx:227
const sal_uInt16 EXC_FONTWGHT_ULTRALIGHT
Definition: xlstyle.hxx:108
sal_uInt8 mnTextDir
Text orientation.
Definition: xlstyle.hxx:493
const sal_uInt8 EXC_STYLE_NORMAL
Definition: xlstyle.hxx:225
const sal_uInt32 EXC_XFID_NOTFOUND
Special index for "not found" state.
Definition: xlstyle.hxx:143
void ReadFontProperties(XclFontData &rFontData, const ScfPropertySet &rPropSet, XclFontPropSetType eType, sal_Int16 nScript=-1)
Reads all font properties from the passed property set.
Definition: xlstyle.cxx:623
sal_uInt16 mnParent
Definition: xlstyle.hxx:588
Contains color and line style for each cell border line.
Definition: xlstyle.hxx:523
const sal_uInt16 EXC_ID3_FONT
Definition: xlstyle.hxx:75
void SetApiEscapement(sal_Int16 nApiEscapem)
Sets the API escapement style.
Definition: xlstyle.cxx:500
const sal_uInt16 EXC_FONTESC_SUPER
Definition: xlstyle.hxx:127
const sal_uInt16 EXC_ID4_XF
Definition: xlstyle.hxx:134
const sal_uInt16 EXC_COLOR_FONTAUTO
Note text color.
Definition: xlstyle.hxx:216
FontFamily
const sal_uInt8 EXC_STYLE_CURRENCY_0
"Comma [0]" style.
Definition: xlstyle.hxx:232
const sal_uInt16 EXC_FONTATTR_STRIKEOUT
Definition: xlstyle.hxx:101
XclXFBase(bool bCellXF)
Definition: xlstyle.cxx:1707
A wrapper for a UNO property set.
Definition: fapihelper.hxx:104
const sal_uInt16 EXC_COLOR_CHBORDERAUTO
System window background color (BIFF8 charts).
Definition: xlstyle.hxx:213
FontWeight
const sal_uInt16 EXC_COLOR_WINDOWBACK3
System window text color (BIFF3-BIFF4).
Definition: xlstyle.hxx:207
sal_uInt8 mnBottomLine
Style of top line.
Definition: xlstyle.hxx:533
FontLineStyle GetScUnderline() const
Returns the Calc font underline style.
Definition: xlstyle.cxx:277
const sal_uInt8 EXC_FONTFAM_SYSTEM
Definition: xlstyle.hxx:88
const sal_uInt16 EXC_XF_STYLE
Definition: xlstyle.hxx:147
const sal_uInt8 EXC_FONTCSET_ANSI_LATIN
Definition: xlstyle.hxx:94
void SetScHeight(sal_Int32 nTwips)
Sets the Calc font height (in twips).
Definition: xlstyle.cxx:306
const sal_uInt16 EXC_ID_PALETTE
Definition: xlstyle.hxx:200
float GetApiHeight() const
Returns the API font height.
Definition: xlstyle.cxx:390
const sal_uInt8 EXC_XF_VER_BOTTOM
Definition: xlstyle.hxx:170
const sal_uInt16 EXC_FONTATTR_OUTLINE
Definition: xlstyle.hxx:102
const sal_uInt16 EXC_FONTATTR_SHADOW
Definition: xlstyle.hxx:103
const sal_uInt8 EXC_STYLE_FOLLOWED_HYPERLINK
"Hyperlink" style.
Definition: xlstyle.hxx:234
void SetScPosture(FontItalic eScPosture)
Sets the Calc font posture.
Definition: xlstyle.cxx:334
const sal_uInt8 EXC_PATT_SOLID
Definition: xlstyle.hxx:56
const sal_uInt16 EXC_COLOR_BIFF2_WHITE
Definition: xlstyle.hxx:203
const sal_uInt8 EXC_LINE_MEDIUM_DASHDOT
Definition: xlstyle.hxx:48
void InitializeImport()
Clears all buffered data, used to set up for a new sheet.
Definition: xlstyle.cxx:1463
const sal_uInt8 EXC_LINE_NONE
Definition: xlstyle.hxx:38
SvxFrameDirection GetScFrameDir() const
Returns the Calc frame direction.
Definition: xlstyle.cxx:1599
unsigned char sal_uInt8
const sal_uInt8 EXC_XF2_LOCKED
Definition: xlstyle.hxx:179
sal_uInt8 mnFamily
Escapement type.
Definition: xlstyle.hxx:294
const sal_uInt8 EXC_PATT_50_PERC
Definition: xlstyle.hxx:57
const sal_uInt16 EXC_COLOR_CHWINDOWBACK
System window text color (BIFF8 charts).
Definition: xlstyle.hxx:212
bool HasUsedFlags() const
Returns true, if any "attribute used" flags are ste in this XF.
Definition: xlstyle.cxx:1723
const sal_uInt16 EXC_FONTWGHT_SEMIBOLD
Definition: xlstyle.hxx:113
const sal_uInt16 EXC_FORMAT_OFFSET5
Definition: xlstyle.hxx:68
sal_uInt16 mnWeight
Font height in twips (1/20 of a point).
Definition: xlstyle.hxx:292
const sal_uInt8 EXC_LINE_MEDIUM
Definition: xlstyle.hxx:40
void SetApiUnderline(sal_Int16 nApiUnderl)
Sets the API font underline style.
Definition: xlstyle.cxx:488
void SetApiFamily(sal_Int16 nApiFamily)
Sets the API font family.
Definition: xlstyle.cxx:460
const sal_uInt8 EXC_XF2_BOTTOMLINE
Definition: xlstyle.hxx:184
sal_Int16 GetApiFamily() const
Returns the API font family.
Definition: xlstyle.cxx:395
void SetFontEncoding(rtl_TextEncoding eFontEnc)
Sets the font text encoding.
Definition: xlstyle.cxx:328
const sal_uInt8 EXC_FONTUNDERL_SINGLE_ACC
Definition: xlstyle.hxx:122
Contains background colors and pattern for a cell.
Definition: xlstyle.hxx:544
void SetScStrikeout(FontStrikeout eScStrikeout)
Sets the Calc strike-out style.
Definition: xlstyle.cxx:380
sal_uInt8 mnIndent
Text rotation angle.
Definition: xlstyle.hxx:495
const sal_uInt8 EXC_FONTUNDERL_NONE
Definition: xlstyle.hxx:119
bool mbHidden
true = Locked against editing.
Definition: xlstyle.hxx:480
FontFamily GetScFamily(rtl_TextEncoding eDefTextEnc) const
Returns the Calc font family.
Definition: xlstyle.cxx:227
const sal_uInt32 EXC_XF_DIAGONAL_BL_TO_TR
Top-left to bottom-right.
Definition: xlstyle.hxx:191
const sal_uInt16 EXC_COLOR_WINDOWBACK
System window text color (>=BIFF5).
Definition: xlstyle.hxx:209
XclCellProt()
true = Formula is hidden.
Definition: xlstyle.cxx:1533
void FillFromSvxFont(const SvxFont &rFont)
Fills all members (except color) from the passed SVX font.
Definition: xlstyle.cxx:219
bool Equals(const XclXFBase &rCmp) const
Returns true, if this object is equal to the passed.
Definition: xlstyle.cxx:1728
bool mbProtUsed
true = cell XF, false = style XF.
Definition: xlstyle.hxx:590
const sal_uInt16 EXC_ID2_FONT
Definition: xlstyle.hxx:74
Color mnWindowText
The table with RGB values.
Definition: xlstyle.hxx:267
const sal_uInt16 EXC_ID2_XF
Definition: xlstyle.hxx:132
SvxEscapement
const sal_uInt16 EXC_FONTATTR_NONE
Definition: xlstyle.hxx:97
const sal_uInt8 EXC_PATT_NONE
Definition: xlstyle.hxx:55
const sal_uInt8 EXC_XF_VER_DISTRIB
Definition: xlstyle.hxx:172
void SetScHorAlign(SvxCellHorJustify eHorJust)
Sets the Calc horizontal alignment.
Definition: xlstyle.cxx:1612
const sal_uInt8 EXC_XF_TEXTDIR_LTR
Definition: xlstyle.hxx:175
const sal_uInt16 EXC_XF_SHRINK
Automatic line break.
Definition: xlstyle.hxx:150
ScfPropSetHelper maHlpChCmplxNoName
Chart properties for Asian script, no font name.
Definition: xlstyle.hxx:431
const sal_uInt8 EXC_LINE_THIN_DASHDOT
Definition: xlstyle.hxx:47
sal_Int16 GetApiUnderline() const
Returns the API font underline style.
Definition: xlstyle.cxx:426
void Clear()
Resets all members to default (empty) values.
Definition: xlstyle.cxx:188
const sal_uInt16 EXC_ID5_XF
Definition: xlstyle.hxx:135
Color maColor
String with styles (bold, italic).
Definition: xlstyle.hxx:290
Color mnFaceColor
System window background color.
Definition: xlstyle.hxx:269
sal_uInt8 mnRotation
CTL text direction.
Definition: xlstyle.hxx:494
XclCellBorder()
true = Bottom-left to top-right on.
Definition: xlstyle.cxx:1661
SvxCellJustifyMethod
const sal_uInt16 EXC_XF8_SHRINK
Definition: xlstyle.hxx:187
const LanguageType meSysLang
Map containing all default and user-defined formats.
Definition: xlstyle.hxx:470
const sal_uInt8 EXC_STYLEEXT_CUSTOM
Definition: xlstyle.hxx:246
const sal_uInt16 EXC_XF_HIDDEN
Definition: xlstyle.hxx:146
void WriteFontProperties(ScfPropertySet &rPropSet, XclFontPropSetType eType, const XclFontData &rFontData, bool bHasWstrn, bool bHasAsian, bool bHasCmplx, const Color *pFontColor)
Writes all font properties to the passed property set, uses passed color as font color.
Definition: xlstyle.cxx:691
const sal_uInt8 EXC_LINE_THICK
Definition: xlstyle.hxx:43
ScfPropSetHelper maHlpChWstrn
Chart properties for all scripts.
Definition: xlstyle.hxx:426
bool mbBorderUsed
true = alignment used.
Definition: xlstyle.hxx:594
FontLineStyle
Generic helper class for reading from and writing to property sets.
Definition: fapihelper.hxx:214
void InsertFormat(sal_uInt16 nXclNumFmt, const OUString &rFormat)
Inserts a new number format for the specified Excel format index.
Definition: xlstyle.cxx:1468
const sal_uInt8 EXC_FONTUNDERL_DOUBLE
Definition: xlstyle.hxx:121
bool mbStrikeout
true = Italic.
Definition: xlstyle.hxx:298
Access to global data for a filter object (imported or exported document) from other classes...
Definition: xlroot.hxx:126
XclDefaultPalette(const XclRoot &rRoot)
Definition: xlstyle.cxx:90
virtual ~XclXFBase()
Definition: xlstyle.cxx:1714
const sal_uInt8 EXC_XF_TEXTDIR_RTL
Definition: xlstyle.hxx:176
Contains base members for XF record import/export.
Definition: xlstyle.hxx:562
const sal_uInt16 EXC_XF_DEFAULTSTYLE
Arbitrary maximum number of style XFs.
Definition: xlstyle.hxx:139
const sal_uInt8 EXC_STYLE_COMMA
"ColLevel_*" styles.
Definition: xlstyle.hxx:228
FontStrikeout
SvxCellHorJustify GetScHorAlign() const
Returns the Calc horizontal alignment.
Definition: xlstyle.cxx:1556
All text objects in charts.
Definition: xlstyle.hxx:399
ScfPropSetHelper & GetChartHelper(sal_Int16 nScript)
Returns a chart property set helper according to the passed script type.
Definition: xlstyle.cxx:743
const sal_uInt8 EXC_XF2_RIGHTLINE
Definition: xlstyle.hxx:182
sal_Int16 GetApiStrikeout() const
Returns the API font strike-out style.
Definition: xlstyle.cxx:450
const sal_uInt8 EXC_FONTFAM_DONTKNOW
Definition: xlstyle.hxx:85
FontItalic
OUString maName
Definition: xlstyle.hxx:288
XclXFBase & operator=(XclXFBase const &)=default
const sal_uInt8 EXC_FONTFAM_MODERN
Definition: xlstyle.hxx:89