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 <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
26 #include <com/sun/star/frame/XInterceptorInfo.hpp>
27 #include <com/sun/star/frame/XDispatch.hpp>
31 class StatusChangeListenerContainer
;
34 class Interceptor
: public ::cppu::WeakImplHelper
< css::frame::XDispatchProviderInterceptor
,
35 css::frame::XInterceptorInfo
,
36 css::frame::XDispatch
>
40 Interceptor( DocumentHolder
* pDocHolder
);
41 virtual ~Interceptor() override
;
43 void DisconnectDocHolder();
48 const css::util::URL
& URL
,
49 const css::uno::Sequence
<
50 css::beans::PropertyValue
>& Arguments
) override
;
54 const css::uno::Reference
<
55 css::frame::XStatusListener
>& Control
,
56 const css::util::URL
& URL
) override
;
60 const css::uno::Reference
<
61 css::frame::XStatusListener
>& Control
,
62 const css::util::URL
& URL
) override
;
65 virtual css::uno::Sequence
< OUString
>
66 SAL_CALL
getInterceptedURLs( ) override
;
68 //XDispatchProvider ( inherited by XDispatchProviderInterceptor )
69 virtual css::uno::Reference
<
70 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
<
78 css::frame::XDispatch
> > SAL_CALL
80 const css::uno::Sequence
<
81 css::frame::DispatchDescriptor
>& Requests
) override
;
84 //XDispatchProviderInterceptor
85 virtual css::uno::Reference
<
86 css::frame::XDispatchProvider
> SAL_CALL
87 getSlaveDispatchProvider( ) override
;
90 setSlaveDispatchProvider(
91 const css::uno::Reference
<
92 css::frame::XDispatchProvider
>& NewDispatchProvider
) override
;
94 virtual css::uno::Reference
<
95 css::frame::XDispatchProvider
> SAL_CALL
96 getMasterDispatchProvider( ) override
;
99 setMasterDispatchProvider(
100 const css::uno::Reference
<
101 css::frame::XDispatchProvider
>& NewSupplier
) override
;
108 DocumentHolder
* m_pDocHolder
;
110 css::uno::Reference
< css::frame::XDispatchProvider
> m_xSlaveDispatchProvider
;
111 css::uno::Reference
< css::frame::XDispatchProvider
> m_xMasterDispatchProvider
;
113 static css::uno::Sequence
< OUString
> m_aInterceptedURL
;
115 std::unique_ptr
<StatusChangeListenerContainer
> m_pStatCL
;
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */