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 <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
25 #include <com/sun/star/frame/XInterceptorInfo.hpp>
26 #include <com/sun/star/frame/XDispatch.hpp>
30 class StatusChangeListenerContainer
;
33 class Interceptor
: public ::cppu::WeakImplHelper
< css::frame::XDispatchProviderInterceptor
,
34 css::frame::XInterceptorInfo
,
35 css::frame::XDispatch
>
39 Interceptor( DocumentHolder
* pDocHolder
);
40 virtual ~Interceptor() override
;
42 void DisconnectDocHolder();
47 const css::util::URL
& URL
,
48 const css::uno::Sequence
<
49 css::beans::PropertyValue
>& Arguments
) override
;
53 const css::uno::Reference
<
54 css::frame::XStatusListener
>& Control
,
55 const css::util::URL
& URL
) override
;
59 const css::uno::Reference
<
60 css::frame::XStatusListener
>& Control
,
61 const css::util::URL
& URL
) override
;
64 virtual css::uno::Sequence
< OUString
>
65 SAL_CALL
getInterceptedURLs( ) override
;
67 //XDispatchProvider ( inherited by XDispatchProviderInterceptor )
68 virtual css::uno::Reference
<
69 css::frame::XDispatch
> SAL_CALL
71 const css::util::URL
& URL
,
72 const OUString
& TargetFrameName
,
73 sal_Int32 SearchFlags
) override
;
75 virtual css::uno::Sequence
<
77 css::frame::XDispatch
> > SAL_CALL
79 const css::uno::Sequence
<
80 css::frame::DispatchDescriptor
>& Requests
) override
;
83 //XDispatchProviderInterceptor
84 virtual css::uno::Reference
<
85 css::frame::XDispatchProvider
> SAL_CALL
86 getSlaveDispatchProvider( ) override
;
89 setSlaveDispatchProvider(
90 const css::uno::Reference
<
91 css::frame::XDispatchProvider
>& NewDispatchProvider
) override
;
93 virtual css::uno::Reference
<
94 css::frame::XDispatchProvider
> SAL_CALL
95 getMasterDispatchProvider( ) override
;
98 setMasterDispatchProvider(
99 const css::uno::Reference
<
100 css::frame::XDispatchProvider
>& NewSupplier
) override
;
107 DocumentHolder
* m_pDocHolder
;
109 css::uno::Reference
< css::frame::XDispatchProvider
> m_xSlaveDispatchProvider
;
110 css::uno::Reference
< css::frame::XDispatchProvider
> m_xMasterDispatchProvider
;
112 static const css::uno::Sequence
< OUString
> m_aInterceptedURL
;
114 std::unique_ptr
<StatusChangeListenerContainer
> m_pStatCL
;
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */