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 #pragma once
21 
22 #include <map>
23 #include <svl/zforlist.hxx>
24 #include <svl/nfkeytab.hxx>
25 #include <editeng/svxfont.hxx>
26 #include "xerecord.hxx"
27 #include "xlstyle.hxx"
28 #include "xeroot.hxx"
29 #include <fonthelper.hxx>
30 #include <memory>
31 #include <vector>
32 
33 /* ============================================================================
34 - Buffers for style records (PALETTE, FONT, FORMAT, XF, STYLE).
35 ============================================================================ */
36 
37 const sal_uInt16 EXC_ID_FONTLIST = 0x8031;
38 const sal_uInt16 EXC_ID_FORMATLIST = 0x801E;
39 const sal_uInt16 EXC_ID_XFLIST = 0x8043;
40 const sal_uInt16 EXC_ID_DXFS = 0x9999;
41 
42 // PALETTE record - color information =========================================
43 
46 {
56 };
57 
58 class XclExpPaletteImpl;
59 
75 {
76 public:
77  explicit XclExpPalette( const XclExpRoot& rRoot );
78  virtual ~XclExpPalette() override;
79 
83  sal_uInt32 InsertColor( const Color& rColor, XclExpColorType eType, sal_uInt16 nAutoDefault = 0 );
85  static sal_uInt32 GetColorIdFromIndex( sal_uInt16 nIndex );
86 
88  void Finalize();
89 
91  sal_uInt16 GetColorIndex( sal_uInt32 nColorId ) const;
92 
97  void GetMixedColors(
98  sal_uInt16& rnXclForeIx, sal_uInt16& rnXclBackIx, sal_uInt8& rnXclPattern,
99  sal_uInt32 nForeColorId, sal_uInt32 nBackColorId ) const;
100 
103  Color GetColor( sal_uInt16 nXclIndex ) const;
104 
106  virtual void Save( XclExpStream& rStrm ) override;
107  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
108 
109 private:
111  virtual void WriteBody( XclExpStream& rStrm ) override;
112 
113 private:
114  typedef std::shared_ptr< XclExpPaletteImpl > XclExpPaletteImplRef;
115  XclExpPaletteImplRef mxImpl;
116 };
117 
118 // FONT record - font information =============================================
119 
120 const size_t EXC_FONTLIST_NOTFOUND = static_cast< size_t >( -1 );
121 
124 {
126  sal_Int16 GetFirstUsedScript(
127  const XclExpRoot& rRoot,
128  const SfxItemSet& rItemSet );
129 
132  const XclExpRoot& rRoot,
133  const SfxItemSet& rItemSet,
134  sal_Int16 nScript );
135 
141  ScDxfFont GetDxfFontFromItemSet(const XclExpRoot& rRoot, const SfxItemSet& rSet);
142 
145  bool CheckItems(
146  const XclExpRoot& rRoot,
147  const SfxItemSet& rItemSet,
148  sal_Int16 nScript,
149  bool bDeep );
150 }
151 
153 class XclExpFont : public XclExpRecord, protected XclExpRoot
154 {
155 public:
156  explicit XclExpFont( const XclExpRoot& rRoot,
157  const XclFontData& rFontData, XclExpColorType eColorType );
158 
160  const XclFontData& GetFontData() const { return maData; }
162  sal_uInt32 GetFontColorId() const { return mnColorId; }
165  virtual bool Equals( const XclFontData& rFontData, sal_uInt32 nHash ) const;
166 
167  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
168 
169 private:
171  virtual void WriteBody( XclExpStream& rStrm ) override;
172 
173 private:
175  sal_uInt32 mnColorId;
176  sal_uInt32 mnHash;
177 };
178 
179 class XclExpDxfFont : public XclExpRecordBase, protected XclExpRoot
180 {
181 public:
182  XclExpDxfFont(const XclExpRoot& rRoot, const SfxItemSet& rItemSet);
183 
184  virtual void SaveXml(XclExpXmlStream& rStrm) override;
185 private:
186 
188 };
189 
192 {
193 public:
194  explicit XclExpBlindFont( const XclExpRoot& rRoot );
195 
197  virtual bool Equals( const XclFontData& rFontData, sal_uInt32 nHash ) const override;
198 
200  virtual void Save( XclExpStream& rStrm ) override;
201 };
202 
203 class ScPatternAttr;
204 
207 {
208 public:
209  explicit XclExpFontBuffer( const XclExpRoot& rRoot );
210 
212  const XclExpFont* GetFont( sal_uInt16 nXclFont ) const;
214  const XclFontData& GetAppFontData() const;
215 
219  sal_uInt16 Insert( const XclFontData& rFontData,
220  XclExpColorType eColorType, bool bAppFont = false );
223  sal_uInt16 Insert( const SvxFont& rFont,
224  XclExpColorType eColorType );
229  sal_uInt16 Insert( const SfxItemSet& rItemSet, sal_Int16 nScript,
230  XclExpColorType eColorType, bool bAppFont );
231 
233  virtual void Save( XclExpStream& rStrm ) override;
234  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
235 
236 private:
238  void InitDefaultFonts();
240  size_t Find( const XclFontData& rFontData );
241 
242 private:
245 
246  XclExpFontList maFontList;
247  size_t mnXclMaxSize;
248 };
249 
250 // FORMAT record - number formats =============================================
251 
254 {
255  sal_uInt32 mnScNumFmt;
256  sal_uInt16 mnXclNumFmt;
257  OUString maNumFmtString;
258 
259  explicit XclExpNumFmt( sal_uInt32 nScNumFmt, sal_uInt16 nXclNumFmt, const OUString& rFrmt ) :
260  mnScNumFmt( nScNumFmt ), mnXclNumFmt( nXclNumFmt ), maNumFmtString( rFrmt ) {}
261 
262  void SaveXml( XclExpXmlStream& rStrm );
263 };
264 
265 typedef ::std::unique_ptr< SvNumberFormatter > SvNumberFormatterPtr;
266 
269 {
270 public:
271  explicit XclExpNumFmtBuffer( const XclExpRoot& rRoot );
272  virtual ~XclExpNumFmtBuffer() override;
273 
275  sal_uInt32 GetStandardFormat() const { return mnStdFmt; }
276 
280  sal_uInt16 Insert( sal_uInt32 nScNumFmt );
281 
283  virtual void Save( XclExpStream& rStrm ) override;
284  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
285 
286  OUString GetFormatCode ( sal_uInt32 nScNumFmt );
287 
288 private:
290  void WriteFormatRecord( XclExpStream& rStrm, sal_uInt16 nXclNumFmt, const OUString& rFormatStr );
292  void WriteFormatRecord( XclExpStream& rStrm, const XclExpNumFmt& rFormat );
293 
294 private:
295  typedef ::std::vector< XclExpNumFmt > XclExpNumFmtVec;
296 
298  XclExpNumFmtVec maFormatMap;
299  std::unique_ptr<NfKeywordTable> mpKeywordTable;
300  sal_uInt32 mnStdFmt;
301  sal_uInt16 mnXclOffset;
302 };
303 
304 // XF, STYLE record - Cell formatting =========================================
305 
309 {
312  bool FillFromItemSet( const SfxItemSet& rItemSet, bool bStyle = false );
313 
315  void FillToXF3( sal_uInt16& rnProt ) const;
316 
317  void SaveXml( XclExpXmlStream& rStrm ) const;
318 };
319 
323 {
328  bool FillFromItemSet( const SfxItemSet& rItemSet,
329  bool bForceLineBreak, XclBiff eBiff, bool bStyle = false );
330 
332  void FillToXF5( sal_uInt16& rnAlign ) const;
334  void FillToXF8( sal_uInt16& rnAlign, sal_uInt16& rnMiscAttrib ) const;
335 
336  void SaveXml( XclExpXmlStream& rStrm ) const;
337 };
338 
342 {
343  sal_uInt32 mnLeftColorId;
344  sal_uInt32 mnRightColorId;
345  sal_uInt32 mnTopColorId;
346  sal_uInt32 mnBottomColorId;
347  sal_uInt32 mnDiagColorId;
348 
349  explicit XclExpCellBorder();
350 
354  bool FillFromItemSet( const SfxItemSet& rItemSet,
355  XclExpPalette& rPalette, XclBiff eBiff, bool bStyle = false );
357  void SetFinalColors( const XclExpPalette& rPalette );
358 
360  void FillToXF5( sal_uInt32& rnBorder, sal_uInt32& rnArea ) const;
362  void FillToXF8( sal_uInt32& rnBorder1, sal_uInt32& rnBorder2 ) const;
363 
365  void FillToCF8( sal_uInt16& rnLine, sal_uInt32& rnColor ) const;
366 
367  void SaveXml( XclExpXmlStream& rStrm ) const;
368 };
369 
373 {
374  sal_uInt32 mnForeColorId;
375  sal_uInt32 mnBackColorId;
376 
377  explicit XclExpCellArea();
378 
381  bool FillFromItemSet(
382  const SfxItemSet& rItemSet, XclExpPalette& rPalette,
383  bool bStyle );
385  void SetFinalColors( const XclExpPalette& rPalette );
386 
388  void FillToXF5( sal_uInt32& rnArea ) const;
390  void FillToXF8( sal_uInt32& rnBorder2, sal_uInt16& rnArea ) const;
391 
393  void FillToCF8( sal_uInt16& rnPattern, sal_uInt16& rnColor ) const;
394 
395  void SaveXml( XclExpXmlStream& rStrm ) const;
396 };
397 
399 {
401 
402  bool FillFromItemSet( const SfxItemSet& rItemSet );
403 
404  void SaveXml( XclExpXmlStream& rStrm ) const;
405 };
406 
409 {
410  sal_uInt32 mnXFId;
411  sal_uInt16 mnXFIndex;
412 
413  explicit XclExpXFId();
414  explicit XclExpXFId( sal_uInt32 nXFId );
415 
417  void ConvertXFIndex( const XclExpRoot& rRoot );
418 };
419 
420 class SfxStyleSheetBase;
421 
423 class XclExpXF : public XclXFBase, public XclExpRecord, protected XclExpRoot
424 {
425 public:
427  explicit XclExpXF(
428  const XclExpRoot& rRoot,
429  const ScPatternAttr& rPattern,
430  sal_Int16 nScript,
431  sal_uInt32 nScForceNumFmt = NUMBERFORMAT_ENTRY_NOT_FOUND,
432  sal_uInt16 nForceXclFont = EXC_FONT_NOTFOUND,
433  bool bForceLineBreak = false );
435  explicit XclExpXF(
436  const XclExpRoot& rRoot,
437  const SfxStyleSheetBase& rStyleSheet );
438 
440  const XclExpCellProt& GetProtectionData() const { return maProtection; }
442  const XclExpCellAlign& GetAlignmentData() const { return maAlignment; }
444  const XclExpCellBorder& GetBorderData() const { return maBorder; }
446  const XclExpCellArea& GetAreaData() const { return maArea; }
447 
450  bool Equals(
451  const ScPatternAttr& rPattern,
452  sal_uInt32 nScForceNumFmt,
453  sal_uInt16 nForceXclFont,
454  bool bForceLineBreak ) const;
455 
458  bool Equals( const SfxStyleSheetBase& rStyleSheet ) const;
459 
461  void SetFinalColors();
462 
464  bool Equals( const XclExpXF& rCmpXF ) const;
465 
466  void SetXmlIds( sal_uInt32 nBorderId, sal_uInt32 nFillId );
467 
468  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
469 
470  const SfxItemSet* GetItemSet() const { return mpItemSet; }
471 
472  sal_uInt32 GetScNumFmt() const { return mnScNumFmt; }
473  sal_uInt16 GetXclFont() const { return mnXclFont; }
474 
475 protected:
476  explicit XclExpXF( const XclExpRoot& rRoot, bool bCellXF );
477 
478 protected: // access for XclExpDefaultXF
480 
485  sal_uInt32 mnParentXFId;
486  sal_uInt32 mnScNumFmt;
487  sal_uInt16 mnXclFont;
488  sal_uInt16 mnXclNumFmt;
489  sal_Int32 mnBorderId;
490  sal_Int32 mnFillId;
491 
492 private:
493  using XclXFBase::Equals;
494 
496  void InitDefault();
499  void Init(
500  const SfxItemSet& rItemSet,
501  sal_Int16 nScript,
502  sal_uInt32 nForceScNumFmt,
503  sal_uInt16 nForceXclFont,
504  bool bForceLineBreak,
505  bool bDefStyle );
506 
511  sal_uInt8 GetUsedFlags() const;
512 
513  void WriteBody5( XclExpStream& rStrm );
514  void WriteBody8( XclExpStream& rStrm );
515 
517  virtual void WriteBody( XclExpStream& rStrm ) override;
518 };
519 
521 class XclExpDefaultXF : public XclExpXF
522 {
523 public:
524  explicit XclExpDefaultXF( const XclExpRoot& rRoot, bool bCellXF );
525 
527  void SetFont( sal_uInt16 nXclFont );
529  void SetNumFmt( sal_uInt16 nXclNumFmt );
530 };
531 
534 class XclExpStyle : public XclExpRecord
535 {
536 public:
537  explicit XclExpStyle( sal_uInt32 nXFId, const OUString& rStyleName );
538  explicit XclExpStyle( sal_uInt32 nXFId, sal_uInt8 nStyleId, sal_uInt8 nLevel );
539 
541  bool IsBuiltIn() const { return mnStyleId != EXC_STYLE_USERDEF; }
542 
543  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
544 
545 private:
547  virtual void WriteBody( XclExpStream& rStrm ) override;
548 
549 private:
550  OUString maName;
554 };
555 
571 class XclExpXFBuffer : public XclExpRecordBase, protected XclExpRoot
572 {
573 public:
574  explicit XclExpXFBuffer( const XclExpRoot& rRoot );
575 
577  void Initialize();
578 
581  sal_uInt32 Insert( const ScPatternAttr* pPattern, sal_Int16 nScript );
588  sal_uInt32 InsertWithFont(
589  const ScPatternAttr* pPattern, sal_Int16 nScript,
590  sal_uInt16 nForceXclFont,
591  bool bForceLineBreak );
599  sal_uInt32 InsertWithNumFmt(
600  const ScPatternAttr* pPattern, sal_Int16 nScript,
601  sal_uInt32 nForceScNumFmt,
602  bool bForceLineBreak );
605  sal_uInt32 InsertStyle( const SfxStyleSheetBase* pStyleSheet );
607  static sal_uInt32 GetXFIdFromIndex( sal_uInt16 nXFIndex );
609  static sal_uInt32 GetDefCellXFId();
610 
612  const XclExpXF* GetXFById( sal_uInt32 nXFId ) const;
613 
615  void Finalize();
616 
618  sal_uInt16 GetXFIndex( sal_uInt32 nXFId ) const;
619 
620  sal_Int32 GetXmlStyleIndex( sal_uInt32 nXFId ) const;
621  sal_Int32 GetXmlCellIndex( sal_uInt32 nXFId ) const;
622 
624  virtual void Save( XclExpStream& rStrm ) override;
625  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
626 
627 private:
630 
631 private:
633  sal_uInt32 FindXF( const ScPatternAttr& rPattern, sal_uInt32 nForceScNumFmt,
634  sal_uInt16 nForceXclFont, bool bForceLineBreak ) const;
636  sal_uInt32 FindXF( const SfxStyleSheetBase& rStyleSheet ) const;
637 
639  sal_uInt32 FindBuiltInXF( sal_uInt8 nStyleId, sal_uInt8 nLevel ) const;
640 
643  sal_uInt32 InsertCellXF( const ScPatternAttr* pPattern, sal_Int16 nScript,
644  sal_uInt32 nForceScNumFmt,
645  sal_uInt16 nForceXclFont, bool bForceLineBreak );
648  sal_uInt32 InsertStyleXF( const SfxStyleSheetBase& rStyleSheet );
649 
651  void InsertUserStyles();
652 
655  sal_uInt32 AppendBuiltInXF( XclExpXFRef const & xXF,
656  sal_uInt8 nStyleId, sal_uInt8 nLevel = EXC_STYLE_NOLEVEL );
659  sal_uInt32 AppendBuiltInXFWithStyle( XclExpXFRef const & xXF,
660  sal_uInt8 nStyleId, sal_uInt8 nLevel = EXC_STYLE_NOLEVEL );
661 
663  void InsertDefaultRecords();
664 
666  void AppendXFIndex( sal_uInt32 nXFId );
667 
668  void AddBorderAndFill( const XclExpXF& rXF );
669  void SaveXFXml( XclExpXmlStream& rStrm, XclExpXF& rXF );
670 
671 private:
674  {
679  explicit XclExpBuiltInInfo();
680  };
681  typedef ::std::map< sal_uInt32, XclExpBuiltInInfo > XclExpBuiltInMap;
682  typedef ::std::vector< XclExpCellBorder > XclExpBorderList;
683  typedef ::std::vector< XclExpCellArea > XclExpFillList;
684 
686  struct FindKey
687  {
688  bool mbCellXF; // is this a hard cell format, or a cell style
690  sal_uInt32 mnScNumFmt;
691  sal_uInt16 mnXclFont;
692 
693  bool operator<(const FindKey& other) const
694  {
695  if (mbCellXF != other.mbCellXF)
696  return mbCellXF < other.mbCellXF;
697  if (mpItemSet != other.mpItemSet)
698  return mpItemSet < other.mpItemSet;
699  if (mnScNumFmt != other.mnScNumFmt)
700  return mnScNumFmt < other.mnScNumFmt;
701  return mnXclFont < other.mnXclFont;
702  }
703  };
704  static FindKey ToFindKey(XclExpXF const &);
705 
706  XclExpXFList maXFList;
707  std::map<FindKey, std::vector<sal_uInt32>>
711  XclExpBuiltInMap maBuiltInMap;
715  XclExpXFList maSortedXFList;
716  XclExpBorderList maBorders;
717  XclExpFillList maFills;
718 
719 };
720 
721 class XclExpDxf : public XclExpRecordBase, protected XclExpRoot
722 {
723 public:
724  XclExpDxf( const XclExpRoot& rRoot, std::unique_ptr<XclExpCellAlign> pAlign, std::unique_ptr<XclExpCellBorder> pBorder,
725  std::unique_ptr<XclExpDxfFont> pFont, std::unique_ptr<XclExpNumFmt> pNumberFmt,
726  std::unique_ptr<XclExpCellProt> pProt, std::unique_ptr<XclExpColor> pColor);
727  virtual ~XclExpDxf() override;
728 
729  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
730  void SaveXmlExt( XclExpXmlStream& rStrm);
731 
732 private:
733  std::unique_ptr<XclExpCellAlign> mpAlign;
734  std::unique_ptr<XclExpCellBorder> mpBorder;
735  std::unique_ptr<XclExpDxfFont> mpFont;
736  std::unique_ptr<XclExpNumFmt> mpNumberFmt;
737  std::unique_ptr<XclExpCellProt> mpProt;
738  std::unique_ptr<XclExpColor> mpColor;
739 };
740 
741 class XclExpDxfs : public XclExpRecordBase, protected XclExpRoot
742 {
743 public:
744  XclExpDxfs( const XclExpRoot& rRoot );
745 
746  sal_Int32 GetDxfId(const OUString& rName);
747 
748  virtual void SaveXml( XclExpXmlStream& rStrm) override;
749 private:
750  typedef std::vector< std::unique_ptr<XclExpDxf> > DxfContainer;
751  std::map<OUString, sal_Int32> maStyleNameToDxfId;
752  DxfContainer maDxf;
753  std::unique_ptr<NfKeywordTable> mpKeywordTable;
754 };
755 
757 {
758 public:
759  explicit XclExpXmlStyleSheet( const XclExpRoot& rRoot );
760 
761  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
762 };
763 
764 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt16 GetXclFont() const
Definition: xestyle.hxx:473
std::unique_ptr< XclExpNumFmt > mpNumberFmt
Definition: xestyle.hxx:736
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:1240
void FillToXF8(sal_uInt16 &rnAlign, sal_uInt16 &rnMiscAttrib) const
Fills the data to the passed fields of a BIFF8 XF record.
Definition: xestyle.cxx:1551
void SaveXml(XclExpXmlStream &rStrm) const
Definition: xestyle.cxx:1936
XclExpBuiltInMap maBuiltInMap
List of all STYLE records.
Definition: xestyle.hxx:711
Stores all XF records (cell formats and cell styles) in the document.
Definition: xestyle.hxx:571
virtual void Save(XclExpStream &rStrm) override
Writes all FORMAT records contained in this buffer.
Definition: xestyle.cxx:1371
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:45
sal_Int32 nIndex
XclBiff
An enumeration for all Excel file format types (BIFF types).
Definition: xlconst.hxx:29
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:3125
sal_uInt32 mnStdFmt
Replacement table.
Definition: xestyle.hxx:300
sal_uInt32 mnScNumFmt
Definition: xestyle.hxx:255
sal_uInt16 mnXclFont
Calc number format index.
Definition: xestyle.hxx:487
XclExpXFList::RecordRefType XclExpXFRef
Definition: xestyle.hxx:629
static FindKey ToFindKey(XclExpXF const &)
Definition: xestyle.cxx:2747
sal_uInt32 GetStandardFormat() const
Returns the core index of the current standard number format.
Definition: xestyle.hxx:275
virtual ~XclExpNumFmtBuffer() override
Definition: xestyle.cxx:1349
This class is used to export Excel record streams.
Definition: xestream.hxx:72
XclExpXFId maXFId
Name of the cell style.
Definition: xestyle.hxx:551
Background area of a cell.
Definition: xestyle.hxx:50
XclExpRecordList< XclExpXF > XclExpXFList
Definition: xestyle.hxx:628
const size_t EXC_FONTLIST_NOTFOUND
Definition: xestyle.hxx:120
XclExpNumFmtVec maFormatMap
Special number formatter for conversion.
Definition: xestyle.hxx:298
std::map< OUString, sal_Int32 > maStyleNameToDxfId
Definition: xestyle.hxx:751
void SaveXml(XclExpXmlStream &rStrm) const
Definition: xestyle.cxx:1846
virtual void Save(XclExpStream &rStrm) override
Writes all FONT records contained in this buffer.
Definition: xestyle.cxx:1235
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:1064
XclExpPaletteImplRef mxImpl
Definition: xestyle.hxx:115
Border of a cell.
Definition: xestyle.hxx:49
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:3188
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:2678
void SaveXml(XclExpXmlStream &rStrm) const
Definition: xestyle.cxx:1591
const XclExpCellBorder & GetBorderData() const
Returns the cell border settings of this XF.
Definition: xestyle.hxx:444
OUString maNumFmtString
Resulting Excel format index.
Definition: xestyle.hxx:257
const XclExpCellArea & GetAreaData() const
Returns the cell fill settings of this XF.
Definition: xestyle.hxx:446
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:1189
const SfxItemSet * GetItemSet() const
Definition: xestyle.hxx:470
void FillToXF3(sal_uInt16 &rnProt) const
Fills the data to the passed fields of a BIFF3-BIFF8 XF record.
Definition: xestyle.cxx:1433
This struct helps reading and writing Excel fonts.
Definition: xlstyle.hxx:285
bool FillFromItemSet(const SfxItemSet &rItemSet, XclExpPalette &rPalette, bool bStyle)
Fills the area attributes from the passed item set.
Definition: xestyle.cxx:1872
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:295
Spreadsheet grid color.
Definition: xestyle.hxx:55
sal_uInt32 mnForeColorId
Definition: xestyle.hxx:374
XclExpCellAlign maAlignment
Cell protection flags.
Definition: xestyle.hxx:482
void SetXmlIds(sal_uInt32 nBorderId, sal_uInt32 nFillId)
Definition: xestyle.cxx:2178
OUString GetFormatCode(sal_uInt32 nScNumFmt)
Definition: xestyle.cxx:1418
sal_uInt32 GetFontColorId() const
Returns the font color identifier.
Definition: xestyle.hxx:162
void InsertUserStyles()
Inserts an XF and a STYLE record for all user defined style sheets.
Definition: xestyle.cxx:2875
Stores all default colors for a specific BIFF version.
Definition: xlstyle.hxx:250
void SaveXml(XclExpXmlStream &rStrm) const
Definition: xestyle.cxx:1439
XclExpXFBuffer(const XclExpRoot &rRoot)
Definition: xestyle.cxx:2410
const sal_uInt16 EXC_ID_DXFS
For internal use only.
Definition: xestyle.hxx:40
sal_uInt32 mnTopColorId
Color ID for right line.
Definition: xestyle.hxx:345
sal_uInt32 mnBottomColorId
Color ID for top line.
Definition: xestyle.hxx:346
ScfUInt16Vec maXFIndexVec
Contained elements describe built-in XFs.
Definition: xestyle.hxx:712
std::unique_ptr< NfKeywordTable > mpKeywordTable
Definition: xestyle.hxx:753
XclExpFontBuffer(const XclExpRoot &rRoot)
Definition: xestyle.cxx:1165
XclExpXFId()
Real Excel XF index.
Definition: xestyle.cxx:1982
void FillToXF5(sal_uInt16 &rnAlign) const
Fills the data to the passed fields of a BIFF5/BIFF7 XF record.
Definition: xestyle.cxx:1543
sal_uInt32 mnParentXFId
Background area style.
Definition: xestyle.hxx:485
XclExpCellArea maArea
Border line style.
Definition: xestyle.hxx:484
std::shared_ptr< XclExpPaletteImpl > XclExpPaletteImplRef
Definition: xestyle.hxx:114
virtual void WriteBody(XclExpStream &rStrm) override
Writes the contents of the STYLE record.
Definition: xestyle.cxx:2264
const XclExpXF * GetXFById(sal_uInt32 nXFId) const
Returns an XF record by its unique identifier.
Definition: xestyle.cxx:2452
const sal_uInt8 EXC_STYLE_USERDEF
"Followed_Hyperlink" style.
Definition: xlstyle.hxx:234
::std::vector< XclExpCellBorder > XclExpBorderList
Definition: xestyle.hxx:682
static sal_uInt32 GetXFIdFromIndex(sal_uInt16 nXFIndex)
Returns the XF identifier representing a fixed Excel XF index (e.g.
Definition: xestyle.cxx:2442
XclExpNumFmt(sal_uInt32 nScNumFmt, sal_uInt16 nXclNumFmt, const OUString &rFrmt)
format string
Definition: xestyle.hxx:259
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:246
void SetFinalColors()
Sets the resulting Excel palette index from all used color IDs (border and area). ...
Definition: xestyle.cxx:2042
const XclExpCellProt & GetProtectionData() const
Returns the cell protection settings of this XF.
Definition: xestyle.hxx:440
Extends the XclCellArea struct for export.
Definition: xestyle.hxx:372
const XclExpFont * GetFont(sal_uInt16 nXclFont) const
Returns the specified font from font list.
Definition: xestyle.cxx:1179
ScfUInt16Vec maStyleIndexes
Maps XF IDs to XF indexes.
Definition: xestyle.hxx:713
Text in a cell.
Definition: xestyle.hxx:48
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:2752
sal_uInt16 mnXclNumFmt
Excel font index.
Definition: xestyle.hxx:488
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:2883
void FillToXF5(sal_uInt32 &rnArea) const
Fills the data to the passed fields of a BIFF5/BIFF7 XF record.
Definition: xestyle.cxx:1895
Access to global data from other classes.
Definition: xeroot.hxx:112
sal_uInt32 InsertStyle(const SfxStyleSheetBase *pStyleSheet)
Inserts the passed cell style.
Definition: xestyle.cxx:2437
::std::vector< XclExpCellArea > XclExpFillList
Definition: xestyle.hxx:683
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:2028
const sal_uInt16 EXC_FONT_NOTFOUND
Application font index.
Definition: xlstyle.hxx:77
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:2572
size_t mnXclMaxSize
List of all FONT records.
Definition: xestyle.hxx:247
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:2066
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:1769
sal_uInt32 mnScNumFmt
XF ID of parent XF record.
Definition: xestyle.hxx:486
bool operator<(const FindKey &other) const
Definition: xestyle.hxx:693
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:2603
XclExpXFList maXFList
Definition: xestyle.hxx:706
sal_uInt32 mnLeftColorId
Definition: xestyle.hxx:343
Base class for all Excel records.
Definition: xerecord.hxx:37
void ConvertXFIndex(const XclExpRoot &rRoot)
Converts the XF identifier in mnXFId to an Excel XF index and stores it in mnXFIndex.
Definition: xestyle.cxx:1994
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:268
Extends the XclCellAlign struct for export.
Definition: xestyle.hxx:322
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:123
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:1425
void InitDefaultFonts()
Initializes the default fonts for the current BIFF version.
Definition: xestyle.cxx:1255
std::vector< std::unique_ptr< XclExpDxf > > DxfContainer
Definition: xestyle.hxx:750
XclExpCellBorder()
Color ID for diagonal line(s).
Definition: xestyle.cxx:1693
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:2895
sal_uInt32 mnColorId
All font attributes.
Definition: xestyle.hxx:175
void SetFinalColors(const XclExpPalette &rPalette)
Fills the mn***Color base members from the mn***ColorId members.
Definition: xestyle.cxx:1890
virtual void Save(XclExpStream &rStrm) override
Writes all XF records contained in this buffer.
Definition: xestyle.cxx:2580
DocumentType eType
const XclFontData & GetFontData() const
Returns read-only access to font data.
Definition: xestyle.hxx:160
::std::unique_ptr< SvNumberFormatter > SvNumberFormatterPtr
Definition: xestyle.hxx:265
XclExpXmlStyleSheet(const XclExpRoot &rRoot)
Definition: xestyle.cxx:3183
composite key for the find-map, so we can do partial key searching
Definition: xestyle.hxx:686
XclFontData maData
Definition: xestyle.hxx:174
Stores all data of an Excel font and provides export of FONT records.
Definition: xestyle.hxx:153
Represents a default XF record.
Definition: xestyle.hxx:521
sal_uInt32 GetScNumFmt() const
Definition: xestyle.hxx:472
Extends the XclCellBorder struct for export.
Definition: xestyle.hxx:341
Contains all cell protection attributes.
Definition: xlstyle.hxx:476
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:1377
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:737
sal_uInt32 mnDiagColorId
Color ID for bottom line.
Definition: xestyle.hxx:347
Contains all cell alignment attributes.
Definition: xlstyle.hxx:487
XclExpNumFmtBuffer(const XclExpRoot &rRoot)
Definition: xestyle.cxx:1333
std::unique_ptr< XclExpDxfFont > mpFont
Definition: xestyle.hxx:735
const sal_uInt16 EXC_ID_FONTLIST
Definition: xestyle.hxx:37
sal_uInt32 InsertStyleXF(const SfxStyleSheetBase &rStyleSheet)
Inserts the passed cell style.
Definition: xestyle.cxx:2804
sal_uInt16 Insert(sal_uInt32 nScNumFmt)
Inserts a number format into the format buffer.
Definition: xestyle.cxx:1353
ScDxfFont maDxfData
Definition: xestyle.hxx:187
bool mbPredefined
Level for RowLevel/ColLevel styles.
Definition: xestyle.hxx:677
XclExpFillList maFills
List of borders used by XF records.
Definition: xestyle.hxx:717
void Finalize()
Reduces the XF record list to the maximum allowed number of records.
Definition: xestyle.cxx:2457
void SetNumFmt(sal_uInt16 nXclNumFmt)
Sets the Excel number format index.
Definition: xestyle.cxx:2235
const XclFontData & GetAppFontData() const
Returns the application font data of this file, needed e.g.
Definition: xestyle.cxx:1184
Represents an XF record which contains all formatting data of a cell or cell style.
Definition: xestyle.hxx:423
sal_uInt32 mnHash
Unique color ID for text color.
Definition: xestyle.hxx:176
Stores all used colors in the document.
Definition: xestyle.hxx:74
void WriteFormatRecord(XclExpStream &rStrm, sal_uInt16 nXclNumFmt, const OUString &rFormatStr)
Writes the FORMAT record with index nXclIx and format string rFormatStr.
Definition: xestyle.cxx:1391
std::unique_ptr< NfKeywordTable > mpKeywordTable
Maps core formats to Excel indexes.
Definition: xestyle.hxx:299
void SaveXFXml(XclExpXmlStream &rStrm, XclExpXF &rXF)
Definition: xestyle.cxx:2659
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:2736
sal_uInt8 mnLevel
Built-in style identifier.
Definition: xestyle.hxx:676
std::unique_ptr< XclExpCellAlign > mpAlign
Definition: xestyle.hxx:733
const sal_uInt8 EXC_STYLE_NOLEVEL
Number of outline level styles.
Definition: xlstyle.hxx:237
virtual ~XclExpDxf() override
Definition: xestyle.cxx:3138
void InsertDefaultRecords()
Inserts all default XF and STYLE records.
Definition: xestyle.cxx:2919
Line in a chart.
Definition: xestyle.hxx:52
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:1909
const SfxItemSet * mpItemSet
Definition: xestyle.hxx:479
XclExpBorderList maBorders
List of XF records in XF index order.
Definition: xestyle.hxx:716
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:1155
virtual ~XclExpPalette() override
Definition: xestyle.cxx:759
virtual void Save(XclExpStream &rStrm) override
Skips writing this record.
Definition: xestyle.cxx:1160
ScfUInt16Vec maCellIndexes
Maps XF IDs to OOXML Style indexes.
Definition: xestyle.hxx:714
sal_uInt8 GetUsedFlags() const
Returns the bits specifying the used attributes.
Definition: xestyle.cxx:2117
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:1866
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:1797
sal_uInt8 mnLevel
Built-in style identifier.
Definition: xestyle.hxx:553
void SaveXml(XclExpXmlStream &rStrm)
Definition: xestyle.cxx:1325
const sal_uInt16 EXC_ID_XFLIST
For internal use only.
Definition: xestyle.hxx:39
bool FillFromItemSet(const SfxItemSet &rItemSet, XclExpPalette &rPalette, XclBiff eBiff, bool bStyle=false)
Fills the border attributes from the passed item set.
Definition: xestyle.cxx:1702
Stores a core number format index with corresponding Excel format index.
Definition: xestyle.hxx:253
void WriteBody8(XclExpStream &rStrm)
Definition: xestyle.cxx:2148
bool IsBuiltIn() const
Returns true, if this record represents an Excel built-in style.
Definition: xestyle.hxx:541
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:2432
sal_uInt16 mnXclNumFmt
Core index of the number format.
Definition: xestyle.hxx:256
virtual void WriteBody(XclExpStream &rStrm) override
Writes the contents of the XF record.
Definition: xestyle.cxx:2165
Extends the XclCellProt struct for export.
Definition: xestyle.hxx:308
bool FillFromItemSet(const SfxItemSet &rItemSet)
Definition: xestyle.cxx:1960
Contains color and line style for each cell border line.
Definition: xlstyle.hxx:522
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:715
sal_uInt32 mnRightColorId
Color ID for left line.
Definition: xestyle.hxx:344
static sal_uInt32 GetDefCellXFId()
Returns the XF identifier representing the default cell XF.
Definition: xestyle.cxx:2447
void Initialize()
Inserts predefined built-in styles and user-defined styles.
Definition: xestyle.cxx:2415
sal_Int32 mnFillId
OOXML Border Index.
Definition: xestyle.hxx:490
std::unique_ptr< XclExpColor > mpColor
Definition: xestyle.hxx:738
XclExpBuiltInInfo()
true = STYLE record created.
Definition: xestyle.cxx:2345
const XclExpCellAlign & GetAlignmentData() const
Returns the alignment settings of this XF.
Definition: xestyle.hxx:442
std::map< FindKey, std::vector< sal_uInt32 > > maXFFindMap
List of all XF records.
Definition: xestyle.hxx:708
bool FillFromItemSet(const SfxItemSet &rItemSet, bool bForceLineBreak, XclBiff eBiff, bool bStyle=false)
Fills the alignment attributes from the passed item set.
Definition: xestyle.cxx:1446
Represents a STYLE record containing the data of a cell style.
Definition: xestyle.hxx:534
::std::vector< sal_uInt16 > ScfUInt16Vec
Definition: ftools.hxx:255
void SetFinalColors(const XclExpPalette &rPalette)
Fills the mn***Color base members from the mn***ColorId members.
Definition: xestyle.cxx:1760
Color maColor
Definition: xestyle.hxx:400
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:3109
size_t Find(const XclFontData &rFontData)
Tries to find the passed font and returns the current list index.
Definition: xestyle.cxx:1301
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:1902
void FillToXF8(sal_uInt32 &rnBorder1, sal_uInt32 &rnBorder2) const
Fills the data to the passed fields of a BIFF8 XF record.
Definition: xestyle.cxx:1781
sal_uInt32 mnXFId
Definition: xestyle.hxx:410
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:801
XclExpStyle(sal_uInt32 nXFId, const OUString &rStyleName)
Definition: xestyle.cxx:2241
sal_uInt16 mnXclOffset
Key for standard number format.
Definition: xestyle.hxx:301
XclExpDefaultXF(const XclExpRoot &rRoot, bool bCellXF)
Definition: xestyle.cxx:2224
::std::map< sal_uInt32, XclExpBuiltInInfo > XclExpBuiltInMap
Definition: xestyle.hxx:681
DxfContainer maDxf
Definition: xestyle.hxx:752
Stores the data of all fonts used in the document.
Definition: xestyle.hxx:206
void SaveXml(XclExpXmlStream &rStrm) const
Definition: xestyle.cxx:1971
A combination of unique XF identifier with real Excel XF index.
Definition: xestyle.hxx:408
XclExpCellProt maProtection
Pointer to the item set (we do not own it).
Definition: xestyle.hxx:481
sal_Int32 mnBorderId
Excel number format index.
Definition: xestyle.hxx:489
sal_uInt32 mnBackColorId
Foreground color ID.
Definition: xestyle.hxx:375
sal_uInt32 Insert(const ScPatternAttr *pPattern, sal_Int16 nScript)
Finds or creates a cell XF record for the passed item set.
Definition: xestyle.cxx:2421
Used as placeholder for font index 4, which is not used in Excel.
Definition: xestyle.hxx:191
Contains background colors and pattern for a cell.
Definition: xlstyle.hxx:543
Extended info about a built-in XF.
Definition: xestyle.hxx:673
SvNumberFormatterPtr mxFormatter
Definition: xestyle.hxx:297
sal_uInt16 mnXFIndex
Temporary XF identifier.
Definition: xestyle.hxx:411
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:710
bool Equals(const XclXFBase &rCmp) const
Returns true, if this object is equal to the passed.
Definition: xlstyle.cxx:1729
void WriteBody5(XclExpStream &rStrm)
Definition: xestyle.cxx:2131
XclExpRecordList< XclExpFont > XclExpFontList
Definition: xestyle.hxx:243
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:2184
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:976
sal_Int32 GetXmlStyleIndex(sal_uInt32 nXFId) const
Definition: xestyle.cxx:2564
Text color in a chart.
Definition: xestyle.hxx:51
const sal_uInt16 EXC_ID_FORMATLIST
For internal use only.
Definition: xestyle.hxx:38
bool mbHasStyleRec
true = XF still predefined.
Definition: xestyle.hxx:678
void SaveXmlExt(XclExpXmlStream &rStrm)
Definition: xestyle.cxx:3162
sal_uInt8 mnStyleId
XF identifier for style formatting.
Definition: xestyle.hxx:552
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:3142
XclExpBlindFont(const XclExpRoot &rRoot)
Definition: xestyle.cxx:1150
Area in a chart.
Definition: xestyle.hxx:53
OUString maName
Definition: xestyle.hxx:550
const SfxItemSet * mpItemSet
Definition: xestyle.hxx:689
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:3101
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:2057
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:561
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:2299
void SetFont(sal_uInt16 nXclFont)
Sets the Excel font index.
Definition: xestyle.cxx:2229
void AddBorderAndFill(const XclExpXF &rXF)
Definition: xestyle.cxx:2994
XclExpFontList::RecordRefType XclExpFontRef
Definition: xestyle.hxx:244
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:2426
XclExpDxfs(const XclExpRoot &rRoot)
Definition: xestyle.cxx:3007
Base class for single records with any content.
Definition: xerecord.hxx:141
Text color in a form control.
Definition: xestyle.hxx:54
XclExpCellBorder maBorder
All alignment attributes.
Definition: xestyle.hxx:483
void AppendXFIndex(sal_uInt32 nXFId)
Appends a XF index to the internal ID<->index maps.
Definition: xestyle.cxx:2984
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:2554
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:1999
std::unique_ptr< XclExpCellBorder > mpBorder
Definition: xestyle.hxx:734