LibreOffice Module svx (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
SvXMLGraphicHelper Class Referencefinal

#include <xmlgrhlp.hxx>

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

Public Member Functions

 SvXMLGraphicHelper (SvXMLGraphicHelperMode eCreateMode)
 
virtual OUString SAL_CALL resolveGraphicObjectURL (const OUString &aURL) override
 
virtual css::uno::Reference< css::graphic::XGraphic > SAL_CALL loadGraphic (OUString const &aURL) override
 
virtual css::uno::Reference< css::graphic::XGraphic > SAL_CALL loadGraphicFromOutputStream (css::uno::Reference< css::io::XOutputStream > const &rxOutputStream) override
 
virtual OUString SAL_CALL saveGraphic (css::uno::Reference< css::graphic::XGraphic > const &rxGraphic) override
 
virtual OUString SAL_CALL saveGraphicByName (css::uno::Reference< css::graphic::XGraphic > const &rxGraphic, OUString &rOutSavedMimeType, OUString const &rRequestName) override
 
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL createInputStream (css::uno::Reference< css::graphic::XGraphic > const &rxGraphic) override
 
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getInputStream (const OUString &rURL) override
 
virtual css::uno::Reference< css::io::XOutputStream > SAL_CALL createOutputStream () override
 
virtual OUString SAL_CALL resolveOutputStream (const css::uno::Reference< css::io::XOutputStream > &rxBinaryStream) override
 
- Public Member Functions inherited from comphelper::WeakComponentImplHelper< css::document::XGraphicObjectResolver, css::document::XGraphicStorageHandler, css::document::XBinaryStreamResolver >
virtual void SAL_CALL acquire () noexcept override
 
virtual void SAL_CALL release () noexcept override
 
virtual void SAL_CALL dispose () noexcept final override
 
virtual void SAL_CALL addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override
 
virtual void SAL_CALL removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override
 
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () override
 
- Public Member Functions inherited from comphelper::WeakComponentImplHelperBase
virtual ~WeakComponentImplHelperBase () override
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override
 
virtual void SAL_CALL removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override
 
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) override
 
virtual void disposing (std::unique_lock< std::mutex > &)
 
- Public Member Functions inherited from comphelper::UnoImplBase
virtual ~UnoImplBase ()
 

Static Public Member Functions

static rtl::Reference< SvXMLGraphicHelperCreate (const css::uno::Reference< css::embed::XStorage > &rXMLStorage, SvXMLGraphicHelperMode eCreateMode)
 
static rtl::Reference< SvXMLGraphicHelperCreate (SvXMLGraphicHelperMode eCreateMode, const OUString &rMimeType=OUString())
 

Private Member Functions

SVX_DLLPRIVATE css::uno::Reference< css::embed::XStorage > ImplGetGraphicStorage (const OUString &rPictureStorageName)
 
SVX_DLLPRIVATE SvxGraphicHelperStream_Impl ImplGetGraphicStream (const OUString &rPictureStorageName, const OUString &rPictureStreamName)
 
SVX_DLLPRIVATE Graphic ImplReadGraphic (const OUString &rPictureStorageName, const OUString &rPictureStreamName)
 
 SvXMLGraphicHelper ()
 
virtual ~SvXMLGraphicHelper () override
 
void Init (const css::uno::Reference< css::embed::XStorage > &xXMLStorage, SvXMLGraphicHelperMode eCreateMode, const OUString &rGraphicMimeType=OUString())
 
SVX_DLLPRIVATE OUString implSaveGraphic (css::uno::Reference< css::graphic::XGraphic > const &rxGraphic, OUString &rOutMimeType, std::u16string_view rRequestName)
 

Static Private Member Functions

static SVX_DLLPRIVATE bool ImplGetStreamNames (const OUString &rURLStr, OUString &rPictureStorageName, OUString &rPictureStreamName)
 
static SVX_DLLPRIVATE OUString ImplGetGraphicMimeType (std::u16string_view rFileName)
 

Private Attributes

css::uno::Reference< css::embed::XStorage > mxRootStorage
 
OUString maCurStorageName
 
std::vector< css::uno::Reference< css::io::XOutputStream > > maGrfStms
 
std::unordered_map< OUString, css::uno::Reference< css::graphic::XGraphic > > maGraphicObjects
 
std::unordered_map< Graphic, std::pair< OUString, OUString > > maExportGraphics
 
SvXMLGraphicHelperMode meCreateMode
 
OUString maOutputMimeType
 

Additional Inherited Members

- Protected Member Functions inherited from comphelper::WeakComponentImplHelperBase
void throwIfDisposed (std::unique_lock< std::mutex > &)
 
- Protected Attributes inherited from comphelper::WeakComponentImplHelperBase
comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > maEventListeners
 
- Protected Attributes inherited from comphelper::UnoImplBase
std::mutex m_aMutex
 
bool m_bDisposed
 

Detailed Description

Definition at line 48 of file xmlgrhlp.hxx.

Constructor & Destructor Documentation

◆ SvXMLGraphicHelper() [1/2]

SvXMLGraphicHelper::SvXMLGraphicHelper ( )
private

Definition at line 368 of file xmlgrhlp.cxx.

References Read.

Referenced by Create().

◆ ~SvXMLGraphicHelper()

SvXMLGraphicHelper::~SvXMLGraphicHelper ( )
overrideprivatevirtual

Definition at line 373 of file xmlgrhlp.cxx.

◆ SvXMLGraphicHelper() [2/2]

SvXMLGraphicHelper::SvXMLGraphicHelper ( SvXMLGraphicHelperMode  eCreateMode)

Definition at line 363 of file xmlgrhlp.cxx.

References Init().

Member Function Documentation

◆ Create() [1/2]

static rtl::Reference< SvXMLGraphicHelper > SvXMLGraphicHelper::Create ( const css::uno::Reference< css::embed::XStorage > &  rXMLStorage,
SvXMLGraphicHelperMode  eCreateMode 
)
static

◆ Create() [2/2]

rtl::Reference< SvXMLGraphicHelper > SvXMLGraphicHelper::Create ( SvXMLGraphicHelperMode  eCreateMode,
const OUString &  rMimeType = OUString() 
)
static

Definition at line 531 of file xmlgrhlp.cxx.

References SvXMLGraphicHelper().

◆ createInputStream()

uno::Reference< io::XInputStream > SAL_CALL SvXMLGraphicHelper::createInputStream ( css::uno::Reference< css::graphic::XGraphic > const &  rxGraphic)
overridevirtual

◆ createOutputStream()

Reference< XOutputStream > SAL_CALL SvXMLGraphicHelper::createOutputStream ( )
overridevirtual

Definition at line 880 of file xmlgrhlp.cxx.

References maGrfStms, meCreateMode, and Read.

◆ getInputStream()

Reference< XInputStream > SAL_CALL SvXMLGraphicHelper::getInputStream ( const OUString &  rURL)
overridevirtual

Definition at line 874 of file xmlgrhlp.cxx.

◆ ImplGetGraphicMimeType()

OUString SvXMLGraphicHelper::ImplGetGraphicMimeType ( std::u16string_view  rFileName)
staticprivate

◆ ImplGetGraphicStorage()

uno::Reference< embed::XStorage > SvXMLGraphicHelper::ImplGetGraphicStorage ( const OUString &  rPictureStorageName)
private

Definition at line 399 of file xmlgrhlp.cxx.

References maCurStorageName, meCreateMode, mxRootStorage, and Write.

Referenced by ImplGetGraphicStream().

◆ ImplGetGraphicStream()

SvxGraphicHelperStream_Impl SvXMLGraphicHelper::ImplGetGraphicStream ( const OUString &  rPictureStorageName,
const OUString &  rPictureStreamName 
)
private

◆ ImplGetStreamNames()

bool SvXMLGraphicHelper::ImplGetStreamNames ( const OUString &  rURLStr,
OUString &  rPictureStorageName,
OUString &  rPictureStreamName 
)
staticprivate

Definition at line 377 of file xmlgrhlp.cxx.

References SAL_WARN_IF, and SvXMLEmbeddedObjectHelper::splitObjectURL().

Referenced by loadGraphic().

◆ ImplReadGraphic()

