[Libreoffice-commits] core.git: 4 commits - ios/experimental sw/source vcl/headless vcl/source
Tor Lillqvist
tml at collabora.com
Mon Oct 28 02:33:41 PDT 2013
ios/experimental/LibreOffice/LibreOffice.xcodeproj/project.pbxproj | 4 ++
ios/experimental/LibreOffice/LibreOffice/AppDelegate.m | 7 +---
ios/experimental/LibreOffice/LibreOffice/View.h | 1
ios/experimental/LibreOffice/LibreOffice/View.m | 8 -----
sw/source/core/crsr/crsrsh.cxx | 16 +++++-----
vcl/headless/svpframe.cxx | 6 +++
vcl/source/window/cursor.cxx | 2 +
7 files changed, 23 insertions(+), 21 deletions(-)
New commits:
commit a027fa423876a3c9a4f3edfcd3a35ae1e83b068f
Author: Tor Lillqvist <tml at collabora.com>
Date: Mon Oct 28 11:32:55 2013 +0200
Try a different way to not show the keyboard initially on iOS
Change-Id: I978cfcb52297ace7e3916a63ce3dc9f179a6a208
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index ec932e3..8bb540a 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -2521,14 +2521,14 @@ SwCrsrShell::SwCrsrShell( SwCrsrShell& rShell, Window *pInitWin )
m_bGCAttr = m_bIgnoreReadonly = m_bSelTblCells = m_bBasicHideCrsr =
m_bOverwriteCrsr = sal_False;
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_pVisCrsr = new SwVisCrsr( this );
m_bMacroExecAllowed = rShell.IsMacroExecAllowed();
+
+#if defined(ANDROID) || defined(IOS)
+ HideCrsr();
+#endif
}
/// default constructor
@@ -2558,15 +2558,15 @@ SwCrsrShell::SwCrsrShell( SwDoc& rDoc, Window *pInitWin,
m_bGCAttr = m_bIgnoreReadonly = m_bSelTblCells = m_bBasicHideCrsr =
m_bOverwriteCrsr = sal_False;
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_pVisCrsr = new SwVisCrsr( this );
m_bMacroExecAllowed = true;
+
+#if defined(ANDROID) || defined(IOS)
+ HideCrsr();
+#endif
}
SwCrsrShell::~SwCrsrShell()
commit f0fb30e7d0e8cf0c62b45bc3deb2e35faeaccd1b
Author: Tor Lillqvist <tml at collabora.com>
Date: Mon Oct 28 11:28:18 2013 +0200
Get rid of some crack
Change-Id: I9806eb87e8d679c3b37de9cf7b87e26c3d4b5387
diff --git a/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m b/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m
index 4940165..11d4642 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 61c8169..aecc606 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 f4fec1d..48ec11a 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:
commit c755095112d0378da872aad2dfc81a9120711b04
Author: Tor Lillqvist <tml at collabora.com>
Date: Mon Oct 28 11:27:32 2013 +0200
Add a couple of source files
Change-Id: I45e1a8483ff065d584d83824f9020f7d33a5257e
diff --git a/ios/experimental/LibreOffice/LibreOffice.xcodeproj/project.pbxproj b/ios/experimental/LibreOffice/LibreOffice.xcodeproj/project.pbxproj
index 4a4dce7..747aacc 100644
--- a/ios/experimental/LibreOffice/LibreOffice.xcodeproj/project.pbxproj
+++ b/ios/experimental/LibreOffice/LibreOffice.xcodeproj/project.pbxproj
@@ -85,6 +85,8 @@
BE96AEB518196DCE00BD1AC4 /* svpvd.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = svpvd.cxx; path = ../../../../vcl/headless/svpvd.cxx; sourceTree = "<group>"; };
BE96AEB6181971AF00BD1AC4 /* svpinst.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = svpinst.cxx; path = ../../../../vcl/headless/svpinst.cxx; sourceTree = "<group>"; };
BE96AEB7181973DA00BD1AC4 /* salbmp.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = salbmp.cxx; path = ../../../../vcl/quartz/salbmp.cxx; sourceTree = "<group>"; };
+ BE9A8D56181DBC70002A11AD /* cursor.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = cursor.cxx; path = ../../../../vcl/source/window/cursor.cxx; sourceTree = "<group>"; };
+ BE9A8D57181E5352002A11AD /* swrect.hxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = swrect.hxx; path = ../../../../sw/inc/swrect.hxx; sourceTree = "<group>"; };
BE9B03C8181671C000E1B0CF /* edws.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = edws.cxx; path = ../../../../sw/source/core/edit/edws.cxx; sourceTree = "<group>"; };
BEB752BD180C90D0005B5696 /* outmap.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = outmap.cxx; path = ../../../../vcl/source/gdi/outmap.cxx; sourceTree = "<group>"; };
BEBF3E3A17002D0200C454AC /* svapp.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = svapp.cxx; path = ../../../../vcl/source/app/svapp.cxx; sourceTree = "<group>"; };
@@ -140,6 +142,7 @@
BE2F0A0D17077A950060FE0D /* vcl */ = {
isa = PBXGroup;
children = (
+ BE9A8D56181DBC70002A11AD /* cursor.cxx */,
BE954A2E1704F9500040D517 /* iosinst.cxx */,
BEB752BD180C90D0005B5696 /* outmap.cxx */,
BE96AEB7181973DA00BD1AC4 /* salbmp.cxx */,
@@ -299,6 +302,7 @@
BE9B03C8181671C000E1B0CF /* edws.cxx */,
BE02DE57175F2E2A00ED4032 /* guess.cxx */,
BE2CB9611808297500953CB4 /* select.cxx */,
+ BE9A8D57181E5352002A11AD /* swrect.hxx */,
BE2CB962180829DD00953CB4 /* txtcrsr.cxx */,
BECB749917185F48001BEB85 /* view.cxx */,
BECB749A17185F48001BEB85 /* view0.cxx */,
commit 0d9067906eabf92ab25fb9e0b43e3c972d302da6
Author: Tor Lillqvist <tml at collabora.com>
Date: Mon Oct 28 09:31:12 2013 +0200
Add some (commented out) SAL_DEBUG() calls
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index bfe0259..b007371 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -222,6 +222,7 @@ void SvpSalFrame::Show( sal_Bool bVisible, sal_Bool bNoActivate )
{
if( bVisible && ! m_bVisible )
{
+ // SAL_DEBUG("SvpSalFrame::Show: showing: " << this);
m_bVisible = true;
m_pInstance->PostEvent( this, NULL, SALEVENT_RESIZE );
if( ! bNoActivate )
@@ -229,10 +230,15 @@ void SvpSalFrame::Show( sal_Bool bVisible, sal_Bool bNoActivate )
}
else if( ! bVisible && m_bVisible )
{
+ // SAL_DEBUG("SvpSalFrame::Show: hiding: " << this);
m_bVisible = false;
m_pInstance->PostEvent( this, NULL, SALEVENT_RESIZE );
LoseFocus();
}
+ else
+ {
+ // SAL_DEBUG("SvpSalFrame::Show: nothihg: " << this);
+ }
}
void SvpSalFrame::Enable( sal_Bool )
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 11d3ad1..77baa2b 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -126,6 +126,7 @@ void Cursor::ImplDraw()
{
if ( mpData && mpData->mpWindow && !mpData->mbCurVisible )
{
+ // SAL_DEBUG("Cursor::ImplDraw");
Window* pWindow = mpData->mpWindow;
mpData->maPixPos = pWindow->LogicToPixel( maPos );
mpData->maPixSize = pWindow->LogicToPixel( maSize );
@@ -156,6 +157,7 @@ void Cursor::ImplRestore()
{
if ( mpData && mpData->mbCurVisible )
{
+ // SAL_DEBUG("Cursor::ImplRestore");
ImplCursorInvert( mpData );
mpData->mbCurVisible = false;
}
More information about the Libreoffice-commits
mailing list