[Libreoffice-commits] .: sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Thu Feb 9 19:39:26 PST 2012


 sc/source/ui/unoobj/scdetect.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit e20365e6dd940ff5564fa106a2bcbd174bce307e
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Thu Feb 9 22:39:32 2012 -0500

    ByteString to rtl::OString.

diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index a460a02..d9b644f 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -734,9 +734,9 @@ static sal_Bool lcl_MayBeDBase( SvStream& rStream )
                             // get file header
                             rStr.Seek( 0 );
                             const sal_Size nTrySize = 80;
-                            ByteString aHeader = read_uInt8s_ToOString(rStr, nTrySize);
+                            rtl::OString aHeader = read_uInt8s_ToOString(rStr, nTrySize);
 
-                            if ( HTMLParser::IsHTMLFormat( aHeader.GetBuffer() ) )
+                            if ( HTMLParser::IsHTMLFormat(aHeader.getStr()) )
                             {
                                 // test for HTML
                                 if ( pPreselectedFilter->GetName().EqualsAscii(pFilterHtml) )
@@ -750,7 +750,7 @@ static sal_Bool lcl_MayBeDBase( SvStream& rStream )
                                         bFakeXLS = true;
                                 }
                             }
-                            else if ( aHeader.CompareTo( "{\\rtf", 5 ) == COMPARE_EQUAL )
+                            else if ( aHeader.copy(0, 5).equalsL("{\\rtf", 5) )
                             {
                                 // test for RTF
                                 pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilterRtf) );


More information about the Libreoffice-commits mailing list