LibreOffice Module sc (master)  1
xestyle.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_XESTYLE_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_XESTYLE_HXX
22 
23 #include <map>
24 #include <svl/zforlist.hxx>
25 #include <svl/nfkeytab.hxx>
26 #include <editeng/svxfont.hxx>
27 #include "xerecord.hxx"
28 #include "xlstyle.hxx"
29 #include "xeroot.hxx"
30 #include <fonthelper.hxx>
31 #include <memory>
32 #include <vector>
33 
34 /* ============================================================================
35 - Buffers for style records (PALETTE, FONT, FORMAT, XF, STYLE).
36 ============================================================================ */
37 
38 const sal_uInt16 EXC_ID_FONTLIST = 0x8031;
39 const sal_uInt16 EXC_ID_FORMATLIST = 0x801E;
40 const sal_uInt16 EXC_ID_XFLIST = 0x8043;
41 const sal_uInt16 EXC_ID_DXFS = 0x9999;
42 
43 // PALETTE record - color information =========================================
44 
47 {
57 };
58 
59 class XclExpPaletteImpl;
60 
76 {
77 public:
78  explicit XclExpPalette( const XclExpRoot& rRoot );
79  virtual ~XclExpPalette() override;
80 
84  sal_uInt32 InsertColor( const Color& rColor, XclExpColorType eType, sal_uInt16 nAutoDefault = 0 );
86  static sal_uInt32 GetColorIdFromIndex( sal_uInt16 nIndex );
87 
89  void Finalize();
90 
92  sal_uInt16 GetColorIndex( sal_uInt32 nColorId ) const;
93 
98  void GetMixedColors(
99  sal_uInt16& rnXclForeIx, sal_uInt16& rnXclBackIx, sal_uInt8& rnXclPattern,
100  sal_uInt32 nForeColorId, sal_uInt32 nBackColorId ) const;
101 
104  Color GetColor( sal_uInt16 nXclIndex ) const;
105 
107  virtual void Save( XclExpStream& rStrm ) override;
108  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
109 
110 private:
112  virtual void WriteBody( XclExpStream& rStrm ) override;
113 
114 private:
115  typedef std::shared_ptr< XclExpPaletteImpl > XclExpPaletteImplRef;
116  XclExpPaletteImplRef mxImpl;
117 };
118 
119 // FONT record - font information =============================================
120 
121 const size_t EXC_FONTLIST_NOTFOUND = static_cast< size_t >( -1 );
122 
125 {
127  sal_Int16 GetFirstUsedScript(
128  const XclExpRoot& rRoot,
129  const SfxItemSet& rItemSet );
130 
133  const XclExpRoot& rRoot,
134  const SfxItemSet& rItemSet,
135  sal_Int16 nScript );
136 
142  ScDxfFont GetDxfFontFromItemSet(const XclExpRoot& rRoot, const SfxItemSet& rSet);
143 
146  bool CheckItems(
147  const XclExpRoot& rRoot,
148  const SfxItemSet& rItemSet,
149  sal_Int16 nScript,
150  bool bDeep );
151 }
152 
154 class XclExpFont : public XclExpRecord, protected XclExpRoot
155 {
156 public:
157  explicit XclExpFont( const XclExpRoot& rRoot,
158  const XclFontData& rFontData, XclExpColorType eColorType );
159 
161  const XclFontData& GetFontData() const { return maData; }
163  sal_uInt32 GetFontColorId() const { return mnColorId; }
166  virtual bool Equals( const XclFontData& rFontData, sal_uInt32 nHash ) const;
167 
168  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
169 
170 private:
172  virtual void WriteBody( XclExpStream& rStrm ) override;
173 
174 private:
176  sal_uInt32 mnColorId;
177  sal_uInt32 mnHash;
178 };
179 
180 class XclExpDxfFont : public XclExpRecordBase, protected XclExpRoot
181 {
182 public:
183  XclExpDxfFont(const XclExpRoot& rRoot, const SfxItemSet& rItemSet);
184 
185  virtual void SaveXml(XclExpXmlStream& rStrm) override;
186 private:
187 
189 };
190 
193 {
194 public:
195  explicit XclExpBlindFont( const XclExpRoot& rRoot );
196 
198  virtual bool Equals( const XclFontData& rFontData, sal_uInt32 nHash ) const override;
199 
201  virtual void Save( XclExpStream& rStrm ) override;
202 };
203 
204 class ScPatternAttr;
205 
208 {
209 public:
210  explicit XclExpFontBuffer( const XclExpRoot& rRoot );
211 
213  const XclExpFont* GetFont( sal_uInt16 nXclFont ) const;
215  const XclFontData& GetAppFontData() const;
216 
220  sal_uInt16 Insert( const XclFontData& rFontData,
221  XclExpColorType eColorType, bool bAppFont = false );
224  sal_uInt16 Insert( const SvxFont& rFont,
225  XclExpColorType eColorType );
230  sal_uInt16 Insert( const SfxItemSet& rItemSet, sal_Int16 nScript,
231  XclExpColorType eColorType, bool bAppFont );
232 
234  virtual void Save( XclExpStream& rStrm ) override;
235  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
236 
237 private:
239  void InitDefaultFonts();
241  size_t Find( const XclFontData& rFontData );
242 
243 private:
246 
247  XclExpFontList maFontList;
248  size_t mnXclMaxSize;
249 };
250 
251 // FORMAT record - number formats =============================================
252 
255 {
256  sal_uInt32 mnScNumFmt;
257  sal_uInt16 mnXclNumFmt;
258  OUString maNumFmtString;
259 
260  explicit XclExpNumFmt( sal_uInt32 nScNumFmt, sal_uInt16 nXclNumFmt, const OUString& rFrmt ) :
261  mnScNumFmt( nScNumFmt ), mnXclNumFmt( nXclNumFmt ), maNumFmtString( rFrmt ) {}
262 
263  void SaveXml( XclExpXmlStream& rStrm );
264 };
265 
266 typedef ::std::unique_ptr< SvNumberFormatter > SvNumberFormatterPtr;
267 
270 {
271 public:
272  explicit XclExpNumFmtBuffer( const XclExpRoot& rRoot );
273  virtual ~XclExpNumFmtBuffer() override;
274 
276  sal_uInt32 GetStandardFormat() const { return mnStdFmt; }
277 
281  sal_uInt16 Insert( sal_uInt32 nScNumFmt );
282 
284  virtual void Save( XclExpStream& rStrm ) override;
285  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
286 
287  OUString GetFormatCode ( sal_uInt32 nScNumFmt );
288 
289 private:
291  void WriteFormatRecord( XclExpStream& rStrm, sal_uInt16 nXclNumFmt, const OUString& rFormatStr );
293  void WriteFormatRecord( XclExpStream& rStrm, const XclExpNumFmt& rFormat );
294 
295 private:
296  typedef ::std::vector< XclExpNumFmt > XclExpNumFmtVec;
297 
299  XclExpNumFmtVec maFormatMap;
300  std::unique_ptr<NfKeywordTable> mpKeywordTable;
301  sal_uInt32 mnStdFmt;
302  sal_uInt16 mnXclOffset;
303 };
304 
305 // XF, STYLE record - Cell formatting =========================================
306 
310 {
313  bool FillFromItemSet( const SfxItemSet& rItemSet, bool bStyle = false );
314 
316  void FillToXF3( sal_uInt16& rnProt ) const;
317 
318  void SaveXml( XclExpXmlStream& rStrm ) const;
319 };
320 
324 {
329  bool FillFromItemSet( const SfxItemSet& rItemSet,
330  bool bForceLineBreak, XclBiff eBiff, bool bStyle = false );
331 
333  void FillToXF5( sal_uInt16& rnAlign ) const;
335  void FillToXF8( sal_uInt16& rnAlign, sal_uInt16& rnMiscAttrib ) const;
336 
337  void SaveXml( XclExpXmlStream& rStrm ) const;
338 };
339 
343 {
344  sal_uInt32 mnLeftColorId;
345  sal_uInt32 mnRightColorId;
346  sal_uInt32 mnTopColorId;
347  sal_uInt32 mnBottomColorId;
348  sal_uInt32 mnDiagColorId;
349 
350  explicit XclExpCellBorder();
351 
355  bool FillFromItemSet( const SfxItemSet& rItemSet,
356  XclExpPalette& rPalette, XclBiff eBiff, bool bStyle = false );
358  void SetFinalColors( const XclExpPalette& rPalette );
359 
361  void FillToXF5( sal_uInt32& rnBorder, sal_uInt32& rnArea ) const;
363  void FillToXF8( sal_uInt32& rnBorder1, sal_uInt32& rnBorder2 ) const;
364 
366  void FillToCF8( sal_uInt16& rnLine, sal_uInt32& rnColor ) const;
367 
368  void SaveXml( XclExpXmlStream& rStrm ) const;
369 };
370 
374 {
375  sal_uInt32 mnForeColorId;
376  sal_uInt32 mnBackColorId;
377 
378  explicit XclExpCellArea();
379 
382  bool FillFromItemSet(
383  const SfxItemSet& rItemSet, XclExpPalette& rPalette,
384  bool bStyle );
386  void SetFinalColors( const XclExpPalette& rPalette );
387 
389  void FillToXF5( sal_uInt32& rnArea ) const;
391  void FillToXF8( sal_uInt32& rnBorder2, sal_uInt16& rnArea ) const;
392 
394  void FillToCF8( sal_uInt16& rnPattern, sal_uInt16& rnColor ) const;
395 
396  void SaveXml( XclExpXmlStream& rStrm ) const;
397 };
398 
400 {
402 
403  bool FillFromItemSet( const SfxItemSet& rItemSet );
404 
405  void SaveXml( XclExpXmlStream& rStrm ) const;
406 };
407 
410 {
411  sal_uInt32 mnXFId;
412  sal_uInt16 mnXFIndex;
413 
414  explicit XclExpXFId();
415  explicit XclExpXFId( sal_uInt32 nXFId );
416 
418  void ConvertXFIndex( const XclExpRoot& rRoot );
419 };
420 
421 class SfxStyleSheetBase;
422 
424 class XclExpXF : public XclXFBase, public XclExpRecord, protected XclExpRoot
425 {
426 public:
428  explicit XclExpXF(
429  const XclExpRoot& rRoot,
430  const ScPatternAttr& rPattern,
431  sal_Int16 nScript,
432  sal_uInt32 nScForceNumFmt = NUMBERFORMAT_ENTRY_NOT_FOUND,
433  sal_uInt16 nForceXclFont = EXC_FONT_NOTFOUND,
434  bool bForceLineBreak = false );
436  explicit XclExpXF(
437  const XclExpRoot& rRoot,
438  const SfxStyleSheetBase& rStyleSheet );
439 
441  const XclExpCellProt& GetProtectionData() const { return maProtection; }
443  const XclExpCellAlign& GetAlignmentData() const { return maAlignment; }
445  const XclExpCellBorder& GetBorderData() const { return maBorder; }
447  const XclExpCellArea& GetAreaData() const { return maArea; }
448 
451  bool Equals(
452  const ScPatternAttr& rPattern,
453  sal_uInt32 nScForceNumFmt,
454  sal_uInt16 nForceXclFont,
455  bool bForceLineBreak ) const;
456 
459  bool Equals( const SfxStyleSheetBase& rStyleSheet ) const;
460 
462  void SetFinalColors();
463 
465  bool Equals( const XclExpXF& rCmpXF ) const;
466 
467  void SetXmlIds( sal_uInt32 nBorderId, sal_uInt32 nFillId );
468 
469  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
470 
471  const SfxItemSet* GetItemSet() const { return mpItemSet; }
472 
473  sal_uInt32 GetScNumFmt() const { return mnScNumFmt; }
474  sal_uInt16 GetXclFont() const { return mnXclFont; }
475 
476 protected:
477  explicit XclExpXF( const XclExpRoot& rRoot, bool bCellXF );
478 
479 protected: // access for XclExpDefaultXF
481 
486  sal_uInt32 mnParentXFId;
487  sal_uInt32 mnScNumFmt;
488  sal_uInt16 mnXclFont;
489  sal_uInt16 mnXclNumFmt;
490  sal_Int32 mnBorderId;
491  sal_Int32 mnFillId;
492 
493 private:
494  using XclXFBase::Equals;
495 
497  void InitDefault();
500  void Init(
501  const SfxItemSet& rItemSet,
502  sal_Int16 nScript,
503  sal_uInt32 nForceScNumFmt,
504  sal_uInt16 nForceXclFont,
505  bool bForceLineBreak,
506  bool bDefStyle );
507 
512  sal_uInt8 GetUsedFlags() const;
513 
514  void WriteBody5( XclExpStream& rStrm );
515  void WriteBody8( XclExpStream& rStrm );
516 
518  virtual void WriteBody( XclExpStream& rStrm ) override;
519 };
520 
522 class XclExpDefaultXF : public XclExpXF
523 {
524 public:
525  explicit XclExpDefaultXF( const XclExpRoot& rRoot, bool bCellXF );
526 
528  void SetFont( sal_uInt16 nXclFont );
530  void SetNumFmt( sal_uInt16 nXclNumFmt );
531 };
532 
535 class XclExpStyle : public XclExpRecord
536 {
537 public:
538  explicit XclExpStyle( sal_uInt32 nXFId, const OUString& rStyleName );
539  explicit XclExpStyle( sal_uInt32 nXFId, sal_uInt8 nStyleId, sal_uInt8 nLevel );
540 
542  bool IsBuiltIn() const { return mnStyleId != EXC_STYLE_USERDEF; }
543 
544  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
545 
546 private:
548  virtual void WriteBody( XclExpStream& rStrm ) override;
549 
550 private:
551  OUString maName;
555 };
556 
572 class XclExpXFBuffer : public XclExpRecordBase, protected XclExpRoot
573 {
574 public:
575  explicit XclExpXFBuffer( const XclExpRoot& rRoot );
576 
578  void Initialize();
579 
582  sal_uInt32 Insert( const ScPatternAttr* pPattern, sal_Int16 nScript );
589  sal_uInt32 InsertWithFont(
590  const ScPatternAttr* pPattern, sal_Int16 nScript,
591  sal_uInt16 nForceXclFont,
592  bool bForceLineBreak );
600  sal_uInt32 InsertWithNumFmt(
601  const ScPatternAttr* pPattern, sal_Int16 nScript,
602  sal_uInt32 nForceScNumFmt,
603  bool bForceLineBreak );
606  sal_uInt32 InsertStyle( const SfxStyleSheetBase* pStyleSheet );
608  static sal_uInt32 GetXFIdFromIndex( sal_uInt16 nXFIndex );
610  static sal_uInt32 GetDefCellXFId();
611 
613  const XclExpXF* GetXFById( sal_uInt32 nXFId ) const;
614 
616  void Finalize();
617 
619  sal_uInt16 GetXFIndex( sal_uInt32 nXFId ) const;
620 
621  sal_Int32 GetXmlStyleIndex( sal_uInt32 nXFId ) const;
622  sal_Int32 GetXmlCellIndex( sal_uInt32 nXFId ) const;
623 
625  virtual void Save( XclExpStream& rStrm ) override;
626  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
627 
628 private:
631 
632 private:
634  sal_uInt32 FindXF( const ScPatternAttr& rPattern, sal_uInt32 nForceScNumFmt,
635  sal_uInt16 nForceXclFont, bool bForceLineBreak ) const;
637  sal_uInt32 FindXF( const SfxStyleSheetBase& rStyleSheet ) const;
638 
640  sal_uInt32 FindBuiltInXF( sal_uInt8 nStyleId, sal_uInt8 nLevel ) const;
641 
644  sal_uInt32 InsertCellXF( const ScPatternAttr* pPattern, sal_Int16 nScript,
645  sal_uInt32 nForceScNumFmt,
646  sal_uInt16 nForceXclFont, bool bForceLineBreak );
649  sal_uInt32 InsertStyleXF( const SfxStyleSheetBase& rStyleSheet );
650 
652  void InsertUserStyles();
653 
656  sal_uInt32 AppendBuiltInXF( XclExpXFRef const & xXF,
657  sal_uInt8 nStyleId, sal_uInt8 nLevel = EXC_STYLE_NOLEVEL );
660  sal_uInt32 AppendBuiltInXFWithStyle( XclExpXFRef const & xXF,
661  sal_uInt8 nStyleId, sal_uInt8 nLevel = EXC_STYLE_NOLEVEL );
662 
664  void InsertDefaultRecords();
665 
667  void AppendXFIndex( sal_uInt32 nXFId );
668 
669  void AddBorderAndFill( const XclExpXF& rXF );
670  void SaveXFXml( XclExpXmlStream& rStrm, XclExpXF& rXF );
671 
672 private:
675  {
680  explicit XclExpBuiltInInfo();
681  };
682  typedef ::std::map< sal_uInt32, XclExpBuiltInInfo > XclExpBuiltInMap;
683  typedef ::std::vector< XclExpCellBorder > XclExpBorderList;
684  typedef ::std::vector< XclExpCellArea > XclExpFillList;
685 
687  struct FindKey
688  {
689  bool mbCellXF; // is this a hard cell format, or a cell style
691  sal_uInt32 mnScNumFmt;
692  sal_uInt16 mnXclFont;
693 
694  bool operator<(const FindKey& other) const
695  {
696  if (mbCellXF != other.mbCellXF)
697  return mbCellXF < other.mbCellXF;
698  if (mpItemSet != other.mpItemSet)
699  return mpItemSet < other.mpItemSet;
700  if (mnScNumFmt != other.mnScNumFmt)
701  return mnScNumFmt < other.mnScNumFmt;
702  return mnXclFont < other.mnXclFont;
703  }
704  };
705  static FindKey ToFindKey(XclExpXF const &);
706 
707  XclExpXFList maXFList;
708  std::map<FindKey, std::vector<sal_uInt32>>
712  XclExpBuiltInMap maBuiltInMap;
716  XclExpXFList maSortedXFList;
717  XclExpBorderList maBorders;
718  XclExpFillList maFills;
719 
720 };
721 
722 class XclExpDxf : public XclExpRecordBase, protected XclExpRoot
723 {
724 public:
725  XclExpDxf( const XclExpRoot& rRoot, std::unique_ptr<XclExpCellAlign> pAlign, std::unique_ptr<XclExpCellBorder> pBorder,
726  std::unique_ptr<XclExpDxfFont> pFont, std::unique_ptr<XclExpNumFmt> pNumberFmt,
727  std::unique_ptr<XclExpCellProt> pProt, std::unique_ptr<XclExpColor> pColor);
728  virtual ~XclExpDxf() override;
729 
730  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
731  void SaveXmlExt( XclExpXmlStream& rStrm);
732 
733 private:
734  std::unique_ptr<XclExpCellAlign> mpAlign;
735  std::unique_ptr<XclExpCellBorder> mpBorder;
736  std::unique_ptr<XclExpDxfFont> mpFont;
737  std::unique_ptr<XclExpNumFmt> mpNumberFmt;
738  std::unique_ptr<XclExpCellProt> mpProt;
739  std::unique_ptr<XclExpColor> mpColor;
740 };
741 
742 class XclExpDxfs : public XclExpRecordBase, protected XclExpRoot
743 {
744 public:
745  XclExpDxfs( const XclExpRoot& rRoot );
746 
747  sal_Int32 GetDxfId(const OUString& rName);
748 
749  virtual void SaveXml( XclExpXmlStream& rStrm) override;
750 private:
751  typedef std::vector< std::unique_ptr<XclExpDxf> > DxfContainer;
752  std::map<OUString, sal_Int32> maStyleNameToDxfId;
753  DxfContainer maDxf;
754  std::unique_ptr<NfKeywordTable> mpKeywordTable;
755 };
756 
758 {
759 public:
760  explicit XclExpXmlStyleSheet( const XclExpRoot& rRoot );
761 
762  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
763 };
764 
765 #endif
766 
767 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt16 GetXclFont() const
Definition: xestyle.hxx:474
std::unique_ptr< XclExpNumFmt > mpNumberFmt
Definition: xestyle.hxx:737
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:1241
void FillToXF8(sal_uInt16 &rnAlign, sal_uInt16 &rnMiscAttrib) const
Fills the data to the passed fields of a BIFF8 XF record.
Definition: xestyle.cxx:1552
void SaveXml(XclExpXmlStream &rStrm) const
Definition: xestyle.cxx:1937
XclExpBuiltInMap maBuiltInMap
List of all STYLE records.
Definition: xestyle.hxx:712
Stores all XF records (cell formats and cell styles) in the document.
Definition: xestyle.hxx:572
virtual void Save(XclExpStream &rStrm) override
Writes all FORMAT records contained in this buffer.
Definition: xestyle.cxx:1372
vcl::Font GetFontFromItemSet(const XclExpRoot &rRoot, const SfxItemSet &rItemSet, sal_Int16 nScript)
Returns a VCL font object filled from the passed item set.
Definition: xestyle.cxx:880
XclExpColorType
For internal use only. TODO:moggi: find a better/correct value.
Definition: xestyle.hxx:46
sal_Int32 nIndex
XclBiff
An enumeration for all Excel file format types (BIFF types).
Definition: xlconst.hxx:30
XclExpDxf(const XclExpRoot &rRoot, std::unique_ptr< XclExpCellAlign > pAlign, std::unique_ptr< XclExpCellBorder > pBorder, std::unique_ptr< XclExpDxfFont > pFont, std::unique_ptr< XclExpNumFmt > pNumberFmt, std::unique_ptr< XclExpCellProt > pProt, std::unique_ptr< XclExpColor > pColor)
Definition: xestyle.cxx:3123
sal_uInt32 mnStdFmt
Replacement table.
Definition: xestyle.hxx:301
sal_uInt32 mnScNumFmt
Definition: xestyle.hxx:256
sal_uInt16 mnXclFont
Calc number format index.
Definition: xestyle.hxx:488
XclExpXFList::RecordRefType XclExpXFRef
Definition: xestyle.hxx:630
static FindKey ToFindKey(XclExpXF const &)
Definition: xestyle.cxx:2748
sal_uInt32 GetStandardFormat() const
Returns the core index of the current standard number format.
Definition: xestyle.hxx:276
virtual ~XclExpNumFmtBuffer() override
Definition: xestyle.cxx:1350
This class is used to export Excel record streams.
Definition: xestream.hxx:73
XclExpXFId maXFId
Name of the cell style.
Definition: xestyle.hxx:552
Background area of a cell.
Definition: xestyle.hxx:51
XclExpRecordList< XclExpXF > XclExpXFList
Definition: xestyle.hxx:629
const size_t EXC_FONTLIST_NOTFOUND
Definition: xestyle.hxx:121
XclExpNumFmtVec maFormatMap
Special number formatter for conversion.
Definition: xestyle.hxx:299
std::map< OUString, sal_Int32 > maStyleNameToDxfId
Definition: xestyle.hxx:752
void SaveXml(XclExpXmlStream &rStrm) const
Definition: xestyle.cxx:1847
virtual void Save(XclExpStream &rStrm) override
Writes all FONT records contained in this buffer.
Definition: xestyle.cxx:1236
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:1065
XclExpPaletteImplRef mxImpl
Definition: xestyle.hxx:116
Border of a cell.
Definition: xestyle.hxx:50
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:3186
sal_uInt32 FindXF(const ScPatternAttr &rPattern, sal_uInt32 nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak) const
Returns the XF ID of the cell XF containing the passed format.
Definition: xestyle.cxx:2679
void SaveXml(XclExpXmlStream &rStrm) const
Definition: xestyle.cxx:1592
const XclExpCellBorder & GetBorderData() const
Returns the cell border settings of this XF.
Definition: xestyle.hxx:445
OUString maNumFmtString
Resulting Excel format index.
Definition: xestyle.hxx:258
const XclExpCellArea & GetAreaData() const
Returns the cell fill settings of this XF.
Definition: xestyle.hxx:447
XclExpPalette(const XclExpRoot &rRoot)
Definition: xestyle.cxx:751
sal_uInt16 Insert(const XclFontData &rFontData, XclExpColorType eColorType, bool bAppFont=false)
Inserts a new font with the passed font data into the buffer if not present.
Definition: xestyle.cxx:1190
const SfxItemSet * GetItemSet() const
Definition: xestyle.hxx:471
void FillToXF3(sal_uInt16 &rnProt) const
Fills the data to the passed fields of a BIFF3-BIFF8 XF record.
Definition: xestyle.cxx:1434
This struct helps reading and writing Excel fonts.
Definition: xlstyle.hxx:286
bool FillFromItemSet(const SfxItemSet &rItemSet, XclExpPalette &rPalette, bool bStyle)
Fills the area attributes from the passed item set.
Definition: xestyle.cxx:1873
void GetMixedColors(sal_uInt16 &rnXclForeIx, sal_uInt16 &rnXclBackIx, sal_uInt8 &rnXclPattern, sal_uInt32 nForeColorId, sal_uInt32 nBackColorId) const
Returns a foreground and background color for the two passed color IDs.
Definition: xestyle.cxx:783
::std::vector< XclExpNumFmt > XclExpNumFmtVec
Definition: xestyle.hxx:296
Spreadsheet grid color.
Definition: xestyle.hxx:56
sal_uInt32 mnForeColorId
Definition: xestyle.hxx:375
XclExpCellAlign maAlignment
Cell protection flags.
Definition: xestyle.hxx:483
void SetXmlIds(sal_uInt32 nBorderId, sal_uInt32 nFillId)
Definition: xestyle.cxx:2179
OUString GetFormatCode(sal_uInt32 nScNumFmt)
Definition: xestyle.cxx:1419
sal_uInt32 GetFontColorId() const
Returns the font color identifier.
Definition: xestyle.hxx:163
void InsertUserStyles()
Inserts an XF and a STYLE record for all user defined style sheets.
Definition: xestyle.cxx:2876
Stores all default colors for a specific BIFF version.
Definition: xlstyle.hxx:251
void SaveXml(XclExpXmlStream &rStrm) const
Definition: xestyle.cxx:1440
XclExpXFBuffer(const XclExpRoot &rRoot)
Definition: xestyle.cxx:2411
const sal_uInt16 EXC_ID_DXFS
For internal use only.
Definition: xestyle.hxx:41
sal_uInt32 mnTopColorId
Color ID for right line.
Definition: xestyle.hxx:346
sal_uInt32 mnBottomColorId
Color ID for top line.
Definition: xestyle.hxx:347
ScfUInt16Vec maXFIndexVec
Contained elements describe built-in XFs.
Definition: xestyle.hxx:713
std::unique_ptr< NfKeywordTable > mpKeywordTable
Definition: xestyle.hxx:754
XclExpFontBuffer(const XclExpRoot &rRoot)
Definition: xestyle.cxx:1166
XclExpXFId()
Real Excel XF index.
Definition: xestyle.cxx:1983
void FillToXF5(sal_uInt16 &rnAlign) const
Fills the data to the passed fields of a BIFF5/BIFF7 XF record.
Definition: xestyle.cxx:1544
sal_uInt32 mnParentXFId
Background area style.
Definition: xestyle.hxx:486
XclExpCellArea maArea
Border line style.
Definition: xestyle.hxx:485
std::shared_ptr< XclExpPaletteImpl > XclExpPaletteImplRef
Definition: xestyle.hxx:115
virtual void WriteBody(XclExpStream &rStrm) override
Writes the contents of the STYLE record.
Definition: xestyle.cxx:2265
const XclExpXF * GetXFById(sal_uInt32 nXFId) const
Returns an XF record by its unique identifier.
Definition: xestyle.cxx:2453
const sal_uInt8 EXC_STYLE_USERDEF
"Followed_Hyperlink" style.
Definition: xlstyle.hxx:235
::std::vector< XclExpCellBorder > XclExpBorderList
Definition: xestyle.hxx:683
static sal_uInt32 GetXFIdFromIndex(sal_uInt16 nXFIndex)
Returns the XF identifier representing a fixed Excel XF index (e.g.
Definition: xestyle.cxx:2443
XclExpNumFmt(sal_uInt32 nScNumFmt, sal_uInt16 nXclNumFmt, const OUString &rFrmt)
format string
Definition: xestyle.hxx:260
virtual void Save(XclExpStream &rStrm) override
Saves the PALETTE record, if it differs from the default palette.
Definition: xestyle.cxx:795
XclExpFontList maFontList
Definition: xestyle.hxx:247
void SetFinalColors()
Sets the resulting Excel palette index from all used color IDs (border and area). ...
Definition: xestyle.cxx:2043
const XclExpCellProt & GetProtectionData() const
Returns the cell protection settings of this XF.
Definition: xestyle.hxx:441
Extends the XclCellArea struct for export.
Definition: xestyle.hxx:373
const XclExpFont * GetFont(sal_uInt16 nXclFont) const
Returns the specified font from font list.
Definition: xestyle.cxx:1180
ScfUInt16Vec maStyleIndexes
Maps XF IDs to XF indexes.
Definition: xestyle.hxx:714
Text in a cell.
Definition: xestyle.hxx:49
sal_uInt32 InsertCellXF(const ScPatternAttr *pPattern, sal_Int16 nScript, sal_uInt32 nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak)
Tries to find the XF record containing the passed format or inserts a new record. ...
Definition: xestyle.cxx:2753
sal_uInt16 mnXclNumFmt
Excel font index.
Definition: xestyle.hxx:489
sal_uInt32 AppendBuiltInXF(XclExpXFRef const &xXF, sal_uInt8 nStyleId, sal_uInt8 nLevel=EXC_STYLE_NOLEVEL)
Inserts a built-in XF record without a STYLE record and returns the XF ID.
Definition: xestyle.cxx:2884
void FillToXF5(sal_uInt32 &rnArea) const
Fills the data to the passed fields of a BIFF5/BIFF7 XF record.
Definition: xestyle.cxx:1896
Access to global data from other classes.
Definition: xeroot.hxx:113
sal_uInt32 InsertStyle(const SfxStyleSheetBase *pStyleSheet)
Inserts the passed cell style.
Definition: xestyle.cxx:2438
::std::vector< XclExpCellArea > XclExpFillList
Definition: xestyle.hxx:684
bool Equals(const ScPatternAttr &rPattern, sal_uInt32 nScForceNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak) const
Returns true, if this XF record represents the passed cell formatting.
Definition: xestyle.cxx:2029
const sal_uInt16 EXC_FONT_NOTFOUND
Application font index.
Definition: xlstyle.hxx:78
virtual bool Equals(const XclFontData &rFontData, sal_uInt32 nHash) const
Compares this font with the passed font data.
Definition: xestyle.cxx:971
sal_Int32 GetXmlCellIndex(sal_uInt32 nXFId) const
Definition: xestyle.cxx:2573
size_t mnXclMaxSize
List of all FONT records.
Definition: xestyle.hxx:248
constexpr sal_uInt32 NUMBERFORMAT_ENTRY_NOT_FOUND
void Init(const SfxItemSet &rItemSet, sal_Int16 nScript, sal_uInt32 nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak, bool bDefStyle)
Fills all members from the passed item set.
Definition: xestyle.cxx:2067
void FillToXF5(sal_uInt32 &rnBorder, sal_uInt32 &rnArea) const
Fills the data to the passed fields of a BIFF5/BIFF7 XF record.
Definition: xestyle.cxx:1770
sal_uInt32 mnScNumFmt
XF ID of parent XF record.
Definition: xestyle.hxx:487
bool operator<(const FindKey &other) const
Definition: xestyle.hxx:694
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:2604
XclExpXFList maXFList
Definition: xestyle.hxx:707
sal_uInt32 mnLeftColorId
Definition: xestyle.hxx:344
Base class for all Excel records.
Definition: xerecord.hxx:38
void ConvertXFIndex(const XclExpRoot &rRoot)
Converts the XF identifier in mnXFId to an Excel XF index and stores it in mnXFIndex.
Definition: xestyle.cxx:1995
virtual void WriteBody(XclExpStream &rStrm) override
Writes the contents of the FONT record.
Definition: xestyle.cxx:987
Stores all number formats used in the document.
Definition: xestyle.hxx:269
Extends the XclCellAlign struct for export.
Definition: xestyle.hxx:323
sal_uInt32 InsertColor(const Color &rColor, XclExpColorType eType, sal_uInt16 nAutoDefault=0)
Inserts the color into the list and updates weighting.
Definition: xestyle.cxx:763
Helper functions for font export.
Definition: xestyle.hxx:124
XclExpFont(const XclExpRoot &rRoot, const XclFontData &rFontData, XclExpColorType eColorType)
Definition: xestyle.cxx:956
bool FillFromItemSet(const SfxItemSet &rItemSet, bool bStyle=false)
Fills the protection attributes from the passed item set.
Definition: xestyle.cxx:1426
void InitDefaultFonts()
Initializes the default fonts for the current BIFF version.
Definition: xestyle.cxx:1256
std::vector< std::unique_ptr< XclExpDxf > > DxfContainer
Definition: xestyle.hxx:751
XclExpCellBorder()
Color ID for diagonal line(s).
Definition: xestyle.cxx:1694
sal_uInt32 AppendBuiltInXFWithStyle(XclExpXFRef const &xXF, sal_uInt8 nStyleId, sal_uInt8 nLevel=EXC_STYLE_NOLEVEL)
Inserts a built-in XF and STYLE record and returns the XF ID.
Definition: xestyle.cxx:2896
sal_uInt32 mnColorId
All font attributes.
Definition: xestyle.hxx:176
void SetFinalColors(const XclExpPalette &rPalette)
Fills the mn***Color base members from the mn***ColorId members.
Definition: xestyle.cxx:1891
virtual void Save(XclExpStream &rStrm) override
Writes all XF records contained in this buffer.
Definition: xestyle.cxx:2581
DocumentType eType
const XclFontData & GetFontData() const
Returns read-only access to font data.
Definition: xestyle.hxx:161
::std::unique_ptr< SvNumberFormatter > SvNumberFormatterPtr
Definition: xestyle.hxx:266
XclExpXmlStyleSheet(const XclExpRoot &rRoot)
Definition: xestyle.cxx:3181
composite key for the find-map, so we can do partial key searching
Definition: xestyle.hxx:687
XclFontData maData
Definition: xestyle.hxx:175
Stores all data of an Excel font and provides export of FONT records.
Definition: xestyle.hxx:154
Represents a default XF record.
Definition: xestyle.hxx:522
sal_uInt32 GetScNumFmt() const
Definition: xestyle.hxx:473
Extends the XclCellBorder struct for export.
Definition: xestyle.hxx:342
Contains all cell protection attributes.
Definition: xlstyle.hxx:477
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:1378
sal_uInt16 GetColorIndex(sal_uInt32 nColorId) const
Returns the Excel palette index of the color with passed color ID.
Definition: xestyle.cxx:778
std::unique_ptr< XclExpCellProt > mpProt
Definition: xestyle.hxx:738
sal_uInt32 mnDiagColorId
Color ID for bottom line.
Definition: xestyle.hxx:348
Contains all cell alignment attributes.
Definition: xlstyle.hxx:488
XclExpNumFmtBuffer(const XclExpRoot &rRoot)
Definition: xestyle.cxx:1334
std::unique_ptr< XclExpDxfFont > mpFont
Definition: xestyle.hxx:736
const sal_uInt16 EXC_ID_FONTLIST
Definition: xestyle.hxx:38
sal_uInt32 InsertStyleXF(const SfxStyleSheetBase &rStyleSheet)
Inserts the passed cell style.
Definition: xestyle.cxx:2805
sal_uInt16 Insert(sal_uInt32 nScNumFmt)
Inserts a number format into the format buffer.
Definition: xestyle.cxx:1354
ScDxfFont maDxfData
Definition: xestyle.hxx:188
bool mbPredefined
Level for RowLevel/ColLevel styles.
Definition: xestyle.hxx:678
XclExpFillList maFills
List of borders used by XF records.
Definition: xestyle.hxx:718
void Finalize()
Reduces the XF record list to the maximum allowed number of records.
Definition: xestyle.cxx:2458
void SetNumFmt(sal_uInt16 nXclNumFmt)
Sets the Excel number format index.
Definition: xestyle.cxx:2236
const XclFontData & GetAppFontData() const
Returns the application font data of this file, needed e.g.
Definition: xestyle.cxx:1185
Represents an XF record which contains all formatting data of a cell or cell style.
Definition: xestyle.hxx:424
sal_uInt32 mnHash
Unique color ID for text color.
Definition: xestyle.hxx:177
Stores all used colors in the document.
Definition: xestyle.hxx:75
void WriteFormatRecord(XclExpStream &rStrm, sal_uInt16 nXclNumFmt, const OUString &rFormatStr)
Writes the FORMAT record with index nXclIx and format string rFormatStr.
Definition: xestyle.cxx:1392
std::unique_ptr< NfKeywordTable > mpKeywordTable
Maps core formats to Excel indexes.
Definition: xestyle.hxx:300
void SaveXFXml(XclExpXmlStream &rStrm, XclExpXF &rXF)
Definition: xestyle.cxx:2660
sal_uInt32 FindBuiltInXF(sal_uInt8 nStyleId, sal_uInt8 nLevel) const
Returns the XF ID of a built-in style XF, searches by style identifier.
Definition: xestyle.cxx:2737
sal_uInt8 mnLevel
Built-in style identifier.
Definition: xestyle.hxx:677
std::unique_ptr< XclExpCellAlign > mpAlign
Definition: xestyle.hxx:734
const sal_uInt8 EXC_STYLE_NOLEVEL
Number of outline level styles.
Definition: xlstyle.hxx:238
virtual ~XclExpDxf() override
Definition: xestyle.cxx:3136
void InsertDefaultRecords()
Inserts all default XF and STYLE records.
Definition: xestyle.cxx:2920
Line in a chart.
Definition: xestyle.hxx:53
void FillToCF8(sal_uInt16 &rnPattern, sal_uInt16 &rnColor) const
Fills the data to the passed fields of a BIFF8 CF (conditional format) record.
Definition: xestyle.cxx:1910
const SfxItemSet * mpItemSet
Definition: xestyle.hxx:480
XclExpBorderList maBorders
List of XF records in XF index order.
Definition: xestyle.hxx:717
virtual bool Equals(const XclFontData &rFontData, sal_uInt32 nHash) const override
Returns always false to never find this font while searching the font list.
Definition: xestyle.cxx:1156
virtual ~XclExpPalette() override
Definition: xestyle.cxx:759
virtual void Save(XclExpStream &rStrm) override
Skips writing this record.
Definition: xestyle.cxx:1161
ScfUInt16Vec maCellIndexes
Maps XF IDs to OOXML Style indexes.
Definition: xestyle.hxx:715
sal_uInt8 GetUsedFlags() const
Returns the bits specifying the used attributes.
Definition: xestyle.cxx:2118
void Finalize()
Reduces the color list to the maximum count of the current BIFF version.
Definition: xestyle.cxx:773
XclExpCellArea()
Background color ID.
Definition: xestyle.cxx:1867
void FillToCF8(sal_uInt16 &rnLine, sal_uInt32 &rnColor) const
Fills the data to the passed fields of a BIFF8 CF (conditional format) record.
Definition: xestyle.cxx:1798
sal_uInt8 mnLevel
Built-in style identifier.
Definition: xestyle.hxx:554
void SaveXml(XclExpXmlStream &rStrm)
Definition: xestyle.cxx:1326
const sal_uInt16 EXC_ID_XFLIST
For internal use only.
Definition: xestyle.hxx:40
bool FillFromItemSet(const SfxItemSet &rItemSet, XclExpPalette &rPalette, XclBiff eBiff, bool bStyle=false)
Fills the border attributes from the passed item set.
Definition: xestyle.cxx:1703
Stores a core number format index with corresponding Excel format index.
Definition: xestyle.hxx:254
void WriteBody8(XclExpStream &rStrm)
Definition: xestyle.cxx:2149
bool IsBuiltIn() const
Returns true, if this record represents an Excel built-in style.
Definition: xestyle.hxx:542
sal_uInt32 InsertWithNumFmt(const ScPatternAttr *pPattern, sal_Int16 nScript, sal_uInt32 nForceScNumFmt, bool bForceLineBreak)
Finds or creates a cell XF record for the passed item set, with custom number format.
Definition: xestyle.cxx:2433
sal_uInt16 mnXclNumFmt
Core index of the number format.
Definition: xestyle.hxx:257
virtual void WriteBody(XclExpStream &rStrm) override
Writes the contents of the XF record.
Definition: xestyle.cxx:2166
Extends the XclCellProt struct for export.
Definition: xestyle.hxx:309
bool FillFromItemSet(const SfxItemSet &rItemSet)
Definition: xestyle.cxx:1961
Contains color and line style for each cell border line.
Definition: xlstyle.hxx:523
bool CheckItems(const XclExpRoot &rRoot, const SfxItemSet &rItemSet, sal_Int16 nScript, bool bDeep)
Returns true, if at least one font related item is set in the passed item set.
Definition: xestyle.cxx:904
XclExpXFList maSortedXFList
Maps XF IDs to OOXML Cell indexes.
Definition: xestyle.hxx:716
sal_uInt32 mnRightColorId
Color ID for left line.
Definition: xestyle.hxx:345
static sal_uInt32 GetDefCellXFId()
Returns the XF identifier representing the default cell XF.
Definition: xestyle.cxx:2448
void Initialize()
Inserts predefined built-in styles and user-defined styles.
Definition: xestyle.cxx:2416
sal_Int32 mnFillId
OOXML Border Index.
Definition: xestyle.hxx:491
std::unique_ptr< XclExpColor > mpColor
Definition: xestyle.hxx:739
XclExpBuiltInInfo()
true = STYLE record created.
Definition: xestyle.cxx:2346
const XclExpCellAlign & GetAlignmentData() const
Returns the alignment settings of this XF.
Definition: xestyle.hxx:443
std::map< FindKey, std::vector< sal_uInt32 > > maXFFindMap
List of all XF records.
Definition: xestyle.hxx:709
bool FillFromItemSet(const SfxItemSet &rItemSet, bool bForceLineBreak, XclBiff eBiff, bool bStyle=false)
Fills the alignment attributes from the passed item set.
Definition: xestyle.cxx:1447
Represents a STYLE record containing the data of a cell style.
Definition: xestyle.hxx:535
::std::vector< sal_uInt16 > ScfUInt16Vec
Definition: ftools.hxx:256
void SetFinalColors(const XclExpPalette &rPalette)
Fills the mn***Color base members from the mn***ColorId members.
Definition: xestyle.cxx:1761
Color maColor
Definition: xestyle.hxx:401
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:3107
size_t Find(const XclFontData &rFontData)
Tries to find the passed font and returns the current list index.
Definition: xestyle.cxx:1302
unsigned char sal_uInt8
void FillToXF8(sal_uInt32 &rnBorder2, sal_uInt16 &rnArea) const
Fills the data to the passed fields of a BIFF8 XF record.
Definition: xestyle.cxx:1903
void FillToXF8(sal_uInt32 &rnBorder1, sal_uInt32 &rnBorder2) const
Fills the data to the passed fields of a BIFF8 XF record.
Definition: xestyle.cxx:1782
sal_uInt32 mnXFId
Definition: xestyle.hxx:411
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:801
XclExpStyle(sal_uInt32 nXFId, const OUString &rStyleName)
Definition: xestyle.cxx:2242
sal_uInt16 mnXclOffset
Key for standard number format.
Definition: xestyle.hxx:302
XclExpDefaultXF(const XclExpRoot &rRoot, bool bCellXF)
Definition: xestyle.cxx:2225
::std::map< sal_uInt32, XclExpBuiltInInfo > XclExpBuiltInMap
Definition: xestyle.hxx:682
DxfContainer maDxf
Definition: xestyle.hxx:753
Stores the data of all fonts used in the document.
Definition: xestyle.hxx:207
void SaveXml(XclExpXmlStream &rStrm) const
Definition: xestyle.cxx:1972
A combination of unique XF identifier with real Excel XF index.
Definition: xestyle.hxx:409
XclExpCellProt maProtection
Pointer to the item set (we do not own it).
Definition: xestyle.hxx:482
sal_Int32 mnBorderId
Excel number format index.
Definition: xestyle.hxx:490
sal_uInt32 mnBackColorId
Foreground color ID.
Definition: xestyle.hxx:376
sal_uInt32 Insert(const ScPatternAttr *pPattern, sal_Int16 nScript)
Finds or creates a cell XF record for the passed item set.
Definition: xestyle.cxx:2422
Used as placeholder for font index 4, which is not used in Excel.
Definition: xestyle.hxx:192
Contains background colors and pattern for a cell.
Definition: xlstyle.hxx:544
Extended info about a built-in XF.
Definition: xestyle.hxx:674
SvNumberFormatterPtr mxFormatter
Definition: xestyle.hxx:298
sal_uInt16 mnXFIndex
Temporary XF identifier.
Definition: xestyle.hxx:412
virtual void WriteBody(XclExpStream &rStrm) override
Writes the contents of the PALETTE record.
Definition: xestyle.cxx:807
XclExpRecordList< XclExpStyle > maStyleList
map of itemset to vector of positions, to speed up find
Definition: xestyle.hxx:711
bool Equals(const XclXFBase &rCmp) const
Returns true, if this object is equal to the passed.
Definition: xlstyle.cxx:1728
void WriteBody5(XclExpStream &rStrm)
Definition: xestyle.cxx:2132
XclExpRecordList< XclExpFont > XclExpFontList
Definition: xestyle.hxx:244
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:2185
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:976
sal_Int32 GetXmlStyleIndex(sal_uInt32 nXFId) const
Definition: xestyle.cxx:2565
Text color in a chart.
Definition: xestyle.hxx:52
const sal_uInt16 EXC_ID_FORMATLIST
For internal use only.
Definition: xestyle.hxx:39
bool mbHasStyleRec
true = XF still predefined.
Definition: xestyle.hxx:679
void SaveXmlExt(XclExpXmlStream &rStrm)
Definition: xestyle.cxx:3160
sal_uInt8 mnStyleId
XF identifier for style formatting.
Definition: xestyle.hxx:553
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:3140
XclExpBlindFont(const XclExpRoot &rRoot)
Definition: xestyle.cxx:1151
Area in a chart.
Definition: xestyle.hxx:54
OUString maName
Definition: xestyle.hxx:551
const SfxItemSet * mpItemSet
Definition: xestyle.hxx:690
static sal_uInt32 GetColorIdFromIndex(sal_uInt16 nIndex)
Returns the color ID representing a fixed Excel palette index (i.e.
Definition: xestyle.cxx:768
void SvStream & rStrm
sal_Int32 GetDxfId(const OUString &rName)
Definition: xestyle.cxx:3099
ScDxfFont GetDxfFontFromItemSet(const XclExpRoot &rRoot, const SfxItemSet &rSet)
Get a dxf related font object from the item set.
Definition: xestyle.cxx:895
void InitDefault()
Initializes with default values.
Definition: xestyle.cxx:2058
Color GetColor(sal_uInt16 nXclIndex) const
Returns the color for a (non-zero-based) Excel palette entry.
Definition: xestyle.cxx:790
Contains base members for XF record import/export.
Definition: xlstyle.hxx:562
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:2300
void SetFont(sal_uInt16 nXclFont)
Sets the Excel font index.
Definition: xestyle.cxx:2230
void AddBorderAndFill(const XclExpXF &rXF)
Definition: xestyle.cxx:2995
XclExpFontList::RecordRefType XclExpFontRef
Definition: xestyle.hxx:245
sal_uInt32 InsertWithFont(const ScPatternAttr *pPattern, sal_Int16 nScript, sal_uInt16 nForceXclFont, bool bForceLineBreak)
Finds or creates a cell XF record for the passed item set.
Definition: xestyle.cxx:2427
XclExpDxfs(const XclExpRoot &rRoot)
Definition: xestyle.cxx:3008
Base class for single records with any content.
Definition: xerecord.hxx:142
Text color in a form control.
Definition: xestyle.hxx:55
XclExpCellBorder maBorder
All alignment attributes.
Definition: xestyle.hxx:484
void AppendXFIndex(sal_uInt32 nXFId)
Appends a XF index to the internal ID<->index maps.
Definition: xestyle.cxx:2985
sal_Int16 GetFirstUsedScript(const XclExpRoot &rRoot, const SfxItemSet &rItemSet)
Returns the script type of the first font item found in the item set and its parents.
Definition: xestyle.cxx:829
sal_uInt16 GetXFIndex(sal_uInt32 nXFId) const
Returns the Excel XF index of the XF record with passed XF ID.
Definition: xestyle.cxx:2555
XclExpDxfFont(const XclExpRoot &rRoot, const SfxItemSet &rItemSet)
Definition: xestyle.cxx:1016
XclExpXF(const XclExpRoot &rRoot, const ScPatternAttr &rPattern, sal_Int16 nScript, sal_uInt32 nScForceNumFmt=NUMBERFORMAT_ENTRY_NOT_FOUND, sal_uInt16 nForceXclFont=EXC_FONT_NOTFOUND, bool bForceLineBreak=false)
Constructs a cell XF record from the passed Calc cell formatting.
Definition: xestyle.cxx:2000
std::unique_ptr< XclExpCellBorder > mpBorder
Definition: xestyle.hxx:735