LibreOffice Module sc (master)  1
Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | List of all members
oox::xls::StylesBuffer Class Reference

#include <stylesbuffer.hxx>

Inheritance diagram for oox::xls::StylesBuffer:
[legend]
Collaboration diagram for oox::xls::StylesBuffer:
[legend]

Public Member Functions

 StylesBuffer (const WorkbookHelper &rHelper)
 
FontRef createFont ()
 Creates a new empty font object. More...
 
NumberFormatRef createNumFmt (sal_Int32 nNumFmtId, const OUString &rFmtCode)
 Creates a number format. More...
 
sal_Int32 nextFreeNumFmtId ()
 
BorderRef createBorder ()
 Creates a new empty border object. More...
 
FillRef createFill ()
 Creates a new empty fill object. More...
 
XfRef createCellXf ()
 Creates a new empty cell formatting object. More...
 
XfRef createStyleXf ()
 Creates a new empty style formatting object. More...
 
DxfRef createDxf ()
 Creates a new empty differential formatting object. More...
 
DxfRef createExtDxf ()
 
void importPaletteColor (const AttributeList &rAttribs)
 Appends a new color to the color palette. More...
 
NumberFormatRef importNumFmt (const AttributeList &rAttribs)
 Inserts a new number format code. More...
 
CellStyleRef importCellStyle (const AttributeList &rAttribs)
 Appends and returns a new named cell style object. More...
 
void importPaletteColor (SequenceInputStream &rStrm)
 Appends a new color to the color palette. More...
 
void importNumFmt (SequenceInputStream &rStrm)
 Imports the NUMFMT record from the passed stream. More...
 
void importCellStyle (SequenceInputStream &rStrm)
 Imports the CELLSTYLE record from the passed stream. More...
 
void finalizeImport ()
 Final processing after import of all style settings. More...
 
::Color getPaletteColor (sal_Int32 nIndex) const
 Returns the palette color with the specified index. More...
 
FontRef getFont (sal_Int32 nFontId) const
 Returns the specified font object. More...
 
BorderRef getBorder (sal_Int32 nBorderId) const
 Returns the specified border object. More...
 
XfRef getCellXf (sal_Int32 nXfId) const
 Returns the specified cell format object. More...
 
XfRef getStyleXf (sal_Int32 nXfId) const
 Returns the specified style format object. More...
 
FontRef getFontFromCellXf (sal_Int32 nXfId) const
 Returns the font object of the specified cell XF. More...
 
FontRef getDefaultFont () const
 Returns the default application font (used in the "Normal" cell style). More...
 
const FontModelgetDefaultFontModel () const
 Returns the model of the default application font (used in the "Normal" cell style). More...
 
OUString getDefaultStyleName () const
 Returns the default style sheet for unused cells. More...
 
OUString createCellStyle (sal_Int32 nXfId) const
 Creates the style sheet described by the style XF with the passed identifier. More...
 
::ScStyleSheetgetCellStyleSheet (sal_Int32 nXfId) const
 
OUString createDxfStyle (sal_Int32 nDxfId) const
 Creates the style sheet described by the DXF with the passed identifier. More...
 
OUString createExtDxfStyle (sal_Int32 nDxfId) const
 
void writeFontToItemSet (SfxItemSet &rItemSet, sal_Int32 nFontId, bool bSkipPoolDefs) const
 
sal_uInt32 writeNumFmtToItemSet (SfxItemSet &rItemSet, sal_uInt32 nNumFmtId, bool bSkipPoolDefs) const
 
void writeBorderToItemSet (SfxItemSet &rItemSet, sal_Int32 nBorderId, bool bSkipPoolDefs) const
 Writes the specified number format to the passed property map. More...
 
void writeFillToItemSet (SfxItemSet &rItemSet, sal_Int32 nFillId, bool bSkipPoolDefs) const
 Writes the fill attributes of the specified fill data to the passed property map. More...
 
void writeCellXfToDoc (ScDocumentImport &rDoc, const ScRange &rRange, sal_Int32 nXfId) const
 Writes the cell formatting attributes of the specified XF to the passed property set. More...
 
const RefVector< Dxf > & getExtDxfs () const
 
