LibreOffice Module comphelper (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
comphelper::EmbeddedObjectContainer Class Reference

#include <embeddedobjectcontainer.hxx>

Public Member Functions

bool StoreEmbeddedObject (const css::uno::Reference< css::embed::XEmbeddedObject > &xObj, OUString &rName, bool bCopy, const OUString &rSrcShellID, const OUString &rDestShellID)
 
void AddEmbeddedObject (const css::uno::Reference< css::embed::XEmbeddedObject > &, const OUString &)
 
 EmbeddedObjectContainer ()
 
 EmbeddedObjectContainer (const css::uno::Reference< css::embed::XStorage > &)
 
 EmbeddedObjectContainer (const css::uno::Reference< css::embed::XStorage > &, const css::uno::Reference< css::uno::XInterface > &)
 
 ~EmbeddedObjectContainer ()
 
void SwitchPersistence (const css::uno::Reference< css::embed::XStorage > &)
 
bool CommitImageSubStorage ()
 
void ReleaseImageSubStorage ()
 
OUString CreateUniqueObjectName ()
 
css::uno::Sequence< OUString > GetObjectNames () const
 
bool HasEmbeddedObjects () const
 
bool HasEmbeddedObject (const OUString &)
 
bool HasEmbeddedObject (const css::uno::Reference< css::embed::XEmbeddedObject > &) const
 
bool HasInstantiatedEmbeddedObject (const OUString &)
 
OUString GetEmbeddedObjectName (const css::uno::Reference< css::embed::XEmbeddedObject > &) const
 
css::uno::Reference< css::embed::XEmbeddedObject > GetEmbeddedObject (const OUString &, OUString const *pBaseURL=nullptr)
 
css::uno::Reference< css::embed::XEmbeddedObject > CreateEmbeddedObject (const css::uno::Sequence< sal_Int8 > &, OUString &, OUString const *pBaseURL=nullptr)
 
css::uno::Reference< css::embed::XEmbeddedObject > CreateEmbeddedObject (const css::uno::Sequence< sal_Int8 > &, const css::uno::Sequence< css::beans::PropertyValue > &, OUString &, OUString const *pBaseURL=nullptr)
 
bool InsertEmbeddedObject (const css::uno::Reference< css::embed::XEmbeddedObject > &, OUString &)
 
css::uno::Reference< css::embed::XEmbeddedObject > InsertEmbeddedObject (const css::uno::Sequence< css::beans::PropertyValue > &, OUString &rName, OUString const *pBaseURL=nullptr)
 
css::uno::Reference< css::embed::XEmbeddedObject > InsertEmbeddedLink (const css::uno::Sequence< css::beans::PropertyValue > &, OUString &)
 
css::uno::Reference< css::embed::XEmbeddedObject > InsertEmbeddedObject (const css::uno::Reference< css::io::XInputStream > &, OUString &)
 
css::uno::Reference< css::embed::XEmbeddedObject > CopyAndGetEmbeddedObject (EmbeddedObjectContainer &rSrc, const css::uno::Reference< css::embed::XEmbeddedObject > &xObj, OUString &rName, const OUString &rSrcShellID, const OUString &rDestShellID)
 
void RemoveEmbeddedObject (const OUString &rName, bool bKeepToTempStorage=true)
 
bool RemoveEmbeddedObject (const css::uno::Reference< css::embed::XEmbeddedObject > &, bool bKeepToTempStorage=true)
 
void CloseEmbeddedObject (const css::uno::Reference< css::embed::XEmbeddedObject > &)
 
bool MoveEmbeddedObject (const OUString &rName, EmbeddedObjectContainer &)
 
css::uno::Reference< css::io::XInputStream > GetGraphicStream (const css::uno::Reference< css::embed::XEmbeddedObject > &, OUString *pMediaType=nullptr)
 
css::uno::Reference< css::io::XInputStream > GetGraphicStream (const OUString &aName, OUString *pMediaType=nullptr)
 
bool InsertGraphicStream (const css::uno::Reference< css::io::XInputStream > &rStream, const OUString &rObjectName, const OUString &rMediaType)
 
bool InsertGraphicStreamDirectly (const css::uno::Reference< css::io::XInputStream > &rStream, const OUString &rObjectName, const OUString &rMediaType)
 
void RemoveGraphicStream (const OUString &rObjectName)
 
bool TryToCopyGraphReplacement (EmbeddedObjectContainer &rSrc, const OUString &aOrigName, const OUString &aTargetName)
 
void CloseEmbeddedObjects ()
 
bool StoreChildren (bool _bOasisFormat, bool _bObjectsOnly)
 
bool StoreAsChildren (bool _bOasisFormat, bool _bCreateEmbedded, bool _bAutoSaveEvent, const css::uno::Reference< css::embed::XStorage > &_xStorage)
 
bool SetPersistentEntries (const css::uno::Reference< css::embed::XStorage > &_xStorage, bool _bClearModifiedFlag=true)
 call setPersistentEntry for each embedded object in the container More...
 
bool getUserAllowsLinkUpdate () const
 
void setUserAllowsLinkUpdate (bool bNew)
 

Static Public Member Functions

static css::uno::Reference< css::io::XInputStream > GetGraphicReplacementStream (sal_Int64 nViewAspect, const css::uno::Reference< css::embed::XEmbeddedObject > &, OUString *pMediaType)
 

Private Member Functions

css::uno::Reference< css::embed::XEmbeddedObject > Get_Impl (const OUString &, const css::uno::Reference< css::embed::XEmbeddedObject > &xCopy, OUString const *pBaseURL)
 

Private Attributes

std::unique_ptr< EmbedImplpImpl
 

Detailed Description

Definition at line 55 of file embeddedobjectcontainer.hxx.

Constructor & Destructor Documentation

◆ EmbeddedObjectContainer() [1/3]

comphelper::EmbeddedObjectContainer::EmbeddedObjectContainer ( )

◆ EmbeddedObjectContainer() [2/3]

comphelper::EmbeddedObjectContainer::EmbeddedObjectContainer ( const css::uno::Reference< css::embed::XStorage > &  )

◆ EmbeddedObjectContainer() [3/3]

comphelper::EmbeddedObjectContainer::EmbeddedObjectContainer ( const css::uno::Reference< css::embed::XStorage > &  ,
const css::uno::Reference< css::uno::XInterface > &   
)

◆ ~EmbeddedObjectContainer()

comphelper::EmbeddedObjectContainer::~EmbeddedObjectContainer ( )

Definition at line 185 of file embeddedobjectcontainer.cxx.

References pImpl, and ReleaseImageSubStorage().

Member Function Documentation

◆ AddEmbeddedObject()

void comphelper::EmbeddedObjectContainer::AddEmbeddedObject ( const css::uno::Reference< css::embed::XEmbeddedObject > &  xObj,
const OUString &  rName 
)

◆ CloseEmbeddedObject()

void comphelper::EmbeddedObjectContainer::CloseEmbeddedObject ( const css::uno::Reference< css::embed::XEmbeddedObject > &  )

Definition at line 997 of file embeddedobjectcontainer.cxx.

References pImpl.

◆ CloseEmbeddedObjects()

void comphelper::EmbeddedObjectContainer::CloseEmbeddedObjects ( )

Definition at line 195 of file embeddedobjectcontainer.cxx.

References pImpl.

◆ CommitImageSubStorage()

bool comphelper::EmbeddedObjectContainer::CommitImageSubStorage ( )

Definition at line 136 of file embeddedobjectcontainer.cxx.

References pImpl.

Referenced by ReleaseImageSubStorage(), StoreAsChildren(), and StoreChildren().

◆ CopyAndGetEmbeddedObject()

uno::Reference< embed::XEmbeddedObject > comphelper::EmbeddedObjectContainer::CopyAndGetEmbeddedObject ( EmbeddedObjectContainer rSrc,
const css::uno::Reference< css::embed::XEmbeddedObject > &  xObj,
OUString &  rName,
const OUString &  rSrcShellID,
const OUString &  rDestShellID 
)

◆ CreateEmbeddedObject() [1/2]

css::uno::Reference< css::embed::XEmbeddedObject > comphelper::EmbeddedObjectContainer::CreateEmbeddedObject ( const css::uno::Sequence< sal_Int8 > &  ,
const css::uno::Sequence< css::beans::PropertyValue > &  ,
OUString &  ,
OUString const *  pBaseURL = nullptr 
)

◆ CreateEmbeddedObject() [2/2]

css::uno::Reference< css::embed::XEmbeddedObject > comphelper::EmbeddedObjectContainer::CreateEmbeddedObject ( const css::uno::Sequence< sal_Int8 > &  ,
OUString &  ,
OUString const *  pBaseURL = nullptr 
)

◆ CreateUniqueObjectName()

OUString comphelper::EmbeddedObjectContainer::CreateUniqueObjectName ( )

◆ Get_Impl()

uno::Reference< embed::XEmbeddedObject > comphelper::EmbeddedObjectContainer::Get_Impl ( const OUString &  ,
const css::uno::Reference< css::embed::XEmbeddedObject > &  xCopy,
OUString const *  pBaseURL 
)
private

◆ GetEmbeddedObject()

uno::Reference< embed::XEmbeddedObject > comphelper::EmbeddedObjectContainer::GetEmbeddedObject ( const OUString &  rName,
OUString const *  pBaseURL = nullptr 
)

◆ GetEmbeddedObjectName()

OUString comphelper::EmbeddedObjectContainer::GetEmbeddedObjectName ( const css::uno::Reference< css::embed::XEmbeddedObject > &  xObj) const

Definition at line 261 of file embeddedobjectcontainer.cxx.

References pImpl, and SAL_WARN.

Referenced by GetGraphicStream().

◆ GetGraphicReplacementStream()

uno::Reference< io::XInputStream > comphelper::EmbeddedObjectContainer::GetGraphicReplacementStream ( sal_Int64  nViewAspect,
const css::uno::Reference< css::embed::XEmbeddedObject > &  ,
OUString *  pMediaType 
)
static

Definition at line 1417 of file embeddedobjectcontainer.cxx.

References aSeq.

Referenced by StoreAsChildren(), and StoreChildren().

◆ GetGraphicStream() [1/2]

uno::Reference< io::XInputStream > comphelper::EmbeddedObjectContainer::GetGraphicStream ( const css::uno::Reference< css::embed::XEmbeddedObject > &  xObj,
OUString *  pMediaType = nullptr 
)

◆ GetGraphicStream() [2/2]

uno::Reference< io::XInputStream > comphelper::EmbeddedObjectContainer::GetGraphicStream ( const OUString &  aName,
OUString *  pMediaType = nullptr 
)

Definition at line 1020 of file embeddedobjectcontainer.cxx.

References aName, pImpl, SAL_INFO, SAL_WARN_IF, and xStream.

◆ GetObjectNames()

uno::Sequence< OUString > comphelper::EmbeddedObjectContainer::GetObjectNames ( ) const

◆ getUserAllowsLinkUpdate()

bool comphelper::EmbeddedObjectContainer::getUserAllowsLinkUpdate ( ) const

Definition at line 1493 of file embeddedobjectcontainer.cxx.

References pImpl.

Referenced by StoreAsChildren().

◆ HasEmbeddedObject() [1/2]

bool comphelper::EmbeddedObjectContainer::HasEmbeddedObject ( const css::uno::Reference< css::embed::XEmbeddedObject > &  ) const

◆ HasEmbeddedObject() [2/2]

bool comphelper::EmbeddedObjectContainer::HasEmbeddedObject ( const OUString &  rName)

Definition at line 237 of file embeddedobjectcontainer.cxx.

References pImpl.

Referenced by CreateUniqueObjectName().

◆ HasEmbeddedObjects()

bool comphelper::EmbeddedObjectContainer::HasEmbeddedObjects ( ) const

Definition at line 232 of file embeddedobjectcontainer.cxx.

References pImpl.

◆ HasInstantiatedEmbeddedObject()

bool comphelper::EmbeddedObjectContainer::HasInstantiatedEmbeddedObject ( const OUString &  rName)

Definition at line 252 of file embeddedobjectcontainer.cxx.

References pImpl.

◆ InsertEmbeddedLink()

uno::Reference< embed::XEmbeddedObject > comphelper::EmbeddedObjectContainer::InsertEmbeddedLink ( const css::uno::Sequence< css::beans::PropertyValue > &  aMedium,
OUString &  rNewName 
)

◆ InsertEmbeddedObject() [1/3]

bool comphelper::EmbeddedObjectContainer::InsertEmbeddedObject ( const css::uno::Reference< css::embed::XEmbeddedObject > &  ,
OUString &   
)

Referenced by MoveEmbeddedObject().

◆ InsertEmbeddedObject() [2/3]

css::uno::Reference< css::embed::XEmbeddedObject > comphelper::EmbeddedObjectContainer::InsertEmbeddedObject ( const css::uno::Reference< css::io::XInputStream > &  ,
OUString &   
)

◆ InsertEmbeddedObject() [3/3]

uno::Reference< embed::XEmbeddedObject > comphelper::EmbeddedObjectContainer::InsertEmbeddedObject ( const css::uno::Sequence< css::beans::PropertyValue > &  aMedium,
OUString &  rName,
OUString const *  pBaseURL = nullptr 
)

◆ InsertGraphicStream()

bool comphelper::EmbeddedObjectContainer::InsertGraphicStream ( const css::uno::Reference< css::io::XInputStream > &  rStream,
const OUString &  rObjectName,
const OUString &  rMediaType 
)

◆ InsertGraphicStreamDirectly()

bool comphelper::EmbeddedObjectContainer::InsertGraphicStreamDirectly ( const css::uno::Reference< css::io::XInputStream > &  rStream,
const OUString &  rObjectName,
const OUString &  rMediaType 
)

Definition at line 1089 of file embeddedobjectcontainer.cxx.

References comphelper::makePropertyValue(), and pImpl.

Referenced by StoreAsChildren(), and StoreChildren().

◆ MoveEmbeddedObject()

bool comphelper::EmbeddedObjectContainer::MoveEmbeddedObject ( const OUString &  rName,
EmbeddedObjectContainer rCnt 
)

◆ ReleaseImageSubStorage()

void comphelper::EmbeddedObjectContainer::ReleaseImageSubStorage ( )

◆ RemoveEmbeddedObject() [1/2]

bool comphelper::EmbeddedObjectContainer::RemoveEmbeddedObject ( const css::uno::Reference< css::embed::XEmbeddedObject > &  ,
bool  bKeepToTempStorage = true 
)

◆ RemoveEmbeddedObject() [2/2]

void comphelper::EmbeddedObjectContainer::RemoveEmbeddedObject ( const OUString &  rName,
bool  bKeepToTempStorage = true 
)

Definition at line 825 of file embeddedobjectcontainer.cxx.

References GetEmbeddedObject(), and RemoveEmbeddedObject().

Referenced by RemoveEmbeddedObject().

◆ RemoveGraphicStream()

void comphelper::EmbeddedObjectContainer::RemoveGraphicStream ( const OUString &  rObjectName)

Definition at line 1117 of file embeddedobjectcontainer.cxx.

References pImpl.

◆ SetPersistentEntries()

bool comphelper::EmbeddedObjectContainer::SetPersistentEntries ( const css::uno::Reference< css::embed::XStorage > &  _xStorage,
bool  _bClearModifiedFlag = true 
)

call setPersistentEntry for each embedded object in the container

Parameters
_xStorageThe storage where to store the objects.
_bClearModifiedFlagIf <TRUE> then the modified flag will be set to <FALSE> otherwise nothing happen.
Returns
<FALSE> if no error occurred, otherwise <TRUE>.

Definition at line 1444 of file embeddedobjectcontainer.cxx.

References GetEmbeddedObject(), GetObjectNames(), and SAL_WARN_IF.

◆ setUserAllowsLinkUpdate()

void comphelper::EmbeddedObjectContainer::setUserAllowsLinkUpdate ( bool  bNew)

Definition at line 1498 of file embeddedobjectcontainer.cxx.

References pImpl.

◆ StoreAsChildren()

bool comphelper::EmbeddedObjectContainer::StoreAsChildren ( bool  _bOasisFormat,
bool  _bCreateEmbedded,
bool  _bAutoSaveEvent,
const css::uno::Reference< css::embed::XStorage > &  _xStorage 
)

◆ StoreChildren()

bool comphelper::EmbeddedObjectContainer::StoreChildren ( bool  _bOasisFormat,
bool  _bObjectsOnly 
)

◆ StoreEmbeddedObject()

bool comphelper::EmbeddedObjectContainer::StoreEmbeddedObject ( const css::uno::Reference< css::embed::XEmbeddedObject > &  xObj,
OUString &  rName,
bool  bCopy,
const OUString &  rSrcShellID,
const OUString &  rDestShellID 
)

◆ SwitchPersistence()

void comphelper::EmbeddedObjectContainer::SwitchPersistence ( const css::uno::Reference< css::embed::XStorage > &  )

Definition at line 125 of file embeddedobjectcontainer.cxx.

References pImpl, and ReleaseImageSubStorage().

◆ TryToCopyGraphReplacement()

bool comphelper::EmbeddedObjectContainer::TryToCopyGraphReplacement ( EmbeddedObjectContainer rSrc,
const OUString &  aOrigName,
const OUString &  aTargetName 
)

Member Data Documentation

◆ pImpl

std::unique_ptr<EmbedImpl> comphelper::EmbeddedObjectContainer::pImpl
private

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