Line data Source code
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 : #include "AccessibleTextEventQueue.hxx"
21 : #include <svx/unoshape.hxx>
22 : #include "editeng/unolingu.hxx"
23 : #include <editeng/unotext.hxx>
24 :
25 : #include "editeng/unoedhlp.hxx"
26 : #include "editeng/unopracc.hxx"
27 : #include <svx/svdmodel.hxx>
28 : #include <svx/svdpntv.hxx>
29 : #include <editeng/editdata.hxx>
30 : #include <editeng/editeng.hxx>
31 : #include <editeng/editview.hxx>
32 :
33 : namespace accessibility
34 : {
35 : //------------------------------------------------------------------------
36 : //
37 : // EventQueue implementation
38 : //
39 : //------------------------------------------------------------------------
40 :
41 0 : AccessibleTextEventQueue::AccessibleTextEventQueue()
42 : {
43 0 : }
44 :
45 0 : AccessibleTextEventQueue::~AccessibleTextEventQueue()
46 : {
47 0 : Clear();
48 0 : }
49 :
50 0 : void AccessibleTextEventQueue::Append( const SdrHint& rHint )
51 : {
52 0 : maEventQueue.push_back( new SdrHint( rHint ) );
53 0 : }
54 :
55 0 : void AccessibleTextEventQueue::Append( const TextHint& rHint )
56 : {
57 0 : maEventQueue.push_back( new TextHint( rHint ) );
58 0 : }
59 :
60 0 : void AccessibleTextEventQueue::Append( const SvxViewHint& rHint )
61 : {
62 0 : maEventQueue.push_back( new SvxViewHint( rHint ) );
63 0 : }
64 :
65 0 : void AccessibleTextEventQueue::Append( const SvxEditSourceHint& rHint )
66 : {
67 0 : maEventQueue.push_back( new SvxEditSourceHint( rHint ) );
68 0 : }
69 :
70 : SAL_WNODEPRECATED_DECLARATIONS_PUSH
71 0 : ::std::auto_ptr< SfxHint > AccessibleTextEventQueue::PopFront()
72 : {
73 0 : ::std::auto_ptr< SfxHint > aRes( *(maEventQueue.begin()) );
74 0 : maEventQueue.pop_front();
75 0 : return aRes;
76 : }
77 : SAL_WNODEPRECATED_DECLARATIONS_POP
78 :
79 0 : bool AccessibleTextEventQueue::IsEmpty() const
80 : {
81 0 : return maEventQueue.empty();
82 : }
83 :
84 0 : void AccessibleTextEventQueue::Clear()
85 : {
86 : // clear queue
87 0 : while( !IsEmpty() )
88 0 : PopFront();
89 0 : }
90 :
91 : } // end of namespace accessibility
92 :
93 : //------------------------------------------------------------------------
94 :
95 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|