bump product version to 5.0.4.1
[LibreOffice.git] / sd / source / ui / framework / configuration / UpdateRequest.hxx
blobcd597028ba91aca5f0ba4c8f1a73bd2c474d45ca
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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_SD_SOURCE_UI_FRAMEWORK_CONFIGURATION_UPDATEREQUEST_HXX
21 #define INCLUDED_SD_SOURCE_UI_FRAMEWORK_CONFIGURATION_UPDATEREQUEST_HXX
23 #include "MutexOwner.hxx"
24 #include <com/sun/star/drawing/framework/XConfigurationChangeRequest.hpp>
25 #include <com/sun/star/container/XNamed.hpp>
26 #include <com/sun/star/drawing/framework/XConfiguration.hpp>
27 #include <cppuhelper/compbase2.hxx>
29 namespace {
31 typedef ::cppu::WeakComponentImplHelper2 <
32 ::com::sun::star::drawing::framework::XConfigurationChangeRequest,
33 ::com::sun::star::container::XNamed
34 > UpdateRequestInterfaceBase;
36 } // end of anonymous namespace.
38 namespace sd { namespace framework {
40 /** This update request is used to request configuration updates
41 asynchronous when no other requests are being processed. When there are
42 other requests then we can simply wait until the last one is executed:
43 the configuration is updated when the request queue becomes empty. This
44 is use by this implementation as well. The execute() method does not
45 really do anything. This request just triggers the update of the
46 configuration when it is removed as last request from the queue.
48 class UpdateRequest
49 : private MutexOwner,
50 public UpdateRequestInterfaceBase
52 public:
53 UpdateRequest() throw();
54 virtual ~UpdateRequest() throw();
56 // XConfigurationChangeOperation
58 virtual void SAL_CALL execute (
59 const ::com::sun::star::uno::Reference<
60 com::sun::star::drawing::framework::XConfiguration>& rxConfiguration)
61 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
63 // XNamed
65 /** Return a human readable string representation. This is used for
66 debugging purposes.
68 virtual OUString SAL_CALL getName()
69 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
71 /** This call is ignored because the XNamed interface is (mis)used to
72 give access to a human readable name for debugging purposes.
74 virtual void SAL_CALL setName (const OUString& rName)
75 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
78 } } // end of namespace sd::framework
80 #endif
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */