fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / scripting / source / provider / URIHelper.hxx
blobe4162e82ca14678985279f9044fd7bad28f28bae
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 .
20 #ifndef INCLUDED_SCRIPTING_SOURCE_PROVIDER_URIHELPER_HXX
21 #define INCLUDED_SCRIPTING_SOURCE_PROVIDER_URIHELPER_HXX
23 #include <com/sun/star/script/provider/XScriptURIHelper.hpp>
24 #include <com/sun/star/lang/XServiceInfo.hpp>
25 #include <com/sun/star/lang/XInitialization.hpp>
26 #include <com/sun/star/uno/XComponentContext.hpp>
27 #include <com/sun/star/uno/RuntimeException.hpp>
28 #include <com/sun/star/ucb/SimpleFileAccess.hpp>
29 #include <com/sun/star/uri/XUriReferenceFactory.hpp>
31 #include <rtl/ustring.hxx>
32 #include <cppuhelper/implbase3.hxx>
34 namespace func_provider
37 class ScriptingFrameworkURIHelper :
38 public ::cppu::WeakImplHelper3<
39 css::script::provider::XScriptURIHelper,
40 css::lang::XServiceInfo,
41 css::lang::XInitialization >
43 private:
45 css::uno::Reference< css::ucb::XSimpleFileAccess3 > m_xSimpleFileAccess;
46 css::uno::Reference<css::uri::XUriReferenceFactory> m_xUriReferenceFactory;
48 OUString m_sLanguage;
49 OUString m_sLocation;
50 OUString m_sBaseURI;
52 OUString SCRIPTS_PART;
54 bool initBaseURI();
55 OUString getLanguagePart(const OUString& rStorageURI);
56 static OUString getLanguagePath(const OUString& rLanguagePart);
58 public:
60 ScriptingFrameworkURIHelper(
61 const css::uno::Reference< css::uno::XComponentContext >& xContext )
62 throw( css::uno::RuntimeException );
64 virtual ~ScriptingFrameworkURIHelper();
66 virtual void SAL_CALL
67 initialize( const css::uno::Sequence < css::uno::Any > & args )
68 throw ( css::uno::Exception, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
70 virtual OUString SAL_CALL
71 getRootStorageURI()
72 throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
74 virtual OUString SAL_CALL
75 getScriptURI( const OUString& rStorageURI )
76 throw( css::lang::IllegalArgumentException,
77 css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
79 virtual OUString SAL_CALL
80 getStorageURI( const OUString& rScriptURI )
81 throw( css::lang::IllegalArgumentException,
82 css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
84 virtual OUString SAL_CALL
85 getImplementationName()
86 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
88 virtual sal_Bool SAL_CALL
89 supportsService( const OUString& ServiceName )
90 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
92 virtual css::uno::Sequence< OUString > SAL_CALL
93 getSupportedServiceNames()
94 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
97 } // namespace func_provider
98 #endif // INCLUDED_SCRIPTING_SOURCE_PROVIDER_URIHELPER_HXX
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */