diff options
author | Daniel Rentz [dr] <daniel.rentz@oracle.com> | 2011-03-23 14:41:21 +0100 |
---|---|---|
committer | Daniel Rentz [dr] <daniel.rentz@oracle.com> | 2011-03-23 14:41:21 +0100 |
commit | aa09f7647e19c161305c75bfcb79da8ef18611af (patch) | |
tree | beae7a0d77a2cb1e8a70b31fa9d9480efd731845 /sc | |
parent | 884863b8d334a138882568683bc2e2bcc1bc206d (diff) |
dr80: #i117511# remove some assertions in xlsx/xlsb import filters
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/document.cxx | 1 | ||||
-rw-r--r-- | sc/source/core/data/drwlayer.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/address.cxx | 10 |
3 files changed, 12 insertions, 3 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 714467d8e5eb..5d4026d01eb4 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -5254,6 +5254,7 @@ ScRowBreakIterator* ScDocument::GetRowBreakIterator(SCTAB nTab) const void ScDocument::EnableUndo( bool bVal ) { GetUndoManager()->EnableUndo(bVal); + if( pDrawLayer ) pDrawLayer->EnableUndo(bVal); mbUndoEnabled = bVal; } diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 9cff13d9030f..e07edd3278d1 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -283,6 +283,10 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const String& rName ) : if ( pHitOutlinerPool ) pHitOutlinerPool->SetPoolDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT )); // 12Pt + // initial undo mode as in Calc document + if( pDoc ) + EnableUndo( pDoc->IsUndoEnabled() ); + // URL-Buttons haben keinen Handler mehr, machen alles selber if( !nInst++ ) diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index 26a194b731ef..7d9059184110 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -377,14 +377,13 @@ const sal_Unicode* ScRange::Parse_XL_Header( } ++p; - // 1-based, sequence starts with an empty element. - if (pExternalLinks && pExternalLinks->getLength() > 1) + if (pExternalLinks && pExternalLinks->hasElements()) { // A numeric "document name" is an index into the sequence. if (CharClass::isAsciiNumeric( rExternDocName)) { sal_Int32 i = rExternDocName.ToInt32(); - if (i <= 0 || i >= pExternalLinks->getLength()) + if (i < 0 || i >= pExternalLinks->getLength()) return start; const sheet::ExternalLinkInfo & rInfo = (*pExternalLinks)[i]; switch (rInfo.Type) @@ -400,6 +399,11 @@ const sal_Unicode* ScRange::Parse_XL_Header( rExternDocName = aStr; } break; + case sheet::ExternalLinkType::SELF : + return start; // ??? + case sheet::ExternalLinkType::SPECIAL : + // silently return nothing (do not assert), caller has to handle this + return NULL; default: DBG_ERROR2( "ScRange::Parse_XL_Header: unhandled ExternalLinkType %d for index %d", rInfo.Type, i); |