LibreOffice Module sc (master) 1
|
Provides export of hyperlink data. More...
#include <xecontent.hxx>
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 &&) | |
XclExpRecordBase & | operator= (XclExpRecordBase const &) |
XclExpRecordBase & | operator= (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< SvStream > | SvStreamPtr |
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 |
Provides export of hyperlink data.
Definition at line 97 of file xecontent.hxx.
|
private |
Definition at line 125 of file xecontent.hxx.
|
explicit |
Constructs the HLINK record from a URL text field.
Definition at line 329 of file xecontent.cxx.
References BuildFileName(), EXC_HLINK_ABS, EXC_HLINK_BODY, EXC_HLINK_DESCR, EXC_HLINK_MARK, EXC_OUTPUT_XML_2007, ForceUnicode, XclExpString::GetBufferSize(), XclRoot::GetDoc(), INetURLObject::GetMainURL(), INetURLObject::GetMark(), XclRoot::GetOutput(), INetURLObject::GetProtocol(), SvxURLField::GetRepresentation(), ScDocument::GetTable(), XclRoot::GetTextEncoding(), SvxURLField::GetURL(), INetURLObject::GetURLNoMark(), INetURLObject::HasMark(), i, XclExpString::Len(), m_Repr, XclTools::maGuidFileMoniker, XclTools::maGuidUrlMoniker, mnFlags, msTarget, mxTextMark, mxVarData, INetURLObject::NONE, OUStringToOString(), XclExpRecord::SetRecSize(), XclXmlUtils::ToOUString(), u, XclExpStream::Write(), XclExpString::WriteBuffer(), and XclExpStream::WriteZeroBytes().
|
overridevirtual |
Definition at line 472 of file xecontent.cxx.
|
static |
Builds file name from the passed file URL.
Tries to convert to relative file name.
rnLevel | (out-param) The parent directory level. |
rbRel | (out-param) true = path is relative. |
bEncoded | if 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().
|
inline |
Returns the cell representation text or 0, if not available.
Definition at line 106 of file xecontent.hxx.
References m_Repr.
|
overridevirtual |
Reimplemented from XclExpRecordBase.
Definition at line 533 of file xecontent.cxx.
References FSNS(), oox::getRelationship(), m_Repr, maScPos, msTarget, mxTextMark, rStrm, sId, XclXmlUtils::ToOString(), and sax_fastparser::UseIf().
|
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().
void XclExpHyperlink::WriteEmbeddedData | ( | XclExpStream & | rStrm | ) |
Definition at line 523 of file xecontent.cxx.
References XclTools::maGuidStdLink, mnFlags, mxVarData, rStrm, and STREAM_SEEK_TO_BEGIN.
Referenced by ShapeInteractionHelper::PopulateShapeInteractionInfo(), and WriteBody().
|
private |
Position of the hyperlink.
Definition at line 128 of file xecontent.hxx.
Referenced by GetRepr(), SaveXml(), and XclExpHyperlink().
|
private |
Definition at line 127 of file xecontent.hxx.
Referenced by SaveXml(), and WriteBody().
|
private |
Buffer stream with variable data.
Definition at line 130 of file xecontent.hxx.
Referenced by WriteEmbeddedData(), and XclExpHyperlink().
|
private |
Location within m_Repr.
Definition at line 132 of file xecontent.hxx.
Referenced by SaveXml(), and XclExpHyperlink().
|
private |
Option flags.
Definition at line 131 of file xecontent.hxx.
Referenced by SaveXml(), and XclExpHyperlink().
|
private |
Cell representation text.
Definition at line 129 of file xecontent.hxx.
Referenced by WriteEmbeddedData(), and XclExpHyperlink().