2010-10-27 13:11:31 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-12 22:04:38 +01: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 .
|
|
|
|
*/
|
2013-10-21 05:42:51 +02:00
|
|
|
|
2014-04-18 18:41:08 +02:00
|
|
|
#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_PARAMETERSUBSTITUTION_HXX
|
|
|
|
#define INCLUDED_CONNECTIVITY_SOURCE_INC_PARAMETERSUBSTITUTION_HXX
|
2013-10-21 05:42:51 +02:00
|
|
|
|
2009-02-17 15:39:54 +00:00
|
|
|
#include <com/sun/star/util/XStringSubstitution.hpp>
|
|
|
|
#include <com/sun/star/lang/XInitialization.hpp>
|
|
|
|
#include <com/sun/star/lang/XServiceInfo.hpp>
|
|
|
|
#include <com/sun/star/uno/XComponentContext.hpp>
|
|
|
|
#include <com/sun/star/sdbc/XConnection.hpp>
|
2015-07-13 11:21:57 +09:00
|
|
|
#include <cppuhelper/implbase.hxx>
|
2018-08-18 18:24:16 +02:00
|
|
|
#include <cppuhelper/weakref.hxx>
|
2009-02-17 15:39:54 +00:00
|
|
|
|
|
|
|
namespace connectivity
|
|
|
|
{
|
2016-05-27 12:31:29 +02:00
|
|
|
typedef ::cppu::WeakImplHelper< css::util::XStringSubstitution
|
|
|
|
,css::lang::XServiceInfo
|
|
|
|
,css::lang::XInitialization > ParameterSubstitution_BASE;
|
2017-11-07 10:08:18 +02:00
|
|
|
class ParameterSubstitution final : public ParameterSubstitution_BASE
|
2009-02-17 15:39:54 +00:00
|
|
|
{
|
2016-05-27 12:31:29 +02:00
|
|
|
::osl::Mutex m_aMutex;
|
|
|
|
css::uno::Reference< css::uno::XComponentContext > m_xContext;
|
|
|
|
css::uno::WeakReference< css::sdbc::XConnection > m_xConnection;
|
2009-02-17 15:39:54 +00:00
|
|
|
|
2015-10-12 15:25:41 +02:00
|
|
|
ParameterSubstitution( const ParameterSubstitution& ) = delete;
|
|
|
|
ParameterSubstitution& operator=( const ParameterSubstitution& ) = delete;
|
2009-02-17 15:39:54 +00:00
|
|
|
public:
|
2017-01-19 17:59:45 +01:00
|
|
|
/// @throws css::uno::RuntimeException
|
2017-01-26 12:28:58 +01:00
|
|
|
static OUString getImplementationName_Static( );
|
2017-01-19 17:59:45 +01:00
|
|
|
/// @throws css::uno::RuntimeException
|
2017-01-26 12:28:58 +01:00
|
|
|
static css::uno::Sequence< OUString > getSupportedServiceNames_Static( );
|
2016-05-27 12:31:29 +02:00
|
|
|
static css::uno::Reference< css::uno::XInterface > create( const css::uno::Reference< css::uno::XComponentContext > & xContext);
|
2017-11-07 10:08:18 +02:00
|
|
|
private:
|
2016-05-27 12:31:29 +02:00
|
|
|
ParameterSubstitution(const css::uno::Reference< css::uno::XComponentContext >& _rxContext );
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~ParameterSubstitution() override {}
|
2009-02-17 15:39:54 +00:00
|
|
|
|
|
|
|
// XServiceInfo
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual OUString SAL_CALL getImplementationName( ) override;
|
|
|
|
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
|
|
|
|
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
|
2009-02-17 15:39:54 +00:00
|
|
|
// XInitialization
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
|
2009-02-17 15:39:54 +00:00
|
|
|
|
|
|
|
// XStringSubstitution
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual OUString SAL_CALL substituteVariables( const OUString& aText, sal_Bool bSubstRequired ) override;
|
|
|
|
virtual OUString SAL_CALL reSubstituteVariables( const OUString& aText ) override;
|
|
|
|
virtual OUString SAL_CALL getSubstituteVariableValue( const OUString& variable ) override;
|
2009-02-17 15:39:54 +00:00
|
|
|
};
|
2014-02-25 17:59:09 +01:00
|
|
|
|
2009-02-17 15:39:54 +00:00
|
|
|
} // connectivity
|
2014-02-25 17:59:09 +01:00
|
|
|
|
2010-10-27 13:11:31 +01:00
|
|
|
|
2013-10-21 05:42:51 +02:00
|
|
|
#endif
|
|
|
|
|
2010-10-27 13:11:31 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|