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

#include <xcl97esc.hxx>

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

Public Member Functions

 XclEscherEx (const XclExpRoot &rRoot, XclExpObjectManager &rObjMgr, SvStream &rStrm, const XclEscherEx *pParent=nullptr)
 
virtual ~XclEscherEx () override
 
sal_uInt32 InitNextDffFragment ()
 Called by MSODRAWING record constructors to initialize the DFF stream fragment they will own. More...
 
void UpdateDffFragmentEnd ()
 Called after some data has been written to the DFF stream, to update the end position of the DFF fragment owned by an MSODRAWING record. More...
 
sal_uInt32 GetDffFragmentPos (sal_uInt32 nFragmentKey)
 Returns the position of the specified DFF stream fragment. More...
 
sal_uInt32 GetDffFragmentSize (sal_uInt32 nFragmentKey)
 Returns the size of the specified DFF stream fragment. More...
 
bool HasPendingDffData ()
 Returns true, if there is more data left in the DFF stream than owned by the last MSODRAWING record. More...
 
XclExpDffAnchorBaseCreateDffAnchor (const SdrObject &rSdrObj) const
 Creates a new DFF client anchor object and calculates the anchor position of the passed object. More...
 
virtual EscherExHostAppDataStartShape (const css::uno::Reference< css::drawing::XShape > &rxShape, const tools::Rectangle *pChildAnchor) override
 
virtual void EndShape (sal_uInt16 nShapeType, sal_uInt32 nShapeID) override
 
virtual EscherExHostAppDataEnterAdditionalTextGroup () override
 
void EndDocument ()
 Flush and merge PicStream into EscherStream. More...
 
std::unique_ptr< XclExpOcxControlObjCreateOCXCtrlObj (css::uno::Reference< css::drawing::XShape > const &xShape, const tools::Rectangle *pChildAnchor)
 Creates an OCX form control OBJ record from the passed form control. More...
 
- Public Member Functions inherited from EscherEx
 EscherEx (const std::shared_ptr< EscherExGlobal > &rxGlobal, SvStream *pOutStrm, bool bOOXML=false)
 
virtual ~EscherEx () override
 
virtual sal_uInt32 GenerateShapeId ()
 
EscherGraphicProviderGetGraphicProvider ()
 
SvStreamQueryPictureStream ()
 
void Flush (SvStream *pPicStreamMergeBSE=nullptr)
 
void InsertAtCurrentPos (sal_uInt32 nBytes)
 
void InsertPersistOffset (sal_uInt32 nKey, sal_uInt32 nOffset)
 
void ReplacePersistOffset (sal_uInt32 nKey, sal_uInt32 nOffset)
 
sal_uInt32 GetPersistOffset (sal_uInt32 nKey)
 
bool SeekToPersistOffset (sal_uInt32 nKey)
 
void InsertAtPersistOffset (sal_uInt32 nKey, sal_uInt32 nValue)
 
void SetEditAs (const OUString &rEditAs)
 
const OUString & GetEditAs () const
 
SvStreamGetStream () const
 
sal_uLong GetStreamPos () const
 
virtual void OpenContainer (sal_uInt16 nEscherContainer, int nRecInstance=0)
 
virtual void CloseContainer ()
 
void BeginAtom ()
 
void EndAtom (sal_uInt16 nRecType, int nRecVersion=0, int nRecInstance=0)
 
void AddAtom (sal_uInt32 nAtomSitze, sal_uInt16 nRecType, int nRecVersion=0, int nRecInstance=0)
 
void AddChildAnchor (const tools::Rectangle &rRectangle)
 
void AddClientAnchor (const tools::Rectangle &rRectangle)
 
virtual sal_uInt32 EnterGroup (const OUString &rShapeName, const tools::Rectangle *pBoundRect)
 
sal_uInt32 EnterGroup (const tools::Rectangle *pBoundRect=nullptr)
 
sal_uInt32 GetGroupLevel () const
 
void SetGroupSnapRect (sal_uInt32 nGroupLevel, const tools::Rectangle &rRect)
 
void SetGroupLogicRect (sal_uInt32 nGroupLevel, const tools::Rectangle &rRect)
 
virtual void LeaveGroup ()
 
virtual void AddShape (sal_uInt32 nShpInstance, ShapeFlag nFlagIds, sal_uInt32 nShapeID=0)
 
virtual void Commit (EscherPropertyContainer &rProps, const tools::Rectangle &rRect)
 
void AddSdrPage (const SdrPage &rPage)
 
void AddUnoShapes (const css::uno::Reference< css::drawing::XShapes > &rxShapes)
 
sal_uInt32 AddSdrObject (const SdrObject &rObj, bool ooxmlExport=false)
 
virtual void AddSdrObjectVMLObject (const SdrObject &)
 
void EndSdrObjectPage ()
 
virtual sal_uInt32 QueryTextID (const css::uno::Reference< css::drawing::XShape > &, sal_uInt32 nShapeId)
 
sal_uInt32 AddDummyShape ()
 
void SetHellLayerId (SdrLayerID nId)
 
SdrLayerID GetHellLayerId () const
 
- Public Member Functions inherited from EscherPersistTable
bool PtIsID (sal_uInt32 nID)
 
void PtInsert (sal_uInt32 nID, sal_uInt32 nOfs)
 
void PtDelete (sal_uInt32 nID)
 
sal_uInt32 PtGetOffsetByID (sal_uInt32 nID)
 
void PtReplace (sal_uInt32 nID, sal_uInt32 nOfs)
 
void PtReplaceOrInsert (sal_uInt32 nID, sal_uInt32 nOfs)
 
 EscherPersistTable ()
 
virtual ~EscherPersistTable ()
 
EscherPersistTableoperator= (EscherPersistTable const &)=delete
 
 EscherPersistTable (EscherPersistTable const &)=delete
 

Private Member Functions

std::unique_ptr< XclExpTbxControlObjCreateTBXCtrlObj (css::uno::Reference< css::drawing::XShape > const &xShape, const tools::Rectangle *pChildAnchor)
 The 'Ctls' stream. More...
 
void ConvertTbxMacro (XclExpTbxControlObj &rTbxCtrlObj, css::uno::Reference< css::awt::XControlModel > const &xCtrlModel)
 Tries to get the name of a Basic macro from a control. More...
 
void DeleteCurrAppData ()
 

Private Attributes

tools::SvRef< SotStorageStreammxCtlsStrm
 
XclExpObjectManagermrObjMgr
 
std::stack< std::pair< XclObj *, std::unique_ptr< XclEscherHostAppData > > > aStack
 
XclObjpCurrXclObj
 
std::unique_ptr< XclEscherHostAppDatapCurrAppData
 
std::unique_ptr< XclEscherClientDatapTheClientData
 
XclEscherClientTextboxpAdditionalText
 
sal_uInt16 nAdditionalText
 
sal_uInt32 mnNextKey
 
bool mbIsRootDff
 

Additional Inherited Members

- Static Public Member Functions inherited from EscherEx
static sal_uInt32 GetColor (const sal_uInt32 nColor)
 
static sal_uInt32 GetColor (const Color &rColor)
 
static const SdrObjectGetSdrObject (const css::uno::Reference< css::drawing::XShape > &rXShape)
 
- Public Attributes inherited from EscherPersistTable
::std::vector< std::unique_ptr< EscherPersistEntry > > maPersistTable
 
- Protected Member Functions inherited from EscherEx
bool DoSeek (sal_uInt32 nKey)
 
- Protected Member Functions inherited from XclExpRoot
 XclExpRoot (XclExpRootData &rExpRootData)
 
const XclExpRootGetRoot () const
 Returns this root instance - for code readability in derived classes. More...
 
bool IsRelUrl () const
 Returns true, if URLs should be stored relative to the document location. More...
 
sc::CompileFormulaContextGetCompileFormulaContext () const
 
XclExpTabInfoGetTabInfo () const
 Returns the buffer for Calc->Excel sheet index conversion. More...
 
XclExpAddressConverterGetAddressConverter () const
 Returns the address converter. More...
 
XclExpFormulaCompilerGetFormulaCompiler () const
 Returns the formula compiler to produce formula token arrays. More...
 
XclExpProgressBarGetProgressBar () const
 Returns the export progress bar. More...
 
XclExpSstGetSst () const
 Returns the shared string table. More...
 
XclExpPaletteGetPalette () const
 Returns the color buffer. More...
 
XclExpFontBufferGetFontBuffer () const
 Returns the font buffer. More...
 
XclExpNumFmtBufferGetNumFmtBuffer () const
 Returns the number format buffer. More...
 
XclExpXFBufferGetXFBuffer () const
 Returns the cell formatting attributes buffer. More...
 
XclExpLinkManagerGetGlobalLinkManager () const
 Returns the global link manager for defined names. More...
 
XclExpLinkManagerGetLocalLinkManager () const
 Returns the local link manager for the current sheet. More...
 
XclExpNameManagerGetNameManager () const
 Returns the buffer that contains internal defined names. More...
 
XclExpObjectManagerGetObjectManager () const
 Returns the drawing object manager. More...
 
XclExpFilterManagerGetFilterManager () const
 Returns the filter manager. More...
 
XclExpPivotTableManagerGetPivotTableManager () const
 Returns the pivot table manager. More...
 
XclExpDxfsGetDxfs () const
 Returns the differential formatting list. More...
 
OStringBuffer & GetStringBuf () const
 Clean and return the OStringBuffer. More...
 
XclExpXmlPivotTableManagerGetXmlPivotTableManager ()
 
XclExpTablesManagerGetTablesManager ()
 
void InitializeConvert ()
 Is called when export filter starts to create the Excel document (all BIFF versions). More...
 
void InitializeGlobals ()
 Is called when export filter starts to create the workbook global data (>=BIFF5). More...
 
void InitializeTable (SCTAB nScTab)
 Is called when export filter starts to create data for a single sheet (all BIFF versions). More...
 
void InitializeSave ()
 Is called before export filter starts to write the records to the stream. More...
 
XclExpRecordRef CreateRecord (sal_uInt16 nRecId) const
 Returns the reference to a record (or record list) representing a root object. More...
 
bool IsDocumentEncrypted () const
 
css::uno::Sequence< css::beans::NamedValue > GetEncryptionData () const
 
- 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...
 
long GetCharWidth () const
 Returns the width of the '0' character (default font) for the current printer (twips). More...
 
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' character (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 XclExpRoot
static css::uno::Sequence< css::beans::NamedValue > GenerateEncryptionData (const OUString &aPass)
 
static css::uno::Sequence< css::beans::NamedValue > GenerateDefaultEncryptionData ()
 
- Static Protected Member Functions inherited from XclRoot
static const OUStringLiteral & GetDefaultPassword ()
 Returns the default password used for stream encryption. More...
 
- Protected Attributes inherited from EscherEx
std::shared_ptr< EscherExGlobalmxGlobal
 
::std::unique_ptr< ImplEESdrWritermpImplEESdrWriter
 
SvStreammpOutStrm
 
bool mbOwnsStrm
 
sal_uInt32 mnStrmStartOfs
 
std::vector< sal_uInt32 > mOffsets
 
std::vector< sal_uInt16 > mRecTypes
 
sal_uInt32 mnCurrentDg
 
sal_uInt32 mnCountOfs
 
sal_uInt32 mnGroupLevel
 
SdrLayerID mnHellLayerId
 
bool mbEscherSpgr
 
bool mbEscherDg
 
bool mbOOXML
 
OUString mEditAs
 

Detailed Description

Definition at line 61 of file xcl97esc.hxx.

Constructor & Destructor Documentation

XclEscherEx::XclEscherEx ( const XclExpRoot rRoot,
XclExpObjectManager rObjMgr,
SvStream rStrm,
const XclEscherEx pParent = nullptr 
)
explicit

Definition at line 88 of file xcl97esc.cxx.

References EscherEx::InsertPersistOffset(), make_shared(), and mnNextKey.

XclEscherEx::~XclEscherEx ( )
overridevirtual

Definition at line 102 of file xcl97esc.cxx.

References aStack, DeleteCurrAppData(), and pTheClientData.

Member Function Documentation

void XclEscherEx::ConvertTbxMacro ( XclExpTbxControlObj rTbxCtrlObj,
css::uno::Reference< css::awt::XControlModel > const &  xCtrlModel 
)
private

Tries to get the name of a Basic macro from a control.

Definition at line 447 of file xcl97esc.cxx.

References Exception, XclRoot::GetCurrScTab(), XclRoot::GetDocShell(), XclRoot::GetSdrPage(), SdrPage::getUnoPage(), and XclExpTbxControlObj::SetMacroLink().

Referenced by CreateTBXCtrlObj().

XclExpDffAnchorBase * XclEscherEx::CreateDffAnchor ( const SdrObject rSdrObj) const

Creates a new DFF client anchor object and calculates the anchor position of the passed object.

Caller takes ownership!

Definition at line 155 of file xcl97esc.cxx.

References XclExpObjectManager::CreateDffAnchor(), mrObjMgr, and XclExpDffAnchorBase::SetSdrObject().

Referenced by XclObj::ImplWriteAnchor().

std::unique_ptr< XclExpOcxControlObj > XclEscherEx::CreateOCXCtrlObj ( css::uno::Reference< css::drawing::XShape > const &  xShape,
const tools::Rectangle pChildAnchor 
)

Creates an OCX form control OBJ record from the passed form control.

Writes the form control data to the 'Ctls' stream.

Definition at line 402 of file xcl97esc.cxx.

References EXC_STREAM_CTLS, XclControlHelper::GetControlModel(), XclRoot::GetDocShell(), tools::SvRef< T >::is(), mrObjMgr, mxCtlsStrm, XclRoot::OpenStream(), oox::ole::MSConvertOCXControls::WriteOCXExcelKludgeStream(), and xModel.

Referenced by StartShape().

std::unique_ptr< XclExpTbxControlObj > XclEscherEx::CreateTBXCtrlObj ( css::uno::Reference< css::drawing::XShape > const &  xShape,
const tools::Rectangle pChildAnchor 
)
private

