summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-09-26 11:27:22 +0200
committerCaolán McNamara <caolanm@redhat.com>2013-09-27 11:16:11 +0200
commitb3a8056a499ca2a5cb809fcec52aebddd4e17f23 (patch)
tree176da629cc41ffba02616c8b8caf919da77eb9da /sc
parentb3c860acf3a9e0806f2e4451a6f8ceb74565f57d (diff)
Related: fdo#38838 remove UniString::SearchBackward
Change-Id: Ia474ee07b1bd411eae8cd1ddd55c4fa83dbd5f47
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/address.cxx4
-rw-r--r--sc/source/filter/excel/xlroot.cxx2
-rw-r--r--sc/source/filter/inc/xlroot.hxx4
3 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 3a8aed3640bf..bf6beb374c12 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1056,8 +1056,8 @@ lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAdd
{
// Specified table name is not found in this document. Assume this is an external document.
aDocName = aTab;
- xub_StrLen n = aTab.SearchBackward('.');
- if (n != STRING_NOTFOUND && n > 0)
+ sal_Int32 n = aDocName.lastIndexOf('.');
+ if (n != -1 && n > 0)
{
// Extension found. Strip it.
aTab.Erase(n);
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index 6e6d3e16a47d..b21bb240d20f 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -130,7 +130,7 @@ XclRootData::XclRootData( XclBiff eBiff, SfxMedium& rMedium,
if( const SfxItemSet* pItemSet = mrMedium.GetItemSet() )
if( const SfxStringItem* pItem = static_cast< const SfxStringItem* >( pItemSet->GetItem( SID_FILE_NAME ) ) )
maDocUrl = pItem->GetValue();
- maBasePath = maDocUrl.Copy( 0, maDocUrl.SearchBackward( '/' ) + 1 );
+ maBasePath = maDocUrl.copy( 0, maDocUrl.lastIndexOf( '/' ) + 1 );
// extended document options - always own object, try to copy existing data from document
if( const ScExtDocOptions* pOldDocOpt = mrDoc.GetExtDocOptions() )
diff --git a/sc/source/filter/inc/xlroot.hxx b/sc/source/filter/inc/xlroot.hxx
index 2f1726d39485..f2cf2d33aaea 100644
--- a/sc/source/filter/inc/xlroot.hxx
+++ b/sc/source/filter/inc/xlroot.hxx
@@ -82,7 +82,7 @@ struct XclRootData
SfxMedium& mrMedium; /// The medium to import from.
SotStorageRef mxRootStrg; /// The root OLE storage of imported/exported file.
ScDocument& mrDoc; /// The source or destination document.
- String maDocUrl; /// Document URL of imported/exported file.
+ OUString maDocUrl; /// Document URL of imported/exported file.
String maBasePath; /// Base path of imported/exported file (path of maDocUrl).
String maUserName; /// Current user name.
const String maDefPassword; /// The default password used for stream encryption.
@@ -178,7 +178,7 @@ public:
/** Returns the medium to import from. */
inline SfxMedium& GetMedium() const { return mrData.mrMedium; }
/** Returns the document URL of the imported/exported file. */
- inline const String& GetDocUrl() const { return mrData.maDocUrl; }
+ inline const OUString& GetDocUrl() const { return mrData.maDocUrl; }
/** Returns the base path of the imported/exported file. */
inline const String& GetBasePath() const { return mrData.maBasePath; }
/** Returns the current user name. */