summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extensions/source/abpilot/abspilot.cxx1
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.cxx1
-rw-r--r--extensions/source/dbpilots/controlwizard.cxx1
-rw-r--r--extensions/source/propctrlr/formlinkdialog.cxx1
-rw-r--r--extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx1
-rw-r--r--include/svtools/localresaccess.hxx74
-rw-r--r--reportdesign/source/ui/inspection/metadata.cxx1
-rw-r--r--sfx2/source/dialog/styfitem.cxx41
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx1
9 files changed, 38 insertions, 84 deletions
diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx
index 8ceb9e2054ca..ca165231b7e7 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 84ee2e173d94..0dc6b2791074 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 82ea3ea0d860..8f9a21cabfb6 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 500bbc982053..dfaf22fdae94 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 15f97a5eef84..012947bd988a 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 f38b1d31d704..000000000000
--- 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 480e19c83d15..896dfcfbb3d3 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 18d8dace5faf..fb9ad087fb34 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 c8a94315a120..3fea7251a1a3 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>