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 #include <o3tl/sorted_vector.hxx>
34 
35 /* ============================================================================
36 - Buffers for style records (PALETTE, FONT, FORMAT, XF, STYLE).
37 ============================================================================ */
38 
39 const sal_uInt16 EXC_ID_FONTLIST = 0x8031;
40 const sal_uInt16 EXC_ID_FORMATLIST = 0x801E;
41 const sal_uInt16 EXC_ID_XFLIST = 0x8043;
42 const sal_uInt16 EXC_ID_DXFS = 0x9999;
43 
44 // PALETTE record - color information =========================================
45 
48 {
58 };
59 
60 class XclExpPaletteImpl;
61 
77 {
78 public:
79  explicit XclExpPalette( const XclExpRoot& rRoot );
80  virtual ~XclExpPalette() override;
81 
85  sal_uInt32 InsertColor( const Color& rColor, XclExpColorType eType, sal_uInt16 nAutoDefault = 0 );
87  static sal_uInt32 GetColorIdFromIndex( sal_uInt16 nIndex );
88 
90  void Finalize();
91 
93  sal_uInt16 GetColorIndex( sal_uInt32 nColorId ) const;
94 
99  void GetMixedColors(
100  sal_uInt16& rnXclForeIx, sal_uInt16& rnXclBackIx, sal_uInt8& rnXclPattern,
101  sal_uInt32 nForeColorId, sal_uInt32 nBackColorId ) const;
102 
105  Color GetColor( sal_uInt16 nXclIndex ) const;
106 
108  virtual void Save( XclExpStream& rStrm ) override;
109  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
110 
111 private:
113  virtual void WriteBody( XclExpStream& rStrm ) override;
114 
115 private:
116  typedef std::shared_ptr< XclExpPaletteImpl > XclExpPaletteImplRef;
117  XclExpPaletteImplRef mxImpl;
118 };
119 
120 // FONT record - font information =============================================
121 
122 const size_t EXC_FONTLIST_NOTFOUND = static_cast< size_t >( -1 );
123 
126 {
128  sal_Int16 GetFirstUsedScript(
129  const XclExpRoot& rRoot,
130  const SfxItemSet& rItemSet );
131 
134  const XclExpRoot& rRoot,
135  const SfxItemSet& rItemSet,
136  sal_Int16 nScript );
137 
143  ScDxfFont GetDxfFontFromItemSet(const XclExpRoot& rRoot, const SfxItemSet& rSet);
144 
147  bool CheckItems(
148  const XclExpRoot& rRoot,
149  const SfxItemSet& rItemSet,
150  sal_Int16 nScript,
151  bool bDeep );
152 }
153 
155 class XclExpFont : public XclExpRecord, protected XclExpRoot
156 {
157 public:
158  explicit XclExpFont( const XclExpRoot& rRoot,
159  const XclFontData& rFontData, XclExpColorType eColorType );
160 
162  const XclFontData& GetFontData() const { return maData; }
164  sal_uInt32 GetFontColorId() const { return mnColorId; }
167  virtual bool Equals( const XclFontData& rFontData, sal_uInt32 nHash ) const;
168 
169  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
170 
171 private:
173  virtual void WriteBody( XclExpStream& rStrm ) override;
174 
175 private:
177  sal_uInt32 mnColorId;
178  sal_uInt32 mnHash;
179 };
180 
181 class XclExpDxfFont : public XclExpRecordBase, protected XclExpRoot
182 {
183 public:
184  XclExpDxfFont(const XclExpRoot& rRoot, const SfxItemSet& rItemSet);
185 
186  virtual void SaveXml(XclExpXmlStream& rStrm) override;
187 private:
188 
190 };
191 
194 {
195 public:
196  explicit XclExpBlindFont( const XclExpRoot& rRoot );
197 
199  virtual bool Equals( const XclFontData& rFontData, sal_uInt32 nHash ) const override;
200 
202  virtual void Save( XclExpStream& rStrm ) override;
203 };
204 
205 class ScPatternAttr;
206 
209 {
210 public:
211  explicit XclExpFontBuffer( const XclExpRoot& rRoot );
212 
214  const XclExpFont* GetFont( sal_uInt16 nXclFont ) const;
216  const XclFontData& GetAppFontData() const;
217 
221  sal_uInt16 Insert( const XclFontData& rFontData,
222  XclExpColorType eColorType, bool bAppFont = false );
225  sal_uInt16 Insert( const SvxFont& rFont,
226  XclExpColorType eColorType );
231  sal_uInt16 Insert( const SfxItemSet& rItemSet, sal_Int16 nScript,
232  XclExpColorType eColorType, bool bAppFont );
233 
235  virtual void Save( XclExpStream& rStrm ) override;
236  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
237 
238 private:
240  void InitDefaultFonts();
242  size_t Find( const XclFontData& rFontData );
243 
244 private:
247 
248  XclExpFontList maFontList;
249  size_t mnXclMaxSize;
250 };
251 
252 // FORMAT record - number formats =============================================
253 
256 {
257  sal_uInt32 mnScNumFmt;
258  sal_uInt16 mnXclNumFmt;
259  OUString maNumFmtString;
260 
261  explicit XclExpNumFmt( sal_uInt32 nScNumFmt, sal_uInt16 nXclNumFmt, const OUString& rFrmt ) :
262  mnScNumFmt( nScNumFmt ), mnXclNumFmt( nXclNumFmt ), maNumFmtString( rFrmt ) {}
263 
264  void SaveXml( XclExpXmlStream& rStrm );
265 };
266 
267 typedef ::std::unique_ptr< SvNumberFormatter > SvNumberFormatterPtr;
268 
271 {
272 public:
273  explicit XclExpNumFmtBuffer( const XclExpRoot& rRoot );
274  virtual ~XclExpNumFmtBuffer() override;
275 
277  sal_uInt32 GetStandardFormat() const { return mnStdFmt; }
278 
282  sal_uInt16 Insert( sal_uInt32 nScNumFmt );
283 
285  virtual void Save( XclExpStream& rStrm ) override;
286  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
287 
288  OUString GetFormatCode ( sal_uInt32 nScNumFmt );
289 
290 private:
292  void WriteFormatRecord( XclExpStream& rStrm, sal_uInt16 nXclNumFmt, const OUString& rFormatStr );
294  void WriteFormatRecord( XclExpStream& rStrm, const XclExpNumFmt& rFormat );
295 
296 private:
297  typedef ::std::vector< XclExpNumFmt > XclExpNumFmtVec;
298 
300  XclExpNumFmtVec maFormatMap;
301  std::unique_ptr<NfKeywordTable> mpKeywordTable;
302  sal_uInt32 mnStdFmt;
303  sal_uInt16 mnXclOffset;
304 };
305 
306 // XF, STYLE record - Cell formatting =========================================
307 
311 {
314  bool FillFromItemSet( const SfxItemSet& rItemSet, bool bStyle = false );
315 
317  void FillToXF3( sal_uInt16& rnProt ) const;
318 
319  void SaveXml( XclExpXmlStream& rStrm ) const;
320 };
321 
325 {
330  bool FillFromItemSet( const SfxItemSet& rItemSet,
331  bool bForceLineBreak, XclBiff eBiff, bool bStyle = false );
332 
334  void FillToXF5( sal_uInt16& rnAlign ) const;
336  void FillToXF8( sal_uInt16& rnAlign, sal_uInt16& rnMiscAttrib ) const;
337 
338  void SaveXml( XclExpXmlStream& rStrm ) const;
339 };
340 
344 {
345  sal_uInt32 mnLeftColorId;
346  sal_uInt32 mnRightColorId;
347  sal_uInt32 mnTopColorId;
348  sal_uInt32 mnBottomColorId;
349  sal_uInt32 mnDiagColorId;
350 
351  explicit XclExpCellBorder();
352 
356  bool FillFromItemSet( const SfxItemSet& rItemSet,
357  XclExpPalette& rPalette, XclBiff eBiff, bool bStyle = false );
359  void SetFinalColors( const XclExpPalette& rPalette );
360 
362  void FillToXF5( sal_uInt32& rnBorder, sal_uInt32& rnArea ) const;
364  void FillToXF8( sal_uInt32& rnBorder1, sal_uInt32& rnBorder2 ) const;
365 
367  void FillToCF8( sal_uInt16& rnLine, sal_uInt32& rnColor ) const;
368 
369  void SaveXml( XclExpXmlStream& rStrm ) const;
370 };
371 
375 {
376  sal_uInt32 mnForeColorId;
377  sal_uInt32 mnBackColorId;
378 
379  explicit XclExpCellArea();
380 
383  bool FillFromItemSet(
384  const SfxItemSet& rItemSet, XclExpPalette& rPalette,
385  bool bStyle );
387  void SetFinalColors( const XclExpPalette& rPalette );
388 
390  void FillToXF5( sal_uInt32& rnArea ) const;
392  void FillToXF8( sal_uInt32& rnBorder2, sal_uInt16& rnArea ) const;
393 
395  void FillToCF8( sal_uInt16& rnPattern, sal_uInt16& rnColor ) const;
396 
397  void SaveXml( XclExpXmlStream& rStrm ) const;
398 };
399 
401 {
403 
404  bool FillFromItemSet( const SfxItemSet& rItemSet );
405 
406  void SaveXml( XclExpXmlStream& rStrm ) const;
407 };
408 
411 {
412  sal_uInt32 mnXFId;
413  sal_uInt16 mnXFIndex;
414 
415  explicit XclExpXFId();
416  explicit XclExpXFId( sal_uInt32 nXFId );
417 
419  void ConvertXFIndex( const XclExpRoot& rRoot );
420 };
421 
422 class SfxStyleSheetBase;
423 
425 class XclExpXF : public XclXFBase, public XclExpRecord, protected XclExpRoot
426 {
427 public:
429  explicit XclExpXF(
430  const XclExpRoot& rRoot,
431  const ScPatternAttr& rPattern,
432  sal_Int16 nScript,
433  sal_uInt32 nScForceNumFmt = NUMBERFORMAT_ENTRY_NOT_FOUND,
434  sal_uInt16 nForceXclFont = EXC_FONT_NOTFOUND,
435  bool bForceLineBreak = false );
437  explicit XclExpXF(
438  const XclExpRoot& rRoot,
439  const SfxStyleSheetBase& rStyleSheet );
440 
442  const XclExpCellProt& GetProtectionData() const { return maProtection; }
444  const XclExpCellAlign& GetAlignmentData() const { return maAlignment; }
446  const XclExpCellBorder& GetBorderData() const { return maBorder; }
448  const XclExpCellArea& GetAreaData() const { return maArea; }
449 
452  bool Equals(
453  const ScPatternAttr& rPattern,
454  sal_uInt32 nScForceNumFmt,
455  sal_uInt16 nForceXclFont,
456  bool bForceLineBreak ) const;
457 
460  bool Equals( const SfxStyleSheetBase& rStyleSheet ) const;
461 
463  void SetFinalColors();
464 
466  bool Equals( const XclExpXF& rCmpXF ) const;
467 
468  void SetXmlIds( sal_uInt32 nBorderId, sal_uInt32 nFillId );
469 
470  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
471 
472  const SfxItemSet* GetItemSet() const { return mpItemSet; }
473 
474  sal_uInt32 GetScNumFmt() const { return mnScNumFmt; }
475  sal_uInt16 GetXclFont() const { return mnXclFont; }
476 
477 protected:
478  explicit XclExpXF( const XclExpRoot& rRoot, bool bCellXF );
479 
480 protected: // access for XclExpDefaultXF
482 
487  sal_uInt32 mnParentXFId;
488  sal_uInt32 mnScNumFmt;
489  sal_uInt16 mnXclFont;
490  sal_uInt16 mnXclNumFmt;
491  sal_Int32 mnBorderId;
492  sal_Int32 mnFillId;
493 
494 private:
495  using XclXFBase::Equals;
496 
498  void InitDefault();
501  void Init(
502  const SfxItemSet& rItemSet,
503  sal_Int16 nScript,
504  sal_uInt32 nForceScNumFmt,
505  sal_uInt16 nForceXclFont,
506  bool bForceLineBreak,
507  bool bDefStyle );
508 
513  sal_uInt8 GetUsedFlags() const;
514 
515  void WriteBody5( XclExpStream& rStrm );
516  void WriteBody8( XclExpStream& rStrm );
517 
519  virtual void WriteBody( XclExpStream& rStrm ) override;
520 };
521 
523 class XclExpDefaultXF : public XclExpXF
524 {
525 public:
526  explicit XclExpDefaultXF( const XclExpRoot& rRoot, bool bCellXF );
527 
529  void SetFont( sal_uInt16 nXclFont );
531  void SetNumFmt( sal_uInt16 nXclNumFmt );
532 };
533 
536 class XclExpStyle : public XclExpRecord
537 {
538 public:
539  explicit XclExpStyle( sal_uInt32 nXFId, const OUString& rStyleName );
540  explicit XclExpStyle( sal_uInt32 nXFId, sal_uInt8 nStyleId, sal_uInt8 nLevel );
541 
543  bool IsBuiltIn() const { return mnStyleId != EXC_STYLE_USERDEF; }
544 
545  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
546 
547 private:
549  virtual void WriteBody( XclExpStream& rStrm ) override;
550 
551 private:
552  OUString maName;
556 };
557 
573 class XclExpXFBuffer : public XclExpRecordBase, protected XclExpRoot
574 {
575 public:
576  explicit XclExpXFBuffer( const XclExpRoot& rRoot );
577 
579  void Initialize();
580 
583  sal_uInt32 Insert( const ScPatternAttr* pPattern, sal_Int16 nScript );
590  sal_uInt32 InsertWithFont(
591  const ScPatternAttr* pPattern, sal_Int16 nScript,
592  sal_uInt16 nForceXclFont,
593  bool bForceLineBreak );
601  sal_uInt32 InsertWithNumFmt(
602  const ScPatternAttr* pPattern, sal_Int16 nScript,
603  sal_uInt32 nForceScNumFmt,
604  bool bForceLineBreak );
607  sal_uInt32 InsertStyle( const SfxStyleSheetBase* pStyleSheet );
609  static sal_uInt32 GetXFIdFromIndex( sal_uInt16 nXFIndex );
611  static sal_uInt32 GetDefCellXFId();
612 
614  const XclExpXF* GetXFById( sal_uInt32 nXFId ) const;
615 
617  void Finalize();
618 
620  sal_uInt16 GetXFIndex( sal_uInt32 nXFId ) const;
621 
622  sal_Int32 GetXmlStyleIndex( sal_uInt32 nXFId ) const;
623  sal_Int32 GetXmlCellIndex( sal_uInt32 nXFId ) const;
624 
626  virtual void Save( XclExpStream& rStrm ) override;
627  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
628 
629 private:
632 
633 private:
635  sal_uInt32 FindXF( const ScPatternAttr& rPattern, sal_uInt32 nForceScNumFmt,
636  sal_uInt16 nForceXclFont, bool bForceLineBreak ) const;
638  sal_uInt32 FindXF( const SfxStyleSheetBase& rStyleSheet ) const;
639 
641  sal_uInt32 FindBuiltInXF( sal_uInt8 nStyleId, sal_uInt8 nLevel ) const;
642 
645  sal_uInt32 InsertCellXF( const ScPatternAttr* pPattern, sal_Int16 nScript,
646  sal_uInt32 nForceScNumFmt,
647  sal_uInt16 nForceXclFont, bool bForceLineBreak );
650  sal_uInt32 InsertStyleXF( const SfxStyleSheetBase& rStyleSheet );
651 
653  void InsertUserStyles();
654 
657  sal_uInt32 AppendBuiltInXF( XclExpXFRef const & xXF,
658  sal_uInt8 nStyleId, sal_uInt8 nLevel = EXC_STYLE_NOLEVEL );
661  sal_uInt32 AppendBuiltInXFWithStyle( XclExpXFRef const & xXF,
662  sal_uInt8 nStyleId, sal_uInt8 nLevel = EXC_STYLE_NOLEVEL );
663 
665  void InsertDefaultRecords();
666 
668  void AppendXFIndex( sal_uInt32 nXFId );
669 
670  void AddBorderAndFill( const XclExpXF& rXF );
671  void SaveXFXml( XclExpXmlStream& rStrm, XclExpXF& rXF );
672 
673 private:
676  {
681  explicit XclExpBuiltInInfo();
682  };
683  typedef ::std::map< sal_uInt32, XclExpBuiltInInfo > XclExpBuiltInMap;
684  typedef ::std::vector< XclExpCellBorder > XclExpBorderList;
685  typedef ::std::vector< XclExpCellArea > XclExpFillList;
686 
688  struct FindKey
689  {
690  bool mbCellXF; // is this a hard cell format, or a cell style
692  sal_uInt32 mnScNumFmt;
693  sal_uInt16 mnXclFont;
694 
695  bool operator<(const FindKey& other) const
696  {
697  if (mbCellXF != other.mbCellXF)
698  return mbCellXF < other.mbCellXF;
699  if (mpItemSet != other.mpItemSet)
700  return mpItemSet < other.mpItemSet;
701  if (mnScNumFmt != other.mnScNumFmt)
702  return mnScNumFmt < other.mnScNumFmt;
703  return mnXclFont < other.mnXclFont;
704  }
705  };
706  static FindKey ToFindKey(XclExpXF const &);
707 
708  XclExpXFList maXFList;
709  std::map<FindKey, std::vector<sal_uInt32>>
713  XclExpBuiltInMap maBuiltInMap;
717  XclExpXFList maSortedXFList;
718  XclExpBorderList maBorders;
719  XclExpFillList maFills;
720 
721 };
722 
723 class XclExpDxf : public XclExpRecordBase, protected XclExpRoot
724 {
725 public:
726  XclExpDxf( const XclExpRoot& rRoot, std::unique_ptr<XclExpCellAlign> pAlign, std::unique_ptr<XclExpCellBorder> pBorder,
727  std::unique_ptr<XclExpDxfFont> pFont, std::unique_ptr<XclExpNumFmt> pNumberFmt,
728  std::unique_ptr<XclExpCellProt> pProt, std::unique_ptr<XclExpColor> pColor);
729  virtual ~XclExpDxf() override;
730 
731  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
732  void SaveXmlExt( XclExpXmlStream& rStrm);
733 
734 private:
735  std::unique_ptr<XclExpCellAlign> mpAlign;
736  std::unique_ptr<XclExpCellBorder> mpBorder;
737  std::unique_ptr<XclExpDxfFont> mpFont;
738  std::unique_ptr<XclExpNumFmt> mpNumberFmt;
739  std::unique_ptr<XclExpCellProt> mpProt;
740  std::unique_ptr<XclExpColor> mpColor;
741 };
742 
743 class XclExpDxfs : public XclExpRecordBase, protected XclExpRoot
744 {
745 public:
746  XclExpDxfs( const XclExpRoot& rRoot );
747 
748  sal_Int32 GetDxfId(const OUString& rName);
749 
750  virtual void SaveXml( XclExpXmlStream& rStrm) override;
751 private:
752  typedef std::vector< std::unique_ptr<XclExpDxf> > DxfContainer;
753  std::map<OUString, sal_Int32> maStyleNameToDxfId;
754  DxfContainer maDxf;
755  std::unique_ptr<NfKeywordTable> mpKeywordTable;
756 };
757 
759 {
760 public:
761  explicit XclExpXmlStyleSheet( const XclExpRoot& rRoot );
762 
763  virtual void SaveXml( XclExpXmlStream& rStrm ) override;
764 };
765 
766 #endif
767 
768 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt16 GetXclFont() const
Definition: xestyle.hxx:475
std::unique_ptr< XclExpNumFmt > mpNumberFmt
Definition: xestyle.hxx:738
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:713
Stores all XF records (cell formats and cell styles) in the document.
Definition: xestyle.hxx:573
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:47
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:302
sal_uInt32 mnScNumFmt
Definition: xestyle.hxx:257
sal_uInt16 mnXclFont
Calc number format index.
Definition: xestyle.hxx:489
XclExpXFList::RecordRefType XclExpXFRef
Definition: xestyle.hxx:631
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:277
virtual ~XclExpNumFmtBuffer() override
Definition: xestyle.cxx:1350
This class is used to export Excel record streams.
Definition: xestream.hxx:71
XclExpXFId maXFId
Name of the cell style.
Definition: xestyle.hxx:553
Background area of a cell.
Definition: xestyle.hxx:52
XclExpRecordList< XclExpXF > XclExpXFList
Definition: xestyle.hxx:630
const size_t EXC_FONTLIST_NOTFOUND
Definition: xestyle.hxx:122
XclExpNumFmtVec maFormatMap
Special number formatter for conversion.
Definition: xestyle.hxx:300
std::map< OUString, sal_Int32 > maStyleNameToDxfId
Definition: xestyle.hxx:753
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:117
Border of a cell.
Definition: xestyle.hxx:51
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:446
OUString maNumFmtString
Resulting Excel format index.
Definition: xestyle.hxx:259
const XclExpCellArea & GetAreaData() const
Returns the cell fill settings of this XF.
Definition: xestyle.hxx:448
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:472
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:297
Spreadsheet grid color.
Definition: xestyle.hxx:57
sal_uInt32 mnForeColorId
Definition: xestyle.hxx:376
XclExpCellAlign maAlignment
Cell protection flags.
Definition: xestyle.hxx:484
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:164
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:42
sal_uInt32 mnTopColorId
Color ID for right line.
Definition: xestyle.hxx:347
sal_uInt32 mnBottomColorId
Color ID for top line.
Definition: xestyle.hxx:348
ScfUInt16Vec maXFIndexVec
Contained elements describe built-in XFs.
Definition: xestyle.hxx:714
std::unique_ptr< NfKeywordTable > mpKeywordTable
Definition: xestyle.hxx:755
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:487
XclExpCellArea maArea
Border line style.
Definition: xestyle.hxx:486
std::shared_ptr< XclExpPaletteImpl > XclExpPaletteImplRef
Definition: xestyle.hxx:116
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:684
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:261
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:248
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:442
Extends the XclCellArea struct for export.
Definition: xestyle.hxx:374
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:715
Text in a cell.
Definition: xestyle.hxx:50
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:490
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:685
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:249
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:488
bool operator<(const FindKey &other) const
Definition: xestyle.hxx:695
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xestyle.cxx:2604
XclExpXFList maXFList
Definition: xestyle.hxx:708
sal_uInt32 mnLeftColorId
Definition: xestyle.hxx:345
Base class for all Excel records.
Definition: xerecord.hxx:39
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:270
Extends the XclCellAlign struct for export.
Definition: xestyle.hxx:324
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:125
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:752
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:177
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:162
::std::unique_ptr< SvNumberFormatter > SvNumberFormatterPtr
Definition: xestyle.hxx:267
XclExpXmlStyleSheet(const XclExpRoot &rRoot)
Definition: xestyle.cxx:3181
composite key for the find-map, so we can do partial key searching
Definition: xestyle.hxx:688
XclFontData maData
Definition: xestyle.hxx:176
Stores all data of an Excel font and provides export of FONT records.
Definition: xestyle.hxx:155
Represents a default XF record.
Definition: xestyle.hxx:523
sal_uInt32 GetScNumFmt() const
Definition: xestyle.hxx:474
Extends the XclCellBorder struct for export.
Definition: xestyle.hxx:343
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:739
sal_uInt32 mnDiagColorId
Color ID for bottom line.
Definition: xestyle.hxx:349
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:737
const sal_uInt16 EXC_ID_FONTLIST
Definition: xestyle.hxx:39
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:189
bool mbPredefined
Level for RowLevel/ColLevel styles.
Definition: xestyle.hxx:679
XclExpFillList maFills
List of borders used by XF records.
Definition: xestyle.hxx:719
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:425
sal_uInt32 mnHash
Unique color ID for text color.
Definition: xestyle.hxx:178
Stores all used colors in the document.
Definition: xestyle.hxx:76
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:301
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:678
std::unique_ptr< XclExpCellAlign > mpAlign
Definition: xestyle.hxx:735
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:54
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:481
XclExpBorderList maBorders
List of XF records in XF index order.
Definition: xestyle.hxx:718
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:716
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:555
void SaveXml(XclExpXmlStream &rStrm)
Definition: xestyle.cxx:1326
const sal_uInt16 EXC_ID_XFLIST
For internal use only.
Definition: xestyle.hxx:41
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:255
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:543
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:258
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:310
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:717
sal_uInt32 mnRightColorId
Color ID for left line.
Definition: xestyle.hxx:346
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:492
std::unique_ptr< XclExpColor > mpColor
Definition: xestyle.hxx:740
XclExpBuiltInInfo()
true = STYLE record created.
Definition: xestyle.cxx:2346
const XclExpCellAlign & GetAlignmentData() const
Returns the alignment settings of this XF.
Definition: xestyle.hxx:444
std::map< FindKey, std::vector< sal_uInt32 > > maXFFindMap
List of all XF records.
Definition: xestyle.hxx:710
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:536
::std::vector< sal_uInt16 > ScfUInt16Vec
Definition: ftools.hxx:253
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:402
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:412
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:303
XclExpDefaultXF(const XclExpRoot &rRoot, bool bCellXF)
Definition: xestyle.cxx:2225
::std::map< sal_uInt32, XclExpBuiltInInfo > XclExpBuiltInMap
Definition: xestyle.hxx:683
DxfContainer maDxf
Definition: xestyle.hxx:754
Stores the data of all fonts used in the document.
Definition: xestyle.hxx:208
void SaveXml(XclExpXmlStream &rStrm) const
Definition: xestyle.cxx:1972
A combination of unique XF identifier with real Excel XF index.
Definition: xestyle.hxx:410
XclExpCellProt maProtection
Pointer to the item set (we do not own it).
Definition: xestyle.hxx:483
sal_Int32 mnBorderId
Excel number format index.
Definition: xestyle.hxx:491
sal_uInt32 mnBackColorId
Foreground color ID.
Definition: xestyle.hxx:377
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:193
Contains background colors and pattern for a cell.
Definition: xlstyle.hxx:544
Extended info about a built-in XF.
Definition: xestyle.hxx:675
SvNumberFormatterPtr mxFormatter
Definition: xestyle.hxx:299
sal_uInt16 mnXFIndex
Temporary XF identifier.
Definition: xestyle.hxx:413
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:712
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:245
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:53
const sal_uInt16 EXC_ID_FORMATLIST
For internal use only.
Definition: xestyle.hxx:40
bool mbHasStyleRec
true = XF still predefined.
Definition: xestyle.hxx:680
void SaveXmlExt(XclExpXmlStream &rStrm)
Definition: xestyle.cxx:3160
sal_uInt8 mnStyleId
XF identifier for style formatting.
Definition: xestyle.hxx:554
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:55
OUString maName
Definition: xestyle.hxx:552
const SfxItemSet * mpItemSet
Definition: xestyle.hxx:691
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:246
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:143
Text color in a form control.
Definition: xestyle.hxx:56
XclExpCellBorder maBorder
All alignment attributes.
Definition: xestyle.hxx:485
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:736