2010-10-14 08:30:07 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-12-05 11:46:50 +00:00
|
|
|
/*
|
|
|
|
* 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 .
|
|
|
|
*/
|
2000-09-18 14:29:57 +00:00
|
|
|
|
2006-09-16 11:42:17 +00:00
|
|
|
|
2001-10-11 13:40:44 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2003-03-20 11:26:34 +00:00
|
|
|
#include "rtl/bootstrap.hxx"
|
|
|
|
#include "osl/diagnose.h"
|
|
|
|
#include "osl/process.h"
|
|
|
|
#include "cppuhelper/component_context.hxx"
|
|
|
|
|
2012-12-20 09:58:06 +01:00
|
|
|
#include "com/sun/star/uno/SecurityException.hpp"
|
2000-09-18 14:29:57 +00:00
|
|
|
|
2012-04-20 22:46:42 +02:00
|
|
|
#include "servicefactory_detail.hxx"
|
2012-04-18 15:59:58 +02:00
|
|
|
|
2001-10-11 13:40:44 +00:00
|
|
|
#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
|
|
|
|
|
|
|
|
|
2001-05-09 12:28:58 +00:00
|
|
|
using namespace ::rtl;
|
|
|
|
using namespace ::osl;
|
|
|
|
using namespace ::com::sun::star;
|
2001-05-29 13:02:08 +00:00
|
|
|
using namespace ::com::sun::star::uno;
|
2000-09-18 14:29:57 +00:00
|
|
|
|
|
|
|
namespace cppu
|
|
|
|
{
|
|
|
|
|
2013-01-16 09:04:58 +01:00
|
|
|
void add_access_control_entries( ::std::vector< ContextEntry_Init > * values )
|
2002-01-25 08:36:50 +00:00
|
|
|
SAL_THROW( (Exception) )
|
|
|
|
{
|
|
|
|
ContextEntry_Init entry;
|
|
|
|
::std::vector< ContextEntry_Init > & context_values = *values;
|
|
|
|
|
2003-04-23 15:29:21 +00:00
|
|
|
// - ac prop: mode
|
|
|
|
// { "off", "on", "dynamic-only", "single-user", "single-default-user" }
|
2002-01-25 08:36:50 +00:00
|
|
|
entry.bLateInitService = false;
|
|
|
|
entry.name = OUSTR("/services/com.sun.star.security.AccessController/mode");
|
2013-01-16 09:04:58 +01:00
|
|
|
entry.value <<= OUSTR("off");
|
2002-01-25 08:36:50 +00:00
|
|
|
context_values.push_back( entry );
|
|
|
|
// - ac singleton
|
|
|
|
entry.bLateInitService = true;
|
|
|
|
entry.name = OUSTR("/singletons/com.sun.star.security.theAccessController");
|
2013-01-16 09:04:58 +01:00
|
|
|
entry.value <<= OUSTR("com.sun.star.security.AccessController");
|
2002-01-25 08:36:50 +00:00
|
|
|
context_values.push_back( entry );
|
|
|
|
}
|
2003-03-20 11:26:34 +00:00
|
|
|
|
2001-05-09 12:28:58 +00:00
|
|
|
}
|
2010-10-14 08:30:07 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|