[Libreoffice-commits] core.git: 17 commits - bridges/Library_cpp_uno.mk bridges/source framework/source ios/experimental sw/source vcl/aqua vcl/coretext vcl/inc vcl/ios vcl/quartz vcl/source

Tor Lillqvist tml at iki.fi
Sat Apr 6 15:34:45 PDT 2013


 bridges/Library_cpp_uno.mk                       |    1 
 bridges/source/cpp_uno/gcc3_ios_arm/except.cxx   |   31 ++++----
 framework/source/layoutmanager/layoutmanager.cxx |   50 +++-----------
 ios/experimental/LibreOffice/LibreOffice/View.m  |    6 -
 sw/source/ui/uiview/view.cxx                     |    3 
 vcl/aqua/source/gdi/atsui/salatslayout.cxx       |   27 +++++--
 vcl/coretext/salcoretextlayout.cxx               |   81 +++++++++++++++--------
 vcl/inc/quartz/utils.h                           |    6 +
 vcl/ios/iosinst.cxx                              |   18 -----
 vcl/quartz/utils.cxx                             |   13 +++
 vcl/source/gdi/virdev.cxx                        |    4 +
 11 files changed, 131 insertions(+), 109 deletions(-)

New commits:
commit f3dbb35c806f3a89ad8d6ec549af08dcc1b8a47c
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sun Apr 7 00:27:30 2013 +0300

    NSLogging changes
    
    Change-Id: I42991d7a9c9e0bd4a023739051393935efa5c29f

diff --git a/ios/experimental/LibreOffice/LibreOffice/View.m b/ios/experimental/LibreOffice/LibreOffice/View.m
index 7968316..abc057e 100644
--- a/ios/experimental/LibreOffice/LibreOffice/View.m
+++ b/ios/experimental/LibreOffice/LibreOffice/View.m
@@ -14,9 +14,9 @@
 
 - (void)drawRect:(CGRect)rect
 {
-    // NSLog(@"drawRect: %fx%f@(%f,%f)", rect.size.width, rect.size.height, rect.origin.x, rect.origin.y);
+    NSLog(@"drawRect: %dx%d@(%d,%d)", (int) rect.size.width, (int) rect.size.height, (int) rect.origin.x, (int) rect.origin.y);
 
-    NSDate *a = [NSDate date];
+    NSDate *startDate = [NSDate date];
 
     CGContextRef context = UIGraphicsGetCurrentContext();
     CGContextSaveGState(context);
@@ -25,7 +25,7 @@
     lo_render_windows(context, rect);
     CGContextRestoreGState(context);
 
-    NSLog(@"drawRect: lo_render_windows took %f s", [[NSDate date] timeIntervalSinceDate: a]);
+    NSLog(@"drawRect: lo_render_windows took %f s", [[NSDate date] timeIntervalSinceDate: startDate]);
 }
 
 - (void) tapGesture:(UIGestureRecognizer *)gestureRecognizer
commit a85c02793653d9d44efd7dd3818fd5e65fe12d02
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sun Apr 7 00:17:56 2013 +0300

    Remove unused variables
    
    The LayoutManager for some reason has both a ToolbarLayoutManager
    pointer field, and a uno::Reference to an aspect (or whatever term one
    should use) of the same ToolbarLayoutManager. (I.e. esssentially two
    fields for the same thing. Why it doesn't create such variables where
    needed instead I don't know.)
    
    Anyway, for some reason there were lots of instances where a local
    variable was initialised with this second field but then never used. I
    removed those. (Surely just copying the field into a local variable
    doesn't have any interesting side effect that would explain this
    pattern?)
    
    Change-Id: Ibdfbd9476c39d3e83b58e81469b94d9a87444ca8

diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 23a1210..fa70e80 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -148,6 +148,7 @@ LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceM
         , m_aCustomizeCmd( "ConfigureDialog" )
         , m_aListenerContainer( m_aLock.getShareableOslMutex() )
         , m_pToolbarManager( 0 )
+        , m_xToolbarManager( 0 )
 {
     // Initialize statusbar member
     const sal_Bool bRefreshVisibility = sal_False;
@@ -262,7 +263,6 @@ void LayoutManager::implts_reset( sal_Bool bAttached )
     Reference< XNameAccess > xPersistentWindowState( m_xPersistentWindowState );
     Reference< XMultiServiceFactory > xServiceManager( m_xSMGR );
     Reference< XNameAccess > xPersistentWindowStateSupplier( m_xPersistentWindowStateSupplier );
-    Reference< awt::XWindowListener > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY );
     ToolbarLayoutManager* pToolbarManager( m_pToolbarManager );
     ::rtl::OUString aModuleIdentifier( m_aModuleIdentifier );
     bool bAutomaticToolbars( m_bAutomaticToolbars );
@@ -446,7 +446,6 @@ sal_Bool LayoutManager::implts_isEmbeddedLayoutManager() const
 void LayoutManager::implts_destroyElements()
 {
     WriteGuard aWriteLock( m_aLock );
-    uno::Reference< ui::XUIConfigurationListener > xThis( m_xToolbarManager );
     ToolbarLayoutManager* pToolbarManager = m_pToolbarManager;
     aWriteLock.unlock();
 
@@ -463,7 +462,6 @@ void LayoutManager::implts_destroyElements()
 void LayoutManager::implts_toggleFloatingUIElementsVisibility( sal_Bool bActive )
 {
     ReadGuard aReadLock( m_aLock );
-    uno::Reference< ui::XUIConfigurationListener > xThis( m_xToolbarManager );
     ToolbarLayoutManager* pToolbarManager = m_pToolbarManager;
     aReadLock.unlock();
 
@@ -798,7 +796,6 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible )
         bMustDoLayout = !implts_hideStatusBar();
 
     aWriteLock.lock();
-    uno::Reference< ui::XUIConfigurationListener > xThis( m_xToolbarManager );
     ToolbarLayoutManager* pToolbarManager( m_pToolbarManager );
     aWriteLock.unlock();
 
@@ -1145,9 +1142,7 @@ void LayoutManager::implts_setOffset( const sal_Int32 nBottomOffset )
     setZeroRectangle( aOffsetRect );
     aOffsetRect.setHeight( nBottomOffset );
 
-    // make sure that the toolbar manager refernence/pointer is valid
-    uno::Reference< ui::XUIConfigurationListener > xThis( m_xToolbarManager );
-    if ( xThis.is() )
+    if ( m_pToolbarManager )
         m_pToolbarManager->setDockingAreaOffsets( aOffsetRect );
 }
 
@@ -1284,7 +1279,6 @@ throw ( RuntimeException )
     sal_Bool bAutomaticToolbars( m_bAutomaticToolbars );
     std::vector< Reference< awt::XWindow > > oldDockingAreaWindows;
 
-    uno::Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager );
     ToolbarLayoutManager* pToolbarManager = m_pToolbarManager;
 
     if ( !xDockingAreaAcceptor.is() )
