summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-22 17:17:53 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-23 10:10:08 +0000
commit20153742d2dee2df022275a07cc958b1759b9b72 (patch)
treea91d3d42faa559783d407bb1fe08f4070d945762 /sc
parenta22ce3e4483f6fe462eaba8826a91355957e3676 (diff)
add a stripStart, can replace EraseLeadingChars
Diffstat (limited to 'sc')
-rw-r--r--sc/Library_scd.mk1
-rw-r--r--sc/source/ui/unoobj/scdetect.cxx3
2 files changed, 3 insertions, 1 deletions
diff --git a/sc/Library_scd.mk b/sc/Library_scd.mk
index cc879c845a3a..cff297576fa0 100644
--- a/sc/Library_scd.mk
+++ b/sc/Library_scd.mk
@@ -39,6 +39,7 @@ $(eval $(call gb_Library_add_api,scd,\
))
$(eval $(call gb_Library_add_linked_libs,scd,\
+ comphelper \
cppu \
cppuhelper \
sal \
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index 59ba7f1fe304..1132a767157d 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -41,6 +41,7 @@
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/processfactory.hxx>
+#include <comphelper/string.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/io/XInputStream.hpp>
@@ -729,7 +730,7 @@ static sal_Bool lcl_MayBeDBase( SvStream& rStream )
}
else if ( bIsXLS && bMaybeText )
{
- aHeader.EraseLeadingChars();
+ aHeader = comphelper::string::stripStart(aHeader, ' ');
if( aHeader.CompareTo( "<?xml", 5 ) == COMPARE_EQUAL )
pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilter2003XML) );
else