35 , aSoundURL(
std::move(aString))
40 css::uno::Reference< css::ucb::XCommandEnvironment >(),
44 nFileSize =
static_cast<sal_uInt32
>(nVal);
46 catch( css::uno::Exception& )
62 if ( !aExtension.isEmpty() )
64 aExtension =
"." + aExtension;
80 if ( !
aName.isEmpty() )
81 nSize +=
aName.getLength() * 2 + 8;
82 if ( !aExtension.isEmpty() )
83 nSize += aExtension.getLength() * 2 + 8;
85 OUString aId( OUString::number(
nId) );
86 nSize += 2 * aId.getLength() + 8;
98 css::uno::Reference< css::ucb::XCommandEnvironment >(),
105 sal_Int32
i, nSoundNameLen = aSoundName.getLength();
110 for (
i = 0;
i < nSoundNameLen; ++
i )
114 sal_Int32 nExtensionLen = aExtension.getLength();
119 for (
i = 0;
i < nExtensionLen; ++
i )
123 OUString aId( OUString::number(
nId ) );
124 sal_Int32 nIdLen = aId.getLength();
126 for (
i = 0;
i < nIdLen; ++
i )
134 std::unique_ptr<sal_uInt8[]> pBuf(
new sal_uInt8[ 0x10000 ] );
137 sal_uInt32 nToDo = std::min<sal_uInt32>( nBytesLeft, 0x10000 );
138 pSourceFile->ReadBytes(pBuf.get(), nToDo);
144 catch( css::uno::Exception& )
152 sal_uInt32 nSoundId = 0;
153 if (!rString.isEmpty())
155 const sal_uInt32 nSoundCount =
maEntries.size();
158 [&rString](
const ExSoundEntry& rEntry) { return rEntry.IsSameURL(rString); });
159 nSoundId =
static_cast<sal_uInt32
>(std::distance(
maEntries.begin(), iter));
161 if ( nSoundId++ == nSoundCount )
177 sal_uInt32 nSize = 0;
184 nSize += rEntry.GetSize(
i);
197 sal_uInt32 nSoundCount =
maEntries.size();
OUString GetFileExtension() const
OUString GetLastName(DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
std::size_t WriteBytes(const void *pData, std::size_t nSize)
SvStream & WriteUInt16(sal_uInt16 nUInt16)
SvStream & WriteUInt32(sal_uInt32 nUInt32)
sal_uInt32 GetId(const OUString &)
std::vector< ExSoundEntry > maEntries
sal_uInt32 GetSize() const
void Write(SvStream &rSt) const
void Write(SvStream &rSt, sal_uInt32 nId) const
ExSoundEntry(OUString aSoundURL)
sal_uInt32 GetFileSize() const
sal_uInt32 GetSize(sal_uInt32 nId) const
OUString ImplGetName() const
bool IsSameURL(std::u16string_view rURL) const
OUString ImplGetExtension() const
css::uno::Any getPropertyValue(const OUString &rPropertyName)
static std::unique_ptr< SvStream > CreateStream(const OUString &rFileName, StreamMode eOpenMode, css::uno::Reference< css::awt::XWindow > xParentWin=nullptr)
#define EPP_SoundCollection
#define EPP_SoundCollAtom
Reference< XComponentContext > getProcessComponentContext()