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
12b1ca32
Kaydet (Commit)
12b1ca32
authored
Eki 13, 2013
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Hacking on iOS keyboard handling
Change-Id: I0d842cc951cb5a3e7e990f835f541ccf1bd89df6
üst
cbae2baa
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
6 deletions
+52
-6
touch.h
include/touch/touch.h
+1
-0
AppDelegate.m
ios/experimental/LibreOffice/LibreOffice/AppDelegate.m
+21
-0
View.m
ios/experimental/LibreOffice/LibreOffice/View.m
+0
-2
crsrsh.cxx
sw/source/core/crsr/crsrsh.cxx
+22
-2
androidinst.cxx
vcl/android/androidinst.cxx
+8
-2
No files found.
include/touch/touch.h
Dosyayı görüntüle @
12b1ca32
...
@@ -39,6 +39,7 @@ void touch_ui_damaged(int minX, int minY, int width, int height);
...
@@ -39,6 +39,7 @@ void touch_ui_damaged(int minX, int minY, int width, int height);
void
touch_ui_show_keyboard
();
void
touch_ui_show_keyboard
();
void
touch_ui_hide_keyboard
();
void
touch_ui_hide_keyboard
();
bool
touch_ui_keyboard_visible
();
// 2) Those implmented in the lower layers to be called by the upper
// 2) Those implmented in the lower layers to be called by the upper
// layer, in cases where we don't want to include a bunch of the
// layer, in cases where we don't want to include a bunch of the
...
...
ios/experimental/LibreOffice/LibreOffice/AppDelegate.m
Dosyayı görüntüle @
12b1ca32
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
#import "lo.h"
#import "lo.h"
static
View
*
theView
;
static
View
*
theView
;
static
BOOL
keyboardShows
;
@implementation
AppDelegate
@implementation
AppDelegate
...
@@ -78,6 +79,8 @@ static View *theView;
...
@@ -78,6 +79,8 @@ static View *theView;
NSThread
*
thread
=
[[
NSThread
alloc
]
initWithTarget
:
self
NSThread
*
thread
=
[[
NSThread
alloc
]
initWithTarget
:
self
selector
:
@selector
(
threadMainMethod
:
)
selector
:
@selector
(
threadMainMethod
:
)
object:
nil
];
object:
nil
];
keyboardShows
=
NO
;
[
thread
start
];
[
thread
start
];
return
YES
;
return
YES
;
...
@@ -158,6 +161,8 @@ static View *theView;
...
@@ -158,6 +161,8 @@ static View *theView;
NSLog
(
@"keyboardWillShow: frame:%dx%d@(%d,%d)"
,
NSLog
(
@"keyboardWillShow: frame:%dx%d@(%d,%d)"
,
(
int
)
frameEnd
.
size
.
width
,
(
int
)
frameEnd
.
size
.
height
,
(
int
)
frameEnd
.
size
.
width
,
(
int
)
frameEnd
.
size
.
height
,
(
int
)
frameEnd
.
origin
.
x
,
(
int
)
frameEnd
.
origin
.
y
);
(
int
)
frameEnd
.
origin
.
x
,
(
int
)
frameEnd
.
origin
.
y
);
keyboardShows
=
YES
;
}
}
-
(
void
)
keyboardDidHide
:(
NSNotification
*
)
note
-
(
void
)
keyboardDidHide
:(
NSNotification
*
)
note
...
@@ -166,6 +171,8 @@ static View *theView;
...
@@ -166,6 +171,8 @@ static View *theView;
NSLog
(
@"keyboardDidHide"
);
NSLog
(
@"keyboardDidHide"
);
keyboardShows
=
NO
;
touch_lo_keyboard_did_hide
();
touch_lo_keyboard_did_hide
();
}
}
...
@@ -186,6 +193,15 @@ void touch_ui_damaged(int minX, int minY, int width, int height)
...
@@ -186,6 +193,15 @@ void touch_ui_damaged(int minX, int minY, int width, int height)
void
touch_ui_show_keyboard
()
void
touch_ui_show_keyboard
()
{
{
#if 0
// Horrible hack
static bool beenHere = false;
if (!beenHere) {
beenHere = true;
touch_lo_keyboard_did_hide();
return;
}
#endif
dispatch_async
(
dispatch_get_main_queue
(),
^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
theView
->
textView
becomeFirstResponder
];
[
theView
->
textView
becomeFirstResponder
];
});
});
...
@@ -198,4 +214,9 @@ void touch_ui_hide_keyboard()
...
@@ -198,4 +214,9 @@ void touch_ui_hide_keyboard()
});
});
}
}
bool
touch_ui_keyboard_visible
()
{
return
keyboardShows
;
}
// vim:set shiftwidth=4 softtabstop=4 expandtab:
// vim:set shiftwidth=4 softtabstop=4 expandtab:
ios/experimental/LibreOffice/LibreOffice/View.m
Dosyayı görüntüle @
12b1ca32
...
@@ -54,8 +54,6 @@
...
@@ -54,8 +54,6 @@
// NSLog(@"tapGesture: at: (%d,%d)", (int)location.x, (int)location.y);
// NSLog(@"tapGesture: at: (%d,%d)", (int)location.x, (int)location.y);
touch_lo_tap
(
location
.
x
,
location
.
y
);
touch_lo_tap
(
location
.
x
,
location
.
y
);
[
self
->
textView
becomeFirstResponder
];
}
else
{
}
else
{
// NSLog(@"tapGesture: %@", gestureRecognizer);
// NSLog(@"tapGesture: %@", gestureRecognizer);
}
}
...
...
sw/source/core/crsr/crsrsh.cxx
Dosyayı görüntüle @
12b1ca32
...
@@ -61,6 +61,10 @@
...
@@ -61,6 +61,10 @@
#include <globals.hrc>
#include <globals.hrc>
#include <comcore.hrc>
#include <comcore.hrc>
#if defined(ANDROID) || defined(IOS)
#include <touch/touch.h>
#endif
using
namespace
com
::
sun
::
star
;
using
namespace
com
::
sun
::
star
;
using
namespace
util
;
using
namespace
util
;
...
@@ -2030,6 +2034,9 @@ void SwCrsrShell::ShowCrsr()
...
@@ -2030,6 +2034,9 @@ void SwCrsrShell::ShowCrsr()
if
(
!
m_bBasicHideCrsr
)
if
(
!
m_bBasicHideCrsr
)
{
{
m_bSVCrsrVis
=
sal_True
;
m_bSVCrsrVis
=
sal_True
;
#if defined(ANDROID) || defined(IOS)
touch_ui_show_keyboard
();
#endif
UpdateCrsr
();
UpdateCrsr
();
}
}
}
}
...
@@ -2042,6 +2049,9 @@ void SwCrsrShell::HideCrsr()
...
@@ -2042,6 +2049,9 @@ void SwCrsrShell::HideCrsr()
// possibly reverse selected areas!!
// possibly reverse selected areas!!
SET_CURR_SHELL
(
this
);
SET_CURR_SHELL
(
this
);
m_pVisCrsr
->
Hide
();
m_pVisCrsr
->
Hide
();
#if defined(ANDROID) || defined(IOS)
touch_ui_hide_keyboard
();
#endif
}
}
}
}
...
@@ -2510,7 +2520,12 @@ SwCrsrShell::SwCrsrShell( SwCrsrShell& rShell, Window *pInitWin )
...
@@ -2510,7 +2520,12 @@ SwCrsrShell::SwCrsrShell( SwCrsrShell& rShell, Window *pInitWin )
m_bAllProtect
=
m_bVisPortChgd
=
m_bChgCallFlag
=
m_bInCMvVisportChgd
=
m_bAllProtect
=
m_bVisPortChgd
=
m_bChgCallFlag
=
m_bInCMvVisportChgd
=
m_bGCAttr
=
m_bIgnoreReadonly
=
m_bSelTblCells
=
m_bBasicHideCrsr
=
m_bGCAttr
=
m_bIgnoreReadonly
=
m_bSelTblCells
=
m_bBasicHideCrsr
=
m_bOverwriteCrsr
=
sal_False
;
m_bOverwriteCrsr
=
sal_False
;
m_bCallChgLnk
=
m_bHasFocus
=
m_bSVCrsrVis
=
m_bAutoUpdateCells
=
sal_True
;
m_bCallChgLnk
=
m_bHasFocus
=
m_bAutoUpdateCells
=
sal_True
;
#if defined(ANDROID) || defined(IOS)
m_bSVCrsrVis
=
touch_ui_keyboard_visible
();
#else
m_bSVCrsrVis
=
sal_True
;
#endif
m_bSetCrsrInReadOnly
=
sal_True
;
m_bSetCrsrInReadOnly
=
sal_True
;
m_pVisCrsr
=
new
SwVisCrsr
(
this
);
m_pVisCrsr
=
new
SwVisCrsr
(
this
);
m_bMacroExecAllowed
=
rShell
.
IsMacroExecAllowed
();
m_bMacroExecAllowed
=
rShell
.
IsMacroExecAllowed
();
...
@@ -2542,7 +2557,12 @@ SwCrsrShell::SwCrsrShell( SwDoc& rDoc, Window *pInitWin,
...
@@ -2542,7 +2557,12 @@ SwCrsrShell::SwCrsrShell( SwDoc& rDoc, Window *pInitWin,
m_bAllProtect
=
m_bVisPortChgd
=
m_bChgCallFlag
=
m_bInCMvVisportChgd
=
m_bAllProtect
=
m_bVisPortChgd
=
m_bChgCallFlag
=
m_bInCMvVisportChgd
=
m_bGCAttr
=
m_bIgnoreReadonly
=
m_bSelTblCells
=
m_bBasicHideCrsr
=
m_bGCAttr
=
m_bIgnoreReadonly
=
m_bSelTblCells
=
m_bBasicHideCrsr
=
m_bOverwriteCrsr
=
sal_False
;
m_bOverwriteCrsr
=
sal_False
;
m_bCallChgLnk
=
m_bHasFocus
=
m_bSVCrsrVis
=
m_bAutoUpdateCells
=
sal_True
;
m_bCallChgLnk
=
m_bHasFocus
=
m_bAutoUpdateCells
=
sal_True
;
#if defined(ANDROID) || defined(IOS)
m_bSVCrsrVis
=
touch_ui_keyboard_visible
();
#else
m_bSVCrsrVis
=
sal_True
;
#endif
m_bSetCrsrInReadOnly
=
sal_True
;
m_bSetCrsrInReadOnly
=
sal_True
;
m_pVisCrsr
=
new
SwVisCrsr
(
this
);
m_pVisCrsr
=
new
SwVisCrsr
(
this
);
...
...
vcl/android/androidinst.cxx
Dosyayı görüntüle @
12b1ca32
...
@@ -542,13 +542,19 @@ Java_org_libreoffice_android_AppSupport_scroll(JNIEnv * /* env */,
...
@@ -542,13 +542,19 @@ Java_org_libreoffice_android_AppSupport_scroll(JNIEnv * /* env */,
}
}
extern
"C"
void
extern
"C"
void
lo
_show_keyboard
()
touch_ui
_show_keyboard
()
{
{
}
}
extern
"C"
void
extern
"C"
void
lo
_hide_keyboard
()
touch_ui
_hide_keyboard
()
{
{
}
}
extern
"C"
bool
touch_ui_keyboard_visible
()
{
return
true
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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