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