1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_svx.hxx"
26 #include "AccessibleTextEventQueue.hxx"
27 #include <svx/unoshape.hxx>
28 #include "editeng/unolingu.hxx"
29 #include <editeng/unotext.hxx>
30 
31 #include "editeng/unoedhlp.hxx"
32 #include "editeng/unopracc.hxx"
33 #include <svx/svdmodel.hxx>
34 #include <svx/svdpntv.hxx>
35 #include <editeng/editdata.hxx>
36 #include <editeng/editeng.hxx>
37 #include <editeng/editview.hxx>
38 
39 namespace accessibility
40 {
41 	//------------------------------------------------------------------------
42 	//
43 	// EventQueue implementation
44 	//
45 	//------------------------------------------------------------------------
46 
AccessibleTextEventQueue()47     AccessibleTextEventQueue::AccessibleTextEventQueue()
48     {
49     }
50 
~AccessibleTextEventQueue()51     AccessibleTextEventQueue::~AccessibleTextEventQueue()
52     {
53         Clear();
54     }
55 
Append(const SfxHint & rHint)56     void AccessibleTextEventQueue::Append( const SfxHint& rHint )
57     {
58         maEventQueue.push_back( new SfxHint( rHint ) );
59     }
60 
Append(const SdrHint & rHint)61     void AccessibleTextEventQueue::Append( const SdrHint& rHint )
62     {
63         maEventQueue.push_back( new SdrHint( rHint ) );
64     }
65 
Append(const SfxSimpleHint & rHint)66     void AccessibleTextEventQueue::Append( const SfxSimpleHint& rHint )
67     {
68         maEventQueue.push_back( new SfxSimpleHint( rHint ) );
69     }
70 
Append(const TextHint & rHint)71     void AccessibleTextEventQueue::Append( const TextHint& rHint )
72     {
73         maEventQueue.push_back( new TextHint( rHint ) );
74     }
75 
Append(const SvxViewHint & rHint)76     void AccessibleTextEventQueue::Append( const SvxViewHint& rHint )
77     {
78         maEventQueue.push_back( new SvxViewHint( rHint ) );
79     }
80 
Append(const SvxEditSourceHint & rHint)81     void AccessibleTextEventQueue::Append( const SvxEditSourceHint& rHint )
82     {
83         maEventQueue.push_back( new SvxEditSourceHint( rHint ) );
84     }
85 
PopFront()86     ::std::auto_ptr< SfxHint > AccessibleTextEventQueue::PopFront()
87     {
88         ::std::auto_ptr< SfxHint > aRes( *(maEventQueue.begin()) );
89         maEventQueue.pop_front();
90         return aRes;
91     }
92 
IsEmpty() const93     bool AccessibleTextEventQueue::IsEmpty() const
94     {
95         return maEventQueue.empty();
96     }
97 
Clear()98     void AccessibleTextEventQueue::Clear()
99     {
100         // clear queue
101         while( !IsEmpty() )
102             PopFront();
103     }
104 
105 } // end of namespace accessibility
106 
107 //------------------------------------------------------------------------
108