diff options
author | Tor Lillqvist <tml@collabora.com> | 2013-10-28 11:28:18 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2013-10-28 11:33:09 +0200 |
commit | f0fb30e7d0e8cf0c62b45bc3deb2e35faeaccd1b (patch) | |
tree | e9ecacf81f6668e2840e395ff2853ec822e5ae48 /ios | |
parent | c755095112d0378da872aad2dfc81a9120711b04 (diff) |
Get rid of some crack
Change-Id: I9806eb87e8d679c3b37de9cf7b87e26c3d4b5387
Diffstat (limited to 'ios')
-rw-r--r-- | ios/experimental/LibreOffice/LibreOffice/AppDelegate.m | 7 | ||||
-rw-r--r-- | ios/experimental/LibreOffice/LibreOffice/View.h | 1 | ||||
-rw-r--r-- | ios/experimental/LibreOffice/LibreOffice/View.m | 8 |
3 files changed, 3 insertions, 13 deletions
diff --git a/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m b/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m index 49401651e9f2..11d4642b0176 100644 --- a/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m +++ b/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m @@ -51,9 +51,6 @@ static BOOL keyboardShows; vc.view = self.view; theView = self.view; - // This is baaad - theView->applicationFrame = applicationFrame; - self.view->textView = [[UITextView alloc] initWithFrame: r]; self.view->textView.autocapitalizationType = UITextAutocapitalizationTypeNone; self.view->textView.alpha = 0; @@ -71,9 +68,9 @@ static BOOL keyboardShows; NSLog(@"statusBarOrientation: %ld", (long) [[UIApplication sharedApplication] statusBarOrientation]); if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])) - touch_lo_set_view_size(applicationFrame.size.height, applicationFrame.size.width); + touch_lo_set_view_size(r.size.height, r.size.width); else - touch_lo_set_view_size(applicationFrame.size.width, applicationFrame.size.height); + touch_lo_set_view_size(r.size.width, r.size.height); [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidHide:) name:UIKeyboardDidHideNotification object:nil]; diff --git a/ios/experimental/LibreOffice/LibreOffice/View.h b/ios/experimental/LibreOffice/LibreOffice/View.h index 61c816923bc8..aecc606425be 100644 --- a/ios/experimental/LibreOffice/LibreOffice/View.h +++ b/ios/experimental/LibreOffice/LibreOffice/View.h @@ -15,7 +15,6 @@ { @public UITextView* textView; - CGRect applicationFrame; } - (void)drawRect:(CGRect)rect; - (void)tapGesture:(UITapGestureRecognizer *)gestureRecognizer; diff --git a/ios/experimental/LibreOffice/LibreOffice/View.m b/ios/experimental/LibreOffice/LibreOffice/View.m index f4fec1df4e35..48ec11a48a28 100644 --- a/ios/experimental/LibreOffice/LibreOffice/View.m +++ b/ios/experimental/LibreOffice/LibreOffice/View.m @@ -128,13 +128,7 @@ switch ([[UIApplication sharedApplication] statusBarOrientation]) { case UIInterfaceOrientationPortrait: - // No idea why I need to do this ugly subtraction of - // applicationFrame.origin.y here. The handling of View frame - // and applicationFrame has been a bit of a mystery to me. - // Anyway, unless a Right Way to do this is figured out, - // corresponding hacks are needed for the other orientations, - // too, obiously. - CGContextTranslateCTM(context, 0, self.frame.size.height - applicationFrame.origin.y); + CGContextTranslateCTM(context, 0, self.frame.size.height); CGContextScaleCTM(context, 1, -1); break; case UIInterfaceOrientationLandscapeLeft: |