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 + +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 - -const char szServiceName_UnoControlDialog[] = "stardiv.vcl.control.Dialog"; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */