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
1c71cef7
Kaydet (Commit)
1c71cef7
authored
Şub 13, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
coverity#707769 Uninitialized pointer field
Change-Id: I449173ea1c4418cc2cc978862fe465e33e7b4338
üst
dbaffd88
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
120 additions
and
118 deletions
+120
-118
unoedprx.cxx
editeng/source/uno/unoedprx.cxx
+117
-115
unoedprx.hxx
include/editeng/unoedprx.hxx
+3
-3
No files found.
editeng/source/uno/unoedprx.cxx
Dosyayı görüntüle @
1c71cef7
...
@@ -430,7 +430,7 @@ sal_Bool SvxEditSourceAdapter::IsValid() const
...
@@ -430,7 +430,7 @@ sal_Bool SvxEditSourceAdapter::IsValid() const
//--------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------
SvxAccessibleTextAdapter
::
SvxAccessibleTextAdapter
()
:
m
r
TextForwarder
(
NULL
)
SvxAccessibleTextAdapter
::
SvxAccessibleTextAdapter
()
:
m
p
TextForwarder
(
NULL
)
{
{
}
}
...
@@ -440,24 +440,24 @@ SvxAccessibleTextAdapter::~SvxAccessibleTextAdapter()
...
@@ -440,24 +440,24 @@ SvxAccessibleTextAdapter::~SvxAccessibleTextAdapter()
sal_Int32
SvxAccessibleTextAdapter
::
GetParagraphCount
()
const
sal_Int32
SvxAccessibleTextAdapter
::
GetParagraphCount
()
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
return
m
r
TextForwarder
->
GetParagraphCount
();
return
m
p
TextForwarder
->
GetParagraphCount
();
}
}
sal_Int32
SvxAccessibleTextAdapter
::
GetTextLen
(
sal_Int32
nParagraph
)
const
sal_Int32
SvxAccessibleTextAdapter
::
GetTextLen
(
sal_Int32
nParagraph
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
SvxAccessibleTextIndex
aIndex
;
SvxAccessibleTextIndex
aIndex
;
aIndex
.
SetEEIndex
(
nParagraph
,
m
r
TextForwarder
->
GetTextLen
(
nParagraph
),
*
this
);
aIndex
.
SetEEIndex
(
nParagraph
,
m
p
TextForwarder
->
GetTextLen
(
nParagraph
),
*
this
);
return
aIndex
.
GetIndex
();
return
aIndex
.
GetIndex
();
}
}
OUString
SvxAccessibleTextAdapter
::
GetText
(
const
ESelection
&
rSel
)
const
OUString
SvxAccessibleTextAdapter
::
GetText
(
const
ESelection
&
rSel
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aEndIndex
;
SvxAccessibleTextIndex
aEndIndex
;
...
@@ -472,7 +472,7 @@ OUString SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const
...
@@ -472,7 +472,7 @@ OUString SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const
::
std
::
swap
(
aStartIndex
,
aEndIndex
);
::
std
::
swap
(
aStartIndex
,
aEndIndex
);
}
}
OUString
sStr
=
m
r
TextForwarder
->
GetText
(
MakeEESelection
(
aStartIndex
,
aEndIndex
)
);
OUString
sStr
=
m
p
TextForwarder
->
GetText
(
MakeEESelection
(
aStartIndex
,
aEndIndex
)
);
// trim field text, if necessary
// trim field text, if necessary
if
(
aStartIndex
.
InField
()
)
if
(
aStartIndex
.
InField
()
)
...
@@ -526,7 +526,7 @@ OUString SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const
...
@@ -526,7 +526,7 @@ OUString SvxAccessibleTextAdapter::GetText( const ESelection& rSel ) const
SfxItemSet
SvxAccessibleTextAdapter
::
GetAttribs
(
const
ESelection
&
rSel
,
sal_Bool
bOnlyHardAttrib
)
const
SfxItemSet
SvxAccessibleTextAdapter
::
GetAttribs
(
const
ESelection
&
rSel
,
sal_Bool
bOnlyHardAttrib
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aEndIndex
;
SvxAccessibleTextIndex
aEndIndex
;
...
@@ -534,39 +534,39 @@ SfxItemSet SvxAccessibleTextAdapter::GetAttribs( const ESelection& rSel, sal_Boo
...
@@ -534,39 +534,39 @@ SfxItemSet SvxAccessibleTextAdapter::GetAttribs( const ESelection& rSel, sal_Boo
aStartIndex
.
SetIndex
(
rSel
.
nStartPara
,
rSel
.
nStartPos
,
*
this
);
aStartIndex
.
SetIndex
(
rSel
.
nStartPara
,
rSel
.
nStartPos
,
*
this
);
aEndIndex
.
SetIndex
(
rSel
.
nEndPara
,
rSel
.
nEndPos
,
*
this
);
aEndIndex
.
SetIndex
(
rSel
.
nEndPara
,
rSel
.
nEndPos
,
*
this
);
return
m
r
TextForwarder
->
GetAttribs
(
MakeEESelection
(
aStartIndex
,
aEndIndex
),
return
m
p
TextForwarder
->
GetAttribs
(
MakeEESelection
(
aStartIndex
,
aEndIndex
),
bOnlyHardAttrib
);
bOnlyHardAttrib
);
}
}
SfxItemSet
SvxAccessibleTextAdapter
::
GetParaAttribs
(
sal_Int32
nPara
)
const
SfxItemSet
SvxAccessibleTextAdapter
::
GetParaAttribs
(
sal_Int32
nPara
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
return
m
r
TextForwarder
->
GetParaAttribs
(
nPara
);
return
m
p
TextForwarder
->
GetParaAttribs
(
nPara
);
}
}
void
SvxAccessibleTextAdapter
::
SetParaAttribs
(
sal_Int32
nPara
,
const
SfxItemSet
&
rSet
)
void
SvxAccessibleTextAdapter
::
SetParaAttribs
(
sal_Int32
nPara
,
const
SfxItemSet
&
rSet
)
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
m
r
TextForwarder
->
SetParaAttribs
(
nPara
,
rSet
);
m
p
TextForwarder
->
SetParaAttribs
(
nPara
,
rSet
);
}
}
void
SvxAccessibleTextAdapter
::
RemoveAttribs
(
const
ESelection
&
,
sal_Bool
,
sal_uInt16
)
void
SvxAccessibleTextAdapter
::
RemoveAttribs
(
const
ESelection
&
,
sal_Bool
,
sal_uInt16
)
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
}
}
void
SvxAccessibleTextAdapter
::
GetPortions
(
sal_Int32
nPara
,
std
::
vector
<
sal_Int32
>&
rList
)
const
void
SvxAccessibleTextAdapter
::
GetPortions
(
sal_Int32
nPara
,
std
::
vector
<
sal_Int32
>&
rList
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
m
r
TextForwarder
->
GetPortions
(
nPara
,
rList
);
m
p
TextForwarder
->
GetPortions
(
nPara
,
rList
);
}
}
sal_uInt16
SvxAccessibleTextAdapter
::
GetItemState
(
const
ESelection
&
rSel
,
sal_uInt16
nWhich
)
const
sal_uInt16
SvxAccessibleTextAdapter
::
GetItemState
(
const
ESelection
&
rSel
,
sal_uInt16
nWhich
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aEndIndex
;
SvxAccessibleTextIndex
aEndIndex
;
...
@@ -574,20 +574,20 @@ sal_uInt16 SvxAccessibleTextAdapter::GetItemState( const ESelection& rSel, sal_u
...
@@ -574,20 +574,20 @@ sal_uInt16 SvxAccessibleTextAdapter::GetItemState( const ESelection& rSel, sal_u
aStartIndex
.
SetIndex
(
rSel
.
nStartPara
,
rSel
.
nStartPos
,
*
this
);
aStartIndex
.
SetIndex
(
rSel
.
nStartPara
,
rSel
.
nStartPos
,
*
this
);
aEndIndex
.
SetIndex
(
rSel
.
nEndPara
,
rSel
.
nEndPos
,
*
this
);
aEndIndex
.
SetIndex
(
rSel
.
nEndPara
,
rSel
.
nEndPos
,
*
this
);
return
m
r
TextForwarder
->
GetItemState
(
MakeEESelection
(
aStartIndex
,
aEndIndex
),
return
m
p
TextForwarder
->
GetItemState
(
MakeEESelection
(
aStartIndex
,
aEndIndex
),
nWhich
);
nWhich
);
}
}
sal_uInt16
SvxAccessibleTextAdapter
::
GetItemState
(
sal_Int32
nPara
,
sal_uInt16
nWhich
)
const
sal_uInt16
SvxAccessibleTextAdapter
::
GetItemState
(
sal_Int32
nPara
,
sal_uInt16
nWhich
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
return
m
r
TextForwarder
->
GetItemState
(
nPara
,
nWhich
);
return
m
p
TextForwarder
->
GetItemState
(
nPara
,
nWhich
);
}
}
void
SvxAccessibleTextAdapter
::
QuickInsertText
(
const
OUString
&
rText
,
const
ESelection
&
rSel
)
void
SvxAccessibleTextAdapter
::
QuickInsertText
(
const
OUString
&
rText
,
const
ESelection
&
rSel
)
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aEndIndex
;
SvxAccessibleTextIndex
aEndIndex
;
...
@@ -595,13 +595,13 @@ void SvxAccessibleTextAdapter::QuickInsertText( const OUString& rText, const ESe
...
@@ -595,13 +595,13 @@ void SvxAccessibleTextAdapter::QuickInsertText( const OUString& rText, const ESe
aStartIndex
.
SetIndex
(
rSel
.
nStartPara
,
rSel
.
nStartPos
,
*
this
);
aStartIndex
.
SetIndex
(
rSel
.
nStartPara
,
rSel
.
nStartPos
,
*
this
);
aEndIndex
.
SetIndex
(
rSel
.
nEndPara
,
rSel
.
nEndPos
,
*
this
);
aEndIndex
.
SetIndex
(
rSel
.
nEndPara
,
rSel
.
nEndPos
,
*
this
);
m
r
TextForwarder
->
QuickInsertText
(
rText
,
m
p
TextForwarder
->
QuickInsertText
(
rText
,
MakeEESelection
(
aStartIndex
,
aEndIndex
)
);
MakeEESelection
(
aStartIndex
,
aEndIndex
)
);
}
}
void
SvxAccessibleTextAdapter
::
QuickInsertField
(
const
SvxFieldItem
&
rFld
,
const
ESelection
&
rSel
)
void
SvxAccessibleTextAdapter
::
QuickInsertField
(
const
SvxFieldItem
&
rFld
,
const
ESelection
&
rSel
)
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aEndIndex
;
SvxAccessibleTextIndex
aEndIndex
;
...
@@ -609,13 +609,13 @@ void SvxAccessibleTextAdapter::QuickInsertField( const SvxFieldItem& rFld, const
...
@@ -609,13 +609,13 @@ void SvxAccessibleTextAdapter::QuickInsertField( const SvxFieldItem& rFld, const
aStartIndex
.
SetIndex
(
rSel
.
nStartPara
,
rSel
.
nStartPos
,
*
this
);
aStartIndex
.
SetIndex
(
rSel
.
nStartPara
,
rSel
.
nStartPos
,
*
this
);
aEndIndex
.
SetIndex
(
rSel
.
nEndPara
,
rSel
.
nEndPos
,
*
this
);
aEndIndex
.
SetIndex
(
rSel
.
nEndPara
,
rSel
.
nEndPos
,
*
this
);
m
r
TextForwarder
->
QuickInsertField
(
rFld
,
m
p
TextForwarder
->
QuickInsertField
(
rFld
,
MakeEESelection
(
aStartIndex
,
aEndIndex
)
);
MakeEESelection
(
aStartIndex
,
aEndIndex
)
);
}
}
void
SvxAccessibleTextAdapter
::
QuickSetAttribs
(
const
SfxItemSet
&
rSet
,
const
ESelection
&
rSel
)
void
SvxAccessibleTextAdapter
::
QuickSetAttribs
(
const
SfxItemSet
&
rSet
,
const
ESelection
&
rSel
)
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aEndIndex
;
SvxAccessibleTextIndex
aEndIndex
;
...
@@ -623,13 +623,13 @@ void SvxAccessibleTextAdapter::QuickSetAttribs( const SfxItemSet& rSet, const ES
...
@@ -623,13 +623,13 @@ void SvxAccessibleTextAdapter::QuickSetAttribs( const SfxItemSet& rSet, const ES
aStartIndex
.
SetIndex
(
rSel
.
nStartPara
,
rSel
.
nStartPos
,
*
this
);
aStartIndex
.
SetIndex
(
rSel
.
nStartPara
,
rSel
.
nStartPos
,
*
this
);
aEndIndex
.
SetIndex
(
rSel
.
nEndPara
,
rSel
.
nEndPos
,
*
this
);
aEndIndex
.
SetIndex
(
rSel
.
nEndPara
,
rSel
.
nEndPos
,
*
this
);
m
r
TextForwarder
->
QuickSetAttribs
(
rSet
,
m
p
TextForwarder
->
QuickSetAttribs
(
rSet
,
MakeEESelection
(
aStartIndex
,
aEndIndex
)
);
MakeEESelection
(
aStartIndex
,
aEndIndex
)
);
}
}
void
SvxAccessibleTextAdapter
::
QuickInsertLineBreak
(
const
ESelection
&
rSel
)
void
SvxAccessibleTextAdapter
::
QuickInsertLineBreak
(
const
ESelection
&
rSel
)
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aEndIndex
;
SvxAccessibleTextIndex
aEndIndex
;
...
@@ -637,36 +637,36 @@ void SvxAccessibleTextAdapter::QuickInsertLineBreak( const ESelection& rSel )
...
@@ -637,36 +637,36 @@ void SvxAccessibleTextAdapter::QuickInsertLineBreak( const ESelection& rSel )
aStartIndex
.
SetIndex
(
rSel
.
nStartPara
,
rSel
.
nStartPos
,
*
this
);
aStartIndex
.
SetIndex
(
rSel
.
nStartPara
,
rSel
.
nStartPos
,
*
this
);
aEndIndex
.
SetIndex
(
rSel
.
nEndPara
,
rSel
.
nEndPos
,
*
this
);
aEndIndex
.
SetIndex
(
rSel
.
nEndPara
,
rSel
.
nEndPos
,
*
this
);
m
r
TextForwarder
->
QuickInsertLineBreak
(
MakeEESelection
(
aStartIndex
,
aEndIndex
)
);
m
p
TextForwarder
->
QuickInsertLineBreak
(
MakeEESelection
(
aStartIndex
,
aEndIndex
)
);
}
}
SfxItemPool
*
SvxAccessibleTextAdapter
::
GetPool
()
const
SfxItemPool
*
SvxAccessibleTextAdapter
::
GetPool
()
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
return
m
r
TextForwarder
->
GetPool
();
return
m
p
TextForwarder
->
GetPool
();
}
}
OUString
SvxAccessibleTextAdapter
::
CalcFieldValue
(
const
SvxFieldItem
&
rField
,
sal_Int32
nPara
,
sal_Int32
nPos
,
Color
*&
rpTxtColor
,
Color
*&
rpFldColor
)
OUString
SvxAccessibleTextAdapter
::
CalcFieldValue
(
const
SvxFieldItem
&
rField
,
sal_Int32
nPara
,
sal_Int32
nPos
,
Color
*&
rpTxtColor
,
Color
*&
rpFldColor
)
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
return
m
r
TextForwarder
->
CalcFieldValue
(
rField
,
nPara
,
nPos
,
rpTxtColor
,
rpFldColor
);
return
m
p
TextForwarder
->
CalcFieldValue
(
rField
,
nPara
,
nPos
,
rpTxtColor
,
rpFldColor
);
}
}
void
SvxAccessibleTextAdapter
::
FieldClicked
(
const
SvxFieldItem
&
rField
,
sal_Int32
nPara
,
sal_Int32
nPos
)
void
SvxAccessibleTextAdapter
::
FieldClicked
(
const
SvxFieldItem
&
rField
,
sal_Int32
nPara
,
sal_Int32
nPos
)
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
m
r
TextForwarder
->
FieldClicked
(
rField
,
nPara
,
nPos
);
m
p
TextForwarder
->
FieldClicked
(
rField
,
nPara
,
nPos
);
}
}
sal_uInt16
SvxAccessibleTextAdapter
::
CalcEditEngineIndex
(
sal_Int32
nPara
,
sal_Int32
nLogicalIndex
)
sal_uInt16
SvxAccessibleTextAdapter
::
CalcEditEngineIndex
(
sal_Int32
nPara
,
sal_Int32
nLogicalIndex
)
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
SvxAccessibleTextIndex
aIndex
;
SvxAccessibleTextIndex
aIndex
;
aIndex
.
SetIndex
(
nPara
,
nLogicalIndex
,
*
m
r
TextForwarder
);
aIndex
.
SetIndex
(
nPara
,
nLogicalIndex
,
*
m
p
TextForwarder
);
return
aIndex
.
GetEEIndex
();
return
aIndex
.
GetEEIndex
();
}
}
...
@@ -674,66 +674,66 @@ sal_uInt16 SvxAccessibleTextAdapter::CalcEditEngineIndex( sal_Int32 nPara, sal_I
...
@@ -674,66 +674,66 @@ sal_uInt16 SvxAccessibleTextAdapter::CalcEditEngineIndex( sal_Int32 nPara, sal_I
sal_Bool
SvxAccessibleTextAdapter
::
IsValid
()
const
sal_Bool
SvxAccessibleTextAdapter
::
IsValid
()
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
if
(
m
r
TextForwarder
)
if
(
m
p
TextForwarder
)
return
m
r
TextForwarder
->
IsValid
();
return
m
p
TextForwarder
->
IsValid
();
else
else
return
sal_False
;
return
sal_False
;
}
}
LanguageType
SvxAccessibleTextAdapter
::
GetLanguage
(
sal_Int32
nPara
,
sal_Int32
nPos
)
const
LanguageType
SvxAccessibleTextAdapter
::
GetLanguage
(
sal_Int32
nPara
,
sal_Int32
nPos
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
SvxAccessibleTextIndex
aIndex
;
SvxAccessibleTextIndex
aIndex
;
aIndex
.
SetIndex
(
nPara
,
nPos
,
*
this
);
aIndex
.
SetIndex
(
nPara
,
nPos
,
*
this
);
return
m
r
TextForwarder
->
GetLanguage
(
nPara
,
aIndex
.
GetEEIndex
()
);
return
m
p
TextForwarder
->
GetLanguage
(
nPara
,
aIndex
.
GetEEIndex
()
);
}
}
sal_Int32
SvxAccessibleTextAdapter
::
GetFieldCount
(
sal_Int32
nPara
)
const
sal_Int32
SvxAccessibleTextAdapter
::
GetFieldCount
(
sal_Int32
nPara
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
return
m
r
TextForwarder
->
GetFieldCount
(
nPara
);
return
m
p
TextForwarder
->
GetFieldCount
(
nPara
);
}
}
EFieldInfo
SvxAccessibleTextAdapter
::
GetFieldInfo
(
sal_Int32
nPara
,
sal_uInt16
nField
)
const
EFieldInfo
SvxAccessibleTextAdapter
::
GetFieldInfo
(
sal_Int32
nPara
,
sal_uInt16
nField
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
return
m
r
TextForwarder
->
GetFieldInfo
(
nPara
,
nField
);
return
m
p
TextForwarder
->
GetFieldInfo
(
nPara
,
nField
);
}
}
EBulletInfo
SvxAccessibleTextAdapter
::
GetBulletInfo
(
sal_Int32
nPara
)
const
EBulletInfo
SvxAccessibleTextAdapter
::
GetBulletInfo
(
sal_Int32
nPara
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
return
m
r
TextForwarder
->
GetBulletInfo
(
nPara
);
return
m
p
TextForwarder
->
GetBulletInfo
(
nPara
);
}
}
void
SvxAccessibleTextAdapter
::
SetUpdateModeForAcc
(
sal_Bool
bUp
)
void
SvxAccessibleTextAdapter
::
SetUpdateModeForAcc
(
sal_Bool
bUp
)
{
{
return
m
r
TextForwarder
->
SetUpdateModeForAcc
(
bUp
);
return
m
p
TextForwarder
->
SetUpdateModeForAcc
(
bUp
);
}
}
sal_Bool
SvxAccessibleTextAdapter
::
GetUpdateModeForAcc
(
)
const
sal_Bool
SvxAccessibleTextAdapter
::
GetUpdateModeForAcc
(
)
const
{
{
return
m
r
TextForwarder
->
GetUpdateModeForAcc
();
return
m
p
TextForwarder
->
GetUpdateModeForAcc
();
}
}
Rectangle
SvxAccessibleTextAdapter
::
GetCharBounds
(
sal_Int32
nPara
,
sal_Int32
nIndex
)
const
Rectangle
SvxAccessibleTextAdapter
::
GetCharBounds
(
sal_Int32
nPara
,
sal_Int32
nIndex
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
SvxAccessibleTextIndex
aIndex
;
SvxAccessibleTextIndex
aIndex
;
aIndex
.
SetIndex
(
nPara
,
nIndex
,
*
this
);
aIndex
.
SetIndex
(
nPara
,
nIndex
,
*
this
);
// preset if anything goes wrong below
// preset if anything goes wrong below
// n-th char in GetParagraphIndex's paragraph
// n-th char in GetParagraphIndex's paragraph
Rectangle
aRect
=
m
r
TextForwarder
->
GetCharBounds
(
nPara
,
aIndex
.
GetEEIndex
()
);
Rectangle
aRect
=
m
p
TextForwarder
->
GetCharBounds
(
nPara
,
aIndex
.
GetEEIndex
()
);
if
(
aIndex
.
InBullet
()
)
if
(
aIndex
.
InBullet
()
)
{
{
...
@@ -766,12 +766,12 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_Int32 nPara, sal_Int32 nI
...
@@ -766,12 +766,12 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_Int32 nPara, sal_Int32 nI
{
{
ESelection
aSel
=
MakeEESelection
(
aIndex
);
ESelection
aSel
=
MakeEESelection
(
aIndex
);
SvxFont
aFont
=
EditEngine
::
CreateSvxFontFromItemSet
(
m
r
TextForwarder
->
GetAttribs
(
aSel
)
);
SvxFont
aFont
=
EditEngine
::
CreateSvxFontFromItemSet
(
m
p
TextForwarder
->
GetAttribs
(
aSel
)
);
AccessibleStringWrap
aStringWrap
(
*
pOutDev
,
AccessibleStringWrap
aStringWrap
(
*
pOutDev
,
aFont
,
aFont
,
m
r
TextForwarder
->
GetText
(
aSel
)
);
m
p
TextForwarder
->
GetText
(
aSel
)
);
Rectangle
aStartRect
=
m
r
TextForwarder
->
GetCharBounds
(
nPara
,
aIndex
.
GetEEIndex
()
);
Rectangle
aStartRect
=
m
p
TextForwarder
->
GetCharBounds
(
nPara
,
aIndex
.
GetEEIndex
()
);
if
(
!
aStringWrap
.
GetCharacterBounds
(
aIndex
.
GetFieldOffset
(),
aRect
)
)
if
(
!
aStringWrap
.
GetCharacterBounds
(
aIndex
.
GetFieldOffset
(),
aRect
)
)
aRect
=
aStartRect
;
aRect
=
aStartRect
;
...
@@ -786,7 +786,7 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_Int32 nPara, sal_Int32 nI
...
@@ -786,7 +786,7 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_Int32 nPara, sal_Int32 nI
Rectangle
SvxAccessibleTextAdapter
::
GetParaBounds
(
sal_Int32
nPara
)
const
Rectangle
SvxAccessibleTextAdapter
::
GetParaBounds
(
sal_Int32
nPara
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
EBulletInfo
aBulletInfo
=
GetBulletInfo
(
nPara
);
EBulletInfo
aBulletInfo
=
GetBulletInfo
(
nPara
);
...
@@ -795,35 +795,35 @@ Rectangle SvxAccessibleTextAdapter::GetParaBounds( sal_Int32 nPara ) const
...
@@ -795,35 +795,35 @@ Rectangle SvxAccessibleTextAdapter::GetParaBounds( sal_Int32 nPara ) const
aBulletInfo
.
nType
!=
SVX_NUM_BITMAP
)
aBulletInfo
.
nType
!=
SVX_NUM_BITMAP
)
{
{
// include bullet in para bounding box
// include bullet in para bounding box
Rectangle
aRect
(
m
r
TextForwarder
->
GetParaBounds
(
nPara
)
);
Rectangle
aRect
(
m
p
TextForwarder
->
GetParaBounds
(
nPara
)
);
aRect
.
Union
(
aBulletInfo
.
aBounds
);
aRect
.
Union
(
aBulletInfo
.
aBounds
);
return
aRect
;
return
aRect
;
}
}
return
m
r
TextForwarder
->
GetParaBounds
(
nPara
);
return
m
p
TextForwarder
->
GetParaBounds
(
nPara
);
}
}
MapMode
SvxAccessibleTextAdapter
::
GetMapMode
()
const
MapMode
SvxAccessibleTextAdapter
::
GetMapMode
()
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
return
m
r
TextForwarder
->
GetMapMode
();
return
m
p
TextForwarder
->
GetMapMode
();
}
}
OutputDevice
*
SvxAccessibleTextAdapter
::
GetRefDevice
()
const
OutputDevice
*
SvxAccessibleTextAdapter
::
GetRefDevice
()
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
return
m
r
TextForwarder
->
GetRefDevice
();
return
m
p
TextForwarder
->
GetRefDevice
();
}
}
sal_Bool
SvxAccessibleTextAdapter
::
GetIndexAtPoint
(
const
Point
&
rPoint
,
sal_Int32
&
nPara
,
sal_Int32
&
nIndex
)
const
sal_Bool
SvxAccessibleTextAdapter
::
GetIndexAtPoint
(
const
Point
&
rPoint
,
sal_Int32
&
nPara
,
sal_Int32
&
nIndex
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
if
(
!
m
r
TextForwarder
->
GetIndexAtPoint
(
rPoint
,
nPara
,
nIndex
)
)
if
(
!
m
p
TextForwarder
->
GetIndexAtPoint
(
rPoint
,
nPara
,
nIndex
)
)
return
sal_False
;
return
sal_False
;
SvxAccessibleTextIndex
aIndex
;
SvxAccessibleTextIndex
aIndex
;
...
@@ -874,12 +874,12 @@ sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, sal_Int
...
@@ -874,12 +874,12 @@ sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, sal_Int
return
sal_False
;
return
sal_False
;
ESelection
aSelection
=
MakeEESelection
(
aIndex
);
ESelection
aSelection
=
MakeEESelection
(
aIndex
);
SvxFont
aFont
=
EditEngine
::
CreateSvxFontFromItemSet
(
m
r
TextForwarder
->
GetAttribs
(
aSelection
)
);
SvxFont
aFont
=
EditEngine
::
CreateSvxFontFromItemSet
(
m
p
TextForwarder
->
GetAttribs
(
aSelection
)
);
AccessibleStringWrap
aStringWrap
(
*
pOutDev
,
AccessibleStringWrap
aStringWrap
(
*
pOutDev
,
aFont
,
aFont
,
m
r
TextForwarder
->
GetText
(
aSelection
)
);
m
p
TextForwarder
->
GetText
(
aSelection
)
);
Rectangle
aRect
=
m
r
TextForwarder
->
GetCharBounds
(
nPara
,
aIndex
.
GetEEIndex
()
);
Rectangle
aRect
=
m
p
TextForwarder
->
GetCharBounds
(
nPara
,
aIndex
.
GetEEIndex
()
);
Point
aPoint
=
rPoint
;
Point
aPoint
=
rPoint
;
aPoint
.
Move
(
-
aRect
.
Left
(),
-
aRect
.
Top
()
);
aPoint
.
Move
(
-
aRect
.
Left
(),
-
aRect
.
Top
()
);
...
@@ -896,7 +896,7 @@ sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, sal_Int
...
@@ -896,7 +896,7 @@ sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, sal_Int
sal_Bool
SvxAccessibleTextAdapter
::
GetWordIndices
(
sal_Int32
nPara
,
sal_Int32
nIndex
,
sal_Int32
&
nStart
,
sal_Int32
&
nEnd
)
const
sal_Bool
SvxAccessibleTextAdapter
::
GetWordIndices
(
sal_Int32
nPara
,
sal_Int32
nIndex
,
sal_Int32
&
nStart
,
sal_Int32
&
nEnd
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
SvxAccessibleTextIndex
aIndex
;
SvxAccessibleTextIndex
aIndex
;
aIndex
.
SetIndex
(
nPara
,
nIndex
,
*
this
);
aIndex
.
SetIndex
(
nPara
,
nIndex
,
*
this
);
...
@@ -931,7 +931,7 @@ sal_Bool SvxAccessibleTextAdapter::GetWordIndices( sal_Int32 nPara, sal_Int32 nI
...
@@ -931,7 +931,7 @@ sal_Bool SvxAccessibleTextAdapter::GetWordIndices( sal_Int32 nPara, sal_Int32 nI
return
sal_True
;
return
sal_True
;
}
}
if
(
!
m
r
TextForwarder
->
GetWordIndices
(
nPara
,
nIndex
,
nStart
,
nEnd
)
)
if
(
!
m
p
TextForwarder
->
GetWordIndices
(
nPara
,
nIndex
,
nStart
,
nEnd
)
)
return
sal_False
;
return
sal_False
;
aIndex
.
SetEEIndex
(
nPara
,
nStart
,
*
this
);
aIndex
.
SetEEIndex
(
nPara
,
nStart
,
*
this
);
...
@@ -951,7 +951,7 @@ sal_Bool SvxAccessibleTextAdapter::GetWordIndices( sal_Int32 nPara, sal_Int32 nI
...
@@ -951,7 +951,7 @@ sal_Bool SvxAccessibleTextAdapter::GetWordIndices( sal_Int32 nPara, sal_Int32 nI
sal_Bool
SvxAccessibleTextAdapter
::
GetAttributeRun
(
sal_Int32
&
nStartIndex
,
sal_Int32
&
nEndIndex
,
sal_Int32
nPara
,
sal_Int32
nIndex
,
sal_Bool
/* bInCell */
)
const
sal_Bool
SvxAccessibleTextAdapter
::
GetAttributeRun
(
sal_Int32
&
nStartIndex
,
sal_Int32
&
nEndIndex
,
sal_Int32
nPara
,
sal_Int32
nIndex
,
sal_Bool
/* bInCell */
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
SvxAccessibleTextIndex
aIndex
;
SvxAccessibleTextIndex
aIndex
;
aIndex
.
SetIndex
(
nPara
,
nIndex
,
*
this
);
aIndex
.
SetIndex
(
nPara
,
nIndex
,
*
this
);
...
@@ -983,7 +983,7 @@ sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( sal_Int32& nStartIndex, sal_
...
@@ -983,7 +983,7 @@ sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( sal_Int32& nStartIndex, sal_
return
sal_True
;
return
sal_True
;
}
}
if
(
!
m
r
TextForwarder
->
GetAttributeRun
(
nStartIndex
,
nEndIndex
,
nPara
,
nIndex
)
)
if
(
!
m
p
TextForwarder
->
GetAttributeRun
(
nStartIndex
,
nEndIndex
,
nPara
,
nIndex
)
)
return
sal_False
;
return
sal_False
;
aIndex
.
SetEEIndex
(
nPara
,
nStartIndex
,
*
this
);
aIndex
.
SetEEIndex
(
nPara
,
nStartIndex
,
*
this
);
...
@@ -1003,14 +1003,14 @@ sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( sal_Int32& nStartIndex, sal_
...
@@ -1003,14 +1003,14 @@ sal_Bool SvxAccessibleTextAdapter::GetAttributeRun( sal_Int32& nStartIndex, sal_
sal_Int32
SvxAccessibleTextAdapter
::
GetLineCount
(
sal_Int32
nPara
)
const
sal_Int32
SvxAccessibleTextAdapter
::
GetLineCount
(
sal_Int32
nPara
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
return
m
r
TextForwarder
->
GetLineCount
(
nPara
);
return
m
p
TextForwarder
->
GetLineCount
(
nPara
);
}
}
sal_Int32
SvxAccessibleTextAdapter
::
GetLineLen
(
sal_Int32
nPara
,
sal_Int32
nLine
)
const
sal_Int32
SvxAccessibleTextAdapter
::
GetLineLen
(
sal_Int32
nPara
,
sal_Int32
nLine
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aEndIndex
;
SvxAccessibleTextIndex
aEndIndex
;
...
@@ -1020,7 +1020,7 @@ sal_Int32 SvxAccessibleTextAdapter::GetLineLen( sal_Int32 nPara, sal_Int32 nLine
...
@@ -1020,7 +1020,7 @@ sal_Int32 SvxAccessibleTextAdapter::GetLineLen( sal_Int32 nPara, sal_Int32 nLine
{
{
nLastIndex
=
nCurrIndex
;
nLastIndex
=
nCurrIndex
;
nCurrIndex
=
nCurrIndex
=
nCurrIndex
+
m
r
TextForwarder
->
GetLineLen
(
nPara
,
nCurrLine
);
nCurrIndex
+
m
p
TextForwarder
->
GetLineLen
(
nPara
,
nCurrLine
);
}
}
aEndIndex
.
SetEEIndex
(
nPara
,
nCurrIndex
,
*
this
);
aEndIndex
.
SetEEIndex
(
nPara
,
nCurrIndex
,
*
this
);
...
@@ -1036,17 +1036,17 @@ sal_Int32 SvxAccessibleTextAdapter::GetLineLen( sal_Int32 nPara, sal_Int32 nLine
...
@@ -1036,17 +1036,17 @@ sal_Int32 SvxAccessibleTextAdapter::GetLineLen( sal_Int32 nPara, sal_Int32 nLine
void
SvxAccessibleTextAdapter
::
GetLineBoundaries
(
/*out*/
sal_Int32
&
rStart
,
/*out*/
sal_Int32
&
rEnd
,
sal_Int32
nParagraph
,
sal_Int32
nLine
)
const
void
SvxAccessibleTextAdapter
::
GetLineBoundaries
(
/*out*/
sal_Int32
&
rStart
,
/*out*/
sal_Int32
&
rEnd
,
sal_Int32
nParagraph
,
sal_Int32
nLine
)
const
{
{
m
r
TextForwarder
->
GetLineBoundaries
(
rStart
,
rEnd
,
nParagraph
,
nLine
);
m
p
TextForwarder
->
GetLineBoundaries
(
rStart
,
rEnd
,
nParagraph
,
nLine
);
}
}
sal_Int32
SvxAccessibleTextAdapter
::
GetLineNumberAtIndex
(
sal_Int32
nPara
,
sal_Int32
nIndex
)
const
sal_Int32
SvxAccessibleTextAdapter
::
GetLineNumberAtIndex
(
sal_Int32
nPara
,
sal_Int32
nIndex
)
const
{
{
return
m
r
TextForwarder
->
GetLineNumberAtIndex
(
nPara
,
nIndex
);
return
m
p
TextForwarder
->
GetLineNumberAtIndex
(
nPara
,
nIndex
);
}
}
sal_Bool
SvxAccessibleTextAdapter
::
Delete
(
const
ESelection
&
rSel
)
sal_Bool
SvxAccessibleTextAdapter
::
Delete
(
const
ESelection
&
rSel
)
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aEndIndex
;
SvxAccessibleTextIndex
aEndIndex
;
...
@@ -1054,12 +1054,12 @@ sal_Bool SvxAccessibleTextAdapter::Delete( const ESelection& rSel )
...
@@ -1054,12 +1054,12 @@ sal_Bool SvxAccessibleTextAdapter::Delete( const ESelection& rSel )
aStartIndex
.
SetIndex
(
rSel
.
nStartPara
,
rSel
.
nStartPos
,
*
this
);
aStartIndex
.
SetIndex
(
rSel
.
nStartPara
,
rSel
.
nStartPos
,
*
this
);
aEndIndex
.
SetIndex
(
rSel
.
nEndPara
,
rSel
.
nEndPos
,
*
this
);
aEndIndex
.
SetIndex
(
rSel
.
nEndPara
,
rSel
.
nEndPos
,
*
this
);
return
m
r
TextForwarder
->
Delete
(
MakeEESelection
(
aStartIndex
,
aEndIndex
)
);
return
m
p
TextForwarder
->
Delete
(
MakeEESelection
(
aStartIndex
,
aEndIndex
)
);
}
}
sal_Bool
SvxAccessibleTextAdapter
::
InsertText
(
const
OUString
&
rStr
,
const
ESelection
&
rSel
)
sal_Bool
SvxAccessibleTextAdapter
::
InsertText
(
const
OUString
&
rStr
,
const
ESelection
&
rSel
)
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aEndIndex
;
SvxAccessibleTextIndex
aEndIndex
;
...
@@ -1067,38 +1067,38 @@ sal_Bool SvxAccessibleTextAdapter::InsertText( const OUString& rStr, const ESele
...
@@ -1067,38 +1067,38 @@ sal_Bool SvxAccessibleTextAdapter::InsertText( const OUString& rStr, const ESele
aStartIndex
.
SetIndex
(
rSel
.
nStartPara
,
rSel
.
nStartPos
,
*
this
);
aStartIndex
.
SetIndex
(
rSel
.
nStartPara
,
rSel
.
nStartPos
,
*
this
);
aEndIndex
.
SetIndex
(
rSel
.
nEndPara
,
rSel
.
nEndPos
,
*
this
);
aEndIndex
.
SetIndex
(
rSel
.
nEndPara
,
rSel
.
nEndPos
,
*
this
);
return
m
r
TextForwarder
->
InsertText
(
rStr
,
MakeEESelection
(
aStartIndex
,
aEndIndex
)
);
return
m
p
TextForwarder
->
InsertText
(
rStr
,
MakeEESelection
(
aStartIndex
,
aEndIndex
)
);
}
}
sal_Bool
SvxAccessibleTextAdapter
::
QuickFormatDoc
(
sal_Bool
bFull
)
sal_Bool
SvxAccessibleTextAdapter
::
QuickFormatDoc
(
sal_Bool
bFull
)
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
return
m
r
TextForwarder
->
QuickFormatDoc
(
bFull
);
return
m
p
TextForwarder
->
QuickFormatDoc
(
bFull
);
}
}
sal_Int16
SvxAccessibleTextAdapter
::
GetDepth
(
sal_Int32
nPara
)
const
sal_Int16
SvxAccessibleTextAdapter
::
GetDepth
(
sal_Int32
nPara
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
return
m
r
TextForwarder
->
GetDepth
(
nPara
);
return
m
p
TextForwarder
->
GetDepth
(
nPara
);
}
}
sal_Bool
SvxAccessibleTextAdapter
::
SetDepth
(
sal_Int32
nPara
,
sal_Int16
nNewDepth
)
sal_Bool
SvxAccessibleTextAdapter
::
SetDepth
(
sal_Int32
nPara
,
sal_Int16
nNewDepth
)
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
return
m
r
TextForwarder
->
SetDepth
(
nPara
,
nNewDepth
);
return
m
p
TextForwarder
->
SetDepth
(
nPara
,
nNewDepth
);
}
}
void
SvxAccessibleTextAdapter
::
SetForwarder
(
SvxTextForwarder
&
rForwarder
)
void
SvxAccessibleTextAdapter
::
SetForwarder
(
SvxTextForwarder
&
rForwarder
)
{
{
m
r
TextForwarder
=
&
rForwarder
;
m
p
TextForwarder
=
&
rForwarder
;
}
}
sal_Bool
SvxAccessibleTextAdapter
::
HaveImageBullet
(
sal_Int32
nPara
)
const
sal_Bool
SvxAccessibleTextAdapter
::
HaveImageBullet
(
sal_Int32
nPara
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
EBulletInfo
aBulletInfo
=
GetBulletInfo
(
nPara
);
EBulletInfo
aBulletInfo
=
GetBulletInfo
(
nPara
);
...
@@ -1116,7 +1116,7 @@ sal_Bool SvxAccessibleTextAdapter::HaveImageBullet( sal_Int32 nPara ) const
...
@@ -1116,7 +1116,7 @@ sal_Bool SvxAccessibleTextAdapter::HaveImageBullet( sal_Int32 nPara ) const
sal_Bool
SvxAccessibleTextAdapter
::
HaveTextBullet
(
sal_Int32
nPara
)
const
sal_Bool
SvxAccessibleTextAdapter
::
HaveTextBullet
(
sal_Int32
nPara
)
const
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
EBulletInfo
aBulletInfo
=
GetBulletInfo
(
nPara
);
EBulletInfo
aBulletInfo
=
GetBulletInfo
(
nPara
);
...
@@ -1134,7 +1134,7 @@ sal_Bool SvxAccessibleTextAdapter::HaveTextBullet( sal_Int32 nPara ) const
...
@@ -1134,7 +1134,7 @@ sal_Bool SvxAccessibleTextAdapter::HaveTextBullet( sal_Int32 nPara ) const
sal_Bool
SvxAccessibleTextAdapter
::
IsEditable
(
const
ESelection
&
rSel
)
sal_Bool
SvxAccessibleTextAdapter
::
IsEditable
(
const
ESelection
&
rSel
)
{
{
DBG_ASSERT
(
m
r
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
TextForwarder
,
"SvxAccessibleTextAdapter: no forwarder"
);
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aEndIndex
;
SvxAccessibleTextIndex
aEndIndex
;
...
@@ -1178,6 +1178,8 @@ void SvxAccessibleTextAdapter::CopyText(const SvxTextForwarder&)
...
@@ -1178,6 +1178,8 @@ void SvxAccessibleTextAdapter::CopyText(const SvxTextForwarder&)
//---------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------
SvxAccessibleTextEditViewAdapter
::
SvxAccessibleTextEditViewAdapter
()
SvxAccessibleTextEditViewAdapter
::
SvxAccessibleTextEditViewAdapter
()
:
mpViewForwarder
(
NULL
)
,
mpTextForwarder
(
NULL
)
{
{
}
}
...
@@ -1187,49 +1189,49 @@ SvxAccessibleTextEditViewAdapter::~SvxAccessibleTextEditViewAdapter()
...
@@ -1187,49 +1189,49 @@ SvxAccessibleTextEditViewAdapter::~SvxAccessibleTextEditViewAdapter()
sal_Bool
SvxAccessibleTextEditViewAdapter
::
IsValid
()
const
sal_Bool
SvxAccessibleTextEditViewAdapter
::
IsValid
()
const
{
{
DBG_ASSERT
(
m
r
ViewForwarder
,
"SvxAccessibleTextEditViewAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
ViewForwarder
,
"SvxAccessibleTextEditViewAdapter: no forwarder"
);
if
(
m
r
ViewForwarder
)
if
(
m
p
ViewForwarder
)
return
m
r
ViewForwarder
->
IsValid
();
return
m
p
ViewForwarder
->
IsValid
();
else
else
return
sal_False
;
return
sal_False
;
}
}
Rectangle
SvxAccessibleTextEditViewAdapter
::
GetVisArea
()
const
Rectangle
SvxAccessibleTextEditViewAdapter
::
GetVisArea
()
const
{
{
DBG_ASSERT
(
m
r
ViewForwarder
,
"SvxAccessibleTextEditViewAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
ViewForwarder
,
"SvxAccessibleTextEditViewAdapter: no forwarder"
);
return
m
r
ViewForwarder
->
GetVisArea
();
return
m
p
ViewForwarder
->
GetVisArea
();
}
}
Point
SvxAccessibleTextEditViewAdapter
::
LogicToPixel
(
const
Point
&
rPoint
,
const
MapMode
&
rMapMode
)
const
Point
SvxAccessibleTextEditViewAdapter
::
LogicToPixel
(
const
Point
&
rPoint
,
const
MapMode
&
rMapMode
)
const
{
{
DBG_ASSERT
(
m
r
ViewForwarder
,
"SvxAccessibleTextEditViewAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
ViewForwarder
,
"SvxAccessibleTextEditViewAdapter: no forwarder"
);
return
m
r
ViewForwarder
->
LogicToPixel
(
rPoint
,
rMapMode
);
return
m
p
ViewForwarder
->
LogicToPixel
(
rPoint
,
rMapMode
);
}
}
Point
SvxAccessibleTextEditViewAdapter
::
PixelToLogic
(
const
Point
&
rPoint
,
const
MapMode
&
rMapMode
)
const
Point
SvxAccessibleTextEditViewAdapter
::
PixelToLogic
(
const
Point
&
rPoint
,
const
MapMode
&
rMapMode
)
const
{
{
DBG_ASSERT
(
m
r
ViewForwarder
,
"SvxAccessibleTextEditViewAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
ViewForwarder
,
"SvxAccessibleTextEditViewAdapter: no forwarder"
);
return
m
r
ViewForwarder
->
PixelToLogic
(
rPoint
,
rMapMode
);
return
m
p
ViewForwarder
->
PixelToLogic
(
rPoint
,
rMapMode
);
}
}
sal_Bool
SvxAccessibleTextEditViewAdapter
::
GetSelection
(
ESelection
&
rSel
)
const
sal_Bool
SvxAccessibleTextEditViewAdapter
::
GetSelection
(
ESelection
&
rSel
)
const
{
{
DBG_ASSERT
(
m
r
ViewForwarder
,
"SvxAccessibleTextEditViewAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
ViewForwarder
,
"SvxAccessibleTextEditViewAdapter: no forwarder"
);
ESelection
aSelection
;
ESelection
aSelection
;
if
(
!
m
r
ViewForwarder
->
GetSelection
(
aSelection
)
)
if
(
!
m
p
ViewForwarder
->
GetSelection
(
aSelection
)
)
return
sal_False
;
return
sal_False
;
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aEndIndex
;
SvxAccessibleTextIndex
aEndIndex
;
aStartIndex
.
SetEEIndex
(
aSelection
.
nStartPara
,
aSelection
.
nStartPos
,
*
m
r
TextForwarder
);
aStartIndex
.
SetEEIndex
(
aSelection
.
nStartPara
,
aSelection
.
nStartPos
,
*
m
p
TextForwarder
);
aEndIndex
.
SetEEIndex
(
aSelection
.
nEndPara
,
aSelection
.
nEndPos
,
*
m
r
TextForwarder
);
aEndIndex
.
SetEEIndex
(
aSelection
.
nEndPara
,
aSelection
.
nEndPos
,
*
m
p
TextForwarder
);
DBG_ASSERT
(
aStartIndex
.
GetIndex
()
>=
0
&&
aStartIndex
.
GetIndex
()
<=
USHRT_MAX
&&
DBG_ASSERT
(
aStartIndex
.
GetIndex
()
>=
0
&&
aStartIndex
.
GetIndex
()
<=
USHRT_MAX
&&
aEndIndex
.
GetIndex
()
>=
0
&&
aEndIndex
.
GetIndex
()
<=
USHRT_MAX
,
aEndIndex
.
GetIndex
()
>=
0
&&
aEndIndex
.
GetIndex
()
<=
USHRT_MAX
,
...
@@ -1243,43 +1245,43 @@ sal_Bool SvxAccessibleTextEditViewAdapter::GetSelection( ESelection& rSel ) cons
...
@@ -1243,43 +1245,43 @@ sal_Bool SvxAccessibleTextEditViewAdapter::GetSelection( ESelection& rSel ) cons
sal_Bool
SvxAccessibleTextEditViewAdapter
::
SetSelection
(
const
ESelection
&
rSel
)
sal_Bool
SvxAccessibleTextEditViewAdapter
::
SetSelection
(
const
ESelection
&
rSel
)
{
{
DBG_ASSERT
(
m
r
ViewForwarder
,
"SvxAccessibleTextEditViewAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
ViewForwarder
,
"SvxAccessibleTextEditViewAdapter: no forwarder"
);
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aStartIndex
;
SvxAccessibleTextIndex
aEndIndex
;
SvxAccessibleTextIndex
aEndIndex
;
aStartIndex
.
SetIndex
(
rSel
.
nStartPara
,
rSel
.
nStartPos
,
*
m
r
TextForwarder
);
aStartIndex
.
SetIndex
(
rSel
.
nStartPara
,
rSel
.
nStartPos
,
*
m
p
TextForwarder
);
aEndIndex
.
SetIndex
(
rSel
.
nEndPara
,
rSel
.
nEndPos
,
*
m
r
TextForwarder
);
aEndIndex
.
SetIndex
(
rSel
.
nEndPara
,
rSel
.
nEndPos
,
*
m
p
TextForwarder
);
return
m
r
ViewForwarder
->
SetSelection
(
MakeEESelection
(
aStartIndex
,
aEndIndex
)
);
return
m
p
ViewForwarder
->
SetSelection
(
MakeEESelection
(
aStartIndex
,
aEndIndex
)
);
}
}
sal_Bool
SvxAccessibleTextEditViewAdapter
::
Copy
()
sal_Bool
SvxAccessibleTextEditViewAdapter
::
Copy
()
{
{
DBG_ASSERT
(
m
r
ViewForwarder
,
"SvxAccessibleTextEditViewAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
ViewForwarder
,
"SvxAccessibleTextEditViewAdapter: no forwarder"
);
return
m
r
ViewForwarder
->
Copy
();
return
m
p
ViewForwarder
->
Copy
();
}
}
sal_Bool
SvxAccessibleTextEditViewAdapter
::
Cut
()
sal_Bool
SvxAccessibleTextEditViewAdapter
::
Cut
()
{
{
DBG_ASSERT
(
m
r
ViewForwarder
,
"SvxAccessibleTextEditViewAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
ViewForwarder
,
"SvxAccessibleTextEditViewAdapter: no forwarder"
);
return
m
r
ViewForwarder
->
Cut
();
return
m
p
ViewForwarder
->
Cut
();
}
}
sal_Bool
SvxAccessibleTextEditViewAdapter
::
Paste
()
sal_Bool
SvxAccessibleTextEditViewAdapter
::
Paste
()
{
{
DBG_ASSERT
(
m
r
ViewForwarder
,
"SvxAccessibleTextEditViewAdapter: no forwarder"
);
DBG_ASSERT
(
m
p
ViewForwarder
,
"SvxAccessibleTextEditViewAdapter: no forwarder"
);
return
m
r
ViewForwarder
->
Paste
();
return
m
p
ViewForwarder
->
Paste
();
}
}
void
SvxAccessibleTextEditViewAdapter
::
SetForwarder
(
SvxEditViewForwarder
&
rForwarder
,
void
SvxAccessibleTextEditViewAdapter
::
SetForwarder
(
SvxEditViewForwarder
&
rForwarder
,
SvxAccessibleTextAdapter
&
rTextForwarder
)
SvxAccessibleTextAdapter
&
rTextForwarder
)
{
{
m
r
ViewForwarder
=
&
rForwarder
;
m
p
ViewForwarder
=
&
rForwarder
;
m
r
TextForwarder
=
&
rTextForwarder
;
m
p
TextForwarder
=
&
rTextForwarder
;
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
include/editeng/unoedprx.hxx
Dosyayı görüntüle @
1c71cef7
...
@@ -106,7 +106,7 @@ public:
...
@@ -106,7 +106,7 @@ public:
sal_Bool
IsEditable
(
const
ESelection
&
rSelection
);
sal_Bool
IsEditable
(
const
ESelection
&
rSelection
);
private
:
private
:
SvxTextForwarder
*
m
r
TextForwarder
;
SvxTextForwarder
*
m
p
TextForwarder
;
};
};
class
SvxAccessibleTextEditViewAdapter
:
public
SvxEditViewForwarder
class
SvxAccessibleTextEditViewAdapter
:
public
SvxEditViewForwarder
...
@@ -132,8 +132,8 @@ public:
...
@@ -132,8 +132,8 @@ public:
void
SetForwarder
(
SvxEditViewForwarder
&
,
SvxAccessibleTextAdapter
&
);
void
SetForwarder
(
SvxEditViewForwarder
&
,
SvxAccessibleTextAdapter
&
);
private
:
private
:
SvxEditViewForwarder
*
m
r
ViewForwarder
;
SvxEditViewForwarder
*
m
p
ViewForwarder
;
SvxAccessibleTextAdapter
*
m
r
TextForwarder
;
SvxAccessibleTextAdapter
*
m
p
TextForwarder
;
};
};
class
EDITENG_DLLPUBLIC
SvxEditSourceAdapter
:
public
SvxEditSource
class
EDITENG_DLLPUBLIC
SvxEditSourceAdapter
:
public
SvxEditSource
...
...
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