2010-10-12 15:53:47 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-11-21 22:06:52 +00:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2002-12-12 11:36:51 +00:00
|
|
|
|
2017-04-14 08:42:15 +10:00
|
|
|
#include <memory>
|
2002-12-12 11:36:51 +00:00
|
|
|
#include "AccessibleTextEventQueue.hxx"
|
2007-06-27 15:40:09 +00:00
|
|
|
#include <svx/unoshape.hxx>
|
2017-10-23 22:30:42 +02:00
|
|
|
#include <editeng/unolingu.hxx>
|
2010-01-07 18:52:36 +01:00
|
|
|
#include <editeng/unotext.hxx>
|
2002-12-12 11:36:51 +00:00
|
|
|
|
2017-10-23 22:30:42 +02:00
|
|
|
#include <editeng/unoedhlp.hxx>
|
|
|
|
#include <editeng/unopracc.hxx>
|
2007-06-27 15:40:09 +00:00
|
|
|
#include <svx/svdmodel.hxx>
|
|
|
|
#include <svx/svdpntv.hxx>
|
2010-01-07 18:52:36 +01:00
|
|
|
#include <editeng/editdata.hxx>
|
|
|
|
#include <editeng/editeng.hxx>
|
|
|
|
#include <editeng/editview.hxx>
|
2002-12-12 11:36:51 +00:00
|
|
|
|
|
|
|
namespace accessibility
|
|
|
|
{
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2014-02-25 20:51:35 +01:00
|
|
|
|
2002-12-12 11:36:51 +00:00
|
|
|
// EventQueue implementation
|
2014-02-25 20:51:35 +01:00
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2002-12-12 11:36:51 +00:00
|
|
|
AccessibleTextEventQueue::AccessibleTextEventQueue()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
AccessibleTextEventQueue::~AccessibleTextEventQueue()
|
|
|
|
{
|
|
|
|
Clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
void AccessibleTextEventQueue::Append( const SdrHint& rHint )
|
|
|
|
{
|
|
|
|
maEventQueue.push_back( new SdrHint( rHint ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
void AccessibleTextEventQueue::Append( const TextHint& rHint )
|
|
|
|
{
|
|
|
|
maEventQueue.push_back( new TextHint( rHint ) );
|
|
|
|
}
|
|
|
|
|
2016-08-18 13:45:41 +02:00
|
|
|
void AccessibleTextEventQueue::Append( const SvxViewChangedHint& rHint )
|
2002-12-12 11:36:51 +00:00
|
|
|
{
|
2016-08-18 13:45:41 +02:00
|
|
|
maEventQueue.push_back( new SvxViewChangedHint( rHint ) );
|
2002-12-12 11:36:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void AccessibleTextEventQueue::Append( const SvxEditSourceHint& rHint )
|
|
|
|
{
|
|
|
|
maEventQueue.push_back( new SvxEditSourceHint( rHint ) );
|
|
|
|
}
|
|
|
|
|
2014-09-29 15:20:07 +02:00
|
|
|
::std::unique_ptr< SfxHint > AccessibleTextEventQueue::PopFront()
|
2002-12-12 11:36:51 +00:00
|
|
|
{
|
2014-09-29 15:20:07 +02:00
|
|
|
::std::unique_ptr< SfxHint > aRes( *(maEventQueue.begin()) );
|
2002-12-12 11:36:51 +00:00
|
|
|
maEventQueue.pop_front();
|
|
|
|
return aRes;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool AccessibleTextEventQueue::IsEmpty() const
|
|
|
|
{
|
|
|
|
return maEventQueue.empty();
|
|
|
|
}
|
|
|
|
|
|
|
|
void AccessibleTextEventQueue::Clear()
|
|
|
|
{
|
|
|
|
// clear queue
|
|
|
|
while( !IsEmpty() )
|
|
|
|
PopFront();
|
|
|
|
}
|
|
|
|
|
|
|
|
} // end of namespace accessibility
|
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2010-10-12 15:53:47 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|