From 170cf525e4b070a57e2e389a98a1973521c3a9e7 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 12 Oct 2016 21:39:36 +0100 Subject: remove (yet yet another) StringListResource implementation Change-Id: Ifaf89badfc339f8253a629c6960df8a943b8cce5 --- dbaccess/source/ui/querydesign/query.src | 16 +++++----------- dbaccess/source/ui/querydesign/querycontroller.cxx | 11 ++++------- 2 files changed, 9 insertions(+), 18 deletions(-) (limited to 'dbaccess/source/ui/querydesign') diff --git a/dbaccess/source/ui/querydesign/query.src b/dbaccess/source/ui/querydesign/query.src index 861e9b6c512c..14c49a2d6ff4 100644 --- a/dbaccess/source/ui/querydesign/query.src +++ b/dbaccess/source/ui/querydesign/query.src @@ -353,19 +353,13 @@ String STR_INFO_OPENING_IN_SQL_VIEW "(except \"SQL command\", which doesn't make sense here) will be inserted."; }; -Resource RSC_QUERY_OBJECT_TYPE +StringArray RSC_QUERY_OBJECT_TYPE { - String 1 + ItemList [ en-US ] = { - Text [ en-US ] = "The table view"; - }; - String 2 - { - Text [ en-US ] = "The query"; - }; - String 3 - { - Text [ en-US ] = "The SQL statement"; + < "The table view"; >; + < "The query"; >; + < "The SQL statement"; >; }; }; diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index cf07fa1ef03d..c683536ba40f 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -24,7 +24,6 @@ #include "dbustrings.hrc" #include "defaultobjectnamecheck.hxx" #include "dlgsave.hxx" -#include "localresaccess.hxx" #include "uiservices.hxx" #include "QTableWindow.hxx" #include "QTableWindowData.hxx" @@ -75,7 +74,7 @@ #include #include #include -#include +#include #include #include #include @@ -223,11 +222,9 @@ namespace dbaui OUString lcl_getObjectResourceString( sal_uInt16 _nResId, sal_Int32 _nCommandType ) { OUString sMessageText = ModuleRes( _nResId ); - OUString sObjectType; - { - LocalResourceAccess aLocalRes( RSC_QUERY_OBJECT_TYPE, RSC_RESOURCE ); - sObjectType = ModuleRes( (sal_uInt16)( _nCommandType + 1 ) ); - } + ModuleRes aResId(RSC_QUERY_OBJECT_TYPE); + ResStringArray aResList(aResId); + OUString sObjectType = aResList.GetString(_nCommandType); sMessageText = sMessageText.replaceFirst( "$object$", sObjectType ); return sMessageText; } -- cgit