Kaydet (Commit) dd5df4cc authored tarafından Arnaud Versini's avatar Arnaud Versini Kaydeden (comit) Noel Grandin

accessibility: simplify OCommonAccessibleText

Change-Id: Ied5520179d15f0a854c16b14f5a5e6b84cef1300
Reviewed-on: https://gerrit.libreoffice.org/51514Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarArnaud Versini <arnaud.versini@libreoffice.org>
üst db22599c
......@@ -1907,7 +1907,7 @@ namespace accessibility
sal_Int32 nLength = sText.getLength();
// get word at index
implGetWordBoundary( aBoundary, nIndex );
implGetWordBoundary( sText, aBoundary, nIndex );
//sal_Int32 curWordStart = aBoundary.startPos;
......@@ -1926,7 +1926,7 @@ namespace accessibility
while ( (preWordStart >= 0 && !bWord ) || ( aBoundary.endPos > curWordStart ) )
{
preWordStart--;
bWord = implGetWordBoundary( aBoundary, preWordStart );
bWord = implGetWordBoundary( sText, aBoundary, preWordStart );
}
if ( bWord && implIsValidBoundary( aBoundary, nLength ) )
{
......@@ -2036,7 +2036,7 @@ namespace accessibility
sal_Int32 nLength = sText.getLength();
// get word at index
bool bWord = implGetWordBoundary( aBoundary, nIndex );
bool bWord = implGetWordBoundary( sText, aBoundary, nIndex );
// real current world
sal_Int32 nextWord = nIndex;
......@@ -2045,7 +2045,7 @@ namespace accessibility
{
nextWord = aBoundary.endPos;
if( sText[nextWord] == u' ' ) nextWord++;
bWord = implGetWordBoundary( aBoundary, nextWord );
bWord = implGetWordBoundary( sText, aBoundary, nextWord );
}
if ( bWord && implIsValidBoundary( aBoundary, nLength ) )
......
......@@ -54,13 +54,13 @@ namespace comphelper
static bool implIsValidIndex( sal_Int32 nIndex, sal_Int32 nLength );
static bool implIsValidRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex, sal_Int32 nLength );
static sal_Unicode implGetCharacter( const OUString& rText, sal_Int32 nIndex );
static OUString implGetTextRange( const OUString& rTest, sal_Int32 nStartIndex, sal_Int32 nEndIndex );
static OUString implGetTextRange( const OUString& rText, sal_Int32 nStartIndex, sal_Int32 nEndIndex );
virtual OUString implGetText() = 0;
virtual css::lang::Locale implGetLocale() = 0;
virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) = 0;
void implGetGlyphBoundary( css::i18n::Boundary& rBoundary, sal_Int32 nIndex );
bool implGetWordBoundary( css::i18n::Boundary& rBoundary, sal_Int32 nIndex );
void implGetSentenceBoundary( css::i18n::Boundary& rBoundary, sal_Int32 nIndex );
void implGetGlyphBoundary( const OUString& rText, css::i18n::Boundary& rBoundary, sal_Int32 nIndex );
bool implGetWordBoundary( const OUString& rText, css::i18n::Boundary& rBoundary, sal_Int32 nIndex );
void implGetSentenceBoundary( const OUString& rText, css::i18n::Boundary& rBoundary, sal_Int32 nIndex );
virtual void implGetParagraphBoundary( css::i18n::Boundary& rBoundary, sal_Int32 nIndex );
virtual void implGetLineBoundary( css::i18n::Boundary& rBoundary, sal_Int32 nIndex );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment