summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rwxr-xr-x[-rw-r--r--]vcl/source/app/dbggui.cxx30
-rw-r--r--vcl/source/app/help.cxx12
-rw-r--r--vcl/source/app/i18nhelp.cxx10
-rw-r--r--vcl/source/app/idlemgr.cxx5
-rw-r--r--vcl/source/app/makefile.mk71
-rw-r--r--vcl/source/app/salvtables.cxx20
-rw-r--r--vcl/source/app/session.cxx13
-rw-r--r--vcl/source/app/settings.cxx12
-rw-r--r--vcl/source/app/sound.cxx12
-rw-r--r--vcl/source/app/stdtext.cxx4
-rw-r--r--vcl/source/app/svapp.cxx49
-rw-r--r--vcl/source/app/svdata.cxx30
-rw-r--r--vcl/source/app/svmain.cxx81
-rw-r--r--vcl/source/app/timer.cxx10
-rw-r--r--vcl/source/app/unohelp.cxx18
-rw-r--r--vcl/source/app/vclevent.cxx3
-rw-r--r--vcl/source/components/dtranscomp.cxx13
-rw-r--r--vcl/source/components/factory.cxx15
-rw-r--r--vcl/source/components/fontident.cxx14
-rw-r--r--vcl/source/components/makefile.mk21
-rw-r--r--vcl/source/components/rasterizer_rsvg.cxx640
-rw-r--r--vcl/source/control/button.cxx14
-rw-r--r--vcl/source/control/combobox.cxx11
-rw-r--r--vcl/source/control/ctrl.cxx11
-rw-r--r--vcl/source/control/edit.cxx11
-rw-r--r--vcl/source/control/field.cxx7
-rw-r--r--vcl/source/control/field2.cxx8
-rw-r--r--vcl/source/control/fixed.cxx8
-rw-r--r--vcl/source/control/group.cxx6
-rw-r--r--vcl/source/control/ilstbox.cxx13
-rw-r--r--vcl/source/control/longcurr.cxx2
-rw-r--r--vcl/source/control/lstbox.cxx22
-rw-r--r--vcl/source/control/makefile.mk78
-rw-r--r--vcl/source/control/scrbar.cxx3
-rw-r--r--vcl/source/control/spinfld.cxx6
-rw-r--r--vcl/source/control/tabctrl.cxx9
-rw-r--r--vcl/source/fontsubset/cff.cxx3
-rw-r--r--vcl/source/fontsubset/fontsubset.cxx5
-rw-r--r--vcl/source/fontsubset/makefile.mk51
-rw-r--r--vcl/source/gdi/bitmap.cxx12
-rw-r--r--vcl/source/gdi/bitmap3.cxx6
-rw-r--r--vcl/source/gdi/bitmapex.cxx13
-rw-r--r--vcl/source/gdi/bmpacc.cxx5
-rw-r--r--vcl/source/gdi/bmpacc3.cxx7
-rw-r--r--vcl/source/gdi/bmpfast.cxx2
-rw-r--r--vcl/source/gdi/configsettings.cxx4
-rw-r--r--vcl/source/gdi/cvtgrf.cxx6
-rw-r--r--vcl/source/gdi/font.cxx15
-rw-r--r--vcl/source/gdi/gdimtf.cxx768
-rw-r--r--vcl/source/gdi/gfxlink.cxx1
-rw-r--r--vcl/source/gdi/graph.cxx34
-rw-r--r--vcl/source/gdi/image.cxx5
-rw-r--r--vcl/source/gdi/imagerepository.cxx3
-rw-r--r--vcl/source/gdi/impbmp.cxx11
-rw-r--r--vcl/source/gdi/impgraph.cxx64
-rw-r--r--vcl/source/gdi/impimage.cxx4
-rw-r--r--vcl/source/gdi/impimagetree.cxx11
-rw-r--r--vcl/source/gdi/jobset.cxx4
-rwxr-xr-xvcl/source/gdi/makefile.mk24
-rw-r--r--vcl/source/gdi/metaact.cxx92
-rw-r--r--vcl/source/gdi/metric.cxx2
-rw-r--r--vcl/source/gdi/octree.cxx5
-rw-r--r--vcl/source/gdi/outdev.cxx27
-rw-r--r--vcl/source/gdi/outdev2.cxx23
-rwxr-xr-x[-rw-r--r--]vcl/source/gdi/outdev3.cxx52
-rw-r--r--vcl/source/gdi/outdev4.cxx17
-rw-r--r--vcl/source/gdi/outdev5.cxx11
-rw-r--r--vcl/source/gdi/outdev6.cxx42
-rw-r--r--vcl/source/gdi/outdevnative.cxx3
-rw-r--r--vcl/source/gdi/outmap.cxx16
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx53
-rw-r--r--vcl/source/gdi/pdffontcache.cxx6
-rw-r--r--vcl/source/gdi/pdffontcache.hxx4
-rw-r--r--vcl/source/gdi/pdfwriter.cxx6
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx46
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx8
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx17
-rw-r--r--vcl/source/gdi/polyscan.cxx361
-rw-r--r--vcl/source/gdi/print.cxx24
-rw-r--r--vcl/source/gdi/print2.cxx37
-rw-r--r--vcl/source/gdi/print3.cxx11
-rw-r--r--vcl/source/gdi/region.cxx5
-rw-r--r--vcl/source/gdi/rendergraphic.cxx240
-rw-r--r--vcl/source/gdi/rendergraphicrasterizer.cxx400
-rw-r--r--vcl/source/gdi/salgdilayout.cxx27
-rw-r--r--vcl/source/gdi/sallayout.cxx6
-rw-r--r--vcl/source/gdi/salmisc.cxx2
-rw-r--r--vcl/source/gdi/salnativewidgets-none.cxx2
-rw-r--r--vcl/source/gdi/svcompat.cxx81
-rw-r--r--vcl/source/gdi/svgread.cxx131
-rw-r--r--vcl/source/gdi/textlayout.cxx5
-rw-r--r--vcl/source/gdi/virdev.cxx15
-rw-r--r--vcl/source/gdi/wall.cxx7
-rw-r--r--vcl/source/glyphs/gcach_ftyp.cxx8
-rw-r--r--vcl/source/glyphs/gcach_ftyp.hxx2
-rw-r--r--vcl/source/glyphs/gcach_layout.cxx4
-rw-r--r--vcl/source/glyphs/gcach_rbmp.cxx2
-rw-r--r--vcl/source/glyphs/gcach_vdev.cxx290
-rw-r--r--vcl/source/glyphs/gcach_vdev.hxx60
-rw-r--r--vcl/source/glyphs/glyphcache.cxx8
-rw-r--r--vcl/source/glyphs/graphite_features.cxx2
-rw-r--r--vcl/source/glyphs/graphite_layout.cxx3
-rw-r--r--vcl/source/glyphs/graphite_serverfont.cxx5
-rw-r--r--vcl/source/glyphs/graphite_textsrc.cxx2
-rw-r--r--vcl/source/glyphs/graphite_textsrc.hxx3
-rw-r--r--vcl/source/glyphs/makefile.mk80
-rw-r--r--vcl/source/helper/canvasbitmap.cxx2
-rw-r--r--vcl/source/helper/canvastools.cxx2
-rw-r--r--vcl/source/helper/lazydelete.cxx2
-rw-r--r--vcl/source/helper/makefile.mk55
-rw-r--r--vcl/source/helper/xconnection.cxx9
-rw-r--r--vcl/source/salmain/makefile.mk41
-rw-r--r--vcl/source/salmain/salmain.cxx3
-rw-r--r--vcl/source/src/btntext.src4
-rw-r--r--vcl/source/src/helptext.src4
-rw-r--r--vcl/source/src/images.src4
-rw-r--r--vcl/source/src/makefile.mk56
-rw-r--r--vcl/source/src/menu.src5
-rw-r--r--vcl/source/src/print.src2
-rw-r--r--vcl/source/src/stdtext.src4
-rw-r--r--vcl/source/src/units.src4
-rw-r--r--vcl/source/window/abstdlg.cxx3
-rw-r--r--vcl/source/window/accel.cxx5
-rw-r--r--vcl/source/window/accmgr.cxx5
-rw-r--r--vcl/source/window/arrange.cxx3
-rw-r--r--vcl/source/window/brdwin.cxx10
-rw-r--r--vcl/source/window/btndlg.cxx4
-rw-r--r--vcl/source/window/cursor.cxx24
-rw-r--r--vcl/source/window/dialog.cxx7
-rw-r--r--vcl/source/window/dlgctrl.cxx7
-rw-r--r--vcl/source/window/dndevdis.cxx9
-rw-r--r--vcl/source/window/dndlcon.cxx2
-rw-r--r--vcl/source/window/dockingarea.cxx5
-rw-r--r--vcl/source/window/dockmgr.cxx11
-rw-r--r--vcl/source/window/dockwin.cxx10
-rw-r--r--vcl/source/window/floatwin.cxx11
-rw-r--r--vcl/source/window/introwin.cxx9
-rw-r--r--vcl/source/window/keycod.cxx9
-rw-r--r--vcl/source/window/makefile.mk106
-rw-r--r--vcl/source/window/menu.cxx19
-rw-r--r--vcl/source/window/msgbox.cxx12
-rw-r--r--vcl/source/window/printdlg.cxx9
-rw-r--r--vcl/source/window/scrwnd.cxx7
-rw-r--r--vcl/source/window/seleng.cxx6
-rw-r--r--vcl/source/window/split.cxx7
-rw-r--r--vcl/source/window/splitwin.cxx6
-rw-r--r--vcl/source/window/status.cxx8
-rwxr-xr-x[-rw-r--r--]vcl/source/window/syschild.cxx20
-rw-r--r--vcl/source/window/syswin.cxx10
-rw-r--r--vcl/source/window/tabpage.cxx7
-rw-r--r--vcl/source/window/taskpanelist.cxx7
-rwxr-xr-x[-rw-r--r--]vcl/source/window/toolbox.cxx18
-rw-r--r--vcl/source/window/toolbox2.cxx14
-rwxr-xr-x[-rw-r--r--]vcl/source/window/window.cxx72
-rw-r--r--vcl/source/window/window2.cxx22
-rw-r--r--vcl/source/window/window4.cxx5
-rw-r--r--vcl/source/window/winproc.cxx40
-rw-r--r--vcl/source/window/wpropset.cxx3
-rwxr-xr-x[-rw-r--r--]vcl/source/window/wrkwin.cxx14
159 files changed, 3044 insertions, 2302 deletions
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index 0380e9e58044..ccc509ced1f1 100644..100755
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -38,14 +38,10 @@
#include <cmath>
#include <limits.h>
-#include "vcl/svdata.hxx"
-#include "svsys.h"
-
-#ifdef WNT
-#undef min
-#endif
#include "tools/debug.hxx"
-#include "vcl/svdata.hxx"
+
+#include "vos/mutex.hxx"
+
#include "vcl/svapp.hxx"
#include "vcl/event.hxx"
#include "vcl/lstbox.hxx"
@@ -58,13 +54,18 @@
#include "vcl/wrkwin.hxx"
#include "vcl/sound.hxx"
#include "vcl/threadex.hxx"
-#include "vcl/dbggui.hxx"
-#include "com/sun/star/i18n/XCharacterClassification.hpp"
+
+#include "svdata.hxx"
+#include "dbggui.hxx"
#include "vcl/unohelp.hxx"
#include "vcl/unohelp2.hxx"
-#include <osl/mutex.hxx>
-#include "vcl/salinst.hxx"
+
+#include "salinst.hxx"
+#include "svdata.hxx"
+#include "svsys.h"
+
+#include "com/sun/star/i18n/XCharacterClassification.hpp"
#include <map>
#include <algorithm>
@@ -627,10 +628,9 @@ sal_Bool DbgWindow::Close()
// remember window position
ByteString aState( GetWindowState() );
DbgData* pData = DbgGetData();
- strncpy( pData->aDbgWinState,
- aState.GetBuffer(),
- std::min( sizeof( pData->aDbgWinState ),
- size_t(aState.Len() + 1U )) );
+ size_t nCopy = (sizeof( pData->aDbgWinState ) < size_t(aState.Len() + 1U ))
+ ? sizeof( pData->aDbgWinState ) : size_t(aState.Len() + 1U );
+ strncpy( pData->aDbgWinState, aState.GetBuffer(), nCopy );
pData->aDbgWinState[ sizeof( pData->aDbgWinState ) - 1 ] = 0;
// and save for next session
DbgSaveData( *pData );
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index 41263675840f..75bab1a29694 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -29,16 +29,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include "vcl/svdata.hxx"
+#include "tools/debug.hxx"
+#include "tools/diagnose_ex.h"
+#include "tools/time.hxx"
+
#include "vcl/window.hxx"
#include "vcl/event.hxx"
#include "vcl/svapp.hxx"
#include "vcl/wrkwin.hxx"
#include "vcl/help.hxx"
-#include "vcl/helpwin.hxx"
-#include "tools/debug.hxx"
-#include "tools/diagnose_ex.h"
-#include "tools/time.hxx"
+
+#include "helpwin.hxx"
+#include "svdata.hxx"
// =======================================================================
diff --git a/vcl/source/app/i18nhelp.cxx b/vcl/source/app/i18nhelp.cxx
index 0f9a8df94255..b55a988fa7da 100644
--- a/vcl/source/app/i18nhelp.cxx
+++ b/vcl/source/app/i18nhelp.cxx
@@ -29,16 +29,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include "vcl/i18nhelp.hxx"
-
-#include "com/sun/star/lang/XMultiServiceFactory.hpp"
-#include "com/sun/star/i18n/TransliterationModules.hpp"
#include "unotools/localedatawrapper.hxx"
#include "unotools/transliterationwrapper.hxx"
+
#include "i18npool/mslangid.hxx"
#include "rtl/ustrbuf.hxx"
+#include "vcl/i18nhelp.hxx"
+
+#include "com/sun/star/lang/XMultiServiceFactory.hpp"
+#include "com/sun/star/i18n/TransliterationModules.hpp"
+
using namespace ::com::sun::star;
vcl::I18nHelper::I18nHelper( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMSF, const ::com::sun::star::lang::Locale& rLocale )
diff --git a/vcl/source/app/idlemgr.cxx b/vcl/source/app/idlemgr.cxx
index cc6502a74896..57547d80a007 100644
--- a/vcl/source/app/idlemgr.cxx
+++ b/vcl/source/app/idlemgr.cxx
@@ -28,9 +28,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <vcl/idlemgr.hxx>
+
+
#include <vcl/svapp.hxx>
+#include <idlemgr.hxx>
+
// =======================================================================
struct ImplIdleData
diff --git a/vcl/source/app/makefile.mk b/vcl/source/app/makefile.mk
deleted file mode 100644
index 6e9c91f3c2e7..000000000000
--- a/vcl/source/app/makefile.mk
+++ /dev/null
@@ -1,71 +0,0 @@
-#*************************************************************************
-#
-# 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.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=vcl
-TARGET=app
-ENABLE_EXCEPTIONS=TRUE
-
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile2.pmk
-
-CDEFS+=-DDLLPOSTFIX=$(DLLPOSTFIX)
-
-# --- Files --------------------------------------------------------
-
-SLOFILES= $(SLO)$/dbggui.obj \
- $(SLO)$/brand.obj \
- $(SLO)$/help.obj \
- $(SLO)$/idlemgr.obj \
- $(SLO)$/settings.obj \
- $(SLO)$/sound.obj \
- $(SLO)$/stdtext.obj \
- $(SLO)$/svapp.obj \
- $(SLO)$/svdata.obj \
- $(SLO)$/svmain.obj \
- $(SLO)$/svmainhook.obj \
- $(SLO)$/timer.obj \
- $(SLO)$/dndhelp.obj \
- $(SLO)$/unohelp.obj \
- $(SLO)$/unohelp2.obj \
- $(SLO)$/vclevent.obj \
- $(SLO)$/i18nhelp.obj \
- $(SLO)$/salvtables.obj \
- $(SLO)$/solarmutex.obj \
- $(SLO)$/session.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.INCLUDE : $(PRJ)$/util$/target.pmk
-
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 8cbd1d816f8c..d30637f1e54e 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -29,16 +29,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <vcl/salframe.hxx>
-#include <vcl/salinst.hxx>
-#include <vcl/salvd.hxx>
-#include <vcl/salprn.hxx>
-#include <vcl/saltimer.hxx>
-#include <vcl/salimestatus.hxx>
-#include <vcl/salsys.hxx>
-#include <vcl/salbmp.hxx>
-#include <vcl/salobj.hxx>
-#include <vcl/salmenu.hxx>
+#include <salframe.hxx>
+#include <salinst.hxx>
+#include <salvd.hxx>
+#include <salprn.hxx>
+#include <saltimer.hxx>
+#include <salimestatus.hxx>
+#include <salsys.hxx>
+#include <salbmp.hxx>
+#include <salobj.hxx>
+#include <salmenu.hxx>
// this file contains the virtual destructors of the sal interface
// compilers ususally put their vtables where the destructor is
diff --git a/vcl/source/app/session.cxx b/vcl/source/app/session.cxx
index 89aaf9026312..afcbab4bcc71 100644
--- a/vcl/source/app/session.cxx
+++ b/vcl/source/app/session.cxx
@@ -28,12 +28,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <vcl/svapp.hxx>
-#include <vcl/svdata.hxx>
-#include <vcl/salinst.hxx>
-#include <vcl/salsession.hxx>
+
#include <cppuhelper/compbase1.hxx>
+
#include <tools/debug.hxx>
+
+#include <vcl/svapp.hxx>
+
+#include <svdata.hxx>
+#include <salinst.hxx>
+#include <salsession.hxx>
+
#include <com/sun/star/frame/XSessionManagerClient.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/frame/XSessionManagerListener2.hpp>
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index a55fec63e8b1..64cdeab7b61f 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -30,25 +30,29 @@
#include "precompiled_vcl.hxx"
#include <svsys.h>
#include "tools/debug.hxx"
+
#include "i18npool/mslangid.hxx"
+
#include "vcl/svapp.hxx"
-#include "vcl/svdata.hxx"
#include "vcl/event.hxx"
#include "vcl/settings.hxx"
#include "vcl/i18nhelp.hxx"
-#include "unotools/fontcfg.hxx"
#include "vcl/configsettings.hxx"
#include "vcl/gradient.hxx"
#include "vcl/unohelp.hxx"
#include "vcl/bitmapex.hxx"
-#include "vcl/impimagetree.hxx"
+
+#include "unotools/fontcfg.hxx"
#include "unotools/localedatawrapper.hxx"
#include "unotools/collatorwrapper.hxx"
#include "unotools/configmgr.hxx"
#include "unotools/confignode.hxx"
-#include <unotools/syslocaleoptions.hxx>
+#include "unotools/syslocaleoptions.hxx"
using ::rtl::OUString;
+
+#include "svdata.hxx"
+#include "impimagetree.hxx"
// =======================================================================
DBG_NAME( AllSettings )
diff --git a/vcl/source/app/sound.cxx b/vcl/source/app/sound.cxx
index 13f832339977..5fe5b5d38143 100644
--- a/vcl/source/app/sound.cxx
+++ b/vcl/source/app/sound.cxx
@@ -28,18 +28,20 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+
#include <tools/urlobj.hxx>
+#include <tools/debug.hxx>
+
#include <unotools/localfilehelper.hxx>
#include <unotools/ucbstreamhelper.hxx>
-#include <svsys.h>
-#include <vcl/salframe.hxx>
-#include <tools/debug.hxx>
-#include <vcl/svdata.hxx>
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
#include <vcl/salbtype.hxx>
#include <vcl/sound.hxx>
-#include <vcl/salinst.hxx>
+
+#include <salframe.hxx>
+#include <svdata.hxx>
+#include <salinst.hxx>
void Sound::Beep( SoundType eType, Window* pWindow )
{
diff --git a/vcl/source/app/stdtext.cxx b/vcl/source/app/stdtext.cxx
index 3fc2e67cc488..d33fbd7da71f 100644
--- a/vcl/source/app/stdtext.cxx
+++ b/vcl/source/app/stdtext.cxx
@@ -29,11 +29,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <vcl/svids.hrc>
-#include <vcl/svdata.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/stdtext.hxx>
+#include <svids.hrc>
+#include <svdata.hxx>
// =======================================================================
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index e4cf7bf32330..fe536addac98 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -29,51 +29,58 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include "svsys.h"
-#include "vcl/salinst.hxx"
-#include "vcl/salframe.hxx"
-#include "vcl/salsys.hxx"
+//#include "svsys.h"
+
+#include "comphelper/processfactory.hxx"
+
+#include "osl/module.h"
+#include "osl/file.hxx"
+#include "osl/thread.h"
+
+#include "rtl/tencinfo.h"
+#include "rtl/instance.hxx"
+
+
#include "tools/tools.h"
#include "tools/debug.hxx"
#include "tools/time.hxx"
+
#include "i18npool/mslangid.hxx"
-#include "vcl/svdata.hxx"
+
+#include "unotools/syslocaleoptions.hxx"
+
#include "vcl/settings.hxx"
-#include "vcl/accmgr.hxx"
#include "vcl/keycod.hxx"
#include "vcl/event.hxx"
#include "vcl/vclevent.hxx"
#include "vcl/virdev.hxx"
-#include "vcl/window.h"
#include "vcl/wrkwin.hxx"
-#include "vcl/idlemgr.hxx"
#include "vcl/svapp.hxx"
#include "vcl/cvtgrf.hxx"
#include "vcl/unowrap.hxx"
-#include "vcl/xconnection.hxx"
-#include "vcl/svids.hrc"
#include "vcl/timer.hxx"
-
#include "vcl/unohelp.hxx"
+#include "vcl/lazydelete.hxx"
+
+#include "salinst.hxx"
+#include "salframe.hxx"
+#include "salsys.hxx"
+#include "svdata.hxx"
+#include "salimestatus.hxx"
+#include "xconnection.hxx"
+#include "window.h"
+#include "accmgr.hxx"
+#include "idlemgr.hxx"
+#include "svids.hrc"
#include "com/sun/star/uno/Reference.h"
#include "com/sun/star/awt/XToolkit.hpp"
#include "com/sun/star/uno/XNamingService.hpp"
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
-#include "comphelper/processfactory.hxx"
-
-#include "osl/module.h"
-#include "osl/file.hxx"
#include "osl/mutex.hxx"
#include "osl/process.h"
-#include "osl/thread.h"
-#include "rtl/tencinfo.h"
-#include "rtl/instance.hxx"
-#include "vcl/salimestatus.hxx"
#include <utility>
-#include <vcl/lazydelete.hxx>
-#include <unotools/syslocaleoptions.hxx>
using namespace ::com::sun::star::uno;
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index ee46f14acae0..409b4dee1da7 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -33,33 +33,35 @@
#include <boost/ptr_container/ptr_vector.hpp>
+
#include <osl/file.hxx>
#include <osl/mutex.hxx>
#include <rtl/process.h>
-
#include "tools/debug.hxx"
#include "tools/resary.hxx"
-#include "vcl/salinst.hxx"
-#include "vcl/salframe.hxx"
+#include "unotools/fontcfg.hxx"
+
+#include "vos/mutex.hxx"
+
+#include "cppuhelper/implbase1.hxx"
+
+#include "uno/current_context.hxx"
+
#include "vcl/configsettings.hxx"
-#include "vcl/svdata.hxx"
-#include "vcl/window.h"
#include "vcl/svapp.hxx"
#include "vcl/wrkwin.hxx"
#include "vcl/msgbox.hxx"
#include "vcl/unohelp.hxx"
#include "vcl/button.hxx" // for Button::GetStandardText
#include "vcl/dockwin.hxx" // for DockingManager
-#include "vcl/salimestatus.hxx"
-#include "vcl/salsys.hxx"
-#include "vcl/svids.hrc"
-#include "vcl/xconnection.hxx"
-
-#include "unotools/fontcfg.hxx"
-
-#include "cppuhelper/implbase1.hxx"
-#include "uno/current_context.hxx"
+#include "salinst.hxx"
+#include "salframe.hxx"
+#include "svdata.hxx"
+#include "window.h"
+#include "salimestatus.hxx"
+#include "salsys.hxx"
+#include "svids.hrc"
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/lang/XComponent.hpp"
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 655bb0393563..b54ebd855433 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -29,6 +29,32 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+#include "rtl/logfile.hxx"
+
+#include "osl/file.hxx"
+
+#include "vos/signal.hxx"
+#include "vos/process.hxx"
+
+#include "tools/tools.h"
+#include "tools/debug.hxx"
+#include "tools/unqid.hxx"
+#include "tools/resmgr.hxx"
+
+#include "comphelper/processfactory.hxx"
+
+#include "unotools/syslocaleoptions.hxx"
+#include "unotools/fontcfg.hxx"
+
+#include "vcl/svapp.hxx"
+#include "vcl/wrkwin.hxx"
+#include "vcl/cvtgrf.hxx"
+#include "vcl/image.hxx"
+#include "vcl/settings.hxx"
+#include "vcl/unowrap.hxx"
+#include "vcl/configsettings.hxx"
+#include "vcl/lazydelete.hxx"
+
#ifdef WNT
#include <svsys.h>
#include <process.h> // for _beginthreadex
@@ -40,46 +66,29 @@
// building X11 graphics layers.
#if defined UNX && ! defined QUARTZ
-#include "svunx.h"
+//#include "svunx.h"
#endif
-#include "svsys.h"
-#include "vcl/salinst.hxx"
-#include "vcl/salwtype.hxx"
-#include "osl/signal.h"
-#include "tools/tools.h"
-#include "tools/debug.hxx"
-#include "tools/unqid.hxx"
-#include "vcl/svdata.hxx"
-#include "vcl/dbggui.hxx"
-#include "vcl/svapp.hxx"
-#include "vcl/wrkwin.hxx"
-#include "vcl/cvtgrf.hxx"
-#include "vcl/image.hxx"
-#include "tools/resmgr.hxx"
-#include "vcl/accmgr.hxx"
-#include "vcl/idlemgr.hxx"
-#include "vcl/outdev.h"
-#include "vcl/outfont.hxx"
-#include "vcl/print.h"
-#include "vcl/settings.hxx"
-#include "vcl/unowrap.hxx"
-#include "vcl/salsys.hxx"
-#include "vcl/saltimer.hxx"
-#include "vcl/salimestatus.hxx"
-#include "vcl/impimagetree.hxx"
-#include "vcl/xconnection.hxx"
+//#include "svsys.h"
+
+#include "salinst.hxx"
+#include "salwtype.hxx"
+#include "svdata.hxx"
+#include "dbggui.hxx"
+#include "accmgr.hxx"
+#include "idlemgr.hxx"
+#include "outdev.h"
+#include "outfont.hxx"
+#include "print.h"
+#include "salsys.hxx"
+#include "saltimer.hxx"
+#include "salimestatus.hxx"
+#include "impimagetree.hxx"
+#include "xconnection.hxx"
-#include "osl/file.hxx"
#include "osl/process.h"
-#include "comphelper/processfactory.hxx"
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/lang/XComponent.hpp"
-#include "rtl/logfile.hxx"
-#include <unotools/syslocaleoptions.hxx>
-#include "unotools/fontcfg.hxx"
-#include "vcl/configsettings.hxx"
-#include "vcl/lazydelete.hxx"
#include "cppuhelper/implbase1.hxx"
#include "uno/current_context.hxx"
@@ -379,7 +388,9 @@ void DeInitVCL()
aBuf.append( rtl::OUStringToOString( pWin->GetText(), osl_getThreadTextEncoding() ) );
aBuf.append( "\" type = \"" );
aBuf.append( typeid(*pWin).name() );
- aBuf.append( "\"\n" );
+ aBuf.append( "\", ptr = 0x" );
+ aBuf.append( sal_Int64( pWin ), 16 );
+ aBuf.append( "\n" );
}
}
DBG_ASSERT( nBadTopWindows==0, aBuf.getStr() );
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index 6c2d08b18659..fc2242522433 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -29,15 +29,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <svsys.h>
-#include <vcl/saltimer.hxx>
#include <tools/time.hxx>
-#include <vcl/svdata.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/salinst.hxx>
#include <tools/debug.hxx>
+
+#include <vcl/svapp.hxx>
#include <vcl/timer.hxx>
+#include <saltimer.hxx>
+#include <svdata.hxx>
+#include <salinst.hxx>
// =======================================================================
diff --git a/vcl/source/app/unohelp.cxx b/vcl/source/app/unohelp.cxx
index 00fbaaeef3c4..57508219d8de 100644
--- a/vcl/source/app/unohelp.cxx
+++ b/vcl/source/app/unohelp.cxx
@@ -29,30 +29,28 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+#include <tools/tempfile.hxx>
+
+#include <osl/file.hxx>
+#include <cppuhelper/servicefactory.hxx>
+#include <vcl/svapp.hxx>
#include <vcl/unohelp.hxx>
+
+#include <svdata.hxx>
+
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <com/sun/star/i18n/XCharacterClassification.hpp>
-
#include <com/sun/star/awt/XExtendedToolkit.hpp>
#include <com/sun/star/accessibility/AccessibleEventObject.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
-
-
#include <com/sun/star/registry/XImplementationRegistration.hpp>
-#include <cppuhelper/servicefactory.hxx>
-
-#include <tools/tempfile.hxx>
-#include <osl/file.hxx>
-
-#include <vcl/svdata.hxx>
-#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
using namespace ::rtl;
diff --git a/vcl/source/app/vclevent.cxx b/vcl/source/app/vclevent.cxx
index f7614c99046b..0ce3cc90f633 100644
--- a/vcl/source/app/vclevent.cxx
+++ b/vcl/source/app/vclevent.cxx
@@ -30,7 +30,8 @@
#include "precompiled_vcl.hxx"
#include "vcl/vclevent.hxx"
-#include "vcl/svdata.hxx"
+
+#include "svdata.hxx"
#include <com/sun/star/accessibility/XAccessible.hpp>
diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx
index cd1fbec0502b..b089db6e387e 100644
--- a/vcl/source/components/dtranscomp.cxx
+++ b/vcl/source/components/dtranscomp.cxx
@@ -29,6 +29,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+#include "osl/mutex.hxx"
+
+#include "vcl/svapp.hxx"
+
+#include "svdata.hxx"
+#include "salinst.hxx"
+
#include "com/sun/star/lang/XServiceInfo.hpp"
#include "com/sun/star/lang/XSingleServiceFactory.hpp"
#include "com/sun/star/lang/XInitialization.hpp"
@@ -42,12 +49,6 @@
#include "com/sun/star/datatransfer/dnd/XDropTarget.hpp"
#include "com/sun/star/datatransfer/dnd/DNDConstants.hpp"
-#include "vcl/svapp.hxx"
-#include "vcl/svdata.hxx"
-#include "vcl/salinst.hxx"
-#include "osl/mutex.hxx"
-#include "osl/mutex.hxx"
-
#include "cppuhelper/compbase1.hxx"
#include "cppuhelper/compbase2.hxx"
#include "cppuhelper/compbase3.hxx"
diff --git a/vcl/source/components/factory.cxx b/vcl/source/components/factory.cxx
index 9325c047b5d7..04b0e122cbce 100644
--- a/vcl/source/components/factory.cxx
+++ b/vcl/source/components/factory.cxx
@@ -42,9 +42,7 @@ using ::rtl::OUStringBuffer;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
-
// service implementation
-
extern Sequence< OUString > SAL_CALL vcl_session_getSupportedServiceNames();
extern OUString SAL_CALL vcl_session_getImplementationName();
extern Reference< XInterface > SAL_CALL vcl_session_createInstance( const Reference< XMultiServiceFactory > & );
@@ -74,6 +72,13 @@ extern Reference< XInterface > SAL_CALL DragSource_createInstance( const Referen
extern Sequence< OUString > SAL_CALL DropTarget_getSupportedServiceNames();
extern OUString SAL_CALL DropTarget_getImplementationName();
extern Reference< XInterface > SAL_CALL DropTarget_createInstance( const Reference< XMultiServiceFactory > & );
+
+namespace rsvg
+{
+ extern Sequence< OUString > SAL_CALL Rasterizer_getSupportedServiceNames();
+ extern OUString SAL_CALL Rasterizer_getImplementationName();
+ extern Reference< XInterface > SAL_CALL Rasterizer_createInstance( const Reference< XMultiServiceFactory > & );
+}
}
extern "C" {
@@ -139,6 +144,12 @@ extern "C" {
xMgr, vcl::DropTarget_getImplementationName(), vcl::DropTarget_createInstance,
vcl::DropTarget_getSupportedServiceNames() );
}
+ else if( vcl::rsvg::Rasterizer_getImplementationName().equalsAscii( pImplementationName ) )
+ {
+ xFactory = ::cppu::createSingleFactory(
+ xMgr, vcl::rsvg::Rasterizer_getImplementationName(), vcl::rsvg::Rasterizer_createInstance,
+ vcl::rsvg::Rasterizer_getSupportedServiceNames() );
+ }
if( xFactory.is() )
{
xFactory->acquire();
diff --git a/vcl/source/components/fontident.cxx b/vcl/source/components/fontident.cxx
index e411dcf49aba..6afadbbe267e 100644
--- a/vcl/source/components/fontident.cxx
+++ b/vcl/source/components/fontident.cxx
@@ -29,6 +29,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+#include <tools/debug.hxx>
+
+#include "vcl/svapp.hxx"
+#include "vcl/font.hxx"
+
+#include "svdata.hxx"
+
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/beans/XMaterialHolder.hpp>
#include <com/sun/star/awt/FontDescriptor.hpp>
@@ -39,15 +46,8 @@
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
-#include "vcl/svapp.hxx"
-#include "vcl/svdata.hxx"
-#include "vcl/font.hxx"
-
#include <cppuhelper/implbase3.hxx>
-#include <tools/debug.hxx>
-
-
using ::rtl::OUString;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
diff --git a/vcl/source/components/makefile.mk b/vcl/source/components/makefile.mk
index 982687104c01..41f21bfa3749 100644
--- a/vcl/source/components/makefile.mk
+++ b/vcl/source/components/makefile.mk
@@ -33,20 +33,23 @@ ENABLE_EXCEPTIONS=TRUE
# --- Settings -----------------------------------------------------
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+.INCLUDE : settings.mk
.INCLUDE : $(PRJ)$/util$/makefile2.pmk
# --- Files --------------------------------------------------------
-SLOFILES= $(SLO)$/display.obj \
- $(SLO)$/dtranscomp.obj \
- $(SLO)$/fontident.obj \
- $(SLO)$/stringmirror.obj \
+SLOFILES= $(SLO)$/display.obj \
+ $(SLO)$/dtranscomp.obj \
+ $(SLO)$/fontident.obj \
+ $(SLO)$/stringmirror.obj \
+ $(SLO)$/rasterizer_rsvg.obj \
$(SLO)$/factory.obj
-# --- Targets ------------------------------------------------------
+EXCEPTIONSFILES= $(SLO)$/rasterizer_rsvg.obj
+
-.INCLUDE : target.mk
-.INCLUDE : $(PRJ)$/util$/target.pmk
+# --- Targets ------------------------------------------------------
+.INCLUDE : target.mk
+.INCLUDE : $(PRJ)$/util$/target.pmk
diff --git a/vcl/source/components/rasterizer_rsvg.cxx b/vcl/source/components/rasterizer_rsvg.cxx
new file mode 100644
index 000000000000..5547b179d227
--- /dev/null
+++ b/vcl/source/components/rasterizer_rsvg.cxx
@@ -0,0 +1,640 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_vcl.hxx"
+
+#include <vcl/graph.hxx>
+#include <vcl/bmpacc.hxx>
+#include <vcl/alpha.hxx>
+#include <com/sun/star/graphic/XGraphicRasterizer.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/io/XSeekable.hpp>
+#include <cppuhelper/implbase2.hxx>
+#include <osl/module.h>
+
+#include <vector>
+
+#if defined MACOSX
+ #define VCL_RSVG_GOBJECT_LIBNAME "libgobject-2.0.0.dylib"
+ #define VCL_RSVG_CAIRO_LIBNAME "libcairo.2.dylib"
+ #define VCL_RSVG_LIBRSVG_LIBNAME "librsvg-2.2.dylib"
+#elif defined UNX
+ #define VCL_RSVG_GOBJECT_LIBNAME "libgobject-2.0.so"
+ #define VCL_RSVG_CAIRO_LIBNAME "libcairo.so"
+ #define VCL_RSVG_LIBRSVG_LIBNAME "librsvg-2.so"
+#elif defined WNT
+ #define VCL_RSVG_GOBJECT_LIBNAME "libgobject-2.0-0.dll"
+ #define VCL_RSVG_CAIRO_LIBNAME "cairo.dll"
+ #define VCL_RSVG_LIBRSVG_LIBNAME "librsvg-2-2.dll"
+#else
+ #define VCL_RSVG_GOBJECT_LIBNAME "nogobjectlib"
+ #define VCL_RSVG_CAIRO_LIBNAME "nocairolib"
+ #define VCL_RSVG_LIBRSVG_LIBNAME "nolibrsvglib"
+#endif
+
+#define VCL_RSVG_DEFAULT_DPI 72
+
+using namespace ::com::sun::star;
+
+// -----------------------------------------------------
+// - external stuff for dynamic library function calls -
+// -----------------------------------------------------
+
+typedef int gboolean;
+typedef unsigned char guint8;
+typedef sal_Size gsize;
+typedef void* gpointer;
+
+struct GError;
+
+enum cairo_format_t { CAIRO_FORMAT_ARGB32 = 0 };
+enum cairo_status_t { CAIRO_STATUS_SUCCESS = 0 };
+
+struct cairo_surface_t;
+struct cairo_t;
+struct cairo_matrix_t
+{
+ double xx; double yx;
+ double xy; double yy;
+ double x0; double y0;
+};
+
+struct RsvgHandle;
+struct RsvgDimensionData
+{
+ int width;
+ int height;
+ double em;
+ double ex;
+};
+
+namespace vcl
+{
+namespace rsvg
+{
+// -----------------
+// - Uno functions -
+// ----------------
+
+uno::Sequence< ::rtl::OUString > Rasterizer_getSupportedServiceNames()
+{
+ static ::rtl::OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.graphic.GraphicRasterizer_RSVG" ) );
+ static uno::Sequence< ::rtl::OUString > aServiceNames( &aServiceName, 1 );
+
+ return( aServiceNames );
+}
+
+// -----------------------------------------------------------------------------
+
+::rtl::OUString Rasterizer_getImplementationName()
+{
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "vcl::rsvg::Rasterizer" ) );
+}
+
+// ------------------
+// - LibraryWrapper -
+// ------------------
+
+class LibraryWrapper
+{
+public:
+
+ static LibraryWrapper& get();
+
+ bool isValid() const { return( ( mpGObjectLib != NULL ) && ( mpCairoLib != NULL ) && ( mpRSVGLib != NULL ) ); }
+
+ // G-Object
+ gpointer g_object_unref( gpointer pointer ) { return( (*mp_g_object_unref)( pointer ) ); };
+
+ // LibRSVG
+
+ // Cairo
+ cairo_surface_t* image_surface_create( cairo_format_t format, int width, int height ) { return( (*mp_image_surface_create)( format, width, height ) ); }
+ void surface_destroy( cairo_surface_t* surface ) { (*mp_surface_destroy)( surface ); }
+ cairo_status_t surface_status( cairo_surface_t* surface ) { return( (*mp_surface_status)( surface ) ); }
+ cairo_t* create( cairo_surface_t* surface ) { return( (*mp_create)( surface ) ); }
+ void destroy( cairo_t* cairo ) { (*mp_destroy )( cairo ); }
+ void matrix_init_identity( cairo_matrix_t* matrix ){ (*mp_matrix_init_identity)( matrix ); }
+ void matrix_translate( cairo_matrix_t* matrix, double nx, double ny ) { (*mp_matrix_translate)( matrix, nx, ny ); }
+ void matrix_scale( cairo_matrix_t* matrix, double sx, double sy ) {( *mp_matrix_scale )( matrix, sx, sy ); }
+ void matrix_rotate( cairo_matrix_t* matrix, double radians ) { ( *mp_matrix_rotate )( matrix, radians ); }
+ void transform( cairo_t* cairo, cairo_matrix_t *matrix ) { (*mp_transform)( cairo, matrix ); }
+ unsigned char* image_surface_get_data(cairo_surface_t* surface) { return( (*mp_image_surface_get_data)( surface ) ); }
+ int image_surface_get_width(cairo_surface_t* surface) { return( (*mp_image_surface_get_width)( surface ) ); }
+ int image_surface_get_height(cairo_surface_t* surface) { return( (*mp_image_surface_get_height)( surface ) ); }
+ int image_surface_get_stride(cairo_surface_t* surface) { return( (*mp_image_surface_get_stride)( surface ) ); }
+
+ // LibRSVG
+ void rsvg_init() { (*mp_rsvg_init)(); }
+ RsvgHandle* rsvg_handle_new_from_data( const guint8* data, gsize size, GError** error) { return( (*mp_rsvg_handle_new_from_data)( data, size, error ) ); }
+ gboolean rsvg_handle_close( RsvgHandle* handle, GError** error ) { return( (*mp_rsvg_handle_close)( handle, error ) ); }
+ void rsvg_handle_set_dpi_x_y( RsvgHandle* handle, double dpix, double dpiy ) { (*mp_rsvg_handle_set_dpi_x_y)( handle, dpix, dpiy ); }
+ void rsvg_handle_get_dimensions( RsvgHandle* handle, RsvgDimensionData* dimensions ) { (*mp_rsvg_handle_get_dimensions)( handle, dimensions ); }
+ gboolean rsvg_handle_render_cairo( RsvgHandle* handle, cairo_t* cairo ) { return( (*mp_rsvg_handle_render_cairo)( handle, cairo ) ); }
+
+private:
+
+ LibraryWrapper();
+
+private:
+
+ oslModule mpGObjectLib;
+ oslModule mpCairoLib;
+ oslModule mpRSVGLib;
+
+ // GObject
+ gpointer (*mp_g_object_unref)( gpointer );
+
+ // Cairo
+ cairo_surface_t* (*mp_image_surface_create)(cairo_format_t,int,int);
+ void (*mp_surface_destroy )(cairo_surface_t*);
+ cairo_status_t (*mp_surface_status)(cairo_surface_t*);
+ cairo_t* (*mp_create)(cairo_surface_t*);
+ void (*mp_destroy)(cairo_t*);
+ void (*mp_matrix_init_identity)(cairo_matrix_t*);
+ void (*mp_matrix_translate)( cairo_matrix_t*, double, double);
+ void (*mp_matrix_scale )( cairo_matrix_t*, double, double);
+ void (*mp_matrix_rotate)( cairo_matrix_t*, double);
+ void (*mp_transform)( cairo_t*, cairo_matrix_t*);
+ unsigned char* (*mp_image_surface_get_data)( cairo_surface_t* );
+ int (*mp_image_surface_get_width)(cairo_surface_t* surface);
+ int (*mp_image_surface_get_height)(cairo_surface_t* surface);
+ int (*mp_image_surface_get_stride)(cairo_surface_t* surface);
+
+ // LibRSVG
+ void (*mp_rsvg_init)( void );
+ RsvgHandle* (*mp_rsvg_handle_new_from_data)( const guint8*, gsize, GError** );
+ gboolean (*mp_rsvg_handle_close)( RsvgHandle*, GError** );
+ void (*mp_rsvg_handle_set_dpi_x_y)( RsvgHandle*, double, double );
+ void (*mp_rsvg_handle_get_dimensions)( RsvgHandle*, RsvgDimensionData* );
+ gboolean (*mp_rsvg_handle_render_cairo)( RsvgHandle*, cairo_t* );
+};
+
+// -----------------------------------------------------------------------------
+
+LibraryWrapper& LibraryWrapper::get()
+{
+ static LibraryWrapper* pLibraryInstance = NULL;
+
+ if( !pLibraryInstance )
+ pLibraryInstance = new LibraryWrapper;
+
+ return( *pLibraryInstance );
+}
+
+// -----------------------------------------------------------------------------
+
+LibraryWrapper::LibraryWrapper() :
+ mpGObjectLib( NULL ),
+ mpCairoLib( NULL ),
+ mpRSVGLib( NULL )
+{
+ const ::rtl::OUString aGObjectLibName( RTL_CONSTASCII_USTRINGPARAM( VCL_RSVG_GOBJECT_LIBNAME ) );
+ const ::rtl::OUString aCairoLibName( RTL_CONSTASCII_USTRINGPARAM( VCL_RSVG_CAIRO_LIBNAME ) );
+ const ::rtl::OUString aRSVGLibName( RTL_CONSTASCII_USTRINGPARAM( VCL_RSVG_LIBRSVG_LIBNAME ) );
+ bool bCont = true;
+
+ // GObject
+ if( bCont && ( NULL != ( mpGObjectLib = osl_loadModule( aGObjectLibName.pData, SAL_LOADMODULE_DEFAULT ) ) ||
+ NULL != ( mpGObjectLib = osl_loadModuleRelative( (oslGenericFunction)LibraryWrapper::get,
+ aGObjectLibName.pData, SAL_LOADMODULE_DEFAULT ) )
+
+ ) )
+ {
+ mp_g_object_unref = ( gpointer (*)( gpointer ) ) osl_getAsciiFunctionSymbol( mpGObjectLib, "g_object_unref" );
+
+ if( !( mp_g_object_unref ) )
+ {
+ OSL_TRACE( "not all needed symbols were found in g-object library" );
+ bCont = false;
+ }
+ }
+
+ // Cairo
+ if( bCont && ( NULL != ( mpCairoLib = osl_loadModule( aCairoLibName.pData, SAL_LOADMODULE_DEFAULT ) ) ||
+ NULL != ( mpCairoLib = osl_loadModuleRelative( (oslGenericFunction)LibraryWrapper::get,
+ aCairoLibName.pData, SAL_LOADMODULE_DEFAULT ) )
+ ) )
+ {
+ mp_image_surface_create = ( cairo_surface_t* (*)( cairo_format_t, int, int ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_image_surface_create" );
+ mp_surface_destroy = ( void (*)( cairo_surface_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_surface_destroy" );
+ mp_surface_status = ( cairo_status_t (*)( cairo_surface_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_surface_status" );
+ mp_create = ( cairo_t* (*)( cairo_surface_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_create" );
+ mp_destroy = ( void (*)( cairo_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_destroy" );
+ mp_matrix_init_identity = ( void (*)( cairo_matrix_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_matrix_init_identity" );
+ mp_matrix_translate = ( void (*)( cairo_matrix_t*, double, double ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_matrix_translate" );
+ mp_matrix_scale = ( void (*)( cairo_matrix_t*, double, double ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_matrix_scale" );
+ mp_matrix_rotate = ( void (*)( cairo_matrix_t*, double ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_matrix_rotate" );
+ mp_transform = ( void (*)( cairo_t*, cairo_matrix_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_transform" );
+ mp_image_surface_get_data = ( unsigned char* (*)( cairo_surface_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_image_surface_get_data" );
+ mp_image_surface_get_width = ( int (*)( cairo_surface_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_image_surface_get_width" );
+ mp_image_surface_get_height = ( int (*)( cairo_surface_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_image_surface_get_height" );
+ mp_image_surface_get_stride = ( int (*)( cairo_surface_t* ) ) osl_getAsciiFunctionSymbol( mpCairoLib, "cairo_image_surface_get_stride" );
+
+ if( !( mp_image_surface_create &&
+ mp_surface_destroy &&
+ mp_surface_status &&
+ mp_create &&
+ mp_destroy &&
+ mp_matrix_init_identity &&
+ mp_matrix_translate &&
+ mp_matrix_scale &&
+ mp_matrix_rotate &&
+ mp_transform &&
+ mp_image_surface_get_data &&
+ mp_image_surface_get_width &&
+ mp_image_surface_get_height &&
+ mp_image_surface_get_stride ) )
+ {
+ OSL_TRACE( "not all needed symbols were found in cairo library" );
+ bCont = false;
+ }
+ }
+
+ // LibRSVG
+ if( bCont && ( NULL != ( mpRSVGLib = osl_loadModule( aRSVGLibName.pData, SAL_LOADMODULE_DEFAULT ) ) ||
+ NULL != ( mpRSVGLib = osl_loadModuleRelative( (oslGenericFunction)LibraryWrapper::get,
+ aRSVGLibName.pData, SAL_LOADMODULE_DEFAULT ) )
+ ) )
+ {
+ mp_rsvg_init = ( void (*)( void ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, "rsvg_init" );
+ mp_rsvg_handle_new_from_data = ( RsvgHandle* (*)( const guint8*, gsize, GError** ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, "rsvg_handle_new_from_data" );
+ mp_rsvg_handle_close = ( gboolean (*)( RsvgHandle*, GError** ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, "rsvg_handle_close" );
+ mp_rsvg_handle_set_dpi_x_y = ( void (*)( RsvgHandle*, double, double ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, "rsvg_handle_set_dpi_x_y" );
+ mp_rsvg_handle_get_dimensions = ( void (*)( RsvgHandle*, RsvgDimensionData* ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, "rsvg_handle_get_dimensions" );
+ mp_rsvg_handle_render_cairo = ( gboolean (*)( RsvgHandle*, cairo_t* ) ) osl_getAsciiFunctionSymbol( mpRSVGLib, "rsvg_handle_render_cairo" );
+
+ if( !( mp_rsvg_init &&
+ mp_rsvg_handle_new_from_data &&
+ mp_rsvg_handle_close &&
+ mp_rsvg_handle_set_dpi_x_y &&
+ mp_rsvg_handle_get_dimensions &&
+ mp_rsvg_handle_render_cairo ) )
+ {
+ OSL_TRACE( "not all needed symbols were found in librsvg library" );
+ bCont = false;
+ }
+ }
+
+ OSL_ENSURE( mpGObjectLib, "g-object library could not be loaded" );
+ OSL_ENSURE( mpCairoLib, "cairo library could not be loaded" );
+ OSL_ENSURE( mpRSVGLib, "librsvg library could not be loaded" );
+
+ bCont = bCont && mpGObjectLib != NULL && mpCairoLib != NULL && mpRSVGLib != NULL;
+
+ // unload all libraries in case of failure
+ if( !bCont )
+ {
+ if( mpRSVGLib )
+ {
+ osl_unloadModule( mpRSVGLib );
+ mpRSVGLib = NULL;
+ }
+
+ if( mpCairoLib )
+ {
+ osl_unloadModule( mpCairoLib );
+ mpCairoLib = NULL;
+ }
+
+ if( mpGObjectLib )
+ {
+ osl_unloadModule( mpGObjectLib );
+ mpGObjectLib = NULL;
+ }
+ }
+ else
+ rsvg_init();
+}
+
+// ---------------------------
+// - ::vcl::rsvg::Rasterizer -
+// ---------------------------
+
+class Rasterizer : public ::cppu::WeakAggImplHelper2< graphic::XGraphicRasterizer, lang::XServiceInfo >
+{
+public:
+ Rasterizer();
+ virtual ~Rasterizer();
+
+ // XGraphicRasterizer
+ virtual ::sal_Bool SAL_CALL initializeData( const uno::Reference< io::XInputStream >& DataStream,
+ ::sal_uInt32 DPI_X, ::sal_uInt32 DPI_Y,
+ awt::Size& DefaultSizePixel )
+ throw ( uno::RuntimeException );
+
+ virtual uno::Reference< graphic::XGraphic > SAL_CALL rasterize( ::sal_uInt32 Width,
+ ::sal_uInt32 Height,
+ double RotateAngle,
+ double ShearAngle_X,
+ double ShearAngle_Y,
+ const uno::Sequence< beans::PropertyValue >& RasterizeProperties )
+ throw (uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw( uno::RuntimeException);
+
+ virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& )
+ throw( uno::RuntimeException );
+
+ virtual uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
+ throw( uno::RuntimeException );
+
+protected:
+
+ void implFreeRsvgHandle();
+
+ uno::Reference< graphic::XGraphic > implGetXGraphicFromSurface( cairo_surface_t* pSurface ) const;
+
+private:
+
+ Rasterizer( const Rasterizer& );
+ Rasterizer& operator=( const Rasterizer& );
+
+private:
+
+ RsvgHandle* mpRsvgHandle;
+ sal_Int32 mnDefaultWidth;
+ sal_Int32 mnDefaultHeight;
+ bool mbLibInit;
+};
+
+// -----------------------------------------------------------------------------
+
+Rasterizer::Rasterizer() :
+ mpRsvgHandle( NULL ),
+ mnDefaultWidth( 0 ),
+ mnDefaultHeight( 0 ),
+ mbLibInit( true )
+{
+ try
+ {
+ LibraryWrapper& rLib = LibraryWrapper::get();
+ mbLibInit = rLib.isValid();
+ }
+ catch( ... )
+ {
+ mbLibInit = false;
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+Rasterizer::~Rasterizer()
+{
+ implFreeRsvgHandle();
+}
+
+// -----------------------------------------------------------------------------
+
+void Rasterizer::implFreeRsvgHandle()
+{
+ if( mpRsvgHandle )
+ {
+ LibraryWrapper::get().g_object_unref( static_cast< gpointer >( mpRsvgHandle ) );
+ mpRsvgHandle = NULL;
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+uno::Reference< graphic::XGraphic > Rasterizer::implGetXGraphicFromSurface( cairo_surface_t* pSurface ) const
+{
+ LibraryWrapper& rLib = LibraryWrapper::get();
+ unsigned char* pData = rLib.image_surface_get_data( pSurface );
+ const sal_Int32 nWidth = rLib.image_surface_get_width( pSurface );
+ const sal_Int32 nHeight =rLib.image_surface_get_height( pSurface );
+ const sal_Int32 nStride = rLib.image_surface_get_stride( pSurface );
+
+ uno::Reference< graphic::XGraphic > xRet;
+
+ if( pData && nWidth && nHeight && nStride )
+ {
+ Size aSize( nWidth, nHeight );
+ Bitmap aBmp( aSize, 24 );
+ AlphaMask aAlphaMask( aSize );
+ BitmapWriteAccess* pBmpAcc = aBmp.AcquireWriteAccess();
+ BitmapWriteAccess* pAlpAcc = aAlphaMask.AcquireWriteAccess();
+
+ if( pBmpAcc && pAlpAcc )
+ {
+ BitmapColor aPixel, aWhitePixel( 255, 255, 255 ), aAlpha( 0 ), aFullAlpha( 255 );
+ sal_uInt32* pRow = reinterpret_cast< sal_uInt32* >( pData );
+
+ for( sal_Int32 nY = 0; nY < nHeight; ++nY, pRow = reinterpret_cast< sal_uInt32* >( pData += nStride ) )
+ {
+ for( sal_Int32 nX = 0; nX < nWidth; ++nX )
+ {
+ const register sal_uInt32 nPixel = *pRow++;
+ const register sal_uInt32 nAlpha = nPixel >> 24;
+
+ if( !nAlpha )
+ {
+ pBmpAcc->SetPixel( nY, nX, aWhitePixel );
+ pAlpAcc->SetPixel( nY, nX, aFullAlpha );
+ }
+ else
+ {
+ aPixel.SetRed( static_cast< sal_uInt8 >( ( ( ( nPixel & 0x00ff0000 ) >> 16 ) * 255 ) / nAlpha ) );
+ aPixel.SetGreen( static_cast< sal_uInt8 >( ( ( ( nPixel & 0x0000ff00 ) >> 8 ) * 255 ) / nAlpha ) );
+ aPixel.SetBlue( static_cast< sal_uInt8 >( ( ( nPixel & 0x000000ff ) * 255 ) / nAlpha ) );
+ pBmpAcc->SetPixel( nY, nX, aPixel );
+
+ aAlpha.SetIndex( static_cast< sal_uInt8 >( 255 - nAlpha ) );
+ pAlpAcc->SetPixel( nY, nX, aAlpha );
+ }
+ }
+ }
+
+ aBmp.ReleaseAccess( pBmpAcc );
+ aAlphaMask.ReleaseAccess( pAlpAcc );
+
+ const Graphic aGraphic( BitmapEx( aBmp, aAlphaMask ) );
+ xRet.set( aGraphic.GetXGraphic(), uno::UNO_QUERY );
+ }
+ else
+ {
+ aBmp.ReleaseAccess( pBmpAcc );
+ aAlphaMask.ReleaseAccess( pAlpAcc );
+ }
+ }
+
+ return( xRet );
+}
+
+// -----------------------------------------------------------------------------
+
+::sal_Bool SAL_CALL Rasterizer::initializeData( const uno::Reference< io::XInputStream >& rDataStream,
+ ::sal_uInt32 nDPI_X, ::sal_uInt32 nDPI_Y,
+ awt::Size& rDefaultSizePixel )
+ throw ( uno::RuntimeException )
+{
+ LibraryWrapper& rLib = LibraryWrapper::get();
+
+ implFreeRsvgHandle();
+
+ if( mbLibInit && rDataStream.is() )
+ {
+ ::std::vector< sal_Int8 > aDataBuffer;
+ uno::Reference< io::XSeekable > xSeekable( rDataStream, uno::UNO_QUERY );
+ sal_Int32 nReadSize, nBlockSize = ( xSeekable.is() ? xSeekable->getLength() : 65536 );
+ uno::Sequence< sal_Int8 > aStmBuffer( nBlockSize );
+
+ do
+ {
+ nReadSize = rDataStream->readBytes( aStmBuffer, nBlockSize );
+
+ if( nReadSize > 0 )
+ {
+ const sal_Int8* pArray = aStmBuffer.getArray();
+ aDataBuffer.insert( aDataBuffer.end(), pArray, pArray + nReadSize );
+ }
+ }
+ while( nReadSize == nBlockSize );
+
+ if( aDataBuffer.size() &&
+ ( NULL != ( mpRsvgHandle = rLib.rsvg_handle_new_from_data( reinterpret_cast< sal_uInt8* >( &aDataBuffer[ 0 ] ),
+ aDataBuffer.size(), NULL ) ) ) &&
+ !rLib.rsvg_handle_close( mpRsvgHandle, NULL ) )
+ {
+ implFreeRsvgHandle();
+ }
+ }
+
+ // get default dimensions of image
+ mnDefaultWidth = mnDefaultHeight = 0;
+
+ if( mpRsvgHandle )
+ {
+ RsvgDimensionData aDefaultDimension = { 0, 0, 0.0, 0.0 };
+
+ rLib.rsvg_handle_set_dpi_x_y( mpRsvgHandle, nDPI_X ? nDPI_X: 72, nDPI_Y ? nDPI_Y : 72 );
+ rLib.rsvg_handle_get_dimensions( mpRsvgHandle, &aDefaultDimension );
+
+ mnDefaultWidth = aDefaultDimension.width;
+ mnDefaultHeight = aDefaultDimension.height;
+ }
+
+ rDefaultSizePixel.Width = mnDefaultWidth;
+ rDefaultSizePixel.Height = mnDefaultHeight;
+
+ return( mpRsvgHandle != NULL );
+}
+
+// -----------------------------------------------------------------------------
+
+uno::Reference< graphic::XGraphic > SAL_CALL Rasterizer::rasterize( ::sal_uInt32 nWidth,
+ ::sal_uInt32 nHeight,
+ double /*fRotateAngle*/,
+ double /*fShearAngle_X*/,
+ double /*ShearAngle_Y*/,
+ const uno::Sequence< beans::PropertyValue >&
+ /*rRasterizeProperties*/ )
+ throw ( uno::RuntimeException )
+{
+ LibraryWrapper& rLib = LibraryWrapper::get();
+ uno::Reference< graphic::XGraphic > xRet;
+
+ if( mpRsvgHandle && rLib.isValid() && nWidth && nHeight && mnDefaultWidth && mnDefaultHeight )
+ {
+ cairo_surface_t* pSurface = rLib.image_surface_create( CAIRO_FORMAT_ARGB32, nWidth, nHeight );
+
+ if( pSurface && ( CAIRO_STATUS_SUCCESS == rLib.surface_status( pSurface ) ) )
+ {
+ cairo_t* pCr = rLib.create( pSurface );
+
+ if( pCr )
+ {
+ cairo_matrix_t aMatrix;
+
+ rLib.matrix_init_identity( &aMatrix );
+ rLib.matrix_scale( &aMatrix,
+ static_cast< double >( nWidth ) / mnDefaultWidth,
+ static_cast< double >( nHeight ) / mnDefaultHeight );
+ rLib.transform( pCr, &aMatrix );
+
+ if( rLib.rsvg_handle_render_cairo( mpRsvgHandle, pCr ) )
+ {
+ xRet = implGetXGraphicFromSurface( pSurface );
+ }
+
+ rLib.destroy( pCr );
+ }
+
+ rLib.surface_destroy( pSurface );
+ OSL_ENSURE( xRet.is(), "SVG *not* rendered successfully" );
+ }
+ }
+
+ return( xRet );
+}
+
+// -----------------------------------------------------------------------------
+
+::rtl::OUString SAL_CALL Rasterizer::getImplementationName()
+ throw( uno::RuntimeException )
+{
+ return( Rasterizer_getImplementationName() );
+}
+
+// -----------------------------------------------------------------------------
+
+sal_Bool SAL_CALL Rasterizer::supportsService( const ::rtl::OUString& rServiceName )
+ throw( uno::RuntimeException )
+{
+ const uno::Sequence< ::rtl::OUString > aServices( Rasterizer_getSupportedServiceNames() );
+
+ for( sal_Int32 nService = 0; nService < aServices.getLength(); ++nService )
+ {
+ if( rServiceName == aServices[ nService ] )
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+// -----------------------------------------------------------------------------
+
+uno::Sequence< ::rtl::OUString > SAL_CALL Rasterizer::getSupportedServiceNames()
+ throw( uno::RuntimeException )
+{
+ return( Rasterizer_getSupportedServiceNames() );
+}
+
+// ------------------------------
+// - Uno instantiation function -
+// ------------------------------
+
+uno::Reference< uno::XInterface > SAL_CALL Rasterizer_createInstance( const uno::Reference< lang::XMultiServiceFactory >& )
+{
+ return static_cast< ::cppu::OWeakObject* >( new rsvg::Rasterizer );
+}
+
+} // namespace rsvg
+} // namespace vcl
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 7926ee339bc7..c6cd35fed964 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -30,9 +30,9 @@
#include "precompiled_vcl.hxx"
#include <tools/debug.hxx>
+#include <tools/poly.hxx>
+#include <tools/rc.h>
-#include <vcl/svids.hrc>
-#include <vcl/svdata.hxx>
#include <vcl/image.hxx>
#include <vcl/bitmap.hxx>
#include <vcl/bitmapex.hxx>
@@ -41,16 +41,14 @@
#include <vcl/svapp.hxx>
#include <vcl/dialog.hxx>
#include <vcl/fixed.hxx>
-#include <tools/poly.hxx>
#include <vcl/button.hxx>
-#include <vcl/window.h>
-#include <vcl/controldata.hxx>
#include <vcl/salnativewidgets.hxx>
#include <vcl/edit.hxx>
-#include <tools/rc.h>
-
-
+#include <svids.hrc>
+#include <svdata.hxx>
+#include <window.h>
+#include <controldata.hxx>
// =======================================================================
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 9881edd62ca3..c01092749e73 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -28,21 +28,20 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+
#include <tools/table.hxx>
#include <tools/debug.hxx>
-
#include <tools/rc.h>
-#include <vcl/svdata.hxx>
#include <vcl/decoview.hxx>
-#include <vcl/ilstbox.hxx>
#include <vcl/lstbox.h>
#include <vcl/button.hxx>
-#include <vcl/subedit.hxx>
#include <vcl/event.hxx>
#include <vcl/combobox.hxx>
-#include <vcl/controldata.hxx>
-
+#include <svdata.hxx>
+#include <subedit.hxx>
+#include <ilstbox.hxx>
+#include <controldata.hxx>
// =======================================================================
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 99cd6b3cba60..c9497abaef61 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -29,18 +29,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+#include <comphelper/processfactory.hxx>
+
#include <tools/rc.h>
-#include <vcl/svdata.hxx>
#include <vcl/svapp.hxx>
#include <vcl/event.hxx>
#include <vcl/ctrl.hxx>
#include <vcl/decoview.hxx>
-#include <vcl/controldata.hxx>
#include <vcl/salnativewidgets.hxx>
-#include <vcl/textlayout.hxx>
-#include <comphelper/processfactory.hxx>
-#include <tools/diagnose_ex.h>
+#include <textlayout.hxx>
+#include <svdata.hxx>
+#include <controldata.hxx>
+
using namespace vcl;
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index a28c43346720..665448c4f3c9 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -30,20 +30,21 @@
#include "precompiled_vcl.hxx"
#include <tools/rc.h>
-#include <vcl/svdata.hxx>
#include <vcl/decoview.hxx>
#include <vcl/event.hxx>
#include <vcl/cursor.hxx>
#include <vcl/virdev.hxx>
-#include <vcl/svids.hrc>
#include <vcl/menu.hxx>
#include <vcl/cmdevt.h>
-#include <vcl/subedit.hxx>
#include <vcl/edit.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/controldata.hxx>
#include <vcl/msgbox.hxx>
-#include <vcl/window.h>
+
+#include <window.h>
+#include <svdata.hxx>
+#include <svids.hrc>
+#include <subedit.hxx>
+#include <controldata.hxx>
#include <osl/mutex.hxx>
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 2cd6b4bc9e0c..e34aa3752895 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -38,12 +38,15 @@
#include "tools/rc.h"
#include "tools/resary.hxx"
-#include "vcl/svids.hrc"
+
#include "vcl/field.hxx"
#include "vcl/event.hxx"
#include "vcl/svapp.hxx"
-#include "vcl/svdata.hxx"
#include "vcl/unohelp.hxx"
+
+#include "svids.hrc"
+#include "svdata.hxx"
+
#include "i18nutil/unicode.hxx"
#include "rtl/math.hxx"
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 65e8c8d91f82..69a3fdbdce9d 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -31,16 +31,16 @@
#include <tools/debug.hxx>
#include <tools/rc.h>
-#include <vcl/svdata.hxx>
-#include <vcl/field.hxx>
#include <vcl/svapp.hxx>
#include <vcl/sound.hxx>
#include <vcl/event.hxx>
#include <vcl/field.hxx>
-#include <i18npool/mslangid.hxx>
-
#include <vcl/unohelp.hxx>
+#include <svdata.hxx>
+
+#include <i18npool/mslangid.hxx>
+
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/i18n/XCharacterClassification.hpp>
#include <com/sun/star/i18n/KCharacterType.hpp>
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 1828ded64a14..514589d0660b 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -28,13 +28,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+
+#include "tools/rc.h"
+
#include "vcl/decoview.hxx"
#include "vcl/event.hxx"
#include "vcl/fixed.hxx"
-#include "vcl/controldata.hxx"
-#include "vcl/window.h"
-#include "tools/rc.h"
+#include "controldata.hxx"
+#include "window.h"
// =======================================================================
diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx
index 52dd061e317e..3de86f5a2cd5 100644
--- a/vcl/source/control/group.cxx
+++ b/vcl/source/control/group.cxx
@@ -28,13 +28,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <vcl/event.hxx>
-#include <vcl/group.hxx>
-#include <vcl/controldata.hxx>
#include <tools/rc.h>
+#include <vcl/event.hxx>
+#include <vcl/group.hxx>
+#include <controldata.hxx>
// =======================================================================
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 55e2d0ae0a3a..a6cd7b980620 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -28,21 +28,24 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+
#include <tools/debug.hxx>
-#include <vcl/svdata.hxx>
+
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <vcl/event.hxx>
#include <vcl/scrbar.hxx>
#include <vcl/help.hxx>
#include <vcl/lstbox.h>
-#include <vcl/ilstbox.hxx>
-#include <vcl/i18nhelp.hxx>
-#include <vcl/controldata.hxx>
#include <vcl/unohelp.hxx>
+#include <vcl/i18nhelp.hxx>
-#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <ilstbox.hxx>
+#include <controldata.hxx>
+#include <svdata.hxx>
+#include <com/sun/star/i18n/XCollator.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <rtl/instance.hxx>
diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx
index e2d502026203..34048a1c60ce 100644
--- a/vcl/source/control/longcurr.cxx
+++ b/vcl/source/control/longcurr.cxx
@@ -39,9 +39,9 @@
#include <vcl/event.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/svdata.hxx>
#include <vcl/longcurr.hxx>
+#include <svdata.hxx>
#include <unotools/localedatawrapper.hxx>
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 88b583a3240d..9b31913756e4 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -30,22 +30,23 @@
#include "precompiled_vcl.hxx"
#include "tools/rc.h"
+#include "tools/debug.hxx"
+
-#include "vcl/svdata.hxx"
#include "vcl/decoview.hxx"
#include "vcl/event.hxx"
#include "vcl/scrbar.hxx"
#include "vcl/button.hxx"
#include "vcl/edit.hxx"
-#include "vcl/subedit.hxx"
-#include "vcl/ilstbox.hxx"
#include "vcl/lstbox.hxx"
#include "vcl/combobox.hxx"
-#include "vcl/controldata.hxx"
-#include "tools/debug.hxx"
+#include "svdata.hxx"
+#include "controldata.hxx"
+#include "subedit.hxx"
+#include "ilstbox.hxx"
+#include "dndevdis.hxx"
-#include <vcl/dndevdis.hxx>
#include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
// =======================================================================
@@ -291,8 +292,15 @@ IMPL_LINK( ListBox, ImplSelectionChangedHdl, void*, n )
Image aImage = mpImplLB->GetEntryList()->GetEntryImage( nChanged );
mpImplWin->SetImage( aImage );
}
- mpImplWin->Invalidate();
}
+ else
+ {
+ mpImplWin->SetItemPos( LISTBOX_ENTRY_NOTFOUND );
+ mpImplWin->SetString( ImplGetSVEmptyStr() );
+ Image aImage;
+ mpImplWin->SetImage( aImage );
+ }
+ mpImplWin->Invalidate();
}
return 1;
}
diff --git a/vcl/source/control/makefile.mk b/vcl/source/control/makefile.mk
deleted file mode 100644
index de2613b1084f..000000000000
--- a/vcl/source/control/makefile.mk
+++ /dev/null
@@ -1,78 +0,0 @@
-#*************************************************************************
-#
-# 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.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=vcl
-TARGET=ctrl
-
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile2.pmk
-
-.IF "$(COM)"=="ICC"
-CDEFS+=-D_STD_NO_NAMESPACE -D_VOS_NO_NAMESPACE -D_UNO_NO_NAMESPACE
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES= \
- $(SLO)$/button.obj \
- $(SLO)$/ctrl.obj \
- $(SLO)$/edit.obj \
- $(SLO)$/field2.obj \
- $(SLO)$/ilstbox.obj \
- $(SLO)$/tabctrl.obj \
- $(SLO)$/throbber.obj
-
-SLOFILES= $(EXCEPTIONSFILES) \
- $(SLO)$/combobox.obj \
- $(SLO)$/field.obj \
- $(SLO)$/fixbrd.obj \
- $(SLO)$/fixed.obj \
- $(SLO)$/group.obj \
- $(SLO)$/imgctrl.obj \
- $(SLO)$/longcurr.obj \
- $(SLO)$/lstbox.obj \
- $(SLO)$/morebtn.obj \
- $(SLO)$/menubtn.obj \
- $(SLO)$/scrbar.obj \
- $(SLO)$/slider.obj \
- $(SLO)$/spinfld.obj \
- $(SLO)$/spinbtn.obj \
- $(SLO)$/quickselectionengine.obj
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.INCLUDE : $(PRJ)$/util$/target.pmk
-
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 938b7831985c..6e87647eb8df 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -34,7 +34,8 @@
#include "vcl/decoview.hxx"
#include "vcl/scrbar.hxx"
#include "vcl/timer.hxx"
-#include "vcl/svdata.hxx"
+
+#include "svdata.hxx"
#include "rtl/string.hxx"
#include "tools/rc.h"
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 904c684b1fdd..adbb2ad0ae0a 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -30,12 +30,14 @@
#include "precompiled_vcl.hxx"
#include "tools/rc.h"
+
#include "vcl/event.hxx"
#include "vcl/decoview.hxx"
#include "vcl/spin.h"
#include "vcl/spinfld.hxx"
-#include "vcl/controldata.hxx"
-#include "vcl/svdata.hxx"
+
+#include "controldata.hxx"
+#include "svdata.hxx"
// =======================================================================
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index bb60e7e5eea9..765907721ed6 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -28,10 +28,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include "tools/debug.hxx"
+#include "tools/debug.hxx"
#include "tools/rc.h"
-#include "vcl/svdata.hxx"
+
#include "vcl/svapp.hxx"
#include "vcl/help.hxx"
#include "vcl/event.hxx"
@@ -40,11 +40,12 @@
#include "vcl/tabpage.hxx"
#include "vcl/tabctrl.hxx"
#include "vcl/controllayout.hxx"
-#include "vcl/controldata.hxx"
#include "vcl/sound.hxx"
#include "vcl/lstbox.hxx"
-#include "vcl/window.h"
+#include "controldata.hxx"
+#include "svdata.hxx"
+#include "window.h"
#include <boost/unordered_map.hpp>
#include <vector>
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index b0c17df110b7..cc6b41b0841b 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -33,7 +33,8 @@
#include <cstring>
#include <assert.h>
-#include <vcl/fontsubset.hxx>
+#include <fontsubset.hxx>
+
#include <vcl/strhelper.hxx>
//#define IGNORE_HINTS
diff --git a/vcl/source/fontsubset/fontsubset.cxx b/vcl/source/fontsubset/fontsubset.cxx
index 889d46efe373..494d739010da 100644
--- a/vcl/source/fontsubset/fontsubset.cxx
+++ b/vcl/source/fontsubset/fontsubset.cxx
@@ -29,10 +29,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <vcl/fontsubset.hxx>
-#include <sft.hxx>
#include <tools/debug.hxx>
+#include <fontsubset.hxx>
+#include <sft.hxx>
+
// ====================================================================
FontSubsetInfo::FontSubsetInfo()
diff --git a/vcl/source/fontsubset/makefile.mk b/vcl/source/fontsubset/makefile.mk
deleted file mode 100644
index 25dde00af521..000000000000
--- a/vcl/source/fontsubset/makefile.mk
+++ /dev/null
@@ -1,51 +0,0 @@
-#*************************************************************************
-#
-# 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.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=vcl
-TARGET=fontsubset
-
-# --- Settings -----------------------------------------------------
-ENABLE_EXCEPTIONS=true
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES=\
- $(SLO)$/list.obj \
- $(SLO)$/sft.obj \
- $(SLO)$/cff.obj \
- $(SLO)$/fontsubset.obj \
- $(SLO)$/xlat.obj \
- $(SLO)$/ttcr.obj \
- $(SLO)$/gsub.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index a0b48f4ee124..e2ab338e66b0 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -28,20 +28,22 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+
#include <rtl/crc.h>
-#include <vcl/salbtype.hxx>
#include <tools/stream.hxx>
-#include <vcl/bmpacc.hxx>
#include <tools/poly.hxx>
-#include <vcl/outdev.hxx>
-#include <vcl/impbmp.hxx>
-#include <vcl/salbmp.hxx>
#include <tools/rc.h>
+#include <vcl/salbtype.hxx>
+#include <vcl/bmpacc.hxx>
+#include <vcl/outdev.hxx>
#include <vcl/bitmap.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/svapp.hxx>
#include <vcl/image.hxx>
+#include <impbmp.hxx>
+#include <salbmp.hxx>
+
// ----------
// - Bitmap -
// ----------
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index c2d929ea4fa0..0ae8e63d2519 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -30,13 +30,15 @@
#include "precompiled_vcl.hxx"
#include <stdlib.h>
+
#include <vcl/bmpacc.hxx>
-#include <vcl/impoct.hxx>
#include <vcl/octree.hxx>
-#include <impvect.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/bitmap.hxx>
+#include <impoct.hxx>
+#include <impvect.hxx>
+
// -----------
// - Defines -
// -----------
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index d1f130d9d1cc..2e77b666f8c8 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -28,22 +28,27 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+
#include <ctype.h>
+
#include <rtl/crc.h>
-#include <vcl/salbtype.hxx>
+
#include <tools/stream.hxx>
#include <tools/debug.hxx>
+#include <tools/rc.h>
+
+#include <vcl/salbtype.hxx>
#include <vcl/outdev.hxx>
#include <vcl/alpha.hxx>
-#include <vcl/image.h>
#include <vcl/bitmapex.hxx>
#include <vcl/pngread.hxx>
-#include <vcl/impimagetree.hxx>
-#include <tools/rc.h>
#include <vcl/svapp.hxx>
#include <vcl/bmpacc.hxx>
#include <vcl/virdev.hxx>
+#include <image.h>
+#include <impimagetree.hxx>
+
// ------------
// - BitmapEx -
// ------------
diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx
index 0762821c3267..03b29fcbc965 100644
--- a/vcl/source/gdi/bmpacc.cxx
+++ b/vcl/source/gdi/bmpacc.cxx
@@ -28,10 +28,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+
#include <vcl/salbtype.hxx>
-#include <vcl/impbmp.hxx>
#include <vcl/bitmap.hxx>
#include <vcl/bmpacc.hxx>
+
+#include <impbmp.hxx>
+
#include <string.h>
// --------------------
diff --git a/vcl/source/gdi/bmpacc3.cxx b/vcl/source/gdi/bmpacc3.cxx
index 5e87d680e9c0..39d57a05cb84 100644
--- a/vcl/source/gdi/bmpacc3.cxx
+++ b/vcl/source/gdi/bmpacc3.cxx
@@ -28,12 +28,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+
+#include <tools/poly.hxx>
+
#include <vcl/salbtype.hxx>
#include <vcl/bitmap.hxx>
-#include <tools/poly.hxx>
#include <vcl/region.hxx>
#include <vcl/bmpacc.hxx>
-#include <vcl/bmpfast.hxx>
+
+#include <bmpfast.hxx>
// ---------------------
// - BitmapWriteAccess -
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx
index 8fc5188c9204..e410e0ee25e8 100644
--- a/vcl/source/gdi/bmpfast.cxx
+++ b/vcl/source/gdi/bmpfast.cxx
@@ -29,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <vcl/bmpfast.hxx>
+#include <bmpfast.hxx>
#ifndef NO_OPTIMIZED_BITMAP_ACCESS
diff --git a/vcl/source/gdi/configsettings.cxx b/vcl/source/gdi/configsettings.cxx
index ff701ab640fa..1ddc801c8329 100644
--- a/vcl/source/gdi/configsettings.cxx
+++ b/vcl/source/gdi/configsettings.cxx
@@ -30,7 +30,9 @@
#include "precompiled_vcl.hxx"
#include <vcl/configsettings.hxx>
-#include <vcl/svdata.hxx>
+
+#include <svdata.hxx>
+
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
diff --git a/vcl/source/gdi/cvtgrf.cxx b/vcl/source/gdi/cvtgrf.cxx
index 261781ebcf50..6d3b60777120 100644
--- a/vcl/source/gdi/cvtgrf.cxx
+++ b/vcl/source/gdi/cvtgrf.cxx
@@ -29,12 +29,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <svsys.h>
#include <vcl/metaact.hxx>
-#include <vcl/salinst.hxx>
-#include <vcl/svdata.hxx>
#include <vcl/cvtgrf.hxx>
+#include <salinst.hxx>
+#include <svdata.hxx>
+
// --------------
// - Callback -
// --------------
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index 2a10563441fa..9102f693c025 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -29,15 +29,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include "sft.hxx"
+#include "unotools/fontcfg.hxx"
#include "tools/stream.hxx"
#include "tools/vcompat.hxx"
#include "tools/debug.hxx"
+
#include "vcl/font.hxx"
-#include "vcl/impfont.hxx"
-#include "vcl/outfont.hxx"
-#include "unotools/fontcfg.hxx"
+
+#include "impfont.hxx"
+#include "outfont.hxx"
+#include "sft.hxx"
+
#include <sal/macros.h>
#include <algorithm>
@@ -876,9 +879,6 @@ namespace
bool identifyTrueTypeFont( const void* i_pBuffer, sal_uInt32 i_nSize, Font& o_rResult )
{
bool bResult = false;
-// FIXME: This is HACK. We do not build psprint's part on aqua...
-// How to solve this?
-#ifndef QUARTZ
TrueTypeFont* pTTF = NULL;
if( OpenTTFontBuffer( const_cast<void*>(i_pBuffer), i_nSize, 0, &pTTF ) == SF_OK )
{
@@ -952,7 +952,6 @@ namespace
// success
bResult = true;
}
-#endif
return bResult;
}
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 79b8f417891b..ed15dfae81a2 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -1631,6 +1631,15 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
+ case( META_RENDERGRAPHIC_ACTION ):
+ {
+ OSL_TRACE( "Rotate not supported for RenderGraphic MetaActions yet" );
+
+ pAction->Duplicate();
+ aMtf.AddAction( pAction );
+ }
+ break;
+
default:
{
pAction->Execute( &aMapVDev );
@@ -1695,363 +1704,371 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
switch( nActionType )
{
case( META_PIXEL_ACTION ):
- {
- MetaPixelAction* pAct = (MetaPixelAction*) pAction;
- ImplActionBounds( aBound,
- Rectangle( aMapVDev.LogicToLogic( pAct->GetPoint(), aMapVDev.GetMapMode(), GetPrefMapMode() ),
- aMapVDev.PixelToLogic( Size( 1, 1 ), GetPrefMapMode() ) ),
- aClipStack );
- }
- break;
+ {
+ MetaPixelAction* pAct = (MetaPixelAction*) pAction;
+ ImplActionBounds( aBound,
+ Rectangle( aMapVDev.LogicToLogic( pAct->GetPoint(), aMapVDev.GetMapMode(), GetPrefMapMode() ),
+ aMapVDev.PixelToLogic( Size( 1, 1 ), GetPrefMapMode() ) ),
+ aClipStack );
+ }
+ break;
case( META_POINT_ACTION ):
- {
- MetaPointAction* pAct = (MetaPointAction*) pAction;
- ImplActionBounds( aBound,
- Rectangle( aMapVDev.LogicToLogic( pAct->GetPoint(), aMapVDev.GetMapMode(), GetPrefMapMode() ),
- aMapVDev.PixelToLogic( Size( 1, 1 ), GetPrefMapMode() ) ),
- aClipStack );
- }
- break;
+ {
+ MetaPointAction* pAct = (MetaPointAction*) pAction;
+ ImplActionBounds( aBound,
+ Rectangle( aMapVDev.LogicToLogic( pAct->GetPoint(), aMapVDev.GetMapMode(), GetPrefMapMode() ),
+ aMapVDev.PixelToLogic( Size( 1, 1 ), GetPrefMapMode() ) ),
+ aClipStack );
+ }
+ break;
case( META_LINE_ACTION ):
- {
- MetaLineAction* pAct = (MetaLineAction*) pAction;
- Point aP1( pAct->GetStartPoint() ), aP2( pAct->GetEndPoint() );
- Rectangle aRect( aP1, aP2 );
- aRect.Justify();
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaLineAction* pAct = (MetaLineAction*) pAction;
+ Point aP1( pAct->GetStartPoint() ), aP2( pAct->GetEndPoint() );
+ Rectangle aRect( aP1, aP2 );
+ aRect.Justify();
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_RECT_ACTION ):
- {
- MetaRectAction* pAct = (MetaRectAction*) pAction;
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaRectAction* pAct = (MetaRectAction*) pAction;
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_ROUNDRECT_ACTION ):
- {
- MetaRoundRectAction* pAct = (MetaRoundRectAction*) pAction;
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaRoundRectAction* pAct = (MetaRoundRectAction*) pAction;
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_ELLIPSE_ACTION ):
- {
- MetaEllipseAction* pAct = (MetaEllipseAction*) pAction;
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaEllipseAction* pAct = (MetaEllipseAction*) pAction;
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_ARC_ACTION ):
- {
- MetaArcAction* pAct = (MetaArcAction*) pAction;
- // FIXME: this is imprecise
- // e.g. for small arcs the whole rectangle is WAY too large
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaArcAction* pAct = (MetaArcAction*) pAction;
+ // FIXME: this is imprecise
+ // e.g. for small arcs the whole rectangle is WAY too large
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_PIE_ACTION ):
- {
- MetaPieAction* pAct = (MetaPieAction*) pAction;
- // FIXME: this is imprecise
- // e.g. for small arcs the whole rectangle is WAY too large
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaPieAction* pAct = (MetaPieAction*) pAction;
+ // FIXME: this is imprecise
+ // e.g. for small arcs the whole rectangle is WAY too large
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_CHORD_ACTION ):
- {
- MetaChordAction* pAct = (MetaChordAction*) pAction;
- // FIXME: this is imprecise
- // e.g. for small arcs the whole rectangle is WAY too large
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaChordAction* pAct = (MetaChordAction*) pAction;
+ // FIXME: this is imprecise
+ // e.g. for small arcs the whole rectangle is WAY too large
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_POLYLINE_ACTION ):
- {
- MetaPolyLineAction* pAct = (MetaPolyLineAction*) pAction;
- Rectangle aRect( pAct->GetPolygon().GetBoundRect() );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaPolyLineAction* pAct = (MetaPolyLineAction*) pAction;
+ Rectangle aRect( pAct->GetPolygon().GetBoundRect() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_POLYGON_ACTION ):
- {
- MetaPolygonAction* pAct = (MetaPolygonAction*) pAction;
- Rectangle aRect( pAct->GetPolygon().GetBoundRect() );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaPolygonAction* pAct = (MetaPolygonAction*) pAction;
+ Rectangle aRect( pAct->GetPolygon().GetBoundRect() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_POLYPOLYGON_ACTION ):
- {
- MetaPolyPolygonAction* pAct = (MetaPolyPolygonAction*) pAction;
- Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaPolyPolygonAction* pAct = (MetaPolyPolygonAction*) pAction;
+ Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_TEXT_ACTION ):
- {
- MetaTextAction* pAct = (MetaTextAction*) pAction;
- Rectangle aRect;
- // hdu said base = index
- aMapVDev.GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen() );
- Point aPt( pAct->GetPoint() );
- aRect.Move( aPt.X(), aPt.Y() );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaTextAction* pAct = (MetaTextAction*) pAction;
+ Rectangle aRect;
+ // hdu said base = index
+ aMapVDev.GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen() );
+ Point aPt( pAct->GetPoint() );
+ aRect.Move( aPt.X(), aPt.Y() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_TEXTARRAY_ACTION ):
- {
- MetaTextArrayAction* pAct = (MetaTextArrayAction*) pAction;
- Rectangle aRect;
- // hdu said base = index
- aMapVDev.GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen(),
- 0, pAct->GetDXArray() );
- Point aPt( pAct->GetPoint() );
- aRect.Move( aPt.X(), aPt.Y() );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaTextArrayAction* pAct = (MetaTextArrayAction*) pAction;
+ Rectangle aRect;
+ // hdu said base = index
+ aMapVDev.GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen(),
+ 0, pAct->GetDXArray() );
+ Point aPt( pAct->GetPoint() );
+ aRect.Move( aPt.X(), aPt.Y() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_STRETCHTEXT_ACTION ):
- {
- MetaStretchTextAction* pAct = (MetaStretchTextAction*) pAction;
- Rectangle aRect;
- // hdu said base = index
- aMapVDev.GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen(),
- pAct->GetWidth(), NULL );
- Point aPt( pAct->GetPoint() );
- aRect.Move( aPt.X(), aPt.Y() );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaStretchTextAction* pAct = (MetaStretchTextAction*) pAction;
+ Rectangle aRect;
+ // hdu said base = index
+ aMapVDev.GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen(),
+ pAct->GetWidth(), NULL );
+ Point aPt( pAct->GetPoint() );
+ aRect.Move( aPt.X(), aPt.Y() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_TEXTLINE_ACTION ):
- {
- MetaTextLineAction* pAct = (MetaTextLineAction*) pAction;
- // measure a test string to get ascend and descent right
- static const sal_Unicode pStr[] = { 0xc4, 0x67, 0 };
- String aStr( pStr );
-
- Rectangle aRect;
- aMapVDev.GetTextBoundRect( aRect, aStr, 0, 0, aStr.Len(), 0, NULL );
- Point aPt( pAct->GetStartPoint() );
- aRect.Move( aPt.X(), aPt.Y() );
- aRect.Right() = aRect.Left() + pAct->GetWidth();
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaTextLineAction* pAct = (MetaTextLineAction*) pAction;
+ // measure a test string to get ascend and descent right
+ static const sal_Unicode pStr[] = { 0xc4, 0x67, 0 };
+ String aStr( pStr );
+
+ Rectangle aRect;
+ aMapVDev.GetTextBoundRect( aRect, aStr, 0, 0, aStr.Len(), 0, NULL );
+ Point aPt( pAct->GetStartPoint() );
+ aRect.Move( aPt.X(), aPt.Y() );
+ aRect.Right() = aRect.Left() + pAct->GetWidth();
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_BMPSCALE_ACTION ):
- {
- MetaBmpScaleAction* pAct = (MetaBmpScaleAction*) pAction;
- Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaBmpScaleAction* pAct = (MetaBmpScaleAction*) pAction;
+ Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_BMPSCALEPART_ACTION ):
- {
- MetaBmpScalePartAction* pAct = (MetaBmpScalePartAction*) pAction;
- Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaBmpScalePartAction* pAct = (MetaBmpScalePartAction*) pAction;
+ Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_BMPEXSCALE_ACTION ):
- {
- MetaBmpExScaleAction* pAct = (MetaBmpExScaleAction*) pAction;
- Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaBmpExScaleAction* pAct = (MetaBmpExScaleAction*) pAction;
+ Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_BMPEXSCALEPART_ACTION ):
- {
- MetaBmpExScalePartAction* pAct = (MetaBmpExScalePartAction*) pAction;
- Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaBmpExScalePartAction* pAct = (MetaBmpExScalePartAction*) pAction;
+ Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_GRADIENT_ACTION ):
- {
- MetaGradientAction* pAct = (MetaGradientAction*) pAction;
- Rectangle aRect( pAct->GetRect() );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaGradientAction* pAct = (MetaGradientAction*) pAction;
+ Rectangle aRect( pAct->GetRect() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_GRADIENTEX_ACTION ):
- {
- MetaGradientExAction* pAct = (MetaGradientExAction*) pAction;
- Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaGradientExAction* pAct = (MetaGradientExAction*) pAction;
+ Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_COMMENT_ACTION ):
- {
- // nothing to do
- };
- break;
+ {
+ // nothing to do
+ };
+ break;
case( META_HATCH_ACTION ):
- {
- MetaHatchAction* pAct = (MetaHatchAction*) pAction;
- Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaHatchAction* pAct = (MetaHatchAction*) pAction;
+ Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_TRANSPARENT_ACTION ):
- {
- MetaTransparentAction* pAct = (MetaTransparentAction*) pAction;
- Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaTransparentAction* pAct = (MetaTransparentAction*) pAction;
+ Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_FLOATTRANSPARENT_ACTION ):
- {
- MetaFloatTransparentAction* pAct = (MetaFloatTransparentAction*) pAction;
- GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
- // get the bound rect of the contained metafile
- Rectangle aRect( aTransMtf.GetBoundRect( i_rReference ) );
- // scale the rect now on the assumption that the correct top left of the metafile
- // (not its bounds !) is (0,0)
- Size aPSize( aTransMtf.GetPrefSize() );
- aPSize = aMapVDev.LogicToLogic( aPSize, aTransMtf.GetPrefMapMode(), aMapVDev.GetMapMode() );
- Size aActSize( pAct->GetSize() );
- double fX = double(aActSize.Width())/double(aPSize.Width());
- double fY = double(aActSize.Height())/double(aPSize.Height());
- aRect.Left() = long(double(aRect.Left())*fX);
- aRect.Right() = long(double(aRect.Right())*fX);
- aRect.Top() = long(double(aRect.Top())*fY);
- aRect.Bottom() = long(double(aRect.Bottom())*fY);
-
- // transform the rect to current VDev state
- aRect = aMapVDev.LogicToLogic( aRect, aTransMtf.GetPrefMapMode(), aMapVDev.GetMapMode() );
-
- ImplActionBounds( aBound, aRect, aClipStack );
- }
- break;
+ {
+ MetaFloatTransparentAction* pAct = (MetaFloatTransparentAction*) pAction;
+ GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
+ // get the bound rect of the contained metafile
+ Rectangle aRect( aTransMtf.GetBoundRect( i_rReference ) );
+ // scale the rect now on the assumption that the correct top left of the metafile
+ // (not its bounds !) is (0,0)
+ Size aPSize( aTransMtf.GetPrefSize() );
+ aPSize = aMapVDev.LogicToLogic( aPSize, aTransMtf.GetPrefMapMode(), aMapVDev.GetMapMode() );
+ Size aActSize( pAct->GetSize() );
+ double fX = double(aActSize.Width())/double(aPSize.Width());
+ double fY = double(aActSize.Height())/double(aPSize.Height());
+ aRect.Left() = long(double(aRect.Left())*fX);
+ aRect.Right() = long(double(aRect.Right())*fX);
+ aRect.Top() = long(double(aRect.Top())*fY);
+ aRect.Bottom() = long(double(aRect.Bottom())*fY);
+
+ // transform the rect to current VDev state
+ aRect = aMapVDev.LogicToLogic( aRect, aTransMtf.GetPrefMapMode(), aMapVDev.GetMapMode() );
+
+ ImplActionBounds( aBound, aRect, aClipStack );
+ }
+ break;
case( META_EPS_ACTION ):
- {
- MetaEPSAction* pAct = (MetaEPSAction*) pAction;
- Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaEPSAction* pAct = (MetaEPSAction*) pAction;
+ Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_CLIPREGION_ACTION ):
- {
- MetaClipRegionAction* pAct = (MetaClipRegionAction*) pAction;
- if( pAct->IsClipping() )
- aClipStack.back() = aMapVDev.LogicToLogic( pAct->GetRegion().GetBoundRect(), aMapVDev.GetMapMode(), GetPrefMapMode() );
- else
- aClipStack.back() = Rectangle();
- }
- break;
+ {
+ MetaClipRegionAction* pAct = (MetaClipRegionAction*) pAction;
+ if( pAct->IsClipping() )
+ aClipStack.back() = aMapVDev.LogicToLogic( pAct->GetRegion().GetBoundRect(), aMapVDev.GetMapMode(), GetPrefMapMode() );
+ else
+ aClipStack.back() = Rectangle();
+ }
+ break;
case( META_ISECTRECTCLIPREGION_ACTION ):
- {
- MetaISectRectClipRegionAction* pAct = (MetaISectRectClipRegionAction*) pAction;
- Rectangle aRect( aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ) );
- if( aClipStack.back().IsEmpty() )
- aClipStack.back() = aRect;
- else
- aClipStack.back().Intersection( aRect );
- }
- break;
+ {
+ MetaISectRectClipRegionAction* pAct = (MetaISectRectClipRegionAction*) pAction;
+ Rectangle aRect( aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ) );
+ if( aClipStack.back().IsEmpty() )
+ aClipStack.back() = aRect;
+ else
+ aClipStack.back().Intersection( aRect );
+ }
+ break;
case( META_ISECTREGIONCLIPREGION_ACTION ):
- {
- MetaISectRegionClipRegionAction* pAct = (MetaISectRegionClipRegionAction*) pAction;
- Rectangle aRect( aMapVDev.LogicToLogic( pAct->GetRegion().GetBoundRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ) );
- if( aClipStack.back().IsEmpty() )
- aClipStack.back() = aRect;
- else
- aClipStack.back().Intersection( aRect );
- }
- break;
+ {
+ MetaISectRegionClipRegionAction* pAct = (MetaISectRegionClipRegionAction*) pAction;
+ Rectangle aRect( aMapVDev.LogicToLogic( pAct->GetRegion().GetBoundRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ) );
+ if( aClipStack.back().IsEmpty() )
+ aClipStack.back() = aRect;
+ else
+ aClipStack.back().Intersection( aRect );
+ }
+ break;
case( META_BMP_ACTION ):
- {
- MetaBmpAction* pAct = (MetaBmpAction*) pAction;
- Rectangle aRect( pAct->GetPoint(), aMapVDev.PixelToLogic( pAct->GetBitmap().GetSizePixel() ) );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaBmpAction* pAct = (MetaBmpAction*) pAction;
+ Rectangle aRect( pAct->GetPoint(), aMapVDev.PixelToLogic( pAct->GetBitmap().GetSizePixel() ) );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_BMPEX_ACTION ):
- {
- MetaBmpExAction* pAct = (MetaBmpExAction*) pAction;
- Rectangle aRect( pAct->GetPoint(), aMapVDev.PixelToLogic( pAct->GetBitmapEx().GetSizePixel() ) );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaBmpExAction* pAct = (MetaBmpExAction*) pAction;
+ Rectangle aRect( pAct->GetPoint(), aMapVDev.PixelToLogic( pAct->GetBitmapEx().GetSizePixel() ) );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_MASK_ACTION ):
- {
- MetaMaskAction* pAct = (MetaMaskAction*) pAction;
- Rectangle aRect( pAct->GetPoint(), aMapVDev.PixelToLogic( pAct->GetBitmap().GetSizePixel() ) );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaMaskAction* pAct = (MetaMaskAction*) pAction;
+ Rectangle aRect( pAct->GetPoint(), aMapVDev.PixelToLogic( pAct->GetBitmap().GetSizePixel() ) );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_MASKSCALE_ACTION ):
- {
- MetaMaskScalePartAction* pAct = (MetaMaskScalePartAction*) pAction;
- Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaMaskScalePartAction* pAct = (MetaMaskScalePartAction*) pAction;
+ Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_MASKSCALEPART_ACTION ):
- {
- MetaMaskScalePartAction* pAct = (MetaMaskScalePartAction*) pAction;
- Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaMaskScalePartAction* pAct = (MetaMaskScalePartAction*) pAction;
+ Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_WALLPAPER_ACTION ):
- {
- MetaWallpaperAction* pAct = (MetaWallpaperAction*) pAction;
- Rectangle aRect( pAct->GetRect() );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaWallpaperAction* pAct = (MetaWallpaperAction*) pAction;
+ Rectangle aRect( pAct->GetRect() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_TEXTRECT_ACTION ):
- {
- MetaTextRectAction* pAct = (MetaTextRectAction*) pAction;
- Rectangle aRect( pAct->GetRect() );
- ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
- }
- break;
+ {
+ MetaTextRectAction* pAct = (MetaTextRectAction*) pAction;
+ Rectangle aRect( pAct->GetRect() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
case( META_MOVECLIPREGION_ACTION ):
+ {
+ MetaMoveClipRegionAction* pAct = (MetaMoveClipRegionAction*) pAction;
+ if( ! aClipStack.back().IsEmpty() )
{
- MetaMoveClipRegionAction* pAct = (MetaMoveClipRegionAction*) pAction;
- if( ! aClipStack.back().IsEmpty() )
- {
- Size aDelta( pAct->GetHorzMove(), pAct->GetVertMove() );
- aDelta = aMapVDev.LogicToLogic( aDelta, aMapVDev.GetMapMode(), GetPrefMapMode() );
- aClipStack.back().Move( aDelta.Width(), aDelta.Width() );
- }
+ Size aDelta( pAct->GetHorzMove(), pAct->GetVertMove() );
+ aDelta = aMapVDev.LogicToLogic( aDelta, aMapVDev.GetMapMode(), GetPrefMapMode() );
+ aClipStack.back().Move( aDelta.Width(), aDelta.Width() );
}
- break;
+ }
+ break;
+
+ case( META_RENDERGRAPHIC_ACTION ):
+ {
+ MetaRenderGraphicAction* pAct = (MetaRenderGraphicAction*) pAction;
+ Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
+ ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
+ }
+ break;
default:
{
@@ -2451,6 +2468,15 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
}
break;
+ case( META_RENDERGRAPHIC_ACTION ):
+ {
+ OSL_TRACE( "ExchangeColors not supported for RenderGraphic MetaActions yet" );
+
+ pAction->Duplicate();
+ aMtf.Insert( pAction, LIST_APPEND );
+ }
+ break;
+
default:
{
pAction->Duplicate();
@@ -2636,11 +2662,13 @@ sal_uLong GDIMetaFile::GetChecksum() const
{
GDIMetaFile aMtf;
SvMemoryStream aMemStm( 65535, 65535 );
- ImplMetaWriteData aWriteData; aWriteData.meActualCharSet = aMemStm.GetStreamCharSet();
+ ImplMetaWriteData aWriteData;
SVBT16 aBT16;
SVBT32 aBT32;
sal_uLong nCrc = 0;
+ aWriteData.meActualCharSet = aMemStm.GetStreamCharSet();
+
for( sal_uLong i = 0, nObjCount = GetActionCount(); i < nObjCount; i++ )
{
MetaAction* pAction = GetAction( i );
@@ -2897,6 +2925,30 @@ sal_uLong GDIMetaFile::GetChecksum() const
}
break;
+ case( META_RENDERGRAPHIC_ACTION ):
+ {
+ MetaRenderGraphicAction* pAct = (MetaRenderGraphicAction*) pAction;
+ const ::vcl::RenderGraphic& rRenderGraphic = pAct->GetRenderGraphic();
+
+ ShortToSVBT16( pAct->GetType(), aBT16 );
+ nCrc = rtl_crc32( nCrc, aBT16, 2 );
+
+ nCrc = rtl_crc32( nCrc, rRenderGraphic.GetGraphicData().get(), rRenderGraphic.GetGraphicDataLength() );
+
+ UInt32ToSVBT32( pAct->GetPoint().X(), aBT32 );
+ nCrc = rtl_crc32( nCrc, aBT32, 4 );
+
+ UInt32ToSVBT32( pAct->GetPoint().Y(), aBT32 );
+ nCrc = rtl_crc32( nCrc, aBT32, 4 );
+
+ UInt32ToSVBT32( pAct->GetSize().Width(), aBT32 );
+ nCrc = rtl_crc32( nCrc, aBT32, 4 );
+
+ UInt32ToSVBT32( pAct->GetSize().Height(), aBT32 );
+ nCrc = rtl_crc32( nCrc, aBT32, 4 );
+ }
+ break;
+
default:
{
pAction->Write( aMemStm, &aWriteData );
@@ -2963,8 +3015,7 @@ sal_uLong GDIMetaFile::GetSizeBytes() const
}
break;
- default:
- break;
+ case( META_RENDERGRAPHIC_ACTION ): nSizeBytes += ( ( (MetaRenderGraphicAction*) pAction )->GetRenderGraphic() ).GetGraphicDataLength(); break;
}
}
@@ -2992,27 +3043,63 @@ SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
// new format
VersionCompat* pCompat;
MetaAction* pAction;
- sal_uInt32 nStmCompressMode = 0;
- sal_uInt32 nCount = 0;
+ sal_uInt32 nStmCompressMode = 0;
+ sal_uInt32 nCount = 0;
+ sal_uInt8 bRenderGraphicReplacements = 0;
pCompat = new VersionCompat( rIStm, STREAM_READ );
+ {
+ // version 1
+ rIStm >> nStmCompressMode;
+ rIStm >> rGDIMetaFile.aPrefMapMode;
+ rIStm >> rGDIMetaFile.aPrefSize;
+ rIStm >> nCount;
- rIStm >> nStmCompressMode;
- rIStm >> rGDIMetaFile.aPrefMapMode;
- rIStm >> rGDIMetaFile.aPrefSize;
- rIStm >> nCount;
+ if( pCompat->GetVersion() >= 2 )
+ {
+ // version 2
+ // =========
+ // contains an additional flag to indicate that RenderGraphic
+ // actions are immediately followed by a replacement image, that
+ // needs to be skipped in case the flag is set (KA 01/2011)
+ rIStm >> bRenderGraphicReplacements;
+ }
+ }
delete pCompat;
ImplMetaReadData aReadData;
aReadData.meActualCharSet = rIStm.GetStreamCharSet();
- for( sal_uInt32 nAction = 0UL; ( nAction < nCount ) && !rIStm.IsEof(); nAction++ )
+ for( sal_uInt32 nAction = 0UL; ( nAction < nCount ) && !rIStm.IsEof(); ++nAction )
{
pAction = MetaAction::ReadMetaAction( rIStm, &aReadData );
if( pAction )
+ {
rGDIMetaFile.AddAction( pAction );
+
+ // if the MetaFile was written in RenderGraphics replacement mode
+ // and we just read a RenderGraphic action, skip the following
+ // META_BMPEXSCALE_ACTION, since this is the replacement image,
+ // just needed for old implementations; don't forget to increment
+ // the action read counter! (KA 01/2011)
+ if( bRenderGraphicReplacements &&
+ ( META_RENDERGRAPHIC_ACTION == pAction->GetType() ) &&
+ ( ++nAction < nCount ) && !rIStm.IsEof() )
+ {
+ sal_uInt16 nFollowingType;
+
+ // dummy read of the next following META_BMPEXSCALE_ACTION
+ // RenderGraphic replacement action (KA 01/2011)
+ rIStm >> nFollowingType;
+ delete ( new VersionCompat( rIStm, STREAM_READ ) );
+
+ OSL_ENSURE( META_BMPEXSCALE_ACTION == nFollowingType, \
+"META_RENDERGRAPHIC_ACTION read in RenderGraphic replacement mode \
+without following META_BMPEXSCALE_ACTION replacement" );
+ }
+ }
}
}
else
@@ -3041,10 +3128,27 @@ SvStream& operator<<( SvStream& rOStm, const GDIMetaFile& rGDIMetaFile )
{
if( !rOStm.GetError() )
{
- if( rOStm.GetVersion() >= SOFFICE_FILEFORMAT_50 )
- ((GDIMetaFile&) rGDIMetaFile ).Write( rOStm );
+ static const char* pEnableSVM1 = getenv( "SAL_ENABLE_SVM1" );
+ static const bool bNoSVM1 = (NULL == pEnableSVM1 ) || ( '0' == *pEnableSVM1 );
+
+ if( bNoSVM1 || rOStm.GetVersion() >= SOFFICE_FILEFORMAT_50 )
+ {
+ const_cast< GDIMetaFile& >( rGDIMetaFile ).Write( rOStm );
+ }
else
- delete( new SVMConverter( rOStm, (GDIMetaFile&) rGDIMetaFile, CONVERT_TO_SVM1 ) );
+ {
+ delete( new SVMConverter( rOStm, const_cast< GDIMetaFile& >( rGDIMetaFile ), CONVERT_TO_SVM1 ) );
+ }
+
+#ifdef DEBUG
+ if( !bNoSVM1 && rOStm.GetVersion() < SOFFICE_FILEFORMAT_50 )
+ {
+OSL_TRACE( \
+"GDIMetaFile would normally be written in old SVM1 format by this call. \
+The current implementation always writes in VCLMTF format. \
+Please set environment variable SAL_ENABLE_SVM1 to '1' to reenable old behavior" );
+ }
+#endif // DEBUG
}
return rOStm;
@@ -3062,32 +3166,90 @@ SvStream& GDIMetaFile::Read( SvStream& rIStm )
// ------------------------------------------------------------------------
-SvStream& GDIMetaFile::Write( SvStream& rOStm )
+SvStream& GDIMetaFile::Write( SvStream& rOStm, GDIMetaFileWriteFlags nWriteFlags )
{
VersionCompat* pCompat;
const sal_uInt32 nStmCompressMode = rOStm.GetCompressMode();
sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt();
+ const sal_uInt8 bRenderGraphicReplacements =
+ ( ( ( GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC & nWriteFlags ) != 0 ) ? 1 : 0 );
+
+ // With the introduction of the META_RENDERGRAPHIC_ACTION, it is neccessary
+ // to provide some kind of document backward compatibility:
+ //
+ // If the flag GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC is set in
+ // parameter nWriteFlags, each META_RENDERGRAPHIC_ACTION is followed by
+ // an additional META_BMPEXSCALE_ACTION, that contains a replacement
+ // image for the new RenderGraphic action.
+ //
+ // Old implementations, not knowing anything about META_RENDERGRAPHIC_ACTION,
+ // will skip this new action and read the META_BMPEXSCALE_ACTION instead
+ //
+ // Since the current implementation is able to handle the new action, the
+ // then following image replacement action needs to be skipped by this
+ // implementation, if the metafile was written in the RenderGraphic
+ // replacement mode.
+ //
+ // To be able to detect this compatibility mode, the header needs to
+ // be extended by a corresponding flag, resulting in version 2 of
+ // the header. The surrounding VersionCompat of the header
+ // allows to add such new data without any problems (KA 01/2011)
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
rOStm.Write( "VCLMTF", 6 );
- pCompat = new VersionCompat( rOStm, STREAM_WRITE, 1 );
+ pCompat = new VersionCompat( rOStm, STREAM_WRITE, 2 );
- rOStm << nStmCompressMode;
- rOStm << aPrefMapMode;
- rOStm << aPrefSize;
- rOStm << (sal_uInt32) GetActionCount();
+ {
+ // version 1
+ sal_uInt32 nActionCount = 0;
+
+ // calculate correct action count and watch for
+ // additional RenderGraphic replacement actions, if the
+ // GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC is set
+ // and META_RENDERGRAPHIC_ACTION are encountered (KA 01/2011)
+ for( MetaAction* pAct = static_cast< MetaAction* >( First() ); pAct; pAct = static_cast< MetaAction* >( Next() ) )
+ {
+ nActionCount += ( bRenderGraphicReplacements && ( META_RENDERGRAPHIC_ACTION == pAct->GetType() ) ? 2 : 1 );
+ }
+
+ rOStm << nStmCompressMode << aPrefMapMode << aPrefSize << nActionCount;
+
+ {
+ // version 2
+ // =========
+ // since version 2, a GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC flag
+ // is written, to indicate that each META_BMPEXSCALE_ACTION following
+ // a META_RENDERGRAPHIC_ACTION needs to be skipped, in case the flag is
+ // set (KA 01/2011)
+ rOStm << bRenderGraphicReplacements;
+ }
+ }
delete pCompat;
ImplMetaWriteData aWriteData;
+
aWriteData.meActualCharSet = rOStm.GetStreamCharSet();
+ aWriteData.mnWriteFlags = nWriteFlags;
- MetaAction* pAct = (MetaAction*)First();
- while ( pAct )
+ for( MetaAction* pAct = static_cast< MetaAction* >( First() ); pAct; pAct = static_cast< MetaAction* >( Next() ) )
{
pAct->Write( rOStm, &aWriteData );
- pAct = (MetaAction*)Next();
+
+ // write the RenderGraphic replacement image, if the
+ // GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC flag is set
+ // and if a META_RENDERGRAPHIC_ACTION is encountered (KA 01/2011)
+ if( bRenderGraphicReplacements && ( META_RENDERGRAPHIC_ACTION == pAct->GetType() ) )
+ {
+ MetaRenderGraphicAction* pRenderAction = static_cast< MetaRenderGraphicAction* >( pAct );
+ MetaBmpExScaleAction* pBmpExScaleAction = new MetaBmpExScaleAction(
+ pRenderAction->GetPoint(), pRenderAction->GetSize(),
+ pRenderAction->GetRenderGraphic().GetReplacement() );
+
+ pBmpExScaleAction->Write( rOStm, &aWriteData );
+ pBmpExScaleAction->Delete();
+ }
}
rOStm.SetNumberFormatInt( nOldFormat );
diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx
index 29b6a62253a6..745c4f765398 100644
--- a/vcl/source/gdi/gfxlink.cxx
+++ b/vcl/source/gdi/gfxlink.cxx
@@ -259,6 +259,7 @@ sal_Bool GfxLink::LoadNative( Graphic& rGraphic )
case( GFX_LINK_TYPE_NATIVE_WMF ): nCvtType = CVT_WMF; break;
case( GFX_LINK_TYPE_NATIVE_MET ): nCvtType = CVT_MET; break;
case( GFX_LINK_TYPE_NATIVE_PCT ): nCvtType = CVT_PCT; break;
+ case( GFX_LINK_TYPE_NATIVE_SVG ): nCvtType = CVT_SVG; break;
default: nCvtType = CVT_UNKNOWN; break;
}
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index f61bbf8dc041..eb22d31937df 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -28,11 +28,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <vcl/impgraph.hxx>
+
#include <vcl/outdev.hxx>
#include <vcl/svapp.hxx>
#include <vcl/graph.hxx>
+
+#include <impgraph.hxx>
+
#include <comphelper/processfactory.hxx>
+
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/graphic/XGraphicProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
@@ -428,6 +432,27 @@ sal_Bool Graphic::IsAnimated() const
// ------------------------------------------------------------------------
+sal_Bool Graphic::IsEPS() const
+{
+ return mpImpGraphic->ImplIsEPS();
+}
+
+// ------------------------------------------------------------------------
+
+sal_Bool Graphic::IsRenderGraphic() const
+{
+ return mpImpGraphic->ImplIsRenderGraphic();
+}
+
+// ------------------------------------------------------------------------
+
+sal_Bool Graphic::HasRenderGraphic() const
+{
+ return mpImpGraphic->ImplHasRenderGraphic();
+}
+
+// ------------------------------------------------------------------------
+
Bitmap Graphic::GetBitmap(const GraphicConversionParameters& rParameters) const
{
return mpImpGraphic->ImplGetBitmap(rParameters);
@@ -456,6 +481,13 @@ const GDIMetaFile& Graphic::GetGDIMetaFile() const
// ------------------------------------------------------------------------
+::vcl::RenderGraphic Graphic::GetRenderGraphic() const
+{
+ return mpImpGraphic->ImplGetRenderGraphic();
+}
+
+// ------------------------------------------------------------------------
+
uno::Reference< graphic::XGraphic > Graphic::GetXGraphic() const
{
uno::Reference< graphic::XGraphic > xRet;
diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx
index 24c86c326910..18f927e5b0ff 100644
--- a/vcl/source/gdi/image.cxx
+++ b/vcl/source/gdi/image.cxx
@@ -32,6 +32,7 @@
#include <boost/scoped_array.hpp>
#include <rtl/logfile.hxx>
+
#include <tools/debug.hxx>
#include <tools/stream.hxx>
#include <tools/rc.h>
@@ -41,10 +42,10 @@
#include <vcl/outdev.hxx>
#include <vcl/graph.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/impimagetree.hxx>
-#include <vcl/image.h>
#include <vcl/image.hxx>
#include <vcl/imagerepository.hxx>
+#include <impimagetree.hxx>
+#include <image.h>
#if OSL_DEBUG_LEVEL > 0
#include <rtl/strbuf.hxx>
diff --git a/vcl/source/gdi/imagerepository.cxx b/vcl/source/gdi/imagerepository.cxx
index ea5b5f5d87a4..6fda85735b01 100644
--- a/vcl/source/gdi/imagerepository.cxx
+++ b/vcl/source/gdi/imagerepository.cxx
@@ -28,10 +28,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+
#include <vcl/bitmapex.hxx>
#include <vcl/imagerepository.hxx>
#include <vcl/svapp.hxx>
-#include "vcl/impimagetree.hxx"
+#include "impimagetree.hxx"
//........................................................................
namespace vcl
diff --git a/vcl/source/gdi/impbmp.cxx b/vcl/source/gdi/impbmp.cxx
index 6957e32b3e25..579515f67e9c 100644
--- a/vcl/source/gdi/impbmp.cxx
+++ b/vcl/source/gdi/impbmp.cxx
@@ -29,13 +29,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <svsys.h>
-#include <vcl/salbmp.hxx>
#include <tools/debug.hxx>
-#include <vcl/impbmp.hxx>
+
#include <vcl/bitmap.hxx>
-#include <vcl/svdata.hxx>
-#include <vcl/salinst.hxx>
+
+#include <svdata.hxx>
+#include <salinst.hxx>
+#include <salbmp.hxx>
+#include <impbmp.hxx>
// --------------
// - ImpBitmap -
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index bf99364a0f64..84e962bd2f6e 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -28,22 +28,26 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+
#include <tools/vcompat.hxx>
#include <tools/urlobj.hxx>
#include <tools/debug.hxx>
+#include <tools/stream.hxx>
+
#include <ucbhelper/content.hxx>
+
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/tempfile.hxx>
#include <vcl/outdev.hxx>
#include <vcl/virdev.hxx>
-#include <tools/debug.hxx>
-#include <tools/stream.hxx>
-#include <vcl/impgraph.hxx>
#include <vcl/gfxlink.hxx>
#include <vcl/cvtgrf.hxx>
#include <vcl/salbtype.hxx>
#include <vcl/graph.hxx>
#include <vcl/metaact.hxx>
+
+#include <impgraph.hxx>
+
#include <com/sun/star/ucb/CommandAbortedException.hpp>
// -----------
@@ -479,6 +483,48 @@ sal_Bool ImpGraphic::ImplIsAnimated() const
// ------------------------------------------------------------------------
+sal_Bool ImpGraphic::ImplIsEPS() const
+{
+ return( ( meType == GRAPHIC_GDIMETAFILE ) &&
+ ( maMetaFile.GetActionCount() > 0 ) &&
+ ( maMetaFile.GetAction( 0 )->GetType() == META_EPS_ACTION ) );
+}
+
+// ------------------------------------------------------------------------
+
+sal_Bool ImpGraphic::ImplIsRenderGraphic() const
+{
+ return( ( GRAPHIC_GDIMETAFILE == meType ) &&
+ ( 1 == maMetaFile.GetActionCount() ) &&
+ ( META_RENDERGRAPHIC_ACTION == maMetaFile.GetAction( 0 )->GetType() ) );
+}
+
+// ------------------------------------------------------------------------
+
+sal_Bool ImpGraphic::ImplHasRenderGraphic() const
+{
+ sal_Bool bRet = sal_False;
+
+ if( GRAPHIC_GDIMETAFILE == meType )
+ {
+ GDIMetaFile& rMtf = const_cast< ImpGraphic* >( this )->maMetaFile;
+
+ for( MetaAction* pAct = rMtf.FirstAction(); pAct && !bRet; pAct = rMtf.NextAction() )
+ {
+ if( META_RENDERGRAPHIC_ACTION == pAct->GetType() )
+ {
+ bRet = sal_True;
+ }
+ }
+
+ rMtf.WindStart();
+ }
+
+ return( bRet );
+}
+
+// ------------------------------------------------------------------------
+
Bitmap ImpGraphic::ImplGetBitmap(const GraphicConversionParameters& rParameters) const
{
Bitmap aRetBmp;
@@ -591,6 +637,18 @@ Animation ImpGraphic::ImplGetAnimation() const
// ------------------------------------------------------------------------
+::vcl::RenderGraphic ImpGraphic::ImplGetRenderGraphic() const
+{
+ ::vcl::RenderGraphic aRet;
+
+ if( ImplIsRenderGraphic() )
+ aRet = static_cast< MetaRenderGraphicAction* >( maMetaFile.GetAction( 0 ) )->GetRenderGraphic();
+
+ return( aRet );
+}
+
+// ------------------------------------------------------------------------
+
const GDIMetaFile& ImpGraphic::ImplGetGDIMetaFile() const
{
return maMetaFile;
diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx
index d2e479e1edb5..2246058fb10f 100644
--- a/vcl/source/gdi/impimage.cxx
+++ b/vcl/source/gdi/impimage.cxx
@@ -28,15 +28,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+
#include <vcl/outdev.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/alpha.hxx>
#include <vcl/window.hxx>
#include <vcl/bmpacc.hxx>
#include <vcl/virdev.hxx>
-#include <vcl/image.h>
#include <vcl/image.hxx>
+#include <image.h>
+
// -----------
// - Defines -
// -----------
diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx
index 88b465c89f7d..b43611e34b04 100644
--- a/vcl/source/gdi/impimagetree.cxx
+++ b/vcl/source/gdi/impimagetree.cxx
@@ -27,13 +27,13 @@
***********************************************************************/
#include "precompiled_vcl.hxx"
+
#include "sal/config.h"
#include <list>
#include <memory>
#include <utility>
#include <vector>
-
#include <boost/unordered_map.hpp>
#include "com/sun/star/container/XNameAccess.hpp"
@@ -44,24 +44,31 @@
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/RuntimeException.hpp"
#include "com/sun/star/uno/Sequence.hxx"
+
#include "comphelper/processfactory.hxx"
+
#include "osl/file.hxx"
#include "osl/diagnose.h"
+
#include "rtl/bootstrap.hxx"
#include "rtl/string.h"
#include "rtl/textenc.h"
#include "rtl/ustrbuf.hxx"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
+
#include "sal/types.h"
+
#include "tools/stream.hxx"
#include "tools/urlobj.hxx"
+
#include "vcl/bitmapex.hxx"
-#include "vcl/impimagetree.hxx"
#include "vcl/pngread.hxx"
#include "vcl/settings.hxx"
#include "vcl/svapp.hxx"
+#include "impimagetree.hxx"
+
namespace {
namespace css = com::sun::star;
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index bcf7986c70b2..d06e16dcf0cb 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -28,11 +28,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+
#include <tools/debug.hxx>
#include <tools/stream.hxx>
#include <rtl/alloc.h>
#include <vcl/jobset.hxx>
-#include <vcl/jobset.h>
+
+#include <jobset.h>
// =======================================================================
diff --git a/vcl/source/gdi/makefile.mk b/vcl/source/gdi/makefile.mk
index d01c46a77ca0..e124dc343eba 100755
--- a/vcl/source/gdi/makefile.mk
+++ b/vcl/source/gdi/makefile.mk
@@ -50,7 +50,7 @@ CDEFS+=-DGR2_STATIC
# --- Files --------------------------------------------------------
-EXCEPTIONSFILES= $(SLO)$/salmisc.obj \
+EXCEPTIONSFILES= $(SLO)$/salmisc.obj \
$(SLO)$/animate.obj \
$(SLO)$/base14.obj \
$(SLO)$/bitmap.obj \
@@ -90,36 +90,38 @@ EXCEPTIONSFILES= $(SLO)$/salmisc.obj \
$(SLO)$/pdfwriter_impl.obj \
$(SLO)$/pdfwriter_impl2.obj \
$(SLO)$/pngread.obj \
- $(SLO)$/pngwrite.obj \
+ $(SLO)$/pngwrite.obj \
$(SLO)$/print.obj \
$(SLO)$/print2.obj \
$(SLO)$/print3.obj \
+ $(SLO)$/rendergraphic.obj \
+ $(SLO)$/rendergraphicrasterizer.obj \
$(SLO)$/salgdilayout.obj \
$(SLO)$/sallayout.obj \
$(SLO)$/salnativewidgets-none.obj \
+ $(SLO)$/svgread.obj \
$(SLO)$/textlayout.obj \
$(SLO)$/virdev.obj \
$(SLO)$/wall.obj
-SLOFILES= $(EXCEPTIONSFILES) \
+SLOFILES= $(EXCEPTIONSFILES) \
$(SLO)$/bitmap3.obj \
$(SLO)$/bitmap4.obj \
- $(SLO)$/alpha.obj \
+ $(SLO)$/alpha.obj \
$(SLO)$/bmpacc.obj \
$(SLO)$/bmpacc2.obj \
$(SLO)$/bmpacc3.obj \
$(SLO)$/bmpfast.obj \
- $(SLO)$/font.obj \
+ $(SLO)$/font.obj \
$(SLO)$/gradient.obj \
- $(SLO)$/hatch.obj \
- $(SLO)$/impbmp.obj \
- $(SLO)$/mapmod.obj \
- $(SLO)$/octree.obj \
+ $(SLO)$/hatch.obj \
+ $(SLO)$/impbmp.obj \
+ $(SLO)$/mapmod.obj \
+ $(SLO)$/octree.obj \
$(SLO)$/regband.obj \
- $(SLO)$/region.obj \
+ $(SLO)$/region.obj \
$(SLO)$/extoutdevdata.obj
-
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index feba437c7c2f..2ffa3c68e4f7 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -39,6 +39,7 @@
#include <vcl/salbtype.hxx>
#include <vcl/metaact.hxx>
#include <vcl/graphictools.hxx>
+#include <vcl/rendergraphicrasterizer.hxx>
// ========================================================================
@@ -236,6 +237,7 @@ MetaAction* MetaAction::ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData
case( META_COMMENT_ACTION ): pAction = new MetaCommentAction; break;
case( META_LAYOUTMODE_ACTION ): pAction = new MetaLayoutModeAction; break;
case( META_TEXTLANGUAGE_ACTION ): pAction = new MetaTextLanguageAction; break;
+ case( META_RENDERGRAPHIC_ACTION ): pAction = new MetaRenderGraphicAction; break;
default:
{
@@ -2566,7 +2568,10 @@ MetaGradientExAction::~MetaGradientExAction()
void MetaGradientExAction::Execute( OutputDevice* pOut )
{
if( pOut->GetConnectMetaFile() )
- pOut->GetConnectMetaFile()->AddAction( Clone() );
+ {
+ Duplicate();
+ pOut->GetConnectMetaFile()->AddAction( this );
+ }
}
// ------------------------------------------------------------------------
@@ -4060,7 +4065,10 @@ void MetaCommentAction::ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32
void MetaCommentAction::Execute( OutputDevice* pOut )
{
if ( pOut->GetConnectMetaFile() )
- pOut->GetConnectMetaFile()->AddAction( Clone() );
+ {
+ Duplicate();
+ pOut->GetConnectMetaFile()->AddAction( this );
+ }
}
// ------------------------------------------------------------------------
@@ -4323,4 +4331,82 @@ void MetaTextLanguageAction::Read( SvStream& rIStm, ImplMetaReadData* )
// ========================================================================
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+IMPL_META_ACTION( RenderGraphic, META_RENDERGRAPHIC_ACTION )
+
+// ------------------------------------------------------------------------
+
+MetaRenderGraphicAction::MetaRenderGraphicAction( const Point& rPoint, const Size& rSize,
+ const vcl::RenderGraphic& rRenderGraphic,
+ double fRotateAngle, double fShearAngleX, double fShearAngleY ) :
+ MetaAction( META_RENDERGRAPHIC_ACTION ),
+ maRenderGraphic( rRenderGraphic ),
+ maPoint( rPoint ),
+ maSize( rSize ),
+ mfRotateAngle( fRotateAngle ),
+ mfShearAngleX( fShearAngleX ),
+ mfShearAngleY( fShearAngleY )
+{
+}
+
+// ------------------------------------------------------------------------
+
+void MetaRenderGraphicAction::Execute( OutputDevice* pOut )
+{
+ pOut->DrawRenderGraphic( maPoint, maSize, maRenderGraphic );
+}
+
+// ------------------------------------------------------------------------
+
+MetaAction* MetaRenderGraphicAction::Clone()
+{
+ MetaAction* pClone = (MetaAction*) new MetaRenderGraphicAction( *this );
+ pClone->ResetRefCount();
+ return pClone;
+}
+
+// ------------------------------------------------------------------------
+
+void MetaRenderGraphicAction::Move( long nHorzMove, long nVertMove )
+{
+ maPoint.Move( nHorzMove, nVertMove );
+}
+
+// ------------------------------------------------------------------------
+
+void MetaRenderGraphicAction::Scale( double fScaleX, double fScaleY )
+{
+ Rectangle aRectangle( maPoint, maSize );
+ ImplScaleRect( aRectangle, fScaleX, fScaleY );
+ maPoint = aRectangle.TopLeft();
+ maSize = aRectangle.GetSize();
+}
+
+// ------------------------------------------------------------------------
+
+sal_Bool MetaRenderGraphicAction::Compare( const MetaAction& rMetaAction ) const
+{
+ return ( maRenderGraphic.IsEqual( ( (MetaRenderGraphicAction&) rMetaAction).maRenderGraphic ) &&
+ ( maPoint == ( (MetaRenderGraphicAction&) rMetaAction).maPoint ) &&
+ ( maSize == ( (MetaRenderGraphicAction&) rMetaAction).maSize ) &&
+ ( mfRotateAngle == ( (MetaRenderGraphicAction&) rMetaAction).mfRotateAngle ) &&
+ ( mfShearAngleX == ( (MetaRenderGraphicAction&) rMetaAction).mfShearAngleX ) &&
+ ( mfShearAngleY == ( (MetaRenderGraphicAction&) rMetaAction).mfShearAngleY ) );
+}
+
+// ------------------------------------------------------------------------
+
+void MetaRenderGraphicAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
+{
+ WRITE_BASE_COMPAT( rOStm, 1, pData );
+ rOStm << maRenderGraphic << maPoint << maSize << mfRotateAngle << mfShearAngleX << mfShearAngleY;
+}
+
+// ------------------------------------------------------------------------
+
+void MetaRenderGraphicAction::Read( SvStream& rIStm, ImplMetaReadData* )
+{
+ COMPAT( rIStm );
+ rIStm >> maRenderGraphic >> maPoint >> maSize >> mfRotateAngle >> mfShearAngleX >> mfShearAngleY;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx
index 4814d6e3114e..e8a8a2cb3a63 100644
--- a/vcl/source/gdi/metric.cxx
+++ b/vcl/source/gdi/metric.cxx
@@ -29,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <vcl/impfont.hxx>
+#include <impfont.hxx>
#include <vcl/metric.hxx>
#include <vector>
diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx
index c2f0d92f03c3..56c46f421695 100644
--- a/vcl/source/gdi/octree.cxx
+++ b/vcl/source/gdi/octree.cxx
@@ -28,11 +28,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+
#include <limits.h>
+
#include <vcl/bmpacc.hxx>
-#include <vcl/impoct.hxx>
#include <vcl/octree.hxx>
+#include <impoct.hxx>
+
// ---------
// - pMask -
// ---------
diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx
index efd5484dad01..6bbaec8e43f5 100644
--- a/vcl/source/gdi/outdev.cxx
+++ b/vcl/source/gdi/outdev.cxx
@@ -30,31 +30,34 @@
#include "precompiled_vcl.hxx"
#include <tools/ref.hxx>
-#include <svsys.h>
-#include <vcl/salgdi.hxx>
-#include <vcl/sallayout.hxx>
-#include <vcl/salframe.hxx>
-#include <vcl/salvd.hxx>
-#include <vcl/salprn.hxx>
#include <tools/debug.hxx>
-#include <vcl/svdata.hxx>
+#include <tools/poly.hxx>
+
#include <vcl/svapp.hxx>
#include <vcl/ctrl.hxx>
-#include <tools/poly.hxx>
#include <vcl/region.hxx>
-#include <vcl/region.h>
#include <vcl/virdev.hxx>
-#include <vcl/window.h>
#include <vcl/window.hxx>
#include <vcl/metaact.hxx>
#include <vcl/gdimtf.hxx>
-#include <vcl/outdata.hxx>
#include <vcl/print.hxx>
-#include <vcl/outdev.h>
#include <vcl/outdev.hxx>
#include <vcl/unowrap.hxx>
+// declare system types in sysdata.hxx
+#include <svsys.h>
#include <vcl/sysdata.hxx>
+#include <salgdi.hxx>
+#include <sallayout.hxx>
+#include <salframe.hxx>
+#include <salvd.hxx>
+#include <salprn.hxx>
+#include <svdata.hxx>
+#include <window.h>
+#include <outdev.h>
+#include <region.h>
+#include <outdata.hxx>
+
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/vector/b2dvector.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx
index 356542952360..d1a76a9f085b 100644
--- a/vcl/source/gdi/outdev2.cxx
+++ b/vcl/source/gdi/outdev2.cxx
@@ -29,28 +29,29 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <svsys.h>
-#include <vcl/salbmp.hxx>
-#include <vcl/salgdi.hxx>
-#include <vcl/impbmp.hxx>
#include <tools/debug.hxx>
+
#include <vcl/bitmap.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/window.hxx>
#include <vcl/metaact.hxx>
#include <vcl/gdimtf.hxx>
#include <vcl/virdev.hxx>
-#include <vcl/outdata.hxx>
-#include <vcl/outdev.h>
#include <vcl/bmpacc.hxx>
-#include <vcl/region.h>
#include <vcl/outdev.hxx>
#include <vcl/window.hxx>
-#include <vcl/window.h>
-#include <vcl/sallayout.hxx>
-#include <vcl/image.h>
#include <vcl/image.hxx>
-#include <vcl/bmpfast.hxx>
+
+#include <bmpfast.hxx>
+#include <salbmp.hxx>
+#include <salgdi.hxx>
+#include <impbmp.hxx>
+#include <sallayout.hxx>
+#include <image.h>
+#include <outdev.h>
+#include <window.h>
+#include <region.h>
+#include <outdata.hxx>
#define BAND_MAX_SIZE 512000
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index f0110047db5c..f5b493b7db4f 100644..100755
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -31,49 +31,57 @@
#include "i18npool/mslangid.hxx"
-#include "svsys.h"
-#include "vcl/salgdi.hxx"
-#include "vcl/sallayout.hxx"
#include "rtl/tencinfo.h"
+#include "rtl/logfile.hxx"
+
#include "tools/debug.hxx"
-#include "vcl/svdata.hxx"
-#include "vcl/metric.hxx"
-#include "vcl/impfont.hxx"
-#include "vcl/metaact.hxx"
-#include "vcl/gdimtf.hxx"
-#include "vcl/outdata.hxx"
-#include "vcl/outfont.hxx"
+#include "tools/poly.hxx"
+
#include "basegfx/polygon/b2dpolygon.hxx"
#include "basegfx/polygon/b2dpolypolygon.hxx"
#include "basegfx/matrix/b2dhommatrix.hxx"
-#include "tools/poly.hxx"
-#include "vcl/outdev.h"
+
+#include "vcl/metric.hxx"
+#include "vcl/metaact.hxx"
+#include "vcl/gdimtf.hxx"
#include "vcl/virdev.hxx"
#include "vcl/print.hxx"
#include "vcl/event.hxx"
-#include "vcl/window.h"
#include "vcl/window.hxx"
#include "vcl/svapp.hxx"
#include "vcl/bmpacc.hxx"
-#include "unotools/fontcvt.hxx"
#include "vcl/outdev.hxx"
#include "vcl/edit.hxx"
-#include "unotools/fontcfg.hxx"
+// declare system types in sysdata.hxx
+#include <svsys.h>
#include "vcl/sysdata.hxx"
-#include "vcl/textlayout.hxx"
-#include "vcl/svids.hrc"
+#include "vcl/unohelp.hxx"
+#include "vcl/controllayout.hxx"
+
+#include "salgdi.hxx"
+#include "sallayout.hxx"
+#include "svdata.hxx"
+#include "impfont.hxx"
+#include "outdata.hxx"
+#include "outfont.hxx"
+#include "outdev.h"
+#include "textlayout.hxx"
+#include "svids.hrc"
+#include "window.h"
+
+#include "unotools/fontcvt.hxx"
+#include "unotools/fontcfg.hxx"
+
#include "osl/file.h"
+
#ifdef ENABLE_GRAPHITE
-#include "vcl/graphite_features.hxx"
+#include "graphite_features.hxx"
#endif
#ifdef USE_BUILTIN_RASTERIZER
-#include "vcl/glyphcache.hxx"
+#include "glyphcache.hxx"
#endif
-#include "vcl/unohelp.hxx"
#include "pdfwriter_impl.hxx"
-#include "vcl/controllayout.hxx"
-#include "rtl/logfile.hxx"
#include "com/sun/star/beans/PropertyValues.hpp"
#include "com/sun/star/i18n/XBreakIterator.hpp"
diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx
index 94226e863de5..f3828761bd6f 100644
--- a/vcl/source/gdi/outdev4.cxx
+++ b/vcl/source/gdi/outdev4.cxx
@@ -29,25 +29,26 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <svsys.h>
-#include <vcl/salgdi.hxx>
#include <tools/debug.hxx>
-#include <vcl/svdata.hxx>
+#include <tools/line.hxx>
+#include <tools/poly.hxx>
+
#include <vcl/gradient.hxx>
#include <vcl/metaact.hxx>
#include <vcl/gdimtf.hxx>
-#include <vcl/outdata.hxx>
-#include <tools/poly.hxx>
#include <vcl/salbtype.hxx>
-#include <tools/line.hxx>
#include <vcl/hatch.hxx>
#include <vcl/window.hxx>
#include <vcl/virdev.hxx>
#include <vcl/outdev.hxx>
#include "pdfwriter_impl.hxx"
-#include "vcl/window.h"
-#include "vcl/salframe.hxx"
+
+#include "window.h"
+#include "salframe.hxx"
+#include "salgdi.hxx"
+#include "svdata.hxx"
+#include "outdata.hxx"
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
diff --git a/vcl/source/gdi/outdev5.cxx b/vcl/source/gdi/outdev5.cxx
index 2df0ff86dc3e..fcf32aff87e6 100644
--- a/vcl/source/gdi/outdev5.cxx
+++ b/vcl/source/gdi/outdev5.cxx
@@ -30,18 +30,19 @@
#include "precompiled_vcl.hxx"
#include <tools/ref.hxx>
-#include <svsys.h>
-#include <vcl/salgdi.hxx>
#include <tools/debug.hxx>
-#include <vcl/svdata.hxx>
#include <tools/poly.hxx>
+
#include <vcl/metaact.hxx>
#include <vcl/gdimtf.hxx>
-#include <vcl/outdata.hxx>
-#include <vcl/outdev.h>
#include <vcl/outdev.hxx>
#include <vcl/virdev.hxx>
+#include <salgdi.hxx>
+#include <svdata.hxx>
+#include <outdata.hxx>
+#include <outdev.h>
+
// =======================================================================
DBG_NAMEEX( OutputDevice )
diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx
index 92898ebfdf3a..2c0861ac9494 100644
--- a/vcl/source/gdi/outdev6.cxx
+++ b/vcl/source/gdi/outdev6.cxx
@@ -29,10 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <svsys.h>
-#include <vcl/salgdi.hxx>
#include <tools/debug.hxx>
-#include <vcl/outdev.h>
#include <vcl/outdev.hxx>
#include <vcl/virdev.hxx>
#include <vcl/bmpacc.hxx>
@@ -41,16 +38,22 @@
#include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/graph.hxx>
-#include <vcl/wall2.hxx>
+#include <vcl/rendergraphicrasterizer.hxx>
+
+#include <wall2.hxx>
+#include <salgdi.hxx>
+#include <window.h>
+#include <svdata.hxx>
+#include <outdev.h>
+
#include <com/sun/star/uno/Sequence.hxx>
#include <basegfx/vector/b2dvector.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
+
#include <math.h>
-#include <vcl/window.h>
-#include <vcl/svdata.hxx>
// ========================================================================
@@ -1135,6 +1138,7 @@ void OutputDevice::Erase()
return;
sal_Bool bNativeOK = sal_False;
+
if( meOutDevType == OUTDEV_WINDOW )
{
Window* pWindow = static_cast<Window*>(this);
@@ -1185,6 +1189,8 @@ void OutputDevice::ImplDraw2ColorFrame( const Rectangle& rRect,
bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize,
const GfxLink& rGfxLink, GDIMetaFile* pSubst )
{
+ DBG_TRACE( "OutputDevice::DrawEPS()" );
+
bool bDrawn(true);
if ( mpMetaFile )
@@ -1203,7 +1209,7 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize,
if( mbOutputClipped )
return bDrawn;
- Rectangle aRect( ImplLogicToDevicePixel( Rectangle( rPoint, rSize ) ) );
+ Rectangle aRect( ImplLogicToDevicePixel( Rectangle( rPoint, rSize ) ) );
if( !aRect.IsEmpty() )
{
@@ -1238,4 +1244,24 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize,
return bDrawn;
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+// ------------------------------------------------------------------
+ const ::vcl::RenderGraphic& rRenderGraphic )
+{
+ DBG_TRACE( "OutputDevice::DrawRenderGraphic()" );
+
+ if( mpMetaFile )
+ mpMetaFile->AddAction( new MetaRenderGraphicAction( rPoint, rSize, rRenderGraphic ) );
+
+ if( !rRenderGraphic.IsEmpty() )
+ {
+ ::vcl::RenderGraphicRasterizer aRasterizer( rRenderGraphic );
+ BitmapEx aBmpEx;
+ const Size aSizePixel( LogicToPixel( rSize ) );
+ GDIMetaFile* pOldMetaFile = mpMetaFile;
+
+ mpMetaFile = NULL;
+ DrawBitmapEx( rPoint, rSize, aRasterizer.Rasterize( aSizePixel ) );
+ mpMetaFile = pOldMetaFile;
+ }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/vcl/source/gdi/outdevnative.cxx b/vcl/source/gdi/outdevnative.cxx
index 4ac1d4610b3f..2bdc4f84fb7b 100644
--- a/vcl/source/gdi/outdevnative.cxx
+++ b/vcl/source/gdi/outdevnative.cxx
@@ -31,10 +31,11 @@
#include "vcl/outdev.hxx"
#include "vcl/window.hxx"
-#include "vcl/salgdi.hxx"
#include "vcl/salnativewidgets.hxx"
#include "vcl/pdfextoutdevdata.hxx"
+#include "salgdi.hxx"
+
// -----------------------------------------------------------------------
static bool lcl_enableNativeWidget( const OutputDevice& i_rDevice )
diff --git a/vcl/source/gdi/outmap.cxx b/vcl/source/gdi/outmap.cxx
index a0b2c6521aac..dd69e74d80fb 100644
--- a/vcl/source/gdi/outmap.cxx
+++ b/vcl/source/gdi/outmap.cxx
@@ -31,23 +31,25 @@
#include <limits.h>
-#include <svsys.h>
#include <tools/bigint.hxx>
#include <tools/debug.hxx>
-#include <vcl/virdev.hxx>
-#include <vcl/svdata.hxx>
#include <tools/poly.hxx>
+
+#include <vcl/virdev.hxx>
#include <vcl/region.hxx>
-#include <vcl/region.h>
-#include <vcl/window.h>
#include <vcl/wrkwin.hxx>
#include <vcl/cursor.hxx>
#include <vcl/metaact.hxx>
#include <vcl/gdimtf.hxx>
#include <vcl/lineinfo.hxx>
#include <vcl/outdev.hxx>
-#include <vcl/outdev.h>
-#include <vcl/salgdi.hxx>
+
+#include <svdata.hxx>
+#include <region.h>
+#include <window.h>
+#include <outdev.h>
+#include <salgdi.hxx>
+
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index 2b3173c4b128..2736e321ea80 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -32,22 +32,25 @@
#include "vcl/graph.hxx"
#include "vcl/outdev.hxx"
#include "vcl/gfxlink.hxx"
+#include "vcl/dllapi.h"
#include "basegfx/polygon/b2dpolygon.hxx"
#include "basegfx/polygon/b2dpolygontools.hxx"
#include <boost/shared_ptr.hpp>
#include <set>
+#include <map>
namespace vcl
{
-struct PDFExtOutDevDataSync
+struct SAL_DLLPRIVATE PDFExtOutDevDataSync
{
enum Action{ CreateNamedDest,
CreateDest,
CreateLink,
SetLinkDest,
SetLinkURL,
+ RegisterDest,
CreateOutlineItem,
SetOutlineItemParent,
SetOutlineItemText,
@@ -74,7 +77,15 @@ struct PDFExtOutDevDataSync
Action eAct;
};
-struct GlobalSyncData
+struct SAL_DLLPRIVATE PDFLinkDestination
+{
+ Rectangle mRect;
+ MapMode mMapMode;
+ sal_Int32 mPageNr;
+ PDFWriter::DestAreaType mAreaType;
+};
+
+struct SAL_DLLPRIVATE GlobalSyncData
{
std::deque< PDFExtOutDevDataSync::Action > mActions;
std::deque< MapMode > mParaMapModes;
@@ -85,6 +96,7 @@ struct GlobalSyncData
std::deque< PDFWriter::DestAreaType > mParaDestAreaTypes;
std::deque< PDFNote > mParaPDFNotes;
std::deque< PDFWriter::PageTransition > mParaPageTransitions;
+ ::std::map< sal_Int32, PDFLinkDestination > mFutureDestinations;
sal_Int32 GetMappedId();
sal_Int32 GetMappedStructId( sal_Int32 );
@@ -146,7 +158,7 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
{
switch( *aIter )
{
- case PDFExtOutDevDataSync::CreateNamedDest : //i56629
+ case PDFExtOutDevDataSync::CreateNamedDest : //i56629
{
rWriter.Push( PUSH_MAPMODE );
rWriter.SetMapMode( mParaMapModes.front() );
@@ -198,6 +210,21 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
mParaOUStrings.pop_front();
}
break;
+ case PDFExtOutDevDataSync::RegisterDest :
+ {
+ const sal_Int32 nDestId = mParaInts.front();
+ mParaInts.pop_front();
+ OSL_ENSURE( mFutureDestinations.find( nDestId ) != mFutureDestinations.end(),
+ "GlobalSyncData::PlayGlobalActions: DescribeRegisteredRequest has not been called for that destination!" );
+
+ PDFLinkDestination& rDest = mFutureDestinations[ nDestId ];
+
+ rWriter.Push( PUSH_MAPMODE );
+ rWriter.SetMapMode( rDest.mMapMode );
+ mParaIds.push_back( rWriter.RegisterDestReference( nDestId, rDest.mRect, rDest.mPageNr, rDest.mAreaType ) );
+ rWriter.Pop();
+ }
+ break;
case PDFExtOutDevDataSync::CreateOutlineItem :
{
sal_Int32 nParent = GetMappedId();
@@ -458,6 +485,7 @@ sal_Bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIM
case PDFExtOutDevDataSync::CreateLink:
case PDFExtOutDevDataSync::SetLinkDest:
case PDFExtOutDevDataSync::SetLinkURL:
+ case PDFExtOutDevDataSync::RegisterDest:
case PDFExtOutDevDataSync::CreateOutlineItem:
case PDFExtOutDevDataSync::SetOutlineItemParent:
case PDFExtOutDevDataSync::SetOutlineItemText:
@@ -616,9 +644,28 @@ sal_Int32 PDFExtOutDevData::CreateNamedDest(const String& sDestName, const Rect
mpGlobalSyncData->mParaMapModes.push_back( mrOutDev.GetMapMode() );
mpGlobalSyncData->mParaInts.push_back( nPageNr == -1 ? mnPage : nPageNr );
mpGlobalSyncData->mParaDestAreaTypes.push_back( eType );
+
return mpGlobalSyncData->mCurId++;
}
//<---i56629
+sal_Int32 PDFExtOutDevData::RegisterDest()
+{
+ const sal_Int32 nLinkDestID = mpGlobalSyncData->mCurId++;
+ mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::RegisterDest );
+ mpGlobalSyncData->mParaInts.push_back( nLinkDestID );
+
+ return nLinkDestID;
+}
+void PDFExtOutDevData::DescribeRegisteredDest( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
+{
+ OSL_PRECOND( nDestId != -1, "PDFExtOutDevData::DescribeRegisteredDest: invalid destination Id!" );
+ PDFLinkDestination aLinkDestination;
+ aLinkDestination.mRect = rRect;
+ aLinkDestination.mMapMode = mrOutDev.GetMapMode();
+ aLinkDestination.mPageNr = nPageNr == -1 ? mnPage : nPageNr;
+ aLinkDestination.mAreaType = eType;
+ mpGlobalSyncData->mFutureDestinations[ nDestId ] = aLinkDestination;
+}
sal_Int32 PDFExtOutDevData::CreateDest( const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
{
mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateDest );
diff --git a/vcl/source/gdi/pdffontcache.cxx b/vcl/source/gdi/pdffontcache.cxx
index 2b5944377eac..61499fdc24d8 100644
--- a/vcl/source/gdi/pdffontcache.cxx
+++ b/vcl/source/gdi/pdffontcache.cxx
@@ -29,9 +29,9 @@
#include "precompiled_vcl.hxx"
#include "pdffontcache.hxx"
-#include <vcl/salgdi.hxx>
-#include <vcl/outfont.hxx>
-#include <vcl/sallayout.hxx>
+#include <salgdi.hxx>
+#include <outfont.hxx>
+#include <sallayout.hxx>
using namespace vcl;
diff --git a/vcl/source/gdi/pdffontcache.hxx b/vcl/source/gdi/pdffontcache.hxx
index 30d075d23e42..f607f100c52c 100644
--- a/vcl/source/gdi/pdffontcache.hxx
+++ b/vcl/source/gdi/pdffontcache.hxx
@@ -31,8 +31,8 @@
#include <sal/types.h>
-#include <vcl/sallayout.hxx>
-#include <vcl/salgdi.hxx>
+#include <sallayout.hxx>
+#include <salgdi.hxx>
namespace vcl
{
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 881205e0af77..244620bdafd5 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -421,6 +421,10 @@ sal_Int32 PDFWriter::CreateLink( const Rectangle& rRect, sal_Int32 nPageNr )
{
return ((PDFWriterImpl*)pImplementation)->createLink( rRect, nPageNr );
}
+sal_Int32 PDFWriter::RegisterDestReference( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType )
+{
+ return ((PDFWriterImpl*)pImplementation)->registerDestReference( nDestId, rRect, nPageNr, eType );
+}
//--->i56629
sal_Int32 PDFWriter::CreateNamedDest( const rtl::OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
{
@@ -575,4 +579,4 @@ void PDFWriter::PlayMetafile( const GDIMetaFile& i_rMTF, const vcl::PDFWriter::P
((PDFWriterImpl*)pImplementation)->playMetafile( i_rMTF, i_pData, i_rPlayContext, NULL);
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 66072a48d392..8bab1abf6d47 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -34,42 +34,53 @@
#include <algorithm>
#include <tools/urlobj.hxx>
+
#include <pdfwriter_impl.hxx>
+
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
+
+#include <osl/thread.h>
+#include <osl/file.h>
+
+#include <rtl/crc.h>
+#include <rtl/digest.h>
#include <rtl/ustrbuf.hxx>
+
#include <tools/debug.hxx>
#include <tools/zcodec.hxx>
#include <tools/stream.hxx>
+
#include <i18npool/mslangid.hxx>
+
#include <vcl/virdev.hxx>
#include <vcl/bmpacc.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/image.hxx>
-#include <vcl/outdev.h>
-#include <vcl/sallayout.hxx>
#include <vcl/metric.hxx>
-#include <vcl/fontsubset.hxx>
-#include <vcl/textlayout.hxx>
-#include <vcl/cvtgrf.hxx>
-#include <svsys.h>
-#include <vcl/salgdi.hxx>
#include <vcl/svapp.hxx>
-#include <osl/thread.h>
-#include <osl/file.h>
-#include <rtl/crc.h>
-#include <rtl/digest.h>
+#include <vcl/lineinfo.hxx>
+#include "vcl/cvtgrf.hxx"
+#include "vcl/strhelper.hxx"
+
+#include <fontsubset.hxx>
+#include <outdev.h>
+#include <sallayout.hxx>
+#include <textlayout.hxx>
+#include <salgdi.hxx>
+
+#include <icc/sRGB-IEC61966-2.1.hxx>
+
#include <comphelper/processfactory.hxx>
+
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/util/URL.hpp>
+
#include "cppuhelper/implbase1.hxx"
-#include <icc/sRGB-IEC61966-2.1.hxx>
-#include <vcl/lineinfo.hxx>
-#include "vcl/strhelper.hxx"
using namespace vcl;
@@ -5582,7 +5593,7 @@ bool PDFWriterImpl::emitWidgetAnnotations()
if(!m_bIsPDF_A1)
{
OStringBuffer aDest;
- if( rWidget.m_nDest != -1 && appendDest( rWidget.m_nDest, aDest ) )
+ if( rWidget.m_nDest != -1 && appendDest( m_aDestinationIdTranslation[ rWidget.m_nDest ], aDest ) )
{
aLine.append( "/AA<</D<</Type/Action/S/GoTo/D " );
aLine.append( aDest.makeStringAndClear() );
@@ -10819,6 +10830,11 @@ sal_Int32 PDFWriterImpl::createDest( const Rectangle& rRect, sal_Int32 nPageNr,
return nRet;
}
+sal_Int32 PDFWriterImpl::registerDestReference( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
+{
+ return m_aDestinationIdTranslation[ nDestId ] = createDest( rRect, nPageNr, eType );
+}
+
sal_Int32 PDFWriterImpl::setLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId )
{
if( nLinkId < 0 || nLinkId >= (sal_Int32)m_aLinks.size() )
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 09459e40a896..d6f87f83a006 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -38,7 +38,7 @@
#include "vcl/gradient.hxx"
#include "vcl/hatch.hxx"
#include "vcl/wall.hxx"
-#include "vcl/outdata.hxx"
+#include "outdata.hxx"
#include "rtl/strbuf.hxx"
#include "rtl/cipher.h"
#include "rtl/digest.h"
@@ -46,7 +46,7 @@
#include "com/sun/star/lang/Locale.hpp"
#include <sal/macros.h>
-#include <vcl/sallayout.hxx>
+#include <sallayout.hxx>
#include "pdffontcache.hxx"
#include <vector>
@@ -615,6 +615,9 @@ private:
dest id is always the dest's position in this vector
*/
std::vector<PDFDest> m_aDests;
+ /** contains destinations accessible via a public Id, instead of being linked to by an ordinary link
+ */
+ ::std::map< sal_Int32, sal_Int32 > m_aDestinationIdTranslation;
/* contains all links ever set during PDF creation,
link id is always the link's position in this vector
*/
@@ -1281,6 +1284,7 @@ public:
// links
sal_Int32 createLink( const Rectangle& rRect, sal_Int32 nPageNr = -1 );
sal_Int32 createDest( const Rectangle& rRect, sal_Int32 nPageNr = -1, PDFWriter::DestAreaType eType = PDFWriter::XYZ );
+ sal_Int32 registerDestReference( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr = -1, PDFWriter::DestAreaType eType = PDFWriter::XYZ );
sal_Int32 setLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId );
sal_Int32 setLinkURL( sal_Int32 nLinkId, const rtl::OUString& rURL );
void setLinkPropertyId( sal_Int32 nLinkId, sal_Int32 nPropertyId );
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 3e957d175897..eae543b1b65d 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -35,9 +35,13 @@
#include "vcl/metaact.hxx"
#include "vcl/bmpacc.hxx"
#include "vcl/graph.hxx"
-#include "vcl/svdata.hxx"
+#include "vcl/rendergraphicrasterizer.hxx"
+
+#include "svdata.hxx"
+
#include "unotools/streamwrap.hxx"
#include "unotools/processfactory.hxx"
+
#include "comphelper/processfactory.hxx"
#include "com/sun/star/beans/PropertyValue.hpp"
@@ -1044,6 +1048,17 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
+ case( META_RENDERGRAPHIC_ACTION ):
+ {
+ const MetaRenderGraphicAction* pA = static_cast< const MetaRenderGraphicAction* >( pAction );
+ const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() );
+
+ implWriteBitmapEx( pA->GetPoint(), pA->GetSize(),
+ aRasterizer.Rasterize( pDummyVDev->LogicToPixel( pA->GetSize() ) ),
+ pDummyVDev, i_rContext );
+ }
+ break;
+
default:
// #i24604# Made assertion fire only once per
// metafile. The asserted actions here are all
diff --git a/vcl/source/gdi/polyscan.cxx b/vcl/source/gdi/polyscan.cxx
deleted file mode 100644
index 81d05bf33354..000000000000
--- a/vcl/source/gdi/polyscan.cxx
+++ /dev/null
@@ -1,361 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include <string.h>
-#include <tools/new.hxx>
-#include <vcl/salbtype.hxx>
-#include "polyscan.hxx"
-#include <tools/poly.hxx>
-
-// ----------------
-// - PolyScanline -
-// ----------------
-
-PolyScanline::PolyScanline() :
- mpFirst ( NULL ),
- mpLast ( NULL ),
- mpAct ( NULL ),
- mnLeft ( 0L ),
- mnRight ( 0L )
-{
-}
-
-// ------------------------------------------------------------------------
-
-PolyScanline::~PolyScanline()
-{
- ImplDelete();
-}
-
-// ------------------------------------------------------------------------
-
-void PolyScanline::ImplDelete()
-{
- ScanlinePoint* pAct = mpFirst;
-
- while( pAct )
- {
- ScanlinePoint* pNext = pAct->mpNext;
- delete pAct;
- pAct = pNext;
- }
-
- mnLeft = mnRight = 0L;
- mpFirst = mpAct = mpLast = NULL;
-}
-
-// ------------------------------------------------------------------------
-
-void PolyScanline::Insert( long nX )
-{
- // first point to insert?
- if( !mpFirst )
- mpLast = mpFirst = new ScanlinePoint( mnLeft = mnRight = nX, NULL );
- else
- {
- // insert at the beginning of the scanline
- if( nX <= mpFirst->mnX )
- mpFirst = new ScanlinePoint( mnLeft = nX, mpFirst );
- else if( nX >= mnRight )
- mpLast = mpLast->mpNext = new ScanlinePoint( mnRight = nX, NULL );
- else
- {
- ScanlinePoint* pLast = mpFirst;
- ScanlinePoint* pAct = mpFirst->mpNext;
-
- while( pAct )
- {
- // insert in the midlle of the scanline?
- if( nX <= pAct->mnX )
- {
- pLast->mpNext = new ScanlinePoint( nX, pAct );
- break;
- }
-
- pLast = pAct;
- pAct = pAct->mpNext;
- }
- }
- }
-}
-
-// ------------------------------------------------------------------------
-
-void PolyScanline::Set( long nStart, long nEnd )
-{
- if( mpFirst )
- ImplDelete();
-
- if( nStart <= nEnd )
- mpFirst = new ScanlinePoint( mnLeft = nStart, mpLast = new ScanlinePoint( mnRight = nEnd, NULL ) );
- else
- mpFirst = new ScanlinePoint( mnLeft = nEnd, mpLast = new ScanlinePoint( mnRight = nStart, NULL ) );
-}
-
-// ------------------------------------------------------------------------
-
-sal_Bool PolyScanline::GetFirstSegment( PolyScanSegment& rSegment )
-{
- sal_Bool bRet = GetFirstX( rSegment.mnStart );
-
- if( bRet && !GetNextX( rSegment.mnEnd ) )
- rSegment.mnEnd = rSegment.mnStart;
-
- return bRet;
-}
-
-// ------------------------------------------------------------------------
-
-sal_Bool PolyScanline::GetNextSegment( PolyScanSegment& rSegment )
-{
- sal_Bool bRet = GetNextX( rSegment.mnStart );
-
- if( bRet && !GetNextX( rSegment.mnEnd ) )
- rSegment.mnEnd = rSegment.mnStart;
-
- return bRet;
-}
-
-// ---------------
-// - PolyScanner -
-// ---------------
-
-PolyScanner::PolyScanner( const Rectangle& rRect )
-{
- if( !rRect.IsEmpty() )
- {
- Rectangle aRect( rRect );
- sal_uLong nHeight;
-
- aRect.Justify();
- mnLeft = aRect.Left();
- mnTop = aRect.Top();
- mnRight = aRect.Right();
- mnBottom = aRect.Bottom();
- mpArray = new PolyScanline[ nHeight = Height() ];
-
- for( sal_uLong i = 0UL; i < nHeight; i++ )
- mpArray[ i ].Set( mnLeft, mnRight );
- }
- else
- {
- mnLeft = mnTop = mnRight = mnBottom = 0L;
- mpArray = NULL;
- }
-}
-
-// ------------------------------------------------------------------------
-
-PolyScanner::PolyScanner( const Polygon& rPoly )
-{
- const long nCount = rPoly.GetSize();
-
- if( nCount )
- {
- long nLast = nCount - 1;
- Point aFirst( rPoly[ 0 ] );
- Point aLast( rPoly[ (sal_uInt16) nLast ] );
-
- while( nLast && ( aLast == aFirst ) )
- aLast = rPoly[ (sal_uInt16) --nLast ];
-
- if( !nLast )
- {
- aLast = rPoly[ 0 ];
- mnLeft = mnRight = aLast.X();
- mnTop = mnBottom = aLast.Y();
- mpArray = new PolyScanline[ 1UL ];
- mpArray[ 0 ].Set( mnLeft, mnRight );
- }
- else
- {
- const Rectangle aRect( rPoly.GetBoundRect() );
- sal_uLong nHeight;
-
- mnLeft = aRect.Left();
- mnTop = aRect.Top();
- mnRight = aRect.Right();
- mnBottom = aRect.Bottom();
- aLast = aFirst;
- mpArray = new PolyScanline[ nHeight = Height() ];
-
- for( long i = 1L; i <= nLast; i++ )
- {
- const Point& rPt = rPoly[ (sal_uInt16) i ];
-
- if( rPt != aLast )
- {
- InsertLine( aLast, rPt );
- aLast = rPt;
- }
- }
-
- InsertLine( aLast, aFirst );
- }
- }
- else
- mpArray = NULL;
-}
-
-// ------------------------------------------------------------------------
-
-PolyScanner::PolyScanner( const PolyPolygon& rPolyPoly )
-{
- mpArray = NULL;
-}
-
-// ------------------------------------------------------------------------
-
-PolyScanner::~PolyScanner()
-{
- delete[] mpArray;
-}
-
-// ------------------------------------------------------------------------
-
-PolyScanline* PolyScanner::operator[]( sal_uLong nPos ) const
-{
- DBG_ASSERT( nPos < Count(), "nPos out of range!" );
- return( mpArray ? ( mpArray + nPos ) : NULL );
-}
-
-// ------------------------------------------------------------------------
-
-void PolyScanner::InsertLine( const Point& rStart, const Point& rEnd )
-{
- long nX, nY;
-
- if( rStart.Y() == rEnd.Y() )
- mpArray[ rStart.Y() - mnTop ].Insert( rStart.X() );
- else if( rStart.X() == rEnd.X() )
- {
- // vertical line
- const long nEndY = rEnd.Y();
-
- nX = rStart.X();
- nY = rStart.Y();
-
- if( nEndY > nY )
- while( nY < nEndY )
- mpArray[ nY++ - mnTop ].Insert( nX );
- else
- while( nY > nEndY )
- mpArray[ nY-- - mnTop ].Insert( nX );
- }
- else
- {
- const long nDX = labs( rEnd.X() - rStart.X() );
- const long nDY = labs( rEnd.Y() - rStart.Y() );
- const long nStartX = rStart.X();
- const long nStartY = rStart.Y();
- const long nEndX = rEnd.X();
- const long nEndY = rEnd.Y();
- const long nXInc = ( nStartX < nEndX ) ? 1L : -1L;
- const long nYInc = ( nStartY < nEndY ) ? 1L : -1L;
- long nLastX = nStartX;
- long nLastY = nStartY;
- sal_Bool bLast = sal_False;
-
- mpArray[ nStartY - mnTop ].Insert( nStartX );
-
- if( nDX >= nDY )
- {
- const long nDYX = ( nDY - nDX ) << 1;
- const long nDY2 = nDY << 1;
- long nD = nDY2 - nDX;
-
- for( nX = nStartX, nY = nLastY = nStartY; nX != nEndX; )
- {
- if( nY != nLastY )
- {
- if( bLast )
- mpArray[ nLastY - mnTop ].Insert( nLastX );
-
- mpArray[ nY - mnTop ].Insert( nX );
- bLast = sal_False;
- }
- else
- bLast = sal_True;
-
- nLastX = nX;
- nLastY = nY;
-
- if( nD < 0L )
- nD += nDY2;
- else
- {
- nD += nDYX;
- nY += nYInc;
- }
-
- nX += nXInc;
- }
- }
- else
- {
- const long nDYX = ( nDX - nDY ) << 1;
- const long nDY2 = nDX << 1;
- long nD = nDY2 - nDY;
-
- for( nX = nStartX, nY = nStartY; nY != nEndY; )
- {
- if( nY != nLastY )
- {
- if( bLast )
- mpArray[ nLastY - mnTop ].Insert( nLastX );
-
- mpArray[ nY - mnTop ].Insert( nX );
- bLast = sal_False;
- }
- else
- bLast = sal_True;
-
- nLastX = nX;
- nLastY = nY;
-
- if( nD < 0L )
- nD += nDY2;
- else
- {
- nD += nDYX;
- nX += nXInc;
- }
-
- nY += nYInc;
- }
- }
-
- if( bLast )
- mpArray[ nLastY - mnTop ].Insert( nLastX );
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 15964d9da09f..4c9461fbcb97 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -32,29 +32,29 @@
#define ENABLE_BYTESTRING_STREAM_OPERATORS
#include <list>
-#include <svsys.h>
-#include <vcl/salinst.hxx>
-#include <vcl/salgdi.hxx>
-#include <vcl/salptype.hxx>
-#include <vcl/salprn.hxx>
-
-#include <vcl/unohelp.hxx>
#include <tools/debug.hxx>
#include <tools/resary.hxx>
#include <tools/stream.hxx>
#include <tools/vcompat.hxx>
-#include <vcl/svdata.hxx>
+
+#include <vcl/unohelp.hxx>
#include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx>
-#include <vcl/jobset.h>
-#include <vcl/outdev.h>
#include <vcl/virdev.hxx>
#include <vcl/window.hxx>
-#include <vcl/print.h>
#include <vcl/gdimtf.hxx>
#include <vcl/metaact.hxx>
#include <vcl/print.hxx>
-#include <vcl/svids.hrc>
+
+#include <salinst.hxx>
+#include <salgdi.hxx>
+#include <salptype.hxx>
+#include <salprn.hxx>
+#include <svdata.hxx>
+#include <svids.hrc>
+#include <jobset.h>
+#include <outdev.h>
+#include <print.h>
#include <comphelper/processfactory.hxx>
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index 38c589eb12b2..5a23eb406bc3 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -34,18 +34,22 @@
#include <utility>
#include <list>
#include <vector>
+
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
+
#include <tools/debug.hxx>
+
#include <vcl/virdev.hxx>
#include <vcl/metaact.hxx>
#include <vcl/gdimtf.hxx>
-#include <vcl/print.h>
#include <vcl/salbtype.hxx>
#include <vcl/print.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/sallayout.hxx>
#include <vcl/bmpacc.hxx>
+#include <vcl/rendergraphicrasterizer.hxx>
+
+#include <print.h>
#include "pdfwriter_impl.hxx"
@@ -112,6 +116,9 @@ static bool ImplIsActionSpecial( const MetaAction& rAct )
case META_BMPEXSCALEPART_ACTION:
return static_cast<const MetaBmpExScalePartAction&>(rAct).GetBitmapEx().IsTransparent();
+ case META_RENDERGRAPHIC_ACTION:
+ return true;
+
default:
return false;
}
@@ -199,6 +206,16 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
aBmpEx = static_cast<const MetaBmpExScaleAction&>(rAct).GetBitmapEx();
break;
+ case META_RENDERGRAPHIC_ACTION:
+ {
+ const ::vcl::RenderGraphicRasterizer aRasterizer( static_cast<const MetaRenderGraphicAction&>(rAct).
+ GetRenderGraphic() );
+
+ aBmpEx = aRasterizer.Rasterize( rStateOutDev.LogicToPixel(
+ static_cast<const MetaRenderGraphicAction&>(rAct).GetSize() ) );
+ break;
+ }
+
case META_TRANSPARENT_ACTION:
default:
@@ -266,6 +283,11 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
static_cast<const MetaBmpExScalePartAction&>(rAct).GetSrcSize(),
aBmp ));
break;
+ case META_RENDERGRAPHIC_ACTION:
+ o_rMtf.AddAction( new MetaBmpScaleAction(
+ static_cast<const MetaRenderGraphicAction&>(rAct).GetPoint(),
+ static_cast<const MetaRenderGraphicAction&>(rAct).GetSize(),
+ aBmp ));
default:
OSL_FAIL("Unexpected case");
break;
@@ -378,6 +400,7 @@ static bool ImplIsNotTransparent( const MetaAction& rAct, const OutputDevice& rO
case META_TEXTRECT_ACTION:
case META_STRETCHTEXT_ACTION:
case META_TEXTLINE_ACTION:
+ case META_RENDERGRAPHIC_ACTION:
// all other actions: generate non-transparent output
bRet = true;
break;
@@ -630,7 +653,14 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
case META_TEXTLINE_ACTION:
OSL_FAIL("META_TEXTLINE_ACTION not supported");
- break;
+ break;
+
+ case( META_RENDERGRAPHIC_ACTION ):
+ {
+ const MetaRenderGraphicAction& rRenderAct = static_cast<const MetaRenderGraphicAction&>(rAct);
+ aActionBounds = Rectangle( rRenderAct.GetPoint(), rRenderAct.GetSize() );
+ }
+ break;
default:
break;
@@ -657,6 +687,7 @@ static bool ImplIsActionHandlingTransparency( const MetaAction& rAct )
case META_BMPEX_ACTION:
case META_BMPEXSCALE_ACTION:
case META_BMPEXSCALEPART_ACTION:
+ case META_RENDERGRAPHIC_ACTION:
return true;
default:
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 4fd2f1c6d6c6..0e99923ccc0f 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -29,16 +29,17 @@
#include "precompiled_vcl.hxx"
#include "vcl/print.hxx"
-#include "vcl/prndlg.hxx"
#include "vcl/svapp.hxx"
-#include "vcl/svdata.hxx"
-#include "vcl/salinst.hxx"
-#include "vcl/salprn.hxx"
-#include "vcl/svids.hrc"
#include "vcl/metaact.hxx"
#include "vcl/msgbox.hxx"
#include "vcl/configsettings.hxx"
+#include "printdlg.hxx"
+#include "svdata.hxx"
+#include "salinst.hxx"
+#include "salprn.hxx"
+#include "svids.hrc"
+
#include "tools/urlobj.hxx"
#include "com/sun/star/ui/dialogs/XFilePicker.hpp"
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index 480a17a9f88b..3992b774630d 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -30,14 +30,15 @@
#include "precompiled_vcl.hxx"
#include <limits.h>
+
#include <tools/vcompat.hxx>
-#include <vcl/salbtype.hxx>
#include <tools/stream.hxx>
#include <tools/debug.hxx>
-#include <vcl/region.h>
#include <vcl/region.hxx>
#include <vcl/regband.hxx>
+#include <region.h>
+
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
diff --git a/vcl/source/gdi/rendergraphic.cxx b/vcl/source/gdi/rendergraphic.cxx
new file mode 100644
index 000000000000..10b6064cc57c
--- /dev/null
+++ b/vcl/source/gdi/rendergraphic.cxx
@@ -0,0 +1,240 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#include <vcl/rendergraphic.hxx>
+#include <vcl/rendergraphicrasterizer.hxx>
+#include <vcl/mapmod.hxx>
+#include <tools/stream.hxx>
+#include <tools/vcompat.hxx>
+
+#include <cstring>
+#include <cstdio>
+
+namespace vcl
+{
+
+// -----------------
+// - RenderGraphic -
+// -----------------
+RenderGraphic::RenderGraphic( ) :
+ mnGraphicDataLength( 0 )
+{
+}
+
+// -------------------------------------------------------------------------
+
+RenderGraphic::RenderGraphic( const RenderGraphic& rRenderGraphic ) :
+ maGraphicData( rRenderGraphic.maGraphicData ),
+ mnGraphicDataLength( rRenderGraphic.mnGraphicDataLength ),
+ maGraphicDataMimeType( rRenderGraphic.maGraphicDataMimeType ),
+ mapPrefMapMode( rRenderGraphic.mapPrefMapMode.get() ? new MapMode( *rRenderGraphic.mapPrefMapMode ) : NULL ),
+ mapPrefSize( rRenderGraphic.mapPrefSize.get() ? new Size( *rRenderGraphic.mapPrefSize ) : NULL )
+{
+}
+
+// -------------------------------------------------------------------------
+
+RenderGraphic::RenderGraphic( const GraphicData& rGraphicData,
+ sal_uInt32 nGraphicDataLength,
+ const rtl::OUString& rGraphicDataMimeType ) :
+ maGraphicData( rGraphicData ),
+ mnGraphicDataLength( nGraphicDataLength ),
+ maGraphicDataMimeType( rGraphicDataMimeType )
+{
+ ImplCheckData( );
+}
+
+// -------------------------------------------------------------------------
+
+RenderGraphic::RenderGraphic( const rtl::OUString& rGraphicDataMimeType,
+ sal_uInt32 nGraphicDataLength,
+ const sal_uInt8* pGraphicData ) :
+ maGraphicData(),
+ mnGraphicDataLength( nGraphicDataLength ),
+ maGraphicDataMimeType( rGraphicDataMimeType )
+{
+ if( rGraphicDataMimeType.getLength( ) && nGraphicDataLength )
+ {
+ maGraphicData.reset( new sal_uInt8[ nGraphicDataLength ] );
+
+ if( pGraphicData )
+ {
+ memcpy( maGraphicData.get(), pGraphicData, nGraphicDataLength );
+ }
+ }
+ else
+ {
+ ImplCheckData( );
+ }
+}
+
+// -------------------------------------------------------------------------
+
+RenderGraphic::~RenderGraphic( )
+{
+}
+
+// -------------------------------------------------------------------------
+
+RenderGraphic& RenderGraphic::operator=(const RenderGraphic& rRenderGraphic )
+{
+ maGraphicData = rRenderGraphic.maGraphicData;
+ mnGraphicDataLength = rRenderGraphic.mnGraphicDataLength;
+ maGraphicDataMimeType = rRenderGraphic.maGraphicDataMimeType;
+ mapPrefMapMode.reset( rRenderGraphic.mapPrefMapMode.get() ? new MapMode( *rRenderGraphic.mapPrefMapMode ) : NULL );
+ mapPrefSize.reset( rRenderGraphic.mapPrefSize.get() ? new Size( *rRenderGraphic.mapPrefSize ) : NULL );
+
+ return( *this );
+}
+
+// -------------------------------------------------------------------------
+
+bool RenderGraphic::operator==(const RenderGraphic& rRenderGraphic ) const
+{
+ return( ( rRenderGraphic.mnGraphicDataLength == mnGraphicDataLength ) &&
+ ( rRenderGraphic.maGraphicData == maGraphicData ) &&
+ ( rRenderGraphic.maGraphicDataMimeType.equalsIgnoreAsciiCase( maGraphicDataMimeType ) ) );
+}
+
+// -------------------------------------------------------------------------
+
+bool RenderGraphic::operator!() const
+{
+ return( ( 0 == maGraphicDataMimeType.getLength( ) ) ||
+ ( 0 == mnGraphicDataLength ) ||
+ !maGraphicData.get( ) );
+}
+
+// -------------------------------------------------------------------------
+
+bool RenderGraphic::IsEqual( const RenderGraphic& rRenderGraphic ) const
+{
+ bool bRet = ( rRenderGraphic.mnGraphicDataLength == mnGraphicDataLength ) &&
+ ( rRenderGraphic.maGraphicDataMimeType.equalsIgnoreAsciiCase( maGraphicDataMimeType ) );
+
+ if( bRet && mnGraphicDataLength && ( rRenderGraphic.maGraphicData != maGraphicData ) )
+ {
+ bRet = ( 0 == memcmp( rRenderGraphic.maGraphicData.get( ),
+ maGraphicData.get( ),
+ mnGraphicDataLength ) );
+ }
+
+ return( bRet );
+}
+
+// -------------------------------------------------------------------------
+
+const MapMode& RenderGraphic::GetPrefMapMode() const
+{
+ ImplGetDefaults();
+ return( *mapPrefMapMode );
+}
+
+// -------------------------------------------------------------------------
+
+const Size& RenderGraphic::GetPrefSize() const
+{
+ ImplGetDefaults();
+ return( *mapPrefSize );
+}
+
+// -------------------------------------------------------------------------
+
+BitmapEx RenderGraphic::GetReplacement() const
+{
+ const RenderGraphicRasterizer aRasterizer( *this );
+
+ return( aRasterizer.GetReplacement() );
+}
+
+// -------------------------------------------------------------------------
+
+void RenderGraphic::ImplCheckData( )
+{
+ if( !( *this ) )
+ {
+ maGraphicData.reset( );
+ mnGraphicDataLength = 0;
+ maGraphicDataMimeType = ::rtl::OUString();
+ mapPrefMapMode.reset();
+ mapPrefSize.reset();
+ }
+}
+
+// -------------------------------------------------------------------------
+
+void RenderGraphic::ImplGetDefaults() const
+{
+ if( !mapPrefMapMode.get() || !mapPrefSize.get() )
+ {
+ const RenderGraphicRasterizer aRasterizer( *this );
+
+ mapPrefMapMode.reset( new MapMode( aRasterizer.GetPrefMapMode() ) );
+ mapPrefSize.reset( new Size( aRasterizer.GetPrefSize() ) );
+ }
+}
+
+// -------------------------------------------------------------------------
+
+::SvStream& operator>>( ::SvStream& rIStm, RenderGraphic& rRenderGraphic )
+{
+ ::VersionCompat aVCompat( rIStm, STREAM_READ );
+ String aGraphicDataMimeType;
+ sal_uInt32 nGraphicDataLength = 0;
+
+ rIStm.ReadByteString( aGraphicDataMimeType, RTL_TEXTENCODING_ASCII_US );
+ rIStm >> nGraphicDataLength;
+
+ rRenderGraphic = RenderGraphic( aGraphicDataMimeType, nGraphicDataLength );
+
+ if( !rRenderGraphic.IsEmpty() )
+ {
+ rIStm.Read( rRenderGraphic.GetGraphicData().get(), nGraphicDataLength );
+ }
+
+ return rIStm;
+}
+
+// ------------------------------------------------------------------
+
+::SvStream& operator<<( ::SvStream& rOStm, const RenderGraphic& rRenderGraphic )
+{
+ ::VersionCompat aVCompat( rOStm, STREAM_WRITE, 1 );
+ const sal_uInt32 nGraphicDataLength = rRenderGraphic.GetGraphicDataLength();
+
+ rOStm.WriteByteString( rRenderGraphic.GetGraphicDataMimeType(), RTL_TEXTENCODING_ASCII_US );
+ rOStm << nGraphicDataLength;
+
+ if( nGraphicDataLength )
+ {
+ rOStm.Write( rRenderGraphic.GetGraphicData().get(), nGraphicDataLength );
+ }
+
+ return rOStm;
+}
+
+} // VCL
diff --git a/vcl/source/gdi/rendergraphicrasterizer.cxx b/vcl/source/gdi/rendergraphicrasterizer.cxx
new file mode 100644
index 000000000000..29c9863335b3
--- /dev/null
+++ b/vcl/source/gdi/rendergraphicrasterizer.cxx
@@ -0,0 +1,400 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#include <vcl/rendergraphicrasterizer.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/wrkwin.hxx>
+#include <vcl/virdev.hxx>
+#include <vcl/unohelp.hxx>
+#include <vcl/bmpacc.hxx>
+#include <vcl/graph.hxx>
+#include <tools/stream.hxx>
+#include <comphelper/processfactory.hxx>
+#include <unotools/streamwrap.hxx>
+
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+
+#define VCL_SERVICENAME_RASTERIZER_SVG "com.sun.star.graphic.GraphicRasterizer_RSVG"
+
+using namespace com::sun::star;
+
+namespace vcl
+{
+// ---------------------------------------------------------
+// - maximum extent in pixel for graphics to be rasterized -
+// ---------------------------------------------------------
+
+static const sal_uInt32 nRasterizerDefaultExtent = 4096;
+
+// ---------------------------
+// - RenderGraphicRasterizer -
+// ---------------------------
+
+RenderGraphicRasterizer::RenderGraphicRasterizer( const RenderGraphic& rRenderGraphic ) :
+ maRenderGraphic( rRenderGraphic ),
+ mfRotateAngle( 0.0 ),
+ mfShearAngleX( 0.0 ),
+ mfShearAngleY( 0.0 )
+{
+}
+
+// -------------------------------------------------------------------------
+
+RenderGraphicRasterizer::RenderGraphicRasterizer( const RenderGraphicRasterizer& rRenderGraphicRasterizer ) :
+ maRenderGraphic( rRenderGraphicRasterizer.maRenderGraphic ),
+ mxRasterizer( rRenderGraphicRasterizer.mxRasterizer ),
+ maBitmapEx( rRenderGraphicRasterizer.maBitmapEx ),
+ maDefaultSizePixel( rRenderGraphicRasterizer.maDefaultSizePixel ),
+ mfRotateAngle( rRenderGraphicRasterizer.mfRotateAngle ),
+ mfShearAngleX( rRenderGraphicRasterizer.mfShearAngleX ),
+ mfShearAngleY( rRenderGraphicRasterizer.mfShearAngleY )
+{
+}
+
+// -------------------------------------------------------------------------
+
+RenderGraphicRasterizer::~RenderGraphicRasterizer()
+{
+}
+
+// -------------------------------------------------------------------------
+
+RenderGraphicRasterizer& RenderGraphicRasterizer::operator=(
+ const RenderGraphicRasterizer& rRenderGraphicRasterizer )
+{
+ maRenderGraphic = rRenderGraphicRasterizer.maRenderGraphic;
+ maBitmapEx = rRenderGraphicRasterizer.maBitmapEx;
+ maDefaultSizePixel = rRenderGraphicRasterizer.maDefaultSizePixel;
+ mfRotateAngle = rRenderGraphicRasterizer.mfRotateAngle;
+ mfShearAngleX = rRenderGraphicRasterizer.mfShearAngleX;
+ mfShearAngleY = rRenderGraphicRasterizer.mfShearAngleY;
+ mxRasterizer = rRenderGraphicRasterizer.mxRasterizer;
+
+ return( *this );
+}
+
+// -------------------------------------------------------------------------
+
+const Size& RenderGraphicRasterizer::GetDefaultSizePixel() const
+{
+ const_cast< RenderGraphicRasterizer* >( this )->InitializeRasterizer();
+
+ return( maDefaultSizePixel );
+}
+
+// -------------------------------------------------------------------------
+
+BitmapEx RenderGraphicRasterizer::GetReplacement() const
+{
+ BitmapEx aRet( Rasterize( GetDefaultSizePixel() ) );
+
+ aRet.SetPrefSize( GetPrefSize() );
+ aRet.SetPrefMapMode( GetPrefMapMode() );
+
+ return( aRet );
+}
+
+// -------------------------------------------------------------------------
+
+Size RenderGraphicRasterizer::GetPrefSize() const
+{
+ const Size aSizePixel( GetDefaultSizePixel() );
+ std::auto_ptr< VirtualDevice > apCompVDev;
+ OutputDevice* pCompDev = NULL;
+
+#ifndef NO_GETAPPWINDOW
+ pCompDev = Application::GetAppWindow();
+#endif
+
+ if( !pCompDev )
+ {
+ apCompVDev.reset( new VirtualDevice );
+ pCompDev = apCompVDev.get();
+ }
+
+ return( pCompDev->PixelToLogic( aSizePixel, GetPrefMapMode() ) );
+}
+
+// -------------------------------------------------------------------------
+
+MapMode RenderGraphicRasterizer::GetPrefMapMode() const
+{
+ return( MapMode( MAP_100TH_MM ) );
+}
+
+// -------------------------------------------------------------------------
+
+const BitmapEx& RenderGraphicRasterizer::Rasterize( const Size& rSizePixel,
+ double fRotateAngle,
+ double fShearAngleX,
+ double fShearAngleY,
+ sal_uInt32 nMaxExtent ) const
+{
+ const bool bRasterize = !maRenderGraphic.IsEmpty() &&
+ rSizePixel.Width() && rSizePixel.Height() &&
+ ( maBitmapEx.IsEmpty() ||
+ ( rSizePixel != maBitmapEx.GetSizePixel() ) ||
+ ( fRotateAngle != mfRotateAngle ) ||
+ ( fShearAngleX != mfShearAngleX ) ||
+ ( fShearAngleY != mfShearAngleY ) );
+
+ if( bRasterize )
+ {
+ const_cast< RenderGraphicRasterizer* >( this )->InitializeRasterizer();
+
+ if( mxRasterizer.is() )
+ {
+ sal_uInt32 nWidth = labs( rSizePixel.Width() );
+ sal_uInt32 nHeight = labs( rSizePixel.Height() );
+
+ // limiting the extent of the rastered bitmap
+ if( VCL_RASTERIZER_UNLIMITED_EXTENT != nMaxExtent )
+ {
+ if( VCL_RASTERIZER_DEFAULT_EXTENT == nMaxExtent )
+ {
+ nMaxExtent = nRasterizerDefaultExtent;
+ }
+
+ if( ( nWidth > nMaxExtent ) || ( nHeight > nMaxExtent ) )
+ {
+ const double fScale = static_cast< double >( nMaxExtent ) / ::std::max( nWidth, nHeight );
+
+ nWidth = FRound( nWidth * fScale );
+ nHeight = FRound( nHeight * fScale );
+ }
+ }
+
+ if( !ImplRasterizeFromCache( const_cast< RenderGraphicRasterizer& >( *this ),
+ Size( nWidth, nHeight ), fRotateAngle, fShearAngleX, fShearAngleY ) )
+ {
+ try
+ {
+ const uno::Sequence< beans::PropertyValue > aPropertySeq;
+ const Graphic aRasteredGraphic( mxRasterizer->rasterize( nWidth,
+ nHeight,
+ fRotateAngle,
+ fShearAngleX,
+ fShearAngleY,
+ aPropertySeq ) );
+
+ maBitmapEx = aRasteredGraphic.GetBitmapEx();
+ mfRotateAngle = fRotateAngle;
+ mfShearAngleX = fShearAngleX;
+ mfShearAngleY = fShearAngleY;
+
+ ImplUpdateCache( *this );
+
+// OSL_TRACE( "Wanted: %d x %d / Got: %d x %d", rSizePixel.Width(), rSizePixel.Height(), maBitmapEx.GetSizePixel().Width(), maBitmapEx.GetSizePixel().Height() );
+ }
+ catch( ... )
+ {
+ OSL_TRACE( "caught exception during rasterization" );
+ }
+ }
+ }
+ }
+
+ return( maBitmapEx );
+}
+
+// -------------------------------------------------------------------------
+
+void RenderGraphicRasterizer::InitializeRasterizer()
+{
+ if( !mxRasterizer.is() && !ImplInitializeFromCache( *this ) )
+ {
+ uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
+
+ maDefaultSizePixel.Width() = maDefaultSizePixel.Height() = 0;
+
+ if( !maRenderGraphic.IsEmpty() )
+ {
+ rtl::OUString aServiceName;
+
+ if( 0 == maRenderGraphic.GetGraphicDataMimeType().compareToAscii( "image/svg+xml" ) )
+ {
+ aServiceName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VCL_SERVICENAME_RASTERIZER_SVG ) );
+ }
+
+ if( aServiceName.getLength() )
+ {
+ mxRasterizer.set( xFactory->createInstance( aServiceName ), uno::UNO_QUERY );
+
+ if( mxRasterizer.is() )
+ {
+ std::auto_ptr< VirtualDevice > apCompVDev;
+ OutputDevice* pCompDev = NULL;
+
+#ifndef NO_GETAPPWINDOW
+ pCompDev = Application::GetAppWindow();
+#endif
+
+ if( !pCompDev )
+ {
+ apCompVDev.reset( new VirtualDevice );
+ pCompDev = apCompVDev.get();
+ }
+
+ const Size aDPI( pCompDev->LogicToPixel( Size( 1, 1 ), MAP_INCH ) );
+ awt::Size aSizePixel;
+ SvMemoryStream aMemStm( maRenderGraphic.GetGraphicData().get(),
+ maRenderGraphic.GetGraphicDataLength(),
+ STREAM_READ );
+
+ uno::Reference< io::XInputStream > xIStm( new utl::OSeekableInputStreamWrapper( aMemStm ) );
+
+ try
+ {
+ if( !xIStm.is() || !mxRasterizer->initializeData( xIStm, aDPI.Width(), aDPI.Height(), aSizePixel ) )
+ {
+ mxRasterizer.clear();
+ }
+ else
+ {
+ maDefaultSizePixel.Width() = aSizePixel.Width;
+ maDefaultSizePixel.Height() = aSizePixel.Height;
+ }
+ }
+ catch( ... )
+ {
+ OSL_TRACE( "caught exception during initialization of SVG rasterizer component" );
+ mxRasterizer.clear();
+ }
+ }
+ }
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------
+
+RenderGraphicRasterizer::RenderGraphicRasterizerCache& RenderGraphicRasterizer::ImplGetCache()
+{
+ static RenderGraphicRasterizerCache* pCache = NULL;
+
+ if( !pCache )
+ {
+ pCache = new RenderGraphicRasterizerCache;
+ }
+
+ return( *pCache );
+}
+
+// ------------------------------------------------------------------------------
+
+bool RenderGraphicRasterizer::ImplInitializeFromCache( RenderGraphicRasterizer& rRasterizer )
+{
+ RenderGraphicRasterizerCache& rCache = ImplGetCache();
+ bool bRet = false;
+
+ for( sal_uInt32 i = 0; i < rCache.size(); ++i )
+ {
+ const RenderGraphicRasterizer* pCheck = &rCache[ i ];
+
+ if( pCheck && pCheck->mxRasterizer.is() && ( pCheck->maRenderGraphic == rRasterizer.maRenderGraphic ) )
+ {
+// OSL_TRACE( "Hit RenderGraphicRasterizer cache for initialization" );
+
+ rRasterizer.mxRasterizer = pCheck->mxRasterizer;
+ rRasterizer.maDefaultSizePixel = pCheck->maDefaultSizePixel;
+
+ // put found Rasterizer at begin of deque
+ const RenderGraphicRasterizer aFound( rCache[ i ] );
+
+ rCache.erase( rCache.begin() + i );
+ rCache.push_front( aFound );
+
+
+ bRet = true;
+ }
+ }
+
+ return( bRet );
+}
+
+// ------------------------------------------------------------------------------
+
+bool RenderGraphicRasterizer::ImplRasterizeFromCache( RenderGraphicRasterizer& rRasterizer,
+ const Size& rSizePixel,
+ double fRotateAngle,
+ double fShearAngleX,
+ double fShearAngleY )
+{
+ RenderGraphicRasterizerCache& rCache = ImplGetCache();
+ bool bRet = false;
+
+ for( sal_uInt32 i = 0; i < rCache.size(); ++i )
+ {
+ const RenderGraphicRasterizer& rCheck = rCache[ i ];
+
+ if( rCheck.mxRasterizer.is() && rRasterizer.mxRasterizer.is() &&
+ ( ( rCheck.mxRasterizer == rRasterizer.mxRasterizer ) ||
+ ( rRasterizer.maRenderGraphic == rCheck.maRenderGraphic ) ) &&
+ ( rCheck.maBitmapEx.GetSizePixel() == rSizePixel ) &&
+ ( rCheck.mfRotateAngle == fRotateAngle ) &&
+ ( rCheck.mfShearAngleX == fShearAngleX ) &&
+ ( rCheck.mfShearAngleY == fShearAngleY ) )
+ {
+// OSL_TRACE( "Hit RenderGraphicRasterizer cache for rasterizing" );
+
+ rRasterizer.maBitmapEx = rCheck.maBitmapEx;
+ rRasterizer.mfRotateAngle = fRotateAngle;
+ rRasterizer.mfShearAngleX = fShearAngleX;
+ rRasterizer.mfShearAngleY = fShearAngleY;
+
+ // put found Rasterizer at begin of deque
+ const RenderGraphicRasterizer aFound( rCache[ i ] );
+
+ rCache.erase( rCache.begin() + i );
+ rCache.push_front( aFound );
+
+ bRet = true;
+ }
+ }
+
+ return( bRet );
+}
+
+// ------------------------------------------------------------------------------
+
+void RenderGraphicRasterizer::ImplUpdateCache( const RenderGraphicRasterizer& rRasterizer )
+{
+ RenderGraphicRasterizerCache& rCache = ImplGetCache();
+ const sal_uInt32 nMaxCacheSize = 8;
+
+ if( rCache.size() < nMaxCacheSize )
+ {
+ rCache.push_front( rRasterizer );
+ }
+ else
+ {
+ rCache.pop_back();
+ rCache.push_front( rRasterizer );
+ }
+}
+
+} // VCL
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 9fa4d813b2b7..bf0f7523a453 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -30,28 +30,31 @@
#include "precompiled_vcl.hxx"
#include <tools/ref.hxx>
-#include <svsys.h>
-#include <vcl/salgdi.hxx>
-#include <vcl/salframe.hxx>
-#include <vcl/salvd.hxx>
-#include <vcl/salprn.hxx>
#include <tools/debug.hxx>
-#include <vcl/svdata.hxx>
-#include <vcl/svapp.hxx>
#include <tools/poly.hxx>
+
+#include <vcl/svapp.hxx>
#include <vcl/region.hxx>
-#include <vcl/region.h>
#include <vcl/virdev.hxx>
-#include <vcl/window.h>
#include <vcl/window.hxx>
#include <vcl/metaact.hxx>
#include <vcl/gdimtf.hxx>
-#include <vcl/outdata.hxx>
#include <vcl/print.hxx>
-#include <vcl/outdev.h>
#include <vcl/outdev.hxx>
#include <vcl/unowrap.hxx>
-#include <vcl/sallayout.hxx>
+
+#include <window.h>
+#include <region.h>
+#include <outdev.h>
+#include <sallayout.hxx>
+#include <salgdi.hxx>
+#include <salframe.hxx>
+#include <salvd.hxx>
+#include <salprn.hxx>
+#include <svdata.hxx>
+#include <outdata.hxx>
+
+
#include "basegfx/polygon/b2dpolygon.hxx"
// ----------------------------------------------------------------------------
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 970b0ff3cd0b..9679170df9b9 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -35,12 +35,12 @@
#include <math.h>
#include <sal/alloca.h>
-#include <svsys.h>
-#include <vcl/salgdi.hxx>
-#include <vcl/sallayout.hxx>
+#include <salgdi.hxx>
+#include <sallayout.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
+
#include <i18npool/lang.h>
#include <tools/debug.hxx>
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 3a9bd669f54f..d2b794af02d6 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -31,7 +31,7 @@
#include <rtl/memory.h>
#include <vcl/bmpacc.hxx>
#include <vcl/salbtype.hxx>
-#include <vcl/bmpfast.hxx>
+#include <bmpfast.hxx>
// -----------
// - Defines -
diff --git a/vcl/source/gdi/salnativewidgets-none.cxx b/vcl/source/gdi/salnativewidgets-none.cxx
index cc204069c2c4..8f50802c9431 100644
--- a/vcl/source/gdi/salnativewidgets-none.cxx
+++ b/vcl/source/gdi/salnativewidgets-none.cxx
@@ -29,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <vcl/salgdi.hxx>
+#include <salgdi.hxx>
using ::rtl::OUString;
diff --git a/vcl/source/gdi/svcompat.cxx b/vcl/source/gdi/svcompat.cxx
deleted file mode 100644
index c594dd1f93d7..000000000000
--- a/vcl/source/gdi/svcompat.cxx
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-#include <tools/stream.hxx>
-#include <svcompat.hxx>
-
-// --------------
-// - ImplCompat -
-// --------------
-
-ImplCompat::ImplCompat( SvStream& rStm, sal_uInt16 nStreamMode, sal_uInt16 nVersion ) :
- mpRWStm ( &rStm ),
- mnStmMode ( nStreamMode ),
- mnVersion ( nVersion )
-{
- if( !mpRWStm->GetError() )
- {
- if( STREAM_WRITE == mnStmMode )
- {
- *mpRWStm << mnVersion;
- mnTotalSize = ( mnCompatPos = mpRWStm->Tell() ) + 4UL;
- mpRWStm->SeekRel( 4L );
- }
- else
- {
- *mpRWStm >> mnVersion;
- *mpRWStm >> mnTotalSize;
- mnCompatPos = mpRWStm->Tell();
- }
- }
-}
-
-// ------------------------------------------------------------------------
-
-ImplCompat::~ImplCompat()
-{
- if( STREAM_WRITE == mnStmMode )
- {
- const sal_uInt32 nEndPos = mpRWStm->Tell();
-
- mpRWStm->Seek( mnCompatPos );
- *mpRWStm << ( nEndPos - mnTotalSize );
- mpRWStm->Seek( nEndPos );
- }
- else
- {
- const sal_uInt32 nReadSize = mpRWStm->Tell() - mnCompatPos;
-
- if( mnTotalSize > nReadSize )
- mpRWStm->SeekRel( mnTotalSize - nReadSize );
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/svgread.cxx b/vcl/source/gdi/svgread.cxx
new file mode 100644
index 000000000000..47ef39c37f20
--- /dev/null
+++ b/vcl/source/gdi/svgread.cxx
@@ -0,0 +1,131 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include <tools/stream.hxx>
+#include <vcl/svgread.hxx>
+#include <vcl/gdimtf.hxx>
+#include <vcl/metaact.hxx>
+#include <vcl/rendergraphicrasterizer.hxx>
+
+// -----------
+// - Defines -
+// -----------
+
+namespace vcl
+{
+ // -----------------
+ // - SVGReaderImpl -
+ // -----------------
+
+ class SVGReaderImpl
+ {
+ public:
+
+ SVGReaderImpl( SvStream& rStm );
+ ~SVGReaderImpl();
+
+ GDIMetaFile& ImplRead( GDIMetaFile& rSVGMtf );
+
+ private:
+
+ SvStream& mrStm;
+ };
+
+ // ------------------------------------------------------------------------------
+
+ SVGReaderImpl::SVGReaderImpl( SvStream& rStm ) :
+ mrStm( rStm )
+ {
+ }
+
+ // ------------------------------------------------------------------------
+
+ SVGReaderImpl::~SVGReaderImpl()
+ {
+ }
+
+ // ------------------------------------------------------------------------
+
+ GDIMetaFile& SVGReaderImpl::ImplRead( GDIMetaFile& rSVGMtf )
+ {
+ const sal_uInt32 nStmPos = mrStm.Tell();
+ const sal_uInt32 nStmLen = mrStm.Seek( STREAM_SEEK_TO_END ) - nStmPos;
+
+ if( nStmLen )
+ {
+ const vcl::RenderGraphic aSVGGraphic( ::rtl::OUString::createFromAscii( "image/svg+xml" ), nStmLen );
+
+ mrStm.Seek( nStmPos );
+ mrStm.Read( aSVGGraphic.GetGraphicData().get(), nStmLen );
+
+ if( !mrStm.GetError() )
+ {
+ const vcl::RenderGraphicRasterizer aRasterizer( aSVGGraphic );
+ const Size aDefaultSizePixel( aRasterizer.GetDefaultSizePixel() );
+
+ if( aDefaultSizePixel.Width() && aDefaultSizePixel.Height() )
+ {
+ const Point aPos;
+ const Size aPrefSize( aRasterizer.GetPrefSize() );
+
+ rSVGMtf.SetPrefMapMode( aRasterizer.GetPrefMapMode() );
+ rSVGMtf.SetPrefSize( aPrefSize );
+ rSVGMtf.AddAction( new MetaRenderGraphicAction( aPos, aPrefSize, aSVGGraphic ) );
+ rSVGMtf.WindStart();
+ }
+ }
+ }
+
+ return( rSVGMtf );
+ }
+
+ // -------------
+ // - SVGReader -
+ // -------------
+
+ SVGReader::SVGReader( SvStream& rIStm ) :
+ mapImpl( new ::vcl::SVGReaderImpl( rIStm ) )
+ {
+ }
+
+ // ------------------------------------------------------------------------
+
+ SVGReader::~SVGReader()
+ {
+ }
+
+ // ------------------------------------------------------------------------
+
+ GDIMetaFile& SVGReader::Read( GDIMetaFile& rSVGMtf )
+ {
+ rSVGMtf = GDIMetaFile();
+
+ return( mapImpl.get() ? mapImpl->ImplRead( rSVGMtf ) : rSVGMtf );
+ }
+
+} // namespace vcl
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index 1afa8840fcf3..e1a2667a8f58 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -31,8 +31,9 @@
#include "vcl/ctrl.hxx"
#include "vcl/outdev.hxx"
-#include "vcl/outfont.hxx"
-#include "vcl/textlayout.hxx"
+
+#include "outfont.hxx"
+#include "textlayout.hxx"
#include <com/sun/star/i18n/ScriptDirection.hpp>
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index 981fc38b7375..5e693d23abf5 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -29,19 +29,20 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <svsys.h>
-#include <vcl/salinst.hxx>
-#include <vcl/salgdi.hxx>
-#include <vcl/salframe.hxx>
-#include <vcl/salvd.hxx>
#include <tools/debug.hxx>
-#include <vcl/svdata.hxx>
+
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx>
-#include <vcl/outdev.h>
#include <vcl/virdev.hxx>
+#include <salinst.hxx>
+#include <salgdi.hxx>
+#include <salframe.hxx>
+#include <salvd.hxx>
+#include <outdev.h>
+#include <svdata.hxx>
+
using namespace ::com::sun::star::uno;
// =======================================================================
diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx
index 600f78941cbe..a24d3b0cbd66 100644
--- a/vcl/source/gdi/wall.cxx
+++ b/vcl/source/gdi/wall.cxx
@@ -28,17 +28,20 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+
#include <tools/stream.hxx>
#include <tools/vcompat.hxx>
#include <tools/debug.hxx>
+
#include <vcl/bitmapex.hxx>
#include <vcl/gradient.hxx>
#include <vcl/wall.hxx>
-#include <vcl/wall2.hxx>
#include <vcl/svapp.hxx>
+#include <wall2.hxx>
+
-DBG_NAME( Wallpaper );
+DBG_NAME( Wallpaper )
// -----------------------------------------------------------------------
diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx
index 82fa925097ee..c2b84a8e94a7 100644
--- a/vcl/source/glyphs/gcach_ftyp.cxx
+++ b/vcl/source/glyphs/gcach_ftyp.cxx
@@ -37,8 +37,10 @@
#include "gcach_ftyp.hxx"
#include "vcl/svapp.hxx"
-#include "vcl/outfont.hxx"
-#include "vcl/impfont.hxx"
+
+#include "outfont.hxx"
+#include "impfont.hxx"
+
#ifdef ENABLE_GRAPHITE
#include <graphite2/Font.h>
#include "vcl/graphite_layout.hxx"
@@ -46,7 +48,7 @@
#include "tools/poly.hxx"
#include "basegfx/matrix/b2dhommatrix.hxx"
-#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include "basegfx/matrix/b2dhommatrixtools.hxx"
#include "basegfx/polygon/b2dpolypolygon.hxx"
#include "osl/file.hxx"
diff --git a/vcl/source/glyphs/gcach_ftyp.hxx b/vcl/source/glyphs/gcach_ftyp.hxx
index 6b461fe59143..9cbe49cd495e 100644
--- a/vcl/source/glyphs/gcach_ftyp.hxx
+++ b/vcl/source/glyphs/gcach_ftyp.hxx
@@ -29,7 +29,7 @@
#ifndef _SV_GCACHFTYP_HXX
#define _SV_GCACHFTYP_HXX
-#include <vcl/glyphcache.hxx>
+#include <glyphcache.hxx>
#include <rtl/textcvt.h>
#include <ft2build.h>
diff --git a/vcl/source/glyphs/gcach_layout.cxx b/vcl/source/glyphs/gcach_layout.cxx
index 63a332869664..e5624b2910c1 100644
--- a/vcl/source/glyphs/gcach_layout.cxx
+++ b/vcl/source/glyphs/gcach_layout.cxx
@@ -31,8 +31,8 @@
#define ENABLE_ICU_LAYOUT
#include <gcach_ftyp.hxx>
-#include <vcl/sallayout.hxx>
-#include <vcl/salgdi.hxx>
+#include <sallayout.hxx>
+#include <salgdi.hxx>
#include <vcl/svapp.hxx>
diff --git a/vcl/source/glyphs/gcach_rbmp.cxx b/vcl/source/glyphs/gcach_rbmp.cxx
index 161e4c6314e7..71784f5dd083 100644
--- a/vcl/source/glyphs/gcach_rbmp.cxx
+++ b/vcl/source/glyphs/gcach_rbmp.cxx
@@ -29,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <vcl/glyphcache.hxx>
+#include <glyphcache.hxx>
#include <string.h>
//------------------------------------------------------------------------
diff --git a/vcl/source/glyphs/gcach_vdev.cxx b/vcl/source/glyphs/gcach_vdev.cxx
deleted file mode 100644
index 944d9aee16a3..000000000000
--- a/vcl/source/glyphs/gcach_vdev.cxx
+++ /dev/null
@@ -1,290 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include <gcach_vdev.hxx>
-
-#include <vcl/svapp.hxx>
-#include <vcl/bitmap.hxx>
-#include <vcl/outfont.hxx>
-#include <vcl/virdev.hxx>
-#include <vcl/metric.hxx>
-
-// =======================================================================
-// VirtDevServerFont
-// =======================================================================
-
-// -----------------------------------------------------------------------
-
-void VirtDevServerFont::AnnounceFonts( ImplDevFontList* pToAdd )
-{
- // TODO: get fonts on server but not on client,
- // problem is that currently there is no serverside virtual device...
- VirtualDevice vdev( 1 );
- long nCount = vdev.GetDevFontCount();
-
- for( int i = 0; i < nCount; ++i )
- {
- const FontInfo aFontInfo = vdev.GetDevFont( i );
-
- ImplFontData& rData = *new ImplFontData;
- rData.SetSysData( new FontSysData( (void*)SERVERFONT_MAGIC ) );
-
- rData.maName = aFontInfo.GetName();
- rData.maStyleName = aFontInfo.GetStyleName();
- rData.mnWidth = aFontInfo.GetWidth();
- rData.mnHeight = aFontInfo.GetHeight();
- rData.meFamily = aFontInfo.GetFamily();
- rData.meCharSet = aFontInfo.GetCharSet();
- rData.mePitch = aFontInfo.GetPitch();
- rData.meWidthType = aFontInfo.GetWidthType();
- rData.meWeight = aFontInfo.GetWeight();
- rData.meItalic = aFontInfo.GetItalic();
- rData.meType = aFontInfo.GetType();
- rData.meFamily = aFontInfo.GetFamily();
-
- rData.mbOrientation = true; // TODO: where to get this info?
- rData.mbDevice = false;
- rData.mnQuality = 0; // prefer client-side fonts if available
-
- pToAdd->Add( &rData );
- }
-}
-
-// -----------------------------------------------------------------------
-
-void VirtDevServerFont::ClearFontList()
-{
- // TODO
-}
-
-// -----------------------------------------------------------------------
-
-VirtDevServerFont* VirtDevServerFont::CreateFont( const ImplFontSelectData& rFSD )
-{
- VirtDevServerFont* pServerFont = NULL;
- // TODO: search list of VirtDevServerFonts, return NULL if not found
- // pServerFont = new VirtDevServerFont( rFSD );
- return pServerFont;
-}
-
-// -----------------------------------------------------------------------
-
-VirtDevServerFont::VirtDevServerFont( const ImplFontSelectData& rFSD )
-: ServerFont( rFSD)
-{}
-
-// -----------------------------------------------------------------------
-
-void VirtDevServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor ) const
-{
- const ImplFontSelectData& aFSD = GetFontSelData();
-
- Font aFont;
- aFont.SetName ( aFSD.maName );
- aFont.SetStyleName ( aFSD.maStyleName );
- aFont.SetHeight ( aFSD.mnHeight );
- aFont.SetWidth ( aFSD.mnWidth );
- aFont.SetOrientation( aFSD.mnOrientation );
- aFont.SetVertical ( GetFontSelData().mbVertical );
-
- VirtualDevice vdev( 1 );
- FontMetric aMetric( vdev.GetFontMetric( aFont ) );
-
- rFactor = 0x100;
-
- rTo.mnAscent = aMetric.GetAscent();
- rTo.mnDescent = aMetric.GetDescent();
- rTo.mnIntLeading = aMetric.GetIntLeading();
- rTo.mnExtLeading = aMetric.GetExtLeading();
- rTo.mnSlant = aMetric.GetSlant();
- rTo.meType = aMetric.GetType();
- rTo.mnFirstChar = 0x0020; // TODO: where to get this info?
- rTo.mnLastChar = 0xFFFE; // TODO: where to get this info?
-
- rTo.mnWidth = aFSD.mnWidth;
- rTo.maName = aFSD.maName;
- rTo.maStyleName = aFSD.maStyleName;
- rTo.mnOrientation = aFSD.mnOrientation;
- rTo.meFamily = aFSD.meFamily;
- rTo.meCharSet = aFSD.meCharSet;
- rTo.meWeight = aFSD.meWeight;
- rTo.meItalic = aFSD.meItalic;
- rTo.mePitch = aFSD.mePitch;
- rTo.mbDevice = sal_False;
-}
-
-// -----------------------------------------------------------------------
-
-int VirtDevServerFont::GetGlyphIndex( sal_Unicode aChar ) const
-{
- return aChar;
-}
-
-// -----------------------------------------------------------------------
-
-void VirtDevServerFont::InitGlyphData( int nGlyphIndex, GlyphData& rGD ) const
-{
- Font aFont;
- aFont.SetName ( GetFontSelData().maName );
- aFont.SetStyleName ( GetFontSelData().maStyleName );
- aFont.SetHeight ( GetFontSelData().mnHeight );
- aFont.SetWidth ( GetFontSelData().mnWidth );
- aFont.SetOrientation( GetFontSelData().mnOrientation );
- aFont.SetVertical ( GetFontSelData().mbVertical );
-
- VirtualDevice vdev( 1 );
- vdev.SetFont( aFont );
-
- // get glyph metrics
- sal_Int32 nCharWidth = 10;
-// TODO: vdev.GetCharWidth( nGlyphIndex, nGlyphIndex, &nCharWidth );
- rGD.SetCharWidth( nCharWidth );
-
- sal_Unicode aChar = nGlyphIndex;
- String aGlyphStr( &aChar, 1 );
- Rectangle aRect;
- if( vdev.GetTextBoundRect( aRect, aGlyphStr, 0, 1 ) )
- {
- rGD.SetOffset( aRect.Top(), aRect.Left() );
- rGD.SetDelta( vdev.GetTextWidth( nGlyphIndex ), 0 );
- rGD.SetSize( aRect.GetSize() );
- }
-}
-
-// -----------------------------------------------------------------------
-
-bool VirtDevServerFont::GetAntialiasAdvice( void ) const
-{
- return false;
-}
-
-// -----------------------------------------------------------------------
-
-bool VirtDevServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const
-{
- /*
- sal_Unicode aChar = nGlyphIndex;
- String aGlyphStr( &aChar, 1 );
-
- // draw bitmap
- vdev.SetOutputSizePixel( aSize, sal_True );
- vdev.DrawText( Point(0,0)-rGD.GetMetric().GetOffset(), aGlyphStr );
-
- // create new glyph item
-
- const Bitmap& rBitmap = vdev.GetBitmap( Point(0,0), aSize );
- rGD.SetBitmap( new Bitmap( rBitmap ) );
- return true;
- */
- return false;
-}
-
-// -----------------------------------------------------------------------
-
-bool VirtDevServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const
-{
- return false;
-}
-
-// -----------------------------------------------------------------------
-
-int VirtDevServerFont::GetGlyphKernValue( int, int ) const
-{
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
-sal_uLong VirtDevServerFont::GetKernPairs( ImplKernPairData** ppImplKernPairs ) const
-{
- Font aFont;
- aFont.SetName ( GetFontSelData().maName );
- aFont.SetStyleName ( GetFontSelData().maStyleName );
- aFont.SetHeight ( GetFontSelData().mnHeight );
- aFont.SetWidth ( GetFontSelData().mnWidth );
- aFont.SetOrientation( GetFontSelData().mnOrientation );
- aFont.SetVertical ( GetFontSelData().mbVertical );
-
- VirtualDevice vdev( 1 );
- vdev.SetFont( aFont );
-
- sal_uLong nPairs = vdev.GetKerningPairCount();
- if( nPairs > 0 )
- {
- KerningPair* const pKernPairs = new KerningPair[ nPairs ];
- vdev.GetKerningPairs( nPairs, pKernPairs );
-
- *ppImplKernPairs = new ImplKernPairData[ nPairs ];
- ImplKernPairData* pTo = *ppImplKernPairs;
- KerningPair* pFrom = pKernPairs;
- for ( sal_uLong n = 0; n < nPairs; n++ )
- {
- pTo->mnChar1 = pFrom->nChar1;
- pTo->mnChar2 = pFrom->nChar2;
- pTo->mnKern = pFrom->nKern;
- ++pFrom;
- ++pTo;
- }
-
- delete[] pKernPairs;
- }
-
- return nPairs;
-}
-
-// -----------------------------------------------------------------------
-
-bool VirtDevServerFont::GetGlyphOutline( int nGlyphIndex, PolyPolygon& rPolyPoly ) const
-{
- return false;
- /*
- Font aFont;
- aFont.SetName ( GetFontSelData().maName );
- aFont.SetStyleName ( GetFontSelData().maStyleName );
- aFont.SetHeight ( GetFontSelData().mnHeight );
- aFont.SetWidth ( GetFontSelData().mnWidth );
- aFont.SetOrientation( GetFontSelData().mnOrientation );
- aFont.SetVertical ( GetFontSelData().mbVertical );
-
- VirtualDevice vdev( 1 );
- vdev.SetFont( aFont );
-
- const bool bOptimize = true;
-
- sal_Unicode aChar = nGlyphIndex;
- String aGlyphStr( &aChar, 1 );
- return vdev.GetTextOutline( rPolyPoly, aGlyphStr, 0, 1, bOptimize );
- */
-}
-
-// =======================================================================
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/glyphs/gcach_vdev.hxx b/vcl/source/glyphs/gcach_vdev.hxx
deleted file mode 100644
index 61cd02b1f9cc..000000000000
--- a/vcl/source/glyphs/gcach_vdev.hxx
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#include <vcl/glyphcache.hxx>
-
-// -----------------------------------------------------------------------
-
-class VirtDevServerFont : public ServerFont
-{
-public:
- virtual bool GetAntialiasAdvice( void ) const;
- virtual bool GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const;
- virtual bool GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const;
- virtual bool GetGlyphOutline( int nGlyphIndex, PolyPolygon& ) const;
-
-protected:
- friend class GlyphCache;
- static void AnnounceFonts( ImplDevFontList* );
- static void ClearFontList();
-
- static VirtDevServerFont* CreateFont( const ImplFontSelectData& );
- virtual void FetchFontMetric( ImplFontMetricData&, long& rFactor ) const;
- virtual sal_uLong GetKernPairs( ImplKernPairData** ) const;
- virtual int GetGlyphKernValue( int, int ) const;
-
- virtual int GetGlyphIndex( sal_Unicode ) const;
- virtual void InitGlyphData( int nGlyphIndex, GlyphData& ) const;
-
-private:
- VirtDevServerFont( const ImplFontSelectData& );
-};
-
-// -----------------------------------------------------------------------
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/glyphs/glyphcache.cxx b/vcl/source/glyphs/glyphcache.cxx
index ab56853dcf65..54e946dc3831 100644
--- a/vcl/source/glyphs/glyphcache.cxx
+++ b/vcl/source/glyphs/glyphcache.cxx
@@ -32,15 +32,17 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#include <vcl/salbtype.hxx>
+
#include <gcach_ftyp.hxx>
#include <vcl/svapp.hxx>
#include <vcl/bitmap.hxx>
-#include <vcl/outfont.hxx>
+#include <vcl/salbtype.hxx>
+
+#include <outfont.hxx>
#ifdef ENABLE_GRAPHITE
-#include <vcl/graphite_features.hxx>
+#include <graphite_features.hxx>
#endif
#include <rtl/ustring.hxx> // used only for string=>hashvalue
diff --git a/vcl/source/glyphs/graphite_features.cxx b/vcl/source/glyphs/graphite_features.cxx
index 175656e25515..1db4a50564bd 100644
--- a/vcl/source/glyphs/graphite_features.cxx
+++ b/vcl/source/glyphs/graphite_features.cxx
@@ -40,7 +40,7 @@
#include <windows.h>
#endif
-#include <vcl/graphite_features.hxx>
+#include <graphite_features.hxx>
using namespace grutils;
// These mustn't conflict with font name lists which use ; and ,
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index ab5b59025724..b43a57b93392 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -54,8 +54,9 @@
// Platform
#include <svsys.h>
+#include <graphite_adaptors.hxx>
-#include <vcl/salgdi.hxx>
+#include <salgdi.hxx>
#include <unicode/uchar.h>
#include <unicode/ubidi.h>
diff --git a/vcl/source/glyphs/graphite_serverfont.cxx b/vcl/source/glyphs/graphite_serverfont.cxx
index ec1388d9bb29..4ce0ebcc3f31 100644
--- a/vcl/source/glyphs/graphite_serverfont.cxx
+++ b/vcl/source/glyphs/graphite_serverfont.cxx
@@ -37,13 +37,12 @@
// Platform
#include <i18npool/mslangid.hxx>
-#include <vcl/sallayout.hxx>
// Module
#include "gcach_ftyp.hxx"
#include <vcl/glyphcache.hxx>
-#include <vcl/graphite_features.hxx>
+#include <graphite_features.hxx>
//#include "graphite_textsrc.hxx"
-#include <vcl/graphite_serverfont.hxx>
+#include <graphite_serverfont.hxx>
#ifndef WNT
diff --git a/vcl/source/glyphs/graphite_textsrc.cxx b/vcl/source/glyphs/graphite_textsrc.cxx
index 33508ae34712..0758c10564c6 100644
--- a/vcl/source/glyphs/graphite_textsrc.cxx
+++ b/vcl/source/glyphs/graphite_textsrc.cxx
@@ -38,7 +38,7 @@
#include <string>
#include <cassert>
#include "graphite_textsrc.hxx"
-#include <vcl/graphite_features.hxx>
+#include <graphite_features.hxx>
// class TextSourceAdaptor implementation.
//
diff --git a/vcl/source/glyphs/graphite_textsrc.hxx b/vcl/source/glyphs/graphite_textsrc.hxx
index b5251cff2922..f40f6052725d 100644
--- a/vcl/source/glyphs/graphite_textsrc.hxx
+++ b/vcl/source/glyphs/graphite_textsrc.hxx
@@ -44,9 +44,6 @@
#include <windows.h>
#endif
-#include <vcl/salgdi.hxx>
-
-#include <vcl/sallayout.hxx>
// Module
#include "vcl/dllapi.h"
diff --git a/vcl/source/glyphs/makefile.mk b/vcl/source/glyphs/makefile.mk
deleted file mode 100644
index cbc9a38b4f9e..000000000000
--- a/vcl/source/glyphs/makefile.mk
+++ /dev/null
@@ -1,80 +0,0 @@
-#*************************************************************************
-#
-# 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.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=vcl
-TARGET=glyphs
-
-ENABLE_EXCEPTIONS=true
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile2.pmk
-
-CFLAGS+= $(FREETYPE_CFLAGS)
-
-# --- Files --------------------------------------------------------
-
-.IF "$(USE_BUILTIN_RASTERIZER)" != ""
-# GlyphCache + FreeType support (only on UNX platforms currently)
-SLOFILES=\
- $(SLO)$/glyphcache.obj \
- $(SLO)$/gcach_rbmp.obj \
- $(SLO)$/gcach_layout.obj \
- $(SLO)$/gcach_ftyp.obj
-
-.IF "$(ENABLE_GRAPHITE)" != ""
-# Graphite support using the glyphcache infrastructure
-CFLAGS+=-DENABLE_GRAPHITE
-SLOFILES+=\
- $(SLO)$/graphite_features.obj \
- $(SLO)$/graphite_serverfont.obj \
- $(SLO)$/graphite_layout.obj
-
-.ENDIF
-
-.ELSE
-
-.IF "$(ENABLE_GRAPHITE)" == "TRUE"
-# Graphite support on non-UNX platforms
-SLOFILES=\
- $(SLO)$/graphite_features.obj \
- $(SLO)$/graphite_layout.obj
-
-.IF "$(SYSTEM_GRAPHITE)" != "YES"
-CDEFS+=-DGR2_STATIC
-.ENDIF
-
-.ENDIF
-.ENDIF
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx
index 3138c55b2bb5..d86a0a07bedf 100644
--- a/vcl/source/helper/canvasbitmap.cxx
+++ b/vcl/source/helper/canvasbitmap.cxx
@@ -38,7 +38,7 @@
#include <osl/mutex.hxx>
#include <tools/diagnose_ex.h>
-#include <vcl/canvasbitmap.hxx>
+#include <canvasbitmap.hxx>
#include <vcl/canvastools.hxx>
#include <vcl/bmpacc.hxx>
#include <vcl/svapp.hxx>
diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx
index 3bf73ca7588d..930be4d27931 100644
--- a/vcl/source/helper/canvastools.cxx
+++ b/vcl/source/helper/canvastools.cxx
@@ -70,7 +70,7 @@
#include <vcl/bmpacc.hxx>
#include <vcl/bitmapex.hxx>
-#include <vcl/canvasbitmap.hxx>
+#include <canvasbitmap.hxx>
#include <vcl/canvastools.hxx>
#include <boost/unordered_map.hpp>
diff --git a/vcl/source/helper/lazydelete.cxx b/vcl/source/helper/lazydelete.cxx
index 9173474af759..3fa046bc076c 100644
--- a/vcl/source/helper/lazydelete.cxx
+++ b/vcl/source/helper/lazydelete.cxx
@@ -34,7 +34,7 @@
#include "vcl/window.hxx"
#include "vcl/menu.hxx"
#include "vcl/lazydelete.hxx"
-#include "vcl/svdata.hxx"
+#include "svdata.hxx"
namespace vcl {
diff --git a/vcl/source/helper/makefile.mk b/vcl/source/helper/makefile.mk
deleted file mode 100644
index 1a417417dbe4..000000000000
--- a/vcl/source/helper/makefile.mk
+++ /dev/null
@@ -1,55 +0,0 @@
-#*************************************************************************
-#
-# 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.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-ENABLE_EXCEPTIONS=TRUE
-PRJNAME=vcl
-TARGET=helper
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile2.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES=\
- $(SLO)$/strhelper.obj \
- $(SLO)$/evntpost.obj \
- $(SLO)$/canvasbitmap.obj \
- $(SLO)$/canvastools.obj \
- $(SLO)$/xconnection.obj \
- $(SLO)$/threadex.obj \
- $(SLO)$/lazydelete.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.INCLUDE : $(PRJ)$/util$/target.pmk
diff --git a/vcl/source/helper/xconnection.cxx b/vcl/source/helper/xconnection.cxx
index d6aa0429bcf3..5250cc067b25 100644
--- a/vcl/source/helper/xconnection.cxx
+++ b/vcl/source/helper/xconnection.cxx
@@ -29,13 +29,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include "svsys.h"
-#include "rtl/ref.hxx"
-#include "vcl/xconnection.hxx"
-#include "vcl/svdata.hxx"
-#include "vcl/salinst.hxx"
#include "vcl/svapp.hxx"
+#include "xconnection.hxx"
+#include "svdata.hxx"
+#include "salinst.hxx"
+
namespace {
namespace css = com::sun::star;
diff --git a/vcl/source/salmain/makefile.mk b/vcl/source/salmain/makefile.mk
deleted file mode 100644
index 9c790bf28d75..000000000000
--- a/vcl/source/salmain/makefile.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-#*************************************************************************
-#
-# 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.
-#
-#*************************************************************************
-
-PRJ = ..$/..
-PRJNAME = vcl
-TARGET = salmain
-ENABLE_EXCEPTIONS = TRUE
-
-.INCLUDE: settings.mk
-
-OBJFILES = $(OBJ)$/salmain.obj
-
-LIB1TARGET=$(LB)$/vclmain.lib
-LIB1ARCHIV=$(LB)$/libvclmain.a
-LIB1FILES=$(LB)$/salmain.lib
-
-.INCLUDE: target.mk
diff --git a/vcl/source/salmain/salmain.cxx b/vcl/source/salmain/salmain.cxx
index e5135b9aa241..80e853b3b654 100644
--- a/vcl/source/salmain/salmain.cxx
+++ b/vcl/source/salmain/salmain.cxx
@@ -33,7 +33,8 @@
#include "sal/main.h"
#include "tools/extendapplicationenvironment.hxx"
-#include "vcl/salinst.hxx"
+
+#include "salinst.hxx"
SAL_IMPLEMENT_MAIN() {
tools::extendApplicationEnvironment();
diff --git a/vcl/source/src/btntext.src b/vcl/source/src/btntext.src
index a6792b202b3d..44561a89f513 100644
--- a/vcl/source/src/btntext.src
+++ b/vcl/source/src/btntext.src
@@ -27,9 +27,7 @@
#define _SV_BTNTEXT_SRC
-#ifndef _SV_SVIDS_HRC
-#include <vcl/svids.hrc>
-#endif
+#include <svids.hrc>
String SV_BUTTONTEXT_OK
{
diff --git a/vcl/source/src/helptext.src b/vcl/source/src/helptext.src
index 59d7ea3d443e..1f3def6f8cd4 100644
--- a/vcl/source/src/helptext.src
+++ b/vcl/source/src/helptext.src
@@ -27,9 +27,7 @@
#define _SV_HELPTEXT_SRC
-#ifndef _SV_SVIDS_HRC
-#include <vcl/svids.hrc>
-#endif
+#include <svids.hrc>
String SV_HELPTEXT_CLOSE
{
diff --git a/vcl/source/src/images.src b/vcl/source/src/images.src
index 541ac34c29e7..f836306cba45 100644
--- a/vcl/source/src/images.src
+++ b/vcl/source/src/images.src
@@ -27,9 +27,7 @@
#define _SV_IMAGES_SRC
-#ifndef _SV_SVIDS_HRC
-#include <vcl/svids.hrc>
-#endif
+#include <svids.hrc>
// =======================================================================
diff --git a/vcl/source/src/makefile.mk b/vcl/source/src/makefile.mk
deleted file mode 100644
index 2db77b7ffc74..000000000000
--- a/vcl/source/src/makefile.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-#*************************************************************************
-#
-# 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.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=vcl
-TARGET=svsrc
-RESTARGET=vcl
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES= images.src \
- menu.src \
- stdtext.src \
- helptext.src \
- units.src \
- btntext.src \
- print.src \
-
-RESLIB1NAME= $(RESTARGET)
-RESLIB1IMAGES= $(PRJ)$/source/src
-RESLIB1SRSFILES= $(SRS)$/svsrc.srs
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/vcl/source/src/menu.src b/vcl/source/src/menu.src
index 1833093adfac..cead04b9f6ec 100644
--- a/vcl/source/src/menu.src
+++ b/vcl/source/src/menu.src
@@ -25,9 +25,8 @@
*
************************************************************************/
#define _SV_MENU_SRC
-#ifndef _SV_SVIDS_HRC
-#include <vcl/svids.hrc>
-#endif
+
+#include <svids.hrc>
String SV_RESID_STRING_NOSELECTIONPOSSIBLE
{
diff --git a/vcl/source/src/print.src b/vcl/source/src/print.src
index b4f4d56029e1..e1dab9679bda 100644
--- a/vcl/source/src/print.src
+++ b/vcl/source/src/print.src
@@ -25,7 +25,7 @@
*
************************************************************************/
-#include "vcl/svids.hrc"
+#include "svids.hrc"
ModalDialog SV_DLG_PRINT
{
diff --git a/vcl/source/src/stdtext.src b/vcl/source/src/stdtext.src
index 1b95f7bb1d72..9fd1487ce522 100644
--- a/vcl/source/src/stdtext.src
+++ b/vcl/source/src/stdtext.src
@@ -27,9 +27,7 @@
#define _SV_STDTEXT_SRC
-#ifndef _SV_SVIDS_HRC
-#include <vcl/svids.hrc>
-#endif
+#include <svids.hrc>
String SV_STDTEXT_SERVICENOTAVAILABLE
{
diff --git a/vcl/source/src/units.src b/vcl/source/src/units.src
index 0a680fcb1913..57025c9b2a2f 100644
--- a/vcl/source/src/units.src
+++ b/vcl/source/src/units.src
@@ -26,9 +26,7 @@
************************************************************************/
#define _SV_UNITS_SRC
-#ifndef _SV_SVIDS_HRC
-#include <vcl/svids.hrc>
-#endif
+#include <svids.hrc>
// Amelia : adds two units , 'ch' and 'line'
StringArray SV_FUNIT_STRINGS
diff --git a/vcl/source/window/abstdlg.cxx b/vcl/source/window/abstdlg.cxx
index d60dbb83b6c5..e11e50533647 100644
--- a/vcl/source/window/abstdlg.cxx
+++ b/vcl/source/window/abstdlg.cxx
@@ -30,7 +30,6 @@
#include "precompiled_vcl.hxx"
#include <vcl/abstdlg.hxx>
-#include "cuilib.hxx"
#include <osl/module.hxx>
#include <tools/string.hxx>
@@ -43,7 +42,7 @@ VclAbstractDialogFactory* VclAbstractDialogFactory::Create()
{
FuncPtrCreateDialogFactory fp = 0;
static ::osl::Module aDialogLibrary;
- if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( RTL_CONSTASCII_USTRINGPARAM( DLL_NAME ) ) ) )
+ if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( RTL_CONSTASCII_USTRINGPARAM( CUI_DLL_NAME ) ) ) )
fp = ( VclAbstractDialogFactory* (__LOADONCALLAPI*)() )
aDialogLibrary.getFunctionSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreateDialogFactory")) );
if ( fp )
diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx
index 50d288b71686..a07c0ee17b28 100644
--- a/vcl/source/window/accel.cxx
+++ b/vcl/source/window/accel.cxx
@@ -31,10 +31,11 @@
#include <tools/table.hxx>
#include <tools/debug.hxx>
+#include <tools/rc.h>
+
#include <vcl/svapp.hxx>
-#include <vcl/accel.h>
+#include <accel.h>
#include <vcl/accel.hxx>
-#include <tools/rc.h>
#include <vector>
// =======================================================================
diff --git a/vcl/source/window/accmgr.cxx b/vcl/source/window/accmgr.cxx
index c8b1e42c5ed1..43c78d55adc1 100644
--- a/vcl/source/window/accmgr.cxx
+++ b/vcl/source/window/accmgr.cxx
@@ -30,9 +30,10 @@
#include "precompiled_vcl.hxx"
#include <tools/debug.hxx>
-#include <vcl/accel.h>
+
+#include <accel.h>
#include <vcl/accel.hxx>
-#include <vcl/accmgr.hxx>
+#include <accmgr.hxx>
// =======================================================================
diff --git a/vcl/source/window/arrange.cxx b/vcl/source/window/arrange.cxx
index 28e0d8ae65fe..0d5be0d2b625 100644
--- a/vcl/source/window/arrange.cxx
+++ b/vcl/source/window/arrange.cxx
@@ -28,9 +28,10 @@
#include "precompiled_vcl.hxx"
+#include "svdata.hxx"
+
#include "vcl/arrange.hxx"
#include "vcl/edit.hxx"
-#include "vcl/svdata.hxx"
#include "vcl/svapp.hxx"
#include "com/sun/star/beans/PropertyValue.hpp"
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index a71aadc3cdad..26397d7adf7f 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -28,8 +28,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <vcl/svids.hrc>
-#include <vcl/svdata.hxx>
+#include <svids.hrc>
+#include <svdata.hxx>
+#include <brdwin.hxx>
+#include <window.h>
+
#include <vcl/event.hxx>
#include <vcl/decoview.hxx>
#include <vcl/syswin.hxx>
@@ -41,9 +44,8 @@
#include <vcl/virdev.hxx>
#include <vcl/help.hxx>
#include <vcl/edit.hxx>
-#include <vcl/brdwin.hxx>
-#include <vcl/window.h>
#include <vcl/metric.hxx>
+
#include <tools/debug.hxx>
using namespace ::com::sun::star::uno;
diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx
index cf9697b4f602..577b7ad89edc 100644
--- a/vcl/source/window/btndlg.cxx
+++ b/vcl/source/window/btndlg.cxx
@@ -31,10 +31,12 @@
#include <tools/debug.hxx>
#include <tools/rc.h>
+
+#include <svdata.hxx>
+
#include <vcl/button.hxx>
#include <vcl/btndlg.hxx>
#include <vcl/svdata.hxx>
-
typedef boost::ptr_vector<ImplBtnDlgItem>::iterator btn_iterator;
typedef boost::ptr_vector<ImplBtnDlgItem>::const_iterator btn_const_iterator;
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 659f7df31fa7..6cecea6a24a7 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -28,14 +28,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+
#include <vcl/svapp.hxx>
#include <vcl/timer.hxx>
#include <vcl/settings.hxx>
#include <vcl/window.hxx>
-#include <vcl/window.h>
-#include <tools/poly.hxx>
#include <vcl/cursor.hxx>
+#include <window.h>
+
+#include <tools/poly.hxx>
+
// =======================================================================
@@ -217,7 +220,7 @@ void Cursor::ImplShow( bool bDrawDirect, bool bRestore )
// -----------------------------------------------------------------------
-bool Cursor::ImplHide()
+bool Cursor::ImplHide( bool i_bStopTimer )
{
bool bWasCurVisible = false;
if ( mpData && mpData->mpWindow )
@@ -226,6 +229,13 @@ bool Cursor::ImplHide()
if ( mpData->mbCurVisible )
ImplRestore();
}
+
+ if( mpData && i_bStopTimer )
+ {
+ mpData->maTimer.Stop();
+ mpData->mpWindow = NULL;
+ }
+
return bWasCurVisible;
}
@@ -329,13 +339,7 @@ void Cursor::Hide()
if ( mbVisible )
{
mbVisible = sal_False;
- ImplHide();
-
- if( mpData )
- {
- mpData->maTimer.Stop();
- mpData->mpWindow = NULL;
- }
+ ImplHide( true );
}
}
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 7e2725e07023..5c4c786a1f39 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -31,11 +31,12 @@
#include <tools/debug.hxx>
#include <tools/rc.h>
-#include <vcl/svdata.hxx>
+#include <svdata.hxx>
+#include <window.h>
+#include <brdwin.hxx>
+
#include <vcl/svapp.hxx>
-#include <vcl/window.h>
#include <vcl/event.hxx>
-#include <vcl/brdwin.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/button.hxx>
#include <vcl/mnemonic.hxx>
diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index ce7b6dca8119..24468089e88a 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -28,15 +28,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+
#include <tools/debug.hxx>
-#include <vcl/svdata.hxx>
+
+#include <svdata.hxx>
+#include <window.h>
+
#include <vcl/event.hxx>
#include <vcl/svapp.hxx>
#include <vcl/tabpage.hxx>
#include <vcl/tabctrl.hxx>
#include <vcl/tabdlg.hxx>
#include <vcl/button.hxx>
-#include <vcl/window.h>
#include <vcl/unohelp.hxx>
#include <com/sun/star/i18n/XCharacterClassification.hpp>
diff --git a/vcl/source/window/dndevdis.cxx b/vcl/source/window/dndevdis.cxx
index d9417e3bacf0..5d6a309e838e 100644
--- a/vcl/source/window/dndevdis.cxx
+++ b/vcl/source/window/dndevdis.cxx
@@ -29,13 +29,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <vcl/dndevdis.hxx>
-#include <vcl/dndlcon.hxx>
-#include <vcl/window.h>
+#include <dndevdis.hxx>
+#include <dndlcon.hxx>
+#include <window.h>
+#include <svdata.hxx>
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/svdata.hxx>
+
using namespace ::cppu;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
diff --git a/vcl/source/window/dndlcon.cxx b/vcl/source/window/dndlcon.cxx
index 4566852bc966..54013a9bca03 100644
--- a/vcl/source/window/dndlcon.cxx
+++ b/vcl/source/window/dndlcon.cxx
@@ -29,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <vcl/dndlcon.hxx>
+#include <dndlcon.hxx>
using namespace ::cppu;
using namespace ::com::sun::star::uno;
diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx
index ded887c59933..df29d9e3a07a 100644
--- a/vcl/source/window/dockingarea.cxx
+++ b/vcl/source/window/dockingarea.cxx
@@ -28,11 +28,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+
#include <tools/debug.hxx>
+
#include <vcl/dockingarea.hxx>
#include <vcl/syswin.hxx>
#include <vcl/menu.hxx>
-#include <vcl/svdata.hxx>
+
+#include <svdata.hxx>
#include <map>
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 017fdc5390db..624a42593b07 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -29,21 +29,22 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <svsys.h>
#include <tools/time.hxx>
#include <tools/rc.h>
+
+#include <brdwin.hxx>
+#include <svdata.hxx>
+#include <salframe.hxx>
+#include <window.h>
+
#include <vcl/event.hxx>
-#include <vcl/brdwin.hxx>
#include <vcl/floatwin.hxx>
#include <vcl/dockwin.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/svdata.hxx>
#include <vcl/timer.hxx>
#include <vcl/lineinfo.hxx>
-#include <vcl/window.h>
#include <vcl/unowrap.hxx>
-#include <vcl/salframe.hxx>
// =======================================================================
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index c9b71b01f78e..6440d118fe54 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -29,19 +29,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <svsys.h>
#include <tools/time.hxx>
#include <tools/rc.h>
#include <vcl/event.hxx>
-#include <vcl/brdwin.hxx>
#include <vcl/floatwin.hxx>
#include <vcl/dockwin.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/svdata.hxx>
#include <vcl/timer.hxx>
-#include <vcl/window.h>
#include <vcl/unowrap.hxx>
-#include <vcl/salframe.hxx>
+
+#include <svdata.hxx>
+#include <window.h>
+#include <brdwin.hxx>
+#include <salframe.hxx>
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 2c21ec7a83d1..118c60f214cc 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -29,17 +29,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <svsys.h>
-#include <vcl/svdata.hxx>
+#include <svdata.hxx>
+#include <brdwin.hxx>
+#include <window.h>
+#include <salframe.hxx>
+
#include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx>
-#include <vcl/brdwin.hxx>
#include <vcl/event.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/floatwin.hxx>
-#include <vcl/window.h>
+
#include <tools/rc.h>
-#include <vcl/salframe.hxx>
#include <tools/debug.hxx>
diff --git a/vcl/source/window/introwin.cxx b/vcl/source/window/introwin.cxx
index a0926ec789ad..538bd6bf25a6 100644
--- a/vcl/source/window/introwin.cxx
+++ b/vcl/source/window/introwin.cxx
@@ -29,16 +29,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <svsys.h>
-#include <vcl/salframe.hxx>
#include <tools/debug.hxx>
-#include <vcl/svdata.hxx>
-#include <vcl/wrkwin.hxx>
+#include <vcl/wrkwin.hxx>
#include <vcl/bitmap.hxx>
-#include <vcl/impbmp.hxx>
#include <vcl/introwin.hxx>
+#include <impbmp.hxx>
+#include <svdata.hxx>
+#include <salframe.hxx>
diff --git a/vcl/source/window/keycod.cxx b/vcl/source/window/keycod.cxx
index 05370f3a029f..466ebbb41ebf 100644
--- a/vcl/source/window/keycod.cxx
+++ b/vcl/source/window/keycod.cxx
@@ -29,17 +29,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <svsys.h>
-#include <vcl/salinst.hxx>
-#include <vcl/salframe.hxx>
-#include <vcl/svdata.hxx>
+#include <salinst.hxx>
+#include <salframe.hxx>
+#include <svdata.hxx>
+
#include <vcl/window.hxx>
#include <vcl/keycod.hxx>
#include <tools/rc.h>
-
// =======================================================================
static sal_uInt16 aImplKeyFuncTab[(KEYFUNC_FRONT+1)*4] =
{
diff --git a/vcl/source/window/makefile.mk b/vcl/source/window/makefile.mk
deleted file mode 100644
index 1c63376dfda5..000000000000
--- a/vcl/source/window/makefile.mk
+++ /dev/null
@@ -1,106 +0,0 @@
-#*************************************************************************
-#
-# 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.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=vcl
-TARGET=win
-ENABLE_EXCEPTIONS=TRUE
-
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile2.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES= \
- $(SLO)$/arrange.obj \
- $(SLO)$/abstdlg.obj \
- $(SLO)$/accel.obj \
- $(SLO)$/accmgr.obj \
- $(SLO)$/brdwin.obj \
- $(SLO)$/btndlg.obj \
- $(SLO)$/cmdevt.obj \
- $(SLO)$/cursor.obj \
- $(SLO)$/decoview.obj \
- $(SLO)$/dialog.obj \
- $(SLO)$/dlgctrl.obj \
- $(SLO)$/dndevdis.obj \
- $(SLO)$/dndlcon.obj \
- $(SLO)$/dockingarea.obj \
- $(SLO)$/dockmgr.obj \
- $(SLO)$/dockwin.obj \
- $(SLO)$/floatwin.obj \
- $(SLO)$/introwin.obj \
- $(SLO)$/keycod.obj \
- $(SLO)$/keyevent.obj \
- $(SLO)$/mouseevent.obj \
- $(SLO)$/menu.obj \
- $(SLO)$/mnemonic.obj \
- $(SLO)$/mnemonicengine.obj \
- $(SLO)$/msgbox.obj \
- $(SLO)$/popupmenuwindow.obj \
- $(SLO)$/scrwnd.obj \
- $(SLO)$/printdlg.obj \
- $(SLO)$/seleng.obj \
- $(SLO)$/split.obj \
- $(SLO)$/splitwin.obj \
- $(SLO)$/status.obj \
- $(SLO)$/syschild.obj \
- $(SLO)$/javachild.obj \
- $(SLO)$/syswin.obj \
- $(SLO)$/tabdlg.obj \
- $(SLO)$/tabpage.obj \
- $(SLO)$/taskpanelist.obj \
- $(SLO)$/toolbox.obj \
- $(SLO)$/toolbox2.obj \
- $(SLO)$/window.obj \
- $(SLO)$/winproc.obj \
- $(SLO)$/window2.obj \
- $(SLO)$/window3.obj \
- $(SLO)$/window4.obj \
- $(SLO)$/wpropset.obj \
- $(SLO)$/wrkwin.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.INCLUDE : $(PRJ)$/util$/target.pmk
-
-$(INCCOM)$/cuilib.hxx: makefile.mk
-.IF "$(GUI)"=="UNX"
- @$(RM) $@
- @echo \#define DLL_NAME \"libcui$(DLLPOSTFIX)$(DLLPOST)\" >$@
-.ELSE
- @echo $(EMQ)#define DLL_NAME $(EMQ)"cui$(DLLPOSTFIX)$(DLLPOST)$(EMQ)" >$@
-.ENDIF
-
-$(SLO)$/abstdlg.obj : $(INCCOM)$/cuilib.hxx
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 6ab9dda55fc2..af79642516f4 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -30,37 +30,38 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include "svsys.h"
-#include "vcl/salinst.hxx"
#include "tools/debug.hxx"
#include "tools/diagnose_ex.h"
-#include "vcl/svdata.hxx"
+#include "tools/rc.h"
+#include "tools/stream.hxx"
+
#include "vcl/svapp.hxx"
#include "vcl/mnemonic.hxx"
#include "vcl/image.hxx"
#include "vcl/event.hxx"
#include "vcl/help.hxx"
-#include "vcl/svids.hrc"
#include "vcl/floatwin.hxx"
#include "vcl/wrkwin.hxx"
#include "vcl/timer.hxx"
#include "vcl/sound.hxx"
#include "vcl/decoview.hxx"
#include "vcl/bitmap.hxx"
-#include "tools/rc.h"
#include "vcl/menu.hxx"
#include "vcl/button.hxx"
#include "vcl/gradient.hxx"
#include "vcl/i18nhelp.hxx"
#include "vcl/taskpanelist.hxx"
-#include "vcl/window.h"
#include "vcl/controllayout.hxx"
#include "vcl/toolbox.hxx"
-#include "tools/stream.hxx"
-#include "vcl/salmenu.hxx"
-#include "vcl/salframe.hxx"
#include "vcl/dockingarea.hxx"
+#include "salinst.hxx"
+#include "svdata.hxx"
+#include "svids.hrc"
+#include "window.h"
+#include "salmenu.hxx"
+#include "salframe.hxx"
+
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/i18n/XCharacterClassification.hpp>
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index ae4c148d5807..3f8c5683458f 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -29,19 +29,21 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <vcl/svids.hrc>
-#include <vcl/svdata.hxx>
+#include <tools/rc.h>
+
+#include <svids.hrc>
+#include <svdata.hxx>
+#include <brdwin.hxx>
+#include <window.h>
+
#include <vcl/metric.hxx>
#include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/fixed.hxx>
#include <vcl/sound.hxx>
-#include <vcl/brdwin.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/button.hxx>
-#include <tools/rc.h>
#include <vcl/mnemonic.hxx>
-#include <vcl/window.h>
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index a433a57faefb..a0160f78f287 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -28,14 +28,15 @@
#include "precompiled_vcl.hxx"
+#include "printdlg.hxx"
+#include "svdata.hxx"
+#include "svids.hrc"
+#include "jobset.h"
+
#include "vcl/print.hxx"
-#include "vcl/prndlg.hxx"
#include "vcl/dialog.hxx"
#include "vcl/button.hxx"
-#include "vcl/svdata.hxx"
-#include "vcl/svids.hrc"
#include "vcl/wall.hxx"
-#include "vcl/jobset.h"
#include "vcl/status.hxx"
#include "vcl/decoview.hxx"
#include "vcl/arrange.hxx"
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index 588f4d4fa1fa..5882ef3999ba 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -33,11 +33,12 @@
#include <tools/time.hxx>
#include <tools/debug.hxx>
-#include <vcl/svids.hrc>
-#include <vcl/svdata.hxx>
+#include <svids.hrc>
+#include <svdata.hxx>
+#include <scrwnd.hxx>
+
#include <vcl/timer.hxx>
#include <vcl/event.hxx>
-#include <scrwnd.hxx>
#include <math.h>
#include <limits.h>
diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx
index b8b6735d81ca..0c323c37f0f6 100644
--- a/vcl/source/window/seleng.cxx
+++ b/vcl/source/window/seleng.cxx
@@ -175,11 +175,7 @@ void SelectionEngine::CursorPosChanging( sal_Bool bShift, sal_Bool bMod1 )
sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
{
nFlags &= (~SELENG_CMDEVT);
- if ( !pFunctionSet || !pWin )
- return sal_False;
- const bool bRightClickCursorPositioning =
- rMEvt.IsRight() && rMEvt.GetClicks() == 1 && !IsInSelection();
- if ( (rMEvt.GetClicks() > 1 || rMEvt.IsRight()) && !bRightClickCursorPositioning )
+ if ( !pFunctionSet || !pWin || rMEvt.GetClicks() > 1 || rMEvt.IsRight() )
return sal_False;
sal_uInt16 nModifier = rMEvt.GetModifier() | nLockedMods;
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index 1d4c8bfae815..683c114f48f7 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -30,16 +30,19 @@
#include "precompiled_vcl.hxx"
#include <tools/rc.h>
+#include <tools/poly.hxx>
+
#include <vcl/event.hxx>
#include <vcl/split.hxx>
#include <vcl/svapp.hxx>
#include <vcl/syswin.hxx>
#include <vcl/taskpanelist.hxx>
#include <vcl/gradient.hxx>
-#include <tools/poly.hxx>
#include <vcl/lineinfo.hxx>
+
#include <rtl/instance.hxx>
-#include <vcl/window.h>
+
+#include <window.h>
namespace
{
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index d0bf60b6412c..02be128cd8dd 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -30,19 +30,21 @@
#include "precompiled_vcl.hxx"
#include <string.h>
+
#include <tools/debug.hxx>
#include <tools/rcid.h>
+
#include <vcl/event.hxx>
#include <vcl/wall.hxx>
#include <vcl/bitmap.hxx>
#include <vcl/decoview.hxx>
#include <vcl/symbol.hxx>
-#include <vcl/svids.hrc>
#include <vcl/image.hxx>
-#include <vcl/svdata.hxx>
#include <vcl/help.hxx>
#include <vcl/splitwin.hxx>
+#include <svdata.hxx>
+#include <svids.hrc>
// =======================================================================
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 9280bb25b80c..60765be7af5d 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -28,17 +28,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <tools/debug.hxx>
+#include <tools/debug.hxx>
#include <tools/rc.h>
-#include <vcl/svdata.hxx>
+
#include <vcl/event.hxx>
#include <vcl/decoview.hxx>
#include <vcl/svapp.hxx>
#include <vcl/help.hxx>
#include <vcl/status.hxx>
#include <vcl/virdev.hxx>
-#include <vcl/window.h>
+
+#include <svdata.hxx>
+#include <window.h>
// =======================================================================
diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index 3ff21826ff0c..9bdbfd970ed7 100644..100755
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -29,21 +29,26 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <svsys.h>
#include <rtl/process.h>
#include <rtl/ref.hxx>
+
#include <tools/rc.h>
-#include <vcl/window.h>
-#include <vcl/salinst.hxx>
-#include <vcl/salframe.hxx>
+
+// declare system types in sysdata.hxx
+#include <svsys.h>
+
#include <vcl/window.hxx>
-#include <vcl/salobj.hxx>
-#include <vcl/svdata.hxx>
#include <vcl/sysdata.hxx>
#include <vcl/svapp.hxx>
#include <vcl/syschild.hxx>
#include <vcl/unohelp.hxx>
+#include <window.h>
+#include <salinst.hxx>
+#include <salframe.hxx>
+#include <salobj.hxx>
+#include <svdata.hxx>
+
#ifdef SOLAR_JAVA
#include <jni.h>
#endif
@@ -54,8 +59,6 @@
#include <com/sun/star/java/XJavaThreadRegister_11.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <vcl/syschild.hxx>
-
using namespace ::com::sun::star;
// =======================================================================
@@ -249,6 +252,7 @@ sal_IntPtr SystemChildWindow::GetParentWindowHandle( sal_Bool bUseJava )
{
sal_IntPtr nRet = 0;
+ (void)bUseJava;
#if defined WNT
nRet = reinterpret_cast< sal_IntPtr >( GetSystemData()->hWnd );
#elif defined QUARTZ
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 3343779f632b..f6c7e422cc3b 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -30,14 +30,8 @@
#include "precompiled_vcl.hxx"
#include <tools/debug.hxx>
-#include <svsys.h>
-#include <vcl/salframe.hxx>
-#include <vcl/svdata.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/brdwin.hxx>
#include <vcl/menu.hxx>
-#include <vcl/window.h>
-#include <vcl/brdwin.hxx>
#include <vcl/sound.hxx>
#include <vcl/svapp.hxx>
#include <vcl/event.hxx>
@@ -45,6 +39,10 @@
#include <vcl/taskpanelist.hxx>
#include <vcl/unowrap.hxx>
+#include <salframe.hxx>
+#include <svdata.hxx>
+#include <brdwin.hxx>
+#include <window.h>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index f109f2079a4c..a834af10d37d 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -30,18 +30,17 @@
#include "precompiled_vcl.hxx"
#include <tools/ref.hxx>
-
#include <tools/rc.h>
-#include <vcl/svdata.hxx>
+
#include <vcl/svapp.hxx>
#include <vcl/event.hxx>
#include <vcl/tabpage.hxx>
#include <vcl/tabctrl.hxx>
#include <vcl/bitmapex.hxx>
-#include <com/sun/star/accessibility/XAccessible.hpp>
-
+#include <svdata.hxx>
+#include <com/sun/star/accessibility/XAccessible.hpp>
// =======================================================================
diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx
index 56bd9d799cce..9f796269014f 100644
--- a/vcl/source/window/taskpanelist.cxx
+++ b/vcl/source/window/taskpanelist.cxx
@@ -28,11 +28,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <vcl/svdata.hxx>
+
#include <tools/rcid.h>
-#include <vcl/dockwin.hxx>
+#include <vcl/dockwin.hxx>
#include <vcl/taskpanelist.hxx>
+
+#include <svdata.hxx>
+
#include <functional>
#include <algorithm>
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 0eae498111ab..50137643a2cc 100644..100755
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -29,12 +29,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <svsys.h>
#include <rtl/logfile.hxx>
-#include <tools/debug.hxx>
+#include <tools/debug.hxx>
#include <tools/rc.h>
-#include <vcl/svdata.hxx>
+#include <tools/poly.hxx>
+
#include <vcl/event.hxx>
#include <vcl/decoview.hxx>
#include <vcl/accel.hxx>
@@ -44,14 +44,18 @@
#include <vcl/virdev.hxx>
#include <vcl/spin.h>
#include <vcl/toolbox.hxx>
-#include <vcl/toolbox.h>
#include <vcl/bitmap.hxx>
-#include <tools/poly.hxx>
-#include <vcl/salframe.hxx>
#include <vcl/mnemonic.hxx>
#include <vcl/gradient.hxx>
#include <vcl/menu.hxx>
-#include <vcl/window.h>
+
+#include <svdata.hxx>
+#include <window.h>
+#include <toolbox.h>
+#include <salframe.hxx>
+#if defined WNT
+#include <svsys.h>
+#endif
#include <string.h>
#include <vector>
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 37650232fd7f..08ffb453b06a 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -28,23 +28,25 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <tools/debug.hxx>
+#include <tools/debug.hxx>
#include <tools/rc.h>
-#include <vcl/svdata.hxx>
+
#include <vcl/svapp.hxx>
#include <vcl/help.hxx>
#include <vcl/bitmap.hxx>
#include <vcl/toolbox.hxx>
-#include <vcl/toolbox.h>
#include <vcl/mnemonic.hxx>
#include <vcl/menu.hxx>
-#include <vcl/brdwin.hxx>
-
#include <vcl/unohelp.hxx>
+#include <vcl/ImageListProvider.hxx>
+
+#include <svdata.hxx>
+#include <brdwin.hxx>
+#include <toolbox.h>
+
#include <unotools/confignode.hxx>
-#include <vcl/ImageListProvider.hxx>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
using namespace vcl;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index fdb86cb07303..832515e4c5ad 100644..100755
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -28,44 +28,58 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include "svsys.h"
-#include "vcl/salframe.hxx"
-#include "vcl/salobj.hxx"
-#include "vcl/salinst.hxx"
-#include "vcl/salgtype.hxx"
-#include "vcl/salgdi.hxx"
-#include "vcl/unohelp.hxx"
#include "tools/time.hxx"
#include "tools/debug.hxx"
#include "tools/rc.h"
-#include "vcl/svdata.hxx"
-#include "vcl/dbggui.hxx"
-#include "vcl/outfont.hxx"
-#include "vcl/outdev.h"
-#include "vcl/region.h"
+
+#include "unotools/fontcfg.hxx"
+#include "unotools/confignode.hxx"
+
+#include "vcl/unohelp.hxx"
+#include "vcl/salgtype.hxx"
#include "vcl/event.hxx"
#include "vcl/help.hxx"
#include "vcl/cursor.hxx"
#include "vcl/svapp.hxx"
-#include "vcl/window.h"
#include "vcl/window.hxx"
#include "vcl/syswin.hxx"
#include "vcl/syschild.hxx"
-#include "vcl/brdwin.hxx"
-#include "vcl/helpwin.hxx"
#include "vcl/dockwin.hxx"
#include "vcl/menu.hxx"
#include "vcl/wrkwin.hxx"
#include "vcl/wall.hxx"
#include "vcl/gradient.hxx"
-#include "vcl/toolbox.h"
-#include "unotools/fontcfg.hxx"
-#include "vcl/sysdata.hxx"
-#include "vcl/sallayout.hxx"
#include "vcl/salctype.hxx"
-#include "vcl/button.hxx" // Button::GetStandardText
+#include "vcl/button.hxx"
#include "vcl/taskpanelist.hxx"
+#include "vcl/dialog.hxx"
+#include "vcl/unowrap.hxx"
+#include "vcl/gdimtf.hxx"
+#include "vcl/pdfextoutdevdata.hxx"
+#include "vcl/lazydelete.hxx"
+
+// declare system types in sysdata.hxx
+#include "svsys.h"
+#include "vcl/sysdata.hxx"
+
+#include "salframe.hxx"
+#include "salobj.hxx"
+#include "salinst.hxx"
+#include "salgdi.hxx"
+#include "svdata.hxx"
+#include "dbggui.hxx"
+#include "outfont.hxx"
+#include "window.h"
+#include "toolbox.h"
+#include "outdev.h"
+#include "region.h"
+#include "brdwin.hxx"
+#include "helpwin.hxx"
+#include "sallayout.hxx"
+#include "dndlcon.hxx"
+#include "dndevdis.hxx"
+
#include "com/sun/star/awt/XWindowPeer.hpp"
#include "com/sun/star/rendering/XCanvas.hpp"
#include "com/sun/star/rendering/XSpriteCanvas.hpp"
@@ -82,15 +96,7 @@
#include "com/sun/star/accessibility/XAccessible.hpp"
#include "com/sun/star/accessibility/AccessibleRole.hpp"
-#include "vcl/dialog.hxx"
-#include "vcl/unowrap.hxx"
-#include "vcl/dndlcon.hxx"
-#include "vcl/dndevdis.hxx"
-#include "unotools/confignode.hxx"
-#include "vcl/gdimtf.hxx"
#include <sal/macros.h>
-#include "vcl/pdfextoutdevdata.hxx"
-#include "vcl/lazydelete.hxx"
#include <set>
#include <typeinfo>
@@ -2404,7 +2410,7 @@ void Window::ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags )
{
bool bRestoreCursor = false;
if ( mpWindowImpl->mpCursor )
- bRestoreCursor = mpWindowImpl->mpCursor->ImplHide();
+ bRestoreCursor = mpWindowImpl->mpCursor->ImplHide( false );
mbInitClipRegion = sal_True;
mpWindowImpl->mbInPaint = sal_True;
@@ -2893,7 +2899,7 @@ void Window::ImplScroll( const Rectangle& rRect,
ImplInvalidateAllOverlapBackgrounds();
if ( mpWindowImpl->mpCursor )
- mpWindowImpl->mpCursor->ImplHide();
+ mpWindowImpl->mpCursor->ImplHide( false );
sal_uInt16 nOrgFlags = nFlags;
if ( !(nFlags & (SCROLL_CHILDREN | SCROLL_NOCHILDREN)) )
@@ -4068,7 +4074,7 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags )
{
// Cursor hiden
if ( pOldFocusWindow->mpWindowImpl->mpCursor )
- pOldFocusWindow->mpWindowImpl->mpCursor->ImplHide();
+ pOldFocusWindow->mpWindowImpl->mpCursor->ImplHide( true );
}
// !!!!! Wegen altem SV-Office Activate/Deavtivate Handling
@@ -7906,7 +7912,7 @@ void Window::SetCursor( Cursor* pCursor )
if ( mpWindowImpl->mpCursor != pCursor )
{
if ( mpWindowImpl->mpCursor )
- mpWindowImpl->mpCursor->ImplHide();
+ mpWindowImpl->mpCursor->ImplHide( true );
mpWindowImpl->mpCursor = pCursor;
if ( pCursor )
pCursor->ImplShow();
@@ -9555,7 +9561,7 @@ sal_Bool Window::IsNativeWidgetEnabled() const
}
#ifdef WNT // see #140456#
-#include <salframe.h>
+#include <win/salframe.h>
#endif
uno::Reference< rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscreenSize,
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index e98d51d252c9..bf81d2665f48 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -30,27 +30,27 @@
#include "precompiled_vcl.hxx"
#include <limits.h>
-#include <svsys.h>
-#include <vcl/salbmp.hxx>
-#include <vcl/salgdi.hxx>
-#include <vcl/salframe.hxx>
#include <tools/debug.hxx>
-#include <vcl/svdata.hxx>
-#include <vcl/impbmp.hxx>
+#include <tools/poly.hxx>
+
#include <vcl/bitmap.hxx>
#include <vcl/event.hxx>
#include <vcl/timer.hxx>
#include <vcl/metric.hxx>
-#include <vcl/outfont.hxx>
-#include <vcl/outdev.h>
-#include <tools/poly.hxx>
#include <vcl/virdev.hxx>
-#include <vcl/window.h>
#include <vcl/window.hxx>
#include <vcl/scrbar.hxx>
-#include <scrwnd.hxx>
#include <vcl/dockwin.hxx>
+#include <window.h>
+#include <outfont.hxx>
+#include <outdev.h>
+#include <svdata.hxx>
+#include <impbmp.hxx>
+#include <salbmp.hxx>
+#include <salgdi.hxx>
+#include <salframe.hxx>
+#include <scrwnd.hxx>
// =======================================================================
diff --git a/vcl/source/window/window4.cxx b/vcl/source/window/window4.cxx
index 577a573c2015..775249c450ee 100644
--- a/vcl/source/window/window4.cxx
+++ b/vcl/source/window/window4.cxx
@@ -28,10 +28,11 @@
#include "precompiled_vcl.hxx"
#include "vcl/window.hxx"
-#include "vcl/window.h"
-#include "vcl/svdata.hxx"
#include "vcl/arrange.hxx"
+#include "window.h"
+#include "svdata.hxx"
+
#include "com/sun/star/beans/PropertyValue.hpp"
#include <map>
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 2892bcb00c38..81acb8ebd4b7 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -29,35 +29,37 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <svsys.h>
-#include <vcl/salwtype.hxx>
-#include <vcl/salframe.hxx>
#include <tools/debug.hxx>
+
+#include <unotools/localedatawrapper.hxx>
+
#include <vcl/i18nhelp.hxx>
#include <vcl/unohelp.hxx>
-#include <unotools/localedatawrapper.hxx>
-#include <vcl/svdata.hxx>
-#include <vcl/dbggui.hxx>
#include <vcl/timer.hxx>
#include <vcl/event.hxx>
#include <vcl/sound.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <vcl/cursor.hxx>
-#include <vcl/accmgr.hxx>
-#include <vcl/print.h>
-#include <vcl/window.h>
#include <vcl/wrkwin.hxx>
#include <vcl/floatwin.hxx>
#include <vcl/dialog.hxx>
#include <vcl/help.hxx>
-#include <vcl/helpwin.hxx>
-#include <vcl/brdwin.hxx>
#include <vcl/dockwin.hxx>
-#include <vcl/salgdi.hxx>
#include <vcl/menu.hxx>
-#include <vcl/dndlcon.hxx>
+#include <svdata.hxx>
+#include <dbggui.hxx>
+#include <salwtype.hxx>
+#include <salframe.hxx>
+#include <accmgr.hxx>
+#include <print.h>
+#include <window.h>
+#include <helpwin.hxx>
+#include <brdwin.hxx>
+#include <salgdi.hxx>
+#include <dndlcon.hxx>
+
#include <com/sun/star/datatransfer/dnd/XDragSource.hpp>
#include <com/sun/star/awt/MouseEvent.hpp>
@@ -1642,7 +1644,13 @@ void ImplHandleResize( Window* pWindow, long nNewWidth, long nNewHeight )
// #i42750# presentation wants to be informed about resize
// as early as possible
WorkWindow* pWorkWindow = dynamic_cast<WorkWindow*>(pWindow->ImplGetWindowImpl()->mpClientWindow);
- if( pWorkWindow && pWorkWindow->IsPresentationMode() )
+ if( ! pWorkWindow || pWorkWindow->IsPresentationMode() )
+ bStartTimer = false;
+ }
+ else
+ {
+ WorkWindow* pWorkWindow = dynamic_cast<WorkWindow*>(pWindow);
+ if( ! pWorkWindow || pWorkWindow->IsPresentationMode() )
bStartTimer = false;
}
}
@@ -1789,7 +1797,7 @@ IMPL_LINK( Window, ImplAsyncFocusHdl, void*, EMPTYARG )
pSVData->maWinData.mpFocusWin = NULL;
if ( pFocusWin->ImplGetWindowImpl()->mpCursor )
- pFocusWin->ImplGetWindowImpl()->mpCursor->ImplHide();
+ pFocusWin->ImplGetWindowImpl()->mpCursor->ImplHide( true );
// Deaktivate rufen
Window* pOldFocusWindow = pFocusWin;
@@ -1896,7 +1904,7 @@ static void ImplHandleLoseFocus( Window* pWindow )
Window* pFocusWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin;
if ( pFocusWin && pFocusWin->ImplGetWindowImpl()->mpCursor )
- pFocusWin->ImplGetWindowImpl()->mpCursor->ImplHide();
+ pFocusWin->ImplGetWindowImpl()->mpCursor->ImplHide( true );
if( bCallDirect )
pWindow->ImplAsyncFocusHdl( NULL );
}
diff --git a/vcl/source/window/wpropset.cxx b/vcl/source/window/wpropset.cxx
index fcb0c560291e..10e3e8fa5e2f 100644
--- a/vcl/source/window/wpropset.cxx
+++ b/vcl/source/window/wpropset.cxx
@@ -30,7 +30,8 @@
#include "vcl/wpropset.hxx"
#include "vcl/window.hxx"
#include "vcl/vclevent.hxx"
-#include "vcl/svdata.hxx"
+
+#include "svdata.hxx"
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/beans/PropertyValue.hpp"
diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx
index 38d78fbc9723..24ca3c9120d5 100644..100755
--- a/vcl/source/window/wrkwin.cxx
+++ b/vcl/source/window/wrkwin.cxx
@@ -29,20 +29,22 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <svsys.h>
-#include <vcl/salframe.hxx>
#include <tools/debug.hxx>
-
#include <tools/rc.h>
-#include <vcl/svdata.hxx>
+
#include <vcl/svapp.hxx>
-#include <vcl/brdwin.hxx>
-#include <vcl/window.h>
#include <vcl/wrkwin.hxx>
+// declare system types in sysdata.hxx
+#include <svsys.h>
#include <vcl/sysdata.hxx>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/rendering/XCanvas.hpp>
+#include <svdata.hxx>
+#include <salframe.hxx>
+#include <brdwin.hxx>
+#include <window.h>
+
// =======================================================================
#define WORKWIN_WINDOWSTATE_FULLSCREEN ((sal_uLong)0x00010000)