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
c484c353
Kaydet (Commit)
c484c353
authored
Eki 26, 2016
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
rework to avoid coverity#1371205 Missing move assignment operator
Change-Id: I117fa0891e8cd1bf339bded93a7ee19d799caf9f
üst
424c7fb6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
54 deletions
+62
-54
AccessibleEditableTextPara.cxx
editeng/source/accessibility/AccessibleEditableTextPara.cxx
+62
-54
No files found.
editeng/source/accessibility/AccessibleEditableTextPara.cxx
Dosyayı görüntüle @
c484c353
...
...
@@ -867,42 +867,22 @@ namespace accessibility
return
pValues
[
a
].
Name
<
pValues
[
b
].
Name
;
}
};
}
OUString
AccessibleEditableTextPara
::
GetFieldTypeNameAtIndex
(
sal_Int32
nIndex
)
namespace
{
OUString
GetFieldTypeNameFromField
(
EFieldInfo
&
ree
)
{
OUString
strFldType
;
SvxAccessibleTextAdapter
&
rCacheTF
=
GetTextForwarder
();
//For field object info
sal_Int32
nParaIndex
=
GetParagraphIndex
();
sal_Int32
nAllFieldLen
=
0
;
sal_Int32
nField
=
rCacheTF
.
GetFieldCount
(
nParaIndex
),
nFoundFieldIndex
=
-
1
;
EFieldInfo
ree
;
sal_Int32
reeBegin
,
reeEnd
;
sal_Int32
nFieldType
=
-
1
;
for
(
sal_Int32
j
=
0
;
j
<
nField
;
j
++
)
{
ree
=
rCacheTF
.
GetFieldInfo
(
nParaIndex
,
j
);
reeBegin
=
ree
.
aPosition
.
nIndex
+
nAllFieldLen
;
reeEnd
=
reeBegin
+
ree
.
aCurrentText
.
getLength
();
nAllFieldLen
+=
(
ree
.
aCurrentText
.
getLength
()
-
1
);
if
(
reeBegin
>
nIndex
)
{
break
;
}
if
(
nIndex
>=
reeBegin
&&
nIndex
<
reeEnd
)
{
nFoundFieldIndex
=
j
;
break
;
}
}
if
(
nFoundFieldIndex
>=
0
&&
ree
.
pFieldItem
)
if
(
ree
.
pFieldItem
)
{
// So we get a field, check its type now.
nFieldType
=
ree
.
pFieldItem
->
GetField
()
->
GetClassId
()
;
}
switch
(
nFieldType
)
switch
(
nFieldType
)
{
case
text
:
:
textfield
::
Type
::
DATE
:
case
text
:
:
textfield
::
Type
::
DATE
:
{
const
SvxDateField
*
pDateField
=
static_cast
<
const
SvxDateField
*
>
(
ree
.
pFieldItem
->
GetField
());
if
(
pDateField
)
...
...
@@ -912,23 +892,23 @@ namespace accessibility
else
if
(
pDateField
->
GetType
()
==
SVXDATETYPE_VAR
)
strFldType
=
"date (variable)"
;
}
break
;
}
break
;
case
text
:
:
textfield
::
Type
::
PAGE
:
strFldType
=
"page-number"
;
break
;
//support the sheet name & pages fields
case
text
:
:
textfield
::
Type
::
PAGES
:
strFldType
=
"page-count"
;
break
;
case
text
:
:
textfield
::
Type
::
TABLE
:
strFldType
=
"sheet-name"
;
break
;
//End
case
text
:
:
textfield
::
Type
::
TIME
:
strFldType
=
"time"
;
break
;
case
text
:
:
textfield
::
Type
::
EXTENDED_TIME
:
case
text
:
:
textfield
::
Type
::
PAGE
:
strFldType
=
"page-number"
;
break
;
//support the sheet name & pages fields
case
text
:
:
textfield
::
Type
::
PAGES
:
strFldType
=
"page-count"
;
break
;
case
text
:
:
textfield
::
Type
::
TABLE
:
strFldType
=
"sheet-name"
;
break
;
//End
case
text
:
:
textfield
::
Type
::
TIME
:
strFldType
=
"time"
;
break
;
case
text
:
:
textfield
::
Type
::
EXTENDED_TIME
:
{
const
SvxExtTimeField
*
pTimeField
=
static_cast
<
const
SvxExtTimeField
*
>
(
ree
.
pFieldItem
->
GetField
());
if
(
pTimeField
)
...
...
@@ -938,20 +918,48 @@ namespace accessibility
else
if
(
pTimeField
->
GetType
()
==
SVXTIMETYPE_VAR
)
strFldType
=
"time (variable)"
;
}
break
;
}
break
;
case
text
:
:
textfield
::
Type
::
AUTHOR
:
strFldType
=
"author"
;
break
;
case
text
:
:
textfield
::
Type
::
EXTENDED_FILE
:
case
text
:
:
textfield
::
Type
::
DOCINFO_TITLE
:
strFldType
=
"file name"
;
break
;
default
:
break
;
case
text
:
:
textfield
::
Type
::
AUTHOR
:
strFldType
=
"author"
;
break
;
case
text
:
:
textfield
::
Type
::
EXTENDED_FILE
:
case
text
:
:
textfield
::
Type
::
DOCINFO_TITLE
:
strFldType
=
"file name"
;
break
;
default
:
break
;
}
return
strFldType
;
}
}
namespace
accessibility
{
OUString
AccessibleEditableTextPara
::
GetFieldTypeNameAtIndex
(
sal_Int32
nIndex
)
{
SvxAccessibleTextAdapter
&
rCacheTF
=
GetTextForwarder
();
//For field object info
sal_Int32
nParaIndex
=
GetParagraphIndex
();
sal_Int32
nAllFieldLen
=
0
;
sal_Int32
nField
=
rCacheTF
.
GetFieldCount
(
nParaIndex
);
for
(
sal_Int32
j
=
0
;
j
<
nField
;
++
j
)
{
EFieldInfo
ree
=
rCacheTF
.
GetFieldInfo
(
nParaIndex
,
j
);
sal_Int32
reeBegin
=
ree
.
aPosition
.
nIndex
+
nAllFieldLen
;
sal_Int32
reeEnd
=
reeBegin
+
ree
.
aCurrentText
.
getLength
();
nAllFieldLen
+=
(
ree
.
aCurrentText
.
getLength
()
-
1
);
if
(
reeBegin
>
nIndex
)
{
break
;
}
if
(
nIndex
>=
reeBegin
&&
nIndex
<
reeEnd
)
{
return
GetFieldTypeNameFromField
(
ree
);
}
}
return
OUString
();
}
uno
::
Reference
<
XAccessibleStateSet
>
SAL_CALL
AccessibleEditableTextPara
::
getAccessibleStateSet
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
...
...
@@ -1621,7 +1629,7 @@ namespace accessibility
for
(
sal_Int32
j
=
0
;
j
<
nField
;
++
j
)
{
EFieldInfo
ree
=
rCacheTF
.
GetFieldInfo
(
nParaIndex
,
j
);
reeBegin
=
ree
.
aPosition
.
nIndex
+
nAllFieldLen
;
reeBegin
=
ree
.
aPosition
.
nIndex
+
nAllFieldLen
;
reeEnd
=
reeBegin
+
ree
.
aCurrentText
.
getLength
();
nAllFieldLen
+=
(
ree
.
aCurrentText
.
getLength
()
-
1
);
if
(
reeBegin
>
nIndex
)
...
...
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