Graphic SvXMLGraphicHelper::ImplReadGraphic ( const OUString &  rPictureStorageName,
const OUString &  rPictureStreamName 
)
private

◆ implSaveGraphic()

OUString SvXMLGraphicHelper::implSaveGraphic ( css::uno::Reference< css::graphic::XGraphic > const &  rxGraphic,
OUString &  rOutMimeType,
std::u16string_view  rRequestName 
)
private

◆ Init()

void SvXMLGraphicHelper::Init ( const css::uno::Reference< css::embed::XStorage > &  xXMLStorage,
SvXMLGraphicHelperMode  eCreateMode,
const OUString &  rGraphicMimeType = OUString() 
)
private

Definition at line 513 of file xmlgrhlp.cxx.

References maOutputMimeType, meCreateMode, and mxRootStorage.

Referenced by SvXMLGraphicHelper().

◆ loadGraphic()

uno::Reference< graphic::XGraphic > SAL_CALL SvXMLGraphicHelper::loadGraphic ( OUString const &  aURL)
overridevirtual

◆ loadGraphicFromOutputStream()

uno::Reference< graphic::XGraphic > SAL_CALL SvXMLGraphicHelper::loadGraphicFromOutputStream ( css::uno::Reference< css::io::XOutputStream > const &  rxOutputStream)
overridevirtual

Definition at line 600 of file xmlgrhlp.cxx.

References comphelper::UnoImplBase::m_aMutex, meCreateMode, and Read.

◆ resolveGraphicObjectURL()

OUString SAL_CALL SvXMLGraphicHelper::resolveGraphicObjectURL ( const OUString &  aURL)
overridevirtual

Definition at line 562 of file xmlgrhlp.cxx.

◆ resolveOutputStream()

OUString SAL_CALL SvXMLGraphicHelper::resolveOutputStream ( const css::uno::Reference< css::io::XOutputStream > &  rxBinaryStream)
overridevirtual

◆ saveGraphic()

OUString SAL_CALL SvXMLGraphicHelper::saveGraphic ( css::uno::Reference< css::graphic::XGraphic > const &  rxGraphic)
overridevirtual

Definition at line 624 of file xmlgrhlp.cxx.

References implSaveGraphic().

◆ saveGraphicByName()

OUString SAL_CALL SvXMLGraphicHelper::saveGraphicByName ( css::uno::Reference< css::graphic::XGraphic > const &  rxGraphic,
OUString &  rOutSavedMimeType,
OUString const &  rRequestName 
)
overridevirtual

Definition at line 618 of file xmlgrhlp.cxx.

References implSaveGraphic().

Member Data Documentation

◆ maCurStorageName

OUString SvXMLGraphicHelper::maCurStorageName
private

Definition at line 55 of file xmlgrhlp.hxx.

Referenced by ImplGetGraphicStorage().

◆ maExportGraphics

std::unordered_map<Graphic, std::pair<OUString, OUString> > SvXMLGraphicHelper::maExportGraphics
private

Definition at line 60 of file xmlgrhlp.hxx.

Referenced by implSaveGraphic().

◆ maGraphicObjects

std::unordered_map<OUString, css::uno::Reference<css::graphic::XGraphic> > SvXMLGraphicHelper::maGraphicObjects
private

Definition at line 59 of file xmlgrhlp.hxx.

Referenced by loadGraphic().

◆ maGrfStms

std::vector< css::uno::Reference< css::io::XOutputStream > > SvXMLGraphicHelper::maGrfStms
private

Definition at line 57 of file xmlgrhlp.hxx.

Referenced by createOutputStream(), and resolveOutputStream().

◆ maOutputMimeType

OUString SvXMLGraphicHelper::maOutputMimeType
private

Definition at line 63 of file xmlgrhlp.hxx.

Referenced by createInputStream(), and Init().

◆ meCreateMode

SvXMLGraphicHelperMode SvXMLGraphicHelper::meCreateMode
private

◆ mxRootStorage

css::uno::Reference< css::embed::XStorage > SvXMLGraphicHelper::mxRootStorage
private

Definition at line 54 of file xmlgrhlp.hxx.

Referenced by ImplGetGraphicStorage(), ImplGetGraphicStream(), and Init().


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