[ooo-build-commit] Branch 'ooo/OOO320' - sc/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Fri Jan 22 17:24:10 PST 2010
sc/source/core/data/attarray.cxx | 3 ++-
sc/source/filter/xml/xmlexprt.cxx | 22 +++++++++++++++++++++-
2 files changed, 23 insertions(+), 2 deletions(-)
New commits:
commit 9cc8013a4fd5eacc17abce1f1dae01132db90516
Author: Oliver Bolte <obo at openoffice.org>
Date: Fri Jan 22 08:17:34 2010 +0000
CWS-TOOLING: integrate CWS dba32z
2010-01-21 08:54:11 +0100 fs r277940 : copying nn's fix from CWS dba321a herein, original commit comment: #i108488# #i108512# don't remove SC_MF_SCENARIO in ScAttrArray::InsertRow, block-wise skipping in zip stream
2010-01-21 08:52:26 +0100 fs r277939 : reverting the fix for #i108325#, which caused #i108423#. Adding another, less invasive workaround. Still not the final solution, which is covered by issue 108357
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 54e97c4..7524201 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 769ebf8..d738093 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 ) )
{
More information about the ooo-build-commit
mailing list