LibreOffice Module svx (master) 1
|
#include <gallerybinaryengine.hxx>
Public Member Functions | |
GalleryBinaryEngine (const GalleryBinaryStorageLocations &rGalleryStorageLocations, GalleryObjectCollection &rGalleryObjectCollection, bool bReadOnly) | |
SAL_DLLPRIVATE | ~GalleryBinaryEngine () |
void | clearSotStorage () |
void | setDestDir (const OUString &rDestDir, bool bRelative) |
SAL_DLLPRIVATE void | ImplCreateSvDrawStorage () |
SAL_DLLPRIVATE const tools::SvRef< SotStorage > & | GetSvDrawStorage () const |
const INetURLObject & | getThemeURL () const |
SAL_DLLPRIVATE bool | implWrite (const GalleryTheme &rTheme, const GalleryThemeEntry *pThm) |
void | insertObject (const SgaObject &rObj, GalleryObject *pFoundEntry, sal_uInt32 nInsertPos) |
void | removeObject (const std::unique_ptr< GalleryObject > &pEntry) |
std::unique_ptr< SgaObject > | implReadSgaObject (GalleryObject const *pEntry) |
bool | implWriteSgaObject (const SgaObject &rObj, sal_uInt32 nPos, GalleryObject *pExistentEntry) |
bool | readModel (const GalleryObject *pObject, SdrModel &rModel) |
SgaObjectSvDraw | insertModel (const FmFormModel &rModel, const INetURLObject &rUserURL) |
bool | readModelStream (const GalleryObject *pObject, tools::SvRef< SotTempStream > const &rxModelStream) |
SgaObjectSvDraw | insertModelStream (const tools::SvRef< SotTempStream > &rxModelStream, const INetURLObject &rUserURL) |
INetURLObject | implCreateUniqueURL (SgaObjKind eObjKind, const INetURLObject &rUserURL, ConvertDataFormat nFormat=ConvertDataFormat::Unknown) |
SgaObjectBmp | insertGraphic (const Graphic &rGraphic, const GfxLink &aGfxLink, const ConvertDataFormat &nExportFormat, const INetURLObject &rUserURL) |
SgaObjectSvDraw | updateSvDrawObject (const GalleryObject *pEntry) |
void | updateTheme () |
SvStream & | writeGalleryTheme (SvStream &rOStm, const GalleryTheme &rTheme, const GalleryThemeEntry *pThm) |
DateTime | getModificationDate () const |
![]() | |
virtual | ~GalleryFileStorage ()=0 |
Static Public Member Functions | |
static void | insertFileOrDirURL (const INetURLObject &rFileOrDirURL, std::vector< INetURLObject > &rURLVector) |
Private Member Functions | |
const INetURLObject & | GetSdgURL () const |
const INetURLObject & | GetSdvURL () const |
const INetURLObject & | GetStrURL () const |
const INetURLObject & | GetThmURL () const |
Private Attributes | |
tools::SvRef< SotStorage > | m_aSvDrawStorageRef |
const GalleryBinaryStorageLocations & | maGalleryStorageLocations |
GalleryObjectCollection & | mrGalleryObjectCollection |
bool | mbReadOnly |
OUString | m_aDestDir |
bool | m_bDestDirRelative |
Definition at line 47 of file gallerybinaryengine.hxx.
GalleryBinaryEngine::GalleryBinaryEngine | ( | const GalleryBinaryStorageLocations & | rGalleryStorageLocations, |
GalleryObjectCollection & | rGalleryObjectCollection, | ||
bool | bReadOnly | ||
) |
Definition at line 53 of file gallerybinaryengine.cxx.
References ImplCreateSvDrawStorage().
GalleryBinaryEngine::~GalleryBinaryEngine | ( | ) |
Definition at line 64 of file gallerybinaryengine.cxx.
References clearSotStorage().
void GalleryBinaryEngine::clearSotStorage | ( | ) |
Definition at line 72 of file gallerybinaryengine.cxx.
References tools::SvRef< typename T >::clear(), and m_aSvDrawStorageRef.
Referenced by updateTheme(), and ~GalleryBinaryEngine().
DateTime GalleryBinaryEngine::getModificationDate | ( | ) | const |
Definition at line 796 of file gallerybinaryengine.cxx.
References DateTime::EMPTY, comphelper::getProcessComponentContext(), ucbhelper::Content::getPropertyValue(), GetThmURL(), and INetURLObject::NONE.
|
inlineprivate |
Definition at line 57 of file gallerybinaryengine.hxx.
References GalleryBinaryStorageLocations::GetSdgURL().
Referenced by implReadSgaObject(), implWriteSgaObject(), removeObject(), and updateTheme().
|
inlineprivate |
Definition at line 58 of file gallerybinaryengine.hxx.
References GalleryBinaryStorageLocations::GetSdvURL().
Referenced by ImplCreateSvDrawStorage(), and updateTheme().
|
inlineprivate |
Definition at line 59 of file gallerybinaryengine.hxx.
References GalleryBinaryStorageLocations::GetStrURL().
const tools::SvRef< SotStorage > & GalleryBinaryEngine::GetSvDrawStorage | ( | ) | const |
Definition at line 95 of file gallerybinaryengine.cxx.
References m_aSvDrawStorageRef.
Referenced by insertModel(), insertModelStream(), readModel(), readModelStream(), removeObject(), updateSvDrawObject(), and updateTheme().
|
inline |
Definition at line 74 of file gallerybinaryengine.hxx.
References GalleryBinaryStorageLocations::getThemeURL().
|
inlineprivate |
Definition at line 60 of file gallerybinaryengine.hxx.
References GalleryBinaryStorageLocations::GetThmURL().
Referenced by getModificationDate(), and implWrite().
void GalleryBinaryEngine::ImplCreateSvDrawStorage | ( | ) |
Definition at line 74 of file gallerybinaryengine.cxx.
References ERRCODE_NONE, GetSdvURL(), m_aSvDrawStorageRef, mbReadOnly, INetURLObject::NONE, and TOOLS_WARN_EXCEPTION.
Referenced by GalleryBinaryEngine(), and updateTheme().
INetURLObject GalleryBinaryEngine::implCreateUniqueURL | ( | SgaObjKind | eObjKind, |
const INetURLObject & | rUserURL, | ||
ConvertDataFormat | nFormat = ConvertDataFormat::Unknown |
||
) |
Definition at line 415 of file gallerybinaryengine.cxx.
References INetURLObject::Append(), CreateDir(), utl::UcbStreamHelper::CreateStream(), FileExists(), comphelper::GraphicMimeTypeHelper::GetExtensionForConvertDataFormat(), INetURLObject::GetMainURL(), GalleryObjectCollection::getObjectList(), mrGalleryObjectCollection, INetURLObject::NONE, pExt, pObject, SvDraw, and u.
Referenced by insertGraphic(), insertModel(), and insertModelStream().
std::unique_ptr< SgaObject > GalleryBinaryEngine::implReadSgaObject | ( | GalleryObject const * | pEntry | ) |
Definition at line 170 of file gallerybinaryengine.cxx.
References Animation, Bitmap, COMPAT_FORMAT(), utl::UcbStreamHelper::CreateStream(), GalleryObject::eObjKind, GetSdgURL(), GalleryObject::getURL(), Inet, GalleryObject::nOffset, INetURLObject::NONE, ReadSgaObject(), Sound, and SvDraw.
Referenced by insertObject().
bool GalleryBinaryEngine::implWrite | ( | const GalleryTheme & | rTheme, |
const GalleryThemeEntry * | pThm | ||
) |
Definition at line 100 of file gallerybinaryengine.cxx.
References CreateDir(), utl::UcbStreamHelper::CreateStream(), DBG_ASSERT, FileExists(), INetURLObject::GetProtocol(), GetThmURL(), INetURLObject::NONE, INetURLObject::removeFinalSlash(), INetURLObject::removeSegment(), and writeGalleryTheme().
bool GalleryBinaryEngine::implWriteSgaObject | ( | const SgaObject & | rObj, |
sal_uInt32 | nPos, | ||
GalleryObject * | pExistentEntry | ||
) |
Definition at line 225 of file gallerybinaryengine.cxx.
References utl::UcbStreamHelper::CreateStream(), GalleryObject::eObjKind, GalleryObjectCollection::getObjectList(), GetSdgURL(), m_aDestDir, GalleryObject::m_pGalleryObjectStorage, mrGalleryObjectCollection, GalleryObject::nOffset, INetURLObject::NONE, nPos, GalleryObjectCollection::size(), and STREAM_SEEK_TO_END.
Referenced by insertObject().
|
static |
Definition at line 647 of file gallerybinaryengine.cxx.
References aURL, ucbhelper::Content::createCursor(), INetURLObject::GetMainURL(), comphelper::getProcessComponentContext(), ucbhelper::Content::getPropertyValue(), and INetURLObject::NONE.
Referenced by GalleryTheme::InsertFileOrDirURL().
SgaObjectBmp GalleryBinaryEngine::insertGraphic | ( | const Graphic & | rGraphic, |
const GfxLink & | aGfxLink, | ||
const ConvertDataFormat & | nExportFormat, | ||
const INetURLObject & | rUserURL | ||
) |
Definition at line 490 of file gallerybinaryengine.cxx.
References aURL, Bitmap, utl::UcbStreamHelper::CreateStream(), ERRCODE_NONE, GraphicConverter::Export(), GfxLink::GetData(), GfxLink::GetDataSize(), Graphic::GetGDIMetaFile(), implCreateUniqueURL(), INetURLObject::NONE, SOFFICE_FILEFORMAT_50, SvmWriter::Write(), and SvStream::WriteBytes().
SgaObjectSvDraw GalleryBinaryEngine::insertModel | ( | const FmFormModel & | rModel, |
const INetURLObject & | rUserURL | ||
) |
Definition at line 290 of file gallerybinaryengine.cxx.
References aURL, SdrModel::BurnInStyleSheetAttributes(), GetSvDrawStorage(), GetSvDrawStreamNameFromURL(), implCreateUniqueURL(), tools::SvRef< typename T >::is(), SvStream::Seek(), SvDraw, SvxDrawingLayerExport(), and GalleryCodec::Write().
SgaObjectSvDraw GalleryBinaryEngine::insertModelStream | ( | const tools::SvRef< SotTempStream > & | rxModelStream, |
const INetURLObject & | rUserURL | ||
) |
Definition at line 385 of file gallerybinaryengine.cxx.
References aURL, GetSvDrawStorage(), GetSvDrawStreamNameFromURL(), implCreateUniqueURL(), tools::SvRef< typename T >::is(), SvDraw, and GalleryCodec::Write().
void GalleryBinaryEngine::insertObject | ( | const SgaObject & | rObj, |
GalleryObject * | pFoundEntry, | ||
sal_uInt32 | nInsertPos | ||
) |
Definition at line 133 of file gallerybinaryengine.cxx.
References implReadSgaObject(), implWriteSgaObject(), GalleryObject::nOffset, and SetTitle().
bool GalleryBinaryEngine::readModel | ( | const GalleryObject * | pObject, |
SdrModel & | rModel | ||
) |
Definition at line 268 of file gallerybinaryengine.cxx.
References aURL, GallerySvDrawImport(), GetSvDrawStorage(), GetSvDrawStreamNameFromURL(), ImplGetURL(), tools::SvRef< typename T >::is(), pObject, and STREAMBUF_SIZE.
bool GalleryBinaryEngine::readModelStream | ( | const GalleryObject * | pObject, |
tools::SvRef< SotTempStream > const & | rxModelStream | ||
) |
Definition at line 337 of file gallerybinaryengine.cxx.
References aURL, SdrModel::BurnInStyleSheetAttributes(), ERRCODE_NONE, GallerySvDrawImport(), SvxGalleryDrawModel::GetModel(), GetSvDrawStorage(), GetSvDrawStreamNameFromURL(), ImplGetURL(), tools::SvRef< typename T >::is(), GalleryCodec::IsCoded(), nVersion, pObject, and SvxDrawingLayerExport().
void GalleryBinaryEngine::removeObject | ( | const std::unique_ptr< GalleryObject > & | pEntry | ) |
Definition at line 160 of file gallerybinaryengine.cxx.
References GalleryObjectCollection::getObjectList(), GetSdgURL(), GetSvDrawStorage(), KillFile(), mrGalleryObjectCollection, INetURLObject::NONE, and SvDraw.
void GalleryBinaryEngine::setDestDir | ( | const OUString & | rDestDir, |
bool | bRelative | ||
) |
Definition at line 66 of file gallerybinaryengine.cxx.
References m_aDestDir, and m_bDestDirRelative.
SgaObjectSvDraw GalleryBinaryEngine::updateSvDrawObject | ( | const GalleryObject * | pEntry | ) |
Definition at line 533 of file gallerybinaryengine.cxx.
References GetSvDrawStorage(), GetSvDrawStreamNameFromURL(), GalleryObject::getURL(), and tools::SvRef< typename T >::is().
void GalleryBinaryEngine::updateTheme | ( | ) |
Definition at line 555 of file gallerybinaryengine.cxx.
References Animation, Bitmap, clearSotStorage(), CopyFile(), utl::UcbStreamHelper::CreateStream(), DBG_ASSERT, GalleryObject::eObjKind, ERRCODE_IO_GENERAL, ERRCODE_NONE, tools::SvRef< typename T >::get(), INetURLObject::GetMainURL(), GalleryObjectCollection::getObjectList(), INetURLObject::GetProtocol(), GetSdgURL(), GetSdvURL(), GetSvDrawStorage(), utl::TempFileNamed::GetURL(), i, ImplCreateSvDrawStorage(), Inet, KillFile(), mrGalleryObjectCollection, GalleryObject::nOffset, INetURLObject::NONE, ReadSgaObject(), Sound, SvDraw, TOOLS_WARN_EXCEPTION, and WriteSgaObject().
SvStream & GalleryBinaryEngine::writeGalleryTheme | ( | SvStream & | rOStm, |
const GalleryTheme & | rTheme, | ||
const GalleryThemeEntry * | pThm | ||
) |
Definition at line 689 of file gallerybinaryengine.cxx.
References COMPAT_FORMAT(), GalleryObject::eObjKind, GalleryObjectCollection::getForPosition(), GalleryTheme::GetId(), INetURLObject::GetMainURL(), GalleryTheme::GetParent(), Gallery::GetRelativeURL(), GetSvDrawStreamNameFromURL(), GalleryThemeEntry::GetThemeName(), GalleryObject::getURL(), Gallery::GetUserURL(), i, GalleryThemeEntry::IsNameFromResource(), m_aDestDir, m_bDestDirRelative, mrGalleryObjectCollection, nCount, GalleryObject::nOffset, INetURLObject::NONE, SAL_WARN, GalleryObjectCollection::size(), SvDraw, SvStream::Tell(), write_uInt16_lenPrefixed_uInt8s_FromOUString(), SvStream::WriteBool(), SvStream::WriteBytes(), SvStream::WriteUInt16(), and SvStream::WriteUInt32().
Referenced by implWrite().
|
private |
Definition at line 54 of file gallerybinaryengine.hxx.
Referenced by implWriteSgaObject(), setDestDir(), and writeGalleryTheme().
|
private |
Definition at line 50 of file gallerybinaryengine.hxx.
Referenced by clearSotStorage(), GetSvDrawStorage(), and ImplCreateSvDrawStorage().
|
private |
Definition at line 55 of file gallerybinaryengine.hxx.
Referenced by setDestDir(), and writeGalleryTheme().
|
private |
Definition at line 51 of file gallerybinaryengine.hxx.
|
private |
Definition at line 53 of file gallerybinaryengine.hxx.
Referenced by ImplCreateSvDrawStorage().
|
private |
Definition at line 52 of file gallerybinaryengine.hxx.
Referenced by implCreateUniqueURL(), implWriteSgaObject(), removeObject(), updateTheme(), and writeGalleryTheme().