[Libreoffice-commits] .: vcl/ios

2012-12-22 Thread Libreoffice Gerrit user
 vcl/ios/source/gdi/salbmp.cxx   |4 +--
 vcl/ios/source/gdi/salcoretextstyle.cxx |2 -
 vcl/ios/source/gdi/salgdicommon.cxx |   34 
 vcl/ios/source/gdi/salvd.cxx|2 -
 vcl/ios/source/window/salframe.cxx  |2 -
 vcl/ios/source/window/salobj.cxx|4 +--
 6 files changed, 24 insertions(+), 24 deletions(-)

New commits:
commit 305ccd4f4754e47de021b38081729c30f161bef5
Author: Tor Lillqvist t...@iki.fi
Date:   Sun Dec 23 01:07:15 2012 +0200

WaE: non-constant-expression cannot be narrowed

Change-Id: I401fd149e62d74a96edfc2a7e5105fb2cc95f0c7

diff --git a/vcl/ios/source/gdi/salbmp.cxx b/vcl/ios/source/gdi/salbmp.cxx
index 201c918..4bd1d45 100644
--- a/vcl/ios/source/gdi/salbmp.cxx
+++ b/vcl/ios/source/gdi/salbmp.cxx
@@ -88,7 +88,7 @@ bool IosSalBitmap::Create( CGLayerRef xLayer, int nBitmapBits,
 CreateContext();
 
 // copy layer content into the bitmap buffer
-const CGPoint aSrcPoint = { -nX, -nY };
+const CGPoint aSrcPoint = { static_castCGFloat(-nX), 
static_castCGFloat(-nY) };
 ::CGContextDrawLayerAtPoint( mxGraphicContext, aSrcPoint, xLayer );
 return true;
 }
@@ -731,7 +731,7 @@ CGImageRef IosSalBitmap::CreateCroppedImage( int nX, int 
nY, int nNewWidth, int
 else
 {
 nY = mnHeight - (nY + nNewHeight); // adjust for y-mirrored context
-const CGRect aCropRect = {{nX, nY}, {nNewWidth, nNewHeight}};
+const CGRect aCropRect = { { static_castCGFloat(nX), 
static_castCGFloat(nY)}, { static_castCGFloat(nNewWidth), 
static_castCGFloat(nNewHeight) } };
 xCroppedImage = CGImageCreateWithImageInRect( mxCachedImage, aCropRect 
);
 }
 
diff --git a/vcl/ios/source/gdi/salcoretextstyle.cxx 
b/vcl/ios/source/gdi/salcoretextstyle.cxx
index 6b49e23..46d11bc 100644
--- a/vcl/ios/source/gdi/salcoretextstyle.cxx
+++ b/vcl/ios/source/gdi/salcoretextstyle.cxx
@@ -98,7 +98,7 @@ void CoreTextStyleInfo::SetColor(SalColor color)
 msgs_debug(style, r:%d g:%d b:%d --, SALCOLOR_RED(color), 
SALCOLOR_GREEN(color), SALCOLOR_BLUE(color));
 SafeCFRelease(m_color);
 CGColorSpaceRef rgb_space = CGColorSpaceCreateDeviceRGB();
-CGFloat c[] = { SALCOLOR_RED(color) / 255.0, SALCOLOR_GREEN(color) / 
255.0, SALCOLOR_BLUE(color) / 255.0, 1.0 };
+CGFloat c[] = { SALCOLOR_RED(color) / 255.0f, SALCOLOR_GREEN(color) / 
255.0f, SALCOLOR_BLUE(color) / 255.0f, 1.0 };
 m_color = CGColorCreate(rgb_space, c);
 CGColorSpaceRelease(rgb_space);
 msgs_debug(style,color=%p --, m_color);
diff --git a/vcl/ios/source/gdi/salgdicommon.cxx 
b/vcl/ios/source/gdi/salgdicommon.cxx
index 0b960da..615852c 100644
--- a/vcl/ios/source/gdi/salgdicommon.cxx
+++ b/vcl/ios/source/gdi/salgdicommon.cxx
@@ -314,7 +314,7 @@ void IosSalGraphics::copyBits( const SalTwoRect *pPosAry, 
SalGraphics *pSrcGraph
 
 DBG_ASSERT( pSrc-mxLayer!=NULL, IosSalGraphics::copyBits() from 
non-layered graphics );
 
-const CGPoint aDstPoint = { +pPosAry-mnDestX - pPosAry-mnSrcX, 
pPosAry-mnDestY - pPosAry-mnSrcY };
+const CGPoint aDstPoint = { static_castCGFloat(+pPosAry-mnDestX - 
pPosAry-mnSrcX), static_castCGFloat(pPosAry-mnDestY - pPosAry-mnSrcY) };
 if( (pPosAry-mnSrcWidth == pPosAry-mnDestWidth 
  pPosAry-mnSrcHeight == pPosAry-mnDestHeight) 
 (!mnBitmapDepth || (aDstPoint.x + pSrc-mnWidth) = mnWidth) ) // 
workaround a Quartz crasher
@@ -330,7 +330,7 @@ void IosSalGraphics::copyBits( const SalTwoRect *pPosAry, 
SalGraphics *pSrcGraph
 }
 }
 CGContextSaveGState( xCopyContext );
-const CGRect aDstRect = { {pPosAry-mnDestX, pPosAry-mnDestY}, 
{pPosAry-mnDestWidth, pPosAry-mnDestHeight} };
+const CGRect aDstRect = { { static_castCGFloat(pPosAry-mnDestX), 
static_castCGFloat(pPosAry-mnDestY) }, { 
static_castCGFloat(pPosAry-mnDestWidth), 
static_castCGFloat(pPosAry-mnDestHeight) } };
 CGContextClipToRect( xCopyContext, aDstRect );
 
 // draw at new destination
@@ -447,10 +447,10 @@ void IosSalGraphics::copyArea( long nDstX, long 
nDstY,long nSrcX, long nSrcY,
 CGLayerRef xSrcLayer = mxLayer;
 // TODO: if( mnBitmapDepth  0 )
 {
-const CGSize aSrcSize = { nSrcWidth, nSrcHeight };
+const CGSize aSrcSize = { static_castCGFloat(nSrcWidth), 
static_castCGFloat(nSrcHeight) };
 xSrcLayer = ::CGLayerCreateWithContext( xCopyContext, aSrcSize, NULL );
 const CGContextRef xSrcContext = CGLayerGetContext( xSrcLayer );
-CGPoint aSrcPoint = { -nSrcX, -nSrcY };
+CGPoint aSrcPoint = { static_castCGFloat(-nSrcX), 
static_castCGFloat(-nSrcY) };
 if( IsFlipped() )
 {
 ::CGContextTranslateCTM( xSrcContext, 0, +nSrcHeight );
@@ -461,7 +461,7 @@ void IosSalGraphics::copyArea( long nDstX, long nDstY,long 
nSrcX, long nSrcY,
 }
 
 // draw at new destination
-const CGPoint aDstPoint = { +nDstX, +nDstY };
+const CGPoint aDstPoint = { 

[Libreoffice-commits] .: vcl/ios

2012-11-12 Thread Libreoffice Gerrit user
 vcl/ios/source/gdi/salgdicommon.cxx |   22 --
 1 file changed, 22 deletions(-)

New commits:
commit 23d71899fe45ea5ab09045decaf4b357349bfb52
Author: Tor Lillqvist tlillqv...@suse.com
Date:   Mon Nov 12 17:02:39 2012 +0200

Un-break accidental mis-merge, or something

Change-Id: I13146dc6d1d854dd620f79f2f7e7b22f8bdb71b2

diff --git a/vcl/ios/source/gdi/salgdicommon.cxx 
b/vcl/ios/source/gdi/salgdicommon.cxx
index 3e67ccd..3e982b8 100644
--- a/vcl/ios/source/gdi/salgdicommon.cxx
+++ b/vcl/ios/source/gdi/salgdicommon.cxx
@@ -685,28 +685,6 @@ bool IosSalGraphics::drawPolyLine(
 {
 return false;
 }
-// setup cap attribute
-CGLineCap aCGLineCap(kCGLineCapButt);
-
-switch(eLineCap)
-{
-default: // com::sun::star::drawing::LineCap_BUTT:
-{
-aCGLineCap = kCGLineCapButt;
-break;
-}
-case com::sun::star::drawing::LineCap_ROUND:
-{
-aCGLineCap = kCGLineCapRound;
-break;
-}
-case com::sun::star::drawing::LineCap_SQUARE:
-{
-aCGLineCap = kCGLineCapSquare;
-break;
-}
-}
-
 // setup line attributes
 CGLineJoin aCGLineJoin = kCGLineJoinMiter;
 switch( eLineJoin )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/ios

2012-09-04 Thread Libreoffice Gerrit user
 vcl/ios/source/gdi/salcoretextlayout.cxx |   13 +
 1 file changed, 13 insertions(+)

New commits:
commit 8951ef03b9e99ce468d063c2793a724558af27dc
Author: Tor Lillqvist t...@iki.fi
Date:   Tue Sep 4 09:40:57 2012 +0300

Workaround for crash on iOS

Change-Id: I947f7def862d2a238dc609a91d898f03dbd72b84

diff --git a/vcl/ios/source/gdi/salcoretextlayout.cxx 
b/vcl/ios/source/gdi/salcoretextlayout.cxx
index 99151e8..ff6552f 100644
--- a/vcl/ios/source/gdi/salcoretextlayout.cxx
+++ b/vcl/ios/source/gdi/salcoretextlayout.cxx
@@ -421,6 +421,19 @@ bool CoreTextLayout::LayoutText(ImplLayoutArgs args)
 {
 return false;
 }
+
+// If the string contains U+FFFD (REPLACEMENT CHARACTER), which
+// happens at least for the ooo80484-1.slk document in
+// sc_filters_test, the CTTypesetterCreateWithAttributedString()
+// call below crashes, at least in the iOS simulator. Go figure.
+// (In that case the string consists of *only* such characters,
+// but play it safe.
+for (int i = 0; i  m_chars_count; i++)
+{
+if (args.mpStr[args.mnMinCharPos+i] == 0xFFFD)
+return false;
+}
+
 /* c0 and c1 are construction objects */
 CFStringRef c0 = CFStringCreateWithCharactersNoCopy( NULL, 
(args.mpStr[args.mnMinCharPos]), m_chars_count, kCFAllocatorNull );
 if ( !c0 )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/ios

2011-09-27 Thread Tor Lillqvist
 vcl/ios/source/dtrans/ios_clipboard.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 296823ab8634b0980fc8fe81a2de2b043d036179
Author: Tor Lillqvist t...@iki.fi
Date:   Tue Sep 27 22:35:24 2011 +0300

More WaE fixes for iOS

diff --git a/vcl/ios/source/dtrans/ios_clipboard.cxx 
b/vcl/ios/source/dtrans/ios_clipboard.cxx
index 69f9473..a59d023 100644
--- a/vcl/ios/source/dtrans/ios_clipboard.cxx
+++ b/vcl/ios/source/dtrans/ios_clipboard.cxx
@@ -184,8 +184,8 @@ ReferenceXTransferable SAL_CALL 
IosClipboard::getContents() throw(RuntimeExcep
 }
 
 
-void SAL_CALL IosClipboard::setContents(const ReferenceXTransferable 
xTransferable,
-const ReferenceXClipboardOwner xClipboardOwner)
+void SAL_CALL IosClipboard::setContents(const ReferenceXTransferable 
/*xTransferable*/,
+const ReferenceXClipboardOwner 
/*xClipboardOwner*/)
 throw( RuntimeException )
 {
 #if 0 // ???
@@ -321,7 +321,7 @@ void 
IosClipboard::fireLostClipboardOwnershipEvent(ReferenceXClipboardOwner ol
 }
 
 
-void IosClipboard::provideDataForType(UIPasteboard* sender, NSString* type)
+void IosClipboard::provideDataForType(UIPasteboard* /*sender*/, NSString* 
/*type*/)
 {
 #if 0 // ???
 if( mXClipboardContent.is() )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits