[Libreoffice-commits] core.git: 4 commits - liborcus/ExternalProject_liborcus.mk solenv/gbuild vcl/inc vcl/ios vcl/source

Tor Lillqvist tml at iki.fi
Tue Apr 16 01:20:10 PDT 2013


 liborcus/ExternalProject_liborcus.mk |    6 ++++++
 solenv/gbuild/platform/macosx.mk     |    7 ++++++-
 vcl/inc/ios/iosinst.hxx              |    2 ++
 vcl/ios/iosinst.cxx                  |   26 +++++++++++++++++++++++++-
 vcl/source/window/window.cxx         |    3 +++
 5 files changed, 42 insertions(+), 2 deletions(-)

New commits:
commit b1e023ab7f96965fcd85ab78485b37fc91611ee5
Author: Tor Lillqvist <tml at iki.fi>
Date:   Tue Apr 16 11:00:41 2013 +0300

    Use -D_GLIBCXX_FULLY_DYNAMIC_STRING here, too, when needed
    
    See d98c6b21420b30ae8419c3d4225bf2ce293ee39a for details.
    
    Change-Id: I3faa87bae5a943ea60399a939742cffbbfeb5e37

diff --git a/liborcus/ExternalProject_liborcus.mk b/liborcus/ExternalProject_liborcus.mk
index 4ad026b..ce9644c 100644
--- a/liborcus/ExternalProject_liborcus.mk
+++ b/liborcus/ExternalProject_liborcus.mk
@@ -63,6 +63,12 @@ liborcus_CPPFLAGS+=-D_GLIBCXX_DEBUG
 endif
 endif
 
+ifeq ($(OS),MACOSX)
+ifneq (,$(gb_ENABLE_DBGUTIL))
+liborcus_CPPFLAGS+=-D_GLIBCXX_FULLY_DYNAMIC_STRING
+endif
+endif
+
 liborcus_CXXFLAGS=$(CXXFLAGS)
 ifeq ($(COM),MSC)
 liborcus_CXXFLAGS+=$(BOOST_CXXFLAGS)
commit 84aea518f0dc9836350c47bff21780a5999f4968
Author: Tor Lillqvist <tml at iki.fi>
Date:   Tue Apr 16 08:43:41 2013 +0300

    Turn on _GLIBCXX_FULLY_DYNAMIC_STRING, too, in a dbgutil build
    
    Apparently Apple's build of GNU libstdc++ has been compiled with that,
    which means that also code using it should be. At least when
    _GLIBCXX_DEBUG is also defined.
    
    See http://lists.apple.com/archives/cocoa-dev/2009/Sep/msg01199.html and
    http://stackoverflow.com/questions/2234557/c-using-getline-prints-pointer-being-freed-was-not-allocated-in-xcode
    
    Otherwise the mork unit test crashes, because it happens to use
    std::string in a way that triggers the problem. But quite likely there
    would be more problems elsewhere.
    
    Change-Id: Ie0c4fdfa61764718f333ba81015ef764806178fb

diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 5d94b4a..efb0f05 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -77,11 +77,16 @@ gb_COMPILERDEFS += \
 
 endif
 
-# enable debug STL
+# Enable debug libstdc++
 ifeq ($(gb_ENABLE_DBGUTIL),$(true))
 gb_COMPILERDEFS += \
 	-D_GLIBCXX_DEBUG \
 
+# See http://lists.apple.com/archives/cocoa-dev/2009/Sep/msg01199.html ,
+# http://stackoverflow.com/questions/2234557/c-using-getline-prints-pointer-being-freed-was-not-allocated-in-xcode
+gb_COMPILERDEFS += \
+	-D_GLIBCXX_FULLY_DYNAMIC_STRING \
+
 endif
 
 ifeq ($(HAVE_GCC_NO_LONG_DOUBLE),TRUE)
commit bd2a91420e4cea477e4317223092b1db5ff09c7f
Author: Tor Lillqvist <tml at iki.fi>
Date:   Tue Apr 16 01:46:04 2013 +0300

    Try to propagate display size change to LO
    
    Change-Id: If52c0aa9290c377c08f2cec8c9e36d987c0ed9b6

diff --git a/vcl/inc/ios/iosinst.hxx b/vcl/inc/ios/iosinst.hxx
index 3b87de6..2ff9e57 100644
--- a/vcl/inc/ios/iosinst.hxx
+++ b/vcl/inc/ios/iosinst.hxx
@@ -59,6 +59,8 @@ public:
     } RenderWindowsArg;
     DECL_LINK( RenderWindows, RenderWindowsArg* );
 
+    DECL_LINK( DisplayConfigurationChanged, void* );
+
     pthread_mutex_t m_aRenderMutex;
     pthread_cond_t m_aRenderCond;
 };
diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx
index 920187c..95a7aac 100644
--- a/vcl/ios/iosinst.cxx
+++ b/vcl/ios/iosinst.cxx
@@ -271,12 +271,36 @@ int IosSalSystem::ShowNativeDialog( const OUString& rTitle,
     return 0;
 }
 
+IMPL_LINK( IosSalInstance, DisplayConfigurationChanged, void*, )
+{
+    for( std::list< SalFrame* >::const_iterator it = getFrames().begin();
+         it != getFrames().end();
+         it++ ) {
+        (*it)->CallCallback( SALEVENT_SETTINGSCHANGED, 0 );
+    }
+
+    lo_damaged( CGRectMake( 0, 0, viewWidth, viewHeight ) );
+    return 0;
+}
+
 extern "C"
 void lo_set_view_size(int width, int height)
 {
-    // Horrible
+    int oldWidth = viewWidth;
+
     viewWidth = width;
     viewHeight = height;
+
+    if (oldWidth > 1) {
+        // Inform about change in display size (well, just orientation
+        // presumably).
+        IosSalInstance *pInstance = IosSalInstance::getInstance();
+
+        if ( pInstance == NULL )
+            return;
+
+        Application::PostUserEvent( LINK( pInstance, IosSalInstance, DisplayConfigurationChanged ), NULL );
+    }
 }
 
 IMPL_LINK( IosSalInstance, RenderWindows, RenderWindowsArg*, arg )
commit e013425372a34afa91fb312d8237b2ce22147d81
Author: Tor Lillqvist <tml at iki.fi>
Date:   Tue Apr 16 01:03:15 2013 +0300

    What makes Andale Sans UI a suitable cross-platform fallback font?
    
    Change-Id: Ice34e9b92bde470746f37dc9216ea2b52695df99

diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 137bc26..7deb67c 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -309,6 +309,9 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl
     ImplGetSVData()->maAppData.mnDefaultLayoutBorder = -1;
 
     // Verify availability of the configured UI font, otherwise choose "Andale Sans UI"
+
+    // WTF, what makes Andale Sans UI a suitable cross-platform fallback font?
+
     String aUserInterfaceFont;
     bool bUseSystemFont = rSettings.GetStyleSettings().GetUseSystemUIFonts();
 


More information about the Libreoffice-commits mailing list