[Libreoffice-commits] core.git: 5 commits - desktop/Library_sofficeapp.mk desktop/source sw/source vcl/source
Tor Lillqvist
tml at collabora.com
Tue Feb 3 01:29:27 PST 2015
desktop/Library_sofficeapp.mk | 7 ++++---
desktop/source/lib/init.cxx | 23 ++++++++++++++++++-----
sw/source/core/crsr/crsrsh.cxx | 6 ++++--
sw/source/core/crsr/viscrs.cxx | 7 +++++--
vcl/source/window/dialog.cxx | 24 ++++--------------------
5 files changed, 35 insertions(+), 32 deletions(-)
New commits:
commit 2fb6562be2ca24424dcd8ba1832fd106fd9dfb99
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Feb 3 10:22:10 2015 +0100
Build the applicable LibreOfficeKit bits for iOS, too
Change-Id: Ib6b4f7d5323ea7e94c7b535c68bb6e0af2c49ffa
diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index ee92f7a..1f4eb1f 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -106,11 +106,12 @@ $(eval $(call gb_Library_add_libs,sofficeapp,\
))
endif
-# liblibreoffice bits
-ifeq ($(OS),ANDROID)
+# LibreOfficeKit bits
+ifneq ($(filter $(OS),ANDROID IOS),)
$(eval $(call gb_Library_add_exception_objects,sofficeapp,\
desktop/source/lib/init \
- desktop/source/lib/lokandroid \
+ $(if $(filter $(OS),ANDROID), \
+ desktop/source/lib/lokandroid) \
))
else
ifeq ($(GUIBASE),unx)
commit f70467ab48397e31db39daf946f092f9aec732cd
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Feb 3 10:18:01 2015 +0100
Don't call touch_ui_*() API that are no-ops anyway
Theiry implementations were empty both for iOS (well,
TiledLibreOffice, our iOS test viewer app, anyway) and Android. Part
of work to make TiledLibreOffice use LibreOffieKit instead of
<touch/touch.h> and the older Writer-specific tiled rendering API.
Change-Id: I602a1ebd58ec2c8d6b2d170d65e157d91e0bf521
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 980c278..73ed40e 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -2115,7 +2115,8 @@ void SwCrsrShell::ShowCrsr()
m_bSVCrsrVis = true;
m_pCurCrsr->SetShowTxtInputFldOverlay( true );
#if defined(ANDROID) || defined(IOS)
- touch_ui_show_keyboard();
+ // This was dummied out both for Android and for TiledLibreOffice (iOS) anyway
+ // touch_ui_show_keyboard();
#endif
UpdateCrsr();
}
@@ -2131,7 +2132,8 @@ void SwCrsrShell::HideCrsr()
m_pCurCrsr->SetShowTxtInputFldOverlay( false );
m_pVisCrsr->Hide();
#if defined(ANDROID) || defined(IOS)
- touch_ui_hide_keyboard();
+ // This was dummied out both for Android and for TiledLibreOffice (iOS) anyway
+ // touch_ui_hide_keyboard();
#endif
}
}
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 9489cba..35b60a3a 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -331,12 +331,15 @@ void SwSelPaintRects::Show()
#endif
}
// GetShell returns a SwCrsrShell which actually is a SwWrtShell
- touch_ui_selection_start(MLOSelectionText, pWrtShell, rects, size(), NULL);
+
+ // touch_ui_selection_start() was dummy both in TiledLibreOffice (iOS) and for Android
+ // touch_ui_selection_start(MLOSelectionText, pWrtShell, rects, size(), NULL);
}
}
else
{
- touch_ui_selection_none();
+ // touch_ui_selection_none was dummy both in TiledLibreOffice (iOS) and for Android
+ // touch_ui_selection_none();
}
#endif
}
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index a5b9b8f..78a95f0 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -868,26 +868,10 @@ short Dialog::Execute()
break;
}
- MLODialogResult result = touch_ui_dialog_modal(kind, ImplGetDialogText(this).getStr());
-
- switch (result)
- {
- case MLODialogOK:
- return RET_OK;
- case MLODialogCancel:
- return RET_CANCEL;
- case MLODialogNo:
- return RET_NO;
- case MLODialogYes:
- return RET_YES;
- case MLODialogRetry:
- return RET_RETRY;
- case MLODialogIgnore:
- return RET_IGNORE;
- default:
- SAL_WARN("vcl", "Dialog::Execute: Unhandled dialog result %d" << result);
- return RET_OK;
- }
+ // touch_ui_dialog_modal was dummied out both for Android and iOS (well, TiledLibreOffice anyway)
+ // For Android it returned MLODialogOK always, for iOS Cancel. Let's go with OK.
+ // MLODialogResult result = touch_ui_dialog_modal(kind, ImplGetDialogText(this).getStr());
+ return RET_OK;
#endif
}
commit 607cc768a7f2e5e6fb34d1b1687e480e7a9e55f2
Author: Tor Lillqvist <tml at collabora.com>
Date: Mon Feb 2 16:02:36 2015 +0100
Make the handling of the pAppPath==NULL case actually work
Change-Id: I8b185ad37e1db3262c2533c0146e4fe7fb3ef3ea
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 4f2d1ed..498ef80 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -770,8 +770,11 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath)
}
else
{
+ // Fun conversion dance back and forth between URLs and system paths...
+ OUString aAppURL;
::osl::Module::getUrlFromAddress( reinterpret_cast< oslGenericFunction >(lo_initialize),
- aAppPath);
+ aAppURL);
+ osl::FileBase::getSystemPathFromFileURL( aAppURL, aAppPath );
}
OUString aAppURL;
commit 0d35b7aee38046f7ffba79911d9c669f78ab7c0e
Author: Tor Lillqvist <tml at collabora.com>
Date: Mon Feb 2 16:01:48 2015 +0100
We (try to) handle the pAppPath==NULL case below anyway
Change-Id: I37b616b3b509c82551d9690c0313e09063a758bc
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 0072ecc..4f2d1ed 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -763,9 +763,6 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath)
if (bInitialized)
return 1;
- if (!pAppPath)
- return 0;
-
OUString aAppPath;
if (pAppPath)
{
commit 831ab93fa40160ee46a95b7604d64098b177c8dd
Author: Tor Lillqvist <tml at collabora.com>
Date: Mon Feb 2 15:22:52 2015 +0100
libreofficekit_hook must be exported on iOS for dlsym() to find it
Change-Id: I824e977e99e8889e5cb69403feb0f1d5e1d0cc31
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 154a8f5a..0072ecc 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -847,7 +847,20 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath)
return bInitialized;
}
-SAL_DLLPUBLIC_EXPORT LibreOfficeKit *libreofficekit_hook(const char* install_path)
+// Undo our clever trick of having SAL_DLLPUBLIC_EXPORT actually not
+// meaning what is says in for the DISABLE_DYNLOADING case. See
+// <sal/types.h>. Normally, when building just one big dylib (Android)
+// or executable (iOS), most of our "public" symbols don't need to be
+// visible outside that resulting dylib/executable. But
+// libreofficekit_hook must be exported for dlsym() to find it,
+// though, at least on iOS.
+
+#if defined(__GNUC__) && defined(HAVE_GCC_VISIBILITY_FEATURE) && defined(DISABLE_DYNLOADING)
+__attribute__ ((visibility("default")))
+#else
+SAL_DLLPUBLIC_EXPORT
+#endif
+LibreOfficeKit *libreofficekit_hook(const char* install_path)
{
if (!gImpl)
{
More information about the Libreoffice-commits
mailing list