LibreOffice Module sd (master) 1
ShellStackGuard.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
23
24#include <com/sun/star/drawing/framework/XConfigurationChangeListener.hpp>
25
26#include <rtl/ref.hxx>
27#include <vcl/idle.hxx>
29#include <memory>
30
32{
33class XConfigurationController;
34}
36{
37class XController;
38}
39
40namespace sd
41{
42class DrawController;
43class ViewShellBase;
44}
45
46namespace sd::framework
47{
50
62{
63public:
64 explicit ShellStackGuard(rtl::Reference<sd::DrawController> const& rxController);
65 virtual ~ShellStackGuard() override;
66
67 virtual void disposing(std::unique_lock<std::mutex>&) override;
68
69 // XConfigurationChangeListener
70
71 virtual void SAL_CALL notifyConfigurationChange(
72 const css::drawing::framework::ConfigurationChangeEvent& rEvent) override;
73
74 // XEventListener
75
76 virtual void SAL_CALL disposing(const css::lang::EventObject& rEvent) override;
77
78private:
79 css::uno::Reference<css::drawing::framework::XConfigurationController>
82 std::unique_ptr<ConfigurationController::Lock> mpUpdateLock;
84
85 DECL_LINK(TimeoutHandler, Timer*, void);
86
91 bool IsPrinting() const;
92};
93
94} // end of namespace sd::framework
95
96/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewShell descendant that the stacked Draw/Impress shells are based on.
This module locks updates of the current configuration in situations when the shell stack must not be...
ShellStackGuard(rtl::Reference< sd::DrawController > const &rxController)
std::unique_ptr< ConfigurationController::Lock > mpUpdateLock
virtual void SAL_CALL disposing(const css::lang::EventObject &rEvent) override
css::uno::Reference< css::drawing::framework::XConfigurationController > mxConfigurationController
virtual void SAL_CALL notifyConfigurationChange(const css::drawing::framework::ConfigurationChangeEvent &rEvent) override
virtual void disposing(std::unique_lock< std::mutex > &) override
bool IsPrinting() const
Return <TRUE> when the printer is printing.
virtual ~ShellStackGuard() override
DECL_LINK(TimeoutHandler, Timer *, void)
comphelper::WeakComponentImplHelper< css::drawing::framework::XConfigurationChangeListener > ShellStackGuardInterfaceBase