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

Contains all data of a XF record and a Calc item set. More...

#include <xistyle.hxx>

Inheritance diagram for XclImpXF:
[legend]
Collaboration diagram for XclImpXF:
[legend]

Public Member Functions

 XclImpXF (const XclImpXF &)=delete
 make noncopyable More...
 
const XclImpXFoperator= (const XclImpXF &)=delete
 
 XclImpXF (const XclImpRoot &rRoot)
 
virtual ~XclImpXF () override
 
void ReadXF (XclImpStream &rStrm)
 Reads an XF record. More...
 
bool GetLineBreak () const
 
sal_uInt8 GetHorAlign () const
 
sal_uInt16 GetFontIndex () const
 
const ScPatternAttrCreatePattern (bool bSkipPoolDefs=false)
 Creates a Calc item set containing an item set with all cell properties. More...
 
void ApplyPatternToAttrVector (::std::vector< ScAttrEntry > &rAttrs, SCROW nRow1, SCROW nRow2, sal_uInt32 nForceScNumFmt)
 
void ApplyPattern (SCCOL nScCol1, SCROW nScRow1, SCCOL nScCol2, SCROW nScRow2, SCTAB nScTab)
 Inserts all formatting attributes to the specified area in the Calc document. More...
 
- Public Member Functions inherited from XclXFBase
 XclXFBase (bool bCellXF)
 
virtual ~XclXFBase ()
 
 XclXFBase (XclXFBase const &)=default
 
 XclXFBase (XclXFBase &&)=default
 
XclXFBaseoperator= (XclXFBase const &)=default
 
XclXFBaseoperator= (XclXFBase &&)=default
 
void SetAllUsedFlags (bool bUsed)
 Sets all "attribute used" flags to the passed state. More...
 
bool HasUsedFlags () const
 Returns true, if any "attribute used" flags are ste in this XF. More...
 
bool IsCellXF () const
 Returns true, if this is a hard cell format. More...
 
bool IsStyleXF () const
 Returns true, if this is a cell style. More...
 

Static Public Member Functions

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. More...
 

Private Types

typedef ::std::unique_ptr< ScPatternAttrScPatternAttrPtr
 

Private Member Functions

void ReadXF2 (XclImpStream &rStrm)
 
void ReadXF3 (XclImpStream &rStrm)
 
void ReadXF4 (XclImpStream &rStrm)
 
void ReadXF5 (XclImpStream &rStrm)
 
void ReadXF8 (XclImpStream &rStrm)
 
void SetUsedFlags (sal_uInt8 nUsedFlags)
 Sets all "attribute used" flags according to the passed mask. More...
 

Private Attributes

ScPatternAttrPtr mpPattern
 
ScStyleSheetmpStyleSheet
 Calc item set. More...
 
XclImpCellProt maProtection
 Calc cell style sheet. More...
 
XclImpCellAlign maAlignment
 Cell protection flags. More...
 
XclImpCellBorder maBorder
 All alignment attributes. More...
 
XclImpCellArea maArea
 Border line style. More...
 
sal_uInt16 mnXclNumFmt
 Background area style. More...
 
sal_uInt16 mnXclFont
 Index to number format. More...
 

Additional Inherited Members

- Protected Member Functions inherited from XclXFBase
bool Equals (const XclXFBase &rCmp) const
 Returns true, if this object is equal to the passed. More...
 
- Protected Member Functions inherited from XclImpRoot
 XclImpRoot (XclImpRootData &rImpRootData)
 
const XclImpRootGetRoot () const
 Returns this root instance - for code readability in derived classes. More...
 
XclImpRootGetRoot ()
 
void SetCodePage (sal_uInt16 nCodePage)
 Sets a code page read from a CODEPAGE record for byte string import. More...
 
void InitializeTable (SCTAB nScTab)
 Is called when import filter starts importing a single sheet (all BIFF versions). More...
 
void FinalizeTable ()
 Is called when import filter stops importing a single sheet (all BIFF versions). More...
 
XclImpAddressConverterGetAddressConverter () const
 Returns the address converter. More...
 
XclImpFormulaCompilerGetFormulaCompiler () const
 Returns the formula converter. More...
 
ExcelToScGetOldFmlaConverter () const
 Returns the old formula converter. More...
 
XclImpSstGetSst () const
 Returns the shared string table. More...
 
XclImpPaletteGetPalette () const
 Returns the color buffer. More...
 
XclImpFontBufferGetFontBuffer () const
 Returns the font buffer. More...
 
XclImpNumFmtBufferGetNumFmtBuffer () const
 Returns the number format buffer. More...
 
XclImpXFBufferGetXFBuffer () const
 Returns the cell formatting attributes buffer. More...
 
XclImpXFRangeBufferGetXFRangeBuffer () const
 Returns the buffer of XF index ranges for a sheet. More...
 
ScRangeListTabsGetPrintAreaBuffer () const
 Returns the buffer that contains all print areas in the document. More...
 
ScRangeListTabsGetTitleAreaBuffer () const
 Returns the buffer that contains all print titles in the document. More...
 
XclImpTabInfoGetTabInfo () const
 Returns the buffer that contains the sheet creation order. More...
 
XclImpNameManagerGetNameManager () const
 Returns the buffer that contains internal defined names. More...
 
XclImpLinkManagerGetLinkManager () const
 Returns the link manager. More...
 
XclImpObjectManagerGetObjectManager () const
 Returns the drawing object manager. More...
 
XclImpSheetDrawingGetCurrSheetDrawing () const
 Returns the drawing container of the current sheet. More...
 
XclImpCondFormatManagerGetCondFormatManager () const
 Returns the conditional formatting manager. More...
 
XclImpValidationManagerGetValidationManager () const
 
XclImpAutoFilterBufferGetFilterManager () const
 Returns the filter manager. More...
 
XclImpWebQueryBufferGetWebQueryBuffer () const
 Returns the web query buffer. More...
 
XclImpPivotTableManagerGetPivotTableManager () const
 Returns the pivot table manager. More...
 
XclImpSheetProtectBufferGetSheetProtectBuffer () const
 Returns the sheet protection options of the current sheet. More...
 
XclImpDocProtectBufferGetDocProtectBuffer () const
 Returns the document protection options. More...
 
XclImpPageSettingsGetPageSettings () const
 Returns the page settings of the current sheet. More...
 
XclImpDocViewSettingsGetDocViewSettings () const
 Returns the view settings of the entire document. More...
 
XclImpTabViewSettingsGetTabViewSettings () const
 Returns the view settings of the current sheet. More...
 
bool HasBasic () const
 Returns true, if the document contains a VB project. More...
 
void SetHasBasic ()
 Called to indicate that the document contains a VB project. More...
 
void ReadCodeName (XclImpStream &rStrm, bool bGlobals)
 Reads the CODENAME record and inserts the codename into the document. More...
 
ScDocumentImportGetDocImport ()
 
- Protected Member Functions inherited from XclRoot
 XclRoot (XclRootData &rRootData)
 
 XclRoot (const XclRoot &rRoot)
 
virtual ~XclRoot ()
 
XclRootoperator= (const XclRoot &rRoot)
 
RootDataGetOldRoot () const
 Returns old RootData struct. More...
 
XclBiff GetBiff () const
 Returns the current BIFF version of the importer/exporter. More...
 
XclOutput GetOutput () const
 Returns the current output format of the importer/exporter. More...
 
bool IsImport () const
 Returns true, if currently a document is imported. More...
 
rtl_TextEncoding GetTextEncoding () const
 Returns the text encoding to import/export byte strings. More...
 
LanguageType GetSysLanguage () const
 Returns the system language, i.e. More...
 
LanguageType GetDocLanguage () const
 Returns the document language. More...
 
LanguageType GetUILanguage () const
 Returns the UI language. More...
 
sal_Int16 GetDefApiScript () const
 Returns the default script type, e.g. More...
 
tools::Long GetCharWidth () const
 Returns the width of the '0' character (default font) for the current printer (twips). More...
 
tools::Long GetSpaceWidth () const
 
bool IsInGlobals () const
 Returns the current Calc sheet index. More...
 
SCTAB GetCurrScTab () const
 Returns the current Calc sheet index. More...
 
sal_Int32 GetHmmFromPixelX (double fPixelX) const
 Calculates the width of the passed number of pixels in 1/100 mm. More...
 
sal_Int32 GetHmmFromPixelY (double fPixelY) const
 Calculates the height of the passed number of pixels in 1/100 mm. More...
 
SfxMediumGetMedium () const
 Returns the medium to import from. More...
 
const OUString & GetDocUrl () const
 Returns the document URL of the imported/exported file. More...
 
const OUString & GetBasePath () const
 Returns the base path of the imported/exported file. More...
 
const OUString & GetUserName () const
 Returns the current user name. More...
 
css::uno::Sequence< css::beans::NamedValue > RequestEncryptionData (::comphelper::IDocPasswordVerifier &rVerifier) const
 Requests and verifies a password from the medium or the user. More...
 
const tools::SvRef< SotStorage > & GetRootStorage () const
 Returns the OLE2 root storage of the imported/exported file. More...
 
bool HasVbaStorage () const
 Returns true, if the document contains a VBA storage. More...
 
tools::SvRef< SotStorageOpenStorage (tools::SvRef< SotStorage > const &xStrg, const OUString &rStrgName) const
 Tries to open a storage as child of the specified storage for reading or writing. More...
 
tools::SvRef< SotStorageOpenStorage (const OUString &rStrgName) const
 Tries to open a storage as child of the root storage for reading or writing. More...
 
tools::SvRef< SotStorageStreamOpenStream (tools::SvRef< SotStorage > const &xStrg, const OUString &rStrmName) const
 Tries to open a new stream in the specified storage for reading or writing. More...
 
tools::SvRef< SotStorageStreamOpenStream (const OUString &rStrmName) const
 Tries to open a new stream in the root storage for reading or writing. More...
 
ScDocumentGetDoc () const
 Returns reference to the destination document (import) or source document (export). More...
 
SfxObjectShellGetDocShell () const
 Returns the object shell of the Calc document. More...
 
ScModelObjGetDocModelObj () const
 Returns the object model of the Calc document. More...
 
OutputDeviceGetPrinter () const
 Returns pointer to the printer of the Calc document. More...
 
ScStyleSheetPoolGetStyleSheetPool () const
 Returns the style sheet pool of the Calc document. More...
 
ScRangeNameGetNamedRanges () const
 Returns the defined names container of the Calc document. More...
 
SdrPageGetSdrPage (SCTAB nScTab) const
 Returns the drawing layer page of the passed sheet, if present. More...
 
SvNumberFormatterGetFormatter () const
 Returns the number formatter of the Calc document. More...
 
DateTime GetNullDate () const
 Returns the null date of the current number formatter. More...
 
sal_uInt16 GetBaseYear () const
 Returns the base year depending on the current null date (1900 or 1904). More...
 
double GetDoubleFromDateTime (const DateTime &rDateTime) const
 Converts a date/time value to a floating-point value. More...
 
DateTime GetDateTimeFromDouble (double fValue) const
 Converts a floating-point value to a date/time value. More...
 
ScEditEngineDefaulterGetEditEngine () const
 Returns the edit engine for import/export of rich strings etc. More...
 
ScHeaderEditEngineGetHFEditEngine () const
 Returns the edit engine for import/export of headers/footers. More...
 
EditEngineGetDrawEditEngine () const
 Returns the edit engine for import/export of drawing text boxes. More...
 
XclFontPropSetHelperGetFontPropSetHelper () const
 Returns the property set helper for fonts. More...
 
XclChPropSetHelperGetChartPropSetHelper () const
 Returns the property set helper for the chart filters. More...
 
ScExtDocOptionsGetExtDocOptions () const
 Returns the extended document options. More...
 
XclTracerGetTracer () const
 Returns the filter tracer. More...
 
const ScAddressGetScMaxPos () const
 Returns the highest possible cell address in a Calc document. More...
 
const ScAddressGetXclMaxPos () const
 Returns the highest possible cell address in an Excel document (using current BIFF version). More...
 
const ScAddressGetMaxPos () const
 Returns the highest possible cell address valid in Calc and Excel (using current BIFF version). More...
 
void SetDocLanguage (LanguageType eLang)
 Sets the document language. More...
 
void SetUILanguage (LanguageType eLang)
 Sets the UI language, i.e. More...
 
void SetTextEncoding (rtl_TextEncoding eTextEnc)
 Sets the text encoding to import/export byte strings. More...
 
void SetCharWidth (const XclFontData &rFontData)
 Sets the width of the '0' - '9' digit character as well as the ' ' space char (using the default font) for the current printer (twips). More...
 
void SetCurrScTab (SCTAB nScTab)
 Sets the current Calc sheet index. More...
 
void IncCurrScTab ()
 Increases the current Calc sheet index by 1. More...
 
- Static Protected Member Functions inherited from XclImpRoot
static OUString GetScAddInName (const OUString &rXclName)
 Returns the Calc add-in function name for an Excel function name. More...
 
- Static Protected Member Functions inherited from XclRoot
static OUString GetDefaultPassword ()
 Returns the default password used for stream encryption. More...
 
- Protected Attributes inherited from XclXFBase
sal_uInt16 mnParent
 
bool mbCellXF
 Index to parent style XF. More...
 
bool mbProtUsed
 true = cell XF, false = style XF. More...
 
bool mbFontUsed
 true = cell protection used. More...
 
bool mbFmtUsed
 true = font index used. More...
 
bool mbAlignUsed
 true = number format used. More...
 
bool mbBorderUsed
 true = alignment used. More...
 
bool mbAreaUsed
 true = border data used. More...
 

Detailed Description

Contains all data of a XF record and a Calc item set.

Definition at line 377 of file xistyle.hxx.

Member Typedef Documentation

◆ ScPatternAttrPtr

typedef ::std::unique_ptr< ScPatternAttr > XclImpXF::ScPatternAttrPtr
private

Definition at line 429 of file xistyle.hxx.

Constructor & Destructor Documentation

◆ XclImpXF() [1/2]

XclImpXF::XclImpXF ( const XclImpXF )
delete

make noncopyable

◆ XclImpXF() [2/2]

XclImpXF::XclImpXF ( const XclImpRoot rRoot)
explicit

Definition at line 1099 of file xistyle.cxx.

◆ ~XclImpXF()

XclImpXF::~XclImpXF ( )
overridevirtual

Definition at line 1108 of file xistyle.cxx.

Member Function Documentation

◆ ApplyPattern()

void XclImpXF::ApplyPattern ( SCCOL  nScCol1,
SCROW  nScRow1,
SCCOL  nScCol2,
SCROW  nScRow2,
SCTAB  nScTab 
)

Inserts all formatting attributes to the specified area in the Calc document.

Parameters
nForcedNumFmtIf not set to NUMBERFORMAT_ENTRY_NOT_FOUND, it will overwrite the number format of the XF.

Definition at line 1411 of file xistyle.cxx.

References ScDocument::ApplyPatternAreaTab(), ScDocument::ApplyStyleAreaTab(), CreatePattern(), XclRoot::GetDoc(), XclXFBase::HasUsedFlags(), XclXFBase::IsCellXF(), and mpStyleSheet.

