diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2010-01-29 14:16:17 +0100 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2010-01-29 14:16:17 +0100 |
commit | d10477ee1ad60b8c8a47b89358108e860b58b15e (patch) | |
tree | 1fb8265237bb2f9136711a9a42d211eee3f4eaa4 /sc | |
parent | bbf914060be8436a792e898e68906213badf0b22 (diff) | |
parent | ea62ada1ce0c04388de528a21f1e5d2edfab0fcf (diff) |
CWS-TOOLING: integrate CWS dba32z_DEV300
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/attarray.cxx | 3 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 22 |
2 files changed, 23 insertions, 2 deletions
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx index 590f278901d6..a4875ba4d1e3 100644 --- a/sc/source/core/data/attarray.cxx +++ b/sc/source/core/data/attarray.cxx @@ -2117,7 +2117,8 @@ void ScAttrArray::InsertRow( SCROW nStartRow, SCSIZE nSize ) } // Don't duplicate the merge flags in the inserted row. - RemoveFlags( nStartRow, nStartRow+nSize-1, SC_MF_ALL ); + // #i108488# SC_MF_SCENARIO has to be allowed. + RemoveFlags( nStartRow, nStartRow+nSize-1, SC_MF_HOR | SC_MF_VER | SC_MF_AUTO | SC_MF_BUTTON ); } diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 94613379a32d..c2fd53acb736 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -1575,6 +1575,26 @@ static bool lcl_CopyStreamElement( const uno::Reference< io::XInputStream >& xIn return true; // successful } +static void lcl_SkipBytesInBlocks( const uno::Reference< io::XInputStream >& xInput, sal_Int32 nBytesToSkip ) +{ + // skipBytes in zip stream is implemented as reading. + // For now, split into several calls to avoid allocating a large buffer. + // Later, skipBytes should be changed. + + const sal_Int32 nMaxSize = 32*1024; + + if ( nBytesToSkip > 0 ) + { + sal_Int32 nRemaining = nBytesToSkip; + while ( nRemaining > 0 ) + { + sal_Int32 nSkip = std::min( nRemaining, nMaxSize ); + xInput->skipBytes( nSkip ); + nRemaining -= nSkip; + } + } +} + void ScXMLExport::CopySourceStream( sal_Int32 nStartOffset, sal_Int32 nEndOffset, sal_Int32& rNewStart, sal_Int32& rNewEnd ) { uno::Reference<xml::sax::XDocumentHandler> xHandler = GetDocHandler(); @@ -1598,7 +1618,7 @@ void ScXMLExport::CopySourceStream( sal_Int32 nStartOffset, sal_Int32 nEndOffset rNewStart = (sal_Int32)xDestSeek->getPosition(); if ( nStartOffset > nSourceStreamPos ) - xSourceStream->skipBytes( nStartOffset - nSourceStreamPos ); + lcl_SkipBytesInBlocks( xSourceStream, nStartOffset - nSourceStreamPos ); if ( !lcl_CopyStreamElement( xSourceStream, xDestStream, nEndOffset - nStartOffset ) ) { |