update credits
[LibreOffice.git] / framework / inc / xml / acceleratorconfigurationwriter.hxx
blobac51454b213caeb5363231a9ee0214245ea09691
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 _FRAMEWORK_XML_ACCELERATORCONFIGURATIONWRITER_HXX_
21 #define _FRAMEWORK_XML_ACCELERATORCONFIGURATIONWRITER_HXX_
23 #include <accelerators/acceleratorcache.hxx>
24 #include <accelerators/keymapping.hxx>
25 #include <threadhelp/threadhelpbase.hxx>
26 #include <general.h>
28 #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
30 #include <salhelper/singletonref.hxx>
31 #include <rtl/ustring.hxx>
33 namespace framework{
35 class AcceleratorConfigurationWriter : private ThreadHelpBase
37 //-------------------------------------------
38 // member
40 private:
42 //---------------------------------------
43 /** @short needed to write the xml configuration. */
44 css::uno::Reference< css::xml::sax::XDocumentHandler > m_xConfig;
46 //---------------------------------------
47 /** @short reference to the outside container, where this
48 writer must work on. */
49 const AcceleratorCache& m_rContainer;
51 //---------------------------------------
52 /** @short is used to map key codes to its
53 string representation.
55 @descr To perform this operatio is
56 created only one times and holded
57 alive forever ...*/
58 ::salhelper::SingletonRef< KeyMapping > m_rKeyMapping;
60 //-------------------------------------------
61 // interface
63 public:
65 //---------------------------------------
66 /** @short connect this new writer instance
67 to an outside container, which should be
68 flushed to the underlying XML configuration.
70 @param rContainer
71 a reference to the outside container.
73 @param xConfig
74 used to write the configuration there.
76 AcceleratorConfigurationWriter(const AcceleratorCache& rContainer,
77 const css::uno::Reference< css::xml::sax::XDocumentHandler >& xConfig );
79 //---------------------------------------
80 /** @short does nothing real ... */
81 virtual ~AcceleratorConfigurationWriter();
83 //---------------------------------------
84 /** @short TODO */
85 virtual void flush();
87 //-------------------------------------------
88 // helper
90 private:
92 //---------------------------------------
93 /** @short TODO */
94 void impl_ts_writeKeyCommandPair(const css::awt::KeyEvent& aKey ,
95 const OUString& sCommand,
96 const css::uno::Reference< css::xml::sax::XDocumentHandler >& xConfig );
99 } // namespace framework
101 #endif // _FRAMEWORK_XML_ACCELERATORCONFIGURATIONWRITER_HXX_
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */