summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/filter/inc/biffoutputstream.hxx3
-rw-r--r--sc/source/filter/inc/sheetdatabuffer.hxx2
-rw-r--r--sc/source/filter/oox/biffoutputstream.cxx10
-rw-r--r--sc/source/filter/oox/sheetdatabuffer.cxx11
4 files changed, 26 insertions, 0 deletions
diff --git a/sc/source/filter/inc/biffoutputstream.hxx b/sc/source/filter/inc/biffoutputstream.hxx
index 7ea14a13aef2..45ae4d8dd854 100644
--- a/sc/source/filter/inc/biffoutputstream.hxx
+++ b/sc/source/filter/inc/biffoutputstream.hxx
@@ -46,6 +46,9 @@ namespace prv {
class BiffOutputRecordBuffer
{
public:
+ explicit BiffOutputRecordBuffer(
+ BinaryOutputStream& rOutStrm,
+ sal_uInt16 nMaxRecSize );
/** Returns the wrapped binary base stream. */
inline const BinaryOutputStream& getBaseStream() const { return mrOutStrm; }
diff --git a/sc/source/filter/inc/sheetdatabuffer.hxx b/sc/source/filter/inc/sheetdatabuffer.hxx
index 05ccc19cbb60..3e83420301c7 100644
--- a/sc/source/filter/inc/sheetdatabuffer.hxx
+++ b/sc/source/filter/inc/sheetdatabuffer.hxx
@@ -95,6 +95,8 @@ struct DataTableModel
class CellBlock : public WorksheetHelper
{
public:
+ explicit CellBlock( const WorksheetHelper& rHelper, const ValueRange& rColSpan, sal_Int32 nRow );
+
/** Returns true, if the own colspan contains the passed column. */
bool contains( sal_Int32 nCol ) const;
diff --git a/sc/source/filter/oox/biffoutputstream.cxx b/sc/source/filter/oox/biffoutputstream.cxx
index 7fd233d4742e..f4d24fee428c 100644
--- a/sc/source/filter/oox/biffoutputstream.cxx
+++ b/sc/source/filter/oox/biffoutputstream.cxx
@@ -35,6 +35,16 @@ namespace xls {
namespace prv {
+BiffOutputRecordBuffer::BiffOutputRecordBuffer( BinaryOutputStream& rOutStrm, sal_uInt16 nMaxRecSize ) :
+ mrOutStrm( rOutStrm ),
+ mnMaxRecSize( nMaxRecSize ),
+ mnRecId( BIFF_ID_UNKNOWN ),
+ mbInRec( false )
+{
+ OSL_ENSURE( mrOutStrm.isSeekable(), "BiffOutputRecordBuffer::BiffOutputRecordBuffer - stream must be seekable" );
+ maData.reserve( SAL_MAX_UINT16 );
+}
+
void BiffOutputRecordBuffer::startRecord( sal_uInt16 nRecId )
{
OSL_ENSURE( !mbInRec, "BiffOutputRecordBuffer::startRecord - another record still open" );
diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx
index b0f778dc212b..561083afc383 100644
--- a/sc/source/filter/oox/sheetdatabuffer.cxx
+++ b/sc/source/filter/oox/sheetdatabuffer.cxx
@@ -117,6 +117,17 @@ const sal_Int32 CELLBLOCK_MAXROWS = 16; /// Number of rows in a cell block.
} // namespace
+CellBlock::CellBlock( const WorksheetHelper& rHelper, const ValueRange& rColSpan, sal_Int32 nRow ) :
+ WorksheetHelper( rHelper ),
+ maRange( rHelper.getSheetIndex(), rColSpan.mnFirst, nRow, rColSpan.mnLast, nRow ),
+ mnRowLength( rColSpan.mnLast - rColSpan.mnFirst + 1 ),
+ mnFirstFreeIndex( 0 )
+{
+ maCellArray.realloc( 1 );
+ maCellArray[ 0 ].realloc( mnRowLength );
+ mpCurrCellRow = maCellArray[ 0 ].getArray();
+}
+
bool CellBlock::contains( sal_Int32 nCol ) const
{
return (maRange.StartColumn <= nCol) && (nCol <= maRange.EndColumn);