dbaccess/source/ui/app/AppDetailView.cxx | 1 dbaccess/source/ui/dlg/ConnectionHelper.cxx | 2 dbaccess/source/ui/dlg/ConnectionPage.cxx | 2 dbaccess/source/ui/dlg/ConnectionPageSetup.cxx | 2 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 2 dbaccess/source/ui/dlg/TextConnectionHelper.cxx | 1 dbaccess/source/ui/dlg/adminpages.cxx | 2 dbaccess/source/ui/dlg/adtabdlg.cxx | 1 dbaccess/source/ui/dlg/dbadmin.cxx | 2 dbaccess/source/ui/dlg/dbwiz.cxx | 1 dbaccess/source/ui/dlg/dbwizsetup.cxx | 1 dbaccess/source/ui/dlg/detailpages.cxx | 2 dbaccess/source/ui/dlg/dsselect.cxx | 1 dbaccess/source/ui/dlg/generalpage.cxx | 2 dbaccess/source/ui/dlg/paramdialog.cxx | 1 dbaccess/source/ui/inc/localresaccess.hxx | 47 dbaccess/source/ui/querydesign/query.src | 16 dbaccess/source/ui/querydesign/querycontroller.cxx | 11 extensions/source/abpilot/abspilot.cxx | 1 extensions/source/dbpilots/commonpagesdbp.cxx | 1 extensions/source/dbpilots/controlwizard.cxx | 1 extensions/source/propctrlr/formlinkdialog.cxx | 1 extensions/source/propctrlr/formmetadata.cxx | 20 extensions/source/propctrlr/formres.src | 653 +++-------- extensions/source/propctrlr/sqlcommanddesign.cxx | 7 extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx | 1 include/svtools/localresaccess.hxx | 74 - reportdesign/source/ui/inspection/metadata.cxx | 1 sfx2/source/dialog/styfitem.cxx | 41 svtools/source/dialogs/addresstemplate.cxx | 1 30 files changed, 271 insertions(+), 628 deletions(-)
New commits: commit 15f5fdef976ac2a2fc7192ce7cd4324e0820a2ed Author: Caolán McNamara <caol...@redhat.com> Date: Wed Oct 12 21:42:03 2016 +0100 move this monstrosity to the last place its used Change-Id: I4691f20143406249afc8da1a6dfa901224f4a62d diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx index 8ceb9e2..ca16523 100644 --- a/extensions/source/abpilot/abspilot.cxx +++ b/extensions/source/abpilot/abspilot.cxx @@ -23,7 +23,6 @@ #include "componentmodule.hxx" #include <comphelper/processfactory.hxx> #include <tools/debug.hxx> -#include <svtools/localresaccess.hxx> #include "typeselectionpage.hxx" #include "admininvokationpage.hxx" #include "tableselectionpage.hxx" diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index 84ee2e1..0dc6b27 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -30,7 +30,6 @@ #include <com/sun/star/sdb/CommandType.hpp> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> #include <tools/debug.hxx> -#include <svtools/localresaccess.hxx> #include <comphelper/interaction.hxx> #include <connectivity/dbtools.hxx> #include <vcl/stdtext.hxx> diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx index 82ea3ea..8f9a21c 100644 --- a/extensions/source/dbpilots/controlwizard.cxx +++ b/extensions/source/dbpilots/controlwizard.cxx @@ -40,7 +40,6 @@ #include <vcl/msgbox.hxx> #include <comphelper/interaction.hxx> #include <vcl/stdtext.hxx> -#include <svtools/localresaccess.hxx> #include <connectivity/conncleanup.hxx> #include <com/sun/star/sdbc/DataType.hpp> #include <tools/urlobj.hxx> diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx index 500bbc9..dfaf22f 100644 --- a/extensions/source/propctrlr/formlinkdialog.cxx +++ b/extensions/source/propctrlr/formlinkdialog.cxx @@ -30,7 +30,6 @@ #include <vcl/tabpage.hxx> #include <vcl/layout.hxx> #include <vcl/builderfactory.hxx> -#include <svtools/localresaccess.hxx> #include <connectivity/dbtools.hxx> #include <connectivity/dbexception.hxx> #include <toolkit/helper/vclunohelper.hxx> diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx index 15f97a5..012947b 100644 --- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx +++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx @@ -42,7 +42,6 @@ #include <com/sun/star/inspection/PropertyLineElement.hpp> #include <vcl/msgbox.hxx> #include <tools/debug.hxx> -#include <svtools/localresaccess.hxx> #include <sal/macros.h> #include <algorithm> diff --git a/include/svtools/localresaccess.hxx b/include/svtools/localresaccess.hxx deleted file mode 100644 index f38b1d3..0000000 --- a/include/svtools/localresaccess.hxx +++ /dev/null @@ -1,74 +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 . - */ - -#ifndef INCLUDED_SVTOOLS_LOCALRESACCESS_HXX -#define INCLUDED_SVTOOLS_LOCALRESACCESS_HXX - -#include <tools/rc.hxx> -#include <tools/rcid.h> -#include <osl/diagnose.h> - - -namespace svt -{ - - - //= OLocalResourceAccess - - /** helper class for acessing local resources - */ - class OLocalResourceAccess : public Resource - { - protected: - ResMgr* m_pManager; - - public: - OLocalResourceAccess( const ResId& _rId ) - :Resource( _rId.SetAutoRelease( false ) ) - ,m_pManager( _rId.GetResMgr() ) - { - } - - OLocalResourceAccess(const ResId& _rId, RESOURCE_TYPE _rType) - :Resource(_rId.SetRT(_rType).SetAutoRelease(false)) - ,m_pManager(_rId.GetResMgr()) - { - OSL_ENSURE( m_pManager != nullptr, "OLocalResourceAccess::OLocalResourceAccess: invalid resource manager!" ); - } - - ~OLocalResourceAccess() - { - if ( m_pManager ) - m_pManager->Increment( m_pManager->GetRemainSize() ); - FreeResource(); - } - - inline bool IsAvailableRes( const ResId& _rId ) const - { - return Resource::IsAvailableRes( _rId ); - } - }; - - -} // namespace svt - - -#endif // INCLUDED_SVTOOLS_LOCALRESACCESS_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inspection/metadata.cxx b/reportdesign/source/ui/inspection/metadata.cxx index 480e19c..896dfcf 100644 --- a/reportdesign/source/ui/inspection/metadata.cxx +++ b/reportdesign/source/ui/inspection/metadata.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include "metadata.hxx" -#include <svtools/localresaccess.hxx> #include <com/sun/star/inspection/XPropertyHandler.hpp> #include <comphelper/extract.hxx> #include "helpids.hrc" diff --git a/sfx2/source/dialog/styfitem.cxx b/sfx2/source/dialog/styfitem.cxx index 18d8dac..fb9ad08 100644 --- a/sfx2/source/dialog/styfitem.cxx +++ b/sfx2/source/dialog/styfitem.cxx @@ -17,11 +17,12 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <osl/diagnose.h> #include <sfx2/styfitem.hxx> -#include <svtools/localresaccess.hxx> +#include <tools/rc.hxx> +#include <tools/rcid.h> #include <tools/debug.hxx> - // Implementierung des Resource-Konstruktors SfxStyleFamilyItem::SfxStyleFamilyItem( const ResId &rResId ) : @@ -111,10 +112,44 @@ SfxStyleFamilies::~SfxStyleFamilies() aEntryList.clear(); } +namespace +{ + class OLocalResourceAccess : public Resource + { + protected: + ResMgr* m_pManager; + + public: + OLocalResourceAccess( const ResId& _rId ) + :Resource( _rId.SetAutoRelease( false ) ) + ,m_pManager( _rId.GetResMgr() ) + { + } + + OLocalResourceAccess(const ResId& _rId, RESOURCE_TYPE _rType) + :Resource(_rId.SetRT(_rType).SetAutoRelease(false)) + ,m_pManager(_rId.GetResMgr()) + { + OSL_ENSURE( m_pManager != nullptr, "OLocalResourceAccess::OLocalResourceAccess: invalid resource manager!" ); + } + + ~OLocalResourceAccess() + { + if ( m_pManager ) + m_pManager->Increment( m_pManager->GetRemainSize() ); + FreeResource(); + } + + bool IsAvailableRes( const ResId& _rId ) const + { + return Resource::IsAvailableRes( _rId ); + } + }; +} void SfxStyleFamilies::updateImages( const ResId& _rId ) { - ::svt::OLocalResourceAccess aLocalRes( _rId ); + OLocalResourceAccess aLocalRes( _rId ); // check if the image list is present ResId aImageListId( (sal_uInt16) 1, *_rId.GetResMgr() ); diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index c8a9431..3fea725 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -45,7 +45,6 @@ #include <com/sun/star/sdbcx/XTablesSupplier.hpp> #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> #include <com/sun/star/sdb/CommandType.hpp> -#include <svtools/localresaccess.hxx> #include <svl/filenotation.hxx> #include <tools/urlobj.hxx> #include <algorithm> commit 170cf525e4b070a57e2e389a98a1973521c3a9e7 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Oct 12 21:39:36 2016 +0100 remove (yet yet another) StringListResource implementation Change-Id: Ifaf89badfc339f8253a629c6960df8a943b8cce5 diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index d19fca8..4118915 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -39,7 +39,6 @@ #include "callbacks.hxx" #include <dbaccess/IController.hxx> #include "moduledbu.hxx" -#include <svtools/localresaccess.hxx> #include "svtools/treelistentry.hxx" #include "svtools/viewdataentry.hxx" #include <algorithm> diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index b9c0bd7..3a16604 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -30,7 +30,7 @@ #include <svl/intitem.hxx> #include "dsitems.hxx" #include "dbaccess_helpid.hrc" -#include "localresaccess.hxx" +#include "moduledbu.hxx" #include <osl/process.h> #include <osl/diagnose.h> #include <vcl/msgbox.hxx> diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index 03e094e..7bef896 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -32,13 +32,13 @@ #include <unotools/moduleoptions.hxx> #include "dsitems.hxx" #include "dbaccess_helpid.hrc" -#include "localresaccess.hxx" #include <osl/process.h> #include <vcl/msgbox.hxx> #include "dbadmin.hxx" #include <comphelper/types.hxx> #include <vcl/stdtext.hxx> #include "sqlmessage.hxx" +#include "moduledbu.hxx" #include "odbcconfig.hxx" #include "dsselect.hxx" #include <svl/filenotation.hxx> diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx index 7341eb3..e6a067c 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx @@ -26,13 +26,13 @@ #include <svl/intitem.hxx> #include "dsitems.hxx" #include "dbaccess_helpid.hrc" -#include "localresaccess.hxx" #include <osl/process.h> #include <vcl/msgbox.hxx> #include "dbadmin.hxx" #include <comphelper/types.hxx> #include <vcl/stdtext.hxx> #include "sqlmessage.hxx" +#include "moduledbu.hxx" #include "odbcconfig.hxx" #include "dsselect.hxx" #include <svl/filenotation.hxx> diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index ca7b62e..edad0ab 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -30,7 +30,6 @@ #include "dsitems.hxx" #include "dsnItem.hxx" #include "dbaccess_helpid.hrc" -#include "localresaccess.hxx" #include <vcl/msgbox.hxx> #include <vcl/mnemonic.hxx> #include <svl/cjkoptions.hxx> @@ -51,6 +50,7 @@ #include <unotools/ucbhelper.hxx> #include <ucbhelper/commandenvironment.hxx> #include "finteraction.hxx" +#include "moduledbu.hxx" #include <unotools/pathoptions.hxx> #include <svtools/roadmapwizard.hxx> #include "TextConnectionHelper.hxx" diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx index 3298d49..184a2c7 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx @@ -31,7 +31,6 @@ #include "dsitems.hxx" #include "dbfindex.hxx" #include "dbaccess_helpid.hrc" -#include "localresaccess.hxx" #include <vcl/layout.hxx> #include <vcl/mnemonic.hxx> #include <svl/cjkoptions.hxx> diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 2b3100c..bd7c6b6 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -26,7 +26,7 @@ #include "dbustrings.hrc" #include "dsitems.hxx" #include "dsselect.hxx" -#include "localresaccess.hxx" +#include "moduledbu.hxx" #include "odbcconfig.hxx" #include "optionalboolitem.hxx" #include "sqlmessage.hxx" diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx index 1aa01c2..0466f3c 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.cxx +++ b/dbaccess/source/ui/dlg/adtabdlg.cxx @@ -21,7 +21,6 @@ #include "sqlmessage.hxx" #include <tools/debug.hxx> #include <tools/diagnose_ex.h> -#include <svtools/localresaccess.hxx> #include "dbaccess_helpid.hrc" #include "dbu_resource.hrc" #include "dbu_dlg.hrc" diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index 4c499f2..b84b94c 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -29,7 +29,7 @@ #include "dbustrings.hrc" #include "dsitems.hxx" #include "dsnItem.hxx" -#include "localresaccess.hxx" +#include "moduledbu.hxx" #include "optionalboolitem.hxx" #include "propertysetitem.hxx" #include "stringlistitem.hxx" diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx index 3eb5c80..669a607 100644 --- a/dbaccess/source/ui/dlg/dbwiz.cxx +++ b/dbaccess/source/ui/dlg/dbwiz.cxx @@ -28,7 +28,6 @@ #include "dbustrings.hrc" #include "adminpages.hxx" #include "generalpage.hxx" -#include "localresaccess.hxx" #include "stringlistitem.hxx" #include "propertysetitem.hxx" #include <unotools/confignode.hxx> diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index 523a0a3..f59d888 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -34,7 +34,6 @@ #include <sfx2/docfilt.hxx> #include <unotools/ucbhelper.hxx> #include "generalpage.hxx" -#include "localresaccess.hxx" #include "stringlistitem.hxx" #include "propertysetitem.hxx" #include <unotools/confignode.hxx> diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx index c84a438..93702c9 100644 --- a/dbaccess/source/ui/dlg/detailpages.cxx +++ b/dbaccess/source/ui/dlg/detailpages.cxx @@ -25,8 +25,8 @@ #include "DbAdminImpl.hxx" #include "dsitems.hxx" #include "dbfindex.hxx" -#include "localresaccess.hxx" #include "dsnItem.hxx" +#include "moduledbu.hxx" #include "dbaccess_helpid.hrc" #include "dbu_dlg.hrc" diff --git a/dbaccess/source/ui/dlg/dsselect.cxx b/dbaccess/source/ui/dlg/dsselect.cxx index 10231f2..4042b46 100644 --- a/dbaccess/source/ui/dlg/dsselect.cxx +++ b/dbaccess/source/ui/dlg/dsselect.cxx @@ -20,7 +20,6 @@ #include "dsselect.hxx" #include "dbu_dlg.hrc" #include <vcl/msgbox.hxx> -#include "localresaccess.hxx" #include <tools/rcid.h> #include <com/sun/star/sdbcx/XCreateCatalog.hpp> diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index f5821d5..8ad4dc7 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -24,10 +24,10 @@ #include "dsitems.hxx" #include "dbustrings.hrc" #include "dbadmin.hxx" +#include "moduledbu.hxx" #include <sfx2/filedlghelper.hxx> #include <sfx2/docfilt.hxx> #include <vcl/stdtext.hxx> -#include "localresaccess.hxx" #include <vcl/msgbox.hxx> #include <svl/stritem.hxx> #include <vcl/waitobj.hxx> diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx index a32a52f..e35f286 100644 --- a/dbaccess/source/ui/dlg/paramdialog.cxx +++ b/dbaccess/source/ui/dlg/paramdialog.cxx @@ -30,7 +30,6 @@ #include <vcl/layout.hxx> #include <osl/diagnose.h> #include <tools/diagnose_ex.h> -#include "localresaccess.hxx" #include <unotools/syslocale.hxx> #define EF_VISITED 0x0001 diff --git a/dbaccess/source/ui/inc/localresaccess.hxx b/dbaccess/source/ui/inc/localresaccess.hxx deleted file mode 100644 index 0a0d9b0..0000000 --- a/dbaccess/source/ui/inc/localresaccess.hxx +++ /dev/null @@ -1,47 +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 . - */ - -#ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_LOCALRESACCESS_HXX -#define INCLUDED_DBACCESS_SOURCE_UI_INC_LOCALRESACCESS_HXX - -#include <svtools/localresaccess.hxx> -#include "moduledbu.hxx" - -namespace dbaui -{ - -// LocalResourceAccess -/** helper class for acessing local resources -*/ -typedef ::svt::OLocalResourceAccess LRA_Base; -class LocalResourceAccess : protected LRA_Base -{ - OModuleClient m_aModuleClient; -public: - inline LocalResourceAccess( sal_uInt16 _nId, RESOURCE_TYPE _rType ) - :LRA_Base( ModuleRes( _nId ), _rType ) - { - } -}; - -} // namespace dbaui - -#endif // INCLUDED_DBACCESS_SOURCE_UI_INC_LOCALRESACCESS_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/query.src b/dbaccess/source/ui/querydesign/query.src index 861e9b6..14c49a2 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 cf07fa1..c683536 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 <connectivity/dbtools.hxx> #include <cppuhelper/exc_hlp.hxx> #include <sfx2/sfxsids.hrc> -#include <svtools/localresaccess.hxx> +#include <tools/resary.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <tools/diagnose_ex.h> #include <osl/diagnose.h> @@ -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; } diff --git a/extensions/source/propctrlr/formmetadata.cxx b/extensions/source/propctrlr/formmetadata.cxx index 8df6dee..3f91a2a 100644 --- a/extensions/source/propctrlr/formmetadata.cxx +++ b/extensions/source/propctrlr/formmetadata.cxx @@ -21,7 +21,7 @@ #include "formstrings.hxx" #include "formresid.hrc" #include "propctrlr.hrc" -#include <svtools/localresaccess.hxx> +#include <tools/resary.hxx> #include <comphelper/extract.hxx> #include <sal/macros.h> #include <algorithm> @@ -498,20 +498,14 @@ namespace pcr break; } - ::std::vector< OUString > aReturn; + std::vector< OUString > aReturn; - if ( nStringItemsResId ) + if (nStringItemsResId) { - PcrRes aResId( nStringItemsResId ); - ::svt::OLocalResourceAccess aEnumStrings( aResId, RSC_RESOURCE ); - - sal_Int16 i = 1; - PcrRes aLocalId( i ); - while ( aEnumStrings.IsAvailableRes( aLocalId.SetRT( RSC_STRING ) ) ) - { - aReturn.push_back( aLocalId.toString() ); - aLocalId = PcrRes( ++i ); - } + PcrRes aResId(nStringItemsResId); + ResStringArray aResList(aResId); + for (sal_uInt32 i = 0; i < aResList.Count(); ++i) + aReturn.push_back(aResList.GetString(i)); } return aReturn; diff --git a/extensions/source/propctrlr/formres.src b/extensions/source/propctrlr/formres.src index 654515f..6e3df3a 100644 --- a/extensions/source/propctrlr/formres.src +++ b/extensions/source/propctrlr/formres.src @@ -133,21 +133,17 @@ String RID_STR_VERTICAL_ALIGN { Text [ en-US ] = "Vert. Alignment" ; }; -Resource RID_RSC_ENUM_VERTICAL_ALIGN + +StringArray RID_RSC_ENUM_VERTICAL_ALIGN { - String 1 - { - Text [ en-US ] = "Top"; - }; - String 2 - { - Text [ en-US ] = "Middle"; - }; - String 3 + ItemList [ en-US ] = { - Text [ en-US ] = "Bottom"; + < "Top"; >; + < "Middle"; >; + < "Bottom"; >; }; }; + String RID_STR_IMAGEPOSITION { Text [ en-US ] = "Graphics alignment"; @@ -168,17 +164,16 @@ String RID_STR_ICONSIZE { Text [ en-US ] = "Icon size" ; }; -Resource RID_RSC_ENUM_ICONSIZE_TYPE + +StringArray RID_RSC_ENUM_ICONSIZE_TYPE { - String 1 - { - Text [ en-US ] = "Small" ; - }; - String 2 + ItemList [ en-US ] = { - Text [ en-US ] = "Large" ; + < "Small" ; >; + < "Large" ; >; }; }; + String RID_STR_SHOW_POSITION { Text [ en-US ] = "Positioning"; @@ -452,285 +447,157 @@ String RID_STR_SUBMIT_TARGET Text [ en-US ] = "Frame" ; }; -Resource RID_RSC_ENUM_BORDER_TYPE +StringArray RID_RSC_ENUM_BORDER_TYPE { - String 1 - { - Text [ en-US ] = "Without frame" ; - }; - String 2 - { - Text [ en-US ] = "3D look" ; - }; - String 3 + ItemList [ en-US ] = { - Text [ en-US ] = "Flat" ; + < "Without frame" ; >; + < "3D look" ; >; + < "Flat" ; >; }; }; -Resource RID_RSC_ENUM_LISTSOURCE_TYPE +StringArray RID_RSC_ENUM_LISTSOURCE_TYPE { - String 1 - { - Text [ en-US ] = "Valuelist"; - }; - String 2 - { - Text [ en-US ] = "Table"; - }; - String 3 - { - Text [ en-US ] = "Query"; - }; - String 4 - { - Text [ en-US ] = "Sql"; - }; - String 5 - { - Text [ en-US ] = "Sql [Native]"; - }; - String 6 + ItemList [ en-US ] = { - Text [ en-US ] = "Tablefields" ; + < "Valuelist"; >; + < "Table"; >; + < "Query"; >; + < "Sql"; >; + < "Sql [Native]"; >; + < "Tablefields" ; >; }; }; -Resource RID_RSC_ENUM_ALIGNMENT + +StringArray RID_RSC_ENUM_ALIGNMENT { - String 1 - { - Text [ en-US ] = "Left"; - }; - String 2 - { - Text [ en-US ] = "Center"; - }; - String 3 + ItemList [ en-US ] = { - Text [ en-US ] = "Right" ; + < "Left"; >; + < "Center"; >; + < "Right" ; >; }; }; -Resource RID_RSC_ENUM_BUTTONTYPE + +StringArray RID_RSC_ENUM_BUTTONTYPE { - String 1 - { - Text [ en-US ] = "None"; - }; - String 2 - { - Text [ en-US ] = "Submit form"; - }; - String 3 - { - Text [ en-US ] = "Reset form"; - }; - String 4 - { - Text [ en-US ] = "Open document/web page"; - }; - String 5 - { - Text [ en-US ] = "First record"; - }; - String 6 - { - Text [ en-US ] = "Previous record"; - }; - String 7 - { - Text [ en-US ] = "Next record"; - }; - String 8 - { - Text [ en-US ] = "Last record"; - }; - String 9 - { - Text [ en-US ] = "Save record"; - }; - String 10 - { - Text [ en-US ] = "Undo data entry"; - }; - String 11 - { - Text [ en-US ] = "New record"; - }; - String 12 - { - Text [ en-US ] = "Delete record"; - }; - String 13 + ItemList [ en-US ] = { - Text [ en-US ] = "Refresh form"; + < "None"; >; + < "Submit form"; >; + < "Reset form"; >; + < "Open document/web page"; >; + < "First record"; >; + < "Previous record"; >; + < "Next record"; >; + < "Last record"; >; + < "Save record"; >; + < "Undo data entry"; >; + < "New record"; >; + < "Delete record"; >; + < "Refresh form"; >; }; }; -Resource RID_RSC_ENUM_SUBMIT_METHOD + +StringArray RID_RSC_ENUM_SUBMIT_METHOD { - String 1 - { - Text [ en-US ] = "Get"; - }; - String 2 + ItemList [ en-US ] = { - Text [ en-US ] = "Post" ; + < "Get"; >; + < "Post" ; >; }; }; -Resource RID_RSC_ENUM_SUBMIT_ENCODING + +StringArray RID_RSC_ENUM_SUBMIT_ENCODING { - String 1 - { - Text [ en-US ] = "URL"; - }; - String 2 - { - Text [ en-US ] = "Multipart"; - }; - String 3 + ItemList [ en-US ] = { - Text [ en-US ] = "Text" ; + < "URL"; >; + < "Multipart"; >; + < "Text" ; >; }; }; -Resource RID_RSC_ENUM_DATEFORMAT_LIST + +StringArray RID_RSC_ENUM_DATEFORMAT_LIST { - String 1 - { - Text [ en-US ] = "Standard (short)"; - }; - String 2 - { - Text [ en-US ] = "Standard (short YY)"; - }; - String 3 - { - Text [ en-US ] = "Standard (short YYYY)"; - }; - String 4 - { - Text [ en-US ] = "Standard (long)"; - }; - String 5 - { - Text [ en-US ] = "DD/MM/YY"; - }; - String 6 - { - Text [ en-US ] = "MM/DD/YY"; - }; - String 7 - { - Text [ en-US ] = "YY/MM/DD"; - }; - String 8 - { - Text [ en-US ] = "DD/MM/YYYY"; - }; - String 9 - { - Text [ en-US ] = "MM/DD/YYYY"; - }; - String 10 - { - Text [ en-US ] = "YYYY/MM/DD"; - }; - String 11 - { - Text [ en-US ] = "YY-MM-DD"; - }; - String 12 + ItemList [ en-US ] = { - Text [ en-US ] = "YYYY-MM-DD" ; + < "Standard (short)"; >; + < "Standard (short YY)"; >; + < "Standard (short YYYY)"; >; + < "Standard (long)"; >; + < "DD/MM/YY"; >; + < "MM/DD/YY"; >; + < "YY/MM/DD"; >; + < "DD/MM/YYYY"; >; + < "MM/DD/YYYY"; >; + < "YYYY/MM/DD"; >; + < "YY-MM-DD"; >; + < "YYYY-MM-DD" ; >; }; }; -Resource RID_RSC_ENUM_TIMEFORMAT_LIST + +StringArray RID_RSC_ENUM_TIMEFORMAT_LIST { - String 1 - { - Text [ en-US ] = "13:45"; - }; - String 2 - { - Text [ en-US ] = "13:45:00"; - }; - String 3 - { - Text [ en-US ] = "01:45 PM"; - }; - String 4 + ItemList [ en-US ] = { - Text [ en-US ] = "01:45:00 PM" ; + < "13:45"; >; + < "13:45:00"; >; + < "01:45 PM"; >; + < "01:45:00 PM" ; >; }; }; -Resource RID_RSC_ENUM_CHECKED + +StringArray RID_RSC_ENUM_CHECKED { - String 1 - { - Text [ en-US ] = "Not Selected"; - }; - String 2 - { - Text [ en-US ] = "Selected"; - }; - String 3 + ItemList [ en-US ] = { - Text [ en-US ] = "Not Defined" ; + < "Not Selected"; >; + < "Selected"; >; + < "Not Defined" ; >; }; }; -Resource RID_RSC_ENUM_CYCLE + +StringArray RID_RSC_ENUM_CYCLE { - String 1 - { - Text [ en-US ] = "All records"; - }; - String 2 - { - Text [ en-US ] = "Active record"; - }; - String 3 + ItemList [ en-US ] = { - Text [ en-US ] = "Current page" ; + < "All records"; >; + < "Active record"; >; + < "Current page" ; >; }; }; -Resource RID_RSC_ENUM_NAVIGATION + +StringArray RID_RSC_ENUM_NAVIGATION { - String 1 - { - Text [ en-US ] = "No"; - }; - String 2 - { - Text [ en-US ] = "Yes"; - }; - String 3 + ItemList [ en-US ] = { - Text [ en-US ] = "Parent Form"; + < "No"; >; + < "Yes"; >; + < "Parent Form"; >; }; }; -Resource RID_RSC_ENUM_SUBMIT_TARGET -{ - String 1 { Text = "_blank"; }; - String 2 { Text = "_parent"; }; - String 3 { Text = "_self"; }; - String 4 { Text = "_top"; }; -}; -Resource RID_RSC_ENUM_SELECTION_TYPE +StringArray RID_RSC_ENUM_SUBMIT_TARGET { - String 1 - { - Text [ en-US ] = "None" ; - }; - String 2 - { - Text [ en-US ] = "Single" ; - }; - String 3 + ItemList [ en-US ] = { - Text [ en-US ] = "Multi" ; + < "_blank"; >; + < "_parent"; >; + < "_self"; >; + < "_top"; >; }; - String 4 +}; + +StringArray RID_RSC_ENUM_SELECTION_TYPE +{ + ItemList [ en-US ] = { - Text [ en-US ] = "Range" ; + < "None" ; >; + < "Single" ; >; + < "Multi" ; >; + < "Range" ; >; }; }; @@ -955,17 +822,16 @@ String RID_STR_ORIENTATION { Text [ en-US ] = "Orientation"; }; -Resource RID_RSC_ENUM_ORIENTATION + +StringArray RID_RSC_ENUM_ORIENTATION { - String 1 - { - Text [ en-US ] = "Horizontal"; - }; - String 2 + ItemList [ en-US ] = { - Text [ en-US ] = "Vertical"; + < "Horizontal"; >; + < "Vertical"; >; }; }; + String RID_STR_EVT_ADJUSTMENTVALUECHANGED { Text [ en-US ] = "While adjusting"; @@ -990,29 +856,23 @@ String RID_STR_PUSHBUTTONTYPE { Text [ en-US ] = "Button type"; }; -Resource RID_RSC_ENUM_PUSHBUTTONTYPE + +StringArray RID_RSC_ENUM_PUSHBUTTONTYPE { - String 1 - { - Text [ en-US ] = "Default"; - }; - String 2 - { - Text [ en-US ] = "OK"; - }; - String 3 - { - Text [ en-US ] = "Cancel"; - }; - String 4 + ItemList [ en-US ] = { - Text [ en-US ] = "Help"; + < "Default"; >; + < "OK"; >; + < "Cancel"; >; + < "Help"; >; }; }; + String RID_STR_UNABLETOCONNECT { Text [ en-US ] = "The connection to the data source \"$name$\" could not be established."; }; + String RID_STR_TEXT { Text [ en-US ] = "Text"; @@ -1033,15 +893,12 @@ String RID_STR_CELL_EXCHANGE_TYPE Text [ en-US ] = "Contents of the linked cell"; }; -Resource RID_RSC_ENUM_CELL_EXCHANGE_TYPE +StringArray RID_RSC_ENUM_CELL_EXCHANGE_TYPE { - String 1 - { - Text [ en-US ] = "The selected entry"; - }; - String 2 + ItemList [ en-US ] = { - Text [ en-US ] = "Position of the selected entry"; + < "The selected entry"; >; + < "Position of the selected entry"; >; }; }; @@ -1050,19 +907,13 @@ String RID_STR_SHOW_SCROLLBARS Text [ en-US ] = "Scrollbars"; }; -Resource RID_RSC_ENUM_TEXTTYPE +StringArray RID_RSC_ENUM_TEXTTYPE { - String 1 - { - Text [ en-US ] = "Single-line"; - }; - String 2 - { - Text [ en-US ] = "Multi-line"; - }; - String 3 + ItemList [ en-US ] = { - Text [ en-US ] = "Multi-line with formatting"; + < "Single-line"; >; + < "Multi-line"; >; + < "Multi-line with formatting"; >; }; }; @@ -1076,53 +927,36 @@ String RID_STR_LINEEND_FORMAT Text [ en-US ] = "Text lines end with"; }; -Resource RID_RSC_ENUM_LINEEND_FORMAT +StringArray RID_RSC_ENUM_LINEEND_FORMAT { - String 1 - { - Text [ en-US ] = "LF (Unix)"; - }; - String 2 + ItemList [ en-US ] = { - Text [ en-US ] = "CR+LF (Windows)"; + < "LF (Unix)"; >; + < "CR+LF (Windows)"; >; }; }; -Resource RID_RSC_ENUM_SCROLLBARS +StringArray RID_RSC_ENUM_SCROLLBARS { - String 1 - { - Text [ en-US ] = "None"; - }; - String 2 - { - Text [ en-US ] = "Horizontal"; - }; - String 3 - { - Text [ en-US ] = "Vertical"; - }; - String 4 + ItemList [ en-US ] = { - Text [ en-US ] = "Both"; + < "None"; >; + < "Horizontal"; >; + < "Vertical"; >; + < "Both"; >; }; }; -Resource RID_RSC_ENUM_COMMAND_TYPE +StringArray RID_RSC_ENUM_COMMAND_TYPE { - String 1 - { - Text [ en-US ] = "Table"; - }; - String 2 - { - Text [ en-US ] = "Query"; - }; - String 3 + ItemList [ en-US ] = { - Text [ en-US ] = "SQL command"; + < "Table"; >; + < "Query"; >; + < "SQL command"; >; }; }; + String RID_STR_TOGGLE { Text [ en-US ] = "Toggle"; @@ -1143,15 +977,12 @@ String RID_STR_VISUALEFFECT Text [ en-US ] = "Style"; }; -Resource RID_RSC_ENUM_VISUALEFFECT +StringArray RID_RSC_ENUM_VISUALEFFECT { - String 1 - { - Text [ en-US ] = "3D"; - }; - String 2 + ItemList [ en-US ] = { - Text [ en-US ] = "Flat"; + < "3D"; >; + < "Flat"; >; }; }; @@ -1160,59 +991,23 @@ String RID_STR_BORDERCOLOR Text [ en-US ] = "Border color"; }; -Resource RID_RSC_ENUM_IMAGE_POSITION +StringArray RID_RSC_ENUM_IMAGE_POSITION { - String 1 - { - Text [ en-US ] = "Left top"; - }; - String 2 - { - Text [ en-US ] = "Left centered"; - }; - String 3 - { - Text [ en-US ] = "Left bottom"; - }; - String 4 - { - Text [ en-US ] = "Right top"; - }; - String 5 - { - Text [ en-US ] = "Right centered"; - }; - String 6 - { - Text [ en-US ] = "Right bottom"; - }; - String 7 - { - Text [ en-US ] = "Above left"; - }; - String 8 - { - Text [ en-US ] = "Above centered"; - }; - String 9 - { - Text [ en-US ] = "Above right"; - }; - String 10 - { - Text [ en-US ] = "Below left"; - }; - String 11 - { - Text [ en-US ] = "Below centered"; - }; - String 12 - { - Text [ en-US ] = "Below right"; - }; - String 13 + ItemList [ en-US ] = { - Text [ en-US ] = "Centered"; + < "Left top"; >; + < "Left centered"; >; + < "Left bottom"; >; + < "Right top"; >; + < "Right centered"; >; + < "Right bottom"; >; + < "Above left"; >; + < "Above centered"; >; + < "Above right"; >; + < "Below left"; >; + < "Below centered"; >; + < "Below right"; >; + < "Centered"; >; }; }; @@ -1285,19 +1080,13 @@ String RID_STR_XSD_WHITESPACES Text [ en-US ] = "Whitespaces"; }; -Resource RID_RSC_ENUM_WHITESPACE_HANDLING +StringArray RID_RSC_ENUM_WHITESPACE_HANDLING { - String 1 - { - Text [ en-US ] = "Preserve"; - }; - String 2 - { - Text [ en-US ] = "Replace"; - }; - String 3 + ItemList [ en-US ] = { - Text [ en-US ] = "Collapse"; + < "Preserve"; >; + < "Replace"; >; + < "Collapse"; >; }; }; @@ -1401,21 +1190,16 @@ String RID_STR_NOLABEL Text [ en-US ] = "No Label" ; }; -Resource RID_RSC_ENUM_SCALE_MODE +StringArray RID_RSC_ENUM_SCALE_MODE { - String 1 - { - Text [ en-US ] = "No"; - }; - String 2 - { - Text [ en-US ] = "Keep Ratio"; - }; - String 3 + ItemList [ en-US ] = { - Text [ en-US ] = "Fit to Size"; + < "No"; >; + < "Keep Ratio"; >; + < "Fit to Size"; >; }; }; + String RID_STR_INPUT_REQUIRED { Text [ en-US ] = "Input required"; @@ -1426,35 +1210,23 @@ String RID_STR_WRITING_MODE Text [ en-US ] = "Text direction"; }; -Resource RID_RSC_ENUM_WRITING_MODE +StringArray RID_RSC_ENUM_WRITING_MODE { - String 1 - { - Text [ en-US ] = "Left-to-right"; - }; - String 2 - { - Text [ en-US ] = "Right-to-left"; - }; - String 3 + ItemList [ en-US ] = { - Text [ en-US ] = "Use superordinate object settings"; + < "Left-to-right"; >; + < "Right-to-left"; >; + < "Use superordinate object settings"; >; }; }; -Resource RID_RSC_ENUM_WHEEL_BEHAVIOR +StringArray RID_RSC_ENUM_WHEEL_BEHAVIOR { - String 1 - { - Text [ en-US ] = "Never"; - }; - String 2 - { - Text [ en-US ] = "When focused"; - }; - String 3 + ItemList [ en-US ] = { - Text [ en-US ] = "Always"; + < "Never"; >; + < "When focused"; >; + < "Always"; >; }; }; @@ -1463,39 +1235,24 @@ String RID_STR_ANCHOR_TYPE Text [ en-US ] = "Anchor"; }; -Resource RID_RSC_ENUM_TEXT_ANCHOR_TYPE +StringArray RID_RSC_ENUM_TEXT_ANCHOR_TYPE { - String 1 - { - Text [ en-US ] = "To Paragraph"; - }; - String 2 - { - Text [ en-US ] = "As Character"; - }; - String 3 - { - Text [ en-US ] = "To Page"; - }; - String 4 - { - Text [ en-US ] = "To Frame"; - }; - String 5 + ItemList [ en-US ] = { - Text [ en-US ] = "To Character"; + < "To Paragraph"; >; + < "As Character"; >; + < "To Page"; >; + < "To Frame"; >; + < "To Character"; >; }; }; -Resource RID_RSC_ENUM_SHEET_ANCHOR_TYPE +StringArray RID_RSC_ENUM_SHEET_ANCHOR_TYPE { - String 1 - { - Text [ en-US ] = "To Page"; - }; - String 2 + ItemList [ en-US ] = { - Text [ en-US ] = "To Cell"; + < "To Page"; >; + < "To Cell"; >; }; }; diff --git a/extensions/source/propctrlr/sqlcommanddesign.cxx b/extensions/source/propctrlr/sqlcommanddesign.cxx index eda1646..1d565c6 100644 --- a/extensions/source/propctrlr/sqlcommanddesign.cxx +++ b/extensions/source/propctrlr/sqlcommanddesign.cxx @@ -37,7 +37,7 @@ #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/sdb/CommandType.hpp> -#include <svtools/localresaccess.hxx> +#include <tools/resary.hxx> #include <tools/diagnose_ex.h> #include <osl/diagnose.h> @@ -261,8 +261,9 @@ namespace pcr Reference< XTitle> xTitle(xQueryDesign,UNO_QUERY); if ( xTitle.is() ) { - ::svt::OLocalResourceAccess aEnumStrings( PcrRes( RID_RSC_ENUM_COMMAND_TYPE ), RSC_RESOURCE ); - OUString sDisplayName = PcrRes(CommandType::COMMAND + 1).toString(); + PcrRes aResId(RID_RSC_ENUM_COMMAND_TYPE); + ResStringArray aResList(aResId); + OUString sDisplayName = aResList.GetString(CommandType::COMMAND); xTitle->setTitle( sDisplayName ); } }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits