Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #include "AccessibleTextEventQueue.hxx"
30 : : #include <svx/unoshape.hxx>
31 : : #include "editeng/unolingu.hxx"
32 : : #include <editeng/unotext.hxx>
33 : :
34 : : #include "editeng/unoedhlp.hxx"
35 : : #include "editeng/unopracc.hxx"
36 : : #include <svx/svdmodel.hxx>
37 : : #include <svx/svdpntv.hxx>
38 : : #include <editeng/editdata.hxx>
39 : : #include <editeng/editeng.hxx>
40 : : #include <editeng/editview.hxx>
41 : :
42 : : namespace accessibility
43 : : {
44 : : //------------------------------------------------------------------------
45 : : //
46 : : // EventQueue implementation
47 : : //
48 : : //------------------------------------------------------------------------
49 : :
50 : 56 : AccessibleTextEventQueue::AccessibleTextEventQueue()
51 : : {
52 : 56 : }
53 : :
54 : 45 : AccessibleTextEventQueue::~AccessibleTextEventQueue()
55 : : {
56 [ + - ]: 45 : Clear();
57 : 45 : }
58 : :
59 : 4 : void AccessibleTextEventQueue::Append( const SdrHint& rHint )
60 : : {
61 [ + - ][ + - ]: 4 : maEventQueue.push_back( new SdrHint( rHint ) );
62 : 4 : }
63 : :
64 : 5 : void AccessibleTextEventQueue::Append( const TextHint& rHint )
65 : : {
66 [ + - ][ + - ]: 5 : maEventQueue.push_back( new TextHint( rHint ) );
67 : 5 : }
68 : :
69 : 0 : void AccessibleTextEventQueue::Append( const SvxViewHint& rHint )
70 : : {
71 [ # # ][ # # ]: 0 : maEventQueue.push_back( new SvxViewHint( rHint ) );
72 : 0 : }
73 : :
74 : 0 : void AccessibleTextEventQueue::Append( const SvxEditSourceHint& rHint )
75 : : {
76 [ # # ][ # # ]: 0 : maEventQueue.push_back( new SvxEditSourceHint( rHint ) );
77 : 0 : }
78 : :
79 : : SAL_WNODEPRECATED_DECLARATIONS_PUSH
80 : 9 : ::std::auto_ptr< SfxHint > AccessibleTextEventQueue::PopFront()
81 : : {
82 [ + - ]: 9 : ::std::auto_ptr< SfxHint > aRes( *(maEventQueue.begin()) );
83 [ + - ]: 9 : maEventQueue.pop_front();
84 : 9 : return aRes;
85 : : }
86 : : SAL_WNODEPRECATED_DECLARATIONS_POP
87 : :
88 : 63 : bool AccessibleTextEventQueue::IsEmpty() const
89 : : {
90 : 63 : return maEventQueue.empty();
91 : : }
92 : :
93 : 45 : void AccessibleTextEventQueue::Clear()
94 : : {
95 : : // clear queue
96 [ - + ]: 45 : while( !IsEmpty() )
97 : 0 : PopFront();
98 : 45 : }
99 : :
100 : : } // end of namespace accessibility
101 : :
102 : : //------------------------------------------------------------------------
103 : :
104 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|