summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-05-02 15:34:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-05-04 20:12:03 +0200
commitf221ccd6dc5340038daa024bb4384b0a3f8e7259 (patch)
treef70fd18dc0900f3497b7c050032a5cdaf13173ed /toolkit
parentb9cc4575c6b3f25c971fc2d8c82f8254e744eea0 (diff)
replace createFromAscii with OUString literals in toolkit
Change-Id: I039ee0068cdd8640678524079dd60540abbf876c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167126 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/Library_tk.mk1
-rw-r--r--toolkit/inc/helper/servicenames.hxx4
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx2
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx2
-rw-r--r--toolkit/source/helper/servicenames.cxx24
5 files changed, 5 insertions, 28 deletions
diff --git a/toolkit/Library_tk.mk b/toolkit/Library_tk.mk
index 15029b8a0996..cfdd3ce9a371 100644
--- a/toolkit/Library_tk.mk
+++ b/toolkit/Library_tk.mk
@@ -126,7 +126,6 @@ $(eval $(call gb_Library_add_exception_objects,tk,\
toolkit/source/helper/imagealign \
toolkit/source/helper/listenermultiplexer \
toolkit/source/helper/property \
- toolkit/source/helper/servicenames \
toolkit/source/helper/tkresmgr \
toolkit/source/helper/unopropertyarrayhelper \
toolkit/source/helper/unowrapper \
diff --git a/toolkit/inc/helper/servicenames.hxx b/toolkit/inc/helper/servicenames.hxx
index 7fb7ab2a573c..07a372d48494 100644
--- a/toolkit/inc/helper/servicenames.hxx
+++ b/toolkit/inc/helper/servicenames.hxx
@@ -19,6 +19,8 @@
#pragma once
-extern const char szServiceName_UnoControlDialog[];
+#include <rtl/ustring.hxx>
+
+inline constexpr OUString sServiceName_UnoControlDialog = u"stardiv.vcl.control.Dialog"_ustr;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index 8c9bba0890de..882d78dbfadf 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -165,7 +165,7 @@ Any ControlModelContainerBase::ImplGetDefaultValue( sal_uInt16 nPropId ) const
switch ( nPropId )
{
case BASEPROPERTY_DEFAULTCONTROL:
- aAny <<= OUString::createFromAscii( szServiceName_UnoControlDialog );
+ aAny <<= sServiceName_UnoControlDialog;
break;
default:
aAny = UnoControlModel::ImplGetDefaultValue( nPropId );
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index 8adc7af9c41b..29dba64dcfc0 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -239,7 +239,7 @@ Any UnoControlDialogModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
switch ( nPropId )
{
case BASEPROPERTY_DEFAULTCONTROL:
- aAny <<= OUString::createFromAscii( szServiceName_UnoControlDialog );
+ aAny <<= sServiceName_UnoControlDialog;
break;
case BASEPROPERTY_SCROLLWIDTH:
case BASEPROPERTY_SCROLLHEIGHT:
diff --git a/toolkit/source/helper/servicenames.cxx b/toolkit/source/helper/servicenames.cxx
deleted file mode 100644
index 825672fd20a1..000000000000
--- a/toolkit/source/helper/servicenames.cxx
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <helper/servicenames.hxx>
-
-const char szServiceName_UnoControlDialog[] = "stardiv.vcl.control.Dialog";
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */