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
96646c35
Kaydet (Commit)
96646c35
authored
Eyl 19, 2016
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: prefix members of SwAccessiblePortionData
Change-Id: Ia41a57b11e2df5261657855e92701dce4cbe95aa
üst
c9805c52
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
151 additions
and
151 deletions
+151
-151
accportions.cxx
sw/source/core/access/accportions.cxx
+136
-136
accportions.hxx
sw/source/core/access/accportions.hxx
+15
-15
No files found.
sw/source/core/access/accportions.cxx
Dosyayı görüntüle @
96646c35
...
@@ -69,78 +69,78 @@ SwAccessiblePortionData::SwAccessiblePortionData(
...
@@ -69,78 +69,78 @@ SwAccessiblePortionData::SwAccessiblePortionData(
const
SwTextNode
*
pTextNd
,
const
SwTextNode
*
pTextNd
,
const
SwViewOption
*
pViewOpt
)
:
const
SwViewOption
*
pViewOpt
)
:
SwPortionHandler
(),
SwPortionHandler
(),
pTextNode
(
pTextNd
),
m_
pTextNode
(
pTextNd
),
aBuffer
(),
m_
aBuffer
(),
nModelPosition
(
0
),
m_
nModelPosition
(
0
),
pViewOptions
(
pViewOpt
),
m_
pViewOptions
(
pViewOpt
),
sAccessibleString
(),
m_
sAccessibleString
(),
aLineBreaks
(),
m_
aLineBreaks
(),
aModelPositions
(),
m_
aModelPositions
(),
aAccessiblePositions
(),
m_
aAccessiblePositions
(),
aFieldPosition
(),
m_
aFieldPosition
(),
aAttrFieldType
(),
m_
aAttrFieldType
(),
aPortionAttrs
(),
m_
aPortionAttrs
(),
pSentences
(
nullptr
),
m_
pSentences
(
nullptr
),
nBeforePortions
(
0
),
m_
nBeforePortions
(
0
),
bFinished
(
false
),
m_
bFinished
(
false
),
bLastIsSpecial
(
false
)
m_
bLastIsSpecial
(
false
)
{
{
OSL_ENSURE
(
pTextNode
!=
nullptr
,
"Text node is needed!"
);
OSL_ENSURE
(
m_
pTextNode
!=
nullptr
,
"Text node is needed!"
);
// reserve some space to reduce memory allocations
// reserve some space to reduce memory allocations
aLineBreaks
.
reserve
(
5
);
m_
aLineBreaks
.
reserve
(
5
);
aModelPositions
.
reserve
(
10
);
m_
aModelPositions
.
reserve
(
10
);
aAccessiblePositions
.
reserve
(
10
);
m_
aAccessiblePositions
.
reserve
(
10
);
// always include 'first' line-break position
// always include 'first' line-break position
aLineBreaks
.
push_back
(
0
);
m_
aLineBreaks
.
push_back
(
0
);
}
}
SwAccessiblePortionData
::~
SwAccessiblePortionData
()
SwAccessiblePortionData
::~
SwAccessiblePortionData
()
{
{
delete
pSentences
;
delete
m_
pSentences
;
}
}
void
SwAccessiblePortionData
::
Text
(
sal_Int32
nLength
,
sal_uInt16
nType
,
sal_Int32
/*nHeight*/
,
sal_Int32
/*nWidth*/
)
void
SwAccessiblePortionData
::
Text
(
sal_Int32
nLength
,
sal_uInt16
nType
,
sal_Int32
/*nHeight*/
,
sal_Int32
/*nWidth*/
)
{
{
OSL_ENSURE
(
(
nModelPosition
+
nLength
)
<=
pTextNode
->
GetText
().
getLength
(),
OSL_ENSURE
(
(
m_nModelPosition
+
nLength
)
<=
m_
pTextNode
->
GetText
().
getLength
(),
"portion exceeds model string!"
);
"portion exceeds model string!"
);
OSL_ENSURE
(
!
bFinished
,
"We are already done!"
);
OSL_ENSURE
(
!
m_
bFinished
,
"We are already done!"
);
// ignore zero-length portions
// ignore zero-length portions
if
(
nLength
==
0
)
if
(
nLength
==
0
)
return
;
return
;
// store 'old' positions
// store 'old' positions
aModelPositions
.
push_back
(
nModelPosition
);
m_aModelPositions
.
push_back
(
m_
nModelPosition
);
aAccessiblePositions
.
push_back
(
aBuffer
.
getLength
()
);
m_aAccessiblePositions
.
push_back
(
m_
aBuffer
.
getLength
()
);
// store portion attributes
// store portion attributes
sal_uInt8
nAttr
=
IsGrayPortionType
(
nType
)
?
PORATTR_GRAY
:
0
;
sal_uInt8
nAttr
=
IsGrayPortionType
(
nType
)
?
PORATTR_GRAY
:
0
;
aPortionAttrs
.
push_back
(
nAttr
);
m_
aPortionAttrs
.
push_back
(
nAttr
);
// update buffer + nModelPosition
// update buffer + nModelPosition
aBuffer
.
append
(
pTextNode
->
GetText
().
copy
(
nModelPosition
,
nLength
)
);
m_aBuffer
.
append
(
m_pTextNode
->
GetText
().
copy
(
m_
nModelPosition
,
nLength
)
);
nModelPosition
+=
nLength
;
m_
nModelPosition
+=
nLength
;
bLastIsSpecial
=
false
;
m_
bLastIsSpecial
=
false
;
}
}
void
SwAccessiblePortionData
::
SetAttrFieldType
(
sal_uInt16
nAttrFieldType
)
void
SwAccessiblePortionData
::
SetAttrFieldType
(
sal_uInt16
nAttrFieldType
)
{
{
aAttrFieldType
.
push_back
(
nAttrFieldType
);
m_
aAttrFieldType
.
push_back
(
nAttrFieldType
);
return
;
return
;
}
}
void
SwAccessiblePortionData
::
Special
(
void
SwAccessiblePortionData
::
Special
(
sal_Int32
nLength
,
const
OUString
&
rText
,
sal_uInt16
nType
,
sal_Int32
/*nHeight*/
,
sal_Int32
/*nWidth*/
,
const
SwFont
*
/*pFont*/
)
sal_Int32
nLength
,
const
OUString
&
rText
,
sal_uInt16
nType
,
sal_Int32
/*nHeight*/
,
sal_Int32
/*nWidth*/
,
const
SwFont
*
/*pFont*/
)
{
{
OSL_ENSURE
(
nModelPosition
>=
0
,
"illegal position"
);
OSL_ENSURE
(
m_
nModelPosition
>=
0
,
"illegal position"
);
OSL_ENSURE
(
(
nModelPosition
+
nLength
)
<=
pTextNode
->
GetText
().
getLength
(),
OSL_ENSURE
(
(
m_nModelPosition
+
nLength
)
<=
m_
pTextNode
->
GetText
().
getLength
(),
"portion exceeds model string!"
);
"portion exceeds model string!"
);
OSL_ENSURE
(
!
bFinished
,
"We are already done!"
);
OSL_ENSURE
(
!
m_
bFinished
,
"We are already done!"
);
// construct string with representation; either directly from
// construct string with representation; either directly from
// rText, or use resources for special case portions
// rText, or use resources for special case portions
...
@@ -160,15 +160,15 @@ void SwAccessiblePortionData::Special(
...
@@ -160,15 +160,15 @@ void SwAccessiblePortionData::Special(
sDisplay
=
OUString
(
sal_Unicode
(
0xfffc
));
sDisplay
=
OUString
(
sal_Unicode
(
0xfffc
));
else
else
sDisplay
=
rText
;
sDisplay
=
rText
;
aFieldPosition
.
push_back
(
aBuffer
.
getLength
());
m_aFieldPosition
.
push_back
(
m_
aBuffer
.
getLength
());
aFieldPosition
.
push_back
(
aBuffer
.
getLength
()
+
rText
.
getLength
());
m_aFieldPosition
.
push_back
(
m_
aBuffer
.
getLength
()
+
rText
.
getLength
());
break
;
break
;
case
POR_FTNNUM
:
case
POR_FTNNUM
:
break
;
break
;
case
POR_FTN
:
case
POR_FTN
:
{
{
sDisplay
=
rText
;
sDisplay
=
rText
;
sal_Int32
nStart
=
aBuffer
.
getLength
();
sal_Int32
nStart
=
m_
aBuffer
.
getLength
();
sal_Int32
nEnd
=
nStart
+
rText
.
getLength
();
sal_Int32
nEnd
=
nStart
+
rText
.
getLength
();
m_vecPairPos
.
push_back
(
std
::
make_pair
(
nStart
,
nEnd
));
m_vecPairPos
.
push_back
(
std
::
make_pair
(
nStart
,
nEnd
));
break
;
break
;
...
@@ -184,7 +184,7 @@ void SwAccessiblePortionData::Special(
...
@@ -184,7 +184,7 @@ void SwAccessiblePortionData::Special(
// #i111768# - apply patch from kstribley:
// #i111768# - apply patch from kstribley:
// Include the control characters.
// Include the control characters.
case
POR_CONTROLCHAR
:
case
POR_CONTROLCHAR
:
sDisplay
=
rText
+
OUStringLiteral1
(
pTextNode
->
GetText
()[
nModelPosition
]
);
sDisplay
=
rText
+
OUStringLiteral1
(
m_pTextNode
->
GetText
()[
m_
nModelPosition
]
);
break
;
break
;
default
:
default
:
sDisplay
=
rText
;
sDisplay
=
rText
;
...
@@ -197,50 +197,50 @@ void SwAccessiblePortionData::Special(
...
@@ -197,50 +197,50 @@ void SwAccessiblePortionData::Special(
// special treatment for zero length portion at the beginning:
// special treatment for zero length portion at the beginning:
// count as 'before' portion
// count as 'before' portion
if
(
(
nLength
==
0
)
&&
(
nModelPosition
==
0
)
)
if
(
(
nLength
==
0
)
&&
(
m_
nModelPosition
==
0
)
)
nBeforePortions
++
;
m_
nBeforePortions
++
;
// store the 'old' positions
// store the 'old' positions
aModelPositions
.
push_back
(
nModelPosition
);
m_aModelPositions
.
push_back
(
m_
nModelPosition
);
aAccessiblePositions
.
push_back
(
aBuffer
.
getLength
()
);
m_aAccessiblePositions
.
push_back
(
m_
aBuffer
.
getLength
()
);
// store portion attributes
// store portion attributes
sal_uInt8
nAttr
=
PORATTR_SPECIAL
;
sal_uInt8
nAttr
=
PORATTR_SPECIAL
;
if
(
IsGrayPortionType
(
nType
)
)
nAttr
|=
PORATTR_GRAY
;
if
(
IsGrayPortionType
(
nType
)
)
nAttr
|=
PORATTR_GRAY
;
if
(
nLength
==
0
)
nAttr
|=
PORATTR_READONLY
;
if
(
nLength
==
0
)
nAttr
|=
PORATTR_READONLY
;
if
(
nType
==
POR_TERMINATE
)
nAttr
|=
PORATTR_TERM
;
if
(
nType
==
POR_TERMINATE
)
nAttr
|=
PORATTR_TERM
;
aPortionAttrs
.
push_back
(
nAttr
);
m_
aPortionAttrs
.
push_back
(
nAttr
);
// update buffer + nModelPosition
// update buffer + nModelPosition
aBuffer
.
append
(
sDisplay
);
m_
aBuffer
.
append
(
sDisplay
);
nModelPosition
+=
nLength
;
m_
nModelPosition
+=
nLength
;
// remember 'last' special portion (unless it's our own 'closing'
// remember 'last' special portion (unless it's our own 'closing'
// portions from 'Finish()'
// portions from 'Finish()'
if
(
nType
!=
POR_TERMINATE
)
if
(
nType
!=
POR_TERMINATE
)
bLastIsSpecial
=
true
;
m_
bLastIsSpecial
=
true
;
}
}
void
SwAccessiblePortionData
::
LineBreak
(
sal_Int32
/*nWidth*/
)
void
SwAccessiblePortionData
::
LineBreak
(
sal_Int32
/*nWidth*/
)
{
{
OSL_ENSURE
(
!
bFinished
,
"We are already done!"
);
OSL_ENSURE
(
!
m_
bFinished
,
"We are already done!"
);
aLineBreaks
.
push_back
(
aBuffer
.
getLength
()
);
m_aLineBreaks
.
push_back
(
m_
aBuffer
.
getLength
()
);
}
}
void
SwAccessiblePortionData
::
Skip
(
sal_Int32
nLength
)
void
SwAccessiblePortionData
::
Skip
(
sal_Int32
nLength
)
{
{
OSL_ENSURE
(
!
bFinished
,
"We are already done!"
);
OSL_ENSURE
(
!
m_
bFinished
,
"We are already done!"
);
OSL_ENSURE
(
aModelPositions
.
empty
(),
"Never Skip() after portions"
);
OSL_ENSURE
(
m_
aModelPositions
.
empty
(),
"Never Skip() after portions"
);
OSL_ENSURE
(
nLength
<=
pTextNode
->
GetText
().
getLength
(),
OSL_ENSURE
(
nLength
<=
m_
pTextNode
->
GetText
().
getLength
(),
"skip exceeds model string!"
);
"skip exceeds model string!"
);
nModelPosition
+=
nLength
;
m_
nModelPosition
+=
nLength
;
}
}
void
SwAccessiblePortionData
::
Finish
()
void
SwAccessiblePortionData
::
Finish
()
{
{
OSL_ENSURE
(
!
bFinished
,
"We are already done!"
);
OSL_ENSURE
(
!
m_
bFinished
,
"We are already done!"
);
// include terminator values: always include two 'last character'
// include terminator values: always include two 'last character'
// markers in the position arrays to make sure we always find one
// markers in the position arrays to make sure we always find one
...
@@ -250,16 +250,16 @@ void SwAccessiblePortionData::Finish()
...
@@ -250,16 +250,16 @@ void SwAccessiblePortionData::Finish()
LineBreak
(
0
);
LineBreak
(
0
);
LineBreak
(
0
);
LineBreak
(
0
);
sAccessibleString
=
aBuffer
.
makeStringAndClear
();
m_sAccessibleString
=
m_
aBuffer
.
makeStringAndClear
();
bFinished
=
true
;
m_
bFinished
=
true
;
}
}
bool
SwAccessiblePortionData
::
IsPortionAttrSet
(
bool
SwAccessiblePortionData
::
IsPortionAttrSet
(
size_t
nPortionNo
,
sal_uInt8
nAttr
)
const
size_t
nPortionNo
,
sal_uInt8
nAttr
)
const
{
{
OSL_ENSURE
(
nPortionNo
<
aPortionAttrs
.
size
(),
OSL_ENSURE
(
nPortionNo
<
m_
aPortionAttrs
.
size
(),
"Illegal portion number"
);
"Illegal portion number"
);
return
(
aPortionAttrs
[
nPortionNo
]
&
nAttr
)
!=
0
;
return
(
m_
aPortionAttrs
[
nPortionNo
]
&
nAttr
)
!=
0
;
}
}
bool
SwAccessiblePortionData
::
IsSpecialPortion
(
size_t
nPortionNo
)
const
bool
SwAccessiblePortionData
::
IsSpecialPortion
(
size_t
nPortionNo
)
const
...
@@ -290,12 +290,12 @@ bool SwAccessiblePortionData::IsGrayPortionType( sal_uInt16 nType ) const
...
@@ -290,12 +290,12 @@ bool SwAccessiblePortionData::IsGrayPortionType( sal_uInt16 nType ) const
case
POR_ISOTOX
:
case
POR_ISOTOX
:
case
POR_TOX
:
case
POR_TOX
:
case
POR_HIDDEN
:
case
POR_HIDDEN
:
bGray
=
!
pViewOptions
->
IsPagePreview
()
&&
bGray
=
!
m_
pViewOptions
->
IsPagePreview
()
&&
!
pViewOptions
->
IsReadonly
()
&&
SwViewOption
::
IsFieldShadings
();
!
m_
pViewOptions
->
IsReadonly
()
&&
SwViewOption
::
IsFieldShadings
();
break
;
break
;
case
POR_TAB
:
bGray
=
pViewOptions
->
IsTab
();
break
;
case
POR_TAB
:
bGray
=
m_
pViewOptions
->
IsTab
();
break
;
case
POR_SOFTHYPH
:
bGray
=
pViewOptions
->
IsSoftHyph
();
break
;
case
POR_SOFTHYPH
:
bGray
=
m_
pViewOptions
->
IsSoftHyph
();
break
;
case
POR_BLANK
:
bGray
=
pViewOptions
->
IsHardBlank
();
break
;
case
POR_BLANK
:
bGray
=
m_
pViewOptions
->
IsHardBlank
();
break
;
default
:
default
:
break
;
// bGray is false
break
;
// bGray is false
}
}
...
@@ -304,23 +304,23 @@ bool SwAccessiblePortionData::IsGrayPortionType( sal_uInt16 nType ) const
...
@@ -304,23 +304,23 @@ bool SwAccessiblePortionData::IsGrayPortionType( sal_uInt16 nType ) const
const
OUString
&
SwAccessiblePortionData
::
GetAccessibleString
()
const
const
OUString
&
SwAccessiblePortionData
::
GetAccessibleString
()
const
{
{
OSL_ENSURE
(
bFinished
,
"Shouldn't call this before we are done!"
);
OSL_ENSURE
(
m_
bFinished
,
"Shouldn't call this before we are done!"
);
return
sAccessibleString
;
return
m_
sAccessibleString
;
}
}
void
SwAccessiblePortionData
::
GetLineBoundary
(
void
SwAccessiblePortionData
::
GetLineBoundary
(
Boundary
&
rBound
,
Boundary
&
rBound
,
sal_Int32
nPos
)
const
sal_Int32
nPos
)
const
{
{
FillBoundary
(
rBound
,
aLineBreaks
,
FillBoundary
(
rBound
,
m_
aLineBreaks
,
FindBreak
(
aLineBreaks
,
nPos
)
);
FindBreak
(
m_
aLineBreaks
,
nPos
)
);
}
}
// #i89175#
// #i89175#
sal_Int32
SwAccessiblePortionData
::
GetLineCount
()
const
sal_Int32
SwAccessiblePortionData
::
GetLineCount
()
const
{
{
size_t
nBreaks
=
aLineBreaks
.
size
();
size_t
nBreaks
=
m_
aLineBreaks
.
size
();
// A non-empty paragraph has at least 4 breaks: one for each line3 and
// A non-empty paragraph has at least 4 breaks: one for each line3 and
// 3 additional ones.
// 3 additional ones.
// An empty paragraph has 3 breaks.
// An empty paragraph has 3 breaks.
...
@@ -333,7 +333,7 @@ sal_Int32 SwAccessiblePortionData::GetLineCount() const
...
@@ -333,7 +333,7 @@ sal_Int32 SwAccessiblePortionData::GetLineCount() const
sal_Int32
SwAccessiblePortionData
::
GetLineNo
(
const
sal_Int32
nPos
)
const
sal_Int32
SwAccessiblePortionData
::
GetLineNo
(
const
sal_Int32
nPos
)
const
{
{
sal_Int32
nLineNo
=
FindBreak
(
aLineBreaks
,
nPos
);
sal_Int32
nLineNo
=
FindBreak
(
m_
aLineBreaks
,
nPos
);
// handling of position after last character
// handling of position after last character
const
sal_Int32
nLineCount
(
GetLineCount
()
);
const
sal_Int32
nLineCount
(
GetLineCount
()
);
...
@@ -348,42 +348,42 @@ sal_Int32 SwAccessiblePortionData::GetLineNo( const sal_Int32 nPos ) const
...
@@ -348,42 +348,42 @@ sal_Int32 SwAccessiblePortionData::GetLineNo( const sal_Int32 nPos ) const
void
SwAccessiblePortionData
::
GetBoundaryOfLine
(
const
sal_Int32
nLineNo
,
void
SwAccessiblePortionData
::
GetBoundaryOfLine
(
const
sal_Int32
nLineNo
,
i18n
::
Boundary
&
rLineBound
)
i18n
::
Boundary
&
rLineBound
)
{
{
FillBoundary
(
rLineBound
,
aLineBreaks
,
nLineNo
);
FillBoundary
(
rLineBound
,
m_
aLineBreaks
,
nLineNo
);
}
}
void
SwAccessiblePortionData
::
GetLastLineBoundary
(
void
SwAccessiblePortionData
::
GetLastLineBoundary
(
Boundary
&
rBound
)
const
Boundary
&
rBound
)
const
{
{
OSL_ENSURE
(
aLineBreaks
.
size
()
>=
2
,
"need min + max value"
);
OSL_ENSURE
(
m_
aLineBreaks
.
size
()
>=
2
,
"need min + max value"
);
// The last two positions except the two delimiters are the ones
// The last two positions except the two delimiters are the ones
// we are looking for, except for empty paragraphs (nBreaks==3)
// we are looking for, except for empty paragraphs (nBreaks==3)
size_t
nBreaks
=
aLineBreaks
.
size
();
size_t
nBreaks
=
m_
aLineBreaks
.
size
();
FillBoundary
(
rBound
,
aLineBreaks
,
nBreaks
<=
3
?
0
:
nBreaks
-
4
);
FillBoundary
(
rBound
,
m_
aLineBreaks
,
nBreaks
<=
3
?
0
:
nBreaks
-
4
);
}
}
sal_Int32
SwAccessiblePortionData
::
GetModelPosition
(
sal_Int32
nPos
)
const
sal_Int32
SwAccessiblePortionData
::
GetModelPosition
(
sal_Int32
nPos
)
const
{
{
OSL_ENSURE
(
nPos
>=
0
,
"illegal position"
);
OSL_ENSURE
(
nPos
>=
0
,
"illegal position"
);
OSL_ENSURE
(
nPos
<=
sAccessibleString
.
getLength
(),
"illegal position"
);
OSL_ENSURE
(
nPos
<=
m_
sAccessibleString
.
getLength
(),
"illegal position"
);
// find the portion number
// find the portion number
size_t
nPortionNo
=
FindBreak
(
aAccessiblePositions
,
nPos
);
size_t
nPortionNo
=
FindBreak
(
m_
aAccessiblePositions
,
nPos
);
// get model portion size
// get model portion size
sal_Int32
nStartPos
=
aModelPositions
[
nPortionNo
];
sal_Int32
nStartPos
=
m_
aModelPositions
[
nPortionNo
];
// if it's a non-special portion, move into the portion, else
// if it's a non-special portion, move into the portion, else
// return the portion start
// return the portion start
if
(
!
IsSpecialPortion
(
nPortionNo
)
)
if
(
!
IsSpecialPortion
(
nPortionNo
)
)
{
{
// 'wide' portions have to be of the same width
// 'wide' portions have to be of the same width
OSL_ENSURE
(
(
aModelPositions
[
nPortionNo
+
1
]
-
nStartPos
)
==
OSL_ENSURE
(
(
m_
aModelPositions
[
nPortionNo
+
1
]
-
nStartPos
)
==
(
aAccessiblePositions
[
nPortionNo
+
1
]
-
(
m_
aAccessiblePositions
[
nPortionNo
+
1
]
-
aAccessiblePositions
[
nPortionNo
]
),
m_
aAccessiblePositions
[
nPortionNo
]
),
"accessibility portion disagrees with text model"
);
"accessibility portion disagrees with text model"
);
nStartPos
+=
nPos
-
aAccessiblePositions
[
nPortionNo
];
nStartPos
+=
nPos
-
m_
aAccessiblePositions
[
nPortionNo
];
}
}
// else: return nStartPos unmodified
// else: return nStartPos unmodified
...
@@ -479,30 +479,30 @@ void SwAccessiblePortionData::GetSentenceBoundary(
...
@@ -479,30 +479,30 @@ void SwAccessiblePortionData::GetSentenceBoundary(
sal_Int32
nPos
)
sal_Int32
nPos
)
{
{
OSL_ENSURE
(
nPos
>=
0
,
"illegal position; check before"
);
OSL_ENSURE
(
nPos
>=
0
,
"illegal position; check before"
);
OSL_ENSURE
(
nPos
<
sAccessibleString
.
getLength
(),
"illegal position"
);
OSL_ENSURE
(
nPos
<
m_
sAccessibleString
.
getLength
(),
"illegal position"
);
if
(
pSentences
==
nullptr
)
if
(
m_
pSentences
==
nullptr
)
{
{
OSL_ENSURE
(
g_pBreakIt
!=
nullptr
,
"We always need a break."
);
OSL_ENSURE
(
g_pBreakIt
!=
nullptr
,
"We always need a break."
);
OSL_ENSURE
(
g_pBreakIt
->
GetBreakIter
().
is
(),
"No break-iterator."
);
OSL_ENSURE
(
g_pBreakIt
->
GetBreakIter
().
is
(),
"No break-iterator."
);
if
(
g_pBreakIt
->
GetBreakIter
().
is
()
)
if
(
g_pBreakIt
->
GetBreakIter
().
is
()
)
{
{
pSentences
=
new
Positions_t
();
m_
pSentences
=
new
Positions_t
();
pSentences
->
reserve
(
10
);
m_
pSentences
->
reserve
(
10
);
// use xBreak->endOfSentence to iterate over all words; store
// use xBreak->endOfSentence to iterate over all words; store
// positions in pSentences
// positions in pSentences
sal_Int32
nCurrent
=
0
;
sal_Int32
nCurrent
=
0
;
sal_Int32
nLength
=
sAccessibleString
.
getLength
();
sal_Int32
nLength
=
m_
sAccessibleString
.
getLength
();
do
do
{
{
pSentences
->
push_back
(
nCurrent
);
m_
pSentences
->
push_back
(
nCurrent
);
const
sal_Int32
nModelPos
=
GetModelPosition
(
nCurrent
);
const
sal_Int32
nModelPos
=
GetModelPosition
(
nCurrent
);
sal_Int32
nNew
=
g_pBreakIt
->
GetBreakIter
()
->
endOfSentence
(
sal_Int32
nNew
=
g_pBreakIt
->
GetBreakIter
()
->
endOfSentence
(
sAccessibleString
,
nCurrent
,
m_
sAccessibleString
,
nCurrent
,
g_pBreakIt
->
GetLocale
(
pTextNode
->
GetLang
(
nModelPos
))
)
+
1
;
g_pBreakIt
->
GetLocale
(
m_
pTextNode
->
GetLang
(
nModelPos
))
)
+
1
;
if
(
(
nNew
<
0
)
&&
(
nNew
>
nLength
)
)
if
(
(
nNew
<
0
)
&&
(
nNew
>
nLength
)
)
nNew
=
nLength
;
nNew
=
nLength
;
...
@@ -514,8 +514,8 @@ void SwAccessiblePortionData::GetSentenceBoundary(
...
@@ -514,8 +514,8 @@ void SwAccessiblePortionData::GetSentenceBoundary(
while
(
nCurrent
<
nLength
);
while
(
nCurrent
<
nLength
);
// finish with two terminators
// finish with two terminators
pSentences
->
push_back
(
nLength
);
m_
pSentences
->
push_back
(
nLength
);
pSentences
->
push_back
(
nLength
);
m_
pSentences
->
push_back
(
nLength
);
}
}
else
else
{
{
...
@@ -526,48 +526,48 @@ void SwAccessiblePortionData::GetSentenceBoundary(
...
@@ -526,48 +526,48 @@ void SwAccessiblePortionData::GetSentenceBoundary(
}
}
}
}
FillBoundary
(
rBound
,
*
pSentences
,
FindBreak
(
*
pSentences
,
nPos
)
);
FillBoundary
(
rBound
,
*
m_pSentences
,
FindBreak
(
*
m_
pSentences
,
nPos
)
);
}
}
void
SwAccessiblePortionData
::
GetAttributeBoundary
(
void
SwAccessiblePortionData
::
GetAttributeBoundary
(
Boundary
&
rBound
,
Boundary
&
rBound
,
sal_Int32
nPos
)
const
sal_Int32
nPos
)
const
{
{
OSL_ENSURE
(
pTextNode
!=
nullptr
,
"Need SwTextNode!"
);
OSL_ENSURE
(
m_
pTextNode
!=
nullptr
,
"Need SwTextNode!"
);
// attribute boundaries can only occur on portion boundaries
// attribute boundaries can only occur on portion boundaries
FillBoundary
(
rBound
,
aAccessiblePositions
,
FillBoundary
(
rBound
,
m_
aAccessiblePositions
,
FindBreak
(
aAccessiblePositions
,
nPos
)
);
FindBreak
(
m_
aAccessiblePositions
,
nPos
)
);
}
}
sal_Int32
SwAccessiblePortionData
::
GetAccessiblePosition
(
sal_Int32
nPos
)
const
sal_Int32
SwAccessiblePortionData
::
GetAccessiblePosition
(
sal_Int32
nPos
)
const
{
{
OSL_ENSURE
(
nPos
<=
pTextNode
->
GetText
().
getLength
(),
"illegal position"
);
OSL_ENSURE
(
nPos
<=
m_
pTextNode
->
GetText
().
getLength
(),
"illegal position"
);
// find the portion number
// find the portion number
// #i70538# - consider "empty" model portions - e.g. number portion
// #i70538# - consider "empty" model portions - e.g. number portion
size_t
nPortionNo
=
FindLastBreak
(
aModelPositions
,
nPos
);
size_t
nPortionNo
=
FindLastBreak
(
m_
aModelPositions
,
nPos
);
sal_Int32
nRet
=
aAccessiblePositions
[
nPortionNo
];
sal_Int32
nRet
=
m_
aAccessiblePositions
[
nPortionNo
];
// if the model portion has more than one position, go into it;
// if the model portion has more than one position, go into it;
// else return that position
// else return that position
sal_Int32
nStartPos
=
aModelPositions
[
nPortionNo
];
sal_Int32
nStartPos
=
m_
aModelPositions
[
nPortionNo
];
sal_Int32
nEndPos
=
aModelPositions
[
nPortionNo
+
1
];
sal_Int32
nEndPos
=
m_
aModelPositions
[
nPortionNo
+
1
];
if
(
(
nEndPos
-
nStartPos
)
>
1
)
if
(
(
nEndPos
-
nStartPos
)
>
1
)
{
{
// 'wide' portions have to be of the same width
// 'wide' portions have to be of the same width
OSL_ENSURE
(
(
nEndPos
-
nStartPos
)
==
OSL_ENSURE
(
(
nEndPos
-
nStartPos
)
==
(
aAccessiblePositions
[
nPortionNo
+
1
]
-
(
m_
aAccessiblePositions
[
nPortionNo
+
1
]
-
aAccessiblePositions
[
nPortionNo
]
),
m_
aAccessiblePositions
[
nPortionNo
]
),
"accessibility portion disagrees with text model"
);
"accessibility portion disagrees with text model"
);
sal_Int32
nWithinPortion
=
nPos
-
aModelPositions
[
nPortionNo
];
sal_Int32
nWithinPortion
=
nPos
-
m_
aModelPositions
[
nPortionNo
];
nRet
+=
nWithinPortion
;
nRet
+=
nWithinPortion
;
}
}
// else: return nRet unmodified
// else: return nRet unmodified
OSL_ENSURE
(
(
nRet
>=
0
)
&&
(
nRet
<=
sAccessibleString
.
getLength
()),
OSL_ENSURE
(
(
nRet
>=
0
)
&&
(
nRet
<=
m_
sAccessibleString
.
getLength
()),
"too long!"
);
"too long!"
);
return
nRet
;
return
nRet
;
}
}
...
@@ -577,21 +577,21 @@ sal_Int32 SwAccessiblePortionData::FillSpecialPos(
...
@@ -577,21 +577,21 @@ sal_Int32 SwAccessiblePortionData::FillSpecialPos(
SwSpecialPos
&
rPos
,
SwSpecialPos
&
rPos
,
SwSpecialPos
*&
rpPos
)
const
SwSpecialPos
*&
rpPos
)
const
{
{
size_t
nPortionNo
=
FindLastBreak
(
aAccessiblePositions
,
nPos
);
size_t
nPortionNo
=
FindLastBreak
(
m_
aAccessiblePositions
,
nPos
);
SwSPExtendRange
nExtend
(
SwSPExtendRange
::
NONE
);
SwSPExtendRange
nExtend
(
SwSPExtendRange
::
NONE
);
sal_Int32
nRefPos
(
0
);
sal_Int32
nRefPos
(
0
);
sal_Int32
nModelPos
(
0
);
sal_Int32
nModelPos
(
0
);
if
(
nPortionNo
<
nBeforePortions
)
if
(
nPortionNo
<
m_
nBeforePortions
)
{
{
nExtend
=
SwSPExtendRange
::
BEFORE
;
nExtend
=
SwSPExtendRange
::
BEFORE
;
rpPos
=
&
rPos
;
rpPos
=
&
rPos
;
}
}
else
else
{
{
sal_Int32
nModelEndPos
=
aModelPositions
[
nPortionNo
+
1
];
sal_Int32
nModelEndPos
=
m_
aModelPositions
[
nPortionNo
+
1
];
nModelPos
=
aModelPositions
[
nPortionNo
];
nModelPos
=
m_
aModelPositions
[
nPortionNo
];
// skip backwards over zero-length portions, since GetCharRect()
// skip backwards over zero-length portions, since GetCharRect()
// counts all model-zero-length portions as belonging to the
// counts all model-zero-length portions as belonging to the
...
@@ -601,22 +601,22 @@ sal_Int32 SwAccessiblePortionData::FillSpecialPos(
...
@@ -601,22 +601,22 @@ sal_Int32 SwAccessiblePortionData::FillSpecialPos(
{
{
nCorePortionNo
--
;
nCorePortionNo
--
;
nModelEndPos
=
nModelPos
;
nModelEndPos
=
nModelPos
;
nModelPos
=
aModelPositions
[
nCorePortionNo
];
nModelPos
=
m_
aModelPositions
[
nCorePortionNo
];
OSL_ENSURE
(
nModelPos
>=
0
,
"Can't happen."
);
OSL_ENSURE
(
nModelPos
>=
0
,
"Can't happen."
);
OSL_ENSURE
(
nCorePortionNo
>=
nBeforePortions
,
"Can't happen."
);
OSL_ENSURE
(
nCorePortionNo
>=
m_
nBeforePortions
,
"Can't happen."
);
}
}
OSL_ENSURE
(
nModelPos
!=
nModelEndPos
,
OSL_ENSURE
(
nModelPos
!=
nModelEndPos
,
"portion with core-representation expected"
);
"portion with core-representation expected"
);
// if we have anything except plain text, compute nExtend + nRefPos
// if we have anything except plain text, compute nExtend + nRefPos
if
(
(
nModelEndPos
-
nModelPos
==
1
)
&&
if
(
(
nModelEndPos
-
nModelPos
==
1
)
&&
(
pTextNode
->
GetText
()[
nModelPos
]
!=
sAccessibleString
[
nPos
]))
(
m_pTextNode
->
GetText
()[
nModelPos
]
!=
m_
sAccessibleString
[
nPos
]))
{
{
// case 1: a one-character, non-text portion
// case 1: a one-character, non-text portion
// reference position is the first accessibilty for our
// reference position is the first accessibilty for our
// core portion
// core portion
nRefPos
=
aAccessiblePositions
[
nCorePortionNo
];
nRefPos
=
m_
aAccessiblePositions
[
nCorePortionNo
];
nExtend
=
SwSPExtendRange
::
NONE
;
nExtend
=
SwSPExtendRange
::
NONE
;
rpPos
=
&
rPos
;
rpPos
=
&
rPos
;
}
}
...
@@ -626,7 +626,7 @@ sal_Int32 SwAccessiblePortionData::FillSpecialPos(
...
@@ -626,7 +626,7 @@ sal_Int32 SwAccessiblePortionData::FillSpecialPos(
// zero-length portions
// zero-length portions
// reference position is the first character of the next
// reference position is the first character of the next
// portion, and we are 'behind'
// portion, and we are 'behind'
nRefPos
=
aAccessiblePositions
[
nCorePortionNo
+
1
];
nRefPos
=
m_
aAccessiblePositions
[
nCorePortionNo
+
1
];
nExtend
=
SwSPExtendRange
::
BEHIND
;
nExtend
=
SwSPExtendRange
::
BEHIND
;
rpPos
=
&
rPos
;
rpPos
=
&
rPos
;
}
}
...
@@ -634,11 +634,11 @@ sal_Int32 SwAccessiblePortionData::FillSpecialPos(
...
@@ -634,11 +634,11 @@ sal_Int32 SwAccessiblePortionData::FillSpecialPos(
{
{
// case 3: regular text portion
// case 3: regular text portion
OSL_ENSURE
(
(
nModelEndPos
-
nModelPos
)
==
OSL_ENSURE
(
(
nModelEndPos
-
nModelPos
)
==
(
aAccessiblePositions
[
nPortionNo
+
1
]
-
(
m_
aAccessiblePositions
[
nPortionNo
+
1
]
-
aAccessiblePositions
[
nPortionNo
]
),
m_
aAccessiblePositions
[
nPortionNo
]
),
"text portion expected"
);
"text portion expected"
);
nModelPos
+=
nPos
-
aAccessiblePositions
[
nPortionNo
];
nModelPos
+=
nPos
-
m_
aAccessiblePositions
[
nPortionNo
];
rpPos
=
nullptr
;
rpPos
=
nullptr
;
}
}
}
}
...
@@ -649,11 +649,11 @@ sal_Int32 SwAccessiblePortionData::FillSpecialPos(
...
@@ -649,11 +649,11 @@ sal_Int32 SwAccessiblePortionData::FillSpecialPos(
// get the line number, and adjust nRefPos for the line
// get the line number, and adjust nRefPos for the line
// (if necessary)
// (if necessary)
size_t
nRefLine
=
FindBreak
(
aLineBreaks
,
nRefPos
);
size_t
nRefLine
=
FindBreak
(
m_
aLineBreaks
,
nRefPos
);
size_t
nMyLine
=
FindBreak
(
aLineBreaks
,
nPos
);
size_t
nMyLine
=
FindBreak
(
m_
aLineBreaks
,
nPos
);
sal_uInt16
nLineOffset
=
static_cast
<
sal_uInt16
>
(
nMyLine
-
nRefLine
);
sal_uInt16
nLineOffset
=
static_cast
<
sal_uInt16
>
(
nMyLine
-
nRefLine
);
if
(
nLineOffset
!=
0
)
if
(
nLineOffset
!=
0
)
nRefPos
=
aLineBreaks
[
nMyLine
];
nRefPos
=
m_
aLineBreaks
[
nMyLine
];
// fill char offset and 'special position'
// fill char offset and 'special position'
rPos
.
nCharOfst
=
nPos
-
nRefPos
;
rPos
.
nCharOfst
=
nPos
-
nRefPos
;
...
@@ -666,14 +666,14 @@ sal_Int32 SwAccessiblePortionData::FillSpecialPos(
...
@@ -666,14 +666,14 @@ sal_Int32 SwAccessiblePortionData::FillSpecialPos(
bool
SwAccessiblePortionData
::
FillBoundaryIFDateField
(
css
::
i18n
::
Boundary
&
rBound
,
const
sal_Int32
nPos
)
bool
SwAccessiblePortionData
::
FillBoundaryIFDateField
(
css
::
i18n
::
Boundary
&
rBound
,
const
sal_Int32
nPos
)
{
{
if
(
aFieldPosition
.
size
()
<
2
)
if
(
m_
aFieldPosition
.
size
()
<
2
)
return
false
;
return
false
;
for
(
size_t
i
=
0
;
i
<
aFieldPosition
.
size
()
-
1
;
i
+=
2
)
for
(
size_t
i
=
0
;
i
<
m_
aFieldPosition
.
size
()
-
1
;
i
+=
2
)
{
{
if
(
nPos
<
aFieldPosition
[
i
+
1
]
&&
nPos
>=
aFieldPosition
[
i
]
)
if
(
nPos
<
m_aFieldPosition
[
i
+
1
]
&&
nPos
>=
m_
aFieldPosition
[
i
]
)
{
{
rBound
.
startPos
=
aFieldPosition
[
i
];
rBound
.
startPos
=
m_
aFieldPosition
[
i
];
rBound
.
endPos
=
aFieldPosition
[
i
+
1
];
rBound
.
endPos
=
m_
aFieldPosition
[
i
+
1
];
return
true
;
return
true
;
}
}
}
}
...
@@ -687,15 +687,15 @@ void SwAccessiblePortionData::AdjustAndCheck(
...
@@ -687,15 +687,15 @@ void SwAccessiblePortionData::AdjustAndCheck(
bool
&
bEdit
)
const
bool
&
bEdit
)
const
{
{
// find portion and get mode position
// find portion and get mode position
nPortionNo
=
FindBreak
(
aAccessiblePositions
,
nPos
);
nPortionNo
=
FindBreak
(
m_
aAccessiblePositions
,
nPos
);
nCorePos
=
aModelPositions
[
nPortionNo
];
nCorePos
=
m_
aModelPositions
[
nPortionNo
];
// for special portions, make sure we're on a portion boundary
// for special portions, make sure we're on a portion boundary
// for text portions, add the in-portion offset
// for text portions, add the in-portion offset
if
(
IsSpecialPortion
(
nPortionNo
)
)
if
(
IsSpecialPortion
(
nPortionNo
)
)
bEdit
&=
nPos
==
aAccessiblePositions
[
nPortionNo
];
bEdit
&=
nPos
==
m_
aAccessiblePositions
[
nPortionNo
];
else
else
nCorePos
+=
nPos
-
aAccessiblePositions
[
nPortionNo
];
nCorePos
+=
nPos
-
m_
aAccessiblePositions
[
nPortionNo
];
}
}
bool
SwAccessiblePortionData
::
GetEditableRange
(
bool
SwAccessiblePortionData
::
GetEditableRange
(
...
@@ -738,14 +738,14 @@ bool SwAccessiblePortionData::GetEditableRange(
...
@@ -738,14 +738,14 @@ bool SwAccessiblePortionData::GetEditableRange(
bool
SwAccessiblePortionData
::
IsValidCorePosition
(
sal_Int32
nPos
)
const
bool
SwAccessiblePortionData
::
IsValidCorePosition
(
sal_Int32
nPos
)
const
{
{
// a position is valid its within the model positions that we know
// a position is valid its within the model positions that we know
return
(
aModelPositions
[
0
]
<=
nPos
)
&&
return
(
m_
aModelPositions
[
0
]
<=
nPos
)
&&
(
nPos
<=
aModelPositions
[
aModelPositions
.
size
()
-
1
]
);
(
nPos
<=
m_aModelPositions
[
m_
aModelPositions
.
size
()
-
1
]
);
}
}
bool
SwAccessiblePortionData
::
IsZeroCorePositionData
()
bool
SwAccessiblePortionData
::
IsZeroCorePositionData
()
{
{
if
(
aModelPositions
.
size
()
<
1
)
return
true
;
if
(
m_
aModelPositions
.
size
()
<
1
)
return
true
;
return
aModelPositions
[
0
]
==
0
&&
aModelPositions
[
aModelPositions
.
size
()
-
1
]
==
0
;
return
m_aModelPositions
[
0
]
==
0
&&
m_aModelPositions
[
m_
aModelPositions
.
size
()
-
1
]
==
0
;
}
}
bool
SwAccessiblePortionData
::
IsIndexInFootnode
(
sal_Int32
nIndex
)
bool
SwAccessiblePortionData
::
IsIndexInFootnode
(
sal_Int32
nIndex
)
...
@@ -765,18 +765,18 @@ bool SwAccessiblePortionData::IsIndexInFootnode(sal_Int32 nIndex)
...
@@ -765,18 +765,18 @@ bool SwAccessiblePortionData::IsIndexInFootnode(sal_Int32 nIndex)
bool
SwAccessiblePortionData
::
IsInGrayPortion
(
sal_Int32
nPos
)
bool
SwAccessiblePortionData
::
IsInGrayPortion
(
sal_Int32
nPos
)
{
{
// return IsGrayPortion( FindBreak( aAccessiblePositions, nPos ) );
// return IsGrayPortion( FindBreak( aAccessiblePositions, nPos ) );
return
IsPortionAttrSet
(
FindBreak
(
aAccessiblePositions
,
nPos
),
return
IsPortionAttrSet
(
FindBreak
(
m_
aAccessiblePositions
,
nPos
),
PORATTR_GRAY
);
PORATTR_GRAY
);
}
}
sal_Int32
SwAccessiblePortionData
::
GetFieldIndex
(
sal_Int32
nPos
)
sal_Int32
SwAccessiblePortionData
::
GetFieldIndex
(
sal_Int32
nPos
)
{
{
sal_Int32
nIndex
=
-
1
;
sal_Int32
nIndex
=
-
1
;
if
(
aFieldPosition
.
size
()
>=
2
)
if
(
m_
aFieldPosition
.
size
()
>=
2
)
{
{
for
(
size_t
i
=
0
;
i
<
aFieldPosition
.
size
()
-
1
;
i
+=
2
)
for
(
size_t
i
=
0
;
i
<
m_
aFieldPosition
.
size
()
-
1
;
i
+=
2
)
{
{
if
(
nPos
<=
aFieldPosition
[
i
+
1
]
&&
nPos
>=
aFieldPosition
[
i
]
)
if
(
nPos
<=
m_aFieldPosition
[
i
+
1
]
&&
nPos
>=
m_
aFieldPosition
[
i
]
)
{
{
nIndex
=
i
/
2
;
nIndex
=
i
/
2
;
break
;
break
;
...
@@ -788,12 +788,12 @@ sal_Int32 SwAccessiblePortionData::GetFieldIndex(sal_Int32 nPos)
...
@@ -788,12 +788,12 @@ sal_Int32 SwAccessiblePortionData::GetFieldIndex(sal_Int32 nPos)
sal_Int32
SwAccessiblePortionData
::
GetFirstValidCorePosition
()
const
sal_Int32
SwAccessiblePortionData
::
GetFirstValidCorePosition
()
const
{
{
return
aModelPositions
[
0
];
return
m_
aModelPositions
[
0
];
}
}
sal_Int32
SwAccessiblePortionData
::
GetLastValidCorePosition
()
const
sal_Int32
SwAccessiblePortionData
::
GetLastValidCorePosition
()
const
{
{
return
aModelPositions
[
aModelPositions
.
size
()
-
1
];
return
m_aModelPositions
[
m_
aModelPositions
.
size
()
-
1
];
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sw/source/core/access/accportions.hxx
Dosyayı görüntüle @
96646c35
...
@@ -38,15 +38,15 @@ namespace com { namespace sun { namespace star {
...
@@ -38,15 +38,15 @@ namespace com { namespace sun { namespace star {
class
SwAccessiblePortionData
:
public
SwPortionHandler
class
SwAccessiblePortionData
:
public
SwPortionHandler
{
{
// the node this portion is referring to
// the node this portion is referring to
const
SwTextNode
*
pTextNode
;
const
SwTextNode
*
m_
pTextNode
;
// variables used while collecting the data
// variables used while collecting the data
OUStringBuffer
aBuffer
;
OUStringBuffer
m_
aBuffer
;
sal_Int32
nModelPosition
;
sal_Int32
m_
nModelPosition
;
const
SwViewOption
*
pViewOptions
;
const
SwViewOption
*
m_
pViewOptions
;
// the accessible string
// the accessible string
OUString
sAccessibleString
;
OUString
m_
sAccessibleString
;
// positions array
// positions array
// instances of Position_t must always include the minimum and
// instances of Position_t must always include the minimum and
...
@@ -54,20 +54,20 @@ class SwAccessiblePortionData : public SwPortionHandler
...
@@ -54,20 +54,20 @@ class SwAccessiblePortionData : public SwPortionHandler
// algorithms)
// algorithms)
typedef
std
::
vector
<
sal_Int32
>
Positions_t
;
typedef
std
::
vector
<
sal_Int32
>
Positions_t
;
Positions_t
aLineBreaks
;
/// position of line breaks
Positions_t
m_
aLineBreaks
;
/// position of line breaks
Positions_t
aModelPositions
;
/// position of portion breaks in the model
Positions_t
m_
aModelPositions
;
/// position of portion breaks in the model
Positions_t
aAccessiblePositions
;
/// portion breaks in sAccessibleString
Positions_t
m_
aAccessiblePositions
;
/// portion breaks in sAccessibleString
Positions_t
aFieldPosition
;
Positions_t
m_
aFieldPosition
;
Positions_t
aAttrFieldType
;
Positions_t
m_
aAttrFieldType
;
typedef
std
::
vector
<
sal_uInt8
>
PortionAttrs_t
;
typedef
std
::
vector
<
sal_uInt8
>
PortionAttrs_t
;
PortionAttrs_t
aPortionAttrs
;
/// additional portion attributes
PortionAttrs_t
m_
aPortionAttrs
;
/// additional portion attributes
Positions_t
*
pSentences
;
/// positions of sentence breaks
Positions_t
*
m_
pSentences
;
/// positions of sentence breaks
size_t
nBeforePortions
;
/// # of portions before first model character
size_t
m_
nBeforePortions
;
/// # of portions before first model character
bool
bFinished
;
bool
m_
bFinished
;
bool
bLastIsSpecial
;
/// set if last portion was 'Special()'
bool
m_
bLastIsSpecial
;
/// set if last portion was 'Special()'
/// returns the index of the first position whose value is smaller
/// returns the index of the first position whose value is smaller
/// or equal, and whose following value is equal or larger
/// or equal, and whose following value is equal or larger
...
...
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