From 4bdd4e57a3cd6b22f6d36e7027774312950014aa Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Fri, 17 Jun 2011 01:39:10 +0300 Subject: Deliver also static libraries --- canvas/prj/d.lst | 1 + 1 file changed, 1 insertion(+) (limited to 'canvas') diff --git a/canvas/prj/d.lst b/canvas/prj/d.lst index 8c4a583f8e75..933e11490b82 100644 --- a/canvas/prj/d.lst +++ b/canvas/prj/d.lst @@ -14,6 +14,7 @@ ..\%__SRC%\lib\simplecanvas.uno.so %_DEST%\lib\simplecanvas.uno.so ..\%__SRC%\lib\canvasfactory.uno.so %_DEST%\lib\canvasfactory.uno.so ..\%__SRC%\lib\*.dylib %_DEST%\lib\*.dylib +..\%__SRC%\lib\*.a %_DEST%\lib\*.a ..\%__SRC%\class\javacanvas.uno.jar %_DEST%\bin\javacanvas.uno.jar ..\%__SRC%\misc\cairocanvas.component %_DEST%\xml\cairocanvas.component -- cgit From 0e6ab013f7def9891c2e982bec76458a64953c20 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Mon, 30 May 2011 18:09:09 +0200 Subject: ause130: #i117218# change .idl handling to gnu make --- canvas/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'canvas') diff --git a/canvas/prj/build.lst b/canvas/prj/build.lst index 121be382208f..dad6e28c0ea5 100644 --- a/canvas/prj/build.lst +++ b/canvas/prj/build.lst @@ -1,4 +1,4 @@ -cv canvas : javaunohelper comphelper cppuhelper offuh unoil tools svtools vcl basegfx CAIRO:cairo LIBXSLT:libxslt NULL +cv canvas : javaunohelper comphelper cppuhelper offapi unoil tools svtools vcl basegfx CAIRO:cairo LIBXSLT:libxslt NULL cv canvas usr1 - all cv_mkout NULL cv canvas\inc nmake - all cv_inc NULL cv canvas\source\tools nmake - all cv_tools cv_inc NULL -- cgit From 224b2a46820a320b196c1c4a339fe77d80235c27 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Wed, 22 Jun 2011 15:42:50 +0200 Subject: fix condition for compositing surface refresh - fixes problems on slideshow window shrinking --- canvas/source/cairo/cairo_spritecanvashelper.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'canvas') diff --git a/canvas/source/cairo/cairo_spritecanvashelper.cxx b/canvas/source/cairo/cairo_spritecanvashelper.cxx index cdac16cbf8b7..75a8884df252 100644 --- a/canvas/source/cairo/cairo_spritecanvashelper.cxx +++ b/canvas/source/cairo/cairo_spritecanvashelper.cxx @@ -524,8 +524,8 @@ namespace cairocanvas ::cairo::SurfaceSharedPtr SpriteCanvasHelper::getCompositingSurface( const ::basegfx::B2ISize& rNeededSize ) { - if( rNeededSize.getX() < maCompositingSurfaceSize.getX() || - rNeededSize.getY() < maCompositingSurfaceSize.getY() ) + if( rNeededSize.getX() > maCompositingSurfaceSize.getX() || + rNeededSize.getY() > maCompositingSurfaceSize.getY() ) { // need to give buffer more size mpCompositingSurface.reset(); -- cgit From 1e409eadc59ac9164b1af01a821ea26c1167cdb2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 29 Jun 2011 16:22:09 +0100 Subject: make cairo an unconditional requirement for text rendering --- canvas/prj/build.lst | 2 +- canvas/source/cairo/makefile.mk | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'canvas') diff --git a/canvas/prj/build.lst b/canvas/prj/build.lst index dad6e28c0ea5..4719f157dfca 100644 --- a/canvas/prj/build.lst +++ b/canvas/prj/build.lst @@ -4,7 +4,7 @@ cv canvas\inc nmake - all cv_inc NULL cv canvas\source\tools nmake - all cv_tools cv_inc NULL cv canvas\source\vcl nmake - all cv_vcl cv_tools cv_inc NULL cv canvas\source\simplecanvas nmake - all cv_simplecanvas cv_tools cv_inc NULL -cv canvas\source\cairo nmake - all cv_cairo cv_tools cv_inc NULL +cv canvas\source\cairo nmake - u cv_cairo cv_tools cv_inc NULL cv canvas\source\directx nmake - w cv_directx cv_tools cv_inc NULL cv canvas\source\null nmake - all cv_null cv_tools cv_inc NULL cv canvas\source\factory nmake - all cv_factory cv_inc NULL diff --git a/canvas/source/cairo/makefile.mk b/canvas/source/cairo/makefile.mk index bde5fac59a2e..3be1d52e6c3b 100644 --- a/canvas/source/cairo/makefile.mk +++ b/canvas/source/cairo/makefile.mk @@ -37,17 +37,11 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk DLLPRE = -# --- Nothing to do if we're compiling with --disable-cairo ----------- -.IF "$(ENABLE_CAIRO)" != "TRUE" -@all: - @echo "Building without cairo support..." -.ELSE # --- X11 Mac build currently doesn't work with cairo ----------- .IF "$(OS)" == "MACOSX" && "$(GUIBASE)" == "unx" @all: @echo "Cannot build cairocanvas with X11..." .ENDIF -.ENDIF # --- Common ---------------------------------------------------------- -- cgit From 0bcbc58743199aacbd0beb7f096974c943065a11 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 4 Jul 2011 21:26:01 +0300 Subject: Cannot build cairocanvas without cairo --- canvas/source/cairo/makefile.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'canvas') diff --git a/canvas/source/cairo/makefile.mk b/canvas/source/cairo/makefile.mk index 3be1d52e6c3b..076deb2f17bf 100644 --- a/canvas/source/cairo/makefile.mk +++ b/canvas/source/cairo/makefile.mk @@ -37,12 +37,16 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk DLLPRE = -# --- X11 Mac build currently doesn't work with cairo ----------- .IF "$(OS)" == "MACOSX" && "$(GUIBASE)" == "unx" @all: @echo "Cannot build cairocanvas with X11..." .ENDIF +.IF "$(OS)" == "ANDROID" +@all: + @echo "Cannot build cairocanvas without cairo..." +.ENDIF + # --- Common ---------------------------------------------------------- -- cgit From 72eff9e69217a5877e1fd1d5b5555f258556dd53 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Tue, 12 Jul 2011 13:35:43 +0200 Subject: fix set color regression in cairo canvas - the cairo_set_source_rgba should be called with non-alpha-pre-multiplied color values - fixes fdo#33591 and fdo#35681 --- canvas/source/cairo/cairo_canvashelper.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'canvas') diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx index 2f1e39b8a19e..ebf0e1aac3e4 100644 --- a/canvas/source/cairo/cairo_canvashelper.cxx +++ b/canvas/source/cairo/cairo_canvashelper.cxx @@ -128,13 +128,11 @@ namespace cairocanvas { if( rColor.getLength() > 3 ) { - const double alpha = rColor[3]; - cairo_set_source_rgba( pCairo, - alpha*rColor[0], - alpha*rColor[1], - alpha*rColor[2], - alpha ); + rColor[0], + rColor[1], + rColor[2], + rColor[3] ); } else if( rColor.getLength() == 3 ) cairo_set_source_rgb( pCairo, -- cgit From 22f299b12e1c874a43b38f7efdda0d1b952d09a0 Mon Sep 17 00:00:00 2001 From: Matus Kukan Date: Sun, 3 Jul 2011 17:43:02 +0200 Subject: Remove component_getImplementationEnvironment methods --- canvas/source/cairo/exports.dxp | 1 - canvas/source/directx/exports.dxp | 1 - canvas/source/factory/cf_service.cxx | 6 ------ canvas/source/null/exports.dxp | 1 - canvas/source/simplecanvas/exports.dxp | 3 +-- canvas/source/vcl/exports.dxp | 3 +-- 6 files changed, 2 insertions(+), 13 deletions(-) (limited to 'canvas') diff --git a/canvas/source/cairo/exports.dxp b/canvas/source/cairo/exports.dxp index f0e1c69934bc..70033078921a 100644 --- a/canvas/source/cairo/exports.dxp +++ b/canvas/source/cairo/exports.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment component_getFactory diff --git a/canvas/source/directx/exports.dxp b/canvas/source/directx/exports.dxp index f0e1c69934bc..70033078921a 100644 --- a/canvas/source/directx/exports.dxp +++ b/canvas/source/directx/exports.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment component_getFactory diff --git a/canvas/source/factory/cf_service.cxx b/canvas/source/factory/cf_service.cxx index e96f31f5ba7a..316c4b7aecff 100644 --- a/canvas/source/factory/cf_service.cxx +++ b/canvas/source/factory/cf_service.cxx @@ -527,12 +527,6 @@ const ::cppu::ImplementationEntry s_entries [] = { extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( sal_Char const * pImplName, lang::XMultiServiceFactory * pServiceManager, diff --git a/canvas/source/null/exports.dxp b/canvas/source/null/exports.dxp index f0e1c69934bc..70033078921a 100644 --- a/canvas/source/null/exports.dxp +++ b/canvas/source/null/exports.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment component_getFactory diff --git a/canvas/source/simplecanvas/exports.dxp b/canvas/source/simplecanvas/exports.dxp index 0cb5620a1603..70033078921a 100644 --- a/canvas/source/simplecanvas/exports.dxp +++ b/canvas/source/simplecanvas/exports.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment -component_getFactory \ No newline at end of file +component_getFactory diff --git a/canvas/source/vcl/exports.dxp b/canvas/source/vcl/exports.dxp index 0cb5620a1603..70033078921a 100644 --- a/canvas/source/vcl/exports.dxp +++ b/canvas/source/vcl/exports.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment -component_getFactory \ No newline at end of file +component_getFactory -- cgit From d3abc64751208b690605c44dfd06c72be2af05e7 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 14 Jul 2011 22:45:11 +0300 Subject: Fix compilation for iOS --- canvas/source/cairo/cairo_quartz_cairo.cxx | 15 +++++++++++---- canvas/source/cairo/cairo_quartz_cairo.hxx | 6 ++++++ canvas/source/cairo/cairo_textlayout.cxx | 7 ++++++- canvas/source/cairo/makefile.mk | 12 ++++++++---- 4 files changed, 31 insertions(+), 9 deletions(-) (limited to 'canvas') diff --git a/canvas/source/cairo/cairo_quartz_cairo.cxx b/canvas/source/cairo/cairo_quartz_cairo.cxx index e24ba9c3ab80..23702f64b3ac 100644 --- a/canvas/source/cairo/cairo_quartz_cairo.cxx +++ b/canvas/source/cairo/cairo_quartz_cairo.cxx @@ -29,9 +29,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_canvas.hxx" -#ifdef QUARTZ +#if defined QUARTZ || defined IOS /************************************************************************ - * Mac OS X/Quartz surface backend for OpenOffice.org Cairo Canvas * + * Mac OS X/Quartz and iOS surface backend for OpenOffice.org Cairo Canvas * ************************************************************************/ #include @@ -205,13 +205,19 @@ namespace cairo CGContextRef mrContext = getCGContext(); if (!mrContext) return; - +#ifndef IOS [mpView lockFocus]; +#endif +#ifndef IOS /** * This code is using same screen update code as in VCL (esp. AquaSalGraphics::UpdateWindow() ) */ CGContextRef rViewContext = reinterpret_cast([[NSGraphicsContext currentContext] graphicsPort]); +#else + // Just guessing for now... + CGContextRef rViewContext = UIGraphicsGetCurrentContext(); +#endif CGImageRef xImage = CGBitmapContextCreateImage(mrContext); CGContextDrawImage(rViewContext, CGRectMake( 0, 0, @@ -220,8 +226,9 @@ namespace cairo xImage); CGImageRelease( xImage ); CGContextFlush( rViewContext ); - +#ifndef IOS [mpView unlockFocus]; +#endif } /** diff --git a/canvas/source/cairo/cairo_quartz_cairo.hxx b/canvas/source/cairo/cairo_quartz_cairo.hxx index 0c6a7d56db95..5d131d735ab9 100644 --- a/canvas/source/cairo/cairo_quartz_cairo.hxx +++ b/canvas/source/cairo/cairo_quartz_cairo.hxx @@ -32,7 +32,13 @@ #include "cairo_cairo.hxx" #include "premac.h" +#include +#if !defined(TARGET_OS_IPHONE) || !TARGET_OS_IPHONE #include +#else +#include +#define NSView UIView +#endif #include #include "postmac.h" diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx index 9c1501a8245b..eb5a3358b460 100644 --- a/canvas/source/cairo/cairo_textlayout.cxx +++ b/canvas/source/cairo/cairo_textlayout.cxx @@ -352,7 +352,7 @@ namespace cairocanvas **/ bool TextLayout::isCairoRenderable(SystemFontData aSysFontData) const { -#if defined UNX && !defined QUARTZ +#if defined UNX && !defined QUARTZ && !defined IOS // is font usable? if (!aSysFontData.nFontId) return false; #endif @@ -502,9 +502,14 @@ namespace cairocanvas cairo_font_face_t* font_face = NULL; #ifdef CAIRO_HAS_QUARTZ_SURFACE + + #ifdef QUARTZ // TODO: use cairo_quartz_font_face_create_for_cgfont(cgFont) // when CGFont (Mac OS X 10.5 API) is provided by the AQUA VCL backend. font_face = cairo_quartz_font_face_create_for_atsu_font_id((ATSUFontID) rSysFontData.aATSUFontID); + #else // iOS + font_face = cairo_quartz_font_face_create_for_cgfont( rSysFontData.rFont); + #endif #elif defined CAIRO_HAS_WIN32_SURFACE #if (OSL_DEBUG_LEVEL > 1) diff --git a/canvas/source/cairo/makefile.mk b/canvas/source/cairo/makefile.mk index 076deb2f17bf..59d1512701a7 100644 --- a/canvas/source/cairo/makefile.mk +++ b/canvas/source/cairo/makefile.mk @@ -56,6 +56,10 @@ CFLAGS+=$(CAIRO_CFLAGS) CFLAGS+=-I$(SOLARINCDIR)/cairo .ENDIF +.IF "$(OS)" == "IOS" +CFLAGS+= -x objective-c++ -fobjc-exceptions -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 +.ENDIF + .IF "$(verbose)"!="" || "$(VERBOSE)"!="" CDEFS+= -DVERBOSE .ENDIF @@ -88,18 +92,18 @@ SHL1STDLIBS+= $(CAIRO_LIBS) SHL1STDLIBS+= -lcairo -lpixman-1 .ENDIF -.IF "$(GUIBASE)"=="aqua" -# native Mac OS X (Quartz) +.IF "$(GUIBASE)"=="aqua" || "$(GUIBASE)"=="cocoatouch" +# native Mac OS X (Quartz) or iOS SLOFILES+= $(SLO)$/cairo_quartz_cairo.obj CFLAGSCXX+=$(OBJCXXFLAGS) -.ELSE # "$(GUIBASE)"=="aqua" +.ELSE # "$(GUIBASE)"=="aqua" || "$(GUIBASE)"=="cocoatouch" # Xlib SLOFILES+= $(SLO)$/cairo_xlib_cairo.obj SHL1STDLIBS+= $(FONTCONFIG_LIBS) -lX11 -lXrender $(FREETYPE_LIBS) CFLAGS+= $(FREETYPE_CFLAGS) -.ENDIF # "$(GUIBASE)"=="aqua" +.ENDIF # "$(GUIBASE)"=="aqua" || "$(GUIBASE)"=="cocoatouch" .ELSE # "$(GUI)"=="UNX" -- cgit From 660931e2968a038d18393a9647403e2a53236190 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 21 Jul 2011 07:48:52 +0300 Subject: Build the cairo canvas also for Windows if we don't build the DirectX one --- canvas/prj/build.lst | 2 +- canvas/source/cairo/makefile.mk | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'canvas') diff --git a/canvas/prj/build.lst b/canvas/prj/build.lst index 4719f157dfca..dad6e28c0ea5 100644 --- a/canvas/prj/build.lst +++ b/canvas/prj/build.lst @@ -4,7 +4,7 @@ cv canvas\inc nmake - all cv_inc NULL cv canvas\source\tools nmake - all cv_tools cv_inc NULL cv canvas\source\vcl nmake - all cv_vcl cv_tools cv_inc NULL cv canvas\source\simplecanvas nmake - all cv_simplecanvas cv_tools cv_inc NULL -cv canvas\source\cairo nmake - u cv_cairo cv_tools cv_inc NULL +cv canvas\source\cairo nmake - all cv_cairo cv_tools cv_inc NULL cv canvas\source\directx nmake - w cv_directx cv_tools cv_inc NULL cv canvas\source\null nmake - all cv_null cv_tools cv_inc NULL cv canvas\source\factory nmake - all cv_factory cv_inc NULL diff --git a/canvas/source/cairo/makefile.mk b/canvas/source/cairo/makefile.mk index 59d1512701a7..cbcfbe1aa710 100644 --- a/canvas/source/cairo/makefile.mk +++ b/canvas/source/cairo/makefile.mk @@ -47,6 +47,13 @@ DLLPRE = @echo "Cannot build cairocanvas without cairo..." .ENDIF +# --- Don't build for Windows unless we're compiling with --disable-directx ----------- +.IF "$(GUI)" == "WNT" && "$(ENABLE_DIRECTX)" != "" +@all: + @echo "Building with the DirectX canvas so not bothering with the cairo one..." +.ENDIF + + # --- Common ---------------------------------------------------------- -- cgit From ee403ac2a0ade9b1bc98b3b3e453cedaf03732e6 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 21 Jul 2011 07:49:27 +0300 Subject: Generate import library that matches libs.mk for WNTGCC --- canvas/source/tools/makefile.mk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'canvas') diff --git a/canvas/source/tools/makefile.mk b/canvas/source/tools/makefile.mk index ab4f545a3bdd..3169eadb6d95 100644 --- a/canvas/source/tools/makefile.mk +++ b/canvas/source/tools/makefile.mk @@ -62,7 +62,11 @@ SLOFILES = \ $(SLO)$/verifyinput.obj SHL1TARGET= $(TARGET)$(DLLPOSTFIX) +.IF "$(COM)" == "MSC" SHL1IMPLIB= i$(TARGET) +.ELSE +SHL1IMPLIB= $(TARGET)$(DLLPOSTFIX) +.ENDIF SHL1STDLIBS= $(SALLIB) $(CPPULIB) $(BASEGFXLIB) $(CPPUHELPERLIB) $(COMPHELPERLIB) $(VCLLIB) $(TKLIB) $(TOOLSLIB) SHL1LIBS= $(SLB)$/$(TARGET).lib -- cgit