@@ -1356,7 +1350,7 @@ throw ( RuntimeException )
         xOldDockingAreaAcceptor->setDockingAreaSpace( aEmptyRect );
     }
 
-    if ( xDockingAreaAcceptor.is() )
+    if ( pToolbarManager && xDockingAreaAcceptor.is() )
     {
         if ( bAutomaticToolbars )
         {
@@ -1403,7 +1397,6 @@ void LayoutManager::implts_reparentChildWindows()
     implts_resetMenuBar();
 
     aWriteLock.lock();
-    uno::Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager );
     ToolbarLayoutManager* pToolbarManager = m_pToolbarManager;
     if ( pToolbarManager )
         pToolbarManager->setParentWindow( uno::Reference< awt::XWindowPeer >( xContainerWindow, uno::UNO_QUERY ));
@@ -1426,7 +1419,6 @@ IMPL_LINK( LayoutManager, WindowEventListener, VclSimpleEvent*, pEvent )
         if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX )
         {
             ReadGuard aReadLock( m_aLock );
-            uno::Reference< ui::XUIConfigurationListener > xThis( m_xToolbarManager );
             ToolbarLayoutManager* pToolbarManager( m_pToolbarManager );
             aReadLock.unlock();
 
@@ -1704,7 +1696,6 @@ throw (uno::RuntimeException)
     else if ( aElementType.equalsIgnoreAsciiCase( UIRESOURCETYPE_TOOLBAR ) && m_bVisible )
     {
         bool bComponentAttached( !m_aModuleIdentifier.isEmpty() );
-        uno::Reference< uno::XInterface > xThis( m_xToolbarManager, uno::UNO_QUERY );
         ToolbarLayoutManager* pToolbarManager = m_pToolbarManager;
         aWriteLock.unlock();
 
@@ -1734,7 +1725,6 @@ throw (RuntimeException)
     if ( !xUIElement.is() )
     {
         ReadGuard aReadLock( m_aLock );
-        uno::Reference< uno::XInterface > xThis( m_xToolbarManager );
         ToolbarLayoutManager*             pToolbarManager( m_pToolbarManager );
         aReadLock.unlock();
 
@@ -1751,7 +1741,6 @@ throw (uno::RuntimeException)
     ReadGuard aReadLock( m_aLock );
     uno::Reference< ui::XUIElement >  xMenuBar( m_xMenuBar );
     uno::Reference< ui::XUIElement >  xStatusBar( m_aStatusBarElement.m_xUIElement );
-    uno::Reference< uno::XInterface > xThis( m_xToolbarManager );
     ToolbarLayoutManager*             pToolbarManager( m_pToolbarManager );
     aReadLock.unlock();
 
@@ -1832,7 +1821,6 @@ throw (RuntimeException)
     else if ( aElementType.equalsIgnoreAsciiCase( UIRESOURCETYPE_TOOLBAR ))
     {
         ReadGuard aReadLock( m_aLock );
-        uno::Reference< awt::XWindowListener > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY );
         ToolbarLayoutManager* pToolbarManager = m_pToolbarManager;
         aReadLock.unlock();
 
@@ -1925,12 +1913,14 @@ throw (RuntimeException)
     else if ( aElementType.equalsIgnoreAsciiCase( UIRESOURCETYPE_TOOLBAR ))
     {
         ReadGuard aReadLock( m_aLock );
-        uno::Reference< uno::XInterface > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY );
         ToolbarLayoutManager* pToolbarManager = m_pToolbarManager;
         aReadLock.unlock();
 
-        bNotify     = pToolbarManager->hideToolbar( aName );
-        bMustLayout = pToolbarManager->isLayoutDirty();
+        if ( pToolbarManager )
+        {
+            bNotify     = pToolbarManager->hideToolbar( aName );
+            bMustLayout = pToolbarManager->isLayoutDirty();
+        }
     }
     else if ( aElementType.equalsIgnoreAsciiCase("dockingwindow"))
     {
@@ -1961,7 +1951,6 @@ throw (RuntimeException)
     if ( aElementType.equalsIgnoreAsciiCase( UIRESOURCETYPE_TOOLBAR ))
     {
         ReadGuard aReadLock( m_aLock );
-        uno::Reference< uno::XInterface > xThis( m_xToolbarManager );
         ToolbarLayoutManager*             pToolbarManager = m_pToolbarManager;
         aReadLock.unlock();
 
@@ -1979,7 +1968,6 @@ throw (RuntimeException)
 {
     ReadGuard aReadLock( m_aLock );
     bool bResult( false );
-    uno::Reference< uno::XInterface > xThis( m_xToolbarManager );
     ToolbarLayoutManager*             pToolbarManager = m_pToolbarManager;
     aReadLock.unlock();
 
@@ -1999,7 +1987,6 @@ throw (RuntimeException)
     if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCase( UIRESOURCETYPE_TOOLBAR ))
     {
         ReadGuard aReadLock( m_aLock );
-        uno::Reference< uno::XInterface > xThis( m_xToolbarManager );
         ToolbarLayoutManager*             pToolbarManager = m_pToolbarManager;
         aReadLock.unlock();
 
@@ -2020,7 +2007,6 @@ throw (uno::RuntimeException)
     if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCase( UIRESOURCETYPE_TOOLBAR ))
     {
         ReadGuard aReadLock( m_aLock );
-        uno::Reference< uno::XInterface > xThis( m_xToolbarManager );
         ToolbarLayoutManager*             pToolbarManager = m_pToolbarManager;
         aReadLock.unlock();
 
@@ -2041,7 +2027,6 @@ throw (uno::RuntimeException)
     if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCase( UIRESOURCETYPE_TOOLBAR ))
     {
         ReadGuard aReadLock( m_aLock );
-        uno::Reference< uno::XInterface > xThis( m_xToolbarManager );
         ToolbarLayoutManager*             pToolbarManager = m_pToolbarManager;
         aReadLock.unlock();
 
@@ -2061,7 +2046,6 @@ throw (RuntimeException)
     if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCase( UIRESOURCETYPE_TOOLBAR ))
     {
         ReadGuard aReadLock( m_aLock );
-        uno::Reference< uno::XInterface > xThis( m_xToolbarManager );
         ToolbarLayoutManager*             pToolbarManager = m_pToolbarManager;
         aReadLock.unlock();
 
@@ -2080,7 +2064,6 @@ throw (RuntimeException)
     if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCase( UIRESOURCETYPE_TOOLBAR ))
     {
         ReadGuard aReadLock( m_aLock );
-        uno::Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager );
         ToolbarLayoutManager* pToolbarManager( m_pToolbarManager );
         aReadLock.unlock();
 
@@ -2099,7 +2082,6 @@ throw (RuntimeException)
     if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCase( UIRESOURCETYPE_TOOLBAR ))
     {
         ReadGuard aReadLock( m_aLock );
-        uno::Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager );
         ToolbarLayoutManager* pToolbarManager( m_pToolbarManager );
         aReadLock.unlock();
 
@@ -2168,7 +2150,6 @@ throw (RuntimeException)
     else if ( aElementType.equalsIgnoreAsciiCase( UIRESOURCETYPE_TOOLBAR ))
     {
         ReadGuard aReadLock( m_aLock );
-        uno::Reference< frame::XLayoutManager > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY );
         ToolbarLayoutManager* pToolbarManager = m_pToolbarManager;
         aReadLock.unlock();
 
@@ -2193,7 +2174,6 @@ throw (RuntimeException)
     if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCase( UIRESOURCETYPE_TOOLBAR ))
     {
         ReadGuard aReadLock( m_aLock );
-        uno::Reference< uno::XInterface > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY );
         ToolbarLayoutManager* pToolbarManager = m_pToolbarManager;
         aReadLock.unlock();
 
@@ -2210,7 +2190,6 @@ throw (RuntimeException)
     if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCase( UIRESOURCETYPE_TOOLBAR ))
     {
         ReadGuard aReadLock( m_aLock );
-        uno::Reference< uno::XInterface > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY );
         ToolbarLayoutManager* pToolbarManager = m_pToolbarManager;
         aReadLock.unlock();
 
@@ -2227,7 +2206,6 @@ throw (uno::RuntimeException)
     if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCase( UIRESOURCETYPE_TOOLBAR ))
     {
         ReadGuard aReadLock( m_aLock );
-        uno::Reference< uno::XInterface > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY );
         ToolbarLayoutManager* pToolbarManager = m_pToolbarManager;
         aReadLock.unlock();
 
@@ -2244,7 +2222,6 @@ throw (RuntimeException)
     if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCase( UIRESOURCETYPE_TOOLBAR ))
     {
         ReadGuard aReadLock( m_aLock );
-        uno::Reference< uno::XInterface > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY );
         ToolbarLayoutManager* pToolbarManager = m_pToolbarManager;
         aReadLock.unlock();
 
@@ -2261,7 +2238,6 @@ throw (RuntimeException)
     if ( getElementTypeFromResourceURL( aName ).equalsIgnoreAsciiCase( UIRESOURCETYPE_TOOLBAR ))
     {
         ReadGuard aReadLock( m_aLock );
-        uno::Reference< uno::XInterface > xToolbarManager( m_xToolbarManager, uno::UNO_QUERY );
         ToolbarLayoutManager* pToolbarManager = m_pToolbarManager;
         aReadLock.unlock();
 
@@ -2436,7 +2412,8 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_
             // Interim solution to let the layout method within the
             // toolbar layout manager.
             implts_setOffset( implts_getStatusBarSize().Height() );
-            m_pToolbarManager->setDockingArea( aDockSpace );
+            if ( m_pToolbarManager )
+                m_pToolbarManager->setDockingArea( aDockSpace );
 
             // Subtract status bar size from our container output size. Docking area windows
             // don't contain the status bar!
@@ -2444,7 +2421,8 @@ sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_
             aContainerSize = implts_getContainerWindowOutputSize();
             aContainerSize.Height() -= aStatusBarSize.Height();
 
-            m_pToolbarManager->doLayout(aContainerSize);
+            if ( m_pToolbarManager )
+                m_pToolbarManager->doLayout(aContainerSize);
 
             // Position the status bar
             if ( aStatusBarSize.Height() > 0 )
@@ -2552,7 +2530,7 @@ awt::Rectangle LayoutManager::implts_calcDockingAreaSizes()
     aReadLock.unlock();
 
     awt::Rectangle aBorderSpace;
-    if ( xDockingAreaAcceptor.is() && xContainerWindow.is() )
+    if ( m_pToolbarManager && xDockingAreaAcceptor.is() && xContainerWindow.is() )
         aBorderSpace = m_pToolbarManager->getDockingArea();
 
     return aBorderSpace;
@@ -2935,7 +2913,6 @@ throw( RuntimeException )
     else if ( rEvent.Source == Reference< XInterface >( m_xContainerWindow, UNO_QUERY ))
     {
         // Our container window gets disposed. Remove all user interface elements.
-        uno::Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager );
         ToolbarLayoutManager* pToolbarManager = m_pToolbarManager;
         if ( pToolbarManager )
         {
@@ -3183,7 +3160,6 @@ void SAL_CALL LayoutManager::setFastPropertyValue_NoBroadcast( sal_Int32       n
             if (( aValue >>= bValue ) && bValue )
             {
                 ReadGuard aReadLock( m_aLock );
-                Reference< ui::XUIConfigurationListener > xToolbarManager( m_xToolbarManager );
                 ToolbarLayoutManager* pToolbarManager = m_pToolbarManager;
                 bool bAutomaticToolbars( m_bAutomaticToolbars );
                 aReadLock.unlock();
commit 49c3be89e826c78a163989ef3190ae9b1d6aba06
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sat Apr 6 19:36:41 2013 +0300

    Bin some not longer interesting NSLogging
    
    Change-Id: I1afd93fc9a56e85a30991bce9ca2350764cf1ec2

diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx
index 4767c46..5b695f2 100644
--- a/vcl/ios/iosinst.cxx
+++ b/vcl/ios/iosinst.cxx
@@ -283,15 +283,9 @@ IMPL_LINK( IosSalInstance, RenderWindows, RenderWindowsArg*, arg )
 {
     int rc;
 
-    NSLog(@"RenderWindows: start");
-
     rc = pthread_mutex_lock( &m_aRenderMutex );
     SAL_WARN_IF( rc != 0, "vcl.ios", "pthread_mutex_lock failed: " << strerror( rc ) );
 
-    NSLog(@"RenderWindows: mutex locked");
-
-    NSDate *a = [NSDate date];
-
     for( std::list< SalFrame* >::const_iterator it = getFrames().begin();
          it != getFrames().end();
          it++ ) {
@@ -325,13 +319,9 @@ IMPL_LINK( IosSalInstance, RenderWindows, RenderWindowsArg*, arg )
     rc = pthread_cond_signal( &m_aRenderCond );
     SAL_WARN_IF( rc != 0, "vcl.ios", "pthread_cond_signal failed:" << strerror( rc ) );
 
-    NSLog(@"RenderWindows: took %f s", [[NSDate date] timeIntervalSinceDate: a]);
-
     rc = pthread_mutex_unlock( &m_aRenderMutex );
     SAL_WARN_IF( rc != 0, "vcl.ios", "pthread_mutex_unlock failed: " << strerror( rc ) );
 
-    NSLog(@"RenderWindows: mutex unlocked");
-
     return 0;
 }
 
@@ -344,16 +334,12 @@ void lo_render_windows( CGContextRef context, CGRect rect )
     if ( pInstance == NULL )
         return;
 
-    NSLog(@"lo_render_windows: start");
-
     rc = pthread_mutex_lock( &pInstance->m_aRenderMutex );
     if (rc != 0) {
         SAL_WARN( "vcl.ios", "pthread_mutex_lock failed: " << strerror( rc ) );
         return;
     }
 
-    NSLog(@"lo_render_windows: mutex locked");
-
     IosSalInstance::RenderWindowsArg arg = { false, context, rect };
     Application::PostUserEvent( LINK( pInstance, IosSalInstance, RenderWindows), &arg );
 
@@ -362,12 +348,8 @@ void lo_render_windows( CGContextRef context, CGRect rect )
         SAL_WARN_IF( rc != 0, "vcl.ios", "pthread_cond_wait failed: " << strerror( rc ) );
     }
 
-    NSLog(@"lo_render_windows: mutex unlocked");
-
     rc = pthread_mutex_unlock( &pInstance->m_aRenderMutex );
     SAL_WARN_IF( rc != 0, "vcl.ios", "pthread_mutex_unlock failed: " << strerror( rc ) );
-
-    NSLog(@"lo_render_windows: done");
 }
 
 extern "C"
commit 9e6afcf1624cbde7cc48c94d9062f91b4b1abbec
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sat Apr 6 19:30:16 2013 +0300

    Pre-cache type_info for com::sun::star::ucb::InteractiveAugmentedIOException
    
    It seems to be the type_info most commonly looked up dynamically, even
    the only one in an initial test. I think it is a good idea to avoid
    dlsym() if possible.
    
    Change-Id: I0379c534e10efefafdd253ee651f6c74e4aa47d5

diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
index b19753f..d0fe43e 100644
--- a/bridges/Library_cpp_uno.mk
+++ b/bridges/Library_cpp_uno.mk
@@ -28,6 +28,7 @@ bridge_cxx_objects := cpp2uno uno2cpp
 else ifeq ($(CPU),R)
 
 ifeq ($(OS),IOS)
+$(eval $(call gb_Library_use_sdk_api,gcc3_uno))
 bridges_SELECTED_BRIDGE := gcc3_ios_arm
 bridge_asm_objects := helper
 bridge_exception_objects := cpp2uno cpp2uno-arm cpp2uno-i386 except uno2cpp uno2cpp-arm uno2cpp-i386
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
index 45c6956..e023297 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
@@ -28,13 +28,13 @@
 #include <osl/mutex.hxx>
 
 #include <com/sun/star/uno/genfunc.hxx>
-#include "com/sun/star/uno/RuntimeException.hpp"
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
 #include <typelib/typedescription.hxx>
 #include <uno/any2.h>
 
 #include "share.hxx"
 
-
 using namespace ::std;
 using namespace ::osl;
 using namespace ::rtl;
@@ -51,8 +51,6 @@ void dummy_can_throw_anything( char const * )
 //==================================================================================================
 static OUString toUNOname( char const * p ) SAL_THROW(())
 {
-    char const * start = p;
-
     // example: N3com3sun4star4lang24IllegalArgumentExceptionE
 
     OUStringBuffer buf( 64 );
@@ -76,15 +74,13 @@ static OUString toUNOname( char const * p ) SAL_THROW(())
 
     OUString result( buf.makeStringAndClear() );
 
-    SAL_INFO( "bridges.ios", "toUNOname():" << start << " => " << result );
-
     return result;
 }
 
 //==================================================================================================
 class RTTI
 {
-    typedef boost::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
+    typedef boost::unordered_map< OUString, const type_info *, OUStringHash > t_rtti_map;
 
     Mutex m_mutex;
     t_rtti_map m_rttis;
@@ -96,12 +92,16 @@ public:
     RTTI() SAL_THROW(());
     ~RTTI() SAL_THROW(());
 
-    type_info * getRTTI( typelib_CompoundTypeDescription * ) SAL_THROW(());
+    const type_info * getRTTI( typelib_CompoundTypeDescription * ) SAL_THROW(());
 };
 //__________________________________________________________________________________________________
 RTTI::RTTI() SAL_THROW(())
     : m_hApp( dlopen( 0, RTLD_LAZY ) )
 {
+    // Insert commonly needed type_infos to avoid dlsym() calls
+    // Ideally we should insert all needed ones
+    m_rttis.insert( t_rtti_map::value_type( "com.sun.star.ucb.InteractiveAugmentedIOException",
+                                            &typeid( com::sun::star::ucb::InteractiveAugmentedIOException ) ) );
 }
 //__________________________________________________________________________________________________
 RTTI::~RTTI() SAL_THROW(())
@@ -110,9 +110,9 @@ RTTI::~RTTI() SAL_THROW(())
 }
 
 //__________________________________________________________________________________________________
-type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THROW(())
+const type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THROW(())
 {
-    type_info * rtti;
+    const type_info * rtti;
 
     OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName;
 
@@ -135,6 +135,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
         buf.append( 'E' );
 
         OString symName( buf.makeStringAndClear() );
+        SAL_INFO( "bridges.ios", "getRTTI: calling dlsym() for type_info for " << unoName );
         rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
 
         if (rtti)
@@ -161,7 +162,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
                 if (pTypeDescr->pBaseTypeDescription)
                 {
                     // ensure availability of base
-                    type_info * base_rtti = getRTTI(
+                    const type_info * base_rtti = getRTTI(
                         (typelib_CompoundTypeDescription *)pTypeDescr->pBaseTypeDescription );
                     rtti = new __si_class_type_info(
                         strdup( rttiName ), (__class_type_info *)base_rtti );
@@ -210,10 +211,10 @@ static void deleteException( void * pExc )
 //==================================================================================================
 void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
 {
-    SAL_INFO( "bridges.ios", "raiseException: " << pUnoExc->pType->pTypeName );
+    SAL_INFO( "bridges.ios", "raiseException: " << *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
 
     void * pCppExc;
-    type_info * rtti;
+    const type_info * rtti;
 
     {
     // construct cpp exception object
@@ -248,7 +249,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
 #endif
         }
     }
-    rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
+    rtti = s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
 
     TYPELIB_DANGER_RELEASE( pTypeDescr );
     OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
@@ -261,7 +262,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
     }
     }
 
-    __cxa_throw( pCppExc, rtti, deleteException );
+    __cxa_throw( pCppExc, (type_info *) rtti, deleteException );
 }
 
 //==================================================================================================
commit 2b8be1c679c40d337b485ae7a29516ed7408d479
Author: Tor Lillqvist <tml at iki.fi>
Date:   Fri Apr 5 10:25:52 2013 +0300

    Simplify after 6215c718a5884ed7301b97dc9f7e3f1d1f9ce96c
    
    Change-Id: If0a6296c9b226c479413b475788d0c11d6ee7318

diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index e4858ab..13a5778 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -961,12 +961,11 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
     m_bVScrollbarEnabled = aUsrPref.IsViewVScrollBar();
     m_bHScrollbarEnabled = aUsrPref.IsViewHScrollBar();
     m_pHScrollbar->SetAuto(bBrowse);
-#if HAVE_FEATURE_DESKTOP
     if( aUsrPref.IsViewHRuler() )
         CreateTab();
     if( aUsrPref.IsViewVRuler() )
         CreateVRuler();
-#endif
+
     m_pWrtShell->SetUIOptions( aUsrPref );
     m_pWrtShell->SetReadOnlyAvailable( aUsrPref.IsCursorInProtectedArea() );
     m_pWrtShell->ApplyAccessiblityOptions(SW_MOD()->GetAccessibilityOptions());
commit 8ed93fef13be39815b452474e9e44bf8b6861ea3
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sat Apr 6 23:43:05 2013 +0300

    We need to acquire the yield mutex here
    
    Otherwise we get an assertion failure in a dbgutil build from the
    DBG_TESTSOLARMUTEX() in OutputDevice::ImplReleaseGraphics() when
    quitting, at least in 64-bit LO on OS X.
    
    Change-Id: Ieb54e6b58033279f807fe91f4f6139018f643903

diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index 3559550..559a192 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -184,6 +184,10 @@ VirtualDevice::~VirtualDevice()
 
     ImplSVData* pSVData = ImplGetSVData();
 
+    // OutputDevice::ImplReleaseGraphics() requires the yield mutex to
+    // be held, hmm.
+    pSVData->mpDefInst->AcquireYieldMutex( 1 );
+
     ImplReleaseGraphics();
 
     if ( mpVirDev )
commit 6a0c8c728dac5437f6a39f995d6ac24668560a99
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sat Apr 6 17:40:53 2013 +0300

    Create a justified line if asked to
    
    The end result is still not satisfactory but it is getting closer.
    
    Oh how nice it would have been to have some clean useful documentation for how
    the text layout machinery works. The number of entry points in the low-level
    "backends" (like CoreTextLayout) is quite small, so I doubt it would have
    required lots of text to document the "protocol" used between the upper layers
    and the layout machinery. Now one just have to use educated guessing aided by
    lots of debugging printout. But this is true for most of the codebase, of
    course.
    
    Change-Id: I791f190819a187418865279f6a5b4aa598e01d3c

diff --git a/vcl/coretext/salcoretextlayout.cxx b/vcl/coretext/salcoretextlayout.cxx
index 3263e0d..64e0d89 100644
--- a/vcl/coretext/salcoretextlayout.cxx
+++ b/vcl/coretext/salcoretextlayout.cxx
@@ -501,6 +501,17 @@ bool CoreTextLayout::InitGIA( ImplLayoutArgs& rArgs ) const
         return false;
     }
 
+    if ( rArgs.mpDXArray ) {
+        CTLineRef justifiedLine = CTLineCreateJustifiedLine( mpLine, 1.0, rArgs.mpDXArray[mnCharCount-1] );
+        if ( !justifiedLine ) {
+            SAL_INFO( "vcl.coretext.layout", "InitGIA(): CTLineCreateJustifiedLine() failed" );
+        } else {
+            SAL_INFO( "vcl.coretext.layout", "InitGIA(): Created justified line" );
+            CFRelease( mpLine );
+            mpLine = justifiedLine;
+        }
+    }
+
     mnGlyphCount = CTLineGetGlyphCount( mpLine );
     SAL_INFO( "vcl.coretext.layout", "InitGIA(): CTLineGetGlyphCount() returned " << mnGlyphCount );
 
commit c925e0d76c835cb331d20293919ab23e096d37f8
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sat Apr 6 17:37:43 2013 +0300

    We have just one element in these tables
    
    Change-Id: I184c8c69f4a9afdb0019193b09f61c65e47d36ae

diff --git a/vcl/coretext/salcoretextlayout.cxx b/vcl/coretext/salcoretextlayout.cxx
index fe7adab..3263e0d 100644
--- a/vcl/coretext/salcoretextlayout.cxx
+++ b/vcl/coretext/salcoretextlayout.cxx
@@ -467,8 +467,8 @@ bool CoreTextLayout::InitGIA( ImplLayoutArgs& rArgs ) const
         return false;
     }
 
-    CFStringRef keys[6];
-    CFTypeRef values[6];
+    CFStringRef keys[1];
+    CFTypeRef values[1];
 
     keys[0] = kCTFontAttributeName;
     values[0] = CFRetain( mpStyle->GetFont() );
commit c4601c03eae7211b2648a2aa3df6cc3719170734
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sat Apr 6 17:25:52 2013 +0300

    Don't return in a (rare?) case without restoring the CGContext state stack
    
    Change-Id: I89040b62c0961be160fcfaa793e48326fa7a584c

diff --git a/vcl/coretext/salcoretextlayout.cxx b/vcl/coretext/salcoretextlayout.cxx
index d33b134..fe7adab 100644
--- a/vcl/coretext/salcoretextlayout.cxx
+++ b/vcl/coretext/salcoretextlayout.cxx
@@ -162,7 +162,6 @@ void CoreTextLayout::DrawText( SalGraphics& rGraphics ) const
     if( mnCharCount <= 0 || !gr.CheckContext() )
         return;
 
-    CGContextSaveGState( gr.mrContext );
     Point pos = GetDrawPosition(Point(0,0));
     SAL_INFO( "vcl.coretext.layout", "at pos (" << pos.X() << "," << pos.Y() <<") ctfont=" << mpStyle->GetFont() );
 
@@ -171,6 +170,7 @@ void CoreTextLayout::DrawText( SalGraphics& rGraphics ) const
         SAL_INFO( "vcl.coretext.layout", "Error cg_font is NULL" );
         return;
     }
+    CGContextSaveGState( gr.mrContext );
     CGContextSetFont(gr.mrContext, cg_font);
     CGContextSetFontSize(gr.mrContext, CTFontGetSize(mpStyle->GetFont()));
     CGContextSetTextDrawingMode(gr.mrContext, kCGTextFill);
commit ad69a033a796d7ed060446fc29721c07191441b0
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sat Apr 6 17:19:19 2013 +0300

    Use CGContextShowGlyphsWithAdvances()
    
    Change-Id: I9373647e5d710acb26c9818e6d06d4bfb862a7df

diff --git a/vcl/coretext/salcoretextlayout.cxx b/vcl/coretext/salcoretextlayout.cxx
index 1732a93..d33b134 100644
--- a/vcl/coretext/salcoretextlayout.cxx
+++ b/vcl/coretext/salcoretextlayout.cxx
@@ -69,7 +69,7 @@ private:
     mutable int* mpCharWidths;          // map relative charpos to charwidth
     mutable int* mpGlyphs2Chars;        // map absolute glyphpos to absolute charpos
 
-    mutable int* mpGlyphAdvances;       // glyph widths for the justified layout
+    mutable CGSize* mpGlyphAdvances;    // glyph advances for the justified layout
 
     mutable CGPoint* mpGlyphPositions;
     mutable CTTypesetterRef mpTypesetter;
@@ -186,7 +186,8 @@ void CoreTextLayout::DrawText( SalGraphics& rGraphics ) const
     CGContextSetTextMatrix(gr.mrContext, CGAffineTransformMakeScale(1.0, -1.0));
     CGContextSetShouldAntialias( gr.mrContext, !gr.mbNonAntialiasedText );
     CGContextTranslateCTM(gr.mrContext, pos.X(), pos.Y());
-    CGContextShowGlyphs(gr.mrContext, mpGlyphs, mnGlyphCount);
+
+    CGContextShowGlyphsWithAdvances(gr.mrContext, mpGlyphs, mpGlyphAdvances, mnGlyphCount);
 
 #ifndef IOS
     // Request an update of the changed window area. Like in the ATSUI
@@ -350,7 +351,7 @@ int CoreTextLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIDs, Point& rPos
         }
         pGlyphIDs[i] = mpGlyphs[mnCurrentGlyphIndex];
         if( pGlyphAdvances ) {
-            pGlyphAdvances[i] = mpGlyphAdvances[mnCurrentGlyphIndex];
+            pGlyphAdvances[i] = mpGlyphAdvances[mnCurrentGlyphIndex].width;
         }
         if( pCharIndexes ) {
             pCharIndexes[i] = mpGlyphs2Chars[mnCurrentGlyphIndex];
@@ -509,7 +510,7 @@ bool CoreTextLayout::InitGIA( ImplLayoutArgs& rArgs ) const
         mpCharWidths[i] = 0.0;
     }
     mpGlyphs2Chars = new int[ mnGlyphCount ];
-    mpGlyphAdvances = new int[ mnGlyphCount ];
+    mpGlyphAdvances = new CGSize[ mnGlyphCount ];
     mpGlyphPositions = new CGPoint[ mnGlyphCount ];
 
     CFArrayRef runs = CTLineGetGlyphRuns( mpLine );
@@ -555,7 +556,8 @@ bool CoreTextLayout::InitGIA( ImplLayoutArgs& rArgs ) const
                         }
                         if( p > 0)
                         {
-                            mpGlyphAdvances[p - 1] = mpGlyphPositions[ p ].x - mpGlyphPositions[p - 1].x;
+                            mpGlyphAdvances[p - 1].width = mpGlyphPositions[ p ].x - mpGlyphPositions[p - 1].x;
+                            mpGlyphAdvances[p - 1].height = mpGlyphPositions[ p ].y - mpGlyphPositions[p - 1].y;
                         }
                     }
                 }
commit 3780597178b9074e4896588fb0c68a708ae26133
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sat Apr 6 17:14:09 2013 +0300

    Take trailing whitesapce into consideration
    
    CTLineGetImageBounds() does not include space taken by trailing whitespace in
    the line.
    
    Change-Id: I403906daed952bac58fa11634beb6c7faa39b9b3

diff --git a/vcl/coretext/salcoretextlayout.cxx b/vcl/coretext/salcoretextlayout.cxx
index c82381b..1732a93 100644
--- a/vcl/coretext/salcoretextlayout.cxx
+++ b/vcl/coretext/salcoretextlayout.cxx
@@ -263,7 +263,14 @@ bool CoreTextLayout::GetBoundRect( SalGraphics& rGraphics, Rectangle& rVCLRect )
             maBoundRectangle = Rectangle(
                 Point( round_to_long(bound_rect.origin.x * mpStyle->GetFontStretchFactor()),
                        round_to_long(bound_rect.origin.y - bound_rect.size.height )),
-                Size( round_to_long(bound_rect.size.width * mpStyle->GetFontStretchFactor()), round_to_long(bound_rect.size.height)));
+                Size( round_to_long((bound_rect.size.width + CTLineGetTrailingWhitespaceWidth( mpLine )) * mpStyle->GetFontStretchFactor()),
+                      round_to_long(bound_rect.size.height)));
+            maBoundRectangle.Justify();
+        } else {
+            maBoundRectangle = Rectangle(
+                Point( 0, 0 ),
+                Size( round_to_long(CTLineGetTrailingWhitespaceWidth( mpLine ) * mpStyle->GetFontStretchFactor()),
+                      0 ) );
             maBoundRectangle.Justify();
         }
         mbHasBoundRectangle = true;
@@ -422,7 +429,7 @@ long CoreTextLayout::GetTextWidth() const
         return 0;
     }
     CGRect bound_rect = CTLineGetImageBounds(mpLine, context);
-    long w = round_to_long(bound_rect.size.width * mpStyle->GetFontStretchFactor());
+    long w = round_to_long((bound_rect.size.width + CTLineGetTrailingWhitespaceWidth(mpLine)) * mpStyle->GetFontStretchFactor());
 
     SAL_INFO( "vcl.coretext.layout", "GetTextWidth(" << this << ") returning " << w );
 
commit ffd4c2e40eca03445ab2c77468f661d691adc31e
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sat Apr 6 14:04:59 2013 +0300

    Try calling RefreshRect() in DrawText() like in the ATSUI code
    
    But like there, I don't know if it actually is needed or not.
    
    Change-Id: I25bf5d8cf160b56ee4deb47ab9774313eb9590c8

diff --git a/vcl/coretext/salcoretextlayout.cxx b/vcl/coretext/salcoretextlayout.cxx
index 7b1ee3a..c82381b 100644
--- a/vcl/coretext/salcoretextlayout.cxx
+++ b/vcl/coretext/salcoretextlayout.cxx
@@ -20,6 +20,7 @@
 #include <iostream>
 #include <iomanip>
 
+#include "quartz/utils.h"
 #include "coretext/common.h"
 #include "coretext/salcoretextstyle.hxx"
 
@@ -187,6 +188,29 @@ void CoreTextLayout::DrawText( SalGraphics& rGraphics ) const
     CGContextTranslateCTM(gr.mrContext, pos.X(), pos.Y());
     CGContextShowGlyphs(gr.mrContext, mpGlyphs, mnGlyphCount);
 
