28 #include <com/sun/star/ucb/ContentCreationException.hpp>
58 static sal_Int32 nIdx = 0;
83 pIStm->ReadUInt16(nVersion);
85 if (nVersion <= 0x00ff)
87 bool bThemeNameFromResource =
false;
88 sal_uInt32 nThemeId = 0;
91 OUString aThemeName = OStringToOUString(aTmpStr, RTL_TEXTENCODING_UTF8);
94 if (nVersion >= 0x0004)
99 pIStm->ReadUInt32(nCount).ReadUInt16(nTemp16);
105 if (pIStm->Tell() >= 520)
107 sal_uInt32 nId1, nId2;
109 pIStm->SeekRel(-520);
110 pIStm->ReadUInt32(nId1).ReadUInt32(nId2);
115 VersionCompatRead aCompat(*pIStm);
117 pIStm->ReadUInt32(nThemeId);
119 if (aCompat.GetVersion() >= 2)
121 pIStm->ReadCharAsBool(bThemeNameFromResource);
127 pRet =
new GalleryThemeEntry(
false, rURL, aThemeName, bReadOnly,
false, nThemeId,
128 bThemeNameFromResource);
149 std::unique_ptr<GalleryTheme>&
167 if (pIStm->GetError())
170 catch (
const css::ucb::ContentCreationException&)
GalleryBinaryEngineEntry()
std::unique_ptr< GalleryBinaryStorageLocations > mpGalleryStorageLocations
#define STREAM_SEEK_TO_END
OString read_uInt16_lenPrefixed_uInt8s_ToOString(SvStream &rStrm)
const INetURLObject & GetSdgURL() const
bool setName(OUString const &rTheName, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
const INetURLObject & GetStrURL() const
static std::unique_ptr< SvStream > CreateStream(const OUString &rFileName, StreamMode eOpenMode, css::uno::Reference< css::awt::XWindow > xParentWin=nullptr)
bool setExtension(OUString const &rTheExtension, sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
std::unique_ptr< GalleryTheme > & getCachedTheme(std::unique_ptr< GalleryTheme > &pNewTheme)
SvStream & ReadGalleryTheme(SvStream &rIn, GalleryTheme &rTheme)
static GalleryThemeEntry * CreateThemeEntry(const INetURLObject &rURL, bool bReadOnly)
SAL_DLLPRIVATE SvStream & ReadData(SvStream &rIn)
const INetURLObject & GetThmURL() const
#define DBG_ASSERT(sCon, aError)
sal_uInt32 COMPAT_FORMAT(char char1, char char2, char char3, char char4)
OUString getName(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true, DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
bool KillFile(const INetURLObject &rURL)
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
static bool FileExists(const INetURLObject &rURL, const OUString &rExt)
static void CreateUniqueURL(const INetURLObject &rBaseURL, INetURLObject &aURL)
INetProtocol GetProtocol() const
const INetURLObject & GetSdvURL() const
static INetURLObject ImplGetURLIgnoreCase(const INetURLObject &rURL)
std::unique_ptr< GalleryBinaryEngine > createGalleryStorageEngine(GalleryObjectCollection &mrGalleryObjectCollection, bool &bReadOnly)
void setStorageLocations(INetURLObject &rURL)