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 .
20 #ifndef INCLUDED_EMBEDDEDOBJ_SOURCE_INC_INTERCEPT_HXX
21 #define INCLUDED_EMBEDDEDOBJ_SOURCE_INC_INTERCEPT_HXX
23 #include <osl/mutex.hxx>
24 #include <cppuhelper/implbase.hxx>
25 #include <comphelper/interfacecontainer2.hxx>
26 #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
27 #include <com/sun/star/frame/XInterceptorInfo.hpp>
28 #include <com/sun/star/frame/XDispatch.hpp>
32 class StatusChangeListenerContainer
;
35 class Interceptor
: public ::cppu::WeakImplHelper
< css::frame::XDispatchProviderInterceptor
,
36 css::frame::XInterceptorInfo
,
37 css::frame::XDispatch
>
41 Interceptor( DocumentHolder
* pDocHolder
);
42 virtual ~Interceptor() override
;
44 void DisconnectDocHolder();
49 const css::util::URL
& URL
,
50 const css::uno::Sequence
<
51 css::beans::PropertyValue
>& Arguments
) override
;
55 const css::uno::Reference
<
56 css::frame::XStatusListener
>& Control
,
57 const css::util::URL
& URL
) override
;
61 const css::uno::Reference
<
62 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
<
71 css::frame::XDispatch
> SAL_CALL
73 const css::util::URL
& URL
,
74 const OUString
& TargetFrameName
,
75 sal_Int32 SearchFlags
) override
;
77 virtual css::uno::Sequence
<
79 css::frame::XDispatch
> > SAL_CALL
81 const css::uno::Sequence
<
82 css::frame::DispatchDescriptor
>& Requests
) override
;
85 //XDispatchProviderInterceptor
86 virtual css::uno::Reference
<
87 css::frame::XDispatchProvider
> SAL_CALL
88 getSlaveDispatchProvider( ) override
;
91 setSlaveDispatchProvider(
92 const css::uno::Reference
<
93 css::frame::XDispatchProvider
>& NewDispatchProvider
) override
;
95 virtual css::uno::Reference
<
96 css::frame::XDispatchProvider
> SAL_CALL
97 getMasterDispatchProvider( ) override
;
100 setMasterDispatchProvider(
101 const css::uno::Reference
<
102 css::frame::XDispatchProvider
>& NewSupplier
) override
;
109 DocumentHolder
* m_pDocHolder
;
111 css::uno::Reference
< css::frame::XDispatchProvider
> m_xSlaveDispatchProvider
;
112 css::uno::Reference
< css::frame::XDispatchProvider
> m_xMasterDispatchProvider
;
114 static css::uno::Sequence
< OUString
> m_aInterceptedURL
;
116 std::unique_ptr
<StatusChangeListenerContainer
> m_pStatCL
;
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */