summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-18 15:55:08 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-18 15:55:08 +0100
commit4fdd55226d2972e3a256426db3122ac23b0615c6 (patch)
tree23f5b3a68382d6d3b8db0cb5e2537ed74a228d7c /canvas
parentc3d5444d84e18fa82235bb9d419861ac5e54f544 (diff)
parente1028d9225bc47922c387aa462887c7643bc6c40 (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts: comphelper/source/misc/servicedecl.cxx i18npool/source/breakiterator/breakiteratorImpl.cxx l10ntools/scripts/localize.pl svl/source/items/itemset.cxx svl/source/memtools/svarray.cxx svl/source/numbers/zformat.cxx svtools/source/brwbox/brwbox1.cxx tools/source/stream/strmwnt.cxx vcl/inc/vcl/graphite_adaptors.hxx vcl/inc/vcl/graphite_layout.hxx vcl/inc/vcl/graphite_serverfont.hxx vcl/source/control/imgctrl.cxx vcl/source/gdi/outdev.cxx vcl/source/gdi/outdev3.cxx vcl/source/glyphs/gcach_ftyp.cxx vcl/source/glyphs/graphite_adaptors.cxx vcl/source/glyphs/graphite_layout.cxx vcl/source/window/winproc.cxx vcl/unx/source/fontmanager/fontconfig.cxx
Diffstat (limited to 'canvas')
-rw-r--r--canvas/prj/build.lst2
-rw-r--r--canvas/prj/d.lst7
-rw-r--r--canvas/source/cairo/cairo_canvasfont.cxx4
-rw-r--r--canvas/source/cairo/cairo_canvashelper_text.cxx2
-rw-r--r--canvas/source/cairo/cairo_canvashelper_texturefill.cxx2
-rw-r--r--canvas/source/cairo/cairo_devicehelper.cxx2
-rw-r--r--canvas/source/cairo/cairo_textlayout.cxx37
-rw-r--r--canvas/source/cairo/cairocanvas.component37
-rw-r--r--canvas/source/cairo/exports.dxp1
-rw-r--r--canvas/source/cairo/makefile.mk8
-rw-r--r--canvas/source/directx/directx5canvas.component34
-rw-r--r--canvas/source/directx/directx9canvas.component34
-rw-r--r--canvas/source/directx/dx_5rm.cxx6
-rw-r--r--canvas/source/directx/dx_9rm.cxx4
-rw-r--r--canvas/source/directx/dx_canvashelper_texturefill.cxx4
-rw-r--r--canvas/source/directx/dx_textlayout_drawhelper.cxx8
-rw-r--r--canvas/source/directx/dx_winstuff.hxx6
-rw-r--r--canvas/source/directx/exports.dxp1
-rw-r--r--canvas/source/directx/gdipluscanvas.component37
-rw-r--r--canvas/source/directx/makefile.mk22
-rw-r--r--canvas/source/factory/canvasfactory.component34
-rw-r--r--canvas/source/factory/cf_service.cxx8
-rw-r--r--canvas/source/factory/makefile.mk7
-rw-r--r--canvas/source/null/exports.dxp1
-rw-r--r--canvas/source/simplecanvas/exports.dxp1
-rw-r--r--canvas/source/simplecanvas/makefile.mk8
-rw-r--r--canvas/source/simplecanvas/simplecanvas.component34
-rw-r--r--canvas/source/tools/elapsedtime.cxx4
-rw-r--r--canvas/source/vcl/backbuffer.cxx2
-rw-r--r--canvas/source/vcl/bitmapbackbuffer.cxx8
-rw-r--r--canvas/source/vcl/canvasbitmap.cxx2
-rw-r--r--canvas/source/vcl/canvasbitmaphelper.cxx12
-rw-r--r--canvas/source/vcl/canvasfont.cxx4
-rw-r--r--canvas/source/vcl/canvashelper.cxx54
-rw-r--r--canvas/source/vcl/canvashelper_texturefill.cxx50
-rw-r--r--canvas/source/vcl/devicehelper.cxx2
-rw-r--r--canvas/source/vcl/exports.dxp1
-rw-r--r--canvas/source/vcl/impltools.cxx18
-rw-r--r--canvas/source/vcl/impltools.hxx2
-rw-r--r--canvas/source/vcl/makefile.mk8
-rw-r--r--canvas/source/vcl/spritecanvashelper.cxx10
-rw-r--r--canvas/source/vcl/spritedevicehelper.cxx4
-rwxr-xr-x[-rw-r--r--]canvas/source/vcl/spritehelper.cxx21
-rw-r--r--canvas/source/vcl/textlayout.cxx28
-rw-r--r--canvas/source/vcl/vclcanvas.component37
45 files changed, 448 insertions, 170 deletions
diff --git a/canvas/prj/build.lst b/canvas/prj/build.lst
index d75602dbe5f2..121be382208f 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 NULL
+cv canvas : javaunohelper comphelper cppuhelper offuh 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
diff --git a/canvas/prj/d.lst b/canvas/prj/d.lst
index 986253a3b3e5..701b9967f92a 100644
--- a/canvas/prj/d.lst
+++ b/canvas/prj/d.lst
@@ -15,6 +15,7 @@
..\%__SRC%\lib\canvasfactory.uno.so %_DEST%\lib%_EXT%\canvasfactory.uno.so
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
..\%__SRC%\class\javacanvas.uno.jar %_DEST%\bin%_EXT%\javacanvas.uno.jar
+..\%__SRC%\misc\cairocanvas.component %_DEST%\xml%_EXT%\cairocanvas.component
mkdir: %_DEST%\inc%_EXT%\canvas\base
..\inc\canvas\base\*.hxx %_DEST%\inc%_EXT%\canvas\base\*.hxx
@@ -24,3 +25,9 @@ mkdir: %_DEST%\inc%_EXT%\canvas\rendering
mkdir: %_DEST%\inc%_EXT%\canvas
..\inc\canvas\*.hxx %_DEST%\inc%_EXT%\canvas\*.hxx
+..\%__SRC%\misc\canvasfactory.component %_DEST%\xml%_EXT%\canvasfactory.component
+..\%__SRC%\misc\directx5canvas.component %_DEST%\xml%_EXT%\directx5canvas.component
+..\%__SRC%\misc\directx9canvas.component %_DEST%\xml%_EXT%\directx9canvas.component
+..\%__SRC%\misc\gdipluscanvas.component %_DEST%\xml%_EXT%\gdipluscanvas.component
+..\%__SRC%\misc\simplecanvas.component %_DEST%\xml%_EXT%\simplecanvas.component
+..\%__SRC%\misc\vclcanvas.component %_DEST%\xml%_EXT%\vclcanvas.component
diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx
index b6d83413e113..8f4f992aa808 100644
--- a/canvas/source/cairo/cairo_canvasfont.cxx
+++ b/canvas/source/cairo/cairo_canvasfont.cxx
@@ -60,7 +60,7 @@ namespace cairocanvas
{
maFont->SetAlign( ALIGN_BASELINE );
maFont->SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
- maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? TRUE : FALSE );
+ maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False );
// TODO(F2): improve panose->vclenum conversion
maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
@@ -79,7 +79,7 @@ namespace cairocanvas
if( pOutDev )
{
const bool bOldMapState( pOutDev->IsMapModeEnabled() );
- pOutDev->EnableMapMode(FALSE);
+ pOutDev->EnableMapMode(sal_False);
const Size aSize = pOutDev->GetFontMetric( *maFont ).GetSize();
diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx b/canvas/source/cairo/cairo_canvashelper_text.cxx
index c7764617be05..91d98103d041 100644
--- a/canvas/source/cairo/cairo_canvashelper_text.cxx
+++ b/canvas/source/cairo/cairo_canvashelper_text.cxx
@@ -319,7 +319,7 @@ namespace cairocanvas
return uno::Reference< rendering::XCachedPrimitive >(NULL); // no output necessary
// change text direction and layout mode
- ULONG nLayoutMode(0);
+ sal_uLong nLayoutMode(0);
switch( textDirection )
{
case rendering::TextDirection::WEAK_LEFT_TO_RIGHT:
diff --git a/canvas/source/cairo/cairo_canvashelper_texturefill.cxx b/canvas/source/cairo/cairo_canvashelper_texturefill.cxx
index 7d4f459c8908..85959d358894 100644
--- a/canvas/source/cairo/cairo_canvashelper_texturefill.cxx
+++ b/canvas/source/cairo/cairo_canvashelper_texturefill.cxx
@@ -83,7 +83,7 @@ namespace cairocanvas
const ::Size& rTileSize,
const GraphicAttr& rAttr)
{
- BOOL bRet( false );
+ bool bRet( false );
Point aCurrPos;
int nX, nY;
diff --git a/canvas/source/cairo/cairo_devicehelper.cxx b/canvas/source/cairo/cairo_devicehelper.cxx
index 6d5aa8660d1c..f6b5e24c5a63 100644
--- a/canvas/source/cairo/cairo_devicehelper.cxx
+++ b/canvas/source/cairo/cairo_devicehelper.cxx
@@ -271,7 +271,7 @@ namespace cairocanvas
const ::Point aEmptyPoint;
bool bOldMap( mpRefDevice->IsMapModeEnabled() );
- mpRefDevice->EnableMapMode( FALSE );
+ mpRefDevice->EnableMapMode( sal_False );
aStream << mpRefDevice->GetBitmap(aEmptyPoint,
mpRefDevice->GetOutputSizePixel());
mpRefDevice->EnableMapMode( bOldMap );
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index cae25d2c8863..add009fca6c8 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -81,7 +81,7 @@ namespace cairocanvas
sal_Int8 nTextDirection )
{
// TODO(P3): avoid if already correctly set
- ULONG nLayoutMode;
+ sal_uLong nLayoutMode;
switch( nTextDirection )
{
default:
@@ -214,8 +214,8 @@ namespace cairocanvas
return geometry::RealRectangle2D( 0, nAboveBaseline,
aVDev.GetTextWidth(
maText.Text,
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length) ),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) ),
nBelowBaseline );
}
}
@@ -404,8 +404,8 @@ namespace cairocanvas
}
aSysLayoutData = rOutDev.GetSysTextLayoutData(rOutpos, maText.Text,
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length),
maLogicalAdvancements.getLength() ? aOffsets.get() : NULL);
// Sort them so that all glyphs on the same glyph fallback level are consecutive
@@ -416,14 +416,14 @@ namespace cairocanvas
typedef std::pair<SystemFontData,int> FontLevel;
typedef std::vector<FontLevel> FontLevelVector;
FontLevelVector aFontData;
- SystemGlyphDataVector::const_iterator aGlyphIter=aSysLayoutData.rGlyphData.begin();
- const SystemGlyphDataVector::const_iterator aGlyphEnd=aSysLayoutData.rGlyphData.end();
- for( ; aGlyphIter != aGlyphEnd; ++aGlyphIter )
+ SystemGlyphDataVector::const_iterator aIter=aSysLayoutData.rGlyphData.begin();
+ const SystemGlyphDataVector::const_iterator aEnd=aSysLayoutData.rGlyphData.end();
+ for( ; aIter != aEnd; ++aIter )
{
- if( aFontData.empty() || aGlyphIter->fallbacklevel != aFontData.back().second )
+ if( aFontData.empty() || aIter->fallbacklevel != aFontData.back().second )
{
- aFontData.push_back(FontLevel(rOutDev.GetSysFontData(aGlyphIter->fallbacklevel),
- aGlyphIter->fallbacklevel));
+ aFontData.push_back(FontLevel(rOutDev.GetSysFontData(aIter->fallbacklevel),
+ aIter->fallbacklevel));
if( !isCairoRenderable(aFontData.back().first) )
{
bCairoRenderable = false;
@@ -446,15 +446,15 @@ namespace cairocanvas
if (maLogicalAdvancements.getLength()) // VCL FALLBACK - with glyph advances
{
rOutDev.DrawTextArray( rOutpos, maText.Text, aOffsets.get(),
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length) );
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) );
return true;
}
else // VCL FALLBACK - without advances
{
rOutDev.DrawText( rOutpos, maText.Text,
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length) );
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) );
return true;
}
}
@@ -476,10 +476,11 @@ namespace cairocanvas
std::vector<cairo_glyph_t> cairo_glyphs;
cairo_glyphs.reserve( 256 );
- aGlyphIter=aSysLayoutData.rGlyphData.begin();
- for( ; aGlyphIter != aGlyphEnd; ++aGlyphIter )
+ SystemGlyphDataVector::const_iterator aIter=aSysLayoutData.rGlyphData.begin();
+ const SystemGlyphDataVector::const_iterator aEnd=aSysLayoutData.rGlyphData.end();
+ for( ; aIter != aEnd; ++aIter )
{
- SystemGlyphData systemGlyph = *aGlyphIter;
+ SystemGlyphData systemGlyph = *aIter;
if( systemGlyph.fallbacklevel != aFontDataIter->second )
continue;
diff --git a/canvas/source/cairo/cairocanvas.component b/canvas/source/cairo/cairocanvas.component
new file mode 100644
index 000000000000..126ad2b44ee1
--- /dev/null
+++ b/canvas/source/cairo/cairocanvas.component
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.rendering.Canvas.Cairo">
+ <service name="com.sun.star.rendering.Canvas.Cairo"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.rendering.SpriteCanvas.Cairo">
+ <service name="com.sun.star.rendering.SpriteCanvas.Cairo"/>
+ </implementation>
+</component>
diff --git a/canvas/source/cairo/exports.dxp b/canvas/source/cairo/exports.dxp
index 9630d7e06768..f0e1c69934bc 100644
--- a/canvas/source/cairo/exports.dxp
+++ b/canvas/source/cairo/exports.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
diff --git a/canvas/source/cairo/makefile.mk b/canvas/source/cairo/makefile.mk
index 5c0d237da821..bde5fac59a2e 100644
--- a/canvas/source/cairo/makefile.mk
+++ b/canvas/source/cairo/makefile.mk
@@ -130,3 +130,11 @@ DEF1EXPORTFILE=exports.dxp
# ==========================================================================
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/cairocanvas.component
+
+$(MISC)/cairocanvas.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt cairocanvas.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt cairocanvas.component
diff --git a/canvas/source/directx/directx5canvas.component b/canvas/source/directx/directx5canvas.component
new file mode 100644
index 000000000000..80133e724df6
--- /dev/null
+++ b/canvas/source/directx/directx5canvas.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.rendering.SpriteCanvas.DX5">
+ <service name="com.sun.star.rendering.SpriteCanvas.DX5"/>
+ </implementation>
+</component>
diff --git a/canvas/source/directx/directx9canvas.component b/canvas/source/directx/directx9canvas.component
new file mode 100644
index 000000000000..0d395892d4cb
--- /dev/null
+++ b/canvas/source/directx/directx9canvas.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.rendering.SpriteCanvas.DX9">
+ <service name="com.sun.star.rendering.SpriteCanvas.DX9"/>
+ </implementation>
+</component>
diff --git a/canvas/source/directx/dx_5rm.cxx b/canvas/source/directx/dx_5rm.cxx
index 152c15ccdf3a..25ac0bd828b9 100644
--- a/canvas/source/directx/dx_5rm.cxx
+++ b/canvas/source/directx/dx_5rm.cxx
@@ -1109,7 +1109,7 @@ namespace dxcanvas
const_cast<Window *>(&rWindow), 0) );
// system child window must not receive mouse events
- mpWindow->SetMouseTransparent( TRUE );
+ mpWindow->SetMouseTransparent( sal_True );
// parent should receive paint messages as well
// [PARENTCLIPMODE_NOCLIP], the argument is here
@@ -1118,11 +1118,11 @@ namespace dxcanvas
mpWindow->SetParentClipMode(0x0002);
// the system child window must not clear its background
- mpWindow->EnableEraseBackground( FALSE );
+ mpWindow->EnableEraseBackground( sal_False );
mpWindow->SetControlForeground();
mpWindow->SetControlBackground();
- mpWindow->EnablePaint(FALSE);
+ mpWindow->EnablePaint(sal_False);
const SystemEnvData *pData = mpWindow->GetSystemData();
const HWND hwnd(reinterpret_cast<HWND>(pData->hWnd));
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index aaae34e64198..4464d1fb7781 100644
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -697,11 +697,11 @@ namespace dxcanvas
mpWindow->SetParentClipMode(0x0002);
// the system child window must not clear its background
- mpWindow->EnableEraseBackground( FALSE );
+ mpWindow->EnableEraseBackground( sal_False );
mpWindow->SetControlForeground();
mpWindow->SetControlBackground();
- mpWindow->EnablePaint(FALSE);
+ mpWindow->EnablePaint(sal_False);
const SystemEnvData *pData = mpWindow->GetSystemData();
const HWND hwnd(reinterpret_cast<HWND>(pData->hWnd));
diff --git a/canvas/source/directx/dx_canvashelper_texturefill.cxx b/canvas/source/directx/dx_canvashelper_texturefill.cxx
index 473798f0bd46..bd269a6aab66 100644
--- a/canvas/source/directx/dx_canvashelper_texturefill.cxx
+++ b/canvas/source/directx/dx_canvashelper_texturefill.cxx
@@ -228,6 +228,7 @@ namespace dxcanvas
Gdiplus::SolidBrush aBackgroundBrush( rColors[0] );
rGraphics->FillPath( &aBackgroundBrush, pFillPath.get() );
+ Gdiplus::Matrix aMatrix;
// scale focus according to aspect ratio: for wider-than-tall
// bounds (nAspectRatio > 1.0), the focus must have non-zero
// width. Specifically, a bound rect twice as wide as tall has
@@ -384,7 +385,6 @@ namespace dxcanvas
// one sets both, only the translational components of the
// texture is respected.
- Gdiplus::Matrix aMatrix;
tools::gdiPlusMatrixFromAffineMatrix2D( aMatrix,
texture.AffineTransform );
GraphicsPathSharedPtr pGradientPath(
@@ -423,8 +423,6 @@ namespace dxcanvas
}
#if defined(VERBOSE) && defined(DBG_UTIL)
- rGraphics->MultiplyTransform( &aMatrix );
-
Gdiplus::Pen aPen( Gdiplus::Color( 255, 255, 0, 0 ),
0.0001f );
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx
index 33e8a08f79c1..f52243d8a9e9 100644
--- a/canvas/source/directx/dx_textlayout_drawhelper.cxx
+++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx
@@ -131,7 +131,7 @@ namespace dxcanvas
aFont.SetAlign( ALIGN_BASELINE );
aFont.SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
- aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? TRUE : FALSE );
+ aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False );
aFont.SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
aFont.SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL );
aFont.SetPitch(
@@ -266,7 +266,7 @@ namespace dxcanvas
aFont.SetAlign( ALIGN_BASELINE );
aFont.SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
- aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? TRUE : FALSE );
+ aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False );
aFont.SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
aFont.SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL );
aFont.SetPitch(
@@ -309,8 +309,8 @@ namespace dxcanvas
return geometry::RealRectangle2D( 0, nAboveBaseline,
aVirtualDevice.GetTextWidth(
rText.Text,
- ::canvas::tools::numeric_cast<USHORT>(rText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(rText.Length) ),
+ ::canvas::tools::numeric_cast<sal_uInt16>(rText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(rText.Length) ),
nBelowBaseline );
}
}
diff --git a/canvas/source/directx/dx_winstuff.hxx b/canvas/source/directx/dx_winstuff.hxx
index c8f43990e9f8..595022e10182 100644
--- a/canvas/source/directx/dx_winstuff.hxx
+++ b/canvas/source/directx/dx_winstuff.hxx
@@ -56,9 +56,6 @@
#endif
-#define BOOL win32BOOL
-#define INT32 win32INT32
-#define UINT32 win32UINT32
#define ULONG win32ULONG
#define GradientStyle_RECT win32GradientStyle_RECT
#define Polygon win32Polygon
@@ -218,9 +215,6 @@ namespace dxcanvas
#endif
#undef DELETE
-#undef BOOL
-#undef INT32
-#undef UINT32
#undef PolyPolygon
#endif /* _DXCANVAS_WINSTUFF_HXX */
diff --git a/canvas/source/directx/exports.dxp b/canvas/source/directx/exports.dxp
index 9630d7e06768..f0e1c69934bc 100644
--- a/canvas/source/directx/exports.dxp
+++ b/canvas/source/directx/exports.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
diff --git a/canvas/source/directx/gdipluscanvas.component b/canvas/source/directx/gdipluscanvas.component
new file mode 100644
index 000000000000..e39e77444d59
--- /dev/null
+++ b/canvas/source/directx/gdipluscanvas.component
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.rendering.BitmapCanvas.GDI+">
+ <service name="com.sun.star.rendering.BitmapCanvas.GDI+"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.rendering.Canvas.GDI+">
+ <service name="com.sun.star.rendering.Canvas.GDI+"/>
+ </implementation>
+</component>
diff --git a/canvas/source/directx/makefile.mk b/canvas/source/directx/makefile.mk
index 4ccd5a8448b2..9547fef40cc7 100644
--- a/canvas/source/directx/makefile.mk
+++ b/canvas/source/directx/makefile.mk
@@ -217,3 +217,25 @@ SHL3STDLIBS += imdebug.lib
.INCLUDE : target.mk
+ALLTAR : \
+ $(MISC)/directx5canvas.component \
+ $(MISC)/directx9canvas.component \
+ $(MISC)/gdipluscanvas.component
+
+$(MISC)/directx5canvas.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt directx5canvas.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt directx5canvas.component
+
+$(MISC)/directx9canvas.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt directx9canvas.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt directx9canvas.component
+
+$(MISC)/gdipluscanvas.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt gdipluscanvas.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL3TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt gdipluscanvas.component
diff --git a/canvas/source/factory/canvasfactory.component b/canvas/source/factory/canvasfactory.component
new file mode 100644
index 000000000000..3896f4197d2f
--- /dev/null
+++ b/canvas/source/factory/canvasfactory.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.rendering.CanvasFactory">
+ <service name="com.sun.star.rendering.CanvasFactory"/>
+ </implementation>
+</component>
diff --git a/canvas/source/factory/cf_service.cxx b/canvas/source/factory/cf_service.cxx
index 3ce6cfeacd22..516ac006af33 100644
--- a/canvas/source/factory/cf_service.cxx
+++ b/canvas/source/factory/cf_service.cxx
@@ -533,14 +533,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-sal_Bool SAL_CALL component_writeInfo(
- lang::XMultiServiceFactory * pServiceManager,
- registry::XRegistryKey * pRegistryKey )
-{
- return ::cppu::component_writeInfoHelper(
- pServiceManager, pRegistryKey, s_entries );
-}
-
void * SAL_CALL component_getFactory(
sal_Char const * pImplName,
lang::XMultiServiceFactory * pServiceManager,
diff --git a/canvas/source/factory/makefile.mk b/canvas/source/factory/makefile.mk
index fc6d423192d6..eee24ea8ba85 100644
--- a/canvas/source/factory/makefile.mk
+++ b/canvas/source/factory/makefile.mk
@@ -54,3 +54,10 @@ DEF1NAME = $(SHL1TARGET)
.ENDIF
.INCLUDE : target.mk
+ALLTAR : $(MISC)/canvasfactory.component
+
+$(MISC)/canvasfactory.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt canvasfactory.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt canvasfactory.component
diff --git a/canvas/source/null/exports.dxp b/canvas/source/null/exports.dxp
index 9630d7e06768..f0e1c69934bc 100644
--- a/canvas/source/null/exports.dxp
+++ b/canvas/source/null/exports.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
diff --git a/canvas/source/simplecanvas/exports.dxp b/canvas/source/simplecanvas/exports.dxp
index 0c2e3e7cddd7..0cb5620a1603 100644
--- a/canvas/source/simplecanvas/exports.dxp
+++ b/canvas/source/simplecanvas/exports.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory \ No newline at end of file
diff --git a/canvas/source/simplecanvas/makefile.mk b/canvas/source/simplecanvas/makefile.mk
index 4d5a7e7bb3a1..8c3a9deede72 100644
--- a/canvas/source/simplecanvas/makefile.mk
+++ b/canvas/source/simplecanvas/makefile.mk
@@ -61,3 +61,11 @@ DEF1EXPORTFILE=exports.dxp
# ==========================================================================
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/simplecanvas.component
+
+$(MISC)/simplecanvas.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt simplecanvas.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt simplecanvas.component
diff --git a/canvas/source/simplecanvas/simplecanvas.component b/canvas/source/simplecanvas/simplecanvas.component
new file mode 100644
index 000000000000..3a00b407375e
--- /dev/null
+++ b/canvas/source/simplecanvas/simplecanvas.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.rendering.SimpleCanvas">
+ <service name="com.sun.star.rendering.SimpleCanvas"/>
+ </implementation>
+</component>
diff --git a/canvas/source/tools/elapsedtime.cxx b/canvas/source/tools/elapsedtime.cxx
index 1d6e53e36eac..26f0894fa29a 100644
--- a/canvas/source/tools/elapsedtime.cxx
+++ b/canvas/source/tools/elapsedtime.cxx
@@ -33,7 +33,7 @@
#include "osl/diagnose.h"
#include "canvas/elapsedtime.hxx"
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
#if defined _MSC_VER
#pragma warning(push,1)
@@ -59,7 +59,7 @@ namespace canvas {
namespace tools {
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
// TODO(Q2): is 0 okay for the failure case here?
double ElapsedTime::getSystemTime()
{
diff --git a/canvas/source/vcl/backbuffer.cxx b/canvas/source/vcl/backbuffer.cxx
index ea99b371a483..0cb4556fb851 100644
--- a/canvas/source/vcl/backbuffer.cxx
+++ b/canvas/source/vcl/backbuffer.cxx
@@ -49,7 +49,7 @@ namespace vclcanvas
// switch off AA for WIN32 and UNIX, the VCLCanvas does not look good with it and
// is not required to do AA. It would need to be adapted to use it correctly
// (especially gradient painting). This will need extra work.
- maVDev->SetAntialiasing( maVDev->GetAntialiasing() & !ANTIALIASING_ENABLE_B2DDRAW);
+ maVDev->SetAntialiasing( maVDev->GetAntialiasing() & ~ANTIALIASING_ENABLE_B2DDRAW);
#endif
}
}
diff --git a/canvas/source/vcl/bitmapbackbuffer.cxx b/canvas/source/vcl/bitmapbackbuffer.cxx
index 6865a70f1e31..37130b575dc1 100644
--- a/canvas/source/vcl/bitmapbackbuffer.cxx
+++ b/canvas/source/vcl/bitmapbackbuffer.cxx
@@ -89,7 +89,7 @@ namespace vclcanvas
if( mbVDevContentIsCurrent && mpVDev )
{
// VDev content is more current than bitmap - copy contents before!
- mpVDev->EnableMapMode( FALSE );
+ mpVDev->EnableMapMode( sal_False );
const Point aEmptyPoint;
*maBitmap = mpVDev->GetBitmapEx( aEmptyPoint,
mpVDev->GetOutputSizePixel() );
@@ -109,7 +109,7 @@ namespace vclcanvas
if( mbVDevContentIsCurrent && mpVDev )
{
- mpVDev->EnableMapMode( FALSE );
+ mpVDev->EnableMapMode( sal_False );
aSize = mpVDev->GetOutputSizePixel();
}
@@ -139,7 +139,7 @@ namespace vclcanvas
// switch off AA for WIN32 and UNIX, the VCLCanvas does not look good with it and
// is not required to do AA. It would need to be adapted to use it correctly
// (especially gradient painting). This will need extra work.
- mpVDev->SetAntialiasing(mpVDev->GetAntialiasing() & !ANTIALIASING_ENABLE_B2DDRAW);
+ mpVDev->SetAntialiasing(mpVDev->GetAntialiasing() & ~ANTIALIASING_ENABLE_B2DDRAW);
#endif
}
}
@@ -152,7 +152,7 @@ namespace vclcanvas
if( mpVDev && mbBitmapContentIsCurrent )
{
// fill with bitmap content
- mpVDev->EnableMapMode( FALSE );
+ mpVDev->EnableMapMode( sal_False );
const Point aEmptyPoint;
mpVDev->DrawBitmapEx( aEmptyPoint, *maBitmap );
}
diff --git a/canvas/source/vcl/canvasbitmap.cxx b/canvas/source/vcl/canvasbitmap.cxx
index 300617f417eb..1f8840afc264 100644
--- a/canvas/source/vcl/canvasbitmap.cxx
+++ b/canvas/source/vcl/canvasbitmap.cxx
@@ -50,7 +50,7 @@ namespace vclcanvas
{
// create bitmap for given reference device
// ========================================
- const USHORT nBitCount( (USHORT)24U );
+ const sal_uInt16 nBitCount( (sal_uInt16)24U );
const BitmapPalette* pPalette = NULL;
Bitmap aBitmap( rSize, nBitCount, pPalette );
diff --git a/canvas/source/vcl/canvasbitmaphelper.cxx b/canvas/source/vcl/canvasbitmaphelper.cxx
index 39ee411bf34c..38dcc9e844e8 100644
--- a/canvas/source/vcl/canvasbitmaphelper.cxx
+++ b/canvas/source/vcl/canvasbitmaphelper.cxx
@@ -267,7 +267,7 @@ namespace vclcanvas
x<aBmpSize.Width() && x<rect.X2;
++x )
{
- *pScan++ = (BYTE)pWriteAccess->GetBestPaletteIndex(
+ *pScan++ = (sal_uInt8)pWriteAccess->GetBestPaletteIndex(
BitmapColor( data[ nCurrPos ],
data[ nCurrPos+1 ],
data[ nCurrPos+2 ] ) );
@@ -275,7 +275,7 @@ namespace vclcanvas
nCurrPos += 3;
// cast to unsigned byte, for correct subtraction result
- *pAScan++ = static_cast<BYTE>(255 -
+ *pAScan++ = static_cast<sal_uInt8>(255 -
static_cast<sal_uInt8>(data[ nCurrPos++ ]));
}
}
@@ -297,7 +297,7 @@ namespace vclcanvas
nCurrPos += 3;
// cast to unsigned byte, for correct subtraction result
- *pAScan++ = static_cast<BYTE>(255 -
+ *pAScan++ = static_cast<sal_uInt8>(255 -
static_cast<sal_uInt8>(data[ nCurrPos++ ]));
}
}
@@ -319,7 +319,7 @@ namespace vclcanvas
nCurrPos += 3;
// cast to unsigned byte, for correct subtraction result
- *pAScan++ = static_cast<BYTE>(255 -
+ *pAScan++ = static_cast<sal_uInt8>(255 -
static_cast<sal_uInt8>(data[ nCurrPos++ ]));
}
}
@@ -339,7 +339,7 @@ namespace vclcanvas
// cast to unsigned byte, for correct subtraction result
pAlphaWriteAccess->SetPixel( y, x,
BitmapColor(
- static_cast<BYTE>(255 -
+ static_cast<sal_uInt8>(255 -
static_cast<sal_uInt8>(data[ nCurrPos++ ])) ) );
}
}
@@ -360,7 +360,7 @@ namespace vclcanvas
x<aBmpSize.Width() && x<rect.X2;
++x )
{
- *pScan++ = (BYTE)pWriteAccess->GetBestPaletteIndex(
+ *pScan++ = (sal_uInt8)pWriteAccess->GetBestPaletteIndex(
BitmapColor( data[ nCurrPos ],
data[ nCurrPos+1 ],
data[ nCurrPos+2 ] ) );
diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx
index 71962cf3b45c..4d1cb2b087c3 100644
--- a/canvas/source/vcl/canvasfont.cxx
+++ b/canvas/source/vcl/canvasfont.cxx
@@ -61,7 +61,7 @@ namespace vclcanvas
{
maFont->SetAlign( ALIGN_BASELINE );
maFont->SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
- maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? TRUE : FALSE );
+ maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False );
// TODO(F2): improve panose->vclenum conversion
maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
@@ -78,7 +78,7 @@ namespace vclcanvas
OutputDevice& rOutDev( rOutDevProvider->getOutDev() );
const bool bOldMapState( rOutDev.IsMapModeEnabled() );
- rOutDev.EnableMapMode(FALSE);
+ rOutDev.EnableMapMode(sal_False);
const Size aSize = rOutDev.GetFontMetric( *maFont ).GetSize();
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index 7ae02c7c3492..6fb918df8f1c 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -145,7 +145,7 @@ namespace vclcanvas
void CanvasHelper::setBackgroundOutDev( const OutDevProviderSharedPtr& rOutDev )
{
mp2ndOutDev = rOutDev;
- mp2ndOutDev->getOutDev().EnableMapMode( FALSE );
+ mp2ndOutDev->getOutDev().EnableMapMode( sal_False );
}
void CanvasHelper::clear()
@@ -156,7 +156,7 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
rOutDev.SetLineColor( COL_TRANSPARENT );
rOutDev.SetFillColor( COL_TRANSPARENT );
rOutDev.DrawRect( Rectangle( Point(),
@@ -167,7 +167,7 @@ namespace vclcanvas
OutputDevice& rOutDev2( mp2ndOutDev->getOutDev() );
rOutDev2.SetDrawMode( DRAWMODE_DEFAULT );
- rOutDev2.EnableMapMode( FALSE );
+ rOutDev2.EnableMapMode( sal_False );
rOutDev2.SetLineColor( COL_TRANSPARENT );
rOutDev2.SetFillColor( COL_TRANSPARENT );
rOutDev2.DrawRect( Rectangle( Point(),
@@ -298,9 +298,9 @@ namespace vclcanvas
// DrawPolygon(), and open ones via DrawPolyLine():
// closed polygons will simply already contain the
// closing segment.
- USHORT nSize( aPolyPoly.Count() );
+ sal_uInt16 nSize( aPolyPoly.Count() );
- for( USHORT i=0; i<nSize; ++i )
+ for( sal_uInt16 i=0; i<nSize; ++i )
{
mpOutDev->getOutDev().DrawPolyLine( aPolyPoly[i] );
@@ -410,21 +410,21 @@ namespace vclcanvas
// self-intersections. Therefore, if we would render it
// via OutDev::DrawPolyPolygon(), on/off fill would
// generate off areas on those self-intersections.
- USHORT nSize( aVCLPolyPoly.Count() );
+ sal_uInt16 nSize( aVCLPolyPoly.Count() );
- for( USHORT i=0; i<nSize; ++i )
+ for( sal_uInt16 i=0; i<nSize; ++i )
{
if( aStrokedPolyPoly.getB2DPolygon( i ).isClosed() ) {
mpOutDev->getOutDev().DrawPolygon( aVCLPolyPoly[i] );
if( mp2ndOutDev )
mp2ndOutDev->getOutDev().DrawPolygon( aVCLPolyPoly[i] );
} else {
- const USHORT nPolySize = aVCLPolyPoly[i].GetSize();
+ const sal_uInt16 nPolySize = aVCLPolyPoly[i].GetSize();
if( nPolySize ) {
Point rPrevPoint = aVCLPolyPoly[i].GetPoint( 0 );
Point rPoint;
- for( USHORT j=1; j<nPolySize; j++ ) {
+ for( sal_uInt16 j=1; j<nPolySize; j++ ) {
rPoint = aVCLPolyPoly[i].GetPoint( j );
mpOutDev->getOutDev().DrawLine( rPrevPoint, rPoint );
if( mp2ndOutDev )
@@ -497,7 +497,7 @@ namespace vclcanvas
}
else
{
- mpOutDev->getOutDev().DrawTransparent( aPolyPoly, (USHORT)nTransPercent );
+ mpOutDev->getOutDev().DrawTransparent( aPolyPoly, (sal_uInt16)nTransPercent );
}
if( mp2ndOutDev )
@@ -522,7 +522,7 @@ namespace vclcanvas
}
else
{
- mp2ndOutDev->getOutDev().DrawTransparent( aPolyPoly, (USHORT)nTransPercent );
+ mp2ndOutDev->getOutDev().DrawTransparent( aPolyPoly, (sal_uInt16)nTransPercent );
}
}
}
@@ -584,7 +584,7 @@ namespace vclcanvas
return uno::Reference< rendering::XCachedPrimitive >(NULL); // no output necessary
// change text direction and layout mode
- ULONG nLayoutMode(0);
+ sal_uIntPtr nLayoutMode(0);
switch( textDirection )
{
case rendering::TextDirection::WEAK_LEFT_TO_RIGHT:
@@ -608,16 +608,16 @@ namespace vclcanvas
mpOutDev->getOutDev().SetLayoutMode( nLayoutMode );
mpOutDev->getOutDev().DrawText( aOutpos,
text.Text,
- ::canvas::tools::numeric_cast<USHORT>(text.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(text.Length) );
+ ::canvas::tools::numeric_cast<sal_uInt16>(text.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(text.Length) );
if( mp2ndOutDev )
{
mp2ndOutDev->getOutDev().SetLayoutMode( nLayoutMode );
mp2ndOutDev->getOutDev().DrawText( aOutpos,
text.Text,
- ::canvas::tools::numeric_cast<USHORT>(text.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(text.Length) );
+ ::canvas::tools::numeric_cast<sal_uInt16>(text.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(text.Length) );
}
}
@@ -760,7 +760,7 @@ namespace vclcanvas
// equivalent to the origAlpha*modulateAlpha the
// DX canvas performs)
aGrfAttr.SetTransparency(
- static_cast< BYTE >(
+ static_cast< sal_uInt8 >(
::basegfx::fround( 255.0*( 1.0 - nAlphaModulation ) ) ) );
}
@@ -779,7 +779,7 @@ namespace vclcanvas
// (3600,0]. Note that the original angle may have
// values outside the [0,2Pi) interval.
const double nAngleInTenthOfDegrees (3600.0 - nRotate * 3600.0 / (2*M_PI));
- aGrfAttr.SetRotation( static_cast< USHORT >(::basegfx::fround(nAngleInTenthOfDegrees)) );
+ aGrfAttr.SetRotation( static_cast< sal_uInt16 >(::basegfx::fround(nAngleInTenthOfDegrees)) );
pGrfObj.reset( new GraphicObject( aBmpEx ) );
}
@@ -914,7 +914,7 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
// TODO(F2): Support alpha vdev canvas here
const Point aEmptyPoint(0,0);
@@ -943,7 +943,7 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
Bitmap aBitmap( rOutDev.GetBitmap(aRect.TopLeft(),
aRect.GetSize()) );
@@ -996,11 +996,11 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
const Rectangle aRect( ::vcl::unotools::rectangleFromIntegerRectangle2D(rect) );
- const USHORT nBitCount( ::std::min( (USHORT)24U,
- (USHORT)rOutDev.GetBitCount() ) );
+ const sal_uInt16 nBitCount( ::std::min( (sal_uInt16)24U,
+ (sal_uInt16)rOutDev.GetBitCount() ) );
const BitmapPalette* pPalette = NULL;
if( nBitCount <= 8 )
@@ -1046,7 +1046,7 @@ namespace vclcanvas
for( x=0; x<nWidth; ++x )
{
- *pScan++ = (BYTE)pWriteAccess->GetBestPaletteIndex(
+ *pScan++ = (sal_uInt8)pWriteAccess->GetBestPaletteIndex(
BitmapColor( data[ nCurrPos ],
data[ nCurrPos+1 ],
data[ nCurrPos+2 ] ) );
@@ -1122,7 +1122,7 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
const Size aBmpSize( rOutDev.GetOutputSizePixel() );
@@ -1159,7 +1159,7 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
const Size aBmpSize( rOutDev.GetOutputSizePixel() );
@@ -1198,7 +1198,7 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() );
OutputDevice* p2ndOutDev = NULL;
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
if( mp2ndOutDev )
p2ndOutDev = &mp2ndOutDev->getOutDev();
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index 4d08f873deb1..e7ffe0e41356 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -89,7 +89,7 @@ namespace vclcanvas
const ::Size& rTileSize,
const GraphicAttr& rAttr)
{
- BOOL bRet( false );
+ bool bRet( false );
Point aCurrPos;
int nX, nY;
@@ -102,10 +102,10 @@ namespace vclcanvas
{
// update return value. This method should return true, if
// at least one of the looped Draws succeeded.
- bRet |= rGraphic.Draw( &rOutDev,
+ bRet |= ( sal_True == rGraphic.Draw( &rOutDev,
aCurrPos,
rTileSize,
- &rAttr );
+ &rAttr ) );
aCurrPos.X() += rNextTileX.Width();
aCurrPos.Y() += rNextTileX.Height();
@@ -179,7 +179,7 @@ namespace vclcanvas
// vertex values in the loop below (as ::Polygon is a
// pimpl class, creating one every loop turn would really
// stress the mem allocator)
- ::Polygon aTempPoly( static_cast<USHORT>(5) );
+ ::Polygon aTempPoly( static_cast<sal_uInt16>(5) );
OSL_ENSURE( nStepCount >= 3,
"fillLinearGradient(): stepcount smaller than 3" );
@@ -212,6 +212,8 @@ namespace vclcanvas
if( (rColors.size() % 2) != (nStepCount % 2) )
++nStepCount;
+ rOutDev.SetLineColor();
+
basegfx::tools::KeyStopLerp aLerper(rValues.maStops);
// only iterate nStepCount-1 steps, as the last strip is
@@ -223,9 +225,9 @@ namespace vclcanvas
boost::tuples::tie(nIndex,fAlpha)=aLerper.lerp(double(i)/nStepCount);
rOutDev.SetFillColor(
- Color( (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
- (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
- (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
+ Color( (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
+ (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
+ (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
// copy right egde of polygon to left edge (and also
// copy the closing point)
@@ -349,7 +351,7 @@ namespace vclcanvas
const sal_uInt32 nNumPoints( aOuterPoly.count() );
- ::Polygon aTempPoly( static_cast<USHORT>(nNumPoints+1) );
+ ::Polygon aTempPoly( static_cast<sal_uInt16>(nNumPoints+1) );
// increase number of steps by one: polygonal gradients have
// the outermost polygon rendered in rColor2, and the
@@ -367,6 +369,8 @@ namespace vclcanvas
// color).
++nStepCount;
+ rOutDev.SetLineColor();
+
basegfx::tools::KeyStopLerp aLerper(rValues.maStops);
if( !bFillNonOverlapping )
@@ -388,9 +392,9 @@ namespace vclcanvas
// lerp color
rOutDev.SetFillColor(
- Color( (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
- (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
- (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
+ Color( (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
+ (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
+ (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
// scale and render polygon, by interpolating between
// outer and inner polygon.
@@ -400,13 +404,13 @@ namespace vclcanvas
const ::basegfx::B2DPoint& rOuterPoint( aOuterPoly.getB2DPoint(p) );
const ::basegfx::B2DPoint& rInnerPoint( aInnerPoly.getB2DPoint(p) );
- aTempPoly[(USHORT)p] = ::Point(
+ aTempPoly[(sal_uInt16)p] = ::Point(
basegfx::fround( fT*rInnerPoint.getX() + (1-fT)*rOuterPoint.getX() ),
basegfx::fround( fT*rInnerPoint.getY() + (1-fT)*rOuterPoint.getY() ) );
}
// close polygon explicitely
- aTempPoly[(USHORT)p] = aTempPoly[0];
+ aTempPoly[(sal_uInt16)p] = aTempPoly[0];
// TODO(P1): compare with vcl/source/gdi/outdev4.cxx,
// OutputDevice::ImplDrawComplexGradient(), there's a note
@@ -425,7 +429,7 @@ namespace vclcanvas
// in the loop below (as ::Polygon is a pimpl class, creating
// one every loop turn would really stress the mem allocator)
::PolyPolygon aTempPolyPoly;
- ::Polygon aTempPoly2( static_cast<USHORT>(nNumPoints+1) );
+ ::Polygon aTempPoly2( static_cast<sal_uInt16>(nNumPoints+1) );
aTempPoly2[0] = rBounds.TopLeft();
aTempPoly2[1] = rBounds.TopRight();
@@ -446,9 +450,9 @@ namespace vclcanvas
// lerp color
rOutDev.SetFillColor(
- Color( (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
- (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
- (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
+ Color( (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
+ (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
+ (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
#if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
if( i && !(i % 10) )
@@ -464,13 +468,13 @@ namespace vclcanvas
const ::basegfx::B2DPoint& rOuterPoint( aOuterPoly.getB2DPoint(p) );
const ::basegfx::B2DPoint& rInnerPoint( aInnerPoly.getB2DPoint(p) );
- aTempPoly[(USHORT)p] = ::Point(
+ aTempPoly[(sal_uInt16)p] = ::Point(
basegfx::fround( fT*rInnerPoint.getX() + (1-fT)*rOuterPoint.getX() ),
basegfx::fround( fT*rInnerPoint.getY() + (1-fT)*rOuterPoint.getY() ) );
}
// close polygon explicitely
- aTempPoly[(USHORT)p] = aTempPoly[0];
+ aTempPoly[(sal_uInt16)p] = aTempPoly[0];
// swap inner and outer polygon
aTempPolyPoly.Replace( aTempPolyPoly.GetObject( 1 ), 0 );
@@ -701,7 +705,7 @@ namespace vclcanvas
}
#endif // complex-clipping vs. XOR-trick
-#if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
+#if 0 //defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
{
::basegfx::B2DRectangle aRect(0.0, 0.0, 1.0, 1.0);
::basegfx::B2DRectangle aTextureDeviceRect;
@@ -922,7 +926,7 @@ namespace vclcanvas
aGrfAttr.SetMirrorFlags(
( aScale.getX() < 0.0 ? BMP_MIRROR_HORZ : 0 ) |
( aScale.getY() < 0.0 ? BMP_MIRROR_VERT : 0 ) );
- aGrfAttr.SetRotation( static_cast< USHORT >(::basegfx::fround( nRotate*10.0 )) );
+ aGrfAttr.SetRotation( static_cast< sal_uInt16 >(::basegfx::fround( nRotate*10.0 )) );
pGrfObj.reset( new GraphicObject( aBmpEx ) );
}
@@ -1051,7 +1055,7 @@ namespace vclcanvas
// equivalent to the origAlpha*modulateAlpha
// the DX canvas performs)
aGrfAttr.SetTransparency(
- static_cast< BYTE >(
+ static_cast< sal_uInt8 >(
::basegfx::fround( 255.0*( 1.0 - textures[0].Alpha ) ) ) );
}
@@ -1122,7 +1126,7 @@ namespace vclcanvas
aVDev.GetBitmap( aEmptyPoint,
aVDev.GetOutputSizePixel() ) );
- BYTE nCol( static_cast< BYTE >(
+ sal_uInt8 nCol( static_cast< sal_uInt8 >(
::basegfx::fround( 255.0*( 1.0 - textures[0].Alpha ) ) ) );
AlphaMask aAlpha( aVDev.GetOutputSizePixel(),
&nCol );
diff --git a/canvas/source/vcl/devicehelper.cxx b/canvas/source/vcl/devicehelper.cxx
index 02c4e547be76..96b14e2cfb73 100644
--- a/canvas/source/vcl/devicehelper.cxx
+++ b/canvas/source/vcl/devicehelper.cxx
@@ -231,7 +231,7 @@ namespace vclcanvas
const ::Point aEmptyPoint;
OutputDevice& rOutDev = mpOutDev->getOutDev();
bool bOldMap( rOutDev.IsMapModeEnabled() );
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
aStream << rOutDev.GetBitmap(aEmptyPoint,
rOutDev.GetOutputSizePixel());
rOutDev.EnableMapMode( bOldMap );
diff --git a/canvas/source/vcl/exports.dxp b/canvas/source/vcl/exports.dxp
index 0c2e3e7cddd7..0cb5620a1603 100644
--- a/canvas/source/vcl/exports.dxp
+++ b/canvas/source/vcl/exports.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory \ No newline at end of file
diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx
index a6cfe4a0a7f1..24f32aadc237 100644
--- a/canvas/source/vcl/impltools.cxx
+++ b/canvas/source/vcl/impltools.cxx
@@ -180,7 +180,7 @@ namespace vclcanvas
const ::Polygon& rPoly( rPolyPoly[0] );
- USHORT nCount( rPoly.GetSize() );
+ sal_uInt16 nCount( rPoly.GetSize() );
if( nCount < 4 )
return false;
@@ -391,7 +391,7 @@ namespace vclcanvas
pAlphaWriteAccess->SetPixel( y, x,
BitmapColor(
255U -
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nAlphaModulation*
(255U
- aAlphaMap[ pAlphaReadAccess->GetPixel(
@@ -402,15 +402,15 @@ namespace vclcanvas
nSrcX ) );
aColor.SetRed(
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nRedModulation *
aColor.GetRed() + .5 ));
aColor.SetGreen(
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nGreenModulation *
aColor.GetGreen() + .5 ));
aColor.SetBlue(
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nBlueModulation *
aColor.GetBlue() + .5 ));
@@ -445,7 +445,7 @@ namespace vclcanvas
pAlphaWriteAccess->SetPixel( y, x,
BitmapColor(
255U -
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nAlphaModulation*255.0
+ .5 ) ) );
@@ -453,15 +453,15 @@ namespace vclcanvas
nSrcX ) );
aColor.SetRed(
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nRedModulation *
aColor.GetRed() + .5 ));
aColor.SetGreen(
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nGreenModulation *
aColor.GetGreen() + .5 ));
aColor.SetBlue(
- static_cast<BYTE>(
+ static_cast<sal_uInt8>(
nBlueModulation *
aColor.GetBlue() + .5 ));
diff --git a/canvas/source/vcl/impltools.hxx b/canvas/source/vcl/impltools.hxx
index 963162b22587..8b9293acb44d 100644
--- a/canvas/source/vcl/impltools.hxx
+++ b/canvas/source/vcl/impltools.hxx
@@ -170,7 +170,7 @@ namespace vclcanvas
if( mpOutDev )
{
mpOutDev->Push();
- mpOutDev->EnableMapMode(FALSE);
+ mpOutDev->EnableMapMode(sal_False);
}
}
diff --git a/canvas/source/vcl/makefile.mk b/canvas/source/vcl/makefile.mk
index be2fc69894a4..7d5f9658c829 100644
--- a/canvas/source/vcl/makefile.mk
+++ b/canvas/source/vcl/makefile.mk
@@ -83,3 +83,11 @@ DEF1EXPORTFILE=exports.dxp
# ==========================================================================
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/vclcanvas.component
+
+$(MISC)/vclcanvas.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ vclcanvas.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt vclcanvas.component
diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx
index 29c6725a70af..ac75508809fe 100644
--- a/canvas/source/vcl/spritecanvashelper.cxx
+++ b/canvas/source/vcl/spritecanvashelper.cxx
@@ -99,7 +99,7 @@ namespace vclcanvas
// clip output to actual update region (otherwise a)
// wouldn't save much render time, and b) will clutter
// scrolled sprite content outside this area)
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
rOutDev.SetClipRegion( rRequestedArea );
// repaint affected sprite directly to output device (at
@@ -319,7 +319,7 @@ namespace vclcanvas
// but repaint everything (or caller requested that)
maVDev->SetOutputSizePixel( aOutDevSize );
- maVDev->EnableMapMode( FALSE );
+ maVDev->EnableMapMode( sal_False );
maVDev->DrawOutDev( aEmptyPoint, aOutDevSize,
aEmptyPoint, aOutDevSize,
rBackOutDev );
@@ -333,7 +333,7 @@ namespace vclcanvas
_1 ) );
// flush to screen
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
rOutDev.SetClipRegion();
rOutDev.DrawOutDev( aEmptyPoint, aOutDevSize,
aEmptyPoint, aOutDevSize,
@@ -578,7 +578,7 @@ namespace vclcanvas
}
// paint background
- maVDev->EnableMapMode( FALSE );
+ maVDev->EnableMapMode( sal_False );
maVDev->SetClipRegion();
maVDev->DrawOutDev( aEmptyPoint, aOutputSize,
aOutputPosition, aOutputSize,
@@ -595,7 +595,7 @@ namespace vclcanvas
_1 ) );
// flush to screen
- rOutDev.EnableMapMode( FALSE );
+ rOutDev.EnableMapMode( sal_False );
rOutDev.DrawOutDev( aOutputPosition, aOutputSize,
aEmptyPoint, aOutputSize,
*maVDev );
diff --git a/canvas/source/vcl/spritedevicehelper.cxx b/canvas/source/vcl/spritedevicehelper.cxx
index 5a3509612ba1..20129ea3fe16 100644
--- a/canvas/source/vcl/spritedevicehelper.cxx
+++ b/canvas/source/vcl/spritedevicehelper.cxx
@@ -68,7 +68,7 @@ namespace vclcanvas
// switch off AA for WIN32 and UNIX, the VCLCanvas does not look good with it and
// is not required to do AA. It would need to be adapted to use it correctly
// (especially gradient painting). This will need extra work.
- mpBackBuffer->getOutDev().SetAntialiasing(mpBackBuffer->getOutDev().GetAntialiasing() & !ANTIALIASING_ENABLE_B2DDRAW);
+ mpBackBuffer->getOutDev().SetAntialiasing(mpBackBuffer->getOutDev().GetAntialiasing() & ~ANTIALIASING_ENABLE_B2DDRAW);
#endif
}
@@ -148,7 +148,7 @@ namespace vclcanvas
SvFileStream aStream( aFilename, STREAM_STD_READWRITE );
const ::Point aEmptyPoint;
- mpBackBuffer->getOutDev().EnableMapMode( FALSE );
+ mpBackBuffer->getOutDev().EnableMapMode( sal_False );
aStream << mpBackBuffer->getOutDev().GetBitmap(aEmptyPoint,
mpBackBuffer->getOutDev().GetOutputSizePixel());
}
diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx
index 6dcf6868f165..e4226fac1f16 100644..100755
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -341,21 +341,8 @@ namespace vclcanvas
else
#endif
{
- // redraw is direcly on the front buffer,
- // or using alpha blending - cannot use
- // XOR, thus, employing the still somewhat
- // speedier triangle clip method
- ::basegfx::B2DPolygon aTriangulatedClip(::basegfx::triangulator::triangulate(aClipPoly));
-
- // restrict the clipping area to the visible portion of the output device.
- Size aSize(rTargetSurface.GetOutputSizePixel());
- ::basegfx::B2DRange aOutputRect(::basegfx::B2DPoint(0,0),::basegfx::B2DPoint(aSize.Width(),aSize.Height()));
- ::basegfx::B2DPolygon aClippedClip(::basegfx::tools::clipTriangleListOnRange(aTriangulatedClip,aOutputRect));
-
- // #i76339#
- const Polygon aPoly(aClippedClip);
- const PolyPolygon aPolyPoly(aPoly);
- rTargetSurface.SetTriangleClipRegion(aPolyPoly);
+ Region aClipRegion( aClipPoly );
+ rTargetSurface.SetClipRegion( aClipRegion );
}
}
}
@@ -376,7 +363,7 @@ namespace vclcanvas
// here
// draw semi-transparent
- BYTE nColor( static_cast<UINT8>( ::basegfx::fround( 255.0*(1.0 - fAlpha) + .5) ) );
+ sal_uInt8 nColor( static_cast<sal_uInt8>( ::basegfx::fround( 255.0*(1.0 - fAlpha) + .5) ) );
AlphaMask aAlpha( maContent->GetSizePixel(),
&nColor );
@@ -408,7 +395,7 @@ namespace vclcanvas
for( int i=0; i<aMarkerPoly.Count(); ++i )
{
- rTargetSurface.DrawPolyLine( aMarkerPoly.GetObject((USHORT)i) );
+ rTargetSurface.DrawPolyLine( aMarkerPoly.GetObject((sal_uInt16)i) );
}
// paint sprite prio
diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx
index ffd650dcd0bb..08cdd66abe00 100644
--- a/canvas/source/vcl/textlayout.cxx
+++ b/canvas/source/vcl/textlayout.cxx
@@ -59,7 +59,7 @@ namespace vclcanvas
sal_Int8 nTextDirection )
{
// TODO(P3): avoid if already correctly set
- ULONG nLayoutMode;
+ sal_uIntPtr nLayoutMode;
switch( nTextDirection )
{
default:
@@ -140,10 +140,10 @@ namespace vclcanvas
if (aVDev.GetTextOutlines(
aOutlines,
maText.Text,
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length),
- FALSE,
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length),
+ sal_False,
0,
aOffsets.get()))
{
@@ -193,9 +193,9 @@ namespace vclcanvas
if (aVDev.GetGlyphBoundRects(
Point(0,0),
maText.Text,
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length),
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
aMetricVector))
{
aBoundingBoxes.realloc(aMetricVector.size());
@@ -273,8 +273,8 @@ namespace vclcanvas
return geometry::RealRectangle2D( 0, nAboveBaseline,
aVDev.GetTextWidth(
maText.Text,
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length) ),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) ),
nBelowBaseline );
}
}
@@ -406,15 +406,15 @@ namespace vclcanvas
rOutDev.DrawTextArray( rOutpos,
maText.Text,
aOffsets.get(),
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length) );
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) );
}
else
{
rOutDev.DrawText( rOutpos,
maText.Text,
- ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition),
- ::canvas::tools::numeric_cast<USHORT>(maText.Length) );
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+ ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) );
}
return true;
diff --git a/canvas/source/vcl/vclcanvas.component b/canvas/source/vcl/vclcanvas.component
new file mode 100644
index 000000000000..f7e0bb8c0266
--- /dev/null
+++ b/canvas/source/vcl/vclcanvas.component
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.rendering.Canvas.VCL">
+ <service name="com.sun.star.rendering.Canvas.VCL"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.rendering.SpriteCanvas.VCL">
+ <service name="com.sun.star.rendering.SpriteCanvas.VCL"/>
+ </implementation>
+</component>