diff --git a/compilerplugins/clang/refcounting.cxx b/compilerplugins/clang/refcounting.cxx index cc3a56b76e21..ab3462480ed8 100644 --- a/compilerplugins/clang/refcounting.cxx +++ b/compilerplugins/clang/refcounting.cxx @@ -211,8 +211,6 @@ bool containsXInterfaceSubclass(const Type* pType0) { || dc.Class("mem_fun_t").StdNamespace() || dc.Class("mem_fun1_t").StdNamespace() || dc.Class("SwIterator").GlobalNamespace() - || (dc.Class("InitGuard").Namespace("toolkit") - .GlobalNamespace()) || (dc.Class("SharedUNOComponent").Namespace("utl") .GlobalNamespace()) || (dc.Class("OAutoRegistration").Namespace("utl") diff --git a/toolkit/source/controls/grid/initguard.hxx b/toolkit/source/controls/grid/initguard.hxx deleted file mode 100644 index 75d84c0f0c75..000000000000 --- a/toolkit/source/controls/grid/initguard.hxx +++ /dev/null @@ -1,56 +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_TOOLKIT_SOURCE_CONTROLS_GRID_INITGUARD_HXX -#define INCLUDED_TOOLKIT_SOURCE_CONTROLS_GRID_INITGUARD_HXX - -#include - -#include - - -namespace toolkit -{ - - - //= InitGuard - - template < class IMPL > - class InitGuard : public ::comphelper::ComponentGuard - { - public: - InitGuard( IMPL& i_component, ::cppu::OBroadcastHelper & i_broadcastHelper ) - :comphelper::ComponentGuard( i_component, i_broadcastHelper ) - { - if ( !i_component.isInitialized() ) - throw css::lang::NotInitializedException( OUString(), *&i_component ); - } - - ~InitGuard() - { - } - }; - - -} // namespace toolkit - - -#endif // INCLUDED_TOOLKIT_SOURCE_CONTROLS_GRID_INITGUARD_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/controls/grid/sortablegriddatamodel.cxx b/toolkit/source/controls/grid/sortablegriddatamodel.cxx index af7898d07554..59463e8696b5 100644 --- a/toolkit/source/controls/grid/sortablegriddatamodel.cxx +++ b/toolkit/source/controls/grid/sortablegriddatamodel.cxx @@ -17,13 +17,12 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "initguard.hxx" - #include #include #include #include #include +#include #include #include #include @@ -33,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -45,12 +45,11 @@ using namespace css::i18n; using namespace css::lang; using namespace css::ucb; using namespace css::uno; -using namespace toolkit; namespace { class SortableGridDataModel; -typedef InitGuard< SortableGridDataModel > MethodGuard; +class MethodGuard; typedef ::cppu::WeakComponentImplHelper < css::awt::grid::XSortableMutableGridDataModel , css::lang::XServiceInfo @@ -197,6 +196,17 @@ private: ::std::vector< ::sal_Int32 > m_privateToPublicRowIndex; }; +class MethodGuard : public ::comphelper::ComponentGuard +{ +public: + MethodGuard( SortableGridDataModel& i_component, ::cppu::OBroadcastHelper & i_broadcastHelper ) + :comphelper::ComponentGuard( i_component, i_broadcastHelper ) + { + if ( !i_component.isInitialized() ) + throw css::lang::NotInitializedException( OUString(), *&i_component ); + } +}; + namespace { template< class STLCONTAINER >