summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/linkmgr2.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-06-11 13:15:18 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-06-11 14:46:46 +0100
commit8f5629fd5aafc85e509a4160a11a285b0a66e7c0 (patch)
tree143883c85467b5ce9f5c665338e0f8a25067a0cd /sfx2/source/appl/linkmgr2.cxx
parent2106d8e648449d34b195068eef5f672a14ea64a8 (diff)
remove EraseLeadingChars and EraseTrailingChars
Change-Id: Ib9797fe97cd008cc6508ce8cec47dc5373416892
Diffstat (limited to 'sfx2/source/appl/linkmgr2.cxx')
-rw-r--r--sfx2/source/appl/linkmgr2.cxx20
1 files changed, 16 insertions, 4 deletions
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 663e98e89168..be02f9fadafc 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -26,6 +26,7 @@
*
************************************************************************/
+#include <comphelper/string.hxx>
#include <sfx2/linkmgr.hxx>
#include <com/sun/star/document/UpdateDocMode.hpp>
#include <sfx2/objsh.hxx>
@@ -404,14 +405,25 @@ void MakeLnkName( String& rName, const String* pType, const String& rFile,
const String& rLink, const String* pFilter )
{
if( pType )
- (rName = *pType).EraseLeadingChars().EraseTrailingChars() += cTokenSeperator;
+ {
+ rName = comphelper::string::strip(*pType, ' ');
+ rName += cTokenSeperator;
+ }
else if( rName.Len() )
rName.Erase();
- ((rName += rFile).EraseLeadingChars().EraseTrailingChars() +=
- cTokenSeperator ).EraseLeadingChars().EraseTrailingChars() += rLink;
+ rName += rFile;
+
+ rName = comphelper::string::strip(rName, ' ');
+ rName += cTokenSeperator;
+ rName = comphelper::string::strip(rName, ' ');
+ rName += rLink;
if( pFilter )
- ((rName += cTokenSeperator ) += *pFilter).EraseLeadingChars().EraseTrailingChars();
+ {
+ rName += cTokenSeperator;
+ rName += *pFilter;
+ rName = comphelper::string::strip(rName, ' ');
+ }
}
void LinkManager::ReconnectDdeLink(SfxObjectShell& rServer)