+#ifndef IOS
+    // Request an update of the changed window area. Like in the ATSUI
+    // code, I am not sure if this is actually necessary. Once this
+    // seems to work fine otherwise, let's try removing this.
+    if( gr.IsWindowGraphics() )
+    {
+        CGRect drawRect = CTLineGetImageBounds( mpLine, gr.mrContext );
+        SAL_INFO( "vcl.coretext.layout", "drawRect=" << drawRect );
+        if( !CGRectIsNull( drawRect ) ) {
+#if 1
+            // For kicks, try the same silly (?) enlarging of the
+            // rectangle as in the ATSUI code
+            drawRect.origin.y -= drawRect.size.height;
+            drawRect.size.height += 2*drawRect.size.height;
+            SAL_INFO( "vcl.coretext.layout", "after enlarging drawRect=" << drawRect );
+#endif
+            drawRect = CGContextConvertRectToDeviceSpace( gr.mrContext, drawRect );
+            SAL_INFO( "vcl.coretext.layout", "after convert: drawRect=" << drawRect );
+            gr.RefreshRect( drawRect );
+        }
+    }
+#endif
+
     // restore the original graphic context transformations
     CGContextRestoreGState( gr.mrContext );
 }
commit cbb8b5db244c83062a02fb241a4a70dad381704b
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sat Apr 6 13:59:15 2013 +0300

    Bin some #if 0 code
    
    Change-Id: I6f185b4f55418e44956f9dd51e1e300f553ac355

diff --git a/vcl/coretext/salcoretextlayout.cxx b/vcl/coretext/salcoretextlayout.cxx
index 2cbe46a..7b1ee3a 100644
--- a/vcl/coretext/salcoretextlayout.cxx
+++ b/vcl/coretext/salcoretextlayout.cxx
@@ -163,14 +163,6 @@ void CoreTextLayout::DrawText( SalGraphics& rGraphics ) const
 
     CGContextSaveGState( gr.mrContext );
     Point pos = GetDrawPosition(Point(0,0));
-#if 0
-    SAL_INFO( "vcl.coretext.layout", "at pos (" << pos.X() << "," << pos.Y() << ")" );
-
-    CGContextSetTextMatrix(gr.mrContext, CGAffineTransformMakeScale(1.0, -1.0));
-    CGContextSetShouldAntialias( gr.mrContext, !gr.mbNonAntialiasedText );
-    CGContextSetTextPosition(gr.mrContext, pos.X(), pos.Y());
-    CTLineDraw(mpLine, gr.mrContext);
-#else
     SAL_INFO( "vcl.coretext.layout", "at pos (" << pos.X() << "," << pos.Y() <<") ctfont=" << mpStyle->GetFont() );
 
     CGFontRef cg_font = CTFontCopyGraphicsFont(mpStyle->GetFont(), NULL);
@@ -194,7 +186,7 @@ void CoreTextLayout::DrawText( SalGraphics& rGraphics ) const
     CGContextSetShouldAntialias( gr.mrContext, !gr.mbNonAntialiasedText );
     CGContextTranslateCTM(gr.mrContext, pos.X(), pos.Y());
     CGContextShowGlyphs(gr.mrContext, mpGlyphs, mnGlyphCount);
-#endif
+
     // restore the original graphic context transformations
     CGContextRestoreGState( gr.mrContext );
 }
commit a9c1586fc05e4c286a8fb6e651d423051eaf63ef
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sat Apr 6 13:57:08 2013 +0300

    mpChars2Glyphs is unused
    
    Change-Id: Ie98d242777cec92db6512f53fe102ecc65dc469c

diff --git a/vcl/coretext/salcoretextlayout.cxx b/vcl/coretext/salcoretextlayout.cxx
index 8aa3760..2cbe46a 100644
--- a/vcl/coretext/salcoretextlayout.cxx
+++ b/vcl/coretext/salcoretextlayout.cxx
@@ -66,7 +66,6 @@ private:
 
     mutable CGGlyph* mpGlyphs;          // glyphs
     mutable int* mpCharWidths;          // map relative charpos to charwidth
-    mutable int* mpChars2Glyphs;        // map relative charpos to absolute glyphpos
     mutable int* mpGlyphs2Chars;        // map absolute glyphpos to absolute charpos
 
     mutable int* mpGlyphAdvances;       // glyph widths for the justified layout
@@ -94,7 +93,6 @@ CoreTextLayout::CoreTextLayout(QuartzSalGraphics* graphics, CoreTextStyleInfo* s
     mnGlyphCount(-1),
     mpGlyphs(NULL),
     mpCharWidths(NULL),
-    mpChars2Glyphs(NULL),
     mpGlyphs2Chars(NULL),
     mpGlyphAdvances(NULL),
     mpGlyphPositions(NULL),
@@ -134,10 +132,6 @@ void CoreTextLayout::InvalidateMeasurements()
         delete[] mpGlyphs;
         mpGlyphs = NULL;
     }
-    if( mpChars2Glyphs ) {
-        delete[] mpChars2Glyphs;
-        mpChars2Glyphs = NULL;
-    }
     if( mpGlyphs2Chars ) {
         delete[] mpGlyphs2Chars;
         mpGlyphs2Chars = NULL;
@@ -488,10 +482,8 @@ bool CoreTextLayout::InitGIA( ImplLayoutArgs& rArgs ) const
 
     mpGlyphs = new CGGlyph[ mnGlyphCount ];
     mpCharWidths = new int[ mnCharCount ];
-    mpChars2Glyphs = new int[ mnCharCount ];
     for( int i = 0; i < mnCharCount; ++i) {
         mpCharWidths[i] = 0.0;
-        mpChars2Glyphs[i] = -1;
     }
     mpGlyphs2Chars = new int[ mnGlyphCount ];
     mpGlyphAdvances = new int[ mnGlyphCount ];
@@ -533,7 +525,6 @@ bool CoreTextLayout::InitGIA( ImplLayoutArgs& rArgs ) const
                         CFIndex k = indices[ j ];
                         mpGlyphs2Chars[p] = k;
                         assert( k < mnCharCount );
-                        mpChars2Glyphs[k] = p;
 
                         if ( j < nb_glyphs - 1 )
                         {
commit 4478145e7be87be9df6b38f44b5cf3ad44cf03a2
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sat Apr 6 13:50:26 2013 +0300

    Add comments to some questionable code
    
    Change-Id: I06121b065f360ecfeddb25c9e1487f4849e453a2

diff --git a/vcl/aqua/source/gdi/atsui/salatslayout.cxx b/vcl/aqua/source/gdi/atsui/salatslayout.cxx
index ec28a70..ad62d01 100644
--- a/vcl/aqua/source/gdi/atsui/salatslayout.cxx
+++ b/vcl/aqua/source/gdi/atsui/salatslayout.cxx
@@ -452,6 +452,13 @@ void ATSLayout::DrawText( SalGraphics& rGraphics ) const
         }
     }
 
