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