GPU-Calc: remove Alloc_Host_Ptr for clmem of NAN vector
[LibreOffice.git] / svl / source / uno / pathservice.cxx
blobf20611f6e0b65867a4930af56c4a81ca523a8b04
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #include <unotools/pathoptions.hxx>
22 #include "sal/types.h"
23 #include "rtl/ustring.hxx"
24 #include <cppuhelper/implbase2.hxx>
25 #include <com/sun/star/frame/XConfigManager.hpp>
26 #include <com/sun/star/lang/XServiceInfo.hpp>
29 // -----------------------------------------------------------------------
31 class PathService : public ::cppu::WeakImplHelper2< css::frame::XConfigManager, css::lang::XServiceInfo >
33 SvtPathOptions m_aOptions;
35 public:
36 PathService()
39 virtual OUString SAL_CALL getImplementationName()
40 throw(css::uno::RuntimeException)
42 return OUString("com.sun.star.comp.svl.PathService");
45 virtual sal_Bool SAL_CALL supportsService (
46 const OUString & rName)
47 throw(css::uno::RuntimeException)
49 return rName.equalsAscii("com.sun.star.config.SpecialConfigManager");
52 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
53 throw(css::uno::RuntimeException)
55 css::uno::Sequence< OUString > aRet(1);
56 aRet.getArray()[0] = "com.sun.star.config.SpecialConfigManager";
57 return aRet;
60 virtual OUString SAL_CALL substituteVariables (
61 const OUString& sText)
62 throw(css::uno::RuntimeException)
64 return m_aOptions.SubstituteVariable( sText );
67 virtual void SAL_CALL addPropertyChangeListener (
68 const OUString &, const css::uno::Reference< css::beans::XPropertyChangeListener > &)
69 throw(css::uno::RuntimeException)
72 virtual void SAL_CALL removePropertyChangeListener (
73 const OUString &, const css::uno::Reference< css::beans::XPropertyChangeListener > &)
74 throw(css::uno::RuntimeException)
77 virtual void SAL_CALL flush()
78 throw(css::uno::RuntimeException)
82 // -----------------------------------------------------------------------
84 css::uno::Reference< css::uno::XInterface > PathService_CreateInstance (
85 SAL_UNUSED_PARAMETER const css::uno::Reference<
86 css::lang::XMultiServiceFactory > &)
88 return css::uno::Reference< css::uno::XInterface >(
89 static_cast< cppu::OWeakObject* >(new PathService()));
92 // -----------------------------------------------------------------------
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */