2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2011-03-31 10:05:04 +02: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 .
|
|
|
|
*/
|
2013-11-05 02:17:53 +01:00
|
|
|
#ifndef INCLUDED_SW_SOURCE_CORE_ACCESS_TEXTMARKUPHELPER_HXX
|
|
|
|
#define INCLUDED_SW_SOURCE_CORE_ACCESS_TEXTMARKUPHELPER_HXX
|
2008-07-01 14:07:30 +00:00
|
|
|
|
|
|
|
#include <sal/types.h>
|
2014-04-15 19:05:01 +02:00
|
|
|
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
|
|
|
|
#include <com/sun/star/lang/IllegalArgumentException.hpp>
|
|
|
|
#include <com/sun/star/uno/RuntimeException.hpp>
|
|
|
|
#include <com/sun/star/uno/Sequence.h>
|
2008-07-01 14:07:30 +00:00
|
|
|
|
|
|
|
namespace com { namespace sun { namespace star { namespace accessibility {
|
|
|
|
struct TextSegment;
|
|
|
|
} } } }
|
|
|
|
|
|
|
|
class SwAccessiblePortionData;
|
2015-05-20 13:05:49 +02:00
|
|
|
class SwTextNode;
|
2011-01-30 04:19:53 +09:00
|
|
|
class SwWrongList; // #i108125#
|
2008-07-01 14:07:30 +00:00
|
|
|
class SwTextMarkupHelper
|
|
|
|
{
|
|
|
|
public:
|
2010-02-24 10:47:49 +01:00
|
|
|
SwTextMarkupHelper( const SwAccessiblePortionData& rPortionData,
|
2015-05-20 13:05:49 +02:00
|
|
|
const SwTextNode& rTextNode );
|
2010-02-24 10:47:49 +01:00
|
|
|
SwTextMarkupHelper( const SwAccessiblePortionData& rPortionData,
|
2011-01-30 04:19:53 +09:00
|
|
|
const SwWrongList& rTextMarkupList ); // #i108125#
|
2008-07-01 14:07:30 +00:00
|
|
|
|
2017-01-19 17:49:29 +01:00
|
|
|
/// @throws css::lang::IllegalArgumentException
|
|
|
|
/// @throws css::uno::RuntimeException
|
2017-01-26 12:28:58 +01:00
|
|
|
sal_Int32 getTextMarkupCount( const sal_Int32 nTextMarkupType );
|
2008-07-01 14:07:30 +00:00
|
|
|
|
2017-01-19 17:49:29 +01:00
|
|
|
/// @throws css::lang::IndexOutOfBoundsException
|
|
|
|
/// @throws css::lang::IllegalArgumentException
|
|
|
|
/// @throws css::uno::RuntimeException
|
2015-11-06 10:51:51 +02:00
|
|
|
css::accessibility::TextSegment getTextMarkup(
|
2010-02-24 10:47:49 +01:00
|
|
|
const sal_Int32 nTextMarkupIndex,
|
2017-01-26 12:28:58 +01:00
|
|
|
const sal_Int32 nTextMarkupType );
|
2008-07-01 14:07:30 +00:00
|
|
|
|
2017-01-19 17:49:29 +01:00
|
|
|
/// @throws css::lang::IndexOutOfBoundsException
|
|
|
|
/// @throws css::lang::IllegalArgumentException
|
|
|
|
/// @throws css::uno::RuntimeException
|
2015-11-06 10:51:51 +02:00
|
|
|
css::uno::Sequence< css::accessibility::TextSegment >
|
2010-02-24 10:47:49 +01:00
|
|
|
getTextMarkupAtIndex( const sal_Int32 nCharIndex,
|
2017-01-26 12:28:58 +01:00
|
|
|
const sal_Int32 nTextMarkupType );
|
2008-07-01 14:07:30 +00:00
|
|
|
|
|
|
|
private:
|
2015-10-12 15:25:41 +02:00
|
|
|
SwTextMarkupHelper( const SwTextMarkupHelper& ) = delete;
|
|
|
|
SwTextMarkupHelper& operator=( const SwTextMarkupHelper& ) = delete;
|
2008-07-01 14:07:30 +00:00
|
|
|
|
|
|
|
const SwAccessiblePortionData& mrPortionData;
|
2010-02-24 10:47:49 +01:00
|
|
|
|
2011-01-30 04:19:53 +09:00
|
|
|
// #i108125#
|
2015-05-20 13:05:49 +02:00
|
|
|
const SwTextNode* mpTextNode;
|
2010-02-24 10:47:49 +01:00
|
|
|
const SwWrongList* mpTextMarkupList;
|
2008-07-01 14:07:30 +00:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2010-10-14 08:30:41 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|