[Libreoffice-commits] core.git: 2 commits - codemaker/source ios/experimental vcl/ios

Tor Lillqvist tml at iki.fi
Tue Apr 16 05:51:28 PDT 2013


 codemaker/source/codemaker/codemaker.cxx                  |   11 --------
 ios/experimental/LibreOffice/LibreOffice/AppDelegate.m    |    2 +
 ios/experimental/LibreOffice/LibreOffice/View.m           |   18 +++++++-------
 ios/experimental/LibreOffice/LibreOffice/ViewController.m |    7 +++++
 vcl/ios/iosinst.cxx                                       |    9 +++++++
 5 files changed, 27 insertions(+), 20 deletions(-)

New commits:
commit 6127d765e3356bed4f6a7e773c768cb2c8ef4bbc
Author: Tor Lillqvist <tml at iki.fi>
Date:   Tue Apr 16 15:35:17 2013 +0300

    WaE: unused function 'checkNoTypeArguments'
    
    Change-Id: I112e6ac263bb673b5ad553742d3fa77af50bdf03

diff --git a/codemaker/source/codemaker/codemaker.cxx b/codemaker/source/codemaker/codemaker.cxx
index c9f7e0b..3c67b37 100644
--- a/codemaker/source/codemaker/codemaker.cxx
+++ b/codemaker/source/codemaker/codemaker.cxx
@@ -37,17 +37,6 @@
 
 #include <vector>
 
-namespace {
-
-void checkNoTypeArguments(std::vector< rtl::OString > const & arguments) {
-    if (!arguments.empty()) {
-        throw CannotDumpException("Bad type information");
-            //TODO
-    }
-}
-
-}
-
 namespace codemaker {
 
 rtl::OString convertString(rtl::OUString const & string) {
commit ab49c55bbc7a5fc5b6509fe995abf42ce266ba9b
Author: Tor Lillqvist <tml at iki.fi>
Date:   Tue Apr 16 14:32:06 2013 +0200

    More orientation experimentation and hacking
    
    Now it re-orients and re-sizes the LO "frame" correctly upon rotation,
    but it still starts wrongly if starting in landscape orientation.
    
    Change-Id: I4c12a7e00d687391435a47400b6e8b4c7e49bdda

diff --git a/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m b/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m
index 2285f04..ea3f535 100644
--- a/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m
+++ b/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m
@@ -62,6 +62,8 @@ static View *theView;
 
     [self.window addGestureRecognizer: tapRecognizer];
 
+    NSLog(@"statusBarOrientation: %d", [[UIApplication sharedApplication] statusBarOrientation]);
+
     if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation]))
         lo_set_view_size(applicationFrame.size.height, applicationFrame.size.width);
     else
diff --git a/ios/experimental/LibreOffice/LibreOffice/View.m b/ios/experimental/LibreOffice/LibreOffice/View.m
index 4308392..56e4e0e 100644
--- a/ios/experimental/LibreOffice/LibreOffice/View.m
+++ b/ios/experimental/LibreOffice/LibreOffice/View.m
@@ -15,8 +15,9 @@
 - (void)drawRect:(CGRect)rect
 {
     NSLog(@"drawRect: %dx%d@(%d,%d)", (int) rect.size.width, (int) rect.size.height, (int) rect.origin.x, (int) rect.origin.y);
+    NSLog(@"statusBarOrientation: %d", [[UIApplication sharedApplication] statusBarOrientation]);
 
-    NSDate *startDate = [NSDate date];
+    // NSDate *startDate = [NSDate date];
 
     CGContextRef context = UIGraphicsGetCurrentContext();
     CGContextSaveGState(context);
@@ -27,23 +28,22 @@
         CGContextScaleCTM(context, 1, -1);
         break;
     case UIInterfaceOrientationLandscapeLeft:
-        CGContextTranslateCTM(context, self.frame.size.width, self.frame.size.height);
-        CGContextRotateCTM(context, M_PI/2);
-        CGContextScaleCTM(context, -1, 1);
+        CGContextTranslateCTM(context, 0, self.frame.size.width);
+        CGContextScaleCTM(context, 1, -1);
         break;
     case UIInterfaceOrientationLandscapeRight:
-        CGContextRotateCTM(context, -M_PI/2);
-        CGContextScaleCTM(context, -1, 1);
+        CGContextTranslateCTM(context, 0, self.frame.size.width);
+        CGContextScaleCTM(context, 1, -1);
         break;
     case UIInterfaceOrientationPortraitUpsideDown:
-        CGContextTranslateCTM(context, self.frame.size.width, 0);
-        CGContextScaleCTM(context, -1, 1);
+        CGContextTranslateCTM(context, 0, self.frame.size.height);
+        CGContextScaleCTM(context, 1, -1);
         break;
     }
     lo_render_windows(context, rect);
     CGContextRestoreGState(context);
 
-    NSLog(@"drawRect: lo_render_windows took %f s", [[NSDate date] timeIntervalSinceDate: startDate]);
+    // NSLog(@"drawRect: lo_render_windows took %f s", [[NSDate date] timeIntervalSinceDate: startDate]);
 }
 
 - (void) tapGesture:(UIGestureRecognizer *)gestureRecognizer
diff --git a/ios/experimental/LibreOffice/LibreOffice/ViewController.m b/ios/experimental/LibreOffice/LibreOffice/ViewController.m
index 58da5db..a0c4985 100644
--- a/ios/experimental/LibreOffice/LibreOffice/ViewController.m
+++ b/ios/experimental/LibreOffice/LibreOffice/ViewController.m
@@ -25,6 +25,13 @@
     NSLog(@"  frame=%dx%d@(%d,%d)", (int)rect.size.width, (int)rect.size.height, (int)rect.origin.x, (int)rect.origin.y);
 }
 
+- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
+{
+    (void) fromInterfaceOrientation;
+
+    NSLog(@"didRotateFromInterfaceOrientation: statusBarOrientation: %d interfaceOrientation: %d", [[UIApplication sharedApplication] statusBarOrientation], [self interfaceOrientation]);
+}
+
 @end
 
 // vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx
index 95a7aac..39410fc 100644
--- a/vcl/ios/iosinst.cxx
+++ b/vcl/ios/iosinst.cxx
@@ -165,6 +165,12 @@ public:
         IosSalInstance::getInstance()->GetWorkArea( rRect );
     }
 
+    void ShowFullScreen( sal_Bool, sal_Int32 )
+    {
+        SetPosSize( 0, 0, viewWidth, viewHeight,
+                    SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT );
+    }
+
     virtual void damaged( const basegfx::B2IBox& rDamageRect )
     {
         if (rDamageRect.isEmpty())
@@ -276,7 +282,10 @@ IMPL_LINK( IosSalInstance, DisplayConfigurationChanged, void*, )
     for( std::list< SalFrame* >::const_iterator it = getFrames().begin();
          it != getFrames().end();
          it++ ) {
+        (*it)->Show( sal_False, sal_False );
         (*it)->CallCallback( SALEVENT_SETTINGSCHANGED, 0 );
+        (*it)->SetPosSize(0, 0, viewWidth, viewHeight, SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT);
+        (*it)->Show( sal_True, sal_False );
     }
 
     lo_damaged( CGRectMake( 0, 0, viewWidth, viewHeight ) );


More information about the Libreoffice-commits mailing list