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
912fd109
Kaydet (Commit)
912fd109
authored
May 16, 2018
tarafından
Christian Lohmaier
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
android janitor... convert chained ifs to switch statement
Change-Id: I9929bd077a33349a6e57c3a427df7e77b3007c88
üst
bf07813f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
24 deletions
+36
-24
InvalidationHandler.java
.../source/src/java/org/libreoffice/InvalidationHandler.java
+12
-8
LOKitThread.java
android/source/src/java/org/libreoffice/LOKitThread.java
+10
-6
LOKitTileProvider.java
...id/source/src/java/org/libreoffice/LOKitTileProvider.java
+14
-10
No files found.
android/source/src/java/org/libreoffice/InvalidationHandler.java
Dosyayı görüntüle @
912fd109
...
...
@@ -616,14 +616,18 @@ public class InvalidationHandler implements Document.MessageCallback, Office.Mes
* Handle a transition to OverlayState.TRANSITION state.
*/
private
void
handleTransitionState
(
OverlayState
previous
)
{
if
(
previous
==
OverlayState
.
SELECTION
)
{
mDocumentOverlay
.
hideHandle
(
SelectionHandle
.
HandleType
.
START
);
mDocumentOverlay
.
hideHandle
(
SelectionHandle
.
HandleType
.
END
);
mDocumentOverlay
.
hideSelections
();
}
else
if
(
previous
==
OverlayState
.
CURSOR
)
{
mDocumentOverlay
.
hideHandle
(
SelectionHandle
.
HandleType
.
MIDDLE
);
}
else
if
(
previous
==
OverlayState
.
GRAPHIC_SELECTION
)
{
mDocumentOverlay
.
hideGraphicSelection
();
switch
(
previous
)
{
case
SELECTION:
mDocumentOverlay
.
hideHandle
(
SelectionHandle
.
HandleType
.
START
);
mDocumentOverlay
.
hideHandle
(
SelectionHandle
.
HandleType
.
END
);
mDocumentOverlay
.
hideSelections
();
break
;
case
CURSOR:
mDocumentOverlay
.
hideHandle
(
SelectionHandle
.
HandleType
.
MIDDLE
);
break
;
case
GRAPHIC_SELECTION:
mDocumentOverlay
.
hideGraphicSelection
();
break
;
}
}
...
...
android/source/src/java/org/libreoffice/LOKitThread.java
Dosyayı görüntüle @
912fd109
...
...
@@ -392,12 +392,16 @@ class LOKitThread extends Thread {
* Request a change of the handle position.
*/
private
void
changeHandlePosition
(
SelectionHandle
.
HandleType
handleType
,
PointF
documentCoordinate
)
{
if
(
handleType
==
SelectionHandle
.
HandleType
.
MIDDLE
)
{
mTileProvider
.
setTextSelectionReset
(
documentCoordinate
);
}
else
if
(
handleType
==
SelectionHandle
.
HandleType
.
START
)
{
mTileProvider
.
setTextSelectionStart
(
documentCoordinate
);
}
else
if
(
handleType
==
SelectionHandle
.
HandleType
.
END
)
{
mTileProvider
.
setTextSelectionEnd
(
documentCoordinate
);
switch
(
handleType
)
{
case
MIDDLE:
mTileProvider
.
setTextSelectionReset
(
documentCoordinate
);
break
;
case
START:
mTileProvider
.
setTextSelectionStart
(
documentCoordinate
);
break
;
case
END:
mTileProvider
.
setTextSelectionEnd
(
documentCoordinate
);
break
;
}
}
...
...
android/source/src/java/org/libreoffice/LOKitTileProvider.java
Dosyayı görüntüle @
912fd109
...
...
@@ -540,16 +540,20 @@ class LOKitTileProvider implements TileProvider {
*/
@Override
public
void
sendKeyEvent
(
KeyEvent
keyEvent
)
{
if
(
keyEvent
.
getAction
()
==
KeyEvent
.
ACTION_MULTIPLE
)
{
String
keyString
=
keyEvent
.
getCharacters
();
for
(
int
i
=
0
;
i
<
keyString
.
length
();
i
++)
{
int
codePoint
=
keyString
.
codePointAt
(
i
);
mDocument
.
postKeyEvent
(
Document
.
KEY_EVENT_PRESS
,
codePoint
,
getKeyCode
(
keyEvent
));
}
}
else
if
(
keyEvent
.
getAction
()
==
KeyEvent
.
ACTION_DOWN
)
{
mDocument
.
postKeyEvent
(
Document
.
KEY_EVENT_PRESS
,
getCharCode
(
keyEvent
),
getKeyCode
(
keyEvent
));
}
else
if
(
keyEvent
.
getAction
()
==
KeyEvent
.
ACTION_UP
)
{
mDocument
.
postKeyEvent
(
Document
.
KEY_EVENT_RELEASE
,
getCharCode
(
keyEvent
),
getKeyCode
(
keyEvent
));
switch
(
keyEvent
.
getAction
())
{
case
KeyEvent
.
ACTION_MULTIPLE
:
String
keyString
=
keyEvent
.
getCharacters
();
for
(
int
i
=
0
;
i
<
keyString
.
length
();
i
++)
{
int
codePoint
=
keyString
.
codePointAt
(
i
);
mDocument
.
postKeyEvent
(
Document
.
KEY_EVENT_PRESS
,
codePoint
,
getKeyCode
(
keyEvent
));
}
break
;
case
KeyEvent
.
ACTION_DOWN
:
mDocument
.
postKeyEvent
(
Document
.
KEY_EVENT_PRESS
,
getCharCode
(
keyEvent
),
getKeyCode
(
keyEvent
));
break
;
case
KeyEvent
.
ACTION_UP
:
mDocument
.
postKeyEvent
(
Document
.
KEY_EVENT_RELEASE
,
getCharCode
(
keyEvent
),
getKeyCode
(
keyEvent
));
break
;
}
}
...
...
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