diff options
author | Eike Rathke <erack@redhat.com> | 2012-05-10 19:05:48 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-05-11 16:55:45 +0100 |
commit | c4f1c3053a4d892b0bbc8842044133b64eee00ae (patch) | |
tree | fb8c95beb2c893e756b5543c36c9f75ed5cf0de5 | |
parent | 2edf8cba49e8ba72fa7b0e02d24a38cab45c697c (diff) |
resolved fdo#49639 import .xls with HTML as such, not CSV
This restores the previous behavior for this content type, regression
introduced with the fix for fdo#40021 c2a26cf9dab637c292e431d5cdf7bab5bbda571d
Signed-off-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/source/ui/unoobj/scdetect.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx index 556d54fc6e68..59ae14b6e367 100644 --- a/sc/source/ui/unoobj/scdetect.cxx +++ b/sc/source/ui/unoobj/scdetect.cxx @@ -737,12 +737,14 @@ static sal_Bool lcl_MayBeDBase( SvStream& rStream ) const sal_Size nTrySize = 80; ByteString aHeader = read_uInt8s_AsOString(rStr, nTrySize); + bool bMaybeHtml = HTMLParser::IsHTMLFormat( aHeader.GetBuffer()); + if ( aHeader.CompareTo( "{\\rtf", 5 ) == COMPARE_EQUAL ) { // test for RTF pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilterRtf) ); } - else if ( bIsXLS && bMaybeText ) + else if ( bIsXLS && (bMaybeText && !bMaybeHtml) ) { aHeader = comphelper::string::stripStart(aHeader, ' '); // Detect Excel 2003 XML here only if XLS was preselected. @@ -756,7 +758,7 @@ static sal_Bool lcl_MayBeDBase( SvStream& rStream ) pFilter = pPreselectedFilter; else if ( pPreselectedFilter->GetFilterName().EqualsAscii(pFilterAscii) && bMaybeText ) pFilter = pPreselectedFilter; - else if ( HTMLParser::IsHTMLFormat( aHeader.GetBuffer() ) ) + else if ( bMaybeHtml ) { // test for HTML |