[Libreoffice-commits] core.git: 6 commits - configure.ac ios/Executable_LibreOffice.mk ios/experimental oox/source sal/inc sc/source vcl/ios

Tor Lillqvist tml at iki.fi
Thu Apr 18 14:20:26 PDT 2013


 configure.ac                                           |   28 +++--------------
 ios/Executable_LibreOffice.mk                          |    6 ++-
 ios/experimental/LibreOffice/LibreOffice/AppDelegate.m |    6 +++
 ios/experimental/LibreOffice/LibreOffice/View.h        |    3 +
 ios/experimental/LibreOffice/LibreOffice/View.m        |   12 ++++++-
 oox/source/core/xmlfilterbase.cxx                      |    2 -
 sal/inc/osl/detail/ios-bootstrap.h                     |    1 
 sc/source/core/tool/interpr2.cxx                       |    1 
 vcl/ios/iosinst.cxx                                    |   11 ++++++
 9 files changed, 42 insertions(+), 28 deletions(-)

New commits:
commit d933b18fddf2f3f716dede322c3541d7d37bd540
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Apr 18 23:56:23 2013 +0300

    WaE: macro is not used
    
    Change-Id: I93d04ff158ecb1379e8dcf99d6cd154d096f9fd7

diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 5743f1d..a5588af 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -51,7 +51,6 @@
 using namespace formula;
 
 #define SCdEpsilon                1.0E-7
-#define D_TIMEFACTOR              static_cast<double>(::Time::secondPerDay)
 
 //-----------------------------------------------------------------------------
 // Datum und Zeit
commit 0333495fdaba9f018d547368d2551cb432bfbb95
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Apr 18 23:44:51 2013 +0300

    WaE: format specifies type 'int' but the argument has type 'sal_uInt32'
    
    Change-Id: I70f6a46b2195aa28c1a6dcd8c8d7e52fccb22cc3

diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 28d47c2..4cd7665 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -484,7 +484,7 @@ writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const util::DateTime& rTi
     char pStr[200];
     // FIXME: my guess is that precision greater than millisecond in undesirable
     //        (forbidden by the standard???)
-    snprintf( pStr, sizeof( pStr ), "%d-%02d-%02dT%02d:%02d:%02d.%09dZ",
+    snprintf( pStr, sizeof( pStr ), "%d-%02d-%02dT%02d:%02d:%02d.%09" SAL_PRIuUINT32 "Z",
             rTime.Year, rTime.Month, rTime.Day,
             rTime.Hours, rTime.Minutes, rTime.Seconds,
             rTime.NanoSeconds);
commit ef5bd25341eabe44b04a4b64dd5196500a235366
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Apr 18 23:42:53 2013 +0300

    Do build libwpd, libwpg, libcdr, libmspub, libmwaw and libvisio for iOS
    
    Change-Id: I6b69d852bd503ffe07c61fb6f048d5dde28cdbf9

diff --git a/configure.ac b/configure.ac
index d2db9e7..a70bfd2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7151,34 +7151,22 @@ AC_SUBST(SYSTEM_EXPAT)
 dnl ===================================================================
 dnl Check for system libcdr
 dnl ===================================================================
-# libcdr depends on libwpd and libwpg and those are LGPL, publishing empty flags
-if test $_os != iOS; then
-    libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.0 >= 0.0.5])
-fi
+libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.0 >= 0.0.5])
 
 dnl ===================================================================
 dnl Check for system libmspub
 dnl ===================================================================
-# libmspub depends on libwpd and libwpg and those are LGPL, publishing empty flags
-if test $_os != iOS; then
-    libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.0])
-fi
+libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.0])
 
 dnl ===================================================================
 dnl Check for system libmwaw
 dnl ===================================================================
-# libmwaw depends on libwpd that is LGPL, publishing empty flags
-if test $_os != iOS; then
-    libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.1])
-fi
+libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.1])
 
 dnl ===================================================================
 dnl Check for system libvisio
 dnl ===================================================================
-# libvisio depends on libwpd and libwpg and those are LGPL, publishing empty flags
-if test $_os != iOS; then
-    libo_CHECK_SYSTEM_MODULE([libvisio],[VISIO],[libvisio-0.0])
-fi
+libo_CHECK_SYSTEM_MODULE([libvisio],[VISIO],[libvisio-0.0])
 
 dnl ===================================================================
 dnl Check for system libcmis
@@ -7188,9 +7176,7 @@ libo_CHECK_SYSTEM_MODULE([libcmis],[CMIS],[libcmis-0.3 >= 0.3.1])
 dnl ===================================================================
 dnl Check for system libwpd
 dnl ===================================================================
-if test $_os != iOS; then
-    libo_CHECK_SYSTEM_MODULE([libwpd],[WPD],[libwpd-0.9 libwpd-stream-0.9],["-I${OUTDIR}/inc/external"],["-L${OUTDIR}/lib -lwpdlib"])
-fi
+libo_CHECK_SYSTEM_MODULE([libwpd],[WPD],[libwpd-0.9 libwpd-stream-0.9],["-I${OUTDIR}/inc/external"],["-L${OUTDIR}/lib -lwpdlib"])
 
 dnl ===================================================================
 dnl Check for system lcms2
@@ -7236,9 +7222,7 @@ fi
 dnl ===================================================================
 dnl Check for system libwpg
 dnl ===================================================================
-if test $_os != iOS; then
-    libo_CHECK_SYSTEM_MODULE([libwpg],[WPG],[libwpg-0.2],["-I${OUTDIR}/inc/external"],["-L${OUTDIR}/lib -lwpglib"])
-fi
+libo_CHECK_SYSTEM_MODULE([libwpg],[WPG],[libwpg-0.2],["-I${OUTDIR}/inc/external"],["-L${OUTDIR}/lib -lwpglib"])
 
 dnl ===================================================================
 dnl Check whether freetype2 supports emboldening
commit 1e7bf8de3b3bc4ac1d65d8b101d7ccedab24fcad
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Apr 18 22:29:50 2013 +0300

    Add pan gesture handling
    
    I get exactly the same kind of artefacts as in the Android app, which
    I guess is good as it is at least consistent, as the implementation at
    the LO layer is identical...
    
    Change-Id: Icf0690fd2c48a133cb66de2ab7977b7088d2199e

diff --git a/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m b/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m
index 9a93145..dd5ac41 100644
--- a/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m
+++ b/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m
@@ -59,8 +59,10 @@ static View *theView;
     self.view->textView.delegate = self;
 
     UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self.view action:@selector(tapGesture:)];
+    UIPanGestureRecognizer *panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self.view action:@selector(panGesture:)];
 
     [self.window addGestureRecognizer: tapRecognizer];
+    [self.window addGestureRecognizer: panRecognizer];
 
     NSLog(@"statusBarOrientation: %d", [[UIApplication sharedApplication] statusBarOrientation]);
 
diff --git a/ios/experimental/LibreOffice/LibreOffice/View.h b/ios/experimental/LibreOffice/LibreOffice/View.h
index b0e8394..4abe2baa 100644
--- a/ios/experimental/LibreOffice/LibreOffice/View.h
+++ b/ios/experimental/LibreOffice/LibreOffice/View.h
@@ -15,7 +15,8 @@
     UITextView* textView;
 }
 - (void)drawRect:(CGRect)rect;
-- (void)tapGesture:(UIGestureRecognizer *)gestureRecognizer;
+- (void)tapGesture:(UITapGestureRecognizer *)gestureRecognizer;
+- (void)panGesture:(UIPanGestureRecognizer *)gestureRecognizer;
 
 @end
 
diff --git a/ios/experimental/LibreOffice/LibreOffice/View.m b/ios/experimental/LibreOffice/LibreOffice/View.m
index 56e4e0e..ed1abc69 100644
--- a/ios/experimental/LibreOffice/LibreOffice/View.m
+++ b/ios/experimental/LibreOffice/LibreOffice/View.m
@@ -46,7 +46,7 @@
     // NSLog(@"drawRect: lo_render_windows took %f s", [[NSDate date] timeIntervalSinceDate: startDate]);
 }
 
