109 bool bSkipPoolDefs =
false )
const;
181 sal_uInt16 nFontIdx,
bool bSkipPoolDefs =
false )
const;
186 sal_uInt16 nFontIdx,
const Color* pFontColor =
nullptr )
const;
222 sal_uInt32
GetScFormat( sal_uInt16 nXclNumFmt )
const;
230 bool bSkipPoolDefs =
false )
const;
237 bool bSkipPoolDefs =
false )
const;
275 void FillFromXF8( sal_uInt16 nAlign, sal_uInt16 nMiscAttrib );
277 void FillFromCF( sal_uInt16 nAlign, sal_uInt16 nMiscAttrib );
304 void FillFromXF5( sal_uInt32 nBorder, sal_uInt32 nArea );
306 void FillFromXF8( sal_uInt32 nBorder1, sal_uInt32 nBorder2 );
309 void FillFromCF8( sal_uInt16 nLineStyle, sal_uInt32 nLineColor, sal_uInt32 nFlags );
319 bool bSkipPoolDefs =
false )
const;
342 void FillFromXF8( sal_uInt32 nBorder2, sal_uInt16 nArea );
345 void FillFromCF8( sal_uInt16 nPattern, sal_uInt16 nColor, sal_uInt32 nFlags );
352 bool bSkipPoolDefs =
false )
const;
374 {
return !(rLeft == rRight); }
399 ::std::vector<ScAttrEntry>& rAttrs,
SCROW nRow1,
SCROW nRow2,
400 sal_uInt32 nForceScNumFmt);
496 {
return (nXFIndex >=
maXFList.size()) ?
nullptr :
maXFList.at(nXFIndex).get(); }
499 {
return (nXFIndex >=
maXFList.size()) ?
nullptr :
maXFList.at(nXFIndex).get(); }
547 maXFIndex( rXFIndex )
552 mnScRow1( nFirstScRow ),
553 mnScRow2( nLastScRow ),
554 maXFIndex( rXFIndex )
571 typedef std::vector< std::unique_ptr<XclImpXFRange> >
IndexList;
662 std::vector< std::shared_ptr< XclImpXFRangeColumn > >
664 std::vector< std::pair< XclRange, OUString > >
bool mbCustom
True = builtin style.
void FillFromXF2(sal_uInt8 nFlags)
Fills this struct with BIFF2 XF record data.
XclFontPropSetType
Enumerates different types for objects with font settings (using different property names)...
::std::unique_ptr< ScPatternAttr > ScPatternAttrPtr
ScStyleSheet * CreateStyleSheet(sal_uInt16 nXFIndex)
Creates a cell style sheet of the passed XF and inserts it into the Calc document.
bool Expand(SCROW nScRow, const XclImpXFIndex &rXFIndex)
Returns true, if the range has been expanded.
void GuessScriptType()
Tests whether the font contains CJK or CTL characters.
void ReadXF(XclImpStream &rStrm)
Reads an XF record.
bool mbDiagUsed
true = Bottom line style used.
Represents an XF record index with additional information.
void FillFromCF(sal_uInt16 nAlign, sal_uInt16 nMiscAttrib)
Fills this struct with CF record data.
void ReadFontName8(XclImpStream &rStrm)
Reads and sets a Unicode string as font name.
const XclImpFont * GetFont(sal_uInt16 nXFIndex) const
Returns the Excel font used in the specified XF record.
void Finalize()
Applies styles and cell merging to the current sheet in the document.
void FillFromXF3(sal_uInt16 nArea)
Fills this struct with BIFF3/BIFF4 XF record data.
std::vector< std::unique_ptr< XclImpStyle > > XclImpStyleList
Contains all XF records occurred in the file.
void ReadCFFontBlock(XclImpStream &rStrm)
Reads the font block from a CF (conditional format) record.
XclImpXF(const XclImpXF &)=delete
make noncopyable
bool operator!=(const XclImpXFIndex &rLeft, const XclImpXFIndex &rRight)
SCROW mnScRow2
The first row of an equal-formatted range.
XclFontData maAppFont
List of all FONT records in the Excel file.
Stores all data of an Excel font and provides import of FONT records.
XclImpCellBorder maBorder
All alignment attributes.
Extends the XclCellBorder struct for import.
XclImpFontBuffer(const XclImpFontBuffer &)=delete
delete copy constructor
XclImpXFRangeBuffer(const XclImpXFRangeBuffer &)=delete
make noncopyable
std::vector< std::pair< XclRange, OUString > > maHyperlinks
Array of column XF index buffers.
void SetUsedFlags(bool bOuterUsed, bool bDiagUsed)
Sets outer line states and diagonal line states to used or unused.
const XclImpXFBuffer & operator=(const XclImpXFBuffer &)=delete
void Find(XclImpXFRange *&rpPrevRange, XclImpXFRange *&rpNextRange, sal_uLong &rnNextIndex, SCROW nScRow)
Finds the previous and next row range from row position nScRow.
ScRangeList maMergeList
Maps URLs to hyperlink cells.
bool mbHidden
True = customized builtin style.
std::vector< std::unique_ptr< XclImpXF > > maXFList
IndexList::iterator end()
const XclImpRoot & mrRoot
Colors read from file.
void FillToItemSet(SfxItemSet &rItemSet, bool bSkipPoolDefs=false) const
Inserts items representing this protection style into the item set.
bool mbPattUsed
true = Background color used.
void FillFromXF3(sal_uInt32 nBorder)
Fills this struct with BIFF3/BIFF4 XF record data.
This struct helps reading and writing Excel fonts.
sal_uInt16 mnXclNumFmt
Background area style.
void FillFromXF8(sal_uInt32 nBorder1, sal_uInt32 nBorder2)
Fills this struct with BIFF8 XF record data.
bool HasAsianChars() const
Returns true, if this font contains characters for Asian scripts (CJK).
void Initialize()
Clears all buffered data, used to set up for a new sheet.
sal_uInt16 mnNextXclIdx
Maps Excel format indexes to Calc formats.
Contains the XF indexes for every used cell in a single sheet.
void FillFromXF8(sal_uInt16 nAlign, sal_uInt16 nMiscAttrib)
Fills this struct with BIFF8 XF record data.
bool mbWeightUsed
true = Color used.
Stores all default colors for a specific BIFF version.
sal_uInt16 mnXclFont
Index to number format.
Contains an (encoded) XF index for a range of rows in a single column.
bool HasCharSet() const
Returns true, if the font character set is valid.
Extends the XclCellArea struct for import.
sal_uInt16 mnXfId
Cell style name.
virtual ~XclImpXFRangeBuffer() override
bool mbItalicUsed
true = Underline style used.
ScStyleSheet * mpStyleSheet
Calc item set.
sal_uInt32 GetScFormat(sal_uInt16 nXclNumFmt) const
Returns the format key with the passed Excel index or NUMBERFORMAT_ENTRY_NOT_FOUND on error...
bool HasEscapement() const
Returns true, if the font contains superscript or subscript.
void SetDefaultXF(const XclImpXFIndex &rXFIndex)
Inserts a single row range into the list.
void CreateScFormats()
Creates the number formats in the Calc document.
sal_uInt16 GetXfId() const
const sal_uInt8 EXC_STYLE_USERDEF
"Followed_Hyperlink" style.
void FillToItemSet(SfxItemSet &rItemSet, XclFontItemType eType, bool bSkipPoolDefs=false) const
Fills all font properties to the item set.
void ReadStyle(XclImpStream &rStrm)
Reads a STYLE record.
rtl_TextEncoding GetFontEncoding() const
Returns the text encoding for strings used with this font.
sal_uInt8 mnBuiltinId
Formatting for this cell style.
void FillToItemSet(SfxItemSet &rItemSet, XclFontItemType eType, sal_uInt16 nFontIdx, bool bSkipPoolDefs=false) const
Fills all font properties from a FONT record to the item set.
void ReadFontColor(XclImpStream &rStrm)
Reads and sets the font color.
void SetMerge(SCCOL nScCol1, SCROW nScRow1, SCCOL nScCol2, SCROW nScRow2)
Inserts a complete merged cell range.
void FillFromXF2(sal_uInt8 nFlags)
Fills this struct with BIFF2 XF record data.
XclImpCellProt maProtection
Calc cell style sheet.
const ScPatternAttr & CreatePattern(bool bSkipPoolDefs=false)
Creates a Calc item set containing an item set with all cell properties.
void ApplyPattern(SCCOL nScCol1, SCROW nScRow1, SCCOL nScCol2, SCROW nScRow2, SCTAB nScTab)
Inserts all formatting attributes to the specified area in the Calc document.
::std::map< sal_uInt16, XclImpStyle * > XclImpStyleMap
XclImpFont(const XclImpRoot &rRoot)
ScStyleSheet * CreateStyleSheet()
Creates a cell style sheet and inserts it into the Calc document.
static void ApplyPatternForBiff2CellFormat(const XclImpRoot &rRoot, const ScAddress &rScPos, sal_uInt8 nFlags1, sal_uInt8 nFlags2, sal_uInt8 nFlags3)
Converts formatting information from BIFF2 cell record data directly.
Contains all data of a cell style associated with an XF record.
bool mbHasAsian
true = Font contains Western script characters.
void ReadXF4(XclImpStream &rStrm)
Contains the XF indexes for every used cell in a column.
void FillFromXF8(sal_uInt32 nBorder2, sal_uInt16 nArea)
Fills this struct with BIFF8 XF record data.
bool operator==(const XclImpXFIndex &rLeft, const XclImpXFIndex &rRight)
void SetXF(const ScAddress &rScPos, sal_uInt16 nXFIndex)
Inserts a new XF index.
void FillToItemSet(SfxItemSet &rItemSet, const XclImpPalette &rPalette, bool bSkipPoolDefs=false) const
Inserts a box item representing this border style into the item set.
void ReadStyle(XclImpStream &rStrm)
Reads a STYLE record.
virtual ~XclImpXF() override
void SetHyperlink(const XclRange &rXclRange, const OUString &rUrl)
Inserts a range of hyperlink cells.
const sal_uInt16 EXC_FONTESC_NONE
Extends the XclCellProt struct for import.
sal_uInt16 ReadCFFormat(XclImpStream &rStrm, bool bIFmt)
Read NumFmt from conditional format record.
bool mbOutlineUsed
true = Strikeout used.
XclImpXFBuffer(const XclImpXFBuffer &)=delete
make noncopyable
const XclFontData & GetFontData() const
Returns read-only access to font data.
const XclImpXFRangeBuffer & operator=(const XclImpXFRangeBuffer &)=delete
const XclImpFont * GetFont(sal_uInt16 nFontIndex) const
Returns the object that stores all contents of a FONT record.
Extends the XclCellAlign struct for import.
const XclFontData & GetAppFontData() const
Returns the application font data of this file, needed i.e.
::std::vector< Color > ColorVec
bool mbHasCmplx
true = Font contains Asian script characters.
void ReadXF(XclImpStream &rStrm)
Reads an XF record.
XclFontItemType
Enumerates different types of Which-IDs for font items.
sal_uInt16 mnEscapem
Boldness: 400=normal, 700=bold.
void FillToItemSet(SfxItemSet &rItemSet, const XclImpPalette &rPalette, bool bSkipPoolDefs=false) const
Inserts a brush item representing this area style into the item set.
void FillFromCF8(sal_uInt16 nLineStyle, sal_uInt32 nLineColor, sal_uInt32 nFlags)
Fills this struct with BIFF8 CF (conditional format) record data.
void SetBlankXF(const ScAddress &rScPos, sal_uInt16 nXFIndex)
Inserts a new XF index for blank cells.
XclImpNumFmtBuffer(const XclImpRoot &rRoot)
bool mbUnderlUsed
true = Escapement type used.
Contains all cell protection attributes.
sal_uInt8 GetLevel() const
Contains all cell alignment attributes.
void CreateUserStyles()
Creates all user defined style sheets.
XclImpStyleList maBuiltinStyles
List of contents of all XF record.
void FillToItemSet(SfxItemSet &rItemSet, const XclImpFont *pFont, bool bSkipPoolDefs=false) const
Inserts items representing this alignment style into the item set.
void FillFromXF2(sal_uInt8 nFlags)
Fills this struct with BIFF2 XF record data.
const OUString & GetName() const
sal_uInt8 mnLevel
Identifier for builtin styles.
void FillFromXF5(sal_uInt32 nArea)
Fills this struct with BIFF5/BIFF7 XF record data.
XclImpPalette(const XclImpRoot &rRoot)
void ReadXF3(XclImpStream &rStrm)
void SetAllUsedFlags(bool bUsed)
Sets all font attributes to used or unused.
XclImpXFIndex maXFIndex
The last row of an equal-formatted range.
void WriteFontProperties(ScfPropertySet &rPropSet, XclFontPropSetType eType, sal_uInt16 nFontIdx, const Color *pFontColor=nullptr) const
Writes all font properties to the passed property set.
void ReadFontData2(XclImpStream &rStrm)
Reads and sets height and flags.
void FillScFmtToItemSet(SfxItemSet &rItemSet, sal_uInt32 nScNumFmt, bool bSkipPoolDefs=false) const
Fills a Calc number format to the passed item set.
sal_uInt8 GetHorAlign() const
bool mbBackUsed
true = Foreground color used.
Stores all user defined number formats occurred in the file.
XclImpCellArea maArea
Border line style.
const XclImpXF * GetXF(sal_uInt16 nXFIndex) const
void SetUsedFlags(sal_uInt8 nUsedFlags)
Sets all "attribute used" flags according to the passed mask.
sal_uInt16 GetFontIndex() const
void ReadFontData5(XclImpStream &rStrm)
Reads and sets height, flags, color, boldness, script, family and charset.
void SetXF(SCROW nScRow, const XclImpXFIndex &rXFIndex)
Inserts a new (encoded) XF index (first try to expand the last range).
bool mbFontNameUsed
true = Font contains Complex script characters.
void SetRowDefXF(SCROW nScRow, sal_uInt16 nXFIndex)
Inserts a new XF index for all cells in a row.
void ReadEfont(XclImpStream &rStrm)
Reads an EFONT record (BIFF2 font color).
bool mbBottomUsed
true = Top line style used.
Contains all data of a XF record and a Calc item set.
void ReadXF8(XclImpStream &rStrm)
void ReadFont(XclImpStream &rStrm)
Reads a FONT record for all BIFF versions.
bool HasAnyOuterBorder() const
Returns true, if any of the outer border lines is visible.
void ReadXF2(XclImpStream &rStrm)
void ReadPalette(XclImpStream &rStrm)
Reads a PALETTE record.
XclImpStyleList maUserStyles
List of built-in cell styles.
XclImpCellBorder()
true = Diagonal line style used.
XclImpCellArea()
true = Pattern used.
void FillFromXF3(sal_uInt16 nAlign)
Fills this struct with BIFF3 XF record data.
std::vector< XclImpFont > maFontList
void TryConcatPrev(sal_uLong nIndex)
Tries to concatenate a range with its predecessor.
void CreateUserStyle(const OUString &rFinalName)
Creates the Calc style sheet, if this is a user-defined style.
Color GetColor(sal_uInt16 nXclIndex) const
Returns the color for a (non-zero-based) Excel palette entry.
XclImpXF * GetXF(sal_uInt16 nXFIndex)
Returns the object that stores all contents of an XF record.
void FillToItemSet(SfxItemSet &rItemSet, sal_uInt16 nXclNumFmt, bool bSkipPoolDefs=false) const
Fills an Excel number format to the passed item set.
Contains color and line style for each cell border line.
XclImpFont maFont4
Application font (for column width).
void FillFromXF5(sal_uInt32 nBorder, sal_uInt32 nArea)
Fills this struct with BIFF5/BIFF7 XF record data.
void ReadEfont(XclImpStream &rStrm)
Reads an EFONT record (BIFF2 font color).
void ReadFontName2(XclImpStream &rStrm)
Reads and sets a byte string as font name.
A wrapper for a UNO property set.
const XclImpXFRangeColumn & operator=(const XclImpXFRangeColumn &)=delete
void ReadFormat(XclImpStream &rStrm)
Reads a FORMAT record.
void SetBoolXF(const ScAddress &rScPos, sal_uInt16 nXFIndex)
Inserts a new XF index for boolean cells.
bool mbHasCharSet
All font attributes.
ScPatternAttrPtr mpPattern
void WriteFontProperties(ScfPropertySet &rPropSet, XclFontPropSetType eType, const Color *pFontColor=nullptr) const
Writes all font properties to the passed property set.
bool mbHasWstrn
true = Font contains own character set info.
void ReadFont(XclImpStream &rStrm)
Reads a FONT record.
void UpdateAppFont(const XclFontData &rFontData, bool bHasCharSet)
Updates the application default font.
void FillFromXF5(sal_uInt16 nAlign)
Fills this struct with BIFF5/BIFF7 XF record data.
void ReadXF5(XclImpStream &rStrm)
IndexList::iterator begin()
void FillFromCF8(sal_uInt16 nPattern, sal_uInt16 nColor, sal_uInt32 nFlags)
Fills this struct with BIFF8 CF (conditional format) record data.
bool mbStrikeUsed
true = Italic used.
void SetColumnDefXF(SCCOL nScCol, sal_uInt16 nXFIndex)
Inserts a new XF index for all cells in a column.
XclImpCellAlign maAlignment
Cell protection flags.
bool mbHeightUsed
true = Font name, family, charset used.
bool mbColorUsed
true = Font height used.
XclImpXFRange(SCROW nScRow, const XclImpXFIndex &rXFIndex)
Extended XF index.
bool mbRightUsed
true = Left line style used.
bool mbBoolCell
The XF record index.
void SetUsedFlags(bool bUsed)
Sets colors and pattern state to used or unused.
Stores the data of all fonts occurred in an Excel file.
sal_uInt16 GetFontIndex(sal_uInt16 nXFIndex) const
Returns the index to the Excel font used in the specified XF record.
void Initialize()
Clears all buffered data, used to set up for a new sheet.
Contains background colors and pattern for a cell.
void FillFromXF2(sal_uInt8 nNumFmt)
Fills this struct with BIFF2 XF record data.
Cell with a single Boolean value.
bool mbEscapemUsed
true = Weight used.
bool mbBuiltin
Level for builtin column/row styles.
bool mbTopUsed
true = Right line style used.
Stores the default colors for the current BIFF version and the contents of a PALETTE record...
std::vector< std::unique_ptr< XclImpXFRange > > IndexList
XclImpIndexMap maIndexMap
XclImpFont maCtrlFont
Built-in font with index 4.
OUString maFinalName
True = style not visible in GUI.
sal_uInt16 GetXFIndex() const
void SetFontData(const XclFontData &rFontData, bool bHasCharSet)
Sets the passed font data and all used flags to 'used'.
void ApplyPatternToAttrVector(::std::vector< ScAttrEntry > &rAttrs, SCROW nRow1, SCROW nRow2, sal_uInt32 nForceScNumFmt)
This class is used to import record oriented streams.
void Initialize()
Clears all buffered data, used to set up for a new sheet.
XclImpStyle(const XclImpRoot &rRoot)
const XclImpFontBuffer & operator=(const XclImpFontBuffer &)=delete
delete copy-assignment operator
XclImpStyleMap maStylesByXf
List of user defined cell styles.
void Initialize()
Clears all buffered data, used to set up for a new sheet.
bool Contains(SCROW nScRow) const
Returns true, if nScRow is contained in own row range.
Access to global data from other classes.
::std::map< sal_uInt16, sal_uLong > XclImpIndexMap
sal_uInt8 GetBuiltinId() const
const XclImpXF & operator=(const XclImpXF &)=delete
void Initialize()
Clears all buffered data, used to set up for a new sheet.
Contains base members for XF record import/export.
void Insert(XclImpXFRange *pXFRange, sal_uLong nIndex)
Insert a range into the list at the specified index.
ScStyleSheet * mpStyleSheet
Final name used in the Calc document.
void FillFromXF4(sal_uInt16 nAlign)
Fills this struct with BIFF4 XF record data.
void FillFromXF3(sal_uInt16 nProt)
Fills this struct with BIFF3-BIFF8 XF record data.
XclImpXFInsertMode
Insertion mode of an XF index.
A 2D cell range address struct with Excel column and row indexes.
void WriteDefaultCtrlFontProperties(ScfPropertySet &rPropSet) const
Writes default font properties for form controls to the passed property set.
XclImpXFIndex(sal_uInt16 nXFIndex, bool bBoolCell=false)
bool mbShadowUsed
true = Outlined used.
void SetBorderLine(const ScRange &rRange, SCTAB nScTab, SvxBoxItemLine nLine)
Copies border of the last cell of the range to the first cell to keep it visible when the range is me...
std::vector< std::shared_ptr< XclImpXFRangeColumn > > maColumns