- Public Member Functions inherited from oox::xls::WorkbookHelper
 WorkbookHelper (WorkbookGlobals &rBookGlob)
 
virtual ~WorkbookHelper ()
 
 WorkbookHelper (WorkbookHelper const &)=default
 
 WorkbookHelper (WorkbookHelper &&)=default
 
WorkbookHelperoperator= (WorkbookHelper const &)=delete
 
WorkbookHelperoperator= (WorkbookHelper &&)=delete
 
::oox::core::FilterBasegetBaseFilter () const
 Returns the base filter object (base class of all filters). More...
 
SegmentProgressBargetProgressBar () const
 Returns the filter progress bar. More...
 
sal_Int16 getCurrentSheetIndex () const
 Returns the index of the current Calc sheet, if filter currently processes a sheet. More...
 
bool isGeneratorKnownGood () const
 Returns true when reading a file generated by a known good generator. More...
 
void setVbaProjectStorage (const StorageRef &rxVbaPrjStrg)
 Sets the VBA project storage used to import VBA source code and forms. More...
 
void setCurrentSheetIndex (SCTAB nSheet)
 Sets the index of the current Calc sheet, if filter currently processes a sheet. More...
 
void finalizeWorkbookImport ()
 Final conversion after importing the workbook. More...
 
void useInternalChartDataTable (bool bInternal)
 
ScDocumentgetScDocument ()
 
const ScDocumentgetScDocument () const
 
ScDocumentImportgetDocImport ()
 
const ScDocumentImportgetDocImport () const
 
ScEditEngineDefaultergetEditEngine () const
 
const css::uno::Reference< css::sheet::XSpreadsheetDocument > & getDocument () const
 Returns a reference to the source/target spreadsheet document model. More...
 
css::uno::Reference< css::sheet::XSpreadsheet > getSheetFromDoc (sal_Int32 nSheet) const
 Returns a reference to the specified spreadsheet in the document model. More...
 
css::uno::Reference< css::sheet::XSpreadsheet > getSheetFromDoc (const OUString &rSheet) const
 Returns a reference to the specified spreadsheet in the document model. More...
 
css::uno::Reference< css::table::XCellRange > getCellRangeFromDoc (const ScRange &rRange) const
 Returns the XCellRange interface for the passed cell range address. More...
 
css::uno::Reference< css::container::XNameContainer > getCellStyleFamily () const
 Returns the cell styles container from the Calc document. More...
 
css::uno::Reference< css::style::XStyle > getStyleObject (const OUString &rStyleName, bool bPageStyle) const
 Returns the specified cell or page style from the Calc document. More...
 
ScRangeDatacreateNamedRangeObject (OUString &orName, const css::uno::Sequence< css::sheet::FormulaToken > &rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags) const
 Creates and returns a defined name on-the-fly in the Calc document. More...
 
ScRangeDatacreateLocalNamedRangeObject (OUString &orName, const css::uno::Sequence< css::sheet::FormulaToken > &rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags, sal_Int32 nTab) const
 Creates and returns a defined name on-the-fly in the sheet. More...
 
css::uno::Reference< css::sheet::XDatabaseRange > createDatabaseRangeObject (OUString &orName, const ScRange &rRangeAddr) const
 Creates and returns a database range on-the-fly in the Calc document. More...
 
css::uno::Reference< css::sheet::XDatabaseRange > createUnnamedDatabaseRangeObject (const ScRange &rRangeAddr) const
 Creates and returns an unnamed database range on-the-fly in the Calc document. More...
 
ScDBDatafindDatabaseRangeByIndex (sal_uInt16 nIndex) const
 Finds the (already existing) database range of the given formula token index. More...
 
css::uno::Reference< css::style::XStyle > createStyleObject (OUString &orStyleName, bool bPageStyle) const
 Creates and returns a com.sun.star.style.Style object for cells or pages. More...
 
FormulaBuffergetFormulaBuffer () const
 
WorkbookSettingsgetWorkbookSettings () const
 Returns the global workbook settings object. More...
 
ViewSettingsgetViewSettings () const
 Returns the workbook and sheet view settings object. More...
 
WorksheetBuffergetWorksheets () const
 Returns the worksheet buffer containing sheet names and properties. More...
 
ThemeBuffergetTheme () const
 Returns the office theme object read from the theme substorage. More...
 
StylesBuffergetStyles () const
 Returns all cell formatting objects read from the styles substream. More...
 
SharedStringsBuffergetSharedStrings () const
 Returns the shared strings read from the shared strings substream. More...
 
ExternalLinkBuffergetExternalLinks () const
 Returns the external links read from the external links substream. More...
 
DefinedNamesBuffergetDefinedNames () const
 Returns the defined names read from the workbook globals. More...
 
TableBuffergetTables () const
 Returns the tables collection (equivalent to Calc's database ranges). More...
 
ScenarioBuffergetScenarios () const
 Returns the scenarios collection. More...
 
ConnectionsBuffergetConnections () const
 Returns the collection of external data connections. More...
 
PivotCacheBuffergetPivotCaches () const
 Returns the collection of pivot caches. More...
 
PivotTableBuffergetPivotTables () const
 Returns the collection of pivot tables. More...
 
FormulaParsergetFormulaParser () const
 Returns a shared import formula parser (import filter only!). More...
 
FormulaParsercreateFormulaParser () const
 Returns an unshared import formula parser (import filter only!). More...
 
UnitConvertergetUnitConverter () const
 Returns the measurement unit converter. More...
 
AddressConvertergetAddressConverter () const
 Returns the converter for string to cell address/range conversion. More...
 
oox::drawingml::chart::ChartConvertergetChartConverter () const
 Returns the chart object converter. More...
 
PageSettingsConvertergetPageSettingsConverter () const
 Returns the page and print settings converter. More...
 
::oox::core::XmlFilterBasegetOoxFilter () const
 Returns the base OOXML/BIFF12 filter object. More...
 
bool importOoxFragment (const rtl::Reference< oox::core::FragmentHandler > &rxHandler)
 Imports a fragment using the passed fragment handler, which contains the full path to the fragment stream. More...
 
bool importOoxFragment (const rtl::Reference< oox::core::FragmentHandler > &rxHandler, oox::core::FastParser &rParser)
 
rtl_TextEncoding getTextEncoding () const
 Returns the text encoding used to import/export byte strings. More...
 

Static Public Member Functions

static bool equalBorders (sal_Int32 nBorderId1, sal_Int32 nBorderId2)
 Returns true, if the specified borders are equal. More...
 
static bool equalFills (sal_Int32 nFillId1, sal_Int32 nFillId2)
 Returns true, if the specified fills are equal. More...
 
- Static Public Member Functions inherited from oox::xls::WorkbookHelper
static WorkbookGlobalsRef constructGlobals (ExcelFilter &rFilter)
 

Private Types

typedef RefVector< FontFontVector
 
typedef RefVector< BorderBorderVector
 
typedef RefVector< FillFillVector
 
typedef RefVector< XfXfVector
 
typedef RefVector< DxfDxfVector
 
typedef ::std::map< sal_Int32, OUString > DxfStyleMap
 

Private Attributes

ColorPalette maPalette
 
FontVector maFonts
 Color palette. More...
 
NumberFormatsBuffer maNumFmts
 List of font objects. More...
 
BorderVector maBorders
 List of all number format codes. More...
 
FillVector maFills
 List of cell border objects. More...
 
XfVector maCellXfs
 List of cell area fill objects. More...
 
XfVector maStyleXfs
 List of cell formats. More...
 
CellStyleBuffer maCellStyles
 List of cell styles. More...
 
DxfVector maDxfs
 All built-in and user defined cell styles. More...
 
DxfVector maExtDxfs
 List of differential cell styles. More...
 
DxfStyleMap maDxfStyles
 List of differential extlst cell styles. More...
 

Detailed Description

Definition at line 785 of file stylesbuffer.hxx.

Member Typedef Documentation

Definition at line 869 of file stylesbuffer.hxx.

typedef ::std::map< sal_Int32, OUString > oox::xls::StylesBuffer::DxfStyleMap
private

Definition at line 873 of file stylesbuffer.hxx.

Definition at line 872 of file stylesbuffer.hxx.

Definition at line 870 of file stylesbuffer.hxx.

Definition at line 868 of file stylesbuffer.hxx.

Definition at line 871 of file stylesbuffer.hxx.

Constructor & Destructor Documentation

oox::xls::StylesBuffer::StylesBuffer ( const WorkbookHelper rHelper)
explicit

Definition at line 2696 of file stylesbuffer.cxx.

References maCellStyles.

Member Function Documentation

BorderRef oox::xls::StylesBuffer::createBorder ( )

Creates a new empty border object.

Definition at line 2721 of file stylesbuffer.cxx.

References maBorders.

Referenced by oox::xls::StylesFragment::onCreateRecordContext().

OUString oox::xls::StylesBuffer::createCellStyle ( sal_Int32  nXfId) const

Creates the style sheet described by the style XF with the passed identifier.

Definition at line 2883 of file stylesbuffer.cxx.

References oox::xls::CellStyleBuffer::createCellStyle(), and maCellStyles.

Referenced by oox::xls::Xf::applyPatternToAttrList(), oox::xls::Xf::createPattern(), and oox::xls::Xf::writeToDoc().

XfRef oox::xls::StylesBuffer::createCellXf ( )

Creates a new empty cell formatting object.

Definition at line 2735 of file stylesbuffer.cxx.

References maCellXfs.

Referenced by oox::xls::StylesFragment::onCreateRecordContext().

DxfRef oox::xls::StylesBuffer::createDxf ( )

Creates a new empty differential formatting object.

Definition at line 2749 of file stylesbuffer.cxx.

References maDxfs.

Referenced by oox::xls::StylesFragment::onCreateRecordContext().

OUString oox::xls::StylesBuffer::createDxfStyle ( sal_Int32  nDxfId) const
DxfRef oox::xls::StylesBuffer::createExtDxf ( )

Definition at line 2756 of file stylesbuffer.cxx.

References maExtDxfs.

OUString oox::xls::StylesBuffer::createExtDxfStyle ( sal_Int32  nDxfId) const
FillRef oox::xls::StylesBuffer::createFill ( )

Creates a new empty fill object.

Definition at line 2728 of file stylesbuffer.cxx.

References maFills.

Referenced by oox::xls::StylesFragment::onCreateRecordContext().

FontRef oox::xls::StylesBuffer::createFont ( )

Creates a new empty font object.

Definition at line 2704 of file stylesbuffer.cxx.

References maFonts.

Referenced by oox::xls::StylesFragment::onCreateRecordContext().

NumberFormatRef oox::xls::StylesBuffer::createNumFmt ( sal_Int32  nNumFmtId,
const OUString &  rFmtCode 
)

Creates a number format.

Definition at line 2711 of file stylesbuffer.cxx.

References oox::xls::NumberFormatsBuffer::createNumFmt(), and maNumFmts.

Referenced by oox::xls::Dxf::importDxf(), and oox::xls::Dxf::importNumFmt().

XfRef oox::xls::StylesBuffer::createStyleXf ( )

Creates a new empty style formatting object.

Definition at line 2742 of file stylesbuffer.cxx.

References maStyleXfs.

Referenced by oox::xls::StylesFragment::onCreateRecordContext().

bool oox::xls::StylesBuffer::equalBorders ( sal_Int32  nBorderId1,
sal_Int32  nBorderId2 
)
static

Returns true, if the specified borders are equal.

Definition at line 2866 of file stylesbuffer.cxx.

Referenced by oox::xls::Xf::createPattern().

bool oox::xls::StylesBuffer::equalFills ( sal_Int32  nFillId1,
sal_Int32  nFillId2 
)
static

Returns true, if the specified fills are equal.

Definition at line 2872 of file stylesbuffer.cxx.

Referenced by oox::xls::Xf::createPattern().

void oox::xls::StylesBuffer::finalizeImport ( )
BorderRef oox::xls::StylesBuffer::getBorder ( sal_Int32  nBorderId) const

Returns the specified border object.

Definition at line 2825 of file stylesbuffer.cxx.

References oox::RefVector< ObjType >::get(), and maBorders.

Referenced by oox::xls::Xf::createPattern().

ScStyleSheet * oox::xls::StylesBuffer::getCellStyleSheet ( sal_Int32  nXfId) const
XfRef oox::xls::StylesBuffer::getCellXf ( sal_Int32  nXfId) const
FontRef oox::xls::StylesBuffer::getDefaultFont ( ) const

Returns the default application font (used in the "Normal" cell style).

Definition at line 2848 of file stylesbuffer.cxx.

References oox::RefVector< ObjType >::get(), oox::xls::CellStyleBuffer::getDefaultXfId(), getStyleXf(), maCellStyles, and maFonts.

Referenced by oox::xls::UnitConverter::finalizeImport(), and getDefaultFontModel().

const FontModel & oox::xls::StylesBuffer::getDefaultFontModel ( ) const
OUString oox::xls::StylesBuffer::getDefaultStyleName ( ) const

Returns the default style sheet for unused cells.

Definition at line 2878 of file stylesbuffer.cxx.

References oox::xls::CellStyleBuffer::getDefaultStyleName(), and maCellStyles.

const RefVector< Dxf >& oox::xls::StylesBuffer::getExtDxfs ( ) const
inline

Definition at line 865 of file stylesbuffer.hxx.

References maExtDxfs.

Referenced by oox::xls::ExtConditionalFormattingContext::onEndElement().

FontRef oox::xls::StylesBuffer::getFont ( sal_Int32  nFontId) const

Returns the specified font object.

Definition at line 2820 of file stylesbuffer.cxx.

References oox::RefVector< ObjType >::get(), and maFonts.

Referenced by oox::xls::RichStringPortion::finalizeImport(), and oox::xls::Xf::getFont().

FontRef oox::xls::StylesBuffer::getFontFromCellXf ( sal_Int32  nXfId) const

Returns the font object of the specified cell XF.

Definition at line 2840 of file stylesbuffer.cxx.

References getCellXf().

Referenced by oox::xls::SheetDataBuffer::setStringCell().

Color oox::xls::StylesBuffer::getPaletteColor ( sal_Int32  nIndex) const

Returns the palette color with the specified index.

Definition at line 2815 of file stylesbuffer.cxx.

References oox::xls::ColorPalette::getColor(), and maPalette.

Referenced by oox::xls::ExcelGraphicHelper::getPaletteColor().

XfRef oox::xls::StylesBuffer::getStyleXf ( sal_Int32  nXfId) const

Returns the specified style format object.

Definition at line 2835 of file stylesbuffer.cxx.

References oox::RefVector< ObjType >::get(), and maStyleXfs.

Referenced by oox::xls::CellStyle::createCellStyle(), oox::xls::Xf::createPattern(), and getDefaultFont().

CellStyleRef oox::xls::StylesBuffer::importCellStyle ( const AttributeList rAttribs)

Appends and returns a new named cell style object.

Definition at line 2773 of file stylesbuffer.cxx.

References oox::xls::CellStyleBuffer::importCellStyle(), and maCellStyles.

Referenced by oox::xls::StylesFragment::onCreateContext(), and oox::xls::StylesFragment::onCreateRecordContext().

void oox::xls::StylesBuffer::importCellStyle ( SequenceInputStream rStrm)

Imports the CELLSTYLE record from the passed stream.

Definition at line 2788 of file stylesbuffer.cxx.

References oox::xls::CellStyleBuffer::importCellStyle(), and maCellStyles.

NumberFormatRef oox::xls::StylesBuffer::importNumFmt ( const AttributeList rAttribs)
void oox::xls::StylesBuffer::importNumFmt ( SequenceInputStream rStrm)

Imports the NUMFMT record from the passed stream.

Definition at line 2783 of file stylesbuffer.cxx.

References oox::xls::NumberFormatsBuffer::importNumFmt(), and maNumFmts.

void oox::xls::StylesBuffer::importPaletteColor ( const AttributeList rAttribs)
void oox::xls::StylesBuffer::importPaletteColor ( SequenceInputStream rStrm)

Appends a new color to the color palette.

Definition at line 2778 of file stylesbuffer.cxx.

References oox::xls::ColorPalette::importPaletteColor(), and maPalette.

sal_Int32 oox::xls::StylesBuffer::nextFreeNumFmtId ( )
void oox::xls::StylesBuffer::writeBorderToItemSet ( SfxItemSet rItemSet,
sal_Int32  nBorderId,
bool  bSkipPoolDefs 
) const

Writes the specified number format to the passed property map.

Definition at line 2961 of file stylesbuffer.cxx.

References oox::RefVector< ObjType >::get(), and maBorders.

Referenced by oox::xls::Xf::createPattern().

void oox::xls::StylesBuffer::writeCellXfToDoc ( ScDocumentImport rDoc,
const ScRange rRange,
sal_Int32  nXfId 
) const

Writes the cell formatting attributes of the specified XF to the passed property set.

Definition at line 3008 of file stylesbuffer.cxx.

References oox::RefVector< ObjType >::get(), maCellXfs, and oox::xls::Xf::writeToDoc().

Referenced by oox::xls::WorksheetGlobals::convertColumnFormat().

void oox::xls::StylesBuffer::writeFillToItemSet ( SfxItemSet rItemSet,
sal_Int32  nFillId,
bool  bSkipPoolDefs 
) const

Writes the fill attributes of the specified fill data to the passed property map.

Definition at line 2967 of file stylesbuffer.cxx.

References oox::RefVector< ObjType >::get(), and maFills.

Referenced by oox::xls::Xf::createPattern().

void oox::xls::StylesBuffer::writeFontToItemSet ( SfxItemSet rItemSet,
sal_Int32  nFontId,
bool  bSkipPoolDefs 
) const

Definition at line 2950 of file stylesbuffer.cxx.

References oox::RefVector< ObjType >::get(), and maFonts.

Referenced by oox::xls::Xf::createPattern().

sal_uInt32 oox::xls::StylesBuffer::writeNumFmtToItemSet ( SfxItemSet rItemSet,
sal_uInt32  nNumFmtId,
bool  bSkipPoolDefs 
) const

Member Data Documentation

BorderVector oox::xls::StylesBuffer::maBorders
private

List of all number format codes.

Definition at line 878 of file stylesbuffer.hxx.

Referenced by createBorder(), finalizeImport(), getBorder(), and writeBorderToItemSet().

CellStyleBuffer oox::xls::StylesBuffer::maCellStyles
private
XfVector oox::xls::StylesBuffer::maCellXfs
private

List of cell area fill objects.

Definition at line 880 of file stylesbuffer.hxx.

Referenced by createCellXf(), finalizeImport(), getCellXf(), and writeCellXfToDoc().

DxfVector oox::xls::StylesBuffer::maDxfs
private

All built-in and user defined cell styles.

Definition at line 883 of file stylesbuffer.hxx.

Referenced by createDxf(), createDxfStyle(), and finalizeImport().

DxfStyleMap oox::xls::StylesBuffer::maDxfStyles
mutableprivate

List of differential extlst cell styles.

Definition at line 885 of file stylesbuffer.hxx.

Referenced by createDxfStyle().

DxfVector oox::xls::StylesBuffer::maExtDxfs
private

List of differential cell styles.

Definition at line 884 of file stylesbuffer.hxx.

Referenced by createExtDxf(), createExtDxfStyle(), and getExtDxfs().

FillVector oox::xls::StylesBuffer::maFills
private

List of cell border objects.

Definition at line 879 of file stylesbuffer.hxx.

Referenced by createFill(), finalizeImport(), and writeFillToItemSet().

FontVector oox::xls::StylesBuffer::maFonts
private

Color palette.

Definition at line 876 of file stylesbuffer.hxx.

Referenced by createFont(), finalizeImport(), getDefaultFont(), getFont(), and writeFontToItemSet().

NumberFormatsBuffer oox::xls::StylesBuffer::maNumFmts
private

List of font objects.

Definition at line 877 of file stylesbuffer.hxx.

Referenced by createNumFmt(), finalizeImport(), importNumFmt(), nextFreeNumFmtId(), and writeNumFmtToItemSet().

ColorPalette oox::xls::StylesBuffer::maPalette
private

Definition at line 875 of file stylesbuffer.hxx.

Referenced by getPaletteColor(), and importPaletteColor().

XfVector oox::xls::StylesBuffer::maStyleXfs
private

List of cell formats.

Definition at line 881 of file stylesbuffer.hxx.

Referenced by createStyleXf(), finalizeImport(), and getStyleXf().


The documentation for this class was generated from the following files: