26#include <com/sun/star/embed/XStorage.hpp>
27#include <com/sun/star/embed/XTransactionListener.hpp>
28#include <com/sun/star/io/XStream.hpp>
29#include <com/sun/star/io/XOutputStream.hpp>
30#include <com/sun/star/io/XInputStream.hpp>
31#include <com/sun/star/io/XSeekable.hpp>
34#pragma clang diagnostic push
35#pragma clang diagnostic ignored "-Wunknown-attributes"
39#pragma clang diagnostic pop
42#include <uno/environment.hxx>
49 css::uno::Reference< css::io::XSeekable>
m_xSeek;
53 StreamHelper(
const css::uno::Reference< css::io::XStream>& _xStream);
56 css::uno::Reference< css::io::XInputStream>
const &
getInputStream();
58 css::uno::Reference< css::io::XSeekable>
const &
getSeek();
62 typedef std::map< OUString, std::shared_ptr<StreamHelper> >
TStreamMap;
65 css::uno::Reference<css::embed::XStorage>
storage;
70 css::uno::Reference<css::embed::XStorage>
mapStorage()
const;
79 static OUString
registerStorage(
const css::uno::Reference< css::embed::XStorage>& _xStorage,
const OUString& _sURL);
81 static OUString
getRegisteredKey(
const css::uno::Reference< css::embed::XStorage>& _xStorage);
82 static void revokeStorage(
const OUString& _sKey,
const css::uno::Reference< css::embed::XTransactionListener>& _xListener);
84 static TStreamMap::mapped_type
registerStream(JNIEnv *
env,jstring
name, jstring key,sal_Int32 _nMode);
89 static OUString
removeURLPrefix(std::u16string_view _sURL, std::u16string_view _sFileURL);
contains all storages so far accessed.
static OUString registerStorage(const css::uno::Reference< css::embed::XStorage > &_xStorage, const OUString &_sURL)
static TStreamMap::mapped_type registerStream(JNIEnv *env, jstring name, jstring key, sal_Int32 _nMode)
static void throwJavaException(const css::uno::Exception &_aException, JNIEnv *env)
static void revokeStorage(const OUString &_sKey, const css::uno::Reference< css::embed::XTransactionListener > &_xListener)
static OUString getRegisteredKey(const css::uno::Reference< css::embed::XStorage > &_xStorage)
static OUString jstring2ustring(JNIEnv *env, jstring jstr)
static OUString removeOldURLPrefix(const OUString &_sURL)
static OUString removeURLPrefix(std::u16string_view _sURL, std::u16string_view _sFileURL)
static void revokeStream(JNIEnv *env, jstring name, jstring key)
static TStreamMap::mapped_type getRegisteredStream(JNIEnv *env, jstring name, jstring key)
static TStorages::mapped_type getRegisteredStorage(const OUString &_sKey)
css::uno::Reference< css::io::XOutputStream > m_xOutputStream
css::uno::Reference< css::io::XSeekable > const & getSeek()
css::uno::Reference< css::io::XStream > m_xStream
css::uno::Reference< css::io::XSeekable > m_xSeek
css::uno::Reference< css::io::XInputStream > m_xInputStream
css::uno::Reference< css::io::XInputStream > const & getInputStream()
StreamHelper(const css::uno::Reference< css::io::XStream > &_xStream)
css::uno::Reference< css::io::XOutputStream > const & getOutputStream()
const css::uno::Reference< css::xml::crypto::XSecurityEnvironment > & env
std::map< OUString, StorageData > TStorages
std::map< OUString, std::shared_ptr< StreamHelper > > TStreamMap
css::uno::Reference< css::embed::XStorage > mapStorage() const
css::uno::Reference< css::embed::XStorage > storage
css::uno::Environment storageEnvironment