From dcdda1d61092aad74cd77023be58ef823b424126 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 16 Jan 2013 09:31:07 +0100 Subject: Unfold remainder of add_access_control_entries at call site Change-Id: I6e1a5a0223c1ea3e1a8c8800fb4cb032719ecf4f --- cppuhelper/Library_cppuhelper.mk | 1 - cppuhelper/source/defaultbootstrap.cxx | 12 +++++- cppuhelper/source/servicefactory.cxx | 64 ----------------------------- cppuhelper/source/servicefactory_detail.hxx | 41 ------------------ 4 files changed, 10 insertions(+), 108 deletions(-) delete mode 100644 cppuhelper/source/servicefactory.cxx delete mode 100644 cppuhelper/source/servicefactory_detail.hxx (limited to 'cppuhelper') diff --git a/cppuhelper/Library_cppuhelper.mk b/cppuhelper/Library_cppuhelper.mk index acfa4c7172a5..81baa3428614 100644 --- a/cppuhelper/Library_cppuhelper.mk +++ b/cppuhelper/Library_cppuhelper.mk @@ -68,7 +68,6 @@ $(eval $(call gb_Library_add_exception_objects,cppuhelper,\ cppuhelper/source/paths \ cppuhelper/source/propertysetmixin \ cppuhelper/source/propshlp \ - cppuhelper/source/servicefactory \ cppuhelper/source/servicemanager \ cppuhelper/source/shlib \ cppuhelper/source/supportsservice \ diff --git a/cppuhelper/source/defaultbootstrap.cxx b/cppuhelper/source/defaultbootstrap.cxx index 9b214847b4a5..6032acf95ed3 100644 --- a/cppuhelper/source/defaultbootstrap.cxx +++ b/cppuhelper/source/defaultbootstrap.cxx @@ -45,7 +45,6 @@ #include "macro_expander.hxx" #include "paths.hxx" -#include "servicefactory_detail.hxx" #include "servicemanager.hxx" #include "typedescriptionprovider.hxx" @@ -115,7 +114,16 @@ cppu::defaultBootstrap_InitialComponentContext(rtl::OUString const & iniUri) "/singletons/" + i->first, css::uno::makeAny(i->second[0]->info->name), true)); } - cppu::add_access_control_entries(&context_values); + context_values.push_back( + cppu::ContextEntry_Init( + "/services/com.sun.star.security.AccessController/mode", + css::uno::makeAny(rtl::OUString("off")), false)); + context_values.push_back( + cppu::ContextEntry_Init( + "/singletons/com.sun.star.security.theAccessController", + css::uno::makeAny( + rtl::OUString("com.sun.star.security.AccessController")), + true)); assert(!context_values.empty()); css::uno::Reference< css::uno::XComponentContext > context( createComponentContext( diff --git a/cppuhelper/source/servicefactory.cxx b/cppuhelper/source/servicefactory.cxx deleted file mode 100644 index b52148744515..000000000000 --- a/cppuhelper/source/servicefactory.cxx +++ /dev/null @@ -1,64 +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 . - */ - - -#include - -#include "rtl/bootstrap.hxx" -#include "osl/diagnose.h" -#include "osl/process.h" -#include "cppuhelper/component_context.hxx" - -#include "com/sun/star/uno/SecurityException.hpp" - -#include "servicefactory_detail.hxx" - -#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) ) - - -using namespace ::rtl; -using namespace ::osl; -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; - -namespace cppu -{ - -void add_access_control_entries( ::std::vector< ContextEntry_Init > * values ) - SAL_THROW( (Exception) ) -{ - ContextEntry_Init entry; - ::std::vector< ContextEntry_Init > & context_values = *values; - - // - ac prop: mode - // { "off", "on", "dynamic-only", "single-user", "single-default-user" } - entry.bLateInitService = false; - entry.name = OUSTR("/services/com.sun.star.security.AccessController/mode"); - entry.value <<= OUSTR("off"); - context_values.push_back( entry ); - // - ac singleton - entry.bLateInitService = true; - entry.name = OUSTR("/singletons/com.sun.star.security.theAccessController"); - entry.value <<= OUSTR("com.sun.star.security.AccessController"); - context_values.push_back( entry ); -} - -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/source/servicefactory_detail.hxx b/cppuhelper/source/servicefactory_detail.hxx deleted file mode 100644 index d1e8a376bcaf..000000000000 --- a/cppuhelper/source/servicefactory_detail.hxx +++ /dev/null @@ -1,41 +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_CPPUHELPER_SOURCE_SERVICEFACTORY_DETAIL_HXX -#define INCLUDED_CPPUHELPER_SOURCE_SERVICEFACTORY_DETAIL_HXX - -#include "sal/config.h" - -#include - -#include "com/sun/star/uno/Exception.hpp" -#include "sal/types.h" - -namespace cppu { struct ContextEntry_Init; } - -namespace cppu { - -void add_access_control_entries(std::vector< cppu::ContextEntry_Init > * values) - SAL_THROW((com::sun::star::uno::Exception)); - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit