[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/coretext
Tor Lillqvist
tml at iki.fi
Thu Jun 20 04:08:22 PDT 2013
vcl/coretext/ctlayout.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit f36acaebced66333bea26f9f99c599bd9e6b9ed3
Author: Tor Lillqvist <tml at iki.fi>
Date: Tue Jun 4 16:56:16 2013 +0300
Avoid crash on iOS: We need to get a valid context here
Change-Id: Ib3fc01213fc6bc370a6c8b774a063f6f275ba6f2
(cherry picked from commit 35b0a4cd274c1567cf0b8067eb01f17b82ee9f35)
Reviewed-on: https://gerrit.libreoffice.org/4379
Reviewed-by: Noel Power <noel.power at suse.com>
Tested-by: Noel Power <noel.power at suse.com>
diff --git a/vcl/coretext/ctlayout.cxx b/vcl/coretext/ctlayout.cxx
index a4f242d..81105e2 100644
--- a/vcl/coretext/ctlayout.cxx
+++ b/vcl/coretext/ctlayout.cxx
@@ -432,6 +432,12 @@ void CTLayout::GetCaretPositions( int nMaxIndex, sal_Int32* pCaretXArray ) const
bool CTLayout::GetBoundRect( SalGraphics& rGraphics, Rectangle& rVCLRect ) const
{
AquaSalGraphics& rAquaGraphics = static_cast<AquaSalGraphics&>(rGraphics);
+
+#ifdef IOS
+ if( !rAquaGraphics.CheckContext() )
+ return false;
+#endif
+
CGRect aMacRect = CTLineGetImageBounds( mpCTLine, rAquaGraphics.mrContext );
CGPoint aMacPos = CGContextGetTextPosition( rAquaGraphics.mrContext );
aMacRect.origin.x -= aMacPos.x;
More information about the Libreoffice-commits
mailing list