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

Provides export of hyperlink data. More...

#include <xecontent.hxx>

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

Public Member Functions

 XclExpHyperlink (const XclExpRoot &rRoot, const SvxURLField &rUrlField, const ScAddress &rScPos)
 Constructs the HLINK record from a URL text field. More...
 
virtual ~XclExpHyperlink () override
 
const OUString * GetRepr () const
 Returns the cell representation text or 0, if not available. More...
 
virtual void SaveXml (XclExpXmlStream &rStrm) override
 
void WriteEmbeddedData (XclExpStream &rStrm)
 
- Public Member Functions inherited from XclExpRecord
 XclExpRecord (sal_uInt16 nRecId=EXC_ID_UNKNOWN, std::size_t nRecSize=0)
 
 XclExpRecord (XclExpRecord const &)=default
 
virtual ~XclExpRecord () override
 
sal_uInt16 GetRecId () const
 Returns the current record ID. More...
 
std::size_t GetRecSize () const
 Returns the current record size prediction. More...
 
void SetRecId (sal_uInt16 nRecId)
 Sets a new record ID. More...
 
void SetRecSize (std::size_t nRecSize)
 Sets a new record size prediction. More...
 
void AddRecSize (std::size_t nRecSize)
 Adds a size value to the record size prediction. More...
 
void SetRecHeader (sal_uInt16 nRecId, std::size_t nRecSize)
 Sets record ID and size with one call. More...
 
virtual void Save (XclExpStream &rStrm) override
 Writes the record header and calls WriteBody(). More...
 
- Public Member Functions inherited from XclExpRecordBase
 XclExpRecordBase ()
 
 XclExpRecordBase (XclExpRecordBase const &)
 
 XclExpRecordBase (XclExpRecordBase &&)
 
XclExpRecordBaseoperator= (XclExpRecordBase const &)
 
XclExpRecordBaseoperator= (XclExpRecordBase &&) noexcept
 
virtual ~XclExpRecordBase ()
 
virtual void Save (XclExpStream &rStrm)
 Overwrite this method to do any operation while saving the record. More...
 
virtual void SaveXml (XclExpXmlStream &rStrm)
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Static Public Member Functions

static OUString BuildFileName (sal_uInt16 &rnLevel, bool &rbRel, const OUString &rUrl, const XclExpRoot &rRoot, bool bEncoded)
 Builds file name from the passed file URL. More...
 
- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static void * operator new (std::size_t nSize)
 
static void * operator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 
static void operator delete (void *pPtr)
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 

Private Types

typedef std::unique_ptr< SvStreamSvStreamPtr
 

Private Member Functions

virtual void WriteBody (XclExpStream &rStrm) override
 Writes the body of the HLINK record. More...
 

Private Attributes

ScAddress maScPos
 
OUString m_Repr
 Position of the hyperlink. More...
 
SvStreamPtr mxVarData
 Cell representation text. More...
 
sal_uInt32 mnFlags
 Buffer stream with variable data. More...
 
XclExpStringRef mxTextMark
 Option flags. More...
 
OUString msTarget
 Location within m_Repr. More...
 

Additional Inherited Members

virtual void WriteBody (XclExpStream &rStrm)
 Writes the body of the record (without record header). More...
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

Provides export of hyperlink data.

Definition at line 97 of file xecontent.hxx.

Member Typedef Documentation

◆ SvStreamPtr

typedef std::unique_ptr< SvStream > XclExpHyperlink::SvStreamPtr
private

Definition at line 125 of file xecontent.hxx.

Constructor & Destructor Documentation

◆ XclExpHyperlink()

XclExpHyperlink::XclExpHyperlink ( const XclExpRoot rRoot,
const SvxURLField rUrlField,
const ScAddress rScPos 
)
explicit

◆ ~XclExpHyperlink()

XclExpHyperlink::~XclExpHyperlink ( )
overridevirtual

Definition at line 472 of file xecontent.cxx.

Member Function Documentation

◆ BuildFileName()

OUString XclExpHyperlink::BuildFileName ( sal_uInt16 &  rnLevel,
bool &  rbRel,
const OUString &  rUrl,
const XclExpRoot rRoot,
bool  bEncoded 
)
static

Builds file name from the passed file URL.

Tries to convert to relative file name.

Parameters
rnLevel(out-param) The parent directory level.
rbRel(out-param) true = path is relative.
bEncodedif true return an IURI encoded name, not a DOS name.

Definition at line 476 of file xecontent.cxx.

References XclRoot::GetBasePath(), INetURLObject::getFSysPath(), INetURLObject::GetMainURL(), INetURLObject::GetRelURL(), INET_FILE_SCHEME, XclExpRoot::IsRelUrl(), INetURLObject::ToIUri, INetURLObject::WasEncoded, and INetURLObject::WithCharset.

Referenced by XclExpHyperlink().

◆ GetRepr()

const OUString * XclExpHyperlink::GetRepr ( ) const
inline

Returns the cell representation text or 0, if not available.

Definition at line 106 of file xecontent.hxx.

References m_Repr.

◆ SaveXml()

void XclExpHyperlink::SaveXml ( XclExpXmlStream rStrm)
overridevirtual

◆ WriteBody()

void XclExpHyperlink::WriteBody ( XclExpStream rStrm)
overrideprivatevirtual

Writes the body of the HLINK record.

Reimplemented from XclExpRecord.

Definition at line 515 of file xecontent.cxx.

References ScAddress::Col(), maScPos, ScAddress::Row(), rStrm, and WriteEmbeddedData().

◆ WriteEmbeddedData()

void XclExpHyperlink::WriteEmbeddedData ( XclExpStream rStrm)

Member Data Documentation

◆ m_Repr

OUString XclExpHyperlink::m_Repr
private

Position of the hyperlink.

Definition at line 128 of file xecontent.hxx.

Referenced by GetRepr(), SaveXml(), and XclExpHyperlink().

◆ maScPos

ScAddress XclExpHyperlink::maScPos
private

Definition at line 127 of file xecontent.hxx.

Referenced by SaveXml(), and WriteBody().

◆ mnFlags

sal_uInt32 XclExpHyperlink::mnFlags
private

Buffer stream with variable data.

Definition at line 130 of file xecontent.hxx.

Referenced by WriteEmbeddedData(), and XclExpHyperlink().

◆ msTarget

OUString XclExpHyperlink::msTarget
private

Location within m_Repr.

Definition at line 132 of file xecontent.hxx.

Referenced by SaveXml(), and XclExpHyperlink().

◆ mxTextMark

XclExpStringRef XclExpHyperlink::mxTextMark
private

Option flags.

Definition at line 131 of file xecontent.hxx.

Referenced by SaveXml(), and XclExpHyperlink().

◆ mxVarData

SvStreamPtr XclExpHyperlink::mxVarData
private

Cell representation text.

Definition at line 129 of file xecontent.hxx.

Referenced by WriteEmbeddedData(), and XclExpHyperlink().


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