Referenced by ApplyPatternForBiff2CellFormat().

◆ ApplyPatternForBiff2CellFormat()

void XclImpXF::ApplyPatternForBiff2CellFormat ( const XclImpRoot rRoot,
const ScAddress rScPos,
sal_uInt8  nFlags1,
sal_uInt8  nFlags2,
sal_uInt8  nFlags3 
)
static

◆ ApplyPatternToAttrVector()

void XclImpXF::ApplyPatternToAttrVector ( ::std::vector< ScAttrEntry > &  rAttrs,
SCROW  nRow1,
SCROW  nRow2,
sal_uInt32  nForceScNumFmt 
)

◆ CreatePattern()

const ScPatternAttr & XclImpXF::CreatePattern ( bool  bSkipPoolDefs = false)

Creates a Calc item set containing an item set with all cell properties.

Parameters
bSkipPoolDefstrue = Do not put items equal to pool default; false = Put all items.
Returns
A read-only reference to the item set stored internally.

Definition at line 1245 of file xistyle.cxx.

References ATTR_MARGIN(), ATTR_ROTATE_MODE(), Cell, XclImpXFBuffer::CreateStyleSheet(), EXC_LINE_HAIR, EXC_PATT_NONE, EXC_PATT_SOLID, XclImpCellProt::FillToItemSet(), XclImpCellAlign::FillToItemSet(), XclImpCellBorder::FillToItemSet(), XclImpCellArea::FillToItemSet(), XclImpNumFmtBuffer::FillToItemSet(), XclImpFontBuffer::FillToItemSet(), XclRoot::GetDoc(), GetFont(), XclImpRoot::GetFontBuffer(), XclImpRoot::GetNumFmtBuffer(), XclImpRoot::GetPalette(), XclRoot::GetTracer(), XclImpXFBuffer::GetXF(), XclImpRoot::GetXFBuffer(), XclImpCellBorder::HasAnyOuterBorder(), XclXFBase::IsCellXF(), maAlignment, maArea, maBorder, maProtection, XclXFBase::mbAlignUsed, XclXFBase::mbAreaUsed, XclXFBase::mbBorderUsed, XclXFBase::mbFmtUsed, XclXFBase::mbFontUsed, XclXFBase::mbProtUsed, XclCellBorder::mnBottomLine, XclCellBorder::mnLeftLine, XclXFBase::mnParent, XclCellArea::mnPattern, XclCellBorder::mnRightLine, XclCellAlign::mnRotation, XclCellBorder::mnTopLine, mnXclFont, mnXclNumFmt, mpPattern, mpStyleSheet, ScfTools::PutItem(), SVX_ROTATE_MODE_BOTTOM, SVX_ROTATE_MODE_STANDARD, XclTracer::TraceBorderLineStyle(), XclTracer::TraceDates(), and XclTracer::TraceFillPattern().

Referenced by ApplyPattern(), ApplyPatternToAttrVector(), and XclImpStyle::CreateStyleSheet().

◆ GetFontIndex()

sal_uInt16 XclImpXF::GetFontIndex ( ) const
inline

Definition at line 392 of file xistyle.hxx.

References mnXclFont.

Referenced by XclImpXFBuffer::GetFontIndex().

◆ GetHorAlign()

sal_uInt8 XclImpXF::GetHorAlign ( ) const
inline

Definition at line 391 of file xistyle.hxx.

References maAlignment, and XclCellAlign::mnHorAlign.

Referenced by XclImpXFRangeBuffer::SetXF().

◆ GetLineBreak()

bool XclImpXF::GetLineBreak ( ) const
inline

Definition at line 390 of file xistyle.hxx.

References maAlignment, and XclCellAlign::mbLineBreak.

Referenced by XclImpStringHelper::SetToDocument().

◆ operator=()

const XclImpXF & XclImpXF::operator= ( const XclImpXF )
delete

◆ ReadXF()

