1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include <osl/mutex.hxx>
23 #include <cppuhelper/implbase.hxx>
24 #include <cppuhelper/interfacecontainer.hxx>
25 #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
26 #include <com/sun/star/frame/XInterceptorInfo.hpp>
27 #include <com/sun/star/frame/XDispatch.hpp>
28 #include "documentdefinition.hxx"
29 #include <vcl/svapp.hxx>
35 class OInterceptor
: public ::cppu::WeakImplHelper
< css::frame::XDispatchProviderInterceptor
,
36 css::frame::XInterceptorInfo
,
37 css::frame::XDispatch
>
39 DECL_LINK( OnDispatch
, void*, void );
41 virtual ~OInterceptor() override
;
44 explicit OInterceptor( ODocumentDefinition
* _pContentHolder
);
46 /// @throws css::uno::RuntimeException
52 const css::util::URL
& URL
,
53 const css::uno::Sequence
< css::beans::PropertyValue
>& Arguments
) override
;
57 const css::uno::Reference
< css::frame::XStatusListener
>& Control
,
58 const css::util::URL
& URL
) override
;
62 const css::uno::Reference
< css::frame::XStatusListener
>& Control
,
63 const css::util::URL
& URL
) override
;
66 virtual css::uno::Sequence
< OUString
>
67 SAL_CALL
getInterceptedURLs( ) override
;
69 //XDispatchProvider ( inherited by XDispatchProviderInterceptor )
70 virtual css::uno::Reference
< css::frame::XDispatch
> SAL_CALL
72 const css::util::URL
& URL
,
73 const OUString
& TargetFrameName
,
74 sal_Int32 SearchFlags
) override
;
76 virtual css::uno::Sequence
< css::uno::Reference
< css::frame::XDispatch
> > SAL_CALL
78 const css::uno::Sequence
< css::frame::DispatchDescriptor
>& Requests
) override
;
80 //XDispatchProviderInterceptor
81 virtual css::uno::Reference
< css::frame::XDispatchProvider
> SAL_CALL
82 getSlaveDispatchProvider( ) override
;
85 setSlaveDispatchProvider(
86 const css::uno::Reference
< css::frame::XDispatchProvider
>& NewDispatchProvider
) override
;
88 virtual css::uno::Reference
< css::frame::XDispatchProvider
> SAL_CALL
89 getMasterDispatchProvider( ) override
;
92 setMasterDispatchProvider(
93 const css::uno::Reference
< css::frame::XDispatchProvider
>& NewSupplier
) override
;
99 ODocumentDefinition
* m_pContentHolder
;
101 css::uno::Reference
< css::frame::XDispatchProvider
> m_xSlaveDispatchProvider
;
102 css::uno::Reference
< css::frame::XDispatchProvider
> m_xMasterDispatchProvider
;
104 css::uno::Sequence
< OUString
> m_aInterceptedURL
;
106 typedef comphelper::OMultiTypeInterfaceContainerHelperVar3
<css::frame::XStatusListener
, OUString
>
107 StatusListenerContainer
;
108 std::unique_ptr
<StatusListenerContainer
> m_pStatCL
;
111 } // namespace dbaccess
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */