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
9d0950d5
Kaydet (Commit)
9d0950d5
authored
Şub 19, 2015
tarafından
Tomaž Vajngerl
Kaydeden (comit)
Miklos Vajna
Şub 23, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
android: make invalidations more readable - extract to own methods
Change-Id: I676475c028d446ff5f31a11990a09da54245f9ef
üst
fe4f1194
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
20 deletions
+28
-20
LOKitTileProvider.java
...OAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
+28
-20
No files found.
android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
Dosyayı görüntüle @
9d0950d5
...
...
@@ -398,28 +398,36 @@ public class LOKitTileProvider implements TileProvider, Document.MessageCallback
}
switch
(
signalNumber
)
{
case
Document
.
CALLBACK_INVALIDATE_TILES
:
{
RectF
rect
=
convertCallbackMessageStringToRectF
(
payload
);
if
(
rect
!=
null
)
{
tileInvalidationCallback
.
invalidate
(
rect
);
}
case
Document
.
CALLBACK_INVALIDATE_TILES
:
invalidateTiles
(
payload
);
break
;
}
case
Document
.
CALLBACK_INVALIDATE_VISIBLE_CURSOR
:
{
Log
.
i
(
LOGTAG
,
"Invalidate visible cursor: "
+
payload
);
RectF
rect
=
convertCallbackMessageStringToRectF
(
payload
);
if
(
rect
!=
null
)
{
RectF
underSelection
=
new
RectF
(
rect
.
centerX
(),
rect
.
bottom
,
rect
.
centerX
(),
rect
.
bottom
);
TextSelection
textSelection
=
LibreOfficeMainActivity
.
mAppContext
.
getTextSelection
();
textSelection
.
positionHandle
(
TextSelectionHandle
.
HandleType
.
MIDDLE
,
underSelection
);
textSelection
.
showHandle
(
TextSelectionHandle
.
HandleType
.
MIDDLE
);
TextCursorLayer
textCursorLayer
=
LibreOfficeMainActivity
.
mAppContext
.
getTextCursorLayer
();
textCursorLayer
.
positionCursor
(
rect
);
textCursorLayer
.
showCursor
();
}
case
Document
.
CALLBACK_INVALIDATE_VISIBLE_CURSOR
:
invalidateCursor
(
payload
);
break
;
}
}
}
private
void
invalidateCursor
(
String
payload
)
{
RectF
rect
=
convertCallbackMessageStringToRectF
(
payload
);
if
(
rect
!=
null
)
{
RectF
underSelection
=
new
RectF
(
rect
.
centerX
(),
rect
.
bottom
,
rect
.
centerX
(),
rect
.
bottom
);
TextSelection
textSelection
=
LibreOfficeMainActivity
.
mAppContext
.
getTextSelection
();
textSelection
.
positionHandle
(
TextSelectionHandle
.
HandleType
.
MIDDLE
,
underSelection
);
textSelection
.
showHandle
(
TextSelectionHandle
.
HandleType
.
MIDDLE
);
TextCursorLayer
textCursorLayer
=
LibreOfficeMainActivity
.
mAppContext
.
getTextCursorLayer
();
textCursorLayer
.
positionCursor
(
rect
);
textCursorLayer
.
showCursor
();
}
}
private
void
invalidateTiles
(
String
payload
)
{
if
(
tileInvalidationCallback
==
null
)
{
return
;
}
RectF
rect
=
convertCallbackMessageStringToRectF
(
payload
);
if
(
rect
!=
null
)
{
tileInvalidationCallback
.
invalidate
(
rect
);
}
}
}
...
...
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