void XclImpXF::ReadXF ( XclImpStream rStrm)

◆ ReadXF2()

void XclImpXF::ReadXF2 ( XclImpStream rStrm)
private

◆ ReadXF3()

void XclImpXF::ReadXF3 ( XclImpStream rStrm)
private

◆ ReadXF4()

void XclImpXF::ReadXF4 ( XclImpStream rStrm)
private

◆ ReadXF5()

void XclImpXF::ReadXF5 ( XclImpStream rStrm)
private

◆ ReadXF8()

void XclImpXF::ReadXF8 ( XclImpStream rStrm)
private

◆ SetUsedFlags()

void XclImpXF::SetUsedFlags ( sal_uInt8  nUsedFlags)
private

Sets all "attribute used" flags according to the passed mask.

@descr In cell XFs, a set bit represents "used", in style XFs it is a cleared bit. Therefore mbCellXF must be set correctly before calling this method.

Definition at line 1449 of file xistyle.cxx.

References EXC_XF_DIFF_ALIGN, EXC_XF_DIFF_AREA, EXC_XF_DIFF_BORDER, EXC_XF_DIFF_FONT, EXC_XF_DIFF_PROT, EXC_XF_DIFF_VALFMT, get_flag(), XclXFBase::mbAlignUsed, XclXFBase::mbAreaUsed, XclXFBase::mbBorderUsed, XclXFBase::mbCellXF, XclXFBase::mbFmtUsed, XclXFBase::mbFontUsed, and XclXFBase::mbProtUsed.

Referenced by ReadXF3(), ReadXF4(), ReadXF5(), and ReadXF8().

Member Data Documentation

◆ maAlignment

XclImpCellAlign XclImpXF::maAlignment
private

◆ maArea

XclImpCellArea XclImpXF::maArea
private

Border line style.

Definition at line 437 of file xistyle.hxx.

Referenced by ApplyPatternForBiff2CellFormat(), CreatePattern(), ReadXF2(), ReadXF3(), ReadXF4(), ReadXF5(), and ReadXF8().

◆ maBorder

XclImpCellBorder XclImpXF::maBorder
private

All alignment attributes.

Definition at line 436 of file xistyle.hxx.

Referenced by ApplyPatternForBiff2CellFormat(), CreatePattern(), ReadXF2(), ReadXF3(), ReadXF4(), ReadXF5(), and ReadXF8().

◆ maProtection

XclImpCellProt XclImpXF::maProtection
private

Calc cell style sheet.

Definition at line 434 of file xistyle.hxx.

Referenced by ApplyPatternForBiff2CellFormat(), CreatePattern(), ReadXF2(), ReadXF3(), ReadXF4(), ReadXF5(), and ReadXF8().

◆ mnXclFont

sal_uInt16 XclImpXF::mnXclFont
private

Index to number format.

Definition at line 439 of file xistyle.hxx.

Referenced by ApplyPatternForBiff2CellFormat(), CreatePattern(), GetFontIndex(), ReadXF2(), ReadXF3(), ReadXF4(), ReadXF5(), and ReadXF8().

◆ mnXclNumFmt

sal_uInt16 XclImpXF::mnXclNumFmt
private

Background area style.

Definition at line 438 of file xistyle.hxx.

Referenced by ApplyPatternForBiff2CellFormat(), CreatePattern(), ReadXF2(), ReadXF3(), ReadXF4(), ReadXF5(), and ReadXF8().

◆ mpPattern

ScPatternAttrPtr XclImpXF::mpPattern
private

Definition at line 431 of file xistyle.hxx.

Referenced by ApplyPatternToAttrVector(), and CreatePattern().

◆ mpStyleSheet

ScStyleSheet* XclImpXF::mpStyleSheet
private

Calc item set.

Definition at line 432 of file xistyle.hxx.

Referenced by ApplyPattern(), ApplyPatternToAttrVector(), and CreatePattern().


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