+#if 1
+    // I am not sure at all if this code actually is needed; putting
+    // it in #if 0 didn't seem to cause any immediately visible bad
+    // effect. Aybody know? But I guess, better safe than sorry, so
+    // let's keep it in for now. This ATSUI-using code is destined for
+    // the bin anyway...
+
     // request an update of the changed window area
     if( rAquaGraphics.IsWindowGraphics() )
     {
@@ -462,6 +469,12 @@ void ATSLayout::DrawText( SalGraphics& rGraphics ) const
         {
             // FIXME: transformation from baseline to top left
             // with the simple approach below we invalidate too much
+
+            // Indeed, this simply triples the rectangle's height,
+            // enlarging it on top and bottom with its old height!? Is
+            // that really necessary? (Sure, it can't harm, but it
+            // seems silly. But OTOH, see comment above.)
+
             short d = drawRect.bottom - drawRect.top;
             drawRect.top -= d;
             drawRect.bottom += d;
@@ -472,7 +485,7 @@ void ATSLayout::DrawText( SalGraphics& rGraphics ) const
             rAquaGraphics.RefreshRect( aRect );
         }
     }
-
+#endif
     // restore the original graphic context transformations
     CGContextRestoreGState( rAquaGraphics.mrContext );
 }
commit ca9ceb2011d4597cee4df1987a9a806bc95a6f65
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sat Apr 6 13:43:29 2013 +0300

    Log the ImplLayoutArgs parameter in AdjustLayout().
    
    Change-Id: Ib875973d31f71bab75973f683621118eb9cb927b

diff --git a/vcl/aqua/source/gdi/atsui/salatslayout.cxx b/vcl/aqua/source/gdi/atsui/salatslayout.cxx
index 55f391c..ec28a70 100644
--- a/vcl/aqua/source/gdi/atsui/salatslayout.cxx
+++ b/vcl/aqua/source/gdi/atsui/salatslayout.cxx
@@ -301,8 +301,7 @@ bool ATSLayout::LayoutText( ImplLayoutArgs& rArgs )
 **/
 void ATSLayout::AdjustLayout( ImplLayoutArgs& rArgs )
 {
-    SAL_INFO("vcl.atsui.layout", "AdjustLayout(" << this << "): " <<
-             rArgs.mnLength << ":" << rArgs.mnMinCharPos << "--" << rArgs.mnEndCharPos << ", width=" << rArgs.mnLayoutWidth);
+    SAL_INFO("vcl.atsui.layout", "AdjustLayout(" << this << ",rArgs=" << rArgs << ")" );
     int nOrigWidth = GetTextWidth();
     int nPixelWidth = rArgs.mnLayoutWidth;
     if( !nPixelWidth && rArgs.mpDXArray ) {
@@ -382,6 +381,8 @@ void ATSLayout::AdjustLayout( ImplLayoutArgs& rArgs )
 **/
 void ATSLayout::DrawText( SalGraphics& rGraphics ) const
 {
+    SAL_INFO( "vcl.atsui.layout", "DrawText(" << this << ") mnCharCount=" << mnCharCount << ", mnGlyphCount=" << mnGlyphCount );
+
     AquaSalGraphics& rAquaGraphics = static_cast<AquaSalGraphics&>(rGraphics);
 
     // short circuit if there is nothing to do
@@ -734,11 +735,12 @@ long ATSLayout::FillDXArray( sal_Int32* pDXArray ) const
 **/
 int ATSLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const
 {
-    SAL_INFO("vcl.atsui.layout", "GetTextBreak(" << this << "," << nCharExtra << "," << nFactor << ")" <<
-             (maATSULayout == NULL ? " no layout" : ""));
+    SAL_INFO("vcl.atsui.layout", "GetTextBreak(" << this << ",nMaxWidth=" << nMaxWidth << ",nCharExtra=" << nCharExtra << ",nFactor=" << nFactor << ")" );
 
-    if( !maATSULayout )
+    if( !maATSULayout ) {
+        SAL_INFO( "vcl.atsui.layout", "GetTextBreak(): no maATSULayout, returning STRING_LEN" );
         return STRING_LEN;
+    }
 
     // the semantics of the legacy use case (nCharExtra!=0) cannot be mapped to ATSUBreakLine()
     if( nCharExtra != 0 )
commit efe842ab529646061756e0dfe9b19f8b43a31385
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sat Apr 6 13:35:41 2013 +0300

    Add operator<< for CGRect for SAL_INFO goodness
    
    Change-Id: I144c93d0bdd8758dcdf490f29051c8dcaea500d8

diff --git a/vcl/inc/quartz/utils.h b/vcl/inc/quartz/utils.h
index 01b1f13..c23c484 100644
--- a/vcl/inc/quartz/utils.h
+++ b/vcl/inc/quartz/utils.h
@@ -20,18 +20,22 @@
 #ifndef INCLUDED_QUARTZ_UTILS_HXX
 #define INCLUDED_QUARTZ_UTILS_HXX
 
-#include <rtl/ustring.hxx>
+#include <iostream>
 
 #include <premac.h>
 #include <CoreFoundation/CoreFoundation.h>
 #include <Foundation/Foundation.h>
 #include <postmac.h>
 
+#include <rtl/ustring.hxx>
+
 rtl::OUString GetOUString( CFStringRef );
 rtl::OUString GetOUString( NSString* );
 CFStringRef CreateCFString( const rtl::OUString& );
 NSString* CreateNSString( const rtl::OUString& );
 
+std::ostream &operator <<(std::ostream& s, CGRect &rRect);
+
 #endif // INCLUDED_QUARTZ_UTILS_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/quartz/utils.cxx b/vcl/quartz/utils.cxx
index c2db4d2..8319752 100644
--- a/vcl/quartz/utils.cxx
+++ b/vcl/quartz/utils.cxx
@@ -17,6 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <iostream>
+#include <iomanip>
+
 #include <rtl/alloc.h>
 #include <rtl/ustrbuf.hxx>
 
@@ -64,4 +67,14 @@ NSString* CreateNSString( const rtl::OUString& rStr )
     return [[NSString alloc] initWithCharacters: rStr.getStr() length: rStr.getLength()];
 }
 
+std::ostream &operator <<(std::ostream& s, CGRect &rRect)
+{
+#ifndef SAL_LOG_INFO
+    (void) rRect;
+#else
+    s << (int) rRect.size.width << "x" << (int) rRect.size.height << "@(" << (int) rRect.origin.x << "," << (int) rRect.origin.y << ")";
+#endif
+    return s;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list