cid#1607171 Data race condition
[LibreOffice.git] / framework / inc / xml / acceleratorconfigurationwriter.hxx
blob149a72f3363226bd57ea04b60bfe1d3dd81a8629
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 #pragma once
22 #include <accelerators/acceleratorcache.hxx>
24 #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
25 #include <rtl/ustring.hxx>
27 namespace framework{
29 class AcceleratorConfigurationWriter final
32 // member
34 private:
36 /** @short needed to write the xml configuration. */
37 css::uno::Reference< css::xml::sax::XDocumentHandler > m_xConfig;
39 /** @short reference to the outside container, where this
40 writer must work on. */
41 const AcceleratorCache& m_rContainer;
43 // interface
45 public:
47 /** @short connect this new writer instance
48 to an outside container, which should be
49 flushed to the underlying XML configuration.
51 @param rContainer
52 a reference to the outside container.
54 @param xConfig
55 used to write the configuration there.
57 AcceleratorConfigurationWriter(const AcceleratorCache& rContainer,
58 css::uno::Reference< css::xml::sax::XDocumentHandler > xConfig );
60 /** @short does nothing real ... */
61 ~AcceleratorConfigurationWriter();
63 /** @short TODO */
64 void flush();
66 // helper
68 private:
70 /** @short TODO */
71 static void impl_ts_writeKeyCommandPair(const css::awt::KeyEvent& aKey ,
72 const OUString& sCommand,
73 const css::uno::Reference< css::xml::sax::XDocumentHandler >& xConfig );
76 } // namespace framework
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */