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
5d7d4e78
Kaydet (Commit)
5d7d4e78
authored
Ock 24, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
coverity#1157769 Logically dead code
Change-Id: I48b83a8fba756ad44f9b823357f3fdd42a297430
üst
a4bcd0f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
16 deletions
+11
-16
edit.cxx
vcl/source/control/edit.cxx
+11
-16
No files found.
vcl/source/control/edit.cxx
Dosyayı görüntüle @
5d7d4e78
...
...
@@ -528,8 +528,7 @@ void Edit::ImplRepaint(bool bLayout)
return
;
OUString
aText
=
ImplGetText
();
sal_Int32
nStart
=
0
;
sal_Int32
nEnd
=
aText
.
getLength
();
sal_Int32
nLen
=
aText
.
getLength
();
sal_Int32
nDXBuffer
[
256
];
sal_Int32
*
pDXBuffer
=
NULL
;
...
...
@@ -543,7 +542,7 @@ void Edit::ImplRepaint(bool bLayout)
pDX
=
pDXBuffer
;
}
GetCaretPositions
(
aText
,
pDX
,
nStart
,
nEnd
);
GetCaretPositions
(
aText
,
pDX
,
0
,
nLen
);
}
long
nTH
=
GetTextHeight
();
...
...
@@ -551,16 +550,14 @@ void Edit::ImplRepaint(bool bLayout)
if
(
bLayout
)
{
long
nPos
=
nStart
?
pDX
[
2
*
nStart
]
:
0
;
aPos
.
X
()
=
nPos
+
mnXOffset
+
ImplGetExtraOffset
();
aPos
.
X
()
=
mnXOffset
+
ImplGetExtraOffset
();
MetricVector
*
pVector
=
&
mpControlData
->
mpLayoutData
->
m_aUnicodeBoundRects
;
OUString
*
pDisplayText
=
&
mpControlData
->
mpLayoutData
->
m_aDisplayText
;
DrawText
(
aPos
,
aText
,
nStart
,
nEnd
-
nStart
,
pVector
,
pDisplayText
);
DrawText
(
aPos
,
aText
,
0
,
nLen
,
pVector
,
pDisplayText
);
if
(
pDXBuffer
)
delete
[]
pDXBuffer
;
delete
[]
pDXBuffer
;
return
;
}
...
...
@@ -600,15 +597,14 @@ void Edit::ImplRepaint(bool bLayout)
bool
bDrawSelection
=
maSelection
.
Len
()
&&
(
HasFocus
()
||
(
GetStyle
()
&
WB_NOHIDESELECTION
)
||
mbActivePopup
);
long
nPos
=
nStart
?
pDX
[
2
*
nStart
]
:
0
;
aPos
.
X
()
=
nPos
+
mnXOffset
+
ImplGetExtraOffset
();
aPos
.
X
()
=
mnXOffset
+
ImplGetExtraOffset
();
if
(
bPaintPlaceholderText
)
{
DrawText
(
aPos
,
maPlaceholderText
);
}
else
if
(
!
bDrawSelection
&&
!
mpIMEInfos
)
{
DrawText
(
aPos
,
aText
,
nStart
,
nEnd
-
nStart
);
DrawText
(
aPos
,
aText
,
0
,
nLen
);
}
else
{
...
...
@@ -660,13 +656,13 @@ void Edit::ImplRepaint(bool bLayout)
else
SetTextFillColor
(
IsControlBackground
()
?
GetControlBackground
()
:
rStyleSettings
.
GetFieldColor
()
);
}
DrawText
(
aPos
,
aText
,
nStart
,
nEnd
-
nStart
);
DrawText
(
aPos
,
aText
,
0
,
nLen
);
// draw highlighted text
SetClipRegion
(
aHiglightClipRegion
);
SetTextColor
(
rStyleSettings
.
GetHighlightTextColor
()
);
SetTextFillColor
(
rStyleSettings
.
GetHighlightColor
()
);
DrawText
(
aPos
,
aText
,
nStart
,
nEnd
-
nStart
);
DrawText
(
aPos
,
aText
,
0
,
nLen
);
// if IME info exists loop over portions and output different font attributes
if
(
mpIMEInfos
&&
mpIMEInfos
->
pAttribs
)
...
...
@@ -730,7 +726,7 @@ void Edit::ImplRepaint(bool bLayout)
SetTextColor
(
Color
(
COL_LIGHTGRAY
)
);
SetClipRegion
(
aClip
);
DrawText
(
aPos
,
aText
,
nStart
,
nEnd
-
nStart
);
DrawText
(
aPos
,
aText
,
0
,
nLen
);
}
}
}
...
...
@@ -743,8 +739,7 @@ void Edit::ImplRepaint(bool bLayout)
if
(
bVisCursor
&&
(
!
mpIMEInfos
||
mpIMEInfos
->
bCursor
)
)
pCursor
->
Show
();
if
(
pDXBuffer
)
delete
[]
pDXBuffer
;
delete
[]
pDXBuffer
;
}
// -----------------------------------------------------------------------
...
...
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