LibreOffice Module comphelper (master) 1
|
#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< EmbedImpl > | pImpl |
Definition at line 55 of file embeddedobjectcontainer.hxx.
comphelper::EmbeddedObjectContainer::EmbeddedObjectContainer | ( | ) |
Definition at line 97 of file embeddedobjectcontainer.cxx.
References comphelper::OStorageHelper::GetTemporaryStorage(), and pImpl.
comphelper::EmbeddedObjectContainer::EmbeddedObjectContainer | ( | const css::uno::Reference< css::embed::XStorage > & | ) |
comphelper::EmbeddedObjectContainer::EmbeddedObjectContainer | ( | const css::uno::Reference< css::embed::XStorage > & | , |
const css::uno::Reference< css::uno::XInterface > & | |||
) |
comphelper::EmbeddedObjectContainer::~EmbeddedObjectContainer | ( | ) |
Definition at line 185 of file embeddedobjectcontainer.cxx.
References pImpl, and ReleaseImageSubStorage().
void comphelper::EmbeddedObjectContainer::AddEmbeddedObject | ( | const css::uno::Reference< css::embed::XEmbeddedObject > & | xObj, |
const OUString & | rName | ||
) |
Definition at line 406 of file embeddedobjectcontainer.cxx.
References InsertGraphicStream(), pImpl, SAL_WARN_IF, and xStream.
Referenced by CopyAndGetEmbeddedObject(), Get_Impl(), InsertEmbeddedLink(), and InsertEmbeddedObject().
void comphelper::EmbeddedObjectContainer::CloseEmbeddedObject | ( | const css::uno::Reference< css::embed::XEmbeddedObject > & | ) |
Definition at line 997 of file embeddedobjectcontainer.cxx.
References pImpl.
void comphelper::EmbeddedObjectContainer::CloseEmbeddedObjects | ( | ) |
Definition at line 195 of file embeddedobjectcontainer.cxx.
References pImpl.
bool comphelper::EmbeddedObjectContainer::CommitImageSubStorage | ( | ) |
Definition at line 136 of file embeddedobjectcontainer.cxx.
References pImpl.
Referenced by ReleaseImageSubStorage(), StoreAsChildren(), and StoreChildren().
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 | ||
) |
Definition at line 674 of file embeddedobjectcontainer.cxx.
References AddEmbeddedObject(), aURL, CreateUniqueObjectName(), Get_Impl(), comphelper::getProcessComponentContext(), comphelper::makePropertyValue(), p, pImpl, SAL_INFO_IF, SAL_WARN, SAL_WARN_IF, StoreEmbeddedObject(), and TryToCopyGraphReplacement().
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 |
||
) |
css::uno::Reference< css::embed::XEmbeddedObject > comphelper::EmbeddedObjectContainer::CreateEmbeddedObject | ( | const css::uno::Sequence< sal_Int8 > & | , |
OUString & | , | ||
OUString const * | pBaseURL = nullptr |
||
) |
OUString comphelper::EmbeddedObjectContainer::CreateUniqueObjectName | ( | ) |
Definition at line 213 of file embeddedobjectcontainer.cxx.
References aStr, HasEmbeddedObject(), and i.
Referenced by CopyAndGetEmbeddedObject(), InsertEmbeddedLink(), InsertEmbeddedObject(), and StoreEmbeddedObject().
|
private |
Definition at line 302 of file embeddedobjectcontainer.cxx.
References AddEmbeddedObject(), comphelper::getProcessComponentContext(), comphelper::makePropertyValue(), pImpl, SAL_WARN, and xFactory.
Referenced by CopyAndGetEmbeddedObject(), and GetEmbeddedObject().
uno::Reference< embed::XEmbeddedObject > comphelper::EmbeddedObjectContainer::GetEmbeddedObject | ( | const OUString & | rName, |
OUString const * | pBaseURL = nullptr |
||
) |
Definition at line 273 of file embeddedobjectcontainer.cxx.
References aSeq, Get_Impl(), pImpl, and SAL_WARN_IF.
Referenced by RemoveEmbeddedObject(), SetPersistentEntries(), StoreAsChildren(), and StoreChildren().
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().
|
static |
Definition at line 1417 of file embeddedobjectcontainer.cxx.
References aSeq.
Referenced by StoreAsChildren(), and StoreChildren().
uno::Reference< io::XInputStream > comphelper::EmbeddedObjectContainer::GetGraphicStream | ( | const css::uno::Reference< css::embed::XEmbeddedObject > & | xObj, |
OUString * | pMediaType = nullptr |
||
) |
Definition at line 1052 of file embeddedobjectcontainer.cxx.
References GetEmbeddedObjectName(), and GetGraphicStream().
Referenced by GetGraphicStream(), StoreAsChildren(), StoreChildren(), and TryToCopyGraphReplacement().
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.
uno::Sequence< OUString > comphelper::EmbeddedObjectContainer::GetObjectNames | ( | ) | const |
Definition at line 227 of file embeddedobjectcontainer.cxx.
References comphelper::mapKeysToSequence(), and pImpl.
Referenced by SetPersistentEntries(), StoreAsChildren(), and StoreChildren().
bool comphelper::EmbeddedObjectContainer::getUserAllowsLinkUpdate | ( | ) | const |
Definition at line 1493 of file embeddedobjectcontainer.cxx.
References pImpl.
Referenced by StoreAsChildren().
bool comphelper::EmbeddedObjectContainer::HasEmbeddedObject | ( | const css::uno::Reference< css::embed::XEmbeddedObject > & | ) | const |
bool comphelper::EmbeddedObjectContainer::HasEmbeddedObject | ( | const OUString & | rName | ) |
Definition at line 237 of file embeddedobjectcontainer.cxx.
References pImpl.
Referenced by CreateUniqueObjectName().
bool comphelper::EmbeddedObjectContainer::HasEmbeddedObjects | ( | ) | const |
Definition at line 232 of file embeddedobjectcontainer.cxx.
References pImpl.
bool comphelper::EmbeddedObjectContainer::HasInstantiatedEmbeddedObject | ( | const OUString & | rName | ) |
Definition at line 252 of file embeddedobjectcontainer.cxx.
References pImpl.
uno::Reference< embed::XEmbeddedObject > comphelper::EmbeddedObjectContainer::InsertEmbeddedLink | ( | const css::uno::Sequence< css::beans::PropertyValue > & | aMedium, |
OUString & | rNewName | ||
) |
Definition at line 624 of file embeddedobjectcontainer.cxx.
References AddEmbeddedObject(), CreateUniqueObjectName(), comphelper::getProcessComponentContext(), comphelper::makePropertyValue(), pImpl, SAL_WARN, and xFactory.
bool comphelper::EmbeddedObjectContainer::InsertEmbeddedObject | ( | const css::uno::Reference< css::embed::XEmbeddedObject > & | , |
OUString & | |||
) |
Referenced by MoveEmbeddedObject().
css::uno::Reference< css::embed::XEmbeddedObject > comphelper::EmbeddedObjectContainer::InsertEmbeddedObject | ( | const css::uno::Reference< css::io::XInputStream > & | , |
OUString & | |||
) |
uno::Reference< embed::XEmbeddedObject > comphelper::EmbeddedObjectContainer::InsertEmbeddedObject | ( | const css::uno::Sequence< css::beans::PropertyValue > & | aMedium, |
OUString & | rName, | ||
OUString const * | pBaseURL = nullptr |
||
) |
Definition at line 586 of file embeddedobjectcontainer.cxx.
References AddEmbeddedObject(), CreateUniqueObjectName(), comphelper::getProcessComponentContext(), pImpl, and xFactory.
bool comphelper::EmbeddedObjectContainer::InsertGraphicStream | ( | const css::uno::Reference< css::io::XInputStream > & | rStream, |
const OUString & | rObjectName, | ||
const OUString & | rMediaType | ||
) |
Definition at line 1058 of file embeddedobjectcontainer.cxx.
References comphelper::OStorageHelper::CopyInputToOutput(), and pImpl.
Referenced by AddEmbeddedObject(), StoreAsChildren(), StoreChildren(), and TryToCopyGraphReplacement().
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().
bool comphelper::EmbeddedObjectContainer::MoveEmbeddedObject | ( | const OUString & | rName, |
EmbeddedObjectContainer & | rCnt | ||
) |
Definition at line 832 of file embeddedobjectcontainer.cxx.
References aName, InsertEmbeddedObject(), pImpl, SAL_WARN, and TryToCopyGraphReplacement().
void comphelper::EmbeddedObjectContainer::ReleaseImageSubStorage | ( | ) |
Definition at line 167 of file embeddedobjectcontainer.cxx.
References CommitImageSubStorage(), pImpl, and SAL_WARN.
Referenced by StoreChildren(), SwitchPersistence(), and ~EmbeddedObjectContainer().
bool comphelper::EmbeddedObjectContainer::RemoveEmbeddedObject | ( | const css::uno::Reference< css::embed::XEmbeddedObject > & | , |
bool | bKeepToTempStorage = true |
||
) |
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().
void comphelper::EmbeddedObjectContainer::RemoveGraphicStream | ( | const OUString & | rObjectName | ) |
Definition at line 1117 of file embeddedobjectcontainer.cxx.
References pImpl.
bool comphelper::EmbeddedObjectContainer::SetPersistentEntries | ( | const css::uno::Reference< css::embed::XStorage > & | _xStorage, |
bool | _bClearModifiedFlag = true |
||
) |
call setPersistentEntry for each embedded object in the container
_xStorage | The storage where to store the objects. |
_bClearModifiedFlag | If <TRUE> then the modified flag will be set to <FALSE> otherwise nothing happen. |
Definition at line 1444 of file embeddedobjectcontainer.cxx.
References GetEmbeddedObject(), GetObjectNames(), and SAL_WARN_IF.
void comphelper::EmbeddedObjectContainer::setUserAllowsLinkUpdate | ( | bool | bNew | ) |
Definition at line 1498 of file embeddedobjectcontainer.cxx.
References pImpl.
bool comphelper::EmbeddedObjectContainer::StoreAsChildren | ( | bool | _bOasisFormat, |
bool | _bCreateEmbedded, | ||
bool | _bAutoSaveEvent, | ||
const css::uno::Reference< css::embed::XStorage > & | _xStorage | ||
) |
Definition at line 1161 of file embeddedobjectcontainer.cxx.
References CommitImageSubStorage(), GetEmbeddedObject(), GetGraphicReplacementStream(), GetGraphicStream(), GetObjectNames(), getUserAllowsLinkUpdate(), InsertGraphicStream(), InsertGraphicStreamDirectly(), SAL_WARN, SAL_WARN_IF, and xStream.
bool comphelper::EmbeddedObjectContainer::StoreChildren | ( | bool | _bOasisFormat, |
bool | _bObjectsOnly | ||
) |
Definition at line 1290 of file embeddedobjectcontainer.cxx.
References CommitImageSubStorage(), GetEmbeddedObject(), GetGraphicReplacementStream(), GetGraphicStream(), GetObjectNames(), InsertGraphicStream(), InsertGraphicStreamDirectly(), pImpl, ReleaseImageSubStorage(), SAL_WARN_IF, and xStream.
bool comphelper::EmbeddedObjectContainer::StoreEmbeddedObject | ( | const css::uno::Reference< css::embed::XEmbeddedObject > & | xObj, |
OUString & | rName, | ||
bool | bCopy, | ||
const OUString & | rSrcShellID, | ||
const OUString & | rDestShellID | ||
) |
Definition at line 466 of file embeddedobjectcontainer.cxx.
References aSeq, CreateUniqueObjectName(), comphelper::InitPropertySequence(), pImpl, and SAL_WARN.
Referenced by CopyAndGetEmbeddedObject().
void comphelper::EmbeddedObjectContainer::SwitchPersistence | ( | const css::uno::Reference< css::embed::XStorage > & | ) |
Definition at line 125 of file embeddedobjectcontainer.cxx.
References pImpl, and ReleaseImageSubStorage().
bool comphelper::EmbeddedObjectContainer::TryToCopyGraphReplacement | ( | EmbeddedObjectContainer & | rSrc, |
const OUString & | aOrigName, | ||
const OUString & | aTargetName | ||
) |
Definition at line 657 of file embeddedobjectcontainer.cxx.
References GetGraphicStream(), and InsertGraphicStream().
Referenced by CopyAndGetEmbeddedObject(), and MoveEmbeddedObject().
|
private |
Definition at line 57 of file embeddedobjectcontainer.hxx.
Referenced by AddEmbeddedObject(), CloseEmbeddedObject(), CloseEmbeddedObjects(), CommitImageSubStorage(), CopyAndGetEmbeddedObject(), EmbeddedObjectContainer(), Get_Impl(), GetEmbeddedObject(), GetEmbeddedObjectName(), GetGraphicStream(), GetObjectNames(), getUserAllowsLinkUpdate(), HasEmbeddedObject(), HasEmbeddedObjects(), HasInstantiatedEmbeddedObject(), InsertEmbeddedLink(), InsertEmbeddedObject(), InsertGraphicStream(), InsertGraphicStreamDirectly(), MoveEmbeddedObject(), ReleaseImageSubStorage(), RemoveGraphicStream(), setUserAllowsLinkUpdate(), StoreChildren(), StoreEmbeddedObject(), SwitchPersistence(), and ~EmbeddedObjectContainer().