framework/source/layoutmanager/helpers.cxx              |    4 ++--
 framework/source/layoutmanager/helpers.hxx              |    2 +-
 framework/source/layoutmanager/toolbarlayoutmanager.cxx |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 0c98269868a63b308d238d14e0c324a5e5d26dde
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu May 2 13:05:46 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri May 3 08:00:49 2024 +0200

    replace createFromAscii with OUString literals in framework
    
    Change-Id: I4fccbfd57d942f64ce812c8a7e8e373296918af4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167011
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/framework/source/layoutmanager/helpers.cxx 
b/framework/source/layoutmanager/helpers.cxx
index ccce1b3e8673..22965a3e6a5d 100644
--- a/framework/source/layoutmanager/helpers.cxx
+++ b/framework/source/layoutmanager/helpers.cxx
@@ -154,14 +154,14 @@ bool lcl_checkUIElement(const uno::Reference< 
ui::XUIElement >& xUIElement, awt:
     return bRet;
 }
 
-uno::Reference< awt::XVclWindowPeer > createToolkitWindow( const 
uno::Reference< uno::XComponentContext >& rxContext, const uno::Reference< 
awt::XVclWindowPeer >& rParent, const char* pService )
+uno::Reference< awt::XVclWindowPeer > createToolkitWindow( const 
uno::Reference< uno::XComponentContext >& rxContext, const uno::Reference< 
awt::XVclWindowPeer >& rParent, const OUString& pService )
 {
     uno::Reference< awt::XToolkit2 > xToolkit = awt::Toolkit::create( 
rxContext );
 
     // describe window properties.
     css::awt::WindowDescriptor aDescriptor;
     aDescriptor.Type                =   awt::WindowClass_SIMPLE;
-    aDescriptor.WindowServiceName   =   OUString::createFromAscii( pService );
+    aDescriptor.WindowServiceName   =   pService;
     aDescriptor.ParentIndex         =   -1;
     aDescriptor.Parent = rParent;
     aDescriptor.Bounds              =   awt::Rectangle(0,0,0,0);
diff --git a/framework/source/layoutmanager/helpers.hxx 
b/framework/source/layoutmanager/helpers.hxx
index c58fa6665bad..b15ba4446ced 100644
--- a/framework/source/layoutmanager/helpers.hxx
+++ b/framework/source/layoutmanager/helpers.hxx
@@ -50,7 +50,7 @@ vcl::Window* getWindowFromXUIElement( const 
css::uno::Reference< css::ui::XUIEle
 SystemWindow* getTopSystemWindow( const css::uno::Reference< css::awt::XWindow 
>& xWindow );
 bool equalRectangles( const css::awt::Rectangle& rRect1, const 
css::awt::Rectangle& rRect2 );
 bool lcl_checkUIElement(const css::uno::Reference< css::ui::XUIElement >& 
xUIElement,css::awt::Rectangle& _rPosSize, css::uno::Reference< 
css::awt::XWindow >& _xWindow);
-css::uno::Reference< css::awt::XVclWindowPeer > createToolkitWindow( const 
css::uno::Reference< css::uno::XComponentContext >& rxContext, const 
css::uno::Reference< css::awt::XVclWindowPeer >& rParent, const char* pService 
);
+css::uno::Reference< css::awt::XVclWindowPeer > createToolkitWindow( const 
css::uno::Reference< css::uno::XComponentContext >& rxContext, const 
css::uno::Reference< css::awt::XVclWindowPeer >& rParent, const OUString& 
pService );
 WindowAlign ImplConvertAlignment( css::ui::DockingArea aAlignment );
 std::u16string_view getElementTypeFromResourceURL( std::u16string_view 
aResourceURL );
 void parseResourceURL( std::u16string_view aResourceURL, OUString& 
aElementType, OUString& aElementName );
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx 
b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 46bbe90fc17d..39f228ca1133 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -1004,7 +1004,7 @@ void ToolbarLayoutManager::resetDockingArea()
 void ToolbarLayoutManager::setParentWindow(
     const uno::Reference< awt::XVclWindowPeer >& xParentWindow )
 {
-    static const char DOCKINGAREASTRING[] = "dockingarea";
+    static constexpr OUString DOCKINGAREASTRING = u"dockingarea"_ustr;
 
     uno::Reference< awt::XWindow > xTopDockWindow( createToolkitWindow( 
m_xContext, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY );
     uno::Reference< awt::XWindow > xLeftDockWindow( createToolkitWindow( 
m_xContext, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY );

Reply via email to