Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
eb4cd7e7
Kaydet (Commit)
eb4cd7e7
authored
Haz 09, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
some remaining sal_uInt16 to sal_Int32 editeng ESelection bounds
Change-Id: Ib47dea5c2d965cf613c465e624a1bdd81becb1c2
üst
f1f7f3f1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
107 deletions
+58
-107
AccessibleEditableTextPara.cxx
editeng/source/accessibility/AccessibleEditableTextPara.cxx
+47
-94
AccessibleStaticTextBase.cxx
editeng/source/accessibility/AccessibleStaticTextBase.cxx
+4
-6
AccessibleEditableTextPara.hxx
include/editeng/AccessibleEditableTextPara.hxx
+2
-2
fuinsfil.cxx
sd/source/ui/func/fuinsfil.cxx
+2
-2
unosrch.cxx
sd/source/ui/unoidl/unosrch.cxx
+2
-2
sdview2.cxx
sd/source/ui/view/sdview2.cxx
+1
-1
No files found.
editeng/source/accessibility/AccessibleEditableTextPara.cxx
Dosyayı görüntüle @
eb4cd7e7
...
...
@@ -180,7 +180,7 @@ namespace accessibility
void
AccessibleEditableTextPara
::
implGetSelection
(
sal_Int32
&
nStartIndex
,
sal_Int32
&
nEndIndex
)
{
sal_
uInt16
nStart
,
nEnd
;
sal_
Int32
nStart
,
nEnd
;
if
(
GetSelection
(
nStart
,
nEnd
)
)
{
...
...
@@ -359,8 +359,7 @@ namespace accessibility
"AccessibleEditableTextPara::MakeSelection: index value overflow"
);
sal_Int32
nParaIndex
=
GetParagraphIndex
();
return
ESelection
(
nParaIndex
,
static_cast
<
sal_uInt16
>
(
nStartEEIndex
),
nParaIndex
,
static_cast
<
sal_uInt16
>
(
nEndEEIndex
)
);
return
ESelection
(
nParaIndex
,
nStartEEIndex
,
nParaIndex
,
nEndEEIndex
);
}
ESelection
AccessibleEditableTextPara
::
MakeSelection
(
sal_Int32
nEEIndex
)
...
...
@@ -395,7 +394,7 @@ namespace accessibility
CheckPosition
(
nEnd
);
}
bool
AccessibleEditableTextPara
::
GetSelection
(
sal_uInt16
&
nStartPos
,
sal_uInt16
&
nEndPos
)
bool
AccessibleEditableTextPara
::
GetSelection
(
sal_Int32
&
nStartPos
,
sal_Int32
&
nEndPos
)
{
ESelection
aSelection
;
sal_Int32
nPara
=
GetParagraphIndex
();
...
...
@@ -443,9 +442,9 @@ namespace accessibility
return
GetTextForwarder
().
GetText
(
MakeSelection
(
nStartIndex
,
nEndIndex
)
);
}
sal_
uInt16
AccessibleEditableTextPara
::
GetTextLen
()
const
sal_
Int32
AccessibleEditableTextPara
::
GetTextLen
()
const
{
return
GetTextForwarder
().
GetTextLen
(
static_cast
<
sal_uInt16
>
(
GetParagraphIndex
()
)
);
return
GetTextForwarder
().
GetTextLen
(
GetParagraphIndex
()
);
}
SvxEditSourceAdapter
&
AccessibleEditableTextPara
::
GetEditSource
()
const
...
...
@@ -652,7 +651,7 @@ namespace accessibility
return
GetTextForwarder
().
GetAttributeRun
(
nStartIndex
,
nEndIndex
,
GetParagraphIndex
(),
static_cast
<
sal_uInt16
>
(
nIndex
)
);
nIndex
);
}
uno
::
Any
SAL_CALL
AccessibleEditableTextPara
::
queryInterface
(
const
uno
::
Type
&
rType
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
...
...
@@ -915,13 +914,13 @@ namespace accessibility
//For field object info
sal_Int32
nParaIndex
=
GetParagraphIndex
();
sal_Int32
nAllFieldLen
=
0
;
sal_Int32
nField
=
rCacheTF
.
GetFieldCount
(
sal_uInt16
(
nParaIndex
)
),
nFoundFieldIndex
=
-
1
;
sal_Int32
nField
=
rCacheTF
.
GetFieldCount
(
nParaIndex
),
nFoundFieldIndex
=
-
1
;
EFieldInfo
ree
;
sal_Int32
reeBegin
,
reeEnd
;
sal_Int32
nFieldType
=
-
1
;
for
(
sal_
uInt16
j
=
0
;
j
<
nField
;
j
++
)
for
(
sal_
Int32
j
=
0
;
j
<
nField
;
j
++
)
{
ree
=
rCacheTF
.
GetFieldInfo
(
sal_uInt16
(
nParaIndex
)
,
j
);
ree
=
rCacheTF
.
GetFieldInfo
(
nParaIndex
,
j
);
reeBegin
=
ree
.
aPosition
.
nIndex
+
nAllFieldLen
;
reeEnd
=
reeBegin
+
ree
.
aCurrentText
.
getLength
();
nAllFieldLen
+=
(
ree
.
aCurrentText
.
getLength
()
-
1
);
...
...
@@ -1064,7 +1063,7 @@ namespace accessibility
SvxTextForwarder
&
rCacheTF
=
GetTextForwarder
();
Point
aLogPoint
(
GetViewForwarder
().
PixelToLogic
(
aPoint
,
rCacheTF
.
GetMapMode
()
)
);
EBulletInfo
aBulletInfo
=
rCacheTF
.
GetBulletInfo
(
static_cast
<
sal_uInt16
>
(
GetParagraphIndex
())
);
EBulletInfo
aBulletInfo
=
rCacheTF
.
GetBulletInfo
(
GetParagraphIndex
()
);
if
(
aBulletInfo
.
nParagraph
!=
EE_PARA_NOT_FOUND
&&
aBulletInfo
.
bVisible
&&
...
...
@@ -1205,7 +1204,7 @@ namespace accessibility
GetParagraphIndex
()
==
aSelection
.
nEndPara
)
{
// caret is always nEndPara,nEndPos
EBulletInfo
aBulletInfo
=
GetTextForwarder
().
GetBulletInfo
(
static_cast
<
sal_uInt16
>
(
GetParagraphIndex
())
);
EBulletInfo
aBulletInfo
=
GetTextForwarder
().
GetBulletInfo
(
GetParagraphIndex
()
);
if
(
aBulletInfo
.
nParagraph
!=
EE_PARA_NOT_FOUND
&&
aBulletInfo
.
bVisible
&&
aBulletInfo
.
nType
!=
SVX_NUM_BITMAP
)
...
...
@@ -1242,7 +1241,7 @@ namespace accessibility
//Skip the bullet range to ingnore the bullet text
SvxTextForwarder
&
rCacheTF
=
GetTextForwarder
();
EBulletInfo
aBulletInfo
=
rCacheTF
.
GetBulletInfo
(
static_cast
<
sal_uInt16
>
(
GetParagraphIndex
())
);
EBulletInfo
aBulletInfo
=
rCacheTF
.
GetBulletInfo
(
GetParagraphIndex
()
);
if
(
aBulletInfo
.
bVisible
)
nIndex
+=
aBulletInfo
.
aText
.
getLength
();
CheckIndex
(
nIndex
);
// may throw IndexOutOfBoundsException
...
...
@@ -1352,7 +1351,7 @@ namespace accessibility
CheckPosition
(
nIndex
);
SvxTextForwarder
&
rCacheTF
=
GetTextForwarder
();
Rectangle
aRect
=
rCacheTF
.
GetCharBounds
(
static_cast
<
sal_uInt16
>
(
GetParagraphIndex
()
),
static_cast
<
sal_uInt16
>
(
nIndex
)
);
Rectangle
aRect
=
rCacheTF
.
GetCharBounds
(
GetParagraphIndex
(),
nIndex
);
// convert to screen
Rectangle
aScreenRect
=
AccessibleEditableTextPara
::
LogicToPixel
(
aRect
,
...
...
@@ -1554,26 +1553,6 @@ namespace accessibility
// Underline
if
(
rRes
.
Name
==
"CharUnderline"
)
{
/*
// MT: Implement XAccessibleTextMarkup, mark with TextMarkupType::SPELLCHECK. This way done in SW.
if (IsCurrentEditorEnableAutoSpell( mxParent ))
{
try
{
SvxEditViewForwarder& rCacheVF = GetEditViewForwarder( false );
sal_Bool bWrong = rCacheVF.IsWrongSpelledWordAtPos( GetParagraphIndex(), nIndex );
if ( bWrong )
{
uno::Any &anyUnderLine = pRes[9].Value;
// MT IA2: Not needed? sal_uInt16 crUnderLine = (sal_uInt16)(anyUnderLine.pReserved);
anyUnderLine <<= (sal_uInt16)UNDERLINE_WAVE;
}
}
catch( const uno::RuntimeException& )
{
}
}
*/
continue
;
}
// Underline color && Mis-spell
...
...
@@ -1608,32 +1587,12 @@ namespace accessibility
}
}
}
// MT: Implement XAccessibleTextMarkup, mark with TextMarkupType::SPELLCHECK. This way done in SW.
/*
if (IsCurrentEditorEnableAutoSpell( mxParent ))
{
try
{
SvxEditViewForwarder& rCacheVF = GetEditViewForwarder( false );
sal_Bool bWrong = rCacheVF.IsWrongSpelledWordAtPos( GetParagraphIndex(), nIndex );
if ( bWrong )
{
uno::Any &anyUnderLineColor = rRes.Value;
// MT IA2: Not needed? sal_uInt16 crUnderLineColor = (sal_uInt16)(anyUnderLineColor.pReserved);
anyUnderLineColor <<= COL_LIGHTRED;
}
}
catch( const uno::RuntimeException& )
{
}
}
*/
continue
;
}
// NumberingLevel
if
(
rRes
.
Name
==
"NumberingLevel"
)
{
const
SvxNumBulletItem
&
rNumBullet
=
(
SvxNumBulletItem
&
)
rCacheTF
.
GetParaAttribs
(
static_cast
<
sal_uInt16
>
(
GetParagraphIndex
()
)).
Get
(
EE_PARA_NUMBULLET
);
const
SvxNumBulletItem
&
rNumBullet
=
(
SvxNumBulletItem
&
)
rCacheTF
.
GetParaAttribs
(
GetParagraphIndex
(
)).
Get
(
EE_PARA_NUMBULLET
);
if
(
rNumBullet
.
GetNumRule
()
->
GetLevelCount
()
==
0
)
{
rRes
.
Value
<<=
(
sal_Int16
)
-
1
;
...
...
@@ -1657,7 +1616,7 @@ namespace accessibility
// NumberingRules
if
(
rRes
.
Name
==
"NumberingRules"
)
{
SfxItemSet
aAttribs
=
rCacheTF
.
GetParaAttribs
(
static_cast
<
sal_uInt16
>
(
GetParagraphIndex
())
);
SfxItemSet
aAttribs
=
rCacheTF
.
GetParaAttribs
(
GetParagraphIndex
()
);
bool
bVis
=
((
const
SfxUInt16Item
&
)
aAttribs
.
Get
(
EE_PARA_BULLETSTATE
)).
GetValue
()
?
sal_True
:
sal_False
;
if
(
bVis
)
{
...
...
@@ -1683,12 +1642,12 @@ namespace accessibility
sal_Int32
nParaIndex
=
GetParagraphIndex
();
SvxAccessibleTextAdapter
&
rCacheTF
=
GetTextForwarder
();
sal_Int32
nAllFieldLen
=
0
;
sal_Int32
nField
=
rCacheTF
.
GetFieldCount
(
sal_uInt16
(
nParaIndex
)
),
nFoundFieldIndex
=
-
1
;
sal_Int32
nField
=
rCacheTF
.
GetFieldCount
(
nParaIndex
),
nFoundFieldIndex
=
-
1
;
EFieldInfo
ree
;
sal_Int32
reeBegin
=
0
,
reeEnd
=
0
;
for
(
sal_uInt16
j
=
0
;
j
<
nField
;
j
++
)
for
(
sal_Int32
j
=
0
;
j
<
nField
;
j
++
)
{
ree
=
rCacheTF
.
GetFieldInfo
(
sal_uInt16
(
nParaIndex
)
,
j
);
ree
=
rCacheTF
.
GetFieldInfo
(
nParaIndex
,
j
);
reeBegin
=
ree
.
aPosition
.
nIndex
+
nAllFieldLen
;
reeEnd
=
reeBegin
+
ree
.
aCurrentText
.
getLength
();
nAllFieldLen
+=
(
ree
.
aCurrentText
.
getLength
()
-
1
);
...
...
@@ -1719,12 +1678,12 @@ namespace accessibility
sal_Int32
nParaIndex
=
GetParagraphIndex
();
SvxAccessibleTextAdapter
&
rCacheTF
=
GetTextForwarder
();
sal_Int32
nAllFieldLen
=
0
;
sal_Int32
nField
=
rCacheTF
.
GetFieldCount
(
sal_uInt16
(
nParaIndex
)
),
nFoundFieldIndex
=
-
1
;
sal_Int32
nField
=
rCacheTF
.
GetFieldCount
(
nParaIndex
),
nFoundFieldIndex
=
-
1
;
EFieldInfo
ree
;
sal_Int32
reeBegin
=
0
,
reeEnd
=
0
;
for
(
sal_uInt16
j
=
0
;
j
<
nField
;
j
++
)
for
(
sal_Int32
j
=
0
;
j
<
nField
;
j
++
)
{
ree
=
rCacheTF
.
GetFieldInfo
(
sal_uInt16
(
nParaIndex
)
,
j
);
ree
=
rCacheTF
.
GetFieldInfo
(
nParaIndex
,
j
);
reeBegin
=
ree
.
aPosition
.
nIndex
+
nAllFieldLen
;
reeEnd
=
reeBegin
+
ree
.
aCurrentText
.
getLength
();
nAllFieldLen
+=
(
ree
.
aCurrentText
.
getLength
()
-
1
);
...
...
@@ -1758,7 +1717,7 @@ namespace accessibility
if
(
bExtend
)
{
//If there is a bullet before the field, should add the bullet length into the segment.
EBulletInfo
aBulletInfo
=
rCacheTF
.
GetBulletInfo
(
sal_uInt16
(
nParaIndex
)
);
EBulletInfo
aBulletInfo
=
rCacheTF
.
GetBulletInfo
(
nParaIndex
);
sal_Int32
nBulletLen
=
aBulletInfo
.
aText
.
getLength
();
if
(
nBulletLen
>
0
)
{
...
...
@@ -1815,7 +1774,7 @@ namespace accessibility
//For the bullet paragraph, the bullet string is ingnored for IAText::attributes() function.
SvxTextForwarder
&
rCacheTF
=
GetTextForwarder
();
// MT IA2: Not used? sal_Int32 nBulletLen = 0;
EBulletInfo
aBulletInfo
=
rCacheTF
.
GetBulletInfo
(
static_cast
<
sal_uInt16
>
(
GetParagraphIndex
())
);
EBulletInfo
aBulletInfo
=
rCacheTF
.
GetBulletInfo
(
GetParagraphIndex
()
);
if
(
aBulletInfo
.
bVisible
)
nIndex
+=
aBulletInfo
.
aText
.
getLength
();
if
(
nIndex
!=
0
&&
nIndex
>=
getCharacterCount
())
...
...
@@ -1960,7 +1919,7 @@ namespace accessibility
nLastIndex
=
nCurIndex
;
if
(
nLine
==
0
)
{
EBulletInfo
aBulletInfo
=
rCacheTF
.
GetBulletInfo
(
static_cast
<
sal_uInt16
>
(
nParaIndex
)
);
EBulletInfo
aBulletInfo
=
rCacheTF
.
GetBulletInfo
(
nParaIndex
);
if
(
aBulletInfo
.
bVisible
)
{
//in bullet or numbering;
...
...
@@ -1989,7 +1948,7 @@ namespace accessibility
else
if
(
nLine
==
1
)
{
aResult
.
SegmentStart
=
0
;
aResult
.
SegmentEnd
=
static_cast
<
sal_uInt16
>
(
nLastIndex
)
;
aResult
.
SegmentEnd
=
nLastIndex
;
aResult
.
SegmentText
=
GetTextRange
(
aResult
.
SegmentStart
,
aResult
.
SegmentEnd
+
nBulletLen
);
break
;
}
...
...
@@ -1997,7 +1956,7 @@ namespace accessibility
{
//aResult.SegmentStart = nLastIndex - nCurLineLen;
aResult
.
SegmentStart
=
nLastIndex
-
nLastLineLen
;
aResult
.
SegmentEnd
=
static_cast
<
sal_uInt16
>
(
nLastIndex
)
;
aResult
.
SegmentEnd
=
nLastIndex
;
aResult
.
SegmentText
=
GetTextRange
(
aResult
.
SegmentStart
+
nBulletLen
,
aResult
.
SegmentEnd
+
nBulletLen
);
break
;
}
...
...
@@ -2095,7 +2054,6 @@ namespace accessibility
{
SvxTextForwarder
&
rCacheTF
=
GetTextForwarder
();
sal_Int32
nParaIndex
=
GetParagraphIndex
();
// MT IA2 not needed? sal_Int32 nTextLen = rCacheTF.GetTextLen( static_cast< sal_uInt16 >( nParaIndex ) );
CheckPosition
(
nIndex
);
...
...
@@ -2110,14 +2068,13 @@ namespace accessibility
{
if
(
nLine
==
0
)
{
EBulletInfo
aBulletInfo
=
rCacheTF
.
GetBulletInfo
(
static_cast
<
sal_uInt16
>
(
nParaIndex
)
);
EBulletInfo
aBulletInfo
=
rCacheTF
.
GetBulletInfo
(
nParaIndex
);
if
(
aBulletInfo
.
bVisible
)
{
//in bullet or numbering;
nBulletLen
=
aBulletInfo
.
aText
.
getLength
();
}
}
//nCurIndex += rCacheTF.GetLineLen(static_cast< sal_uInt16 >( nParaIndex ), nLine);
sal_Int32
nLineLen
=
rCacheTF
.
GetLineLen
(
nParaIndex
,
nLine
);
if
(
nLine
==
0
)
...
...
@@ -2207,7 +2164,7 @@ namespace accessibility
//Because bullet may occupy one or more characters, the TextAdapter will include bullet to calculate the selection. Add offset to handle bullet
sal_Int32
nBulletLen
=
0
;
EBulletInfo
aBulletInfo
=
GetTextForwarder
().
GetBulletInfo
(
static_cast
<
sal_uInt16
>
(
GetParagraphIndex
())
);
EBulletInfo
aBulletInfo
=
GetTextForwarder
().
GetBulletInfo
(
GetParagraphIndex
()
);
if
(
aBulletInfo
.
nParagraph
!=
EE_PARA_NOT_FOUND
&&
aBulletInfo
.
bVisible
)
nBulletLen
=
aBulletInfo
.
aText
.
getLength
();
// save current selection
...
...
@@ -2245,7 +2202,7 @@ namespace accessibility
// Because bullet may occupy one or more characters, the TextAdapter will include bullet to calculate the selection. Add offset to handle bullet
sal_Int32
nBulletLen
=
0
;
EBulletInfo
aBulletInfo
=
GetTextForwarder
().
GetBulletInfo
(
static_cast
<
sal_uInt16
>
(
GetParagraphIndex
())
);
EBulletInfo
aBulletInfo
=
GetTextForwarder
().
GetBulletInfo
(
GetParagraphIndex
()
);
if
(
aBulletInfo
.
nParagraph
!=
EE_PARA_NOT_FOUND
&&
aBulletInfo
.
bVisible
)
nBulletLen
=
aBulletInfo
.
aText
.
getLength
();
ESelection
aSelection
=
MakeSelection
(
nStartIndex
+
nBulletLen
,
nEndIndex
+
nBulletLen
);
...
...
@@ -2282,7 +2239,7 @@ namespace accessibility
// Because bullet may occupy one or more characters, the TextAdapter will include bullet to calculate the selection. Add offset to handle bullet
sal_Int32
nBulletLen
=
0
;
EBulletInfo
aBulletInfo
=
GetTextForwarder
().
GetBulletInfo
(
static_cast
<
sal_uInt16
>
(
GetParagraphIndex
())
);
EBulletInfo
aBulletInfo
=
GetTextForwarder
().
GetBulletInfo
(
GetParagraphIndex
()
);
if
(
aBulletInfo
.
nParagraph
!=
EE_PARA_NOT_FOUND
&&
aBulletInfo
.
bVisible
)
nBulletLen
=
aBulletInfo
.
aText
.
getLength
();
if
(
!
rCacheTF
.
IsEditable
(
MakeSelection
(
nIndex
+
nBulletLen
)
)
)
...
...
@@ -2319,7 +2276,7 @@ namespace accessibility
// Because bullet may occupy one or more characters, the TextAdapter will include bullet to calculate the selection. Add offset to handle bullet
sal_Int32
nBulletLen
=
0
;
EBulletInfo
aBulletInfo
=
GetTextForwarder
().
GetBulletInfo
(
static_cast
<
sal_uInt16
>
(
GetParagraphIndex
())
);
EBulletInfo
aBulletInfo
=
GetTextForwarder
().
GetBulletInfo
(
GetParagraphIndex
()
);
if
(
aBulletInfo
.
nParagraph
!=
EE_PARA_NOT_FOUND
&&
aBulletInfo
.
bVisible
)
nBulletLen
=
aBulletInfo
.
aText
.
getLength
();
ESelection
aSelection
=
MakeSelection
(
nStartIndex
+
nBulletLen
,
nEndIndex
+
nBulletLen
);
...
...
@@ -2360,7 +2317,7 @@ namespace accessibility
// Because bullet may occupy one or more characters, the TextAdapter will include bullet to calculate the selection. Add offset to handle bullet
sal_Int32
nBulletLen
=
0
;
EBulletInfo
aBulletInfo
=
GetTextForwarder
().
GetBulletInfo
(
static_cast
<
sal_uInt16
>
(
GetParagraphIndex
())
);
EBulletInfo
aBulletInfo
=
GetTextForwarder
().
GetBulletInfo
(
GetParagraphIndex
()
);
if
(
aBulletInfo
.
nParagraph
!=
EE_PARA_NOT_FOUND
&&
aBulletInfo
.
bVisible
)
nBulletLen
=
aBulletInfo
.
aText
.
getLength
();
...
...
@@ -2400,7 +2357,7 @@ namespace accessibility
// Because bullet may occupy one or more characters, the TextAdapter will include bullet to calculate the selection. Add offset to handle bullet
sal_Int32
nBulletLen
=
0
;
EBulletInfo
aBulletInfo
=
GetTextForwarder
().
GetBulletInfo
(
static_cast
<
sal_uInt16
>
(
GetParagraphIndex
())
);
EBulletInfo
aBulletInfo
=
GetTextForwarder
().
GetBulletInfo
(
GetParagraphIndex
()
);
if
(
aBulletInfo
.
nParagraph
!=
EE_PARA_NOT_FOUND
&&
aBulletInfo
.
bVisible
)
nBulletLen
=
aBulletInfo
.
aText
.
getLength
();
ESelection
aSelection
=
MakeSelection
(
nStartIndex
+
nBulletLen
,
nEndIndex
+
nBulletLen
);
...
...
@@ -2435,7 +2392,7 @@ namespace accessibility
// AccessibleEmptyEditSource relies on this behaviour
GetEditViewForwarder
(
true
);
SvxAccessibleTextAdapter
&
rCacheTF
=
GetTextForwarder
();
// MUST be after GetEditViewForwarder(), see method docs
sal_
uInt16
nPara
=
static_cast
<
sal_uInt16
>
(
GetParagraphIndex
()
);
sal_
Int32
nPara
=
GetParagraphIndex
(
);
DBG_ASSERT
(
GetParagraphIndex
()
>=
0
&&
GetParagraphIndex
()
<=
USHRT_MAX
,
"AccessibleEditableTextPara::setAttributes: index value overflow"
);
...
...
@@ -2684,9 +2641,9 @@ namespace accessibility
SvxAccessibleTextAdapter
&
rT
=
GetTextForwarder
();
const
sal_Int32
nPara
=
GetParagraphIndex
();
sal_
uInt16
nHyperLinks
=
0
;
sal_
uInt16
nFields
=
rT
.
GetFieldCount
(
nPara
);
for
(
sal_uInt16
n
=
0
;
n
<
nFields
;
n
++
)
sal_
Int32
nHyperLinks
=
0
;
sal_
Int32
nFields
=
rT
.
GetFieldCount
(
nPara
);
for
(
sal_Int32
n
=
0
;
n
<
nFields
;
++
n
)
{
EFieldInfo
aField
=
rT
.
GetFieldInfo
(
nPara
,
n
);
if
(
aField
.
pFieldItem
->
GetField
()
->
ISA
(
SvxURLField
)
)
...
...
@@ -2702,20 +2659,20 @@ namespace accessibility
SvxAccessibleTextAdapter
&
rT
=
GetTextForwarder
();
const
sal_Int32
nPara
=
GetParagraphIndex
();
sal_
uInt16
nHyperLink
=
0
;
sal_
uInt16
nFields
=
rT
.
GetFieldCount
(
nPara
);
for
(
sal_uInt16
n
=
0
;
n
<
nFields
;
n
++
)
sal_
Int32
nHyperLink
=
0
;
sal_
Int32
nFields
=
rT
.
GetFieldCount
(
nPara
);
for
(
sal_Int32
n
=
0
;
n
<
nFields
;
++
n
)
{
EFieldInfo
aField
=
rT
.
GetFieldInfo
(
nPara
,
n
);
if
(
aField
.
pFieldItem
->
GetField
()
->
ISA
(
SvxURLField
)
)
{
if
(
nHyperLink
==
nLinkIndex
)
{
sal_
uInt16
nEEStart
=
aField
.
aPosition
.
nIndex
;
sal_
Int32
nEEStart
=
aField
.
aPosition
.
nIndex
;
// Translate EE Index to accessible index
sal_
uInt16
nStart
=
rT
.
CalcEditEngineIndex
(
nPara
,
nEEStart
);
sal_
uInt16
nEnd
=
nStart
+
aField
.
aCurrentText
.
getLength
();
sal_
Int32
nStart
=
rT
.
CalcEditEngineIndex
(
nPara
,
nEEStart
);
sal_
Int32
nEnd
=
nStart
+
aField
.
aCurrentText
.
getLength
();
xRef
=
new
AccessibleHyperlink
(
rT
,
new
SvxFieldItem
(
*
aField
.
pFieldItem
),
nPara
,
nEEStart
,
nStart
,
nEnd
,
aField
.
aCurrentText
);
break
;
}
...
...
@@ -2731,15 +2688,11 @@ namespace accessibility
const
sal_Int32
nPara
=
GetParagraphIndex
();
SvxAccessibleTextAdapter
&
rT
=
GetTextForwarder
();
// SvxAccessibleTextIndex aIndex;
// aIndex.SetIndex(nPara, nCharIndex, rT);
// const sal_uInt16 nEEIndex = aIndex.GetEEIndex();
const
sal_uInt16
nEEIndex
=
rT
.
CalcEditEngineIndex
(
nPara
,
nCharIndex
);
const
sal_Int32
nEEIndex
=
rT
.
CalcEditEngineIndex
(
nPara
,
nCharIndex
);
sal_Int32
nHLIndex
=
-
1
;
//i123620
sal_
uInt16
nHyperLink
=
0
;
sal_
uInt16
nFields
=
rT
.
GetFieldCount
(
nPara
);
for
(
sal_uInt16
n
=
0
;
n
<
nFields
;
n
++
)
sal_
Int32
nHyperLink
=
0
;
sal_
Int32
nFields
=
rT
.
GetFieldCount
(
nPara
);
for
(
sal_Int32
n
=
0
;
n
<
nFields
;
++
n
)
{
EFieldInfo
aField
=
rT
.
GetFieldInfo
(
nPara
,
n
);
if
(
aField
.
pFieldItem
->
GetField
()
->
ISA
(
SvxURLField
)
)
...
...
editeng/source/accessibility/AccessibleStaticTextBase.cxx
Dosyayı görüntüle @
eb4cd7e7
...
...
@@ -92,8 +92,7 @@ namespace accessibility
nEndIndex
>=
0
&&
nEndIndex
<=
USHRT_MAX
,
"AccessibleStaticTextBase_Impl::MakeSelection: index value overflow"
);
return
ESelection
(
nStartPara
,
static_cast
<
sal_uInt16
>
(
nStartIndex
),
nEndPara
,
static_cast
<
sal_uInt16
>
(
nEndIndex
)
);
return
ESelection
(
nStartPara
,
nStartIndex
,
nEndPara
,
nEndIndex
);
}
...
...
@@ -360,7 +359,7 @@ namespace accessibility
nFlatIndex
-
nCurrIndex
+
nCurrCount
>=
0
&&
nFlatIndex
-
nCurrIndex
+
nCurrCount
<=
USHRT_MAX
,
"AccessibleStaticTextBase_Impl::Index2Internal: index value overflow"
);
return
EPosition
(
nCurrPara
,
static_cast
<
sal_uInt16
>
(
nFlatIndex
-
nCurrIndex
+
nCurrCount
)
);
return
EPosition
(
nCurrPara
,
nFlatIndex
-
nCurrIndex
+
nCurrCount
);
}
}
...
...
@@ -372,7 +371,7 @@ namespace accessibility
nFlatIndex
-
nCurrIndex
+
nCurrCount
>=
0
&&
nFlatIndex
-
nCurrIndex
+
nCurrCount
<=
USHRT_MAX
,
"AccessibleStaticTextBase_Impl::Index2Internal: index value overflow"
);
return
EPosition
(
nCurrPara
-
1
,
static_cast
<
sal_uInt16
>
(
nFlatIndex
-
nCurrIndex
+
nCurrCount
)
);
return
EPosition
(
nCurrPara
-
1
,
nFlatIndex
-
nCurrIndex
+
nCurrCount
);
}
// not found? Out of bounds
...
...
@@ -744,8 +743,7 @@ namespace accessibility
// #112814# Use correct index offset
if
(
(
nIndex
=
rPara
.
getIndexAtPoint
(
aPoint
)
)
!=
-
1
)
return
mpImpl
->
Internal2Index
(
EPosition
(
sal
::
static_int_cast
<
sal_uInt16
>
(
i
),
sal
::
static_int_cast
<
sal_uInt16
>
(
nIndex
))
);
return
mpImpl
->
Internal2Index
(
EPosition
(
i
,
nIndex
));
}
return
-
1
;
...
...
include/editeng/AccessibleEditableTextPara.hxx
Dosyayı görüntüle @
eb4cd7e7
...
...
@@ -319,13 +319,13 @@ namespace accessibility
// Get text from forwarder
OUString
GetTextRange
(
sal_Int32
nStartIndex
,
sal_Int32
nEndIndex
);
sal_
uInt16
GetTextLen
()
const
;
sal_
Int32
GetTextLen
()
const
;
/** Get the current selection of this paragraph
@return sal_False, if nothing in this paragraph is selected
*/
bool
GetSelection
(
sal_uInt16
&
nStartPos
,
sal_uInt16
&
nEndPos
);
bool
GetSelection
(
sal_Int32
&
nStartPos
,
sal_Int32
&
nEndPos
);
/** create selection from Accessible selection.
...
...
sd/source/ui/func/fuinsfil.cxx
Dosyayı görüntüle @
eb4cd7e7
...
...
@@ -492,8 +492,8 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium)
{
Paragraph
*
pPara
=
pOutliner
->
GetParagraph
(
0
);
sal_uLong
nLen
=
pOutliner
->
GetText
(
pPara
,
1
).
getLength
();
pOutliner
->
QuickDelete
(
ESelection
(
0
,
(
sal_uInt16
)
nLen
,
1
,
0
)
);
pOutliner
->
QuickInsertLineBreak
(
ESelection
(
0
,
(
sal_uInt16
)
nLen
,
0
,
(
sal_uInt16
)
nLen
)
);
pOutliner
->
QuickDelete
(
ESelection
(
0
,
nLen
,
1
,
0
)
);
pOutliner
->
QuickInsertLineBreak
(
ESelection
(
0
,
nLen
,
0
,
nLen
)
);
}
}
}
...
...
sd/source/ui/unoidl/unosrch.cxx
Dosyayı görüntüle @
eb4cd7e7
...
...
@@ -601,8 +601,8 @@ uno::Reference< text::XTextRange > SdUnoSearchReplaceShape::Search( uno::Refere
{
if
(
nStartPos
<=
nTextLen
&&
nEndPos
<=
nTextLen
)
{
ESelection
aSelection
(
pConvertPara
[
nStartPos
],
(
sal_uInt16
)
pConvertPos
[
nStartPos
],
pConvertPara
[
nEndPos
],
(
sal_uInt16
)
pConvertPos
[
nEndPos
]
);
ESelection
aSelection
(
pConvertPara
[
nStartPos
],
pConvertPos
[
nStartPos
],
pConvertPara
[
nEndPos
],
pConvertPos
[
nEndPos
]
);
SvxUnoTextRange
*
pRange
;
SvxUnoTextBase
*
pParent
=
SvxUnoTextBase
::
getImplementation
(
xParent
);
...
...
sd/source/ui/view/sdview2.cxx
Dosyayı görüntüle @
eb4cd7e7
...
...
@@ -323,7 +323,7 @@ void View::DoPaste (::Window* pWindow)
for
(
sal_Int32
nPara
=
nParaCount
-
2
;
nPara
>=
0
;
nPara
--
)
{
const
sal_
uInt16
nParaLen
=
(
sal_uInt16
)
rEdit
.
GetTextLen
(
nPara
);
const
sal_
Int32
nParaLen
=
rEdit
.
GetTextLen
(
nPara
);
pOutliner
->
QuickDelete
(
ESelection
(
nPara
,
nParaLen
,
nPara
+
1
,
0
)
);
pOutliner
->
QuickInsertLineBreak
(
ESelection
(
nPara
,
nParaLen
,
nPara
,
nParaLen
)
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment