LibreOffice Module svx (master) 1
|
#include <galleryfilestorage.hxx>
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 & | GetThmURL () const |
Private Attributes | |
tools::SvRef< SotStorage > | m_aSvDrawStorageRef |
const GalleryStorageLocations & | maGalleryStorageLocations |
GalleryObjectCollection & | mrGalleryObjectCollection |
bool | mbReadOnly |
OUString | m_aDestDir |
bool | m_bDestDirRelative |
Definition at line 45 of file galleryfilestorage.hxx.
GalleryFileStorage::GalleryFileStorage | ( | const GalleryStorageLocations & | rGalleryStorageLocations, |
GalleryObjectCollection & | rGalleryObjectCollection, | ||
bool | bReadOnly | ||
) |
Definition at line 53 of file galleryfilestorage.cxx.
References ImplCreateSvDrawStorage().
GalleryFileStorage::~GalleryFileStorage | ( | ) |
Definition at line 64 of file galleryfilestorage.cxx.
References clearSotStorage().
void GalleryFileStorage::clearSotStorage | ( | ) |
Definition at line 72 of file galleryfilestorage.cxx.
References tools::SvRef< typename T >::clear(), and m_aSvDrawStorageRef.
Referenced by updateTheme(), and ~GalleryFileStorage().
DateTime GalleryFileStorage::getModificationDate | ( | ) | const |
Definition at line 797 of file galleryfilestorage.cxx.
References DateTime::EMPTY, comphelper::getProcessComponentContext(), ucbhelper::Content::getPropertyValue(), GetThmURL(), and INetURLObject::NONE.
|
inlineprivate |
Definition at line 55 of file galleryfilestorage.hxx.
References GalleryStorageLocations::GetSdgURL().
Referenced by implReadSgaObject(), implWriteSgaObject(), removeObject(), and updateTheme().
|
inlineprivate |
Definition at line 56 of file galleryfilestorage.hxx.
References GalleryStorageLocations::GetSdvURL().
Referenced by ImplCreateSvDrawStorage(), and updateTheme().
const tools::SvRef< SotStorage > & GalleryFileStorage::GetSvDrawStorage | ( | ) | const |
Definition at line 95 of file galleryfilestorage.cxx.
References m_aSvDrawStorageRef.
Referenced by insertModel(), insertModelStream(), readModel(), readModelStream(), removeObject(), updateSvDrawObject(), and updateTheme().
|
inline |
Definition at line 71 of file galleryfilestorage.hxx.
References GalleryStorageLocations::getThemeURL().
|
inlineprivate |
Definition at line 57 of file galleryfilestorage.hxx.
References GalleryStorageLocations::GetThmURL().
Referenced by getModificationDate(), and implWrite().
void GalleryFileStorage::ImplCreateSvDrawStorage | ( | ) |
Definition at line 74 of file galleryfilestorage.cxx.
References ERRCODE_NONE, GetSdvURL(), m_aSvDrawStorageRef, mbReadOnly, INetURLObject::NONE, and TOOLS_WARN_EXCEPTION.
Referenced by GalleryFileStorage(), and updateTheme().
INetURLObject GalleryFileStorage::implCreateUniqueURL | ( | SgaObjKind | eObjKind, |
const INetURLObject & | rUserURL, | ||
ConvertDataFormat | nFormat = ConvertDataFormat::Unknown |
||
) |
Definition at line 414 of file galleryfilestorage.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 > GalleryFileStorage::implReadSgaObject | ( | GalleryObject const * | pEntry | ) |
Definition at line 170 of file galleryfilestorage.cxx.
References Animation, Bitmap, COMPAT_FORMAT(), utl::UcbStreamHelper::CreateStream(), GalleryObject::eObjKind, GetSdgURL(), Inet, GalleryObject::m_oStorageUrl, GalleryObject::nOffset, INetURLObject::NONE, ReadSgaObject(), Sound, and SvDraw.
Referenced by insertObject().
bool GalleryFileStorage::implWrite | ( | const GalleryTheme & | rTheme, |
const GalleryThemeEntry * | pThm | ||
) |
Definition at line 100 of file galleryfilestorage.cxx.
References CreateDir(), utl::UcbStreamHelper::CreateStream(), DBG_ASSERT, FileExists(), INetURLObject::GetProtocol(), GetThmURL(), INetURLObject::NONE, INetURLObject::removeFinalSlash(), INetURLObject::removeSegment(), and writeGalleryTheme().
bool GalleryFileStorage::implWriteSgaObject | ( | const SgaObject & | rObj, |
sal_uInt32 | nPos, | ||
GalleryObject * | pExistentEntry | ||
) |
Definition at line 225 of file galleryfilestorage.cxx.
References utl::UcbStreamHelper::CreateStream(), GalleryObject::eObjKind, GalleryObjectCollection::getObjectList(), GetSdgURL(), m_aDestDir, GalleryObject::m_oStorageUrl, mrGalleryObjectCollection, GalleryObject::nOffset, INetURLObject::NONE, nPos, GalleryObjectCollection::size(), and STREAM_SEEK_TO_END.
Referenced by insertObject().
|
static |
Definition at line 646 of file galleryfilestorage.cxx.
References aURL, ucbhelper::Content::createCursor(), INetURLObject::GetMainURL(), comphelper::getProcessComponentContext(), ucbhelper::Content::getPropertyValue(), and INetURLObject::NONE.
Referenced by GalleryTheme::InsertFileOrDirURL().
SgaObjectBmp GalleryFileStorage::insertGraphic | ( | const Graphic & | rGraphic, |
const GfxLink & | aGfxLink, | ||
const ConvertDataFormat & | nExportFormat, | ||
const INetURLObject & | rUserURL | ||
) |
Definition at line 489 of file galleryfilestorage.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 GalleryFileStorage::insertModel | ( | const FmFormModel & | rModel, |
const INetURLObject & | rUserURL | ||
) |
Definition at line 289 of file galleryfilestorage.cxx.
References aURL, SdrModel::BurnInStyleSheetAttributes(), GetSvDrawStorage(), GetSvDrawStreamNameFromURL(), implCreateUniqueURL(), tools::SvRef< typename T >::is(), SvStream::Seek(), SvDraw, SvxDrawingLayerExport(), and GalleryCodec::Write().
SgaObjectSvDraw GalleryFileStorage::insertModelStream | ( | const tools::SvRef< SotTempStream > & | rxModelStream, |
const INetURLObject & | rUserURL | ||
) |
Definition at line 384 of file galleryfilestorage.cxx.
References aURL, GetSvDrawStorage(), GetSvDrawStreamNameFromURL(), implCreateUniqueURL(), tools::SvRef< typename T >::is(), SvDraw, and GalleryCodec::Write().
void GalleryFileStorage::insertObject | ( | const SgaObject & | rObj, |
GalleryObject * | pFoundEntry, | ||
sal_uInt32 | nInsertPos | ||
) |
Definition at line 133 of file galleryfilestorage.cxx.
References implReadSgaObject(), implWriteSgaObject(), GalleryObject::nOffset, and SetTitle().
bool GalleryFileStorage::readModel | ( | const GalleryObject * | pObject, |
SdrModel & | rModel | ||
) |
Definition at line 267 of file galleryfilestorage.cxx.
References aURL, GallerySvDrawImport(), GetSvDrawStorage(), GetSvDrawStreamNameFromURL(), ImplGetURL(), tools::SvRef< typename T >::is(), pObject, and STREAMBUF_SIZE.
bool GalleryFileStorage::readModelStream | ( | const GalleryObject * | pObject, |
tools::SvRef< SotTempStream > const & | rxModelStream | ||
) |
Definition at line 336 of file galleryfilestorage.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 GalleryFileStorage::removeObject | ( | const std::unique_ptr< GalleryObject > & | pEntry | ) |
Definition at line 160 of file galleryfilestorage.cxx.
References GalleryObjectCollection::getObjectList(), GetSdgURL(), GetSvDrawStorage(), KillFile(), mrGalleryObjectCollection, INetURLObject::NONE, and SvDraw.
void GalleryFileStorage::setDestDir | ( | const OUString & | rDestDir, |
bool | bRelative | ||
) |
Definition at line 66 of file galleryfilestorage.cxx.
References m_aDestDir, and m_bDestDirRelative.
SgaObjectSvDraw GalleryFileStorage::updateSvDrawObject | ( | const GalleryObject * | pEntry | ) |
Definition at line 532 of file galleryfilestorage.cxx.
References GetSvDrawStorage(), GetSvDrawStreamNameFromURL(), tools::SvRef< typename T >::is(), and GalleryObject::m_oStorageUrl.
void GalleryFileStorage::updateTheme | ( | ) |
Definition at line 554 of file galleryfilestorage.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 & GalleryFileStorage::writeGalleryTheme | ( | SvStream & | rOStm, |
const GalleryTheme & | rTheme, | ||
const GalleryThemeEntry * | pThm | ||
) |
Definition at line 688 of file galleryfilestorage.cxx.
References COMPAT_FORMAT(), GalleryObject::eObjKind, GalleryObjectCollection::getForPosition(), GalleryTheme::GetId(), INetURLObject::GetMainURL(), GalleryTheme::GetParent(), Gallery::GetRelativeURL(), GetSvDrawStreamNameFromURL(), GalleryThemeEntry::GetThemeName(), Gallery::GetUserURL(), i, GalleryThemeEntry::IsNameFromResource(), m_aDestDir, m_bDestDirRelative, GalleryObject::m_oStorageUrl, 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 52 of file galleryfilestorage.hxx.
Referenced by implWriteSgaObject(), setDestDir(), and writeGalleryTheme().
|
private |
Definition at line 48 of file galleryfilestorage.hxx.
Referenced by clearSotStorage(), GetSvDrawStorage(), and ImplCreateSvDrawStorage().
|
private |
Definition at line 53 of file galleryfilestorage.hxx.
Referenced by setDestDir(), and writeGalleryTheme().
|
private |
Definition at line 49 of file galleryfilestorage.hxx.
|
private |
Definition at line 51 of file galleryfilestorage.hxx.
Referenced by ImplCreateSvDrawStorage().
|
private |
Definition at line 50 of file galleryfilestorage.hxx.
Referenced by implCreateUniqueURL(), implWriteSgaObject(), removeObject(), updateTheme(), and writeGalleryTheme().