The 'Ctls' stream.

Creates a TBX form control OBJ record from the passed form control.

Definition at line 432 of file xcl97esc.cxx.

References ConvertTbxMacro(), EXC_OBJTYPE_UNKNOWN, XclControlHelper::GetControlModel(), and mrObjMgr.

Referenced by StartShape().

void XclEscherEx::DeleteCurrAppData ( )
private

Definition at line 499 of file xcl97esc.cxx.

References pCurrAppData.

Referenced by EndShape(), and ~XclEscherEx().

void XclEscherEx::EndDocument ( )

Flush and merge PicStream into EscherStream.

Definition at line 393 of file xcl97esc.cxx.

References EscherEx::Flush(), mbIsRootDff, EscherEx::mpOutStrm, and SvStream::Seek().

void XclEscherEx::EndShape ( sal_uInt16  nShapeType,
sal_uInt32  nShapeID 
)
overridevirtual
EscherExHostAppData * XclEscherEx::EnterAdditionalTextGroup ( )
overridevirtual

Reimplemented from EscherEx.

Definition at line 385 of file xcl97esc.cxx.

References nAdditionalText, pAdditionalText, and pCurrAppData.

sal_uInt32 XclEscherEx::GetDffFragmentPos ( sal_uInt32  nFragmentKey)

Returns the position of the specified DFF stream fragment.

Definition at line 134 of file xcl97esc.cxx.

References EscherEx::GetPersistOffset().

Referenced by GetDffFragmentSize(), HasPendingDffData(), and XclExpMsoDrawingBase::WriteBody().

sal_uInt32 XclEscherEx::GetDffFragmentSize ( sal_uInt32  nFragmentKey)

Returns the size of the specified DFF stream fragment.

Definition at line 141 of file xcl97esc.cxx.

References GetDffFragmentPos().

Referenced by XclExpMsoDrawingBase::WriteBody().

bool XclEscherEx::HasPendingDffData ( )

Returns true, if there is more data left in the DFF stream than owned by the last MSODRAWING record.

Definition at line 148 of file xcl97esc.cxx.

References GetDffFragmentPos(), EscherEx::GetStreamPos(), and mnNextKey.

Referenced by XclExpObjList::EndSheet().

sal_uInt32 XclEscherEx::InitNextDffFragment ( )

Called by MSODRAWING record constructors to initialize the DFF stream fragment they will own.

returns the DFF fragment identifier.

Definition at line 109 of file xcl97esc.cxx.

References EscherEx::InsertPersistOffset(), mnNextKey, EscherEx::mpOutStrm, and SvStream::Tell().

EscherExHostAppData * XclEscherEx::StartShape ( const css::uno::Reference< css::drawing::XShape > &  rxShape,
const tools::Rectangle pChildAnchor 
)
overridevirtual
void XclEscherEx::UpdateDffFragmentEnd ( )

Member Data Documentation

std::stack< std::pair< XclObj*, std::unique_ptr<XclEscherHostAppData> > > XclEscherEx::aStack
private

Definition at line 121 of file xcl97esc.hxx.

Referenced by EndShape(), StartShape(), and ~XclEscherEx().

bool XclEscherEx::mbIsRootDff
private

Definition at line 128 of file xcl97esc.hxx.

Referenced by EndDocument(), and StartShape().

sal_uInt32 XclEscherEx::mnNextKey
private
XclExpObjectManager& XclEscherEx::mrObjMgr
private
tools::SvRef<SotStorageStream> XclEscherEx::mxCtlsStrm
private

Definition at line 105 of file xcl97esc.hxx.

Referenced by CreateOCXCtrlObj().

sal_uInt16 XclEscherEx::nAdditionalText
private

Definition at line 126 of file xcl97esc.hxx.

Referenced by EndShape(), EnterAdditionalTextGroup(), and StartShape().

XclEscherClientTextbox* XclEscherEx::pAdditionalText
private

Definition at line 125 of file xcl97esc.hxx.

Referenced by EnterAdditionalTextGroup(), and StartShape().

std::unique_ptr<XclEscherHostAppData> XclEscherEx::pCurrAppData
private

Definition at line 123 of file xcl97esc.hxx.

Referenced by DeleteCurrAppData(), EndShape(), EnterAdditionalTextGroup(), and StartShape().

XclObj* XclEscherEx::pCurrXclObj
private

Definition at line 122 of file xcl97esc.hxx.

Referenced by EndShape(), and StartShape().

std::unique_ptr<XclEscherClientData> XclEscherEx::pTheClientData
private

Definition at line 124 of file xcl97esc.hxx.

Referenced by StartShape(), and ~XclEscherEx().


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