summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-08-28 22:47:02 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-08-29 11:44:44 +0000
commitbdd60f1f5e0b995572321fd0865ccb8849d8ed76 (patch)
tree36fd199eded442f12c223a6b9830e5202c85855c /sfx2
parent2c10714426cc813c36aa82e4870b7b51c5c03050 (diff)
Adapt loplugin:stringconstant to improved OUStringLiteral1
Change-Id: Ibc5128df8bcf8cb5f2f09551c0de6dfdb46bdee0 Reviewed-on: https://gerrit.libreoffice.org/28447 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/fileobj.cxx15
-rw-r--r--sfx2/source/appl/linkmgr2.cxx16
2 files changed, 14 insertions, 17 deletions
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index edcc9792568f..2a5464832c9a 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -410,10 +410,10 @@ void SvFileObject::Edit( vcl::Window* /*pParent*/, sfx2::SvBaseLink* pLink, cons
if( !aDlg.Execute() )
{
- sFile = aDlg.GetPath();
- sFile += OUString(::sfx2::cTokenSeparator);
- sFile += OUString(::sfx2::cTokenSeparator);
- sFile += aDlg.GetCurrentFilter();
+ sFile = aDlg.GetPath()
+ + OUStringLiteral1<sfx2::cTokenSeparator>()
+ + OUStringLiteral1<sfx2::cTokenSeparator>()
+ + aDlg.GetCurrentFilter();
aEndEditLink.Call( sFile );
}
@@ -501,10 +501,9 @@ IMPL_LINK_TYPED( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileD
if ( _pFileDlg && _pFileDlg->GetError() == ERRCODE_NONE )
{
OUString sURL( _pFileDlg->GetPath() );
- sFile = sURL;
- sFile += OUString(::sfx2::cTokenSeparator);
- sFile += OUString(::sfx2::cTokenSeparator);
- sFile += impl_getFilter( sURL );
+ sFile = sURL + OUStringLiteral1<sfx2::cTokenSeparator>()
+ + OUStringLiteral1<sfx2::cTokenSeparator>()
+ + impl_getFilter( sURL );
}
}
else
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index cfac8e848405..bc1c3a856d66 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -377,22 +377,20 @@ void MakeLnkName( OUString& rName, const OUString* pType, const OUString& rFile,
{
if( pType )
{
- rName = comphelper::string::strip(*pType, ' ');
- rName += OUString(cTokenSeparator);
+ rName = comphelper::string::strip(*pType, ' ')
+ + OUStringLiteral1<cTokenSeparator>();
}
- else if( !rName.isEmpty() )
+ else
rName.clear();
rName += rFile;
- rName = comphelper::string::strip(rName, ' ');
- rName += OUString(cTokenSeparator);
- rName = comphelper::string::strip(rName, ' ');
- rName += rLink;
+ rName = comphelper::string::strip(rName, ' ')
+ + OUStringLiteral1<cTokenSeparator>();
+ rName = comphelper::string::strip(rName, ' ') + rLink;
if( pFilter )
{
- rName += OUString(cTokenSeparator);
- rName += *pFilter;
+ rName += OUStringLiteral1<cTokenSeparator>() + *pFilter;
rName = comphelper::string::strip(rName, ' ');
}
}