-- (void) tapGesture:(UIGestureRecognizer *)gestureRecognizer
+- (void)tapGesture:(UITapGestureRecognizer *)gestureRecognizer
 {
     if ([gestureRecognizer state] == UIGestureRecognizerStateEnded) {
         CGPoint location = [gestureRecognizer locationInView: self];
@@ -57,6 +57,16 @@
         NSLog(@"tapGesture: %@", gestureRecognizer);
 }
 
+- (void)panGesture:(UIPanGestureRecognizer *)gestureRecognizer
+{
+    if ([gestureRecognizer state] == UIGestureRecognizerStateEnded) {
+        CGPoint translation = [gestureRecognizer translationInView: self];
+        NSLog(@"panGesture: pan: (%d,%d)", (int)translation.x, (int)translation.y);
+        lo_pan(translation.x, translation.y);
+    } else
+        NSLog(@"panGesture: %@", gestureRecognizer);
+}
+
 @end
 
 // vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sal/inc/osl/detail/ios-bootstrap.h b/sal/inc/osl/detail/ios-bootstrap.h
index 4738eeb..fa3d0c8 100644
--- a/sal/inc/osl/detail/ios-bootstrap.h
+++ b/sal/inc/osl/detail/ios-bootstrap.h
@@ -49,6 +49,7 @@ void lo_runMain();
 void lo_set_view_size(int width, int height);
 void lo_render_windows(CGContextRef context, CGRect rect);
 void lo_tap(int x, int y);
+void lo_pan(int x, int y);
 void lo_keyboard_input(int c);
 
 #ifdef __cplusplus
diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx
index 39410fc..7ba2656 100644
--- a/vcl/ios/iosinst.cxx
+++ b/vcl/ios/iosinst.cxx
@@ -403,6 +403,17 @@ void lo_tap(int x, int y)
 }
 
 extern "C"
+void lo_pan(int x, int y)
+{
+    SalFrame *pFocus = IosSalInstance::getInstance()->getFocusFrame();
+    if (pFocus) {
+        SAL_INFO( "vcl.ios", "scroll: " << "(" << x << "," << y << ")" );
+        ScrollEvent aEvent( x, y );
+        Application::PostScrollEvent(VCLEVENT_WINDOW_SCROLL, pFocus->GetWindow(), &aEvent);
+    }
+}
+
+extern "C"
 void lo_keyboard_input(int c)
 {
     SalFrame *pFocus = IosSalInstance::getInstance()->getFocusFrame();
commit 7711a60a64cc02e2a733b73be21525370d3840b2
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Apr 18 22:05:54 2013 +0300

    Try to get the tinderbox build working
    
    Change-Id: Ie0a9b6e64c35a046afbb5c26c1b75bdd0d897a23

diff --git a/ios/Executable_LibreOffice.mk b/ios/Executable_LibreOffice.mk
index 8e4e0e1..0104744 100644
--- a/ios/Executable_LibreOffice.mk
+++ b/ios/Executable_LibreOffice.mk
@@ -34,12 +34,14 @@ $(eval $(call gb_Executable_add_objcobjects,LibreOffice,\
 
 $(call gb_Executable_use_package,LibreOffice,touch_inc)
 
-$(call gb_LinkTarget_get_target,Executable/LibreOffice) : $(call gb_Postprocess_get_target,AllModulesButInstsetNative)
+# Mark the executable as dependingf on AllModulesButInstsetNative so
+# that it is built only after all libraries that it links to (which
+# might be any of them) have been built.
 
 # Mark the executable as depending on all libraries so that it gets
 # rebuilt if any library has been rebuilt. Avoids need for "make
 # ios.clean".
 
-$(call gb_LinkTarget_get_target,Executable/LibreOffice) : $(wildcard $(OUTDIR)/lib/lib*.a)
+$(call gb_LinkTarget_get_target,Executable/LibreOffice) : $(call gb_Postprocess_get_target,AllModulesButInstsetNative) $(wildcard $(OUTDIR)/lib/lib*.a)
 
 # vim: set ts=4 sw=4 et:
commit aca9824cfd65e3246fd21a1af5f36eda2ca69c75
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Apr 18 22:05:32 2013 +0300

    Add comment
    
    Change-Id: I737e43d35eb2ebd6aeadeb5695cb3ecc74cc4484

diff --git a/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m b/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m
index ea3f535..9a93145 100644
--- a/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m
+++ b/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m
@@ -168,6 +168,10 @@ static View *theView;
 
 @end
 
+// Functions called in the LO thread, which thus need to dispatch any
+// CocoaTouch activity to happen on the GUI thread. Use
+// dispatch_async() consistently.
+
 void lo_damaged(CGRect rect)
 {
     (void) rect;


More information about the Libreoffice-commits mailing list