From 9b5fec553e29cfe4634a618dcc38bd4b9e3367bd Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Fri, 30 May 2008 07:51:03 +0000 Subject: INTEGRATION: CWS uaa06 (1.1.2); FILE ADDED 2008/05/14 12:54:22 obr 1.1.2.1: #i86659# introduce XAccessibleMultiLineText --- .../accessibility/XAccessibleMultiLineText.idl | 151 +++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 offapi/com/sun/star/accessibility/XAccessibleMultiLineText.idl diff --git a/offapi/com/sun/star/accessibility/XAccessibleMultiLineText.idl b/offapi/com/sun/star/accessibility/XAccessibleMultiLineText.idl new file mode 100644 index 000000000000..8e879430c57c --- /dev/null +++ b/offapi/com/sun/star/accessibility/XAccessibleMultiLineText.idl @@ -0,0 +1,151 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: XAccessibleMultiLineText.idl,v $ + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_accessibility_XAccessibleMultiLineText_idl__ +#define __com_sun_star_accessibility_XAccessibleMultiLineText_idl__ + +#ifndef __com_sun_star_accessibility_XAccessibleText_idl__ +#include +#endif +#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__ +#include +#endif +#ifndef __com_sun_star_beans_PropertyValue_idl__ +#include +#endif + +module com { module sun { module star { module accessibility { + +/** Implement this interface to give provide a mapping between text index + and line numbers. + +

This interface is typically used in conjunction with the + XAccessibleText interface and extents it with a notion + of line numbers

+ + @since OOo 3.0.0 +*/ + +/// not yet published +interface XAccessibleMultiLineText + : ::com::sun::star::accessibility::XAccessibleText +{ + /** Returns the line number at the specified index. + +

For a text object that is spread over multiple lines, this method + provides a mapping from a text index to the corresponding line number. +

+ + @param nIndex + Index for which the line number should be returned. + The valid range is 0..length. + + @return + Returns the line number of the specified text index. + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if the index is invalid. + */ + long getLineNumberAtIndex([in] long nIndex) + raises (::com::sun::star::lang::IndexOutOfBoundsException); + + /** Retuns the text of the specified line. + +

Returns the substring of text that makes up the specified line + number.

+ +

The number of lines can be obtained by calling + XAccessibleMultiLineText::getLineNumberAtIndex + with the index of the last character. In a loop, the last line + has been reached when TextSegment::SegmentEnd + of the returned value is equal to the index of the last + character of the text.

+ + @param nLineNo + The number of the line to return the substring from. + The valid range is 0..getLineNumberAtIndex(getCharacterCount()). + + @return + Returns the requested text portion. This portion may be empty + or invalid when no appropriate text portion is found. + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if the line number is invalid + */ + + TextSegment getTextAtLineNumber([in] long nLineNo) + raises (::com::sun::star::lang::IndexOutOfBoundsException); + + /** Returns the text of the line in which the caret is located. + +

The substring returned will most of the time be identical to + calling XAccessibleText::getTextAtIndex with + the index returned by XAccessibleText::getCaretPosition + and type LINE beside the + following special case:

+ +

Some text implementations place the caret at the end of the current + line when the End key gets pressed. Since the index of this position + is identical to the one of the first character of the following line, + XAccessibleMultiLineText::getLineNumberAtIndex will + return the line following the current one in this case.

+ + @return + Returns the requested text portion. This portion may be empty + or invalid if the paragraph object does not have a valid caret + position. + */ + + TextSegment getTextAtLineWithCaret(); + + /** Returns the number of the line in which the caret is located. + +

The line number returned will most of the time be identical to + calling XAccessibleMultiLineText::getLineNumberAtIndex + with the index returned by XAccessibleText::getCaretPosition + beside the following special case:

+ +

Some text implementations place the caret at the end of the current + line when the End key gets pressed. Since the index of this position + is identical to the one of the first character of the following line, + XAccessibleMultiLineText::getLineNumberAtIndex will + return the line following the current one in this case.

+ + @return + Returns the index of the line in which the caret is located or -1 + if the paragraph does not have a valid caret position. + */ + + long getNumberOfLineWithCaret(); +}; + +}; }; }; }; + +#endif -- cgit 'distro/lhm/libreoffice-7-1+backports'>distro/lhm/libreoffice-7-1+backports LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-02-19 15:54:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-02-20 07:33:33 +0100
commit197bcde5c4d771ace11962213c11c9763be11039 (patch)
tree408f1edbd3d9e495e1248b286f161a82a4c9ef23 /svtools
parent66217bc8222537d7358464131a7fa30917a3a960 (diff)
loplugin:refcounting in svtools
Change-Id: I20f6b07aded513a4100d7ae4c7d74365a93dacca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111221 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>