summaryrefslogtreecommitdiff
path: root/framework/source/services
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-16 10:13:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-16 12:12:31 +0200
commit4a96fb8ec0130e1036913093836bcf28bc37a49b (patch)
treee7aad9be4ca417e9e64f688cc99bee0638037741 /framework/source/services
parentf33b6e341fb7dd1ab3acd4fe5457b716be316e89 (diff)
loplugin:bufferadd loosen some constraints
and extend O*StringView to have a constructor that takes a pointer and a length Change-Id: I6120e96280f030757e855a6596efdae438b7e1e8 Reviewed-on: https://gerrit.libreoffice.org/80872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source/services')
-rw-r--r--framework/source/services/desktop.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index 1a1352bcf526..c2cf82709ad1 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -116,14 +116,12 @@ void Desktop::constructorInit()
InterceptionHelper* pInterceptionHelper = new InterceptionHelper( this, xDispatchProvider );
m_xDispatchHelper.set( static_cast< ::cppu::OWeakObject* >(pInterceptionHelper), css::uno::UNO_QUERY );
- OUStringBuffer sUntitledPrefix (256);
- sUntitledPrefix.append (FwkResId(STR_UNTITLED_DOCUMENT));
- sUntitledPrefix.append (" ");
+ OUString sUntitledPrefix = FwkResId(STR_UNTITLED_DOCUMENT) + " ";
::comphelper::NumberedCollection* pNumbers = new ::comphelper::NumberedCollection ();
m_xTitleNumberGenerator.set(static_cast< ::cppu::OWeakObject* >(pNumbers), css::uno::UNO_QUERY_THROW);
pNumbers->setOwner ( static_cast< ::cppu::OWeakObject* >(this) );
- pNumbers->setUntitledPrefix ( sUntitledPrefix.makeStringAndClear () );
+ pNumbers->setUntitledPrefix ( sUntitledPrefix );
// Safe impossible cases
// We can't work without this helper!