summaryrefslogtreecommitdiff
path: root/oox/inc/oox/ole
diff options
context:
space:
mode:
Diffstat (limited to 'oox/inc/oox/ole')
-rw-r--r--oox/inc/oox/ole/axbinaryreader.hxx16
-rw-r--r--oox/inc/oox/ole/oleobjecthelper.hxx2
-rwxr-xr-x[-rw-r--r--]oox/inc/oox/ole/olestorage.hxx10
-rw-r--r--oox/inc/oox/ole/vbacontrol.hxx2
-rw-r--r--oox/inc/oox/ole/vbainputstream.hxx17
-rwxr-xr-x[-rw-r--r--]oox/inc/oox/ole/vbamodule.hxx4
-rw-r--r--oox/inc/oox/ole/vbaproject.hxx2
7 files changed, 36 insertions, 17 deletions
diff --git a/oox/inc/oox/ole/axbinaryreader.hxx b/oox/inc/oox/ole/axbinaryreader.hxx
index f26075ff52eb..b986fc8065c6 100644
--- a/oox/inc/oox/ole/axbinaryreader.hxx
+++ b/oox/inc/oox/ole/axbinaryreader.hxx
@@ -40,7 +40,7 @@ namespace ole {
/** A wrapper for a binary input stream that supports aligned read operations.
The implementation does not support seeking back the wrapped stream. All
- seeking operations (tell, seek, align) are performed relative to the
+ seeking operations (tell, seekTo, align) are performed relative to the
position of the wrapped stream at construction time of this wrapper. It is
possible to construct this wrapper with an unseekable input stream without
loosing any functionality.
@@ -50,21 +50,26 @@ class AxAlignedInputStream : public BinaryInputStream
public:
explicit AxAlignedInputStream( BinaryInputStream& rInStrm );
+ /** Returns the size of the data this stream represents, if the wrapped
+ stream supports the size() operation. */
+ virtual sal_Int64 size() const;
/** Return the current relative stream position (relative to position of
the wrapped stream at construction time). */
virtual sal_Int64 tell() const;
/** Seeks the stream to the passed relative position, if it is behind the
current position. */
virtual void seek( sal_Int64 nPos );
+ /** Closes the input stream but not the wrapped stream. */
+ virtual void close();
/** Reads nBytes bytes to the passed sequence.
@return Number of bytes really read. */
- virtual sal_Int32 readData( StreamDataSequence& orData, sal_Int32 nBytes );
+ virtual sal_Int32 readData( StreamDataSequence& orData, sal_Int32 nBytes, size_t nAtomSize = 1 );
/** Reads nBytes bytes to the (existing) buffer opMem.
@return Number of bytes really read. */
- virtual sal_Int32 readMemory( void* opMem, sal_Int32 nBytes );
+ virtual sal_Int32 readMemory( void* opMem, sal_Int32 nBytes, size_t nAtomSize = 1 );
/** Seeks the stream forward by the passed number of bytes. */
- virtual void skip( sal_Int32 nBytes );
+ virtual void skip( sal_Int32 nBytes, size_t nAtomSize = 1 );
/** Aligns the stream to a multiple of the passed size (relative to the
position of the wrapped stream at construction time). */
@@ -78,8 +83,9 @@ public:
inline void skipAligned() { align( sizeof( Type ) ); skip( sizeof( Type ) ); }
private:
- BinaryInputStream& mrInStrm; /// The wrapped input stream.
+ BinaryInputStream* mpInStrm; /// The wrapped input stream.
sal_Int64 mnStrmPos; /// Tracks relative position in the stream.
+ sal_Int64 mnStrmSize; /// Size of the wrapped stream data.
};
// ============================================================================
diff --git a/oox/inc/oox/ole/oleobjecthelper.hxx b/oox/inc/oox/ole/oleobjecthelper.hxx
index c3a58213abc9..159384b0fcab 100644
--- a/oox/inc/oox/ole/oleobjecthelper.hxx
+++ b/oox/inc/oox/ole/oleobjecthelper.hxx
@@ -63,7 +63,7 @@ class OleObjectHelper
{
public:
explicit OleObjectHelper(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxFactory );
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxModelFactory );
~OleObjectHelper();
bool importOleObject(
diff --git a/oox/inc/oox/ole/olestorage.hxx b/oox/inc/oox/ole/olestorage.hxx
index eabcfd4d0f87..5ea9d023257b 100644..100755
--- a/oox/inc/oox/ole/olestorage.hxx
+++ b/oox/inc/oox/ole/olestorage.hxx
@@ -32,7 +32,7 @@
namespace com { namespace sun { namespace star {
namespace container { class XNameContainer; }
- namespace lang { class XMultiServiceFactory; }
+ namespace uno { class XComponentContext; }
} } }
namespace oox {
@@ -45,12 +45,12 @@ class OleStorage : public StorageBase
{
public:
explicit OleStorage(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxFactory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rxInStream,
bool bBaseStreamAccess );
explicit OleStorage(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxFactory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& rxOutStream,
bool bBaseStreamAccess );
@@ -101,8 +101,8 @@ private:
virtual void implCommit() const;
private:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
- mxFactory; /// Factory for storage/stream creation.
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+ mxContext; /// Component context with service manager.
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >
mxStorage; /// Access to elements of this sub storage.
const OleStorage* mpParentStorage; /// Parent OLE storage that contains this storage.
diff --git a/oox/inc/oox/ole/vbacontrol.hxx b/oox/inc/oox/ole/vbacontrol.hxx
index 8c4274ffda7e..941b7d06d95a 100644
--- a/oox/inc/oox/ole/vbacontrol.hxx
+++ b/oox/inc/oox/ole/vbacontrol.hxx
@@ -206,7 +206,7 @@ public:
rtl_TextEncoding eTextEnc );
private:
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxCompContext;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxContext;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > mxDocModel;
ControlConverter maConverter;
};
diff --git a/oox/inc/oox/ole/vbainputstream.hxx b/oox/inc/oox/ole/vbainputstream.hxx
index 858698518968..bc73eb3b2ce2 100644
--- a/oox/inc/oox/ole/vbainputstream.hxx
+++ b/oox/inc/oox/ole/vbainputstream.hxx
@@ -42,14 +42,23 @@ class VbaInputStream : public BinaryInputStream
public:
explicit VbaInputStream( BinaryInputStream& rInStrm );
+ /** Returns -1, stream size is not determinable. */
+ virtual sal_Int64 size() const;
+ /** Returns -1, stream position is not tracked. */
+ virtual sal_Int64 tell() const;
+ /** Does nothing, stream is not seekable. */
+ virtual void seek( sal_Int64 nPos );
+ /** Closes the input stream but not the wrapped stream. */
+ virtual void close();
+
/** Reads nBytes bytes to the passed sequence.
@return Number of bytes really read. */
- virtual sal_Int32 readData( StreamDataSequence& orData, sal_Int32 nBytes );
+ virtual sal_Int32 readData( StreamDataSequence& orData, sal_Int32 nBytes, size_t nAtomSize = 1 );
/** Reads nBytes bytes to the (existing) buffer opMem.
@return Number of bytes really read. */
- virtual sal_Int32 readMemory( void* opMem, sal_Int32 nBytes );
+ virtual sal_Int32 readMemory( void* opMem, sal_Int32 nBytes, size_t nAtomSize = 1 );
/** Seeks the stream forward by the passed number of bytes. */
- virtual void skip( sal_Int32 nBytes );
+ virtual void skip( sal_Int32 nBytes, size_t nAtomSize = 1 );
private:
/** If no data left in chunk buffer, reads the next chunk from stream. */
@@ -58,7 +67,7 @@ private:
private:
typedef ::std::vector< sal_uInt8 > ChunkBuffer;
- BinaryInputStream& mrInStrm;
+ BinaryInputStream* mpInStrm;
ChunkBuffer maChunk;
size_t mnChunkPos;
};
diff --git a/oox/inc/oox/ole/vbamodule.hxx b/oox/inc/oox/ole/vbamodule.hxx
index 52b2261e55b5..57a1de3169a3 100644..100755
--- a/oox/inc/oox/ole/vbamodule.hxx
+++ b/oox/inc/oox/ole/vbamodule.hxx
@@ -35,6 +35,7 @@ namespace com { namespace sun { namespace star {
namespace container { class XNameAccess; }
namespace container { class XNameContainer; }
namespace frame { class XModel; }
+ namespace uno { class XComponentContext; }
} } }
namespace oox {
@@ -51,6 +52,7 @@ class VbaModule
{
public:
explicit VbaModule(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxDocModel,
const ::rtl::OUString& rName,
rtl_TextEncoding eTextEnc,
@@ -90,6 +92,8 @@ private:
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& rxDocObjectNA ) const;
private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+ mxContext; /// Component context with service manager.
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
mxDocModel; /// Document model used to import/export the VBA project.
::rtl::OUString maName;
diff --git a/oox/inc/oox/ole/vbaproject.hxx b/oox/inc/oox/ole/vbaproject.hxx
index 40e81c923d25..c5446e86dace 100644
--- a/oox/inc/oox/ole/vbaproject.hxx
+++ b/oox/inc/oox/ole/vbaproject.hxx
@@ -189,7 +189,7 @@ private:
typedef ::std::map< ::rtl::OUString, sal_Int32 > DummyModuleMap;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
- mxCompContext; /// Component context with service manager.
+ mxContext; /// Component context with service manager.
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
mxDocModel; /// Document model used to import/export the VBA project.
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >