summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--padmin/source/adddlg.cxx20
-rw-r--r--padmin/source/adddlg.hxx21
-rw-r--r--padmin/source/fontentry.cxx26
-rw-r--r--padmin/source/fontentry.hxx27
-rw-r--r--padmin/source/makefile.mk1
-rw-r--r--padmin/source/newppdlg.cxx31
-rw-r--r--padmin/source/padialog.cxx53
-rw-r--r--padmin/source/prtsetup.cxx16
-rw-r--r--padmin/source/prtsetup.hxx30
-rw-r--r--psprint/inc/makefile.mk51
-rw-r--r--psprint/inc/pch/precompiled_psprint.cxx32
-rw-r--r--psprint/inc/pch/precompiled_psprint.hxx35
-rw-r--r--psprint/prj/build.lst9
-rw-r--r--psprint/prj/d.lst10
-rw-r--r--psprint/source/helper/makefile.mk65
-rw-r--r--psprint/util/libpsp_linux.map9
-rw-r--r--psprint/util/libpsp_mingw.map12
-rw-r--r--psprint/util/libpsp_solaris.map74
-rw-r--r--psprint/util/makefile.mk87
-rw-r--r--vcl/aqua/source/gdi/salgdi.cxx20
-rw-r--r--vcl/inc/cupsmgr.hxx (renamed from psprint/inc/cupsmgr.hxx)8
-rw-r--r--vcl/inc/list.h (renamed from psprint/source/fontsubset/list.h)0
-rw-r--r--vcl/inc/sft.h (renamed from psprint/source/fontsubset/sft.h)0
-rw-r--r--vcl/inc/vcl/fontcache.hxx (renamed from psprint/inc/psprint/fontcache.hxx)8
-rw-r--r--vcl/inc/vcl/fontmanager.hxx (renamed from psprint/inc/psprint/fontmanager.hxx)22
-rw-r--r--vcl/inc/vcl/helper.hxx (renamed from psprint/inc/psprint/helper.hxx)23
-rw-r--r--vcl/inc/vcl/jobdata.hxx (renamed from psprint/inc/psprint/jobdata.hxx)2
-rw-r--r--vcl/inc/vcl/ppdparser.hxx (renamed from psprint/inc/psprint/ppdparser.hxx)7
-rw-r--r--vcl/inc/vcl/printergfx.hxx (renamed from psprint/inc/psprint/printergfx.hxx)9
-rw-r--r--vcl/inc/vcl/printerinfomanager.hxx (renamed from psprint/inc/psprint/printerinfomanager.hxx)15
-rw-r--r--vcl/inc/vcl/printerjob.hxx (renamed from psprint/inc/psprint/printerjob.hxx)9
-rw-r--r--vcl/inc/vcl/salinst.hxx19
-rw-r--r--vcl/inc/vcl/strhelper.hxx (renamed from psprint/inc/psprint/strhelper.hxx)21
-rw-r--r--vcl/os2/source/gdi/salgdi3.cxx4
-rw-r--r--vcl/prj/build.lst8
-rw-r--r--vcl/prj/d.lst7
-rw-r--r--vcl/source/app/salvtables.cxx5
-rw-r--r--vcl/source/fontsubset/crc32.c (renamed from psprint/source/fontsubset/crc32.c)0
-rw-r--r--vcl/source/fontsubset/crc32.h (renamed from psprint/source/fontsubset/crc32.h)0
-rw-r--r--vcl/source/fontsubset/gsub.cxx (renamed from psprint/source/fontsubset/gsub.cxx)2
-rw-r--r--vcl/source/fontsubset/gsub.h (renamed from psprint/source/fontsubset/gsub.h)0
-rw-r--r--vcl/source/fontsubset/list.c (renamed from psprint/source/fontsubset/list.c)0
-rw-r--r--vcl/source/fontsubset/makefile.mk (renamed from psprint/source/fontsubset/makefile.mk)2
-rw-r--r--vcl/source/fontsubset/sft.c (renamed from psprint/source/fontsubset/sft.c)6
-rw-r--r--vcl/source/fontsubset/ttcr.c (renamed from psprint/source/fontsubset/ttcr.c)0
-rw-r--r--vcl/source/fontsubset/ttcr.h (renamed from psprint/source/fontsubset/ttcr.h)0
-rw-r--r--vcl/source/fontsubset/u2big5.inc (renamed from psprint/source/fontsubset/u2big5.inc)0
-rw-r--r--vcl/source/fontsubset/u2johab.inc (renamed from psprint/source/fontsubset/u2johab.inc)0
-rw-r--r--vcl/source/fontsubset/u2prc.inc (renamed from psprint/source/fontsubset/u2prc.inc)0
-rw-r--r--vcl/source/fontsubset/u2shiftjis.inc (renamed from psprint/source/fontsubset/u2shiftjis.inc)0
-rw-r--r--vcl/source/fontsubset/u2wansung.inc (renamed from psprint/source/fontsubset/u2wansung.inc)0
-rw-r--r--vcl/source/fontsubset/xlat.c (renamed from psprint/source/fontsubset/xlat.c)0
-rw-r--r--vcl/source/fontsubset/xlat.h (renamed from psprint/source/fontsubset/xlat.h)0
-rw-r--r--vcl/source/gdi/font.cxx20
-rw-r--r--vcl/source/glyphs/gcach_ftyp.cxx32
-rw-r--r--vcl/source/helper/makefile.mk1
-rw-r--r--vcl/source/helper/strhelper.cxx (renamed from psprint/source/helper/strhelper.cxx)7
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx26
-rw-r--r--vcl/unx/headless/svpprn.cxx69
-rw-r--r--vcl/unx/headless/svpprn.hxx8
-rw-r--r--vcl/unx/headless/svppspgraphics.cxx30
-rw-r--r--vcl/unx/headless/svppspgraphics.hxx8
-rw-r--r--vcl/unx/inc/dtint.hxx3
-rw-r--r--vcl/unx/inc/macosxint.hxx48
-rw-r--r--vcl/unx/inc/prex.h2
-rw-r--r--vcl/unx/inc/pspgraphics.h14
-rw-r--r--vcl/unx/inc/saldata.hxx2
-rw-r--r--vcl/unx/inc/saldisp.hxx3
-rw-r--r--vcl/unx/inc/salinst.h3
-rw-r--r--vcl/unx/inc/salprn.h8
-rw-r--r--vcl/unx/inc/salunx.h2
-rw-r--r--vcl/unx/inc/xsalprn.h192
-rw-r--r--vcl/unx/source/app/i18n_ic.cxx4
-rw-r--r--vcl/unx/source/app/i18n_im.cxx9
-rw-r--r--vcl/unx/source/app/i18n_wrp.cxx13
-rw-r--r--vcl/unx/source/app/keysymnames.cxx11
-rw-r--r--vcl/unx/source/app/makefile.mk1
-rw-r--r--vcl/unx/source/app/saldisp.cxx28
-rw-r--r--vcl/unx/source/app/salinst.cxx153
-rw-r--r--vcl/unx/source/app/wmadaptor.cxx6
-rw-r--r--vcl/unx/source/fontmanager/adobeenc.tab (renamed from psprint/source/fontmanager/adobeenc.tab)0
-rwxr-xr-xvcl/unx/source/fontmanager/afm_hash.cpp (renamed from psprint/source/fontmanager/afm_hash.cpp)0
-rwxr-xr-xvcl/unx/source/fontmanager/afm_keyword_list (renamed from psprint/source/fontmanager/afm_keyword_list)0
-rw-r--r--vcl/unx/source/fontmanager/fontcache.cxx (renamed from psprint/source/fontmanager/fontcache.cxx)15
-rw-r--r--vcl/unx/source/fontmanager/fontconfig.cxx (renamed from psprint/source/fontmanager/fontconfig.cxx)34
-rw-r--r--vcl/unx/source/fontmanager/fontmanager.cxx (renamed from psprint/source/fontmanager/fontmanager.cxx)209
-rw-r--r--vcl/unx/source/fontmanager/helper.cxx (renamed from psprint/source/helper/helper.cxx)36
-rw-r--r--vcl/unx/source/fontmanager/makefile.mk (renamed from psprint/source/fontmanager/makefile.mk)5
-rw-r--r--vcl/unx/source/fontmanager/parseAFM.cxx (renamed from psprint/source/fontmanager/parseAFM.cxx)10
-rw-r--r--vcl/unx/source/fontmanager/parseAFM.hxx (renamed from psprint/source/fontmanager/parseAFM.hxx)0
-rw-r--r--vcl/unx/source/gdi/dtint.cxx6
-rw-r--r--vcl/unx/source/gdi/gcach_xpeer.cxx3
-rw-r--r--vcl/unx/source/gdi/macosxint.cxx250
-rw-r--r--vcl/unx/source/gdi/macosxrc.txt33
-rw-r--r--vcl/unx/source/gdi/makefile.mk8
-rw-r--r--vcl/unx/source/gdi/pspgraphics.cxx24
-rw-r--r--vcl/unx/source/gdi/salgdi.cxx41
-rw-r--r--vcl/unx/source/gdi/salgdi2.cxx28
-rw-r--r--vcl/unx/source/gdi/salgdi3.cxx68
-rw-r--r--vcl/unx/source/gdi/salprnpsp.cxx87
-rw-r--r--vcl/unx/source/gdi/xprintext.cxx656
-rw-r--r--vcl/unx/source/gdi/xrender_peer.cxx4
-rw-r--r--vcl/unx/source/printer/cupsmgr.cxx (renamed from psprint/source/printer/cupsmgr.cxx)20
-rw-r--r--vcl/unx/source/printer/jobdata.cxx (renamed from psprint/source/printer/jobdata.cxx)12
-rw-r--r--vcl/unx/source/printer/makefile.mk (renamed from psprint/source/printer/makefile.mk)5
-rw-r--r--vcl/unx/source/printer/ppdparser.cxx (renamed from psprint/source/helper/ppdparser.cxx)30
-rw-r--r--vcl/unx/source/printer/printerinfomanager.cxx (renamed from psprint/source/printer/printerinfomanager.cxx)36
-rw-r--r--vcl/unx/source/printergfx/bitmap_gfx.cxx (renamed from psprint/source/printergfx/bitmap_gfx.cxx)10
-rw-r--r--vcl/unx/source/printergfx/common_gfx.cxx (renamed from psprint/source/printergfx/common_gfx.cxx)28
-rw-r--r--vcl/unx/source/printergfx/glyphset.cxx (renamed from psprint/source/printergfx/glyphset.cxx)34
-rw-r--r--vcl/unx/source/printergfx/glyphset.hxx (renamed from psprint/source/printergfx/glyphset.hxx)14
-rw-r--r--vcl/unx/source/printergfx/makefile.mk (renamed from psprint/source/printergfx/makefile.mk)6
-rw-r--r--vcl/unx/source/printergfx/printerjob.cxx (renamed from psprint/source/printergfx/printerjob.cxx)36
-rw-r--r--vcl/unx/source/printergfx/psheader.ps (renamed from psprint/source/printergfx/psheader.ps)0
-rw-r--r--vcl/unx/source/printergfx/psputil.cxx (renamed from psprint/source/printergfx/psputil.cxx)8
-rw-r--r--vcl/unx/source/printergfx/psputil.hxx (renamed from psprint/source/printergfx/psputil.hxx)11
-rw-r--r--vcl/unx/source/printergfx/text_gfx.cxx (renamed from psprint/source/printergfx/text_gfx.cxx)21
-rw-r--r--vcl/unx/source/window/salframe.cxx120
-rw-r--r--vcl/util/linksvp/makefile.mk1
-rw-r--r--vcl/util/makefile.mk36
-rw-r--r--vcl/win/source/gdi/salgdi3.cxx72
-rwxr-xr-xvcl/win/source/gdi/winlayout.cxx27
122 files changed, 843 insertions, 2710 deletions
diff --git a/padmin/source/adddlg.cxx b/padmin/source/adddlg.cxx
index 587ddaad6595..c10be2d83fcd 100644
--- a/padmin/source/adddlg.cxx
+++ b/padmin/source/adddlg.cxx
@@ -29,15 +29,17 @@
************************************************************************/
#include <unistd.h>
-#include <vcl/msgbox.hxx>
-#include <adddlg.hxx>
-#include <newppdlg.hxx>
-#include <cmddlg.hxx>
-#ifndef _PAD_PADIALOG_HRC_
-#include <padialog.hrc>
-#endif
-#include <psprint/strhelper.hxx>
-#include <osl/thread.h>
+
+#include "adddlg.hxx"
+#include "newppdlg.hxx"
+#include "cmddlg.hxx"
+#include "padialog.hrc"
+
+#include "vcl/msgbox.hxx"
+#include "vcl/strhelper.hxx"
+
+#include "osl/thread.h"
+
#include <hash_set>
diff --git a/padmin/source/adddlg.hxx b/padmin/source/adddlg.hxx
index c29390994bd4..e6fe17f30188 100644
--- a/padmin/source/adddlg.hxx
+++ b/padmin/source/adddlg.hxx
@@ -31,18 +31,15 @@
#ifndef _PAD_ADDDLG_HXX_
#define _PAD_ADDDLG_HXX_
-#include <vcl/dialog.hxx>
-#include <vcl/tabpage.hxx>
-#ifndef _SV_BUTTON_HXX
-#include <vcl/button.hxx>
-#endif
-#include <vcl/fixed.hxx>
-#include <vcl/combobox.hxx>
-#ifndef _PSP_PRINTERINFOMANAGER_HXX_
-#include <psprint/printerinfomanager.hxx>
-#endif
-#include <helper.hxx>
-#include <titlectrl.hxx>
+#include "helper.hxx"
+#include "titlectrl.hxx"
+
+#include "vcl/dialog.hxx"
+#include "vcl/tabpage.hxx"
+#include "vcl/button.hxx"
+#include "vcl/fixed.hxx"
+#include "vcl/combobox.hxx"
+#include "vcl/printerinfomanager.hxx"
namespace padmin
{
diff --git a/padmin/source/fontentry.cxx b/padmin/source/fontentry.cxx
index 29991c8193ea..d76171e704c1 100644
--- a/padmin/source/fontentry.cxx
+++ b/padmin/source/fontentry.cxx
@@ -28,25 +28,17 @@
*
************************************************************************/
-#include <vcl/msgbox.hxx>
-#include <osl/thread.h>
-#include <psprint/fontmanager.hxx>
+#include "fontentry.hxx"
+#include "helper.hxx"
+#include "padialog.hrc"
+#include "vcl/strhelper.hxx"
-#ifndef _PAD_PADIALOG_HRC_
-#include <padialog.hrc>
-#endif
-#include <fontentry.hxx>
-#include <helper.hxx>
-#ifndef _CONFIG_HXX_
-#include <tools/config.hxx>
-#endif
-#include <psprint/strhelper.hxx>
+#include "vcl/msgbox.hxx"
+#include "vcl/fontmanager.hxx"
-#if 0
-#include <convafm.hxx>
-#include <progress.hxx>
-#include <osl/file.hxx>
-#endif
+#include "osl/thread.h"
+
+#include "tools/config.hxx"
using namespace padmin;
using namespace osl;
diff --git a/padmin/source/fontentry.hxx b/padmin/source/fontentry.hxx
index dab60c6f2d99..30f53db97051 100644
--- a/padmin/source/fontentry.hxx
+++ b/padmin/source/fontentry.hxx
@@ -31,21 +31,18 @@
#ifndef _PAD_FONTENTRY_HXX_
#define _PAD_FONTENTRY_HXX_
-#include <vcl/timer.hxx>
-#include <vcl/dialog.hxx>
-#ifndef _SV_BUTTON_HXX
-#include <vcl/button.hxx>
-#endif
-#include <vcl/combobox.hxx>
-#include <vcl/lstbox.hxx>
-#include <vcl/group.hxx>
-#include <tools/urlobj.hxx>
-#include <psprint/fontmanager.hxx>
-#ifndef _PAD_PRGRESS_HXX
-#include <progress.hxx>
-#endif
-#include <psprint/fontmanager.hxx>
-#include <helper.hxx>
+#include "progress.hxx"
+#include "helper.hxx"
+
+#include "vcl/timer.hxx"
+#include "vcl/dialog.hxx"
+#include "vcl/button.hxx"
+#include "vcl/combobox.hxx"
+#include "vcl/lstbox.hxx"
+#include "vcl/group.hxx"
+#include "vcl/fontmanager.hxx"
+
+#include "tools/urlobj.hxx"
namespace padmin {
diff --git a/padmin/source/makefile.mk b/padmin/source/makefile.mk
index 6edae757e8f6..bcd7d0210af4 100644
--- a/padmin/source/makefile.mk
+++ b/padmin/source/makefile.mk
@@ -83,7 +83,6 @@ SHL1OBJS=$(SLOFILES)
SHL1STDLIBS=\
$(SVTOOLLIB) \
$(VCLLIB) \
- -lpsp$(DLLPOSTFIX) \
$(UNOTOOLSLIB) \
$(TOOLSLIB) \
$(COMPHELPERLIB) \
diff --git a/padmin/source/newppdlg.cxx b/padmin/source/newppdlg.cxx
index 957e8a062a7e..8d5414a2ceef 100644
--- a/padmin/source/newppdlg.cxx
+++ b/padmin/source/newppdlg.cxx
@@ -30,22 +30,23 @@
#include <stdio.h>
#include <unistd.h>
-#include <psprint/ppdparser.hxx>
-#include <psprint/helper.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/mnemonic.hxx>
-#include <tools/urlobj.hxx>
-#ifndef __SGI_STL_LIST
+
+#include "helper.hxx"
+#include "padialog.hrc"
+#include "newppdlg.hxx"
+#include "padialog.hxx"
+#include "progress.hxx"
+
+#include "vcl/ppdparser.hxx"
+#include "vcl/helper.hxx"
+#include "vcl/svapp.hxx"
+#include "vcl/mnemonic.hxx"
+
+#include "tools/urlobj.hxx"
+
+#include "osl/file.hxx"
+
#include <list>
-#endif
-#include <osl/file.hxx>
-#include <helper.hxx>
-#ifndef _PAD_PADIALOG_HRC_
-#include <padialog.hrc>
-#endif
-#include <newppdlg.hxx>
-#include <padialog.hxx>
-#include <progress.hxx>
#define PPDIMPORT_GROUP "PPDImport"
diff --git a/padmin/source/padialog.cxx b/padmin/source/padialog.cxx
index 3e1d3496d17c..5b49409a1c8a 100644
--- a/padmin/source/padialog.cxx
+++ b/padmin/source/padialog.cxx
@@ -33,34 +33,33 @@
#include <unistd.h>
#include <string.h>
#include <math.h>
-#include <vcl/msgbox.hxx>
-#include <vcl/print.hxx>
-#include <vcl/gradient.hxx>
-#include <vcl/bitmap.hxx>
-#include <vcl/lineinfo.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/event.hxx>
-#include <tools/stream.hxx>
-#include <tools/color.hxx>
-#ifndef _PAD_PADIALOG_HRC_
-#include <padialog.hrc>
-#endif
-#include <fontentry.hxx>
-#include <helper.hxx>
-#ifndef _PSP_PRINTERINFOMANAGER_HXX_
-#include <psprint/printerinfomanager.hxx>
-#endif
-#include <padialog.hxx>
-#include <adddlg.hxx>
-#include <prtsetup.hxx>
-#include <osl/file.hxx>
-#include <unotools/localedatawrapper.hxx>
-#include <unotools/configitem.hxx>
-#include <unotools/configmgr.hxx>
-#ifndef _RTL_USTRBUF_HXX
-#include <rtl/ustrbuf.hxx>
-#endif
+#include "padialog.hrc"
+#include "fontentry.hxx"
+#include "helper.hxx"
+#include "padialog.hxx"
+#include "adddlg.hxx"
+#include "prtsetup.hxx"
+
+#include "vcl/msgbox.hxx"
+#include "vcl/print.hxx"
+#include "vcl/gradient.hxx"
+#include "vcl/bitmap.hxx"
+#include "vcl/lineinfo.hxx"
+#include "vcl/svapp.hxx"
+#include "vcl/event.hxx"
+#include "vcl/printerinfomanager.hxx"
+
+#include "tools/stream.hxx"
+#include "tools/color.hxx"
+
+#include "osl/file.hxx"
+
+#include "rtl/ustrbuf.hxx"
+
+#include "unotools/localedatawrapper.hxx"
+#include "unotools/configitem.hxx"
+#include "unotools/configmgr.hxx"
using namespace psp;
using namespace rtl;
using namespace padmin;
diff --git a/padmin/source/prtsetup.cxx b/padmin/source/prtsetup.cxx
index 1b363e710f7a..1a6894789bb5 100644
--- a/padmin/source/prtsetup.cxx
+++ b/padmin/source/prtsetup.cxx
@@ -28,14 +28,14 @@
*
************************************************************************/
-#include <psprint/fontmanager.hxx>
-#include <prtsetup.hxx>
-#include <helper.hxx> // for PaResId
-#ifndef _PAD_RTSETUP_HRC_
-#include <rtsetup.hrc>
-#endif
-#include <cmddlg.hxx>
-#include <osl/thread.h>
+#include "prtsetup.hxx"
+#include "helper.hxx" // for PaResId
+#include "rtsetup.hrc"
+#include "cmddlg.hxx"
+
+#include "vcl/fontmanager.hxx"
+
+#include "osl/thread.h"
#define LSCAPE_STRING String( RTL_CONSTASCII_USTRINGPARAM( "Landscape" ) )
#define PORTRAIT_STRING String( RTL_CONSTASCII_USTRINGPARAM( "Portrait" ) )
diff --git a/padmin/source/prtsetup.hxx b/padmin/source/prtsetup.hxx
index 171f8bdf29f5..56e68336dfd8 100644
--- a/padmin/source/prtsetup.hxx
+++ b/padmin/source/prtsetup.hxx
@@ -31,22 +31,20 @@
#ifndef _PAD_PRTSETUP_HXX_
#define _PAD_PRTSETUP_HXX_
-#include <tools/link.hxx>
-#include <vcl/tabdlg.hxx>
-#include <vcl/tabpage.hxx>
-#include <vcl/tabctrl.hxx>
-#ifndef _SV_BUTTON_HXX
-#include <vcl/button.hxx>
-#endif
-#include <vcl/fixed.hxx>
-#include <vcl/lstbox.hxx>
-#include <vcl/field.hxx>
-#include <vcl/combobox.hxx>
-#ifndef _PSPPRINT_PPDPARSER_HXX_
-#include <psprint/ppdparser.hxx>
-#endif
-#include <psprint/printerinfomanager.hxx>
-#include <helper.hxx>
+#include "helper.hxx"
+
+#include "tools/link.hxx"
+
+#include "vcl/tabdlg.hxx"
+#include "vcl/tabpage.hxx"
+#include "vcl/tabctrl.hxx"
+#include "vcl/button.hxx"
+#include "vcl/fixed.hxx"
+#include "vcl/lstbox.hxx"
+#include "vcl/field.hxx"
+#include "vcl/combobox.hxx"
+#include "vcl/ppdparser.hxx"
+#include "vcl/printerinfomanager.hxx"
namespace padmin {
diff --git a/psprint/inc/makefile.mk b/psprint/inc/makefile.mk
deleted file mode 100644
index d553bfa1eb94..000000000000
--- a/psprint/inc/makefile.mk
+++ /dev/null
@@ -1,51 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.3 $
-#
-# 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=psprint
-TARGET=inc
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.IF "$(ENABLE_PCH)"!=""
-ALLTAR : \
- $(SLO)$/precompiled.pch \
- $(SLO)$/precompiled_ex.pch
-
-.ENDIF # "$(ENABLE_PCH)"!=""
-
diff --git a/psprint/inc/pch/precompiled_psprint.cxx b/psprint/inc/pch/precompiled_psprint.cxx
deleted file mode 100644
index a3bafabe8e0a..000000000000
--- a/psprint/inc/pch/precompiled_psprint.cxx
+++ /dev/null
@@ -1,32 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: precompiled_psprint.cxx,v $
- * $Revision: 1.3 $
- *
- * 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 "precompiled_psprint.hxx"
-
diff --git a/psprint/inc/pch/precompiled_psprint.hxx b/psprint/inc/pch/precompiled_psprint.hxx
deleted file mode 100644
index 0cf979d35851..000000000000
--- a/psprint/inc/pch/precompiled_psprint.hxx
+++ /dev/null
@@ -1,35 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: precompiled_psprint.hxx,v $
- * $Revision: 1.3 $
- *
- * 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): Generated on 2006-09-01 17:49:54.170635
-
-#ifdef PRECOMPILED_HEADERS
-#endif
-
diff --git a/psprint/prj/build.lst b/psprint/prj/build.lst
deleted file mode 100644
index 2161df02c527..000000000000
--- a/psprint/prj/build.lst
+++ /dev/null
@@ -1,9 +0,0 @@
-pp psprint : tools unotools cpputools jvmaccess SO:print_header jvmfwk NULL
-pp psprint usr1 - all pp_mkout NULL
-pp psprint\inc nmake - all pp_inc NULL
-pp psprint\source\fontsubset nmake - all pp_fontsset pp_inc NULL
-pp psprint\source\printer nmake - u pp_printer pp_inc NULL
-pp psprint\source\fontmanager nmake - u pp_fontmgr pp_inc NULL
-pp psprint\source\helper nmake - u pp_helper pp_inc NULL
-pp psprint\source\printergfx nmake - u pp_printergfx pp_inc NULL
-pp psprint\util nmake - all pp_util pp_fontmgr.u pp_fontsset pp_helper.u pp_printer.u pp_printergfx.u NULL
diff --git a/psprint/prj/d.lst b/psprint/prj/d.lst
deleted file mode 100644
index f11667bf9742..000000000000
--- a/psprint/prj/d.lst
+++ /dev/null
@@ -1,10 +0,0 @@
-mkdir: %_DEST%\inc%_EXT%\psprint
-
-..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%
-..\%__SRC%\slb\apsp.lib %_DEST%\lib%_EXT%\apsp.lib
-..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
-..\%__SRC%\lib\libpsp.a %_DEST%\lib%_EXT%\libpsp.a
-
-..\inc\psprint\*.hxx %_DEST%\inc%_EXT%\psprint\*.hxx
-..\source\fontsubset\sft.h %_DEST%\inc%_EXT%\psprint\sft.h
-..\source\fontsubset\list.h %_DEST%\inc%_EXT%\psprint\list.h
diff --git a/psprint/source/helper/makefile.mk b/psprint/source/helper/makefile.mk
deleted file mode 100644
index 597a9a57f75f..000000000000
--- a/psprint/source/helper/makefile.mk
+++ /dev/null
@@ -1,65 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.6 $
-#
-# 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=psprint
-TARGET=helper
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-.IF "$(GUIBASE)"=="aqua"
-
-dummy:
- @echo "Nothing to build for GUIBASE $(GUIBASE)"
-
-.ELSE # "$(GUIBASE)"=="aqua"
-
-.IF "$(WITH_SYSTEM_PPD_DIR)" != ""
-CDEFS += -DSYSTEM_PPD_DIR=\"$(WITH_SYSTEM_PPD_DIR)\"
-.ENDIF
-
-SLOFILES=\
- $(SLO)$/ppdparser.obj \
- $(SLO)$/strhelper.obj \
- $(SLO)$/helper.obj
-
-
-.ENDIF # GUIBASE = aqua
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/psprint/util/libpsp_linux.map b/psprint/util/libpsp_linux.map
deleted file mode 100644
index 7a13241d269b..000000000000
--- a/psprint/util/libpsp_linux.map
+++ /dev/null
@@ -1,9 +0,0 @@
-LIBPSPRINT_1_0 {
- global:
- *psp*;
- OpenTTFontBuffer;
- CloseTTFont;
- GetTTGlobalFontInfo;
- local:
- *;
-};
diff --git a/psprint/util/libpsp_mingw.map b/psprint/util/libpsp_mingw.map
deleted file mode 100644
index 8dabb61fd8ea..000000000000
--- a/psprint/util/libpsp_mingw.map
+++ /dev/null
@@ -1,12 +0,0 @@
-UDK_3_0_0 {
- global:
- *psp*;
- OpenTTFontBuffer;
- MapChar;
- GetTTGlobalFontInfo;
- GetTTSimpleGlyphMetrics;
- CreateTTFromTTGlyphs;
- CloseTTFont;
- local:
- *;
-};
diff --git a/psprint/util/libpsp_solaris.map b/psprint/util/libpsp_solaris.map
deleted file mode 100644
index 873189c2bb6f..000000000000
--- a/psprint/util/libpsp_solaris.map
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- local:
- AddTable;
- cmapAdd;
- CountTTCFonts;
- CreateT3FromTTGlyphs;
- CreateT42FromTTGlyphs;
- CreateTTFromTTGlyphs;
- DisposeNameRecords;
- GetRawData;
- GetTTGlyphComponents;
- GetTTGlyphPoints;
- GetTTNameRecords;
- GetTTRawGlyphData;
- GetTTSimpleCharMetrics;
- GetTTSimpleGlyphMetrics;
- glyfAdd;
- glyfCount;
- listAppend;
- listClear;
- listCount;
- listCurrent;
- listDispose;
- listFind;
- listIsEmpty;
- listNewEmpty;
- listNext;
- listPositionAt;
- listRemove;
- listSetElementDtor;
- listSkipForward;
- listToFirst;
- listToLast;
- MapChar;
- MapString;
- modextra;
- modname;
- modver;
- nameAdd;
- OpenTTFontFile;
- ReadGSUB;
- RemoveTable;
- StreamToFile;
- StreamToMemory;
- TranslateChar12;
- TranslateChar13;
- TranslateChar14;
- TranslateChar15;
- TranslateChar16;
- TranslateString12;
- TranslateString13;
- TranslateString14;
- TranslateString15;
- TranslateString16;
- TrueTypeCreatorDispose;
- TrueTypeCreatorNewEmpty;
- TrueTypeTableDispose;
- TrueTypeTableNew;
- TrueTypeTableNew_cmap;
- TrueTypeTableNew_glyf;
- TrueTypeTableNew_head;
- TrueTypeTableNew_hhea;
- TrueTypeTableNew_loca;
- TrueTypeTableNew_maxp;
- TrueTypeTableNew_name;
- TrueTypeTableNew_post;
- ulcodes;
- UseGSUB;
- xlat_1_2;
- xlat_1_3;
- xlat_1_4;
- xlat_1_5;
- xlat_1_6;
-};
diff --git a/psprint/util/makefile.mk b/psprint/util/makefile.mk
deleted file mode 100644
index cc0e73ae23e2..000000000000
--- a/psprint/util/makefile.mk
+++ /dev/null
@@ -1,87 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.24 $
-#
-# 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=psprint
-TARGET=psp
-
-# --- Settings -----------------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Windows, OS/2 and Mac OS X Aqua Targets ----------------------------
-
-.IF "$(OS)"=="WNT" || "$(OS)"=="OS2" || "$(GUIBASE)"=="aqua"
-LIB1ARCHIV=$(LB)$/lib$(TARGET).a
-LIB1TARGET= $(SLB)$/a$(TARGET).lib
-LIB1FILES= $(SLB)$/fontsubset.lib
-
-# --- Other Targets ---
-.ELSE
-
-LIB1TARGET= $(SLB)$/$(TARGET).lib
-LIB1FILES= $(SLB)$/fontman.lib \
- $(SLB)$/helper.lib \
- $(SLB)$/printer.lib \
- $(SLB)$/fontsubset.lib \
- $(SLB)$/gfx.lib
-
-SHL1TARGET= psp$(DLLPOSTFIX)
-SHL1IMPLIB= ipsp
-SHL1LIBS=$(LIB1FILES)
-
-.IF "$(OS)"=="SOLARIS" && "$(COM)"!="GCC"
-SHL1VERSIONMAP=libpsp_solaris.map
-.ELSE # should work for all gcc/binutils based linker (ld)
-SHL1VERSIONMAP=libpsp_linux.map
-.ENDIF
-
-SHL1STDLIBS=$(UNOTOOLSLIB) \
- $(I18NISOLANGLIB) \
- $(TOOLSLIB) \
- $(COMPHELPERLIB) \
- $(CPPULIB) \
- $(SALLIB) \
- -lX11
-
-.IF "$(LIBPAPER_LINK)" == "YES"
-SHL1STDLIBS += -lpaper
-.ENDIF
-
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-
-.ENDIF # "$(OS)"=="WNT"
-
-# --- Targets ------------------------------------------------------------
-
-
-.INCLUDE : target.mk
diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx
index 962fa1302ae4..c39dc26f370f 100644
--- a/vcl/aqua/source/gdi/salgdi.cxx
+++ b/vcl/aqua/source/gdi/salgdi.cxx
@@ -36,20 +36,22 @@
#include "salbmp.h"
#include "salframe.h"
#include "salcolorutils.hxx"
+#include "list.h"
+#include "sft.h"
+#include "salatsuifontutils.hxx"
+
#include "vcl/impfont.hxx"
-#include "psprint/list.h"
-#include "psprint/sft.h"
+#include "vcl/sysdata.hxx"
+#include "vcl/sallayout.hxx"
+#include "vcl/svapp.hxx"
+
#include "osl/file.hxx"
-#include "vos/mutex.hxx"
#include "osl/process.h"
-#include "rtl/bootstrap.h"
-#include "rtl/strbuf.hxx"
-#include "vcl/sysdata.hxx"
+#include "vos/mutex.hxx"
-#include "vcl/sallayout.hxx"
-#include "salatsuifontutils.hxx"
-#include "vcl/svapp.hxx"
+#include "rtl/bootstrap.h"
+#include "rtl/strbuf.hxx"
#include "basegfx/range/b2drectangle.hxx"
#include "basegfx/polygon/b2dpolygon.hxx"
diff --git a/psprint/inc/cupsmgr.hxx b/vcl/inc/cupsmgr.hxx
index 803d440ad3fd..9caec2d30031 100644
--- a/psprint/inc/cupsmgr.hxx
+++ b/vcl/inc/cupsmgr.hxx
@@ -31,10 +31,10 @@
#ifndef _PSPRINT_CUPSMGR_HXX_
#define _PSPRINT_CUPSMGR_HXX_
-#include <psprint/printerinfomanager.hxx>
-#include <osl/module.h>
-#include <osl/thread.h>
-#include <osl/mutex.hxx>
+#include "vcl/printerinfomanager.hxx"
+#include "osl/module.h"
+#include "osl/thread.h"
+#include "osl/mutex.hxx"
namespace psp
{
diff --git a/psprint/source/fontsubset/list.h b/vcl/inc/list.h
index b86521a1f666..b86521a1f666 100644
--- a/psprint/source/fontsubset/list.h
+++ b/vcl/inc/list.h
diff --git a/psprint/source/fontsubset/sft.h b/vcl/inc/sft.h
index efda0903afc5..efda0903afc5 100644
--- a/psprint/source/fontsubset/sft.h
+++ b/vcl/inc/sft.h
diff --git a/psprint/inc/psprint/fontcache.hxx b/vcl/inc/vcl/fontcache.hxx
index 60521e175905..acc2e1c10092 100644
--- a/psprint/inc/psprint/fontcache.hxx
+++ b/vcl/inc/vcl/fontcache.hxx
@@ -31,15 +31,17 @@
#ifndef _PSPRINT_FONTCACHE_HXX
#define _PSPRINT_FONTCACHE_HXX
-#include <psprint/fontmanager.hxx>
-#include <tools/string.hxx>
+#include "vcl/dllapi.h"
+#include "vcl/fontmanager.hxx"
+
+#include "tools/string.hxx"
#include <hash_map>
namespace psp
{
-class FontCache
+class VCL_DLLPUBLIC FontCache
{
struct FontDir;
friend class FontDir;
diff --git a/psprint/inc/psprint/fontmanager.hxx b/vcl/inc/vcl/fontmanager.hxx
index 51f0a066afac..bdfd30d12f7f 100644
--- a/psprint/inc/psprint/fontmanager.hxx
+++ b/vcl/inc/vcl/fontmanager.hxx
@@ -32,17 +32,14 @@
#define _PSPRINT_FONTMANAGER_HXX_
#include <hash_map>
-#ifndef __SGI_STL_MAP
#include <map>
-#endif
-#ifndef __SGI_STL_LIST
#include <list>
-#endif
-#ifndef __SGI_STL_SET
#include <set>
-#endif
-#include <psprint/helper.hxx>
-#include <com/sun/star/lang/Locale.hpp>
+
+#include "vcl/dllapi.h"
+#include "vcl/helper.hxx"
+
+#include "com/sun/star/lang/Locale.hpp"
#define ATOM_FAMILYNAME 2
#define ATOM_PSNAME 3
@@ -228,7 +225,7 @@ class FontCache;
class FontCache;
-class PrintFontManager
+class VCL_DLLPUBLIC PrintFontManager
{
struct PrintFont;
struct TrueTypeFontFile;
@@ -437,8 +434,6 @@ class PrintFontManager
const rtl::OString& getDirectory( int nAtom ) const;
int getDirectoryAtom( const rtl::OString& rDirectory, bool bCreate = false );
- void getServerDirectories(); // get font server directories on e.g. redhat
-
/* try to initialize fonts from libfontconfig
called from <code>initialize()</code>
@@ -478,10 +473,7 @@ public:
int addFontFile( const rtl::OString& rFileName, int nFaceNum );
- // initialize takes an X Display*
- // if NULL then an XOpenDisplay( NULL ) is performed
- // the Display connection is used to get the font path
- void initialize( void* pDisplay = NULL );
+ void initialize();
// returns the number of managed fonts
int getFontCount() const { return m_aFonts.size(); }
diff --git a/psprint/inc/psprint/helper.hxx b/vcl/inc/vcl/helper.hxx
index 427836201735..04576e30b516 100644
--- a/psprint/inc/psprint/helper.hxx
+++ b/vcl/inc/vcl/helper.hxx
@@ -32,8 +32,10 @@
#define _PSPRINT_HELPER_HXX_
#include <list>
-#include <hash_map>
-#include <rtl/ustring.hxx>
+
+#include "vcl/dllapi.h"
+
+#include "rtl/ustring.hxx"
// forwards
@@ -42,20 +44,25 @@ namespace osl { class File; }
namespace psp {
typedef int fontID;
-void getPrinterPathList( std::list< rtl::OUString >& rPathList, const char* pSubDir );
-const rtl::OUString& getFontPath();
+void VCL_DLLPUBLIC getPrinterPathList( std::list< rtl::OUString >& rPathList, const char* pSubDir );
+
+// note: gcc 3.4.1 warns about visibility if we retunr a const rtl::OUString& here
+// seems to be a bug in gcc, now we return an object instead of a reference
+rtl::OUString VCL_DLLPUBLIC getFontPath();
-bool convertPfbToPfa( osl::File& rInFile, osl::File& rOutFile );
+bool VCL_DLLPUBLIC convertPfbToPfa( osl::File& rInFile, osl::File& rOutFile );
// normalized path (equivalent to realpath)
-void normPath( rtl::OString& rPath );
+void VCL_DLLPUBLIC normPath( rtl::OString& rPath );
// splits rOrgPath into dirname and basename
// rOrgPath will be subject to normPath
-void splitPath( rtl::OString& rOrgPath, rtl::OString& rDir, rtl::OString& rBase );
+void VCL_DLLPUBLIC splitPath( rtl::OString& rOrgPath, rtl::OString& rDir, rtl::OString& rBase );
enum whichOfficePath { NetPath, UserPath, ConfigPath };
-const rtl::OUString& getOfficePath( enum whichOfficePath ePath );
+// note: gcc 3.4.1 warns about visibility if we retunr a const rtl::OUString& here
+// seems to be a bug in gcc, now we return an object instead of a reference
+rtl::OUString VCL_DLLPUBLIC getOfficePath( enum whichOfficePath ePath );
} // namespace
#endif // _PSPRINT_HELPER_HXX_
diff --git a/psprint/inc/psprint/jobdata.hxx b/vcl/inc/vcl/jobdata.hxx
index 08d8e0057083..4451c566b5bf 100644
--- a/psprint/inc/psprint/jobdata.hxx
+++ b/vcl/inc/vcl/jobdata.hxx
@@ -31,7 +31,7 @@
#ifndef _PSPRINT_JOBDATA_HXX_
#define _PSPRINT_JOBDATA_HXX_
-#include <psprint/ppdparser.hxx>
+#include "vcl/ppdparser.hxx"
namespace psp {
diff --git a/psprint/inc/psprint/ppdparser.hxx b/vcl/inc/vcl/ppdparser.hxx
index baea44ebaf25..5fa47d412f26 100644
--- a/psprint/inc/psprint/ppdparser.hxx
+++ b/vcl/inc/vcl/ppdparser.hxx
@@ -32,9 +32,10 @@
#include <list>
#include <vector>
-#include <psprint/helper.hxx> // hash_map and OUString hash
-#include <tools/string.hxx>
-#include <tools/stream.hxx>
+#include <hash_map>
+
+#include "tools/string.hxx"
+#include "tools/stream.hxx"
#define PRINTER_PPDDIR "driver"
diff --git a/psprint/inc/psprint/printergfx.hxx b/vcl/inc/vcl/printergfx.hxx
index 55816330fa48..3bb242c802dd 100644
--- a/psprint/inc/psprint/printergfx.hxx
+++ b/vcl/inc/vcl/printergfx.hxx
@@ -31,12 +31,11 @@
#ifndef _PSPRINT_PRINTERGFX_HXX_
#define _PSPRINT_PRINTERGFX_HXX_
-#include <psprint/helper.hxx>
-#include <osl/file.hxx>
-#include <tools/gen.hxx>
-#ifndef __SGI_STL_LIST
+#include "vcl/helper.hxx"
+#include "osl/file.hxx"
+#include "tools/gen.hxx"
+
#include <list>
-#endif
#include <hash_map>
namespace psp {
diff --git a/psprint/inc/psprint/printerinfomanager.hxx b/vcl/inc/vcl/printerinfomanager.hxx
index 3a64a998db93..810ad428c9db 100644
--- a/psprint/inc/psprint/printerinfomanager.hxx
+++ b/vcl/inc/vcl/printerinfomanager.hxx
@@ -32,13 +32,14 @@
#define _PSPRINT_PRINTERINFOMANAGER_HXX_
#include <hash_map>
-#ifndef __SGI_STL_LIST
#include <list>
-#endif
-#include <psprint/helper.hxx>
-#include <psprint/jobdata.hxx>
-#include <osl/file.hxx>
-#include <psprint/helper.hxx>
+
+#include "vcl/dllapi.h"
+#include "vcl/helper.hxx"
+#include "vcl/jobdata.hxx"
+#include "vcl/helper.hxx"
+#include "osl/file.hxx"
+
#include <cstdio>
namespace psp
@@ -82,7 +83,7 @@ struct PrinterInfo : JobData
{}
};
-class PrinterInfoManager
+class VCL_DLLPUBLIC PrinterInfoManager
{
public:
enum Type { Default = 0, CUPS = 1 };
diff --git a/psprint/inc/psprint/printerjob.hxx b/vcl/inc/vcl/printerjob.hxx
index 25c69f20a1c3..9880700d4008 100644
--- a/psprint/inc/psprint/printerjob.hxx
+++ b/vcl/inc/vcl/printerjob.hxx
@@ -31,12 +31,11 @@
#ifndef _PSPRINT_PRINTERJOB_HXX_
#define _PSPRINT_PRINTERJOB_HXX_
-#ifndef __SGI_STL_LIST
+#include "vcl/jobdata.hxx"
+#include "osl/file.hxx"
+#include "rtl/string.hxx"
+
#include <list>
-#endif
-#include <psprint/jobdata.hxx>
-#include <osl/file.hxx>
-#include <rtl/string.hxx>
namespace psp {
diff --git a/vcl/inc/vcl/salinst.hxx b/vcl/inc/vcl/salinst.hxx
index cf88b7813ec8..221c9e370ea6 100644
--- a/vcl/inc/vcl/salinst.hxx
+++ b/vcl/inc/vcl/salinst.hxx
@@ -31,14 +31,14 @@
#ifndef _SV_SALINST_HXX
#define _SV_SALINST_HXX
-#ifdef __cplusplus
+#include "vcl/sv.h"
+#include "vcl/dllapi.h"
-#include <tools/string.hxx>
-#endif // __cplusplus
-#include <vcl/sv.h>
-#include <vcl/dllapi.h>
+#include "tools/string.hxx"
-#ifdef __cplusplus
+#include "rtl/string.hxx"
+
+#include <list>
struct SystemParentData;
struct SalPrinterQueueInfo;
@@ -171,6 +171,11 @@ public:
enum ConnectionIdentifierType { AsciiCString, Blob };
virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ) = 0;
+
+ // this is a vehicle for PrintFontManager to bridge the gap between vcl and libvclplug_*
+ // this is only necessary because PrintFontManager is an exported vcl API and therefore
+ // needs to be in libvcl while libvclplug_* do not contain exported C++ API
+ virtual void FillFontPathList( std::list< rtl::OString >& o_rFontPaths );
};
// called from SVMain
@@ -185,8 +190,6 @@ void SalAbort( const XubString& rErrorText );
VCL_DLLPUBLIC const ::rtl::OUString& SalGetDesktopEnvironment();
-#endif // __cplusplus
-
// -----------
// - SalData -
// -----------
diff --git a/psprint/inc/psprint/strhelper.hxx b/vcl/inc/vcl/strhelper.hxx
index 5160d31a205f..b3548a07680b 100644
--- a/psprint/inc/psprint/strhelper.hxx
+++ b/vcl/inc/vcl/strhelper.hxx
@@ -30,24 +30,27 @@
#ifndef _PSPRINT_STRHELPER_HXX_
#define _PSPRINT_STRHELPER_HXX_
+#include "vcl/dllapi.h"
+
#include <tools/string.hxx>
#include <rtl/math.hxx>
+
#include <cstring>
namespace psp {
-String GetCommandLineToken( int, const String& );
-ByteString GetCommandLineToken( int, const ByteString& );
+String VCL_DLLPUBLIC GetCommandLineToken( int, const String& );
+ByteString VCL_DLLPUBLIC GetCommandLineToken( int, const ByteString& );
// gets one token of a unix command line style string
// doublequote, singlequote and singleleftquote protect their respective
// contents
-int GetCommandLineTokenCount( const String& );
-int GetCommandLineTokenCount( const ByteString& );
+int VCL_DLLPUBLIC GetCommandLineTokenCount( const String& );
+int VCL_DLLPUBLIC GetCommandLineTokenCount( const ByteString& );
// returns number of tokens (zero if empty or whitespace only)
-String WhitespaceToSpace( const String&, BOOL bProtect = TRUE );
-ByteString WhitespaceToSpace( const ByteString&, BOOL bProtect = TRUE );
+String VCL_DLLPUBLIC WhitespaceToSpace( const String&, BOOL bProtect = TRUE );
+ByteString VCL_DLLPUBLIC WhitespaceToSpace( const ByteString&, BOOL bProtect = TRUE );
// returns a string with multiple adjacent occurences of whitespace
// converted to a single space. if bProtect is TRUE (nonzero), then
// doublequote, singlequote and singleleftquote protect their respective
@@ -55,13 +58,13 @@ ByteString WhitespaceToSpace( const ByteString&, BOOL bProtect = TRUE );
// parses the first double in the string; decimal is '.' only
-inline double StringToDouble( const String& rStr )
+inline double VCL_DLLPUBLIC StringToDouble( const String& rStr )
{
rtl_math_ConversionStatus eStatus;
return rtl::math::stringToDouble( rStr, sal_Unicode('.'), sal_Unicode(0), &eStatus, NULL);
}
-inline double StringToDouble( const ByteString& rStr )
+inline double VCL_DLLPUBLIC StringToDouble( const ByteString& rStr )
{
rtl_math_ConversionStatus eStatus;
return rtl::math::stringToDouble( rtl::OStringToOUString( rStr, osl_getThreadTextEncoding() ), sal_Unicode('.'), sal_Unicode(0), &eStatus, NULL);
@@ -70,7 +73,7 @@ inline double StringToDouble( const ByteString& rStr )
// fills a character buffer with the string representation of a double
// the buffer has to be long enough (e.g. 128 bytes)
// returns the string len
-inline int getValueOfDouble( char* pBuffer, double f, int nPrecision = 0)
+inline int VCL_DLLPUBLIC getValueOfDouble( char* pBuffer, double f, int nPrecision = 0)
{
rtl::OString aStr( rtl::math::doubleToString( f, rtl_math_StringFormat_G, nPrecision, '.', true ) );
int nLen = aStr.getLength();
diff --git a/vcl/os2/source/gdi/salgdi3.cxx b/vcl/os2/source/gdi/salgdi3.cxx
index e6a5788b401c..15034168269e 100644
--- a/vcl/os2/source/gdi/salgdi3.cxx
+++ b/vcl/os2/source/gdi/salgdi3.cxx
@@ -75,8 +75,8 @@
#endif
#ifndef __SUBFONT_H
-#include <psprint/list.h>
-#include <psprint/sft.h>
+#include <list.h>
+#include <sft.h>
#endif
#ifdef GCP_KERN_HACK
diff --git a/vcl/prj/build.lst b/vcl/prj/build.lst
index eeda7e620d9d..ac93ae71bdd2 100644
--- a/vcl/prj/build.lst
+++ b/vcl/prj/build.lst
@@ -1,4 +1,4 @@
-vc vcl : apple_remote BOOST:boost psprint rsc sot ucbhelper unotools ICU:icu i18npool i18nutil unoil ridljar X11_EXTENSIONS:x11_extensions offuh basegfx basebmp tools transex3 icc NULL
+vc vcl : apple_remote BOOST:boost rsc sot ucbhelper unotools ICU:icu i18npool i18nutil unoil ridljar X11_EXTENSIONS:x11_extensions offuh basegfx basebmp tools transex3 icc NULL
vc vcl usr1 - all vc_mkout NULL
vc vcl\inc nmake - all vc_inc NULL
vc vcl\source\glyphs nmake - all vc_glyphs vc_inc NULL
@@ -8,6 +8,7 @@ vc vcl\source\window nmake - all vc_win vc_inc NULL
vc vcl\source\control nmake - all vc_ctrl vc_inc NULL
vc vcl\source\src nmake - all vc_src vc_inc NULL
vc vcl\source\helper nmake - all vc_hlp vc_inc NULL
+vc vcl\source\fontsubset nmake - all vc_fts vc_inc NULL
vc vcl\source\salmain nmake - all vc_salmain vc_inc NULL
vc vcl\os2\source\app nmake - p vc__appp vc_inc NULL
vc vcl\os2\source\gdi nmake - p vc__gdip vc_inc NULL
@@ -20,7 +21,10 @@ vc vcl\win\source\window nmake - w vc__winw vc_inc NULL
vc vcl\win\source\src nmake - w vc__srcw vc_inc NULL
vc vcl\unx\source\plugadapt nmake - u vc__plug vc_inc NULL
vc vcl\unx\source\app nmake - u vc__appu vc_inc NULL
+vc vcl\unx\source\fontmanager nmake - u vc__ftmu vc_inc NULL
vc vcl\unx\source\gdi nmake - u vc__gdiu vc_inc NULL
+vc vcl\unx\source\printer nmake - u vc__prnu vc_inc NULL
+vc vcl\unx\source\printergfx nmake - u vc__prgu vc_inc NULL
vc vcl\unx\source\window nmake - u vc__winu vc_inc NULL
vc vcl\unx\gtk\a11y nmake - u vc__gtky vc_inc NULL
vc vcl\unx\gtk\app nmake - u vc__gtka vc_inc NULL
@@ -37,6 +41,6 @@ vc vcl\mac\source\app nmake - m vc__appm vc_inc NULL
vc vcl\mac\source\gdi nmake - m vc__gdim vc_inc NULL
vc vcl\mac\source\window nmake - m vc__winm vc_inc NULL
vc vcl\mac\source\src nmake - m vc__srcm vc_inc NULL
-vc vcl\util nmake - all vc_util vc__plug.u vc__aquy.u vc__appa.u vc__appm.m vc__appu.u vc__appw.w vc__appp.p vc__gdia.u vc__gdim.m vc__gdiu.u vc__gdiw.w vc__gdip.p vc__srcm.m vc__srcw.w vc__srcp.p vc__wina.u vc__winm.m vc__winu.u vc__winw.w vc__winp.p vc__gtka.u vc__gtky.u vc__gtkw.u vc__gtkg.u vc__kde.u vc__hl.u vc_app vc_ctrl vc_gdi vc_hlp vc_src vc_win vc_glyphs vc_components NULL
+vc vcl\util nmake - all vc_util vc__plug.u vc__aquy.u vc__appa.u vc__appm.m vc__appu.u vc__appw.w vc__appp.p vc__gdia.u vc__gdim.m vc__gdiu.u vc__gdiw.w vc__gdip.p vc__srcm.m vc__srcw.w vc__srcp.p vc__wina.u vc__winm.m vc__winu.u vc__winw.w vc__winp.p vc__gtka.u vc__gtky.u vc__gtkw.u vc__gtkg.u vc__kde.u vc__hl.u vc__ftmu.u vc__prgu.u vc__prnu.u vc_app vc_ctrl vc_gdi vc_hlp vc_src vc_win vc_glyphs vc_fts vc_components NULL
vc vcl\util\linksvp nmake - u vc_lsvp vc_util NULL
vc vcl\workben nmake - all vc_wrkb vc_util vc_salmain NULL
diff --git a/vcl/prj/d.lst b/vcl/prj/d.lst
index c7a5f7117642..0ddc61170547 100644
--- a/vcl/prj/d.lst
+++ b/vcl/prj/d.lst
@@ -146,5 +146,10 @@ mkdir: %_DEST%\inc%_EXT%\vcl\plug\vcl
..\inc\vcl\pngwrite.hxx %_DEST%\inc%_EXT%\vcl\pngwrite.hxx
..\inc\vcl\smartid.hxx %_DEST%\inc%_EXT%\vcl\smartid.hxx
..\inc\vcl\configsettings.hxx %_DEST%\inc%_EXT%\vcl\configsettings.hxx
+..\inc\vcl\fontmanager.hxx %_DEST%\inc%_EXT%\vcl\fontmanager.hxx
+..\inc\vcl\printerinfomanager.hxx %_DEST%\inc%_EXT%\vcl\printerinfomanager.hxx
+..\inc\vcl\jobdata.hxx %_DEST%\inc%_EXT%\vcl\jobdata.hxx
+..\inc\vcl\ppdparser.hxx %_DEST%\inc%_EXT%\vcl\ppdparser.hxx
+..\inc\vcl\helper.hxx %_DEST%\inc%_EXT%\vcl\helper.hxx
+..\inc\vcl\strhelper.hxx %_DEST%\inc%_EXT%\vcl\strhelper.hxx
-..\%__SRC%\misc\macosxrc.txt %_DEST%\bin%_EXT%\macosxrc.txt
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 36b35ee25833..9d398aef10cd 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -65,6 +65,11 @@ SalInstance::~SalInstance()
{
}
+void SalInstance::FillFontPathList( std::list< rtl::OString >& )
+{
+ // do nothing
+}
+
SalTimer::~SalTimer()
{
}
diff --git a/psprint/source/fontsubset/crc32.c b/vcl/source/fontsubset/crc32.c
index 386b873a011c..386b873a011c 100644
--- a/psprint/source/fontsubset/crc32.c
+++ b/vcl/source/fontsubset/crc32.c
diff --git a/psprint/source/fontsubset/crc32.h b/vcl/source/fontsubset/crc32.h
index fa9ef71a1432..fa9ef71a1432 100644
--- a/psprint/source/fontsubset/crc32.h
+++ b/vcl/source/fontsubset/crc32.h
diff --git a/psprint/source/fontsubset/gsub.cxx b/vcl/source/fontsubset/gsub.cxx
index 578daa4646b5..e73ccccc12a4 100644
--- a/psprint/source/fontsubset/gsub.cxx
+++ b/vcl/source/fontsubset/gsub.cxx
@@ -29,7 +29,7 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_psprint.hxx"
+#include "precompiled_vcl.hxx"
#include "sft.h"
#undef true
diff --git a/psprint/source/fontsubset/gsub.h b/vcl/source/fontsubset/gsub.h
index c64b2abb7e00..c64b2abb7e00 100644
--- a/psprint/source/fontsubset/gsub.h
+++ b/vcl/source/fontsubset/gsub.h
diff --git a/psprint/source/fontsubset/list.c b/vcl/source/fontsubset/list.c
index 83ebe8595a46..83ebe8595a46 100644
--- a/psprint/source/fontsubset/list.c
+++ b/vcl/source/fontsubset/list.c
diff --git a/psprint/source/fontsubset/makefile.mk b/vcl/source/fontsubset/makefile.mk
index e6c22bbcac17..b1d2552752a8 100644
--- a/psprint/source/fontsubset/makefile.mk
+++ b/vcl/source/fontsubset/makefile.mk
@@ -31,7 +31,7 @@
PRJ=..$/..
-PRJNAME=psprint
+PRJNAME=vcl
TARGET=fontsubset
# --- Settings -----------------------------------------------------
diff --git a/psprint/source/fontsubset/sft.c b/vcl/source/fontsubset/sft.c
index c3a8ce377282..be54a872fd7f 100644
--- a/psprint/source/fontsubset/sft.c
+++ b/vcl/source/fontsubset/sft.c
@@ -1683,12 +1683,6 @@ int OpenTTFontFile( const char* fname, sal_uInt32 facenum, TrueTypeFont** ttf )
* Size will be 0, but fonts smaller than 4 bytes would be broken anyway.
*/
if ((*ttf)->fsize == 0) {
-#ifdef MACOSX
- fprintf( stderr, "WARNING: Font file %s\nhad a data-fork size of 0, it is either:\n", (*ttf)->fname );
- fprintf( stderr, " 1) A Resource-Based font that has a .ttf at the end of its name\n" );
- fprintf( stderr, " (in which case '/usr/local/bin/fondu <font-file-name>' should be run to convert it instead)\n" );
- fprintf( stderr, " 2) A bad font\n\n" );
-#endif
ret = SF_BADFILE;
goto cleanup;
}
diff --git a/psprint/source/fontsubset/ttcr.c b/vcl/source/fontsubset/ttcr.c
index e8c9d8cf74e0..e8c9d8cf74e0 100644
--- a/psprint/source/fontsubset/ttcr.c
+++ b/vcl/source/fontsubset/ttcr.c
diff --git a/psprint/source/fontsubset/ttcr.h b/vcl/source/fontsubset/ttcr.h
index 95aa1a6c9e99..95aa1a6c9e99 100644
--- a/psprint/source/fontsubset/ttcr.h
+++ b/vcl/source/fontsubset/ttcr.h
diff --git a/psprint/source/fontsubset/u2big5.inc b/vcl/source/fontsubset/u2big5.inc
index 2883e9d99094..2883e9d99094 100644
--- a/psprint/source/fontsubset/u2big5.inc
+++ b/vcl/source/fontsubset/u2big5.inc
diff --git a/psprint/source/fontsubset/u2johab.inc b/vcl/source/fontsubset/u2johab.inc
index ae07cc571fb8..ae07cc571fb8 100644
--- a/psprint/source/fontsubset/u2johab.inc
+++ b/vcl/source/fontsubset/u2johab.inc
diff --git a/psprint/source/fontsubset/u2prc.inc b/vcl/source/fontsubset/u2prc.inc
index 2479d23ebe6f..2479d23ebe6f 100644
--- a/psprint/source/fontsubset/u2prc.inc
+++ b/vcl/source/fontsubset/u2prc.inc
diff --git a/psprint/source/fontsubset/u2shiftjis.inc b/vcl/source/fontsubset/u2shiftjis.inc
index fb130feaebe2..fb130feaebe2 100644
--- a/psprint/source/fontsubset/u2shiftjis.inc
+++ b/vcl/source/fontsubset/u2shiftjis.inc
diff --git a/psprint/source/fontsubset/u2wansung.inc b/vcl/source/fontsubset/u2wansung.inc
index 0cb8867f1c2a..0cb8867f1c2a 100644
--- a/psprint/source/fontsubset/u2wansung.inc
+++ b/vcl/source/fontsubset/u2wansung.inc
diff --git a/psprint/source/fontsubset/xlat.c b/vcl/source/fontsubset/xlat.c
index 840850a020da..840850a020da 100644
--- a/psprint/source/fontsubset/xlat.c
+++ b/vcl/source/fontsubset/xlat.c
diff --git a/psprint/source/fontsubset/xlat.h b/vcl/source/fontsubset/xlat.h
index 86eca1691574..86eca1691574 100644
--- a/psprint/source/fontsubset/xlat.h
+++ b/vcl/source/fontsubset/xlat.h
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index 5c228072eb65..820b053a4211 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -30,16 +30,16 @@
// 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 <psprint/sft.h>
-#include <vcl/font.hxx>
-#include <vcl/impfont.hxx>
-#include <vcl/fontcfg.hxx>
-#ifndef _VCL_OUTDEV_H
-#include <vcl/outdev.h> // just for ImplGetEnglishSearchFontName! TODO: move it
-#endif
+
+#include "sft.h"
+
+#include "tools/stream.hxx"
+#include "tools/vcompat.hxx"
+#include "tools/debug.hxx"
+#include "vcl/font.hxx"
+#include "vcl/impfont.hxx"
+#include "vcl/fontcfg.hxx"
+#include "vcl/outdev.h" // just for ImplGetEnglishSearchFontName! TODO: move it
#include <algorithm>
diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx
index 3fe2f7cd0ec2..d149ee26284f 100644
--- a/vcl/source/glyphs/gcach_ftyp.cxx
+++ b/vcl/source/glyphs/gcach_ftyp.cxx
@@ -36,20 +36,20 @@
#undef CreateFont
#endif
-#include <gcach_ftyp.hxx>
+#include "gcach_ftyp.hxx"
-#include <vcl/svapp.hxx>
-#include <vcl/outfont.hxx>
-#include <vcl/impfont.hxx>
-#include <vcl/bitmap.hxx>
-#include <vcl/bmpacc.hxx>
+#include "vcl/svapp.hxx"
+#include "vcl/outfont.hxx"
+#include "vcl/impfont.hxx"
+#include "vcl/bitmap.hxx"
+#include "vcl/bmpacc.hxx"
-#include <tools/poly.hxx>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include "tools/poly.hxx"
+#include "basegfx/matrix/b2dhommatrix.hxx"
+#include "basegfx/polygon/b2dpolypolygon.hxx"
-#include <osl/file.hxx>
-#include <osl/thread.hxx>
+#include "osl/file.hxx"
+#include "osl/thread.hxx"
#include <ft2build.h>
#include FT_FREETYPE_H
@@ -62,7 +62,7 @@
#ifndef FT_RENDER_MODE_MONO // happens in the MACOSX build
#define FT_RENDER_MODE_MONO ft_render_mode_mono
#endif
-#include <rtl/instance.hxx>
+#include "rtl/instance.hxx"
#ifndef FREETYPE_PATCH
// VERSION_MINOR in freetype.h is too coarse
@@ -89,15 +89,15 @@ typedef FT_Vector* FT_Vector_CPtr;
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/mman.h>
- #include <psprint/fontmanager.hxx>
+ #include "vcl/fontmanager.hxx"
#elif defined(WNT)
#include <io.h>
#define strncasecmp strnicmp
#endif
-#include <vcl/svapp.hxx>
-#include <vcl/settings.hxx>
-#include <i18npool/lang.h>
+#include "vcl/svapp.hxx"
+#include "vcl/settings.hxx"
+#include "i18npool/lang.h"
typedef const unsigned char* CPU8;
inline sal_uInt16 NEXT_U16( CPU8& p ) { p+=2; return (p[-2]<<8)|p[-1]; }
diff --git a/vcl/source/helper/makefile.mk b/vcl/source/helper/makefile.mk
index 520ed6b3a17a..6f0d4959c9c4 100644
--- a/vcl/source/helper/makefile.mk
+++ b/vcl/source/helper/makefile.mk
@@ -44,6 +44,7 @@ TARGET=helper
# --- Files --------------------------------------------------------
SLOFILES=\
+ $(SLO)$/strhelper.obj \
$(SLO)$/evntpost.obj \
$(SLO)$/canvasbitmap.obj \
$(SLO)$/canvastools.obj \
diff --git a/psprint/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx
index 6dc3d0c3f1e7..5b503fa65c05 100644
--- a/psprint/source/helper/strhelper.cxx
+++ b/vcl/source/helper/strhelper.cxx
@@ -29,9 +29,10 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_psprint.hxx"
-#include <psprint/strhelper.hxx>
-#include <sal/alloca.h>
+#include "precompiled_vcl.hxx"
+
+#include "vcl/strhelper.hxx"
+#include "sal/alloca.h"
namespace psp {
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 630b034733a4..8e280675866a 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -84,20 +84,10 @@ static USHORT GetKeyModCode( guint state )
USHORT nCode = 0;
if( (state & GDK_SHIFT_MASK) )
nCode |= KEY_SHIFT;
- if( (state & GDK_CONTROL_MASK)
-#ifdef MACOSX
- || (state & GDK_MOD2_MASK) // map Meta (aka Command key) to Ctrl
-#endif
- )
+ if( (state & GDK_CONTROL_MASK) )
nCode |= KEY_MOD1;
if( (state & GDK_MOD1_MASK) )
- {
nCode |= KEY_MOD2;
-#ifdef MACOSX
- if( ! (nCode & KEY_MOD1) )
- nCode |= KEY_MOD3;
-#endif
- }
return nCode;
}
@@ -2951,35 +2941,21 @@ gboolean GtkSalFrame::signalKey( GtkWidget*, GdkEventKey* pEvent, gpointer frame
// The modifier mode therefore has to be adapted manually.
switch( pEvent->keyval )
{
-#ifdef MACOSX
- case GDK_Meta_L: // map Meta (aka Command key) to Ctrl
-#endif
case GDK_Control_L:
nExtModMask = MODKEY_LMOD1;
nModMask = KEY_MOD1;
break;
-#ifdef MACOSX
- case GDK_Meta_R: // map Meta (aka Command key) to Ctrl
-#endif
case GDK_Control_R:
nExtModMask = MODKEY_RMOD1;
nModMask = KEY_MOD1;
break;
case GDK_Alt_L:
nExtModMask = MODKEY_LMOD2;
-#ifdef MACOSX
- nModMask = KEY_MOD3;
-#else
nModMask = KEY_MOD2;
-#endif
break;
case GDK_Alt_R:
nExtModMask = MODKEY_RMOD2;
-#ifdef MACOSX
- nModMask = KEY_MOD2 | (pEvent->type == GDK_KEY_RELEASE ? KEY_MOD3 : 0);
-#else
nModMask = KEY_MOD2;
-#endif
break;
case GDK_Shift_L:
nExtModMask = MODKEY_LSHIFT;
diff --git a/vcl/unx/headless/svpprn.cxx b/vcl/unx/headless/svpprn.cxx
index 0ac79afeec88..e9d726464921 100644
--- a/vcl/unx/headless/svpprn.cxx
+++ b/vcl/unx/headless/svpprn.cxx
@@ -28,17 +28,17 @@
*
************************************************************************/
-#include <vcl/svapp.hxx>
-#include <vcl/jobset.h>
+#include "vcl/svapp.hxx"
+#include "vcl/jobset.h"
+#include "vcl/print.h"
+#include "vcl/salptype.hxx"
+#include "vcl/timer.hxx"
+#include "vcl/printerinfomanager.hxx"
+
#include "svpprn.hxx"
-#include <vcl/print.h>
-#include <vcl/salptype.hxx>
-#include <vcl/timer.hxx>
#include "svppspgraphics.hxx"
#include "svpinst.hxx"
-#include <psprint/printerinfomanager.hxx>
-
#include <unistd.h>
#include <sys/stat.h>
#include <sys/wait.h>
@@ -623,58 +623,13 @@ BOOL PspSalInfoPrinter::SetData(
}
String aPaper;
-#ifdef MACOSX
- // For Mac OS X, many printers are directly attached
- // USB/Serial printers with a stripped-down PPD that gives us
- // problems. We need to do PS->PDF conversion for these printers
- // but they are not able to handle multiple page sizes in the same
- // document at all, since we must pass -o media=... to them to get
- // a good printout.
- // So, we must find a match between the paper size from OOo and what
- // the PPD of the printer has, and pass that paper size to -o media=...
- // If a match cannot be found (ie the paper size from Format->Page is
- // nowhere near anything in the PPD), we default to what has been
- // chosen in File->Print->Properties.
- //
- // For printers capable of directly accepting PostScript data, none
- // of this occurs and we default to the normal OOo behavior.
- const PPDKey *pCupsFilterKey;
- const PPDValue *pCupsFilterValue;
- BOOL bIsCUPSPrinter = TRUE;
-
- // Printers that need PS->PDF conversion have a "cupsFilter" key and
- // a value of "application/pdf" in that key
- pCupsFilterKey = aData.m_pParser->getKey( String(RTL_CONSTASCII_USTRINGPARAM("cupsFilter")) );
- pCupsFilterValue = pCupsFilterKey != NULL ? aData.m_aContext.getValue( pCupsFilterKey ) : NULL;
- if ( pCupsFilterValue )
- {
- // PPD had a cupsFilter key, check for PS->PDF conversion requirement
- ByteString aCupsFilterString( pCupsFilterValue->m_aOption, RTL_TEXTENCODING_ISO_8859_1 );
- if ( aCupsFilterString.Search("application/pdf") == 0 )
- bIsCUPSPrinter = FALSE;
- }
+ if( pJobSetup->mePaperFormat == PAPER_USER )
+ aPaper = aData.m_pParser->matchPaper(
+ TenMuToPt( pJobSetup->mnPaperWidth ),
+ TenMuToPt( pJobSetup->mnPaperHeight ) );
else
- bIsCUPSPrinter = FALSE;
+ aPaper = String( ByteString( aPaperTab[ pJobSetup->mePaperFormat ].name ), RTL_TEXTENCODING_ISO_8859_1 );
- if ( TRUE == bIsCUPSPrinter )
- {
- // If its a directly attached printer, with a
- // stripped down PPD (most OS X printers are) always
- // match the paper size.
- aPaper = aData.m_pParser->matchPaper(
- TenMuToPt( pJobSetup->mnPaperWidth ),
- TenMuToPt( pJobSetup->mnPaperHeight ) );
- }
- else
-#endif
- {
- if( pJobSetup->mePaperFormat == PAPER_USER )
- aPaper = aData.m_pParser->matchPaper(
- TenMuToPt( pJobSetup->mnPaperWidth ),
- TenMuToPt( pJobSetup->mnPaperHeight ) );
- else
- aPaper = String( ByteString( aPaperTab[ pJobSetup->mePaperFormat ].name ), RTL_TEXTENCODING_ISO_8859_1 );
- }
pKey = aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) );
pValue = pKey ? pKey->getValue( aPaper ) : NULL;
if( ! ( pKey && pValue && aData.m_aContext.setValue( pKey, pValue, false ) == pValue ) )
diff --git a/vcl/unx/headless/svpprn.hxx b/vcl/unx/headless/svpprn.hxx
index eef8865fb56b..c2d85c054fce 100644
--- a/vcl/unx/headless/svpprn.hxx
+++ b/vcl/unx/headless/svpprn.hxx
@@ -31,10 +31,10 @@
#ifndef _SVP_SVPPRN_HXX
#define _SVP_SVPPRN_HXX
-#include <psprint/jobdata.hxx>
-#include <psprint/printergfx.hxx>
-#include <psprint/printerjob.hxx>
-#include <vcl/salprn.hxx>
+#include "vcl/jobdata.hxx"
+#include "vcl/printergfx.hxx"
+#include "vcl/printerjob.hxx"
+#include "vcl/salprn.hxx"
class PspGraphics;
diff --git a/vcl/unx/headless/svppspgraphics.cxx b/vcl/unx/headless/svppspgraphics.cxx
index 12302c1bbae2..2ff48966c765 100644
--- a/vcl/unx/headless/svppspgraphics.cxx
+++ b/vcl/unx/headless/svppspgraphics.cxx
@@ -29,22 +29,24 @@
************************************************************************/
#include "svppspgraphics.hxx"
-#include <psprint/jobdata.hxx>
-#include <psprint/printergfx.hxx>
-#include <psprint/printerinfomanager.hxx>
-#include <vcl/bmpacc.hxx>
-#include <vcl/salbmp.hxx>
-#include <vcl/glyphcache.hxx>
-#include <vcl/impfont.hxx>
-#include <vcl/outfont.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/salprn.hxx>
-#include <vcl/sysdata.hxx>
-#include <basegfx/vector/b2ivector.hxx>
-#include <basegfx/point/b2ipoint.hxx>
-#include <basebmp/color.hxx>
#include "svpbmp.hxx"
+#include "vcl/jobdata.hxx"
+#include "vcl/printergfx.hxx"
+#include "vcl/printerinfomanager.hxx"
+#include "vcl/bmpacc.hxx"
+#include "vcl/salbmp.hxx"
+#include "vcl/glyphcache.hxx"
+#include "vcl/impfont.hxx"
+#include "vcl/outfont.hxx"
+#include "vcl/svapp.hxx"
+#include "vcl/salprn.hxx"
+#include "vcl/sysdata.hxx"
+
+#include "basegfx/vector/b2ivector.hxx"
+#include "basegfx/point/b2ipoint.hxx"
+#include "basebmp/color.hxx"
+
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
diff --git a/vcl/unx/headless/svppspgraphics.hxx b/vcl/unx/headless/svppspgraphics.hxx
index 9cbbac446477..ba7d690a9f90 100644
--- a/vcl/unx/headless/svppspgraphics.hxx
+++ b/vcl/unx/headless/svppspgraphics.hxx
@@ -32,11 +32,9 @@
#define _SVP_PSPGRAPHICS_HXX
-#ifndef _PSPRINT_FONTMANAGER_HXX
-#include <psprint/fontmanager.hxx>
-#endif
-#include <vcl/sallayout.hxx>
-#include <vcl/salgdi.hxx>
+#include "vcl/fontmanager.hxx"
+#include "vcl/sallayout.hxx"
+#include "vcl/salgdi.hxx"
namespace psp { struct JobData; class PrinterGfx; }
diff --git a/vcl/unx/inc/dtint.hxx b/vcl/unx/inc/dtint.hxx
index b7cc8941219f..e65e41a73af5 100644
--- a/vcl/unx/inc/dtint.hxx
+++ b/vcl/unx/inc/dtint.hxx
@@ -49,8 +49,7 @@ struct XEvent;
enum DtType {
DtGeneric,
- DtCDE,
- DtMACOSX
+ DtCDE
};
class DtIntegrator
diff --git a/vcl/unx/inc/macosxint.hxx b/vcl/unx/inc/macosxint.hxx
deleted file mode 100644
index 86b5f34840df..000000000000
--- a/vcl/unx/inc/macosxint.hxx
+++ /dev/null
@@ -1,48 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: macosxint.hxx,v $
- * $Revision: 1.3 $
- *
- * 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.
- *
- ************************************************************************/
-#ifndef _SV_MACOSXINT_HXX
-#define _SV_MACOSXINT_HXX
-
-#include <dtint.hxx>
-#include <tools/list.hxx>
-
-class MACOSXIntegrator : public DtIntegrator
-{
- friend DtIntegrator* DtIntegrator::CreateDtIntegrator();
-private:
- MACOSXIntegrator();
-
-public:
- virtual ~MACOSXIntegrator();
-
- virtual void GetSystemLook( AllSettings& rSettings );
-};
-
-#endif
diff --git a/vcl/unx/inc/prex.h b/vcl/unx/inc/prex.h
index 705e33ca5188..131e628efe2e 100644
--- a/vcl/unx/inc/prex.h
+++ b/vcl/unx/inc/prex.h
@@ -50,7 +50,7 @@
extern "C" {
#endif
-#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) // should really check for xfree86 or for X11R6.1 and higher
+#if defined(LINUX) || defined(FREEBSD) // should really check for xfree86 or for X11R6.1 and higher
#define __XKeyboardExtension__ 1
#else
#define __XKeyboardExtension__ 0
diff --git a/vcl/unx/inc/pspgraphics.h b/vcl/unx/inc/pspgraphics.h
index c8c0abf29fd6..5c31d889453c 100644
--- a/vcl/unx/inc/pspgraphics.h
+++ b/vcl/unx/inc/pspgraphics.h
@@ -32,16 +32,12 @@
#define _VCL_PSPGRAPHICS_H
-#include <vcl/salgdi.hxx>
-#ifndef _PSPRINT_FONTMANAGER_HXX
-#include <psprint/fontmanager.hxx>
-#endif
-#include <vcl/sallayout.hxx>
-#include <vcl/dllapi.h>
-
-#ifndef _USE_PRINT_EXTENSION_
+#include "vcl/fontmanager.hxx"
+#include "vcl/salgdi.hxx"
+#include "vcl/sallayout.hxx"
+#include "vcl/dllapi.h"
+
namespace psp { struct JobData; class PrinterGfx; }
-#endif
class ServerFont;
class ImplDevFontAttributes;
diff --git a/vcl/unx/inc/saldata.hxx b/vcl/unx/inc/saldata.hxx
index e62b00952663..a4326990c464 100644
--- a/vcl/unx/inc/saldata.hxx
+++ b/vcl/unx/inc/saldata.hxx
@@ -51,7 +51,7 @@ class SalPrinter;
DECLARE_LIST( SalDisplays, SalDisplay* )
-#if defined SCO || defined LINUX || defined NETBSD || defined AIX || defined HPUX || defined FREEBSD || defined MACOSX
+#if defined SCO || defined LINUX || defined NETBSD || defined AIX || defined HPUX || defined FREEBSD
#include <pthread.h>
#else
typedef unsigned int pthread_t;
diff --git a/vcl/unx/inc/saldisp.hxx b/vcl/unx/inc/saldisp.hxx
index dbb8b7bd7ec4..9f9383106615 100644
--- a/vcl/unx/inc/saldisp.hxx
+++ b/vcl/unx/inc/saldisp.hxx
@@ -384,9 +384,6 @@ protected:
KeySym nShiftKeySym_; // first shift modifier
KeySym nCtrlKeySym_; // first control modifier
KeySym nMod1KeySym_; // first mod1 modifier
-#ifdef MACOSX
- KeySym nMod2KeySym_; //first mod2 modifier
-#endif
ByteString m_aKeyboardName;
vcl_sal::WMAdaptor* m_pWMAdaptor;
diff --git a/vcl/unx/inc/salinst.h b/vcl/unx/inc/salinst.h
index e35774b01f02..c0614a78af9b 100644
--- a/vcl/unx/inc/salinst.h
+++ b/vcl/unx/inc/salinst.h
@@ -113,7 +113,8 @@ public:
virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
virtual void DestroyMenuItem( SalMenuItem* pItem );
- virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
+ virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
+ void FillFontPathList( std::list< rtl::OString >& o_rFontPaths );
bool isPrinterInit() const
diff --git a/vcl/unx/inc/salprn.h b/vcl/unx/inc/salprn.h
index 51e22dbbe589..452fa5a89387 100644
--- a/vcl/unx/inc/salprn.h
+++ b/vcl/unx/inc/salprn.h
@@ -31,10 +31,10 @@
#ifndef _SV_SALPRN_H
#define _SV_SALPRN_H
-#include <psprint/jobdata.hxx>
-#include <psprint/printergfx.hxx>
-#include <psprint/printerjob.hxx>
-#include <vcl/salprn.hxx>
+#include "vcl/jobdata.hxx"
+#include "vcl/printergfx.hxx"
+#include "vcl/printerjob.hxx"
+#include "vcl/salprn.hxx"
class PspGraphics;
diff --git a/vcl/unx/inc/salunx.h b/vcl/unx/inc/salunx.h
index ed9368895f0c..cdf45fd30867 100644
--- a/vcl/unx/inc/salunx.h
+++ b/vcl/unx/inc/salunx.h
@@ -32,7 +32,7 @@
#define _SALUNX_H
// -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#if defined SCO || defined LINUX || defined HPUX || defined FREEBSD || defined NETBSD || defined MACOSX
+#if defined SCO || defined LINUX || defined HPUX || defined FREEBSD || defined NETBSD
#include <sys/time.h>
#elif defined AIX
#include <time.h>
diff --git a/vcl/unx/inc/xsalprn.h b/vcl/unx/inc/xsalprn.h
deleted file mode 100644
index ac72454c70ab..000000000000
--- a/vcl/unx/inc/xsalprn.h
+++ /dev/null
@@ -1,192 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: xsalprn.h,v $
- * $Revision: 1.4 $
- *
- * 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.
- *
- ************************************************************************/
-#ifndef __salprint_h
-#define __salprint_h
-
-
-class String;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* printer interface */
-extern int XSalIsDisplay( const Display * );
-extern int XSalIsPrinter( const Display * );
-
-/* error handling */
-typedef int (*XSalPrinterErrorHandler)( XErrorEvent * );
-
-extern XSalPrinterErrorHandler XSalSetPrinterErrorHandler( XSalPrinterErrorHandler );
-
-/* common callbacks */
-typedef void* XSalPointer;
-typedef int (*XSalPrinterCallback)( XSalPointer cb_data, XSalPointer client_data );
-
-#ifndef _SV_SV_H
-#define _SV_SV_H
-#define USHORT unsigned short
-#include <vcl/prntypes.hxx>
-#undef USHORT
-#undef _SV_SV_H
-#else
-#include <vcl/prntypes.hxx>
-#endif
-
-typedef enum Orientation Orientation;
-
-/* initialize before first use */
-extern void XSalPrinterInit( const String& installPath );
-
-typedef unsigned short XSalEnum;
-typedef unsigned char XSalBool;
-
-#define COLOR_SPACE_COLOR 1
-#define COLOR_SPACE_GRAY 0
-
-typedef struct
-{
- unsigned int nMagic; /* internal data */
- unsigned short nVersion; /* internal data */
- unsigned short nFlags; /* internal data */
- XSalEnum eDriver; /* PostScript, PCL, ... */
- unsigned short nCopies; /* number of copies */
- unsigned short nPaperBin; /* paper bin to use */
- XSalEnum ePaper; /* A4, A5, ... */
- unsigned int nPaperWidth; /* paper width if PAPER_USER */
- unsigned int nPaperHeight; /* paper height if PAPER_USER */
- XSalEnum eOrientation; /* portrait / landscape */
- unsigned int nScale; /* [%] ( 100 => 1:1 ) */
- unsigned short nResolutionX; /* [dots per inch] */
- unsigned short nResolutionY; /* [dots per inch] */
- char sCompatCommand[256];/* current shell command */
- char sPort[256]; /* default shell command */
- char cDriverName[32]; /* Druckertreibername */
- unsigned int nTrailingBytes; /* trailing bytes appended to this structure */
-} XSalPrinterSetup;
-
-#define XSAL_PRINTER_SETUP_MAGIC 0x0000ede1
-#define WRONG_ENDIANESS_MAGIC 0xe1ed0000
-
-/* definition for XSalPrinterSetup.nFlags */
-#define XSALPRINTERSETUP_FLAG_LEVEL_DEFAULT 0x0000
-#define XSALPRINTERSETUP_FLAG_LEVEL 0x000f
-#define XSALPRINTERSETUP_FLAG_LEVEL_SHIFT 0
-#define XSALPRINTERSETUP_FLAG_COLOR 0x0010 /* colored bitmaps */
-#define XSALPRINTERSETUP_FLAG_COLOR_DEFAULT 0x0020
-#define XSALPRINTERSETUP_FLAG_COMPRESS 0x0040 /* compress bitmaps */
-#define XSALPRINTERSETUP_FLAG_COMPRESS_DEFAULT 0x0080 /* compress bitmaps */
-#define XSALPRINTERSETUP_FLAG_DEPTH_DEFAULT 0x0700
-#define XSALPRINTERSETUP_FLAG_DEPTH 0x0700 /* depth n = depth 2^n, 6 = 24Bit, 7 = default */
-#define XSALPRINTERSETUP_FLAG_DEPTH_SHIFT 8
-
-#define XSALPRINTERSETUP_FLAG_DEFAULT\
- (XSALPRINTERSETUP_FLAG_LEVEL_DEFAULT | \
- XSALPRINTERSETUP_FLAG_COMPRESS_DEFAULT | \
- XSALPRINTERSETUP_FLAG_COLOR_DEFAULT | \
- XSALPRINTERSETUP_FLAG_DEPTH_DEFAULT )
-
-
-/* XSalPrinterSetup access */
-extern unsigned short XSalGetPrinterDriverId( const char* driverName );
-extern const char* XSalGetPrinterDriverName( unsigned short driverId );
-
-extern unsigned short XSalGetLanguageLevel( const XSalPrinterSetup* pSetup );
-extern void XSalGetLanguageLevels(
- const XSalPrinterSetup* pSetup,
- unsigned short* minLevel,
- unsigned short* maxLevel );
-extern void XSalSetLanguageLevel( XSalPrinterSetup* pSetup, unsigned short);
-
-extern unsigned short XSalGetDepth( const XSalPrinterSetup* pSetup );
-extern void XSalSetDepth( XSalPrinterSetup* pSetup, unsigned short depth );
-
-extern XSalEnum XSalGetColorSpace( const XSalPrinterSetup* pSetup );
-extern void XSalSetColorSpace( XSalPrinterSetup* pSetup, XSalEnum space );
-
-extern XSalBool XSalGetBmpCompression( const XSalPrinterSetup* pSetup );
-extern void XSalSetBmpCompression( XSalPrinterSetup* pSetup, XSalBool compress );
-
-extern XSalEnum XSalGetOrientation( const char* string );
-extern const char* XSalGetOrientationName( XSalEnum eOrientation );
-
-extern XSalEnum XSalGetPaper( const char* sPaperName );
-extern const char* XSalGetPaperName( XSalEnum ePaper );
-
-/* use XSalInitPrinterSetup to initialize internal data */
-extern void XSalInitPrinterSetup( XSalPrinterSetup* );
-extern void XSalCorrectEndianess( XSalPrinterSetup* );
-extern void XSalSetupPrinterSetup( XSalPrinterSetup*, Display* display, XLIB_Window parent);
-
-
-/* the following two functions set defaults of the profile */
-extern void XSalReadPrinterSetup( XSalPrinterSetup*, const String& rPrinter );
-extern void XSalReadPrinterSetupDefaults( XSalPrinterSetup* );
-
-
-typedef Display XSalPrinter; /* an XSalPrinter is a Display. Draw into RootWindow */
-
-
-/* open, change setup and close printer */
-extern XSalPrinter* XSalOpenPrinter( const XSalPrinterSetup * pSetup, const String& rPrinterName, const String& rPrintFile );
-/* XSalSetupPrinter() can setup: Orientation, Copies, Page, PaperBin */
-extern void XSalSetupPrinter( XSalPrinter *, const XSalPrinterSetup * pSetup );
-extern void XSalClosePrinter( XSalPrinter * );
-
-typedef struct
-{
- int nWidth; /* [dots] drawable area */
- int nHeight; /* [dots] drawable area */
- int nMarginLeft; /* [dots] left margin */
- int nMarginTop; /* [dots] top margin */
- int nMarginRight; /* [dots] right margin */
- int nMarginBottom; /* [dots] bottom margin */
- int nResolutionX; /* [dpi] resolution x */
- int nResolutionY; /* [dpi] resolution y */
-} XSalPageInfo;
-
-extern void XSalGetPageInfo(
- const XSalPrinter* printer,
- const XSalPrinterSetup* pSetup,
- XSalPageInfo* pPageInfo );
-
-
-/* printer job control */
-extern int XSalStartDoc( XSalPrinter * printer, const String& jobName );
-extern int XSalStartPage( XSalPrinter * printer );
-extern int XSalEndPage( XSalPrinter * printer );
-extern int XSalEndDoc( XSalPrinter * printer );
-extern int XSalAbortDoc( XSalPrinter * printer );
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif
diff --git a/vcl/unx/source/app/i18n_ic.cxx b/vcl/unx/source/app/i18n_ic.cxx
index 9fba669f338d..817fc2781e8c 100644
--- a/vcl/unx/source/app/i18n_ic.cxx
+++ b/vcl/unx/source/app/i18n_ic.cxx
@@ -340,7 +340,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
if ( mnPreeditStyle != XIMPreeditNone )
{
-#if defined LINUX || defined FREEBSD || defined NETBSD || defined IRIX || defined MACOSX
+#if defined LINUX || defined FREEBSD || defined NETBSD || defined IRIX
if ( mpPreeditAttributes != NULL )
#endif
mpAttributes = XVaAddToNestedList( mpAttributes,
@@ -348,7 +348,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
}
if ( mnStatusStyle != XIMStatusNone )
{
-#if defined LINUX || defined FREEBSD || defined NETBSD || defined IRIX || defined MACOSX
+#if defined LINUX || defined FREEBSD || defined NETBSD || defined IRIX
if ( mpStatusAttributes != NULL )
#endif
mpAttributes = XVaAddToNestedList( mpAttributes,
diff --git a/vcl/unx/source/app/i18n_im.cxx b/vcl/unx/source/app/i18n_im.cxx
index d4ff59e87864..a47cefcef7dd 100644
--- a/vcl/unx/source/app/i18n_im.cxx
+++ b/vcl/unx/source/app/i18n_im.cxx
@@ -55,10 +55,6 @@
#include "i18n_im.hxx"
#include <i18n_status.hxx>
-#ifdef MACOSX
-#include <osl/process.h>
-#include <tools/string.hxx>
-#endif
#include <osl/thread.h>
using namespace vcl;
@@ -253,13 +249,8 @@ SalI18N_InputMethod::SetLocale( const char* pLocale )
char *locale = SetSystemLocale( pLocale );
if ( (!IsXWindowCompatibleLocale(locale)) || IsPosixLocale(locale) )
{
- #ifdef MACOSX // MacOS X always uses UTF-8 for the filesystem
- osl_setThreadTextEncoding (RTL_TEXTENCODING_UTF8);
- locale = SetSystemLocale( "en_US.UTF-8" );
- #else
osl_setThreadTextEncoding (RTL_TEXTENCODING_ISO_8859_1);
locale = SetSystemLocale( "en_US" );
- #endif
#ifdef SOLARIS
SetSystemEnvironment( "en_US" );
#endif
diff --git a/vcl/unx/source/app/i18n_wrp.cxx b/vcl/unx/source/app/i18n_wrp.cxx
index f561e18e0ff0..b3a3ebc8e101 100644
--- a/vcl/unx/source/app/i18n_wrp.cxx
+++ b/vcl/unx/source/app/i18n_wrp.cxx
@@ -45,10 +45,7 @@ struct XIMArg
#include <sal/alloca.h>
#include <string.h>
-#if !defined(MACOSX)
-/* MacOS X doesn't yet support XIM... FIXME */
#include <dlfcn.h>
-#endif
#include <X11/Xlib.h>
#include <X11/Xlibint.h>
#include "XIM.h"
@@ -66,10 +63,8 @@ typedef XIM (*OpenFunction)(Display*, XrmDatabase, char*, char*, XIMArg*);
}
/* global variables */
-#if !defined(MACOSX)
static void *g_dlmodule = 0;
static OpenFunction g_open_im = (OpenFunction)NULL;
-#endif
/* utility function to transform vararg list into an array of XIMArg */
@@ -213,8 +208,6 @@ XvaOpenIM(Display *display, XrmDatabase rdb,
XvaGetArgs( variable, args );
va_end(variable);
- /* MacOS X doesn't yet support XIM... FIXME */
-#if !defined(MACOSX)
if (!g_dlmodule)
{
g_dlmodule = dlopen(XIIIMP_LIB, RTLD_LAZY);
@@ -235,13 +228,10 @@ XvaOpenIM(Display *display, XrmDatabase rdb,
{
goto legacy_XIM;
}
-#endif
}
// in #if to prevent warning "warning: label 'legacy_XIM' defined but not used"
-#if !defined(MACOSX)
legacy_XIM:
-#endif
if (!xim)
xim = XOpenIM(display, rdb, res_name, res_class);
@@ -257,8 +247,6 @@ Status XvaCloseIM(XIM)
{
Status s = False;
- /* MacOS X doesn't yet support XIM... FIXME */
-#if !defined(MACOSX)
if (!g_dlmodule)
{
/* assuming one XvaOpenIM call */
@@ -267,7 +255,6 @@ Status XvaCloseIM(XIM)
g_open_im = (OpenFunction)NULL;
s = True;
}
-#endif
return (s);
}
diff --git a/vcl/unx/source/app/keysymnames.cxx b/vcl/unx/source/app/keysymnames.cxx
index 2a78110c35fa..4a2bf13af3e0 100644
--- a/vcl/unx/source/app/keysymnames.cxx
+++ b/vcl/unx/source/app/keysymnames.cxx
@@ -649,18 +649,7 @@ const char* SalDisplay::GetKeyboardName( BOOL bRefresh )
{
XkbDescPtr pXkbDesc = NULL;
// try X keyboard extension
- #ifdef MACOSX
- // FIXME
- // XDarwin doesn't yet have very good support for the Xkeyboard extension.
- // When we call XkbGetKeyboard(), the XServer throws a message up in the
- // console about xkbcomp and files for geometry include. The side effect of
- // this is _very_ noticable lag when drawing menus. The file menu, for example,
- // takes about 1s to come down on my G4/450 DP and you can see it draw. Therefore
- // we are disabling it for the moment until better XDarwin support exists.
- if ( 0 )
- #else
if( (pXkbDesc = XkbGetKeyboard( GetDisplay(), XkbAllComponentsMask, XkbUseCoreKbd )) )
- #endif
{
const char* pAtom = NULL;
if( pXkbDesc->names->groups[0] )
diff --git a/vcl/unx/source/app/makefile.mk b/vcl/unx/source/app/makefile.mk
index 948c2b2de5be..a7f790fd67ab 100644
--- a/vcl/unx/source/app/makefile.mk
+++ b/vcl/unx/source/app/makefile.mk
@@ -71,6 +71,7 @@ SLOFILES=\
EXCEPTIONSFILES=\
$(SLO)$/wmadaptor.obj \
$(SLO)$/saldata.obj \
+ $(SLO)$/salinst.obj \
$(SLO)$/saldisp.obj \
$(SLO)$/i18n_status.obj \
$(SLO)$/i18n_cb.obj \
diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx
index e09346d6cfff..95679d77fdfb 100644
--- a/vcl/unx/source/app/saldisp.cxx
+++ b/vcl/unx/source/app/saldisp.cxx
@@ -65,7 +65,7 @@
#ifdef USE_XINERAMA
#ifdef USE_XINERAMA_XORG
-#if defined(X86) || defined(X86_64) || defined(MACOSX)
+#if defined(X86) || defined(X86_64)
#include <X11/extensions/Xinerama.h>
#endif
#elif defined USE_XINERAMA_XSUN
@@ -893,7 +893,7 @@ void SalDisplay::Init()
sscanf( pProperties, "%li", &nProperties_ );
else
{
-#if defined DBG_UTIL || defined SUN || defined LINUX || defined FREEBSD || defined IRIX || defined MACOSX
+#if defined DBG_UTIL || defined SUN || defined LINUX || defined FREEBSD || defined IRIX
nProperties_ |= PROPERTY_FEATURE_Maximize;
#endif
// Server Bugs & Properties
@@ -919,7 +919,7 @@ void SalDisplay::Init()
if( GetServerVendor() == vendor_xfree )
{
nProperties_ |= PROPERTY_BUG_XCopyArea_GXxor;
-#if defined LINUX || defined FREEBSD || defined MACOSX
+#if defined LINUX || defined FREEBSD
// otherwm and olwm are a kind of default, which are not detected
// carefully. if we are running linux (i.e. not netbsd) on an xfree
// display, fvwm is most probable the wm to choose, confusing with mwm
@@ -1085,9 +1085,6 @@ void SalDisplay::ModifierMapping()
nShiftKeySym_ = sal_XModifier2Keysym( pDisp_, pXModMap, ShiftMapIndex );
nCtrlKeySym_ = sal_XModifier2Keysym( pDisp_, pXModMap, ControlMapIndex );
nMod1KeySym_ = sal_XModifier2Keysym( pDisp_, pXModMap, Mod1MapIndex );
-#ifdef MACOSX
- nMod2KeySym_ = sal_XModifier2Keysym( pDisp_, pXModMap, Mod2MapIndex );
-#endif
// Auf Sun-Servern und SCO-Severn beruecksichtigt XLookupString
// nicht den NumLock Modifier.
if( (GetServerVendor() == vendor_sun)
@@ -1116,25 +1113,12 @@ XubString SalDisplay::GetKeyName( USHORT nKeyCode ) const
String aStrMap;
if( nKeyCode & KEY_MOD1 )
- {
- if( aStrMap.Len() )
- aStrMap += '+';
aStrMap += GetKeyNameFromKeySym( nCtrlKeySym_ );
- }
-#ifdef MACOSX
- if( nKeyCode & KEY_MOD3 )
- {
- aStrMap += GetKeyNameFromKeySym( nMod2KeySym_ );
- }
if( nKeyCode & KEY_MOD2 )
{
- if ( aStrMap.Len() )
- aStrMap += '+' ;
-#else
- if( nKeyCode & KEY_MOD2 )
- {
-#endif
+ if( aStrMap.Len() )
+ aStrMap += '+';
aStrMap += GetKeyNameFromKeySym( nMod1KeySym_ );
}
@@ -2646,7 +2630,7 @@ void SalDisplay::InitXinerama()
}
}
#elif defined(USE_XINERAMA_XORG)
-#if defined( X86 ) || defined( X86_64 ) || defined( MACOSX )
+#if defined( X86 ) || defined( X86_64 )
if( XineramaIsActive( pDisp_ ) )
{
int nFramebuffers = 1;
diff --git a/vcl/unx/source/app/salinst.cxx b/vcl/unx/source/app/salinst.cxx
index 18b24e2cb2f3..c160ea4c2fa5 100644
--- a/vcl/unx/source/app/salinst.cxx
+++ b/vcl/unx/source/app/salinst.cxx
@@ -35,20 +35,21 @@
#include <stdio.h>
#include <stdlib.h>
-#include <salunx.h>
+#include "salunx.h"
-#ifndef _VOS_MUTEX_HXX
-#include <vos/mutex.hxx>
-#endif
-#include <saldata.hxx>
-#include <saldisp.hxx>
-#include <salinst.h>
-#include <salframe.h>
-#include <vcl/salwtype.hxx>
-#include <vcl/salatype.hxx>
-#include <dtint.hxx>
-#include <salprn.h>
-#include <sm.hxx>
+#include "saldata.hxx"
+#include "saldisp.hxx"
+#include "salinst.h"
+#include "salframe.h"
+#include "dtint.hxx"
+#include "salprn.h"
+#include "sm.hxx"
+
+#include "vcl/salwtype.hxx"
+#include "vcl/salatype.hxx"
+#include "vcl/helper.hxx"
+
+#include "vos/mutex.hxx"
// -------------------------------------------------------------------------
//
@@ -276,3 +277,129 @@ void X11SalInstance::DestroyFrame( SalFrame* pFrame )
{
delete pFrame;
}
+
+static void getServerDirectories( std::list< rtl::OString >& o_rFontPaths )
+{
+#ifdef LINUX
+ /*
+ * chkfontpath exists on some (RH derived) Linux distributions
+ */
+ static const char* pCommands[] = {
+ "/usr/sbin/chkfontpath 2>/dev/null", "chkfontpath 2>/dev/null"
+ };
+ ::std::list< ByteString > aLines;
+
+ for( unsigned int i = 0; i < sizeof(pCommands)/sizeof(pCommands[0]); i++ )
+ {
+ FILE* pPipe = popen( pCommands[i], "r" );
+ aLines.clear();
+ if( pPipe )
+ {
+ char line[1024];
+ char* pSearch;
+ while( fgets( line, sizeof(line), pPipe ) )
+ {
+ int nLen = strlen( line );
+ if( line[nLen-1] == '\n' )
+ line[nLen-1] = 0;
+ pSearch = strstr( line, ": " );
+ if( pSearch )
+ aLines.push_back( pSearch+2 );
+ }
+ if( ! pclose( pPipe ) )
+ break;
+ }
+ }
+
+ for( ::std::list< ByteString >::iterator it = aLines.begin(); it != aLines.end(); ++it )
+ {
+ if( ! access( it->GetBuffer(), F_OK ) )
+ {
+ o_rFontPaths.push_back( *it );
+#if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "adding fs dir %s\n", it->GetBuffer() );
+#endif
+ }
+ }
+#else
+ (void)o_rFontPaths;
+#endif
+}
+
+
+
+void X11SalInstance::FillFontPathList( std::list< rtl::OString >& o_rFontPaths )
+{
+ Display *pDisplay = GetX11SalData()->GetDisplay()->GetDisplay();
+
+ DBG_ASSERT( pDisplay, "No Display !" );
+ if( pDisplay )
+ {
+ // get font paths to look for fonts
+ int nPaths = 0, i;
+ char** pPaths = XGetFontPath( pDisplay, &nPaths );
+
+ bool bServerDirs = false;
+ for( i = 0; i < nPaths; i++ )
+ {
+ OString aPath( pPaths[i] );
+ sal_Int32 nPos = 0;
+ if( ! bServerDirs
+ && ( nPos = aPath.indexOf( ':' ) ) > 0
+ && ( !aPath.copy(nPos).equals( ":unscaled" ) ) )
+ {
+ bServerDirs = true;
+ getServerDirectories( o_rFontPaths );
+ }
+ else
+ {
+ psp::normPath( aPath );
+ o_rFontPaths.push_back( aPath );
+ }
+ }
+
+ if( nPaths )
+ XFreeFontPath( pPaths );
+ }
+
+ // insert some standard directories
+ o_rFontPaths.push_back( "/usr/openwin/lib/X11/fonts/TrueType" );
+ o_rFontPaths.push_back( "/usr/openwin/lib/X11/fonts/Type1" );
+ o_rFontPaths.push_back( "/usr/openwin/lib/X11/fonts/Type1/sun" );
+ o_rFontPaths.push_back( "/usr/X11R6/lib/X11/fonts/truetype" );
+ o_rFontPaths.push_back( "/usr/X11R6/lib/X11/fonts/Type1" );
+
+ #ifdef SOLARIS
+ /* cde specials, from /usr/dt/bin/Xsession: here are the good fonts,
+ the OWfontpath file may contain as well multiple lines as a comma
+ separated list of fonts in each line. to make it even more weird
+ environment variables are allowed as well */
+
+ const char* lang = getenv("LANG");
+ if ( lang != NULL )
+ {
+ String aOpenWinDir( String::CreateFromAscii( "/usr/openwin/lib/locale/" ) );
+ aOpenWinDir.AppendAscii( lang );
+ aOpenWinDir.AppendAscii( "/OWfontpath" );
+
+ SvFileStream aStream( aOpenWinDir, STREAM_READ );
+
+ // TODO: replace environment variables
+ while( aStream.IsOpen() && ! aStream.IsEof() )
+ {
+ ByteString aLine;
+ aStream.ReadLine( aLine );
+ // need an OString for normpath
+ OString aNLine( aLine );
+ psp::normPath( aNLine );
+ aLine = aNLine;
+ // try to avoid bad fonts in some cases
+ static bool bAvoid = (strncasecmp( lang, "ar", 2 ) == 0) || (strncasecmp( lang, "he", 2 ) == 0) || strncasecmp( lang, "iw", 2 ) == 0 || (strncasecmp( lang, "hi", 2 ) == 0);
+ if( bAvoid && aLine.Search( "iso_8859" ) != STRING_NOTFOUND )
+ continue;
+ o_rFontPaths.push_back( aLine );
+ }
+ }
+ #endif /* SOLARIS */
+}
+
diff --git a/vcl/unx/source/app/wmadaptor.cxx b/vcl/unx/source/app/wmadaptor.cxx
index e099af0de0fb..37015b6e58d6 100644
--- a/vcl/unx/source/app/wmadaptor.cxx
+++ b/vcl/unx/source/app/wmadaptor.cxx
@@ -405,12 +405,6 @@ WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) :
XFree( pProperty );
}
}
-
-#ifdef MACOSX
- /* Apple's X11 needs NW gravity with OOo 1.1 */
- m_nWinGravity = NorthWestGravity;
- m_nInitWinGravity = NorthWestGravity;
-#endif
}
/*
diff --git a/psprint/source/fontmanager/adobeenc.tab b/vcl/unx/source/fontmanager/adobeenc.tab
index e4005a87849f..e4005a87849f 100644
--- a/psprint/source/fontmanager/adobeenc.tab
+++ b/vcl/unx/source/fontmanager/adobeenc.tab
diff --git a/psprint/source/fontmanager/afm_hash.cpp b/vcl/unx/source/fontmanager/afm_hash.cpp
index de01d8cd0434..de01d8cd0434 100755
--- a/psprint/source/fontmanager/afm_hash.cpp
+++ b/vcl/unx/source/fontmanager/afm_hash.cpp
diff --git a/psprint/source/fontmanager/afm_keyword_list b/vcl/unx/source/fontmanager/afm_keyword_list
index 263d76bca4d3..263d76bca4d3 100755
--- a/psprint/source/fontmanager/afm_keyword_list
+++ b/vcl/unx/source/fontmanager/afm_keyword_list
diff --git a/psprint/source/fontmanager/fontcache.cxx b/vcl/unx/source/fontmanager/fontcache.cxx
index b2bdbd1f8771..4932f7a771e0 100644
--- a/psprint/source/fontmanager/fontcache.cxx
+++ b/vcl/unx/source/fontmanager/fontcache.cxx
@@ -29,17 +29,18 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_psprint.hxx"
+#include "precompiled_vcl.hxx"
#include <cstdlib>
#include <cstring>
-#include <psprint/fontcache.hxx>
-#ifndef _OSL_THREAD_H
-#include <osl/thread.h>
-#endif
-#include <unotools/atom.hxx>
-#include <tools/stream.hxx>
+#include "vcl/fontcache.hxx"
+
+#include "osl/thread.h"
+
+#include "unotools/atom.hxx"
+
+#include "tools/stream.hxx"
#include <unistd.h>
#include <sys/stat.h>
diff --git a/psprint/source/fontmanager/fontconfig.cxx b/vcl/unx/source/fontmanager/fontconfig.cxx
index a89591e8618f..c44e082f91bd 100644
--- a/psprint/source/fontmanager/fontconfig.cxx
+++ b/vcl/unx/source/fontmanager/fontconfig.cxx
@@ -29,11 +29,11 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_psprint.hxx"
-#include <psprint/fontmanager.hxx>
-#ifndef _PSPRINT_FONTCACHE_HXX_
-#include <psprint/fontcache.hxx>
-#endif
+#include "precompiled_vcl.hxx"
+
+#include "vcl/fontmanager.hxx"
+#include "vcl/fontcache.hxx"
+
using namespace psp;
#ifdef ENABLE_FONTCONFIG
@@ -68,19 +68,17 @@ typedef int FcSetName;
#include <cstdio>
#include <cstdarg>
-#include <unotools/atom.hxx>
-#ifndef _OSL_MODULE_H
-#include <osl/module.h>
-#endif
-#ifndef _OSL_THREAD_H
-#include <osl/thread.h>
-#endif
-#ifndef _RTL_USTRBUF_HXX
-#include <rtl/ustrbuf.hxx>
-#endif
-#include <osl/process.h>
-#include <rtl/locale.hxx>
-#include <sal/alloca.h>
+
+#include "unotools/atom.hxx"
+
+#include "osl/module.h"
+#include "osl/thread.h"
+#include "osl/process.h"
+
+#include "rtl/ustrbuf.hxx"
+#include "rtl/locale.hxx"
+
+#include "sal/alloca.h"
#include <utility>
#include <algorithm>
diff --git a/psprint/source/fontmanager/fontmanager.cxx b/vcl/unx/source/fontmanager/fontmanager.cxx
index eb3dcbadff96..73e117550a14 100644
--- a/psprint/source/fontmanager/fontmanager.cxx
+++ b/vcl/unx/source/fontmanager/fontmanager.cxx
@@ -29,41 +29,42 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_psprint.hxx"
+#include "precompiled_vcl.hxx"
-#define Window XLIB_Window
-#define Time XLIB_Time
-#include <X11/Xlib.h>
-#undef Window
-#undef Time
#include <unistd.h>
#include <sys/stat.h>
#include <dirent.h>
#include <stdlib.h>
#include <osl/thread.h>
-#include <unotools/atom.hxx>
-#include <psprint/fontmanager.hxx>
-#ifndef _PSPRINT_FONTCACHE_HXX_
-#include <psprint/fontcache.hxx>
-#endif
-#include <tools/urlobj.hxx>
-#include <tools/stream.hxx>
-#include <psprint/helper.hxx>
-#include <osl/file.hxx>
-#include <osl/process.h>
-#include <psprint/strhelper.hxx>
-#include <psprint/ppdparser.hxx>
-#include <rtl/tencinfo.h>
-#include <tools/debug.hxx>
-#include <tools/config.hxx>
-#include <i18npool/mslangid.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <rtl/strbuf.hxx>
-
-
-#include <parseAFM.hxx>
+
+#include "unotools/atom.hxx"
+
+#include "vcl/fontmanager.hxx"
+#include "vcl/fontcache.hxx"
+#include "vcl/helper.hxx"
+#include "vcl/strhelper.hxx"
+#include "vcl/ppdparser.hxx"
+#include "vcl/svdata.hxx"
+#include "vcl/salinst.hxx"
+
+#include "tools/urlobj.hxx"
+#include "tools/stream.hxx"
+#include "tools/debug.hxx"
+#include "tools/config.hxx"
+
+#include "osl/file.hxx"
+#include "osl/process.h"
+
+#include "rtl/tencinfo.h"
+#include "rtl/ustrbuf.hxx"
+#include "rtl/strbuf.hxx"
+
+#include "i18npool/mslangid.hxx"
+
+
+#include "parseAFM.hxx"
#define NO_LIST
-#include <sft.h>
+#include "sft.h"
#undef NO_LIST
#if OSL_DEBUG_LEVEL > 1
@@ -71,21 +72,21 @@
#include <stdio.h>
#endif
-#include <sal/alloca.h>
+#include "sal/alloca.h"
#include <set>
#include <hash_set>
#include <algorithm>
-#include <adobeenc.tab> // get encoding table for AFM metrics
+#include "adobeenc.tab" // get encoding table for AFM metrics
#ifdef CALLGRIND_COMPILE
#include <valgrind/callgrind.h>
#endif
-#include <comphelper/processfactory.hxx>
-#include <com/sun/star/beans/XMaterialHolder.hpp>
-#include <com/sun/star/beans/NamedValue.hpp>
+#include "comphelper/processfactory.hxx"
+#include "com/sun/star/beans/XMaterialHolder.hpp"
+#include "com/sun/star/beans/NamedValue.hpp"
#define PRINTER_METRICDIR "fontmetric"
@@ -2004,52 +2005,6 @@ bool PrintFontManager::analyzeTrueTypeFile( PrintFont* pFont ) const
// -------------------------------------------------------------------------
-void PrintFontManager::getServerDirectories()
-{
-#ifdef LINUX
- /*
- * chkfontpath exists on some (RH derived) Linux distributions
- */
- static const char* pCommands[] = {
- "/usr/sbin/chkfontpath 2>/dev/null", "chkfontpath 2>/dev/null"
- };
- ::std::list< ByteString > aLines;
-
- for( unsigned int i = 0; i < sizeof(pCommands)/sizeof(pCommands[0]); i++ )
- {
- FILE* pPipe = popen( pCommands[i], "r" );
- aLines.clear();
- if( pPipe )
- {
- char line[1024];
- char* pSearch;
- while( fgets( line, sizeof(line), pPipe ) )
- {
- int nLen = strlen( line );
- if( line[nLen-1] == '\n' )
- line[nLen-1] = 0;
- pSearch = strstr( line, ": " );
- if( pSearch )
- aLines.push_back( pSearch+2 );
- }
- if( ! pclose( pPipe ) )
- break;
- }
- }
-
- for( ::std::list< ByteString >::iterator it = aLines.begin(); it != aLines.end(); ++it )
- {
- if( ! access( it->GetBuffer(), F_OK ) )
- {
- m_aFontDirectories.push_back( *it );
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "adding fs dir %s\n", it->GetBuffer() );
-#endif
- }
- }
-#endif
-}
-
void PrintFontManager::initFontsAlias()
{
m_aXLFD_Aliases.clear();
@@ -2113,7 +2068,7 @@ static bool AreFCSubstitutionsEnabled()
return ((nDisableBits & 3) == 0);
}
-void PrintFontManager::initialize( void* pInitDisplay )
+void PrintFontManager::initialize()
{
#ifdef CALLGRIND_COMPILE
CALLGRIND_TOGGLE_COLLECT();
@@ -2197,99 +2152,7 @@ void PrintFontManager::initialize( void* pInitDisplay )
// don't search through many directories fontconfig already told us about
if( ! m_bFontconfigSuccess )
- {
- Display *pDisplay = (Display*)pInitDisplay;
-
- if( ! pDisplay )
- {
- int nParams = osl_getCommandArgCount();
- OUString aParam;
- bool bIsHeadless = false;
- for( int i = 0; i < nParams; i++ )
- {
- osl_getCommandArg( i, &aParam.pData );
- if( aParam.equalsAscii( "-headless" ) )
- {
- bIsHeadless = true;
- break;
- }
- }
- if( ! bIsHeadless )
- pDisplay = XOpenDisplay( NULL );
- }
-
- if( pDisplay )
- {
- // get font paths to look for fonts
- int nPaths = 0, i;
- char** pPaths = XGetFontPath( pDisplay, &nPaths );
-
- bool bServerDirs = false;
- for( i = 0; i < nPaths; i++ )
- {
- OString aPath( pPaths[i] );
- sal_Int32 nPos = 0;
- if( ! bServerDirs
- && ( nPos = aPath.indexOf( ':' ) ) > 0
- && ( !aPath.copy(nPos).equals( ":unscaled" ) ) )
- {
- bServerDirs = true;
- getServerDirectories();
- }
- else
- {
- normPath( aPath );
- m_aFontDirectories.push_back( aPath );
- }
- }
-
- if( nPaths )
- XFreeFontPath( pPaths );
-
- if( ! pInitDisplay )
- XCloseDisplay( pDisplay );
- }
-
- // insert some standard directories
- m_aFontDirectories.push_back( "/usr/openwin/lib/X11/fonts/TrueType" );
- m_aFontDirectories.push_back( "/usr/openwin/lib/X11/fonts/Type1" );
- m_aFontDirectories.push_back( "/usr/openwin/lib/X11/fonts/Type1/sun" );
- m_aFontDirectories.push_back( "/usr/X11R6/lib/X11/fonts/truetype" );
- m_aFontDirectories.push_back( "/usr/X11R6/lib/X11/fonts/Type1" );
-
-#ifdef SOLARIS
- /* cde specials, from /usr/dt/bin/Xsession: here are the good fonts,
- the OWfontpath file may contain as well multiple lines as a comma
- separated list of fonts in each line. to make it even more weird
- environment variables are allowed as well */
-
- const char* lang = getenv("LANG");
- if ( lang != NULL )
- {
- String aOpenWinDir( String::CreateFromAscii( "/usr/openwin/lib/locale/" ) );
- aOpenWinDir.AppendAscii( lang );
- aOpenWinDir.AppendAscii( "/OWfontpath" );
-
- SvFileStream aStream( aOpenWinDir, STREAM_READ );
-
- // TODO: replace environment variables
- while( aStream.IsOpen() && ! aStream.IsEof() )
- {
- ByteString aLine;
- aStream.ReadLine( aLine );
- // need an OString for normpath
- OString aNLine( aLine );
- normPath( aNLine );
- aLine = aNLine;
- // try to avoid bad fonts in some cases
- static bool bAvoid = (strncasecmp( lang, "ar", 2 ) == 0) || (strncasecmp( lang, "he", 2 ) == 0) || strncasecmp( lang, "iw", 2 ) == 0 || (strncasecmp( lang, "hi", 2 ) == 0);
- if( bAvoid && aLine.Search( "iso_8859" ) != STRING_NOTFOUND )
- continue;
- m_aFontDirectories.push_back( aLine );
- }
- }
-#endif /* SOLARIS */
- } // ! m_bFontconfigSuccess
+ ImplGetSVData()->mpDefInst->FillFontPathList( m_aFontDirectories );
// fill XLFD aliases from fonts.alias files
initFontsAlias();
diff --git a/psprint/source/helper/helper.cxx b/vcl/unx/source/fontmanager/helper.cxx
index 0c24b269f540..2f3821eac7d1 100644
--- a/psprint/source/helper/helper.cxx
+++ b/vcl/unx/source/fontmanager/helper.cxx
@@ -29,31 +29,26 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_psprint.hxx"
+#include "precompiled_vcl.hxx"
#include <cstring>
#include <sys/stat.h>
#include <unistd.h>
#include <limits.h>
-#include "psprint/helper.hxx"
-#include "psprint/ppdparser.hxx"
+#include "vcl/helper.hxx"
+#include "vcl/ppdparser.hxx"
#include "tools/string.hxx"
#include "tools/urlobj.hxx"
#include "osl/file.hxx"
#include "osl/process.h"
#include "rtl/bootstrap.hxx"
-#ifdef MACOSX
-// directories of OS X fonts
-#define MACXP_FONT_DIR "/Library/Fonts;/System/Library/Fonts;"
-#endif
-
using namespace rtl;
namespace psp {
-const OUString& getOfficePath( enum whichOfficePath ePath )
+OUString getOfficePath( enum whichOfficePath ePath )
{
static OUString aNetPath;
static OUString aUserPath;
@@ -202,7 +197,7 @@ void psp::getPrinterPathList( std::list< OUString >& rPathList, const char* pSub
}
}
-const OUString& psp::getFontPath()
+OUString psp::getFontPath()
{
static OUString aPath;
@@ -210,9 +205,9 @@ const OUString& psp::getFontPath()
{
OUStringBuffer aPathBuffer( 512 );
- OUString aConfigPath = getOfficePath( psp::ConfigPath );
- OUString aNetPath = getOfficePath( psp::NetPath );
- OUString aUserPath = getOfficePath( psp::UserPath );
+ OUString aConfigPath( getOfficePath( psp::ConfigPath ) );
+ OUString aNetPath( getOfficePath( psp::NetPath ) );
+ OUString aUserPath( getOfficePath( psp::UserPath ) );
if( aConfigPath.getLength() )
{
// #i53530# Path from CustomDataUrl will completely
@@ -252,21 +247,6 @@ const OUString& psp::getFontPath()
aPathBuffer.append( OStringToOUString( aEnvPath, osl_getThreadTextEncoding() ) );
}
-#ifdef MACOSX // Search for truetype fonts also in the MACOSX system paths
-
- aPathBuffer.append(sal_Unicode(';') );
- aPath += OUString( RTL_CONSTASCII_USTRINGPARAM(MACXP_FONT_DIR) );
-
- //Userfonts
- aPath += aUserPath;
- // #i67231# [ericb 07/06] aPath was not concatened with other paths
- if (aUserPath.getLength() )
- {
- aPathBuffer.append(aPath);
- aPathBuffer.appendAscii("/../../Fonts");
- }
-#endif // MACOSX
-
aPath = aPathBuffer.makeStringAndClear();
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "initializing font path to \"%s\"\n", OUStringToOString( aPath, RTL_TEXTENCODING_ISO_8859_1 ).getStr() );
diff --git a/psprint/source/fontmanager/makefile.mk b/vcl/unx/source/fontmanager/makefile.mk
index 27b1cdad8e7d..c1d1fde15de3 100644
--- a/psprint/source/fontmanager/makefile.mk
+++ b/vcl/unx/source/fontmanager/makefile.mk
@@ -29,10 +29,10 @@
#
#*************************************************************************
-PRJ=..$/..
+PRJ=..$/..$/..
ENABLE_EXCEPTIONS=TRUE
-PRJNAME=psprint
+PRJNAME=vcl
TARGET=fontman
# --- Settings -----------------------------------------------------
@@ -62,6 +62,7 @@ SLOFILES=\
$(SLO)$/fontmanager.obj \
$(SLO)$/fontcache.obj \
$(SLO)$/fontconfig.obj \
+ $(SLO)$/helper.obj \
$(SLO)$/parseAFM.obj
.IF "$(OS)$(CPU)"=="SOLARISI"
diff --git a/psprint/source/fontmanager/parseAFM.cxx b/vcl/unx/source/fontmanager/parseAFM.cxx
index 480b4217503a..0ac4754d4bd5 100644
--- a/psprint/source/fontmanager/parseAFM.cxx
+++ b/vcl/unx/source/fontmanager/parseAFM.cxx
@@ -53,7 +53,7 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_psprint.hxx"
+#include "precompiled_vcl.hxx"
/* parseAFM.c
*
@@ -91,9 +91,11 @@
#include <sys/file.h>
#include <sys/stat.h>
#include <math.h>
-#include <parseAFM.hxx>
-#include <psprint/strhelper.hxx>
-#include <rtl/alloc.h>
+
+#include "parseAFM.hxx"
+#include "vcl/strhelper.hxx"
+
+#include "rtl/alloc.h"
#define lineterm EOL /* line terminating character */
#define normalEOF 1 /* return code from parsing routines used only */
diff --git a/psprint/source/fontmanager/parseAFM.hxx b/vcl/unx/source/fontmanager/parseAFM.hxx
index ad0c32e4b51b..ad0c32e4b51b 100644
--- a/psprint/source/fontmanager/parseAFM.hxx
+++ b/vcl/unx/source/fontmanager/parseAFM.hxx
diff --git a/vcl/unx/source/gdi/dtint.cxx b/vcl/unx/source/gdi/dtint.cxx
index 8a67dbe6fcc7..96d78b4f006d 100644
--- a/vcl/unx/source/gdi/dtint.cxx
+++ b/vcl/unx/source/gdi/dtint.cxx
@@ -44,9 +44,6 @@
#include <cdeint.hxx>
#endif
#include <dtint.hxx>
-#ifdef MACOSX
-#include <macosxint.hxx>
-#endif
#include <saldisp.hxx>
#include <saldata.hxx>
#include <wmadaptor.hxx>
@@ -98,9 +95,6 @@ DtIntegrator::~DtIntegrator()
DtIntegrator* DtIntegrator::CreateDtIntegrator()
{
-#ifdef MACOSX
- return new MACOSXIntegrator();
-#endif
/*
* #i22061# override desktop detection
* if environment variable OOO_FORCE_DESKTOP is set
diff --git a/vcl/unx/source/gdi/gcach_xpeer.cxx b/vcl/unx/source/gdi/gcach_xpeer.cxx
index 77e8ccc09a91..85466c532ff2 100644
--- a/vcl/unx/source/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/source/gdi/gcach_xpeer.cxx
@@ -647,9 +647,6 @@ Glyph X11GlyphPeer::GetGlyphId( ServerFont& rServerFont, int nGlyphIndex )
X11GlyphCache::X11GlyphCache( X11GlyphPeer& rPeer )
: GlyphCache( rPeer )
{
-#ifdef MACOSX
- LoadFonts();
-#endif
}
// ---------------------------------------------------------------------------
diff --git a/vcl/unx/source/gdi/macosxint.cxx b/vcl/unx/source/gdi/macosxint.cxx
deleted file mode 100644
index 5e2a2838ae7f..000000000000
--- a/vcl/unx/source/gdi/macosxint.cxx
+++ /dev/null
@@ -1,250 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: macosxint.cxx,v $
- * $Revision: 1.5 $
- *
- * 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 <macosxint.hxx>
-#include <tools/config.hxx>
-#include <vcl/settings.hxx>
-#include <osl/thread.h>
-#include <osl/file.hxx>
-#include <rtl/bootstrap.hxx>
-#include <unistd.h>
-#include <cstdio>
-
-using namespace rtl;
-using namespace osl;
-
-MACOSXIntegrator::MACOSXIntegrator()
-{
- meType = DtMACOSX;
-}
-
-MACOSXIntegrator::~MACOSXIntegrator()
-{
-}
-
-void MACOSXIntegrator::GetSystemLook( AllSettings& rSettings )
-{
- rtl_TextEncoding aEncoding = osl_getThreadTextEncoding();
-
- StyleSettings aStyleSettings( rSettings.GetStyleSettings() );
- // #i48001# set a default blink rate
- aStyleSettings.SetCursorBlinkTime( 500 );
-
-// #i61174# aquacolors
-// aUserConfigFile : string containing the user install directory completed with "/user/macosxrc.txt"
-// currently : ~/Library/Application Support/OpenOffice.org 2.0/user/macosxrc.txt
-// aDefaultConfigFile : string containing the OpenOffice.org install directory + presets/macosxrc.txt
-// default should be /Applications/OpenOffice.org 2.0/Contents/openoffice.org2/presets/macosxrc.txt
-
-
- rtl::OUString aUserConfigFile;
- rtl::OUString aDefaultConfigFile;
- rtl::OUString aTryFiles[2];
-
-// read the content of bootstraprc is necessary to find the path to the user configuration file
-// ~/Library/Application Support/OpenOffice.org 2.0/user/macosxrc.txt
-
- rtl::Bootstrap aBootstrap( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("bootstraprc") ) );
- if( aBootstrap.getFrom( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("MacOSXIntegrationUserFile") ), aUserConfigFile ) )
- {
- rtl::OUString aFile = aUserConfigFile ;
- osl::FileBase::getSystemPathFromFileURL(aFile, aTryFiles[0]);
- }
-
-// if macosxrc.txt is not found in user install dir, fallback to the second macosxrc.txt (with default values), located in <install_dir>/presets
-
- if( aBootstrap.getFrom( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("MacOSXIntegrationDefaultFile") ), aDefaultConfigFile ) )
- {
- rtl::OUString aFile = aDefaultConfigFile ;
- osl::FileBase::getSystemPathFromFileURL(aFile, aTryFiles[1]);
- }
-
- for( unsigned int i = 0; (i < sizeof(aTryFiles) / sizeof(aTryFiles[0])); i++ )
- {
-
- #if OSL_DEBUG_LEVEL > 1
- fprintf(stderr, "try accessing %d, %s\n", i, rtl::OUStringToOString( aTryFiles[i], aEncoding ).getStr());
- #endif
- if( access( rtl::OUStringToOString( aTryFiles[i], aEncoding ).getStr(), R_OK ) )
- continue;
-
- #if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "using %s for style settings\n", rtl::OUStringToOString( aTryFiles[i], aEncoding ).getStr() );
- #endif
-
- Config aConfig( aTryFiles[i] );
- ByteString aLine;
-
- if( aConfig.HasGroup( "General" ) )
- {
- aConfig.SetGroup( "General" );
-
- aLine = aConfig.ReadKey( "foreground" );
- if( aLine.GetTokenCount( ',' ) >= 3 )
- {
- Color aFore( aLine.GetToken( 0, ',' ).ToInt32(),
- aLine.GetToken( 1, ',' ).ToInt32(),
- aLine.GetToken( 2, ',' ).ToInt32() );
- aStyleSettings.SetDialogTextColor( aFore );
- aStyleSettings.SetMenuTextColor( aFore );
- aStyleSettings.SetButtonTextColor( aFore );
- aStyleSettings.SetRadioCheckTextColor( aFore );
- aStyleSettings.SetGroupTextColor( aFore );
- aStyleSettings.SetLabelTextColor( aFore );
- aStyleSettings.SetInfoTextColor( aFore );
- aStyleSettings.SetFieldTextColor( aFore );
- }
-
- aLine = aConfig.ReadKey( "background" );
- if( aLine.GetTokenCount( ',' ) >= 3 )
- {
- Color aBack( aLine.GetToken( 0, ',' ).ToInt32(),
- aLine.GetToken( 1, ',' ).ToInt32(),
- aLine.GetToken( 2, ',' ).ToInt32() );
- aStyleSettings.Set3DColors( aBack );
- aStyleSettings.SetFaceColor( aBack );
- aStyleSettings.SetDialogColor( aBack );
- aStyleSettings.SetMenuColor( aBack );
- aStyleSettings.SetMenuBarColor( aBack );
- aStyleSettings.SetLightBorderColor( aBack );
- if( aBack == COL_LIGHTGRAY )
- aStyleSettings.SetCheckedColor( Color( 0xCC, 0xCC, 0xCC ) );
- else
- {
- Color aColor2 = aStyleSettings.GetLightColor();
- aStyleSettings.SetCheckedColor(
- Color( (BYTE)(((USHORT)aBack.GetRed()+(USHORT)aColor2.GetRed())/2),
- (BYTE)(((USHORT)aBack.GetGreen()+(USHORT)aColor2.GetGreen())/2),
- (BYTE)(((USHORT)aBack.GetBlue()+(USHORT)aColor2.GetBlue())/2)
- ) );
- }
- }
-
- aLine = aConfig.ReadKey( "selectForeground" );
- if( aLine.GetTokenCount( ',' ) >= 3 )
- {
- Color aSelectFore( aLine.GetToken( 0, ',' ).ToInt32(),
- aLine.GetToken( 1, ',' ).ToInt32(),
- aLine.GetToken( 2, ',' ).ToInt32());
-
- aStyleSettings.SetHighlightTextColor( aSelectFore );
- aStyleSettings.SetMenuHighlightTextColor( aSelectFore );
- }
- aLine = aConfig.ReadKey( "selectBackground" );
- if( aLine.GetTokenCount( ',' ) >= 3 )
- {
- Color aSelectBack( aLine.GetToken( 0, ',' ).ToInt32(),
- aLine.GetToken( 1, ',' ).ToInt32(),
- aLine.GetToken( 2, ',' ).ToInt32() );
-
- aStyleSettings.SetHighlightColor( aSelectBack );
- aStyleSettings.SetMenuHighlightColor( aSelectBack );
- }
- aLine = aConfig.ReadKey( "activeForeground" );
- if( aLine.GetTokenCount( ',' ) >= 3 ) {
- Color aActiveFore( aLine.GetToken( 0, ',' ).ToInt32(),
- aLine.GetToken( 1, ',' ).ToInt32(),
- aLine.GetToken( 2, ',' ).ToInt32() );
-
- aStyleSettings.SetActiveTextColor( aActiveFore );
- }
- aLine = aConfig.ReadKey( "activeBackground" );
- if( aLine.GetTokenCount( ',' ) >= 3 ) {
- Color aActiveBack( aLine.GetToken( 0, ',' ).ToInt32(),
- aLine.GetToken( 1, ',' ).ToInt32(),
- aLine.GetToken( 2, ',' ).ToInt32() );
-
- aStyleSettings.SetActiveColor( aActiveBack );
- aStyleSettings.SetActiveColor2( aActiveBack );
- }
- aLine = aConfig.ReadKey( "deactiveForeground" );
- if( aLine.GetTokenCount( ',' ) >= 3 ) {
- Color aDeactiveFore( aLine.GetToken( 0, ',' ).ToInt32(),
- aLine.GetToken( 1, ',' ).ToInt32(),
- aLine.GetToken( 2, ',' ).ToInt32() );
-
- aStyleSettings.SetDeactiveTextColor( aDeactiveFore );
- aStyleSettings.SetDisableColor( aDeactiveFore );
- }
- aLine = aConfig.ReadKey( "deactiveBackground" );
- if( aLine.GetTokenCount( ',' ) >= 3 ) {
- Color aDeactiveBack( aLine.GetToken( 0, ',' ).ToInt32(),
- aLine.GetToken( 1, ',' ).ToInt32(),
- aLine.GetToken( 2, ',' ).ToInt32() );
-
- aStyleSettings.SetDeactiveColor( aDeactiveBack );
- aStyleSettings.SetDeactiveColor2( aDeactiveBack );
- aStyleSettings.SetDeactiveBorderColor( aDeactiveBack );
- aStyleSettings.SetActiveBorderColor( aDeactiveBack );
- }
-
- aLine = aConfig.ReadKey( "font" );
- if( aLine.Len() )
- {
- Font aFont = aStyleSettings.GetAppFont();
- String aFontName( aLine, RTL_TEXTENCODING_UTF8 );
- if( aFontName.GetTokenCount( ',' ) > 0 )
- aFontName = aFontName.GetToken( 0, ',' );
- aFont.SetName( aFontName );
-
- aStyleSettings.SetAppFont( aFont );
- aStyleSettings.SetHelpFont( aFont );
- aStyleSettings.SetTitleFont( aFont );
- aStyleSettings.SetFloatTitleFont( aFont );
- aStyleSettings.SetMenuFont( aFont );
- aStyleSettings.SetToolFont( aFont );
- aStyleSettings.SetLabelFont( aFont );
- aStyleSettings.SetInfoFont( aFont );
- aStyleSettings.SetRadioCheckFont( aFont );
- aStyleSettings.SetPushButtonFont( aFont );
- aStyleSettings.SetFieldFont( aFont );
- aStyleSettings.SetIconFont( aFont );
- aStyleSettings.SetGroupFont( aFont );
- }
-
- aLine = aConfig.ReadKey( "cursorFlashTime" );
- if( aLine.Len() )
- {
- sal_Int32 nTime = aLine.ToInt32() / 2;
- if( nTime == 0 )
- nTime = STYLE_CURSOR_NOBLINKTIME;
- aStyleSettings.SetCursorBlinkTime( nTime );
- }
- }
-
- break;
- }
-
- rSettings.SetStyleSettings( aStyleSettings );
-}
-
diff --git a/vcl/unx/source/gdi/macosxrc.txt b/vcl/unx/source/gdi/macosxrc.txt
deleted file mode 100644
index 55c2c40f67cc..000000000000
--- a/vcl/unx/source/gdi/macosxrc.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Configure file for UI colors in OpenOffice.org Mac OS X port
-# Created by Mox 2006/01/27
-# This file follows the format of .kderc files
-#
-# The settings under label [General] are used. Modify it according to
-# the other labels, if you want to change it.
-#
-
-[Aqua]
-background=244,244,244
-foreground=0,0,0
-selectBackground=52,112,204
-selectForeground=255,255,255
-
-[Graphite]
-background=244,244,244
-foreground=0,0,0
-selectBackground=94,106,121
-selectForeground=255,255,255
-
-[General]
-background=244,244,244
-foreground=0,0,0
-selectBackground=52,112,204
-selectForeground=255,255,255
-#comment out if you want to use a customized font
-# only one font can be choosen
-#font=Andale Mono,Andale Sans UI
-# another nice font example
-#font=Futura, Futura Sans UI
-#Apple recommandation is Lucida Grande
-font=Lucida Grande, Futura Sans UI
diff --git a/vcl/unx/source/gdi/makefile.mk b/vcl/unx/source/gdi/makefile.mk
index 1516cd8ad5a5..8f0faf863af2 100644
--- a/vcl/unx/source/gdi/makefile.mk
+++ b/vcl/unx/source/gdi/makefile.mk
@@ -73,12 +73,6 @@ EXCEPTIONSFILES=\
$(SLO)$/salgdi3.obj \
$(SLO)$/salcvt.obj
-
-.IF "$(OS)"=="MACOSX"
-SLOFILES += $(SLO)$/macosxint.obj
-MACOSXRC = $(MISC)$/macosxrc.txt
-.ENDIF # "$(OS)"=="MACOSX"
-
.IF "$(USE_XPRINT)" == "TRUE"
CFLAGS+=-D_USE_PRINT_EXTENSION_=1
SLOFILES+=$(SLO)$/xprintext.obj
@@ -115,5 +109,3 @@ $(INCCOM)$/rtsname.hxx:
$(SLO)$/salpimpl.obj : $(INCCOM)$/rtsname.hxx
$(SLO)$/salprnpsp.obj : $(INCCOM)$/rtsname.hxx
-$(MISC)$/macosxrc.txt : $$(@:f)
- $(COPY) $< $@
diff --git a/vcl/unx/source/gdi/pspgraphics.cxx b/vcl/unx/source/gdi/pspgraphics.cxx
index 7b8a0f173707..4a4bccd86d2a 100644
--- a/vcl/unx/source/gdi/pspgraphics.cxx
+++ b/vcl/unx/source/gdi/pspgraphics.cxx
@@ -31,18 +31,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <pspgraphics.h>
-#include <psprint/jobdata.hxx>
-#include <psprint/printergfx.hxx>
-#include <psprint/printerinfomanager.hxx>
-#include <vcl/bmpacc.hxx>
-#include <vcl/salbmp.hxx>
-#include <vcl/glyphcache.hxx>
-#include <vcl/impfont.hxx>
-#include <vcl/outfont.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/salprn.hxx>
-#include <vcl/sysdata.hxx>
+#include "pspgraphics.h"
+#include "vcl/jobdata.hxx"
+#include "vcl/printergfx.hxx"
+#include "vcl/printerinfomanager.hxx"
+#include "vcl/bmpacc.hxx"
+#include "vcl/salbmp.hxx"
+#include "vcl/glyphcache.hxx"
+#include "vcl/impfont.hxx"
+#include "vcl/outfont.hxx"
+#include "vcl/svapp.hxx"
+#include "vcl/salprn.hxx"
+#include "vcl/sysdata.hxx"
#include <stdlib.h>
#include <unistd.h>
diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx
index dabce7c59b9e..1d61dbe214a2 100644
--- a/vcl/unx/source/gdi/salgdi.cxx
+++ b/vcl/unx/source/gdi/salgdi.cxx
@@ -33,31 +33,28 @@
#include "Xproto.h"
-#include <salunx.h>
-#include <saldata.hxx>
-#include <saldisp.hxx>
-#ifndef _SV_SALGDI_HXX
-#include <salgdi.h>
-#endif
-#include <salframe.h>
-#include <salvd.h>
-#include <tools/debug.hxx>
+#include "salunx.h"
+#include "saldata.hxx"
+#include "saldisp.hxx"
+#include "salgdi.h"
+#include "salframe.h"
+#include "salvd.h"
+#include "xrender_peer.hxx"
-#ifndef _USE_PRINT_EXTENSION_
-#include <psprint/printergfx.hxx>
-#include <psprint/jobdata.hxx>
-#endif
+#include "vcl/printergfx.hxx"
+#include "vcl/jobdata.hxx"
-#include <basegfx/polygon/b2dpolygon.hxx>
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-#include <basegfx/polygon/b2dpolypolygontools.hxx>
-#include <basegfx/polygon/b2dpolygontools.hxx>
-#include <basegfx/polygon/b2dpolygonclipper.hxx>
-#include <basegfx/polygon/b2dlinegeometry.hxx>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
+#include "tools/debug.hxx"
+
+#include "basegfx/polygon/b2dpolygon.hxx"
+#include "basegfx/polygon/b2dpolypolygon.hxx"
+#include "basegfx/polygon/b2dpolypolygontools.hxx"
+#include "basegfx/polygon/b2dpolygontools.hxx"
+#include "basegfx/polygon/b2dpolygonclipper.hxx"
+#include "basegfx/polygon/b2dlinegeometry.hxx"
+#include "basegfx/matrix/b2dhommatrix.hxx"
+#include "basegfx/polygon/b2dpolypolygoncutter.hxx"
-#include "xrender_peer.hxx"
#include <vector>
#include <queue>
#include <set>
diff --git a/vcl/unx/source/gdi/salgdi2.cxx b/vcl/unx/source/gdi/salgdi2.cxx
index c10abac60bb0..7192a417f96c 100644
--- a/vcl/unx/source/gdi/salgdi2.cxx
+++ b/vcl/unx/source/gdi/salgdi2.cxx
@@ -32,22 +32,20 @@
#include "precompiled_vcl.hxx"
#include <stdio.h>
-
-#include <salunx.h>
#include <poll.h>
-#include <saldata.hxx>
-#include <saldisp.hxx>
-#include <salbmp.h>
-#include <vcl/salbtype.hxx>
-#include <salgdi.h>
-#include <salframe.h>
-#include <salvd.h>
-#include <xrender_peer.hxx>
-
-#ifndef _USE_PRINT_EXTENSION_
-#include <psprint/printergfx.hxx>
-#include <vcl/bmpacc.hxx>
-#endif
+
+#include "salunx.h"
+#include "saldata.hxx"
+#include "saldisp.hxx"
+#include "salbmp.h"
+#include "salgdi.h"
+#include "salframe.h"
+#include "salvd.h"
+#include "xrender_peer.hxx"
+
+#include "vcl/salbtype.hxx"
+#include "vcl/printergfx.hxx"
+#include "vcl/bmpacc.hxx"
#undef SALGDI2_TESTTRANS
diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx
index 47b5f5263ce5..e2c41b52006b 100644
--- a/vcl/unx/source/gdi/salgdi3.cxx
+++ b/vcl/unx/source/gdi/salgdi3.cxx
@@ -40,42 +40,44 @@
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <sal/alloca.h>
-
-#include <gcach_xpeer.hxx>
-#include <xrender_peer.hxx>
-#include <sal/types.h>
-
-#include <salunx.h>
-#include <saldata.hxx>
-#include <saldisp.hxx>
-#include <salgdi.h>
-#include <pspgraphics.h>
-#include <vcl/salframe.hxx>
-#include <salvd.h>
-#include <vcl/outdev.h>
-#include <tools/string.hxx>
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-#include <rtl/tencinfo.h>
-#include <osl/file.hxx>
-#include "xfont.hxx"
-#include <vcl/impfont.hxx>
-
-
-#include <tools/debug.hxx>
-#include <tools/stream.hxx>
-#include <psprint/printergfx.hxx>
-#include <psprint/fontmanager.hxx>
-#include <psprint/jobdata.hxx>
-#include <psprint/printerinfomanager.hxx>
-#include <vcl/svapp.hxx>
+#include "gcach_xpeer.hxx"
+#include "xrender_peer.hxx"
+#include "salunx.h"
+#include "saldata.hxx"
+#include "saldisp.hxx"
+#include "salgdi.h"
+#include "pspgraphics.h"
+#include "salvd.h"
+#include "xfont.hxx"
#include "xlfd_attr.hxx"
#include "xlfd_smpl.hxx"
#include "xlfd_extd.hxx"
#include "salcvt.hxx"
-#include <i18npool/mslangid.hxx>
+#include "vcl/printergfx.hxx"
+#include "vcl/fontmanager.hxx"
+#include "vcl/jobdata.hxx"
+#include "vcl/printerinfomanager.hxx"
+#include "vcl/svapp.hxx"
+#include "vcl/impfont.hxx"
+#include "vcl/salframe.hxx"
+#include "vcl/outdev.h"
+
+#include "sal/alloca.h"
+#include "sal/types.h"
+
+#include "rtl/tencinfo.h"
+
+#include "osl/file.hxx"
+
+#include "tools/string.hxx"
+#include "tools/debug.hxx"
+#include "tools/stream.hxx"
+
+#include "basegfx/polygon/b2dpolypolygon.hxx"
+
+#include "i18npool/mslangid.hxx"
#include <hash_set>
@@ -795,11 +797,7 @@ CairoWrapper::CairoWrapper()
if( !XQueryExtension( GetX11SalData()->GetDisplay()->GetDisplay(), "RENDER", &nDummy, &nDummy, &nDummy ) )
return;
-#ifdef MACOSX
- OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libcairo.2.dylib" ));
-#else
OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libcairo.so.2" ));
-#endif
mpCairoLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT );
if( !mpCairoLib )
return;
@@ -1392,10 +1390,8 @@ void X11SalGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout )
X11GlyphPeer& rGlyphPeer = X11GlyphCache::GetInstance().GetPeer();
if( rGlyphPeer.GetGlyphSet( rFont, m_nScreen ) )
DrawServerAAFontString( rLayout );
-#ifndef MACOSX /* ignore X11 fonts on MACOSX */
else if( !rGlyphPeer.ForcedAntialiasing( rFont, m_nScreen ) )
DrawServerSimpleFontString( rLayout );
-#endif // MACOSX
else
DrawServerAAForcedString( rLayout );
}
diff --git a/vcl/unx/source/gdi/salprnpsp.cxx b/vcl/unx/source/gdi/salprnpsp.cxx
index 965fb2f10209..b3fdfaef56ce 100644
--- a/vcl/unx/source/gdi/salprnpsp.cxx
+++ b/vcl/unx/source/gdi/salprnpsp.cxx
@@ -47,20 +47,22 @@
#include <unistd.h>
#include <sys/wait.h>
#include <sys/stat.h>
-#include <vcl/svapp.hxx>
-#include <vcl/jobset.h>
-#include <saldisp.hxx>
-#include <salinst.h>
-#include <salprn.h>
-#include <vcl/print.h>
-#include <vcl/salptype.hxx>
-#include <salframe.h>
-#include <pspgraphics.h>
-#include <saldata.hxx>
-
-#include <rtl/ustring.hxx>
-#include <osl/module.h>
-#include <psprint/printerinfomanager.hxx>
+
+#include "saldisp.hxx"
+#include "salinst.h"
+#include "salprn.h"
+#include "salframe.h"
+#include "pspgraphics.h"
+#include "saldata.hxx"
+#include "vcl/svapp.hxx"
+#include "vcl/jobset.h"
+#include "vcl/print.h"
+#include "vcl/salptype.hxx"
+#include "vcl/printerinfomanager.hxx"
+
+#include "rtl/ustring.hxx"
+
+#include "osl/module.h"
using namespace psp;
using namespace rtl;
@@ -69,7 +71,7 @@ using namespace rtl;
* static helpers
*/
-#include <rtsname.hxx>
+#include "rtsname.hxx"
static oslModule driverLib = NULL;
extern "C"
@@ -723,58 +725,13 @@ BOOL PspSalInfoPrinter::SetData(
}
String aPaper;
-#ifdef MACOSX
- // For Mac OS X, many printers are directly attached
- // USB/Serial printers with a stripped-down PPD that gives us
- // problems. We need to do PS->PDF conversion for these printers
- // but they are not able to handle multiple page sizes in the same
- // document at all, since we must pass -o media=... to them to get
- // a good printout.
- // So, we must find a match between the paper size from OOo and what
- // the PPD of the printer has, and pass that paper size to -o media=...
- // If a match cannot be found (ie the paper size from Format->Page is
- // nowhere near anything in the PPD), we default to what has been
- // chosen in File->Print->Properties.
- //
- // For printers capable of directly accepting PostScript data, none
- // of this occurs and we default to the normal OOo behavior.
- const PPDKey *pCupsFilterKey;
- const PPDValue *pCupsFilterValue;
- BOOL bIsCUPSPrinter = TRUE;
-
- // Printers that need PS->PDF conversion have a "cupsFilter" key and
- // a value of "application/pdf" in that key
- pCupsFilterKey = aData.m_pParser->getKey( String(RTL_CONSTASCII_USTRINGPARAM("cupsFilter")) );
- pCupsFilterValue = pCupsFilterKey != NULL ? aData.m_aContext.getValue( pCupsFilterKey ) : NULL;
- if ( pCupsFilterValue )
- {
- // PPD had a cupsFilter key, check for PS->PDF conversion requirement
- ByteString aCupsFilterString( pCupsFilterValue->m_aOption, RTL_TEXTENCODING_ISO_8859_1 );
- if ( aCupsFilterString.Search("application/pdf") == 0 )
- bIsCUPSPrinter = FALSE;
- }
+ if( pJobSetup->mePaperFormat == PAPER_USER )
+ aPaper = aData.m_pParser->matchPaper(
+ TenMuToPt( pJobSetup->mnPaperWidth ),
+ TenMuToPt( pJobSetup->mnPaperHeight ) );
else
- bIsCUPSPrinter = FALSE;
+ aPaper = String( ByteString( aPaperTab[ pJobSetup->mePaperFormat ].name ), RTL_TEXTENCODING_ISO_8859_1 );
- if ( TRUE == bIsCUPSPrinter )
- {
- // If its a directly attached printer, with a
- // stripped down PPD (most OS X printers are) always
- // match the paper size.
- aPaper = aData.m_pParser->matchPaper(
- TenMuToPt( pJobSetup->mnPaperWidth ),
- TenMuToPt( pJobSetup->mnPaperHeight ) );
- }
- else
-#endif
- {
- if( pJobSetup->mePaperFormat == PAPER_USER )
- aPaper = aData.m_pParser->matchPaper(
- TenMuToPt( pJobSetup->mnPaperWidth ),
- TenMuToPt( pJobSetup->mnPaperHeight ) );
- else
- aPaper = String( ByteString( aPaperTab[ pJobSetup->mePaperFormat ].name ), RTL_TEXTENCODING_ISO_8859_1 );
- }
pKey = aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) );
pValue = pKey ? pKey->getValueCaseInsensitive( aPaper ) : NULL;
if( ! ( pKey && pValue && aData.m_aContext.setValue( pKey, pValue, false ) == pValue ) )
diff --git a/vcl/unx/source/gdi/xprintext.cxx b/vcl/unx/source/gdi/xprintext.cxx
deleted file mode 100644
index d43185e34dea..000000000000
--- a/vcl/unx/source/gdi/xprintext.cxx
+++ /dev/null
@@ -1,656 +0,0 @@
-/************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: xprintext.cxx,v $
- * $Revision: 1.12 $
- *
- * 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 <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#if OSL_DEBUG_LEVEL == 0
-#define NDEBUG
-#endif
-#include <assert.h>
-
-#include <prex.h>
-#include <X11/extensions/Print.h>
-#include <postx.h>
-
-#include <salunx.h>
-#include <saldata.hxx>
-#include <saldisp.hxx>
-#include <vcl/salinst.hxx>
-#include <vcl/salprn.hxx>
-#include <vcl/salgdi.hxx>
-#include <salprn.h>
-#include <vcl/print.h>
-#include <vcl/jobset.h>
-#include "i18n_im.hxx"
-#include "i18n_xkb.hxx"
-
-// =======================================================================
-//
-// ImplSalPrinterData
-//
-// =======================================================================
-
-
-class ImplSalPrinterData
-{
-
-private:
-
- SalDisplay* mpDisplay;
- SalGraphics* mpGraphics;
- char* mpPrinterName;
- Display* mpXDisplay;
- XPContext maContext;
- Bool XprtConnectStatus;
-
-
-private:
-
- ImplSalPrinterData( ImplSalPrinterData& rData );
-
-public:
-
- ImplSalPrinterData();
- ~ImplSalPrinterData();
-
- void Init( const SalPrinterQueueInfo* pQueueInfo,
- ImplJobSetup* pJobSetup );
-
- SalGraphics* GetGraphics();
- void ReleaseGraphics( SalGraphics* pGraphics = NULL );
- XLIB_Window GetDrawable() const { return mpDisplay->GetRootWindow(); }
- SalColormap& GetColormap() const { return mpDisplay->GetColormap(); }
- Display* GetXDisplay() const { return mpXDisplay; }
- XPContext GetXContext() const { return maContext; }
- const char* GetPrinter() const { return mpPrinterName; }
- XPContext GetContext() const { return maContext; }
- Bool GetStatus() const { return XprtConnectStatus; }
-};
-
-ImplSalPrinterData::ImplSalPrinterData() :
- mpDisplay( NULL ),
- mpGraphics( NULL ),
- mpXDisplay( NULL ),
- maContext( NULL ),
- mpPrinterName( NULL ),
- XprtConnectStatus( FALSE )
-{
- Init(NULL, NULL);
-}
-
-void ImplSalPrinterData::Init( const SalPrinterQueueInfo* pQueueInfo,
- ImplJobSetup* pJobSetup )
-{
- const char *printername = NULL;
-
- if (mpPrinterName == NULL || strcmp(mpPrinterName,printername)) {
- int nCount;
- XPContext aContext = NULL;
- char *Xprinter = getenv("XPRINTER");
- char *XpDisplayIndex;
- if (mpXDisplay == NULL && !XprtConnectStatus) {
-
- if (Xprinter && (XpDisplayIndex = strchr(Xprinter,'@'))) {
- if (Xprinter != XpDisplayIndex && printername == NULL) {
- char *defprinter = new char [XpDisplayIndex - Xprinter + 1];
- strncpy(defprinter, Xprinter, XpDisplayIndex - Xprinter);
- defprinter[XpDisplayIndex - Xprinter] = '\0';
- printername = defprinter;
- }
- }
- mpXDisplay = GetXpDisplay();
- // If GetXpDisplay() returns NULL (i.e. cannot connect to Xprint server) set XprtConnectStatus to FALSE.
- if (mpXDisplay == NULL) {
- fprintf(stderr, "Could not connect to Xprint server. Xprinting disabled.\n");
- XprtConnectStatus = FALSE;
- }
- else {
- //fprintf(stderr, "Connected to Xprint server.\n");
- if( getenv( "SAL_SYNCHRONIZE" ) )
- XSynchronize( mpXDisplay, True );
-
- if (printername == NULL || mpPrinterName == NULL
- || strcmp(mpPrinterName,printername) || maContext == NULL) {
- XpRehashPrinterList(mpXDisplay);
- XPPrinterList pList = XpGetPrinterList (mpXDisplay, NULL, &nCount);
-
- for ( int i = 0; i < nCount; i++ ) {
- //fprintf (stderr, "Printer %s: %s\n",
- //pList[i].name ? pList[i].name : "(null)",
- //pList[i].desc ? pList[i].desc : "(null)" );
- if(pList[i].name)
- if (printername == NULL || strcmp (pList[i].name, printername) == 0) {
- mpPrinterName = strdup( pList[i].name );
- maContext = XpCreateContext ( mpXDisplay, mpPrinterName );
- }
- }
- XpFreePrinterList (pList);
- }
- assert(maContext);
- XpSetContext (mpXDisplay, maContext);
-
- // New Sal
- if (mpDisplay == NULL) {
- mpDisplay = new SalDisplay( mpXDisplay, NULL );
- SalI18N_InputMethod* pInputMethod = new SalI18N_InputMethod;
- pInputMethod->Invalidate();
- mpDisplay->SetInputMethod( pInputMethod );
- SalI18N_KeyboardExtension *pKbdExtension = new SalI18N_KeyboardExtension( mpXDisplay );
- mpDisplay->SetKbdExtension( pKbdExtension );
-
- }
- // Connection to Xprint server successful so set XprtConnectStatus to TRUE.
- XprtConnectStatus = TRUE;
- }
- mpGraphics = NULL;
- }
-}
-}
-
-SalGraphics*
-ImplSalPrinterData::GetGraphics()
-{
- //If no Xprinter or mpGraphics already set then return NULL.
- if ( mpGraphics || !XprtConnectStatus) {
- return NULL;
- }
- mpGraphics = new SalGraphics;
- mpGraphics->maGraphicsData.Init( this );
-
- return mpGraphics;
-}
-
-void
-ImplSalPrinterData::ReleaseGraphics( SalGraphics* pGraphics )
-{
- if ( mpGraphics )
- {
- assert( !(pGraphics && pGraphics != mpGraphics) );
- delete mpGraphics;
- mpGraphics = NULL;
- }
-}
-
-ImplSalPrinterData::~ImplSalPrinterData()
-{
-
- if ( mpPrinterName != NULL )
- free( mpPrinterName );
- XpDestroyContext(mpXDisplay, maContext);
-
- delete mpGraphics;
- delete mpDisplay;
-
- if ( mpXDisplay != NULL )
- XCloseDisplay( mpXDisplay );
-}
-
-// =======================================================================
-//
-// SalInfoPrinterData
-//
-// =======================================================================
-
-SalInfoPrinterData::SalInfoPrinterData()
-{
- mpImplData = NULL;
-}
-
-SalInfoPrinterData::~SalInfoPrinterData()
-{
- delete mpImplData;
-}
-
-void
-SalInfoPrinterData::Init(
- SalPrinterQueueInfo *pQueueInfo,
- ImplJobSetup* pJobSetup )
-{
- mpImplData = new ImplSalPrinterData();
-}
-
-// =======================================================================
-//
-// SalPrinterData
-//
-// =======================================================================
-
-SalPrinterData::SalPrinterData()
-{
- mpImplData = NULL;
-}
-
-SalPrinterData::~SalPrinterData()
-{
- delete mpImplData;
-}
-
-void
-SalPrinterData::Init( SalInfoPrinter *pInfoPrinter )
-{
- mpImplData = new ImplSalPrinterData();
-}
-
-// =======================================================================
-//
-// SalInfoPrinter
-//
-// =======================================================================
-
-SalInfoPrinter::SalInfoPrinter()
-{
-}
-
-SalInfoPrinter::~SalInfoPrinter()
-{
-}
-
-SalGraphics*
-SalInfoPrinter::GetGraphics()
-{
- return maPrinterData.mpImplData->GetGraphics();
-}
-
-void
-SalInfoPrinter::ReleaseGraphics( SalGraphics* pGraphics )
-{
- maPrinterData.mpImplData->ReleaseGraphics( pGraphics );
-}
-
-BOOL
-SalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup )
-{
- pJobSetup->mePaperFormat = PAPER_A4;
- pJobSetup->mnPaperWidth = 21000;
- pJobSetup->mnPaperHeight = 29700;
- pJobSetup->meOrientation = ORIENTATION_PORTRAIT;
- return TRUE;
-}
-
-BOOL
-SalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup )
-{
- pJobSetup->mePaperFormat = PAPER_A4;
- pJobSetup->mnPaperWidth = 21000;
- pJobSetup->mnPaperHeight = 29700;
- pJobSetup->meOrientation = ORIENTATION_PORTRAIT;
- return TRUE;
-}
-
-BOOL
-SalInfoPrinter::SetData( ULONG nSetDataFlags, ImplJobSetup* pJobSetup )
-{
- pJobSetup->mePaperFormat = PAPER_A4;
- pJobSetup->mnPaperWidth = 21000;
- pJobSetup->mnPaperHeight = 29700;
- pJobSetup->meOrientation = ORIENTATION_PORTRAIT;
- return TRUE;
-}
-
-void
-SalInfoPrinter::GetPageInfo( const ImplJobSetup* pImplJobSetup,
- long& rOutWidth, long& rOutHeight,
- long& rPageOffX, long& rPageOffY,
- long& rPageWidth, long& rPageHeight )
-{
- rPageWidth = 2550;
- rPageHeight = 3300;
- rPageOffX = 75;
- rPageOffY = 75;
- rOutWidth = rPageWidth - rPageOffX - 75;
- rOutHeight = rPageHeight- rPageOffY - 75;
-}
-
-ULONG
-SalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup )
-{
- return 1;
-}
-
-XubString
-SalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup,
- ULONG nPaperBin )
-{
- return(XubString(RTL_CONSTASCII_USTRINGPARAM("PaperBinName")));
- // return "PaperBinName";
-}
-
-ULONG
-SalInfoPrinter::GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType )
-{
- return 0;
-}
-
-// =======================================================================
-//
-// SalPrinter
-//
-// =======================================================================
-
-SalPrinter::SalPrinter()
-{
-}
-
-SalPrinter::~SalPrinter()
-{
-}
-
-BOOL
-SalPrinter::StartJob(
- const XubString* pFileName,
- const XubString& rJobName,
- const XubString& rAppName,
- ULONG nCopies, BOOL bCollate,
- ImplJobSetup* pJobSetup )
-{
- Display *pDisplay = maPrinterData.mpImplData->GetXDisplay();
- XPContext aContext = maPrinterData.mpImplData->GetXContext();
- const char* pPrinterName = maPrinterData.mpImplData->GetPrinter();
-
- XpSelectInput (pDisplay, aContext, XPPrintMask);
-
- char pJobName[ 64 ];
- snprintf (pJobName, sizeof(pJobName), "%s.job-name: XPrint%d", pPrinterName, getpid() );
-
- XpStartJob( pDisplay, XPSpool );
-
- return TRUE;
-}
-
-BOOL
-SalPrinter::EndJob()
-{
- Display *pDisplay = maPrinterData.mpImplData->GetXDisplay();
- XEvent aEvent;;
-
- XpEndJob( pDisplay );
- XSync( pDisplay, False );
- // Wait until printing is done
- do
- {
- // XNextEvent (pDisplay, &aEvent);
- }
- while ( 0 );
- // aEvent.type != XPPrintNotify
- // && ((XPPrintEvent *) (&aEvent))->detail != XPEndJobNotify);
-
- return TRUE;
-}
-
-BOOL
-SalPrinter::AbortJob()
-{
- return FALSE;
-}
-
-SalGraphics*
-SalPrinter::StartPage( ImplJobSetup* pJobSetup, BOOL bNewJobData )
-{
- Display *pDisplay = maPrinterData.mpImplData->GetXDisplay();
- SalGraphics *pGraphics = maPrinterData.mpImplData->GetGraphics();
-
- Drawable aDrawable = pGraphics->maGraphicsData.GetDrawable();
- XPContext nContext = maPrinterData.mpImplData->GetContext();
-
- unsigned short nWidth, nHeight;
- XRectangle aArea;
- Status nState = XpGetPageDimensions( pDisplay, nContext,
- &nWidth, &nHeight, &aArea );
- //fprintf(stderr, "PageSize = %ix%i (%i,%i %ix%i)\n", nWidth, nHeight,
- // aArea.x,aArea.y, aArea.width, aArea.height );
- XResizeWindow( pDisplay, aDrawable, nWidth, nHeight );
- XpStartPage ( pDisplay, aDrawable );
-
- return pGraphics;
-}
-
-BOOL
-SalPrinter::EndPage()
-{
- Display *pDisplay = maPrinterData.mpImplData->GetXDisplay();
- XpEndPage ( pDisplay );
-
- maPrinterData.mpImplData->ReleaseGraphics();
-
- return TRUE;
-}
-
-ULONG
-SalPrinter::GetErrorCode()
-{
- return 0;
-}
-
-// =======================================================================
-//
-// SalInstance
-//
-// =======================================================================
-
-SalInfoPrinter*
-SalInstance::CreateInfoPrinter(
- SalPrinterQueueInfo* pQueueInfo,
- ImplJobSetup* pSetup )
-{
- // create and initialize SalInfoPrinter
- SalInfoPrinter* pPrinter = new SalInfoPrinter;
- pPrinter->maPrinterData.Init( pQueueInfo, pSetup );
-
- pSetup->mePaperFormat = PAPER_A4; // Papierformat
- pSetup->mnPaperWidth = 21000; // Papierbreite in 100tel mm
- pSetup->mnPaperHeight = 29700; // Papierhoehe in 100tel mm
-
- return pPrinter;
-}
-
-void
-SalInstance::DestroyInfoPrinter( SalInfoPrinter* pPrinter )
-{
- delete pPrinter;
-}
-
-SalPrinter*
-SalInstance::CreatePrinter( SalInfoPrinter* pInfoPrinter )
-{
- // create and initialize SalPrinter
- SalPrinter* pPrinter = new SalPrinter;
- pPrinter->maPrinterData.Init( pInfoPrinter );
-
- return pPrinter;
-}
-
-void
-SalInstance::DestroyPrinter( SalPrinter* pPrinter )
-{
- delete pPrinter;
-}
-
-
-void
-SalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
-{
- // Neuen Eintrag anlegen
- int nCount;
- Display *XprtDisp = GetXpDisplay();
- if (XprtDisp == NULL) {
- fprintf(stderr, "Could not connect to Xprint server. Xprinting disabled.\n");
- return;
- }
- else {
- XpRehashPrinterList(XprtDisp);
- XPPrinterList XpList = XpGetPrinterList(XprtDisp, NULL, &nCount);
-
- SalPrinterQueueInfo* pInfo = new SalPrinterQueueInfo;
- String Name(XpList[0].name, RTL_TEXTENCODING_UTF8);
- pInfo->maPrinterName = XubString(Name);
- pInfo->maDriver = XubString(RTL_CONSTASCII_USTRINGPARAM("X Printer"));
- pInfo->maLocation = XubString(RTL_CONSTASCII_USTRINGPARAM("X Printer"));
- pInfo->maComment = XubString(RTL_CONSTASCII_USTRINGPARAM("X Printer"));
- pInfo->mpSysData = NULL;
- pList->Add( pInfo );
-
- XpFreePrinterList(XpList);
- }
-}
-
-void
-SalInstance::GetPrinterQueueState( SalPrinterQueueInfo* pInfo )
-{
- return;
-}
-
-void
-SalInstance::DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo )
-{
- delete pInfo;
-}
-
-XubString
-SalInstance::GetDefaultPrinter()
-{
- Display *XprtDisp = GetXpDisplay();
- int nCount;
- if (XprtDisp == NULL)
- return XubString(RTL_CONSTASCII_USTRINGPARAM("No Default"));
- else {
- XpRehashPrinterList(XprtDisp);
- XPPrinterList XpList = XpGetPrinterList(XprtDisp, NULL, &nCount);
-
- String Name( XpList[0].name, RTL_TEXTENCODING_UTF8 );
- XpFreePrinterList(XpList);
- return (XubString(Name));
- }
-
- //return(XubString(RTL_CONSTASCII_USTRINGPARAM("X Printer")));
- // return "X Printer";
-}
-
-// =======================================================================
-//
-// SalGraphicsData
-//
-// =======================================================================
-
-void SalGraphicsData::Init(ImplSalPrinterData *pPrinter)
-{
-if (pPrinter->GetStatus()) {
- xColormap_ = &(pPrinter->GetColormap());
- hDrawable_ = pPrinter->GetDrawable();
- //pGCCache_ = pPrinter->GetGCCache();
-
- bPrinter_ = TRUE;
-
- nPenPixel_ = GetPixel( nPenColor_ );
- nTextPixel_ = GetPixel( nTextColor_ );
- nBrushPixel_ = GetPixel( nBrushColor_ );
-}
-else
- bPrinter_ = FALSE;
-
-}
-
-// =======================================================================
-//
-// Utility Functions
-//
-// =======================================================================
-
-// GetXpDisplay().
-// Finds and returns the Xprint display. First looks at environment variable XPRINTER
-// which should be in the form <printername>@<host>:<display number>. If not defined,
-// then environment variable XPDISPLAY is checked. It should be in the form
-// <host>:<display number>. If it is not defined it is set by default to ":1". If an
-// Xprint server is found then a pointer to Display is returned, otherwise NULL. This
-// function can be used by other functions to determine the current Xprint server display.
-
-// [ed] 6/15/02 We've got some linkage errors with this function on OS X,
-// perhaps due to mismatched prototypes. Let's take a quick route to the finish
-// line and declare it C linkage! +++ FIXME
-#ifdef MACOSX
-extern "C"
-#endif
-Display*
-GetXpDisplay()
-{
- char *XpDisplayName=NULL;
- Display *XpDisplay;
- if (getenv("XPRINTER")) {
- XpDisplayName=strchr(getenv("XPRINTER"),'@');
- if (XpDisplayName != NULL) {
- XpDisplayName++;
- }
- }
- else {
- if (!getenv("XPDISPLAY"))
- putenv("XPDISPLAY=:1");
- XpDisplayName=getenv("XPDISPLAY");
- }
- XpDisplay=XOpenDisplay(XpDisplayName);
- if (XpDisplay==NULL || !XSalIsPrinter(XpDisplay)) {
- return NULL;
- }
- else {
- return XpDisplay;
- }
-}
-
-// [ed] 6/15/02 We've got some linkage errors with this function on OS X,
-// perhaps due to mismatched prototypes. Let's take a quick route to the finish
-// line and declare it C linkage! +++ FIXME
-#ifdef MACOSX
-extern "C"
-#endif
-Bool
-XSalIsPrinter( Display * display )
-{
- int nEventBase;
- int nErrorBase;
-
- Bool bPrinter = XpQueryExtension( display, &nEventBase, &nErrorBase );
- return bPrinter;
-}
-
-// [ed] 6/15/02 We've got some linkage errors with this function on OS X,
-// perhaps due to mismatched prototypes. Let's take a quick route to the finish
-// line and declare it C linkage! +++ FIXME
-#ifdef MACOSX
-extern "C"
-#endif
-Bool
-XSalIsDisplay( Display * display )
-{
- return !XSalIsPrinter( display );
-}
-
diff --git a/vcl/unx/source/gdi/xrender_peer.cxx b/vcl/unx/source/gdi/xrender_peer.cxx
index 9f6e583ec723..861bf0e454aa 100644
--- a/vcl/unx/source/gdi/xrender_peer.cxx
+++ b/vcl/unx/source/gdi/xrender_peer.cxx
@@ -82,11 +82,7 @@ void XRenderPeer::InitRenderLib()
// we don't know if we are running on a system with xrender library
// we don't want to install system libraries ourselves
// => load them dynamically when they are there
-#ifdef MACOSX
- OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libXrender.dylib" ));
-#else
OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libXrender.so.1" ));
-#endif
mpRenderLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT );
if( !mpRenderLib ) {
#ifdef DEBUG
diff --git a/psprint/source/printer/cupsmgr.cxx b/vcl/unx/source/printer/cupsmgr.cxx
index 99d180d49fc1..d0c7f184fb06 100644
--- a/psprint/source/printer/cupsmgr.cxx
+++ b/vcl/unx/source/printer/cupsmgr.cxx
@@ -29,7 +29,7 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_psprint.hxx"
+#include "precompiled_vcl.hxx"
#ifdef ENABLE_CUPS
#include <cups/cups.h>
@@ -43,23 +43,19 @@ typedef void cups_option_t;
#include <unistd.h>
-#include <osl/thread.h>
-#include <osl/diagnose.h>
-#include <osl/conditn.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <cupsmgr.hxx>
+#include "cupsmgr.hxx"
-#include <algorithm>
+#include "osl/thread.h"
+#include "osl/diagnose.h"
+#include "osl/conditn.hxx"
+
+#include "rtl/ustrbuf.hxx"
+#include <algorithm>
#include <setjmp.h>
#include <signal.h>
-// FIXME: SAL_MODULENAME_WITH_VERSION needs to be fixed on OS X
-#ifdef MACOSX
-#define CUPS_LIB_NAME "libcups.2.dylib"
-#else
#define CUPS_LIB_NAME "libcups.so.2"
-#endif
namespace psp
{
diff --git a/psprint/source/printer/jobdata.cxx b/vcl/unx/source/printer/jobdata.cxx
index a86fc82fb953..51e171d578d9 100644
--- a/psprint/source/printer/jobdata.cxx
+++ b/vcl/unx/source/printer/jobdata.cxx
@@ -29,12 +29,14 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_psprint.hxx"
+#include "precompiled_vcl.hxx"
-#include <psprint/jobdata.hxx>
-#include <psprint/printerinfomanager.hxx>
-#include <tools/stream.hxx>
-#include <sal/alloca.h>
+#include "vcl/jobdata.hxx"
+#include "vcl/printerinfomanager.hxx"
+
+#include "tools/stream.hxx"
+
+#include "sal/alloca.h"
using namespace psp;
using namespace rtl;
diff --git a/psprint/source/printer/makefile.mk b/vcl/unx/source/printer/makefile.mk
index 02797867d49c..df184adc00fa 100644
--- a/psprint/source/printer/makefile.mk
+++ b/vcl/unx/source/printer/makefile.mk
@@ -29,10 +29,10 @@
#
#*************************************************************************
-PRJ=..$/..
+PRJ=..$/..$/..
ENABLE_EXCEPTIONS=TRUE
-PRJNAME=psprint
+PRJNAME=vcl
TARGET=printer
# --- Settings -----------------------------------------------------
@@ -53,6 +53,7 @@ dummy:
.ELSE # "$(GUIBASE)"=="aqua"
SLOFILES=\
+ $(SLO)$/ppdparser.obj \
$(SLO)$/printerinfomanager.obj \
$(SLO)$/jobdata.obj \
$(SLO)$/cupsmgr.obj
diff --git a/psprint/source/helper/ppdparser.cxx b/vcl/unx/source/printer/ppdparser.cxx
index a76d40ff547a..1caf64ef7e2c 100644
--- a/psprint/source/helper/ppdparser.cxx
+++ b/vcl/unx/source/printer/ppdparser.cxx
@@ -29,17 +29,18 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_psprint.hxx"
+#include "precompiled_vcl.hxx"
+
#include <stdlib.h>
#include <stdio.h>
#include <hash_map>
-#include "psprint/ppdparser.hxx"
-#include "tools/debug.hxx"
-#include "psprint/strhelper.hxx"
-#include "psprint/helper.hxx"
+#include "vcl/ppdparser.hxx"
+#include "vcl/strhelper.hxx"
+#include "vcl/helper.hxx"
#include "cupsmgr.hxx"
+#include "tools/debug.hxx"
#include "tools/urlobj.hxx"
#include "tools/stream.hxx"
#include "tools/zcodec.hxx"
@@ -635,25 +636,6 @@ PPDParser::PPDParser( const String& rFile ) :
m_nLanguageLevel = pKey->getValue( 0 )->m_aValue.ToInt32();
if( (pKey = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "TTRasterizer" ) ) )) )
m_bType42Capable = pKey->getValue( 0 )->m_aValue.EqualsIgnoreCaseAscii( "Type42" ) ? true : false;
-
-#ifdef MACOSX
- // Many Mac OS X PPDs for inkjet printers simply use CUPS to convert the output to a PDF,
- // and to take advantage of that we wish to embed fonts for these printers even if its
- // minimal CUPS PPD doesn't have TTRasterizer.
- // To determine if this printer is supposed to take PDF input, look for the "cupsFilter" key,
- // and if it exists, for the string "application/pdf" which specifies the CUPS filter to use for it
- // If present, we assume that we can embed TrueType fonts and that the CUPS filter will take care
- // of rasterizing them appropriately.
- if ( m_bType42Capable == false )
- {
- if ( ( pKey = getKey( String(RTL_CONSTASCII_USTRINGPARAM("cupsFilter")) ) ) )
- {
- ByteString aCupsFilterString( pKey->getValue( 0 )->m_aValue, RTL_TEXTENCODING_ISO_8859_1 );
- if ( strstr(aCupsFilterString.GetBuffer(), "application/pdf") > 0 )
- m_bType42Capable = true;
- }
- }
-#endif
}
PPDParser::~PPDParser()
diff --git a/psprint/source/printer/printerinfomanager.cxx b/vcl/unx/source/printer/printerinfomanager.cxx
index 41cddc6f4354..cf5a4a886c41 100644
--- a/psprint/source/printer/printerinfomanager.cxx
+++ b/vcl/unx/source/printer/printerinfomanager.cxx
@@ -29,28 +29,26 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_psprint.hxx"
+#include "precompiled_vcl.hxx"
#include <unistd.h>
#include <sys/wait.h>
#include <signal.h>
-#include <tools/urlobj.hxx>
-#include <tools/stream.hxx>
-#include <tools/debug.hxx>
-#include <tools/config.hxx>
-#include <cupsmgr.hxx>
-#include <psprint/fontmanager.hxx>
-#include <psprint/strhelper.hxx>
-#include <rtl/strbuf.hxx>
-
-#include <osl/thread.hxx>
-#include <osl/mutex.hxx>
-#include <osl/process.h>
-
-#ifdef MACOSX
-#include <sys/stat.h>
-#endif
+#include "cupsmgr.hxx"
+#include "vcl/fontmanager.hxx"
+#include "vcl/strhelper.hxx"
+
+#include "tools/urlobj.hxx"
+#include "tools/stream.hxx"
+#include "tools/debug.hxx"
+#include "tools/config.hxx"
+
+#include "rtl/strbuf.hxx"
+
+#include "osl/thread.hxx"
+#include "osl/mutex.hxx"
+#include "osl/process.h"
// filename of configuration files
#define PRINT_FILENAME "psprint.conf"
@@ -1275,7 +1273,7 @@ struct SystemCommandParameters
tokenHandler pHandler;
};
-#if ! (defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || defined(MACOSX))
+#if ! (defined(LINUX) || defined(NETBSD) || defined(FREEBSD))
static void lpgetSysQueueTokenHandler(
const std::list< rtl::OString >& i_rLines,
std::list< PrinterInfoManager::SystemPrintQueue >& o_rQueues,
@@ -1420,7 +1418,7 @@ static void standardSysQueueTokenHandler(
static const struct SystemCommandParameters aParms[] =
{
- #if defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || defined(MACOSX)
+ #if defined(LINUX) || defined(NETBSD) || defined(FREEBSD)
{ "/usr/sbin/lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0, standardSysQueueTokenHandler },
{ "lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0, standardSysQueueTokenHandler },
{ "LANG=C;LC_ALL=C;export LANG LC_ALL;lpstat -s", "lp -d \"(PRINTER)\"", "system for ", ": ", 1, standardSysQueueTokenHandler }
diff --git a/psprint/source/printergfx/bitmap_gfx.cxx b/vcl/unx/source/printergfx/bitmap_gfx.cxx
index d5889f36a0f7..b1ec82aa17e2 100644
--- a/psprint/source/printergfx/bitmap_gfx.cxx
+++ b/vcl/unx/source/printergfx/bitmap_gfx.cxx
@@ -29,10 +29,12 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_psprint.hxx"
-#include <psprint/printergfx.hxx>
-#include <psprint/strhelper.hxx>
-#include <psputil.hxx>
+#include "precompiled_vcl.hxx"
+
+#include "psputil.hxx"
+
+#include "vcl/printergfx.hxx"
+#include "vcl/strhelper.hxx"
namespace psp {
diff --git a/psprint/source/printergfx/common_gfx.cxx b/vcl/unx/source/printergfx/common_gfx.cxx
index 70342de05222..632f0d70aa2f 100644
--- a/psprint/source/printergfx/common_gfx.cxx
+++ b/vcl/unx/source/printergfx/common_gfx.cxx
@@ -29,20 +29,20 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_psprint.hxx"
-#include <psprint/printergfx.hxx>
-#include <psprint/printerjob.hxx>
-#include <psprint/fontmanager.hxx>
-#include <psputil.hxx>
-#include <glyphset.hxx>
-#include <psprint/strhelper.hxx>
-#include <psprint/printerinfomanager.hxx>
-
-#include <tools/debug.hxx>
-#include <tools/color.hxx>
-#ifndef _POLY_HXX
-#include <tools/poly.hxx>
-#endif
+#include "precompiled_vcl.hxx"
+
+#include "psputil.hxx"
+#include "glyphset.hxx"
+
+#include "vcl/printergfx.hxx"
+#include "vcl/printerjob.hxx"
+#include "vcl/fontmanager.hxx"
+#include "vcl/strhelper.hxx"
+#include "vcl/printerinfomanager.hxx"
+
+#include "tools/debug.hxx"
+#include "tools/color.hxx"
+#include "tools/poly.hxx"
using namespace psp ;
diff --git a/psprint/source/printergfx/glyphset.cxx b/vcl/unx/source/printergfx/glyphset.cxx
index 0982ea2d93c6..0d26a66cac2f 100644
--- a/psprint/source/printergfx/glyphset.cxx
+++ b/vcl/unx/source/printergfx/glyphset.cxx
@@ -29,25 +29,27 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_psprint.hxx"
-#include <osl/thread.h>
-#include <glyphset.hxx>
-#include <psputil.hxx>
-#include <psprint/printergfx.hxx>
-#include <psprint/fontmanager.hxx>
-#ifndef __SGI_STL_SET
-#include <set>
-#endif
-#include <map>
-#include <sal/alloca.h>
-#include <rtl/ustring.hxx>
-#include <rtl/strbuf.hxx>
+#include "precompiled_vcl.hxx"
+
+#include "glyphset.hxx"
+#include "psputil.hxx"
-#ifndef __SUBFONT_H
#define NO_LIST
-#include <../fontsubset/sft.h>
+#include "sft.h"
#undef NO_LIST
-#endif
+
+#include "vcl/printergfx.hxx"
+#include "vcl/fontmanager.hxx"
+
+#include "osl/thread.h"
+
+#include "sal/alloca.h"
+
+#include "rtl/ustring.hxx"
+#include "rtl/strbuf.hxx"
+
+#include <set>
+#include <map>
using namespace psp;
using namespace rtl;
diff --git a/psprint/source/printergfx/glyphset.hxx b/vcl/unx/source/printergfx/glyphset.hxx
index aff6424d996b..f4cd15a56ae6 100644
--- a/psprint/source/printergfx/glyphset.hxx
+++ b/vcl/unx/source/printergfx/glyphset.hxx
@@ -31,13 +31,15 @@
#ifndef _PSPRINT_GLYPHSET_HXX_
#define _PSPRINT_GLYPHSET_HXX_
-#include <psprint/fontmanager.hxx>
-#include <osl/file.hxx>
-#include <rtl/string.hxx>
-#include <tools/gen.hxx>
-#ifndef __SGI_STL_LIST
+#include "vcl/fontmanager.hxx"
+
+#include "osl/file.hxx"
+
+#include "rtl/string.hxx"
+
+#include "tools/gen.hxx"
+
#include <list>
-#endif
#include <hash_map>
namespace psp {
diff --git a/psprint/source/printergfx/makefile.mk b/vcl/unx/source/printergfx/makefile.mk
index 438c591a5d67..6de3e9bfe3bb 100644
--- a/psprint/source/printergfx/makefile.mk
+++ b/vcl/unx/source/printergfx/makefile.mk
@@ -29,10 +29,10 @@
#
#*************************************************************************
-PRJ=..$/..
+PRJ=..$/..$/..
-PRJNAME=psprint
-TARGET=gfx
+PRJNAME=vcl
+TARGET=printergfx
# --- Settings -----------------------------------------------------
diff --git a/psprint/source/printergfx/printerjob.cxx b/vcl/unx/source/printergfx/printerjob.cxx
index 2823d0f928a7..783dd5ff2b47 100644
--- a/psprint/source/printergfx/printerjob.cxx
+++ b/vcl/unx/source/printergfx/printerjob.cxx
@@ -29,21 +29,7 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_psprint.hxx"
-
-#ifndef __SGI_STL_VECTOR
-#include <vector>
-#endif
-#include <psprint/printerjob.hxx>
-#include <psprint/ppdparser.hxx>
-#include <psprint/strhelper.hxx>
-#include <psprint/printerinfomanager.hxx>
-#include <psprint/printergfx.hxx>
-#include <psputil.hxx>
-#include <rtl/ustring.hxx>
-#include <rtl/strbuf.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <osl/thread.h>
+#include "precompiled_vcl.hxx"
#include <stdio.h>
#include <sys/types.h>
@@ -51,12 +37,26 @@
#include <fcntl.h>
#include <unistd.h>
#include <pwd.h>
-#include <sal/alloca.h>
-
-#include <algorithm>
+#include "psputil.hxx"
#include "glyphset.hxx"
+#include "vcl/printerjob.hxx"
+#include "vcl/ppdparser.hxx"
+#include "vcl/strhelper.hxx"
+#include "vcl/printerinfomanager.hxx"
+#include "vcl/printergfx.hxx"
+
+#include "rtl/ustring.hxx"
+#include "rtl/strbuf.hxx"
+#include "rtl/ustrbuf.hxx"
+
+#include "osl/thread.h"
+#include "sal/alloca.h"
+
+#include <algorithm>
+#include <vector>
+
using namespace psp;
using namespace rtl;
diff --git a/psprint/source/printergfx/psheader.ps b/vcl/unx/source/printergfx/psheader.ps
index 7b947b3a470b..7b947b3a470b 100644
--- a/psprint/source/printergfx/psheader.ps
+++ b/vcl/unx/source/printergfx/psheader.ps
diff --git a/psprint/source/printergfx/psputil.cxx b/vcl/unx/source/printergfx/psputil.cxx
index 4520be0b1310..0b92f4ee423d 100644
--- a/psprint/source/printergfx/psputil.cxx
+++ b/vcl/unx/source/printergfx/psputil.cxx
@@ -29,11 +29,13 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_psprint.hxx"
-#include "psputil.hxx"
+#include "precompiled_vcl.hxx"
#include <string.h>
-#include <tools/debug.hxx>
+
+#include "psputil.hxx"
+
+#include "tools/debug.hxx"
namespace psp {
diff --git a/psprint/source/printergfx/psputil.hxx b/vcl/unx/source/printergfx/psputil.hxx
index 879d9ae4732f..b3227962e8a0 100644
--- a/psprint/source/printergfx/psputil.hxx
+++ b/vcl/unx/source/printergfx/psputil.hxx
@@ -31,11 +31,12 @@
#ifndef _PSPRINT_PRINTERUTIL_HXX_
#define _PSPRINT_PRINTERUTIL_HXX_
-#include <osl/file.hxx>
-#include <rtl/ustring.hxx>
-#include <rtl/string.hxx>
-#include <rtl/tencinfo.h>
-#include <rtl/textcvt.h>
+#include "osl/file.hxx"
+
+#include "rtl/ustring.hxx"
+#include "rtl/string.hxx"
+#include "rtl/tencinfo.h"
+#include "rtl/textcvt.h"
#include <map>
diff --git a/psprint/source/printergfx/text_gfx.cxx b/vcl/unx/source/printergfx/text_gfx.cxx
index a0c44858ab5b..e9c173682f87 100644
--- a/psprint/source/printergfx/text_gfx.cxx
+++ b/vcl/unx/source/printergfx/text_gfx.cxx
@@ -29,16 +29,21 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_psprint.hxx"
-#include <psprint/printergfx.hxx>
-#include <psprint/fontmanager.hxx>
-#include <psprint/helper.hxx>
-#include "psputil.hxx"
-#include <glyphset.hxx>
-#include <osl/thread.h>
-#include <sal/alloca.h>
+#include "precompiled_vcl.hxx"
+
#include <math.h>
+#include "psputil.hxx"
+#include "glyphset.hxx"
+
+#include "vcl/printergfx.hxx"
+#include "vcl/fontmanager.hxx"
+#include "vcl/helper.hxx"
+
+#include "osl/thread.h"
+
+#include "sal/alloca.h"
+
using namespace psp ;
namespace psp {
diff --git a/vcl/unx/source/window/salframe.cxx b/vcl/unx/source/window/salframe.cxx
index aca9f5dd27d0..8f2bccebc443 100644
--- a/vcl/unx/source/window/salframe.cxx
+++ b/vcl/unx/source/window/salframe.cxx
@@ -35,42 +35,43 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <sal/alloca.h>
-#include <prex.h>
+#include "prex.h"
#include <X11/Xatom.h>
#include <X11/keysym.h>
-#include <FWS.hxx>
+#include "FWS.hxx"
#include <X11/extensions/shape.h>
#ifndef SOLARIS
#include <X11/extensions/dpms.h>
#endif
-#include <postx.h>
-
-#include <salunx.h>
-#include <tools/debug.hxx>
-#include <saldata.hxx>
-#include <saldisp.hxx>
-#include <vcl/salinst.hxx>
-#include <salgdi.h>
-#include <salframe.h>
-#ifndef _SV_KEYCOES_HXX
-#include <vcl/keycodes.hxx>
-#endif
-#include <soicon.hxx>
-#include <dtint.hxx>
-#include <sm.hxx>
-#include <vcl/settings.hxx>
-#include <wmadaptor.hxx>
-#include <psprint/printerinfomanager.hxx>
-#include <salprn.h>
-#include <vcl/floatwin.hxx>
-#include <vcl/sallayout.hxx>
-#include <vcl/svapp.hxx>
-#include <salbmp.h>
-#include <i18n_ic.hxx>
-#include <i18n_keysym.hxx>
-#include <i18n_status.hxx>
+#include "postx.h"
+
+#include "salunx.h"
+#include "saldata.hxx"
+#include "saldisp.hxx"
+#include "salgdi.h"
+#include "salframe.h"
+#include "soicon.hxx"
+#include "dtint.hxx"
+#include "sm.hxx"
+#include "wmadaptor.hxx"
+#include "salprn.h"
+#include "salbmp.h"
+#include "i18n_ic.hxx"
+#include "i18n_keysym.hxx"
+#include "i18n_status.hxx"
+
+#include "vcl/salinst.hxx"
+#include "vcl/floatwin.hxx"
+#include "vcl/sallayout.hxx"
+#include "vcl/svapp.hxx"
+#include "vcl/keycodes.hxx"
+#include "vcl/printerinfomanager.hxx"
+#include "vcl/settings.hxx"
+
+#include "tools/debug.hxx"
+
+#include "sal/alloca.h"
#include <algorithm>
@@ -2793,11 +2794,7 @@ static USHORT sal_GetCode( int state )
if( state & ShiftMask )
nCode |= KEY_SHIFT;
- if( (state & ControlMask )
-#ifdef MACOSX
- || (state & Mod2Mask) // map Meta (aka Command key) to Ctrl
-#endif
- )
+ if( state & ControlMask )
nCode |= KEY_MOD1;
if( state & Mod1Mask )
nCode |= KEY_MOD2;
@@ -3160,27 +3157,13 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
USHORT nModCode = 0;
char aDummy;
-#ifdef MACOSX
- // map Meta (aka Command key) to Ctrl
- if( pEvent->state & Mod2Mask )
- nModCode |= KEY_MOD1;
- if( nKeySym == XK_Meta_L )
- nKeySym = XK_Control_L;
- else if( nKeySym == XK_Meta_R )
- nKeySym = XK_Control_R;
-#endif
-
if( pEvent->state & ShiftMask )
nModCode |= KEY_SHIFT;
if( pEvent->state & ControlMask )
nModCode |= KEY_MOD1;
-#ifdef MACOSX
- if( pEvent->state & Mod2Mask )
- nModCode |= KEY_MOD3;
-#else
if( pEvent->state & Mod1Mask )
nModCode |= KEY_MOD2;
-#endif
+
if( nKeySym == XK_Shift_L || nKeySym == XK_Shift_R
|| nKeySym == XK_Control_L || nKeySym == XK_Control_R
|| nKeySym == XK_Alt_L || nKeySym == XK_Alt_R
@@ -3214,19 +3197,11 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
break;
case XK_Alt_L:
nExtModMask = MODKEY_LMOD2;
-#ifdef MACOSX
- nModMask = KEY_MOD2 | (pEvent->type==KeyRelease ? KEY_MOD3 : 0 );
-#else
nModMask = KEY_MOD2;
-#endif
break;
case XK_Alt_R:
nExtModMask = MODKEY_RMOD2;
-#ifdef MACOSX
- nModMask = KEY_MOD2 | (pEvent->type==KeyRelease ? KEY_MOD3 : 0 );
-#else
nModMask = KEY_MOD2;
-#endif
break;
case XK_Shift_L:
nExtModMask = MODKEY_LSHIFT;
@@ -3629,37 +3604,6 @@ long X11SalFrame::HandleSizeEvent( XConfigureEvent *pEvent )
{
if( maGeometry.nX != pEvent->x || maGeometry.nY != pEvent->y )
{
-#ifdef MACOSX
- // #i68019#: Apple X11 doesn't draw offscreen...
- // Better would be to test if the X server we are running on is Apple X11, but ...
-
- Size aScreenSize = GetDisplay()->GetScreenSize( m_nScreen );
- unsigned int nScreenWidth = aScreenSize.Width();
- unsigned int nScreenHeight = aScreenSize.Height();
-
- // Repaint the window if it was possible to draw outside of the screen (in theory)
- // 1. the window was below the screen and the window was moved up
- // 2. the window was above the screen and the window was moved down
- // 3. the window was out of the screen on the right side and the window was moved left
- // 4. the window's left part was out of the screen and the window was moved right
- if ( ( maGeometry.nY+maGeometry.nHeight > nScreenHeight &&
- pEvent->y < maGeometry.nY ) ||
- ( maGeometry.nY < 0 && pEvent->y > maGeometry.nY ) ||
- ( maGeometry.nX+maGeometry.nWidth > nScreenWidth &&
- pEvent->x < maGeometry.nX ) ||
- ( maGeometry.nX < 0 && pEvent->x > maGeometry.nX) )
- {
- XEvent aEvent;
- aEvent.xexpose.type = Expose;
- aEvent.xexpose.display = pDisplay_->GetDisplay();
- aEvent.xexpose.x = 0;
- aEvent.xexpose.y = 0;
- aEvent.xexpose.width = maGeometry.nWidth;
- aEvent.xexpose.height = maGeometry.nHeight;
- aEvent.xexpose.count = 0;
- HandleExposeEvent(&aEvent);
- }
-#endif
maGeometry.nX = pEvent->x;
maGeometry.nY = pEvent->y;
CallCallback( SALEVENT_MOVE, NULL );
diff --git a/vcl/util/linksvp/makefile.mk b/vcl/util/linksvp/makefile.mk
index ac802d769abf..8a630621684f 100644
--- a/vcl/util/linksvp/makefile.mk
+++ b/vcl/util/linksvp/makefile.mk
@@ -53,7 +53,6 @@ SHL1LIBS=$(LIB1TARGET)
SHL1DEPN=$(LB)$/libvcl$(DLLPOSTFIX)$(DLLPOST)
SHL1STDLIBS=\
$(VCLLIB)\
- -lpsp$(DLLPOSTFIX)\
$(BASEBMPLIB)\
$(BASEGFXLIB)\
$(SOTLIB) \
diff --git a/vcl/util/makefile.mk b/vcl/util/makefile.mk
index 98fe62caae26..96cf50504ef0 100644
--- a/vcl/util/makefile.mk
+++ b/vcl/util/makefile.mk
@@ -145,17 +145,18 @@ SHL18FILE= $(MISC)$/salgdi.slo
.ENDIF
LIB1TARGET= $(SLB)$/$(TARGET).lib
-LIB1FILES= $(SLB)$/app.lib \
- $(SLB)$/gdi.lib \
- $(SLB)$/win.lib \
- $(SLB)$/ctrl.lib \
- $(SLB)$/helper.lib \
+LIB1FILES= $(SLB)$/app.lib \
+ $(SLB)$/gdi.lib \
+ $(SLB)$/win.lib \
+ $(SLB)$/ctrl.lib \
+ $(SLB)$/helper.lib \
+ $(SLB)$/fontsubset.lib \
$(SLB)$/components.lib
.IF "$(GUI)" == "UNX" && "$(GUIBASE)"!="aqua"
-LIB1FILES+=$(SLB)$/salplug.lib
-SHL1STDLIBS+=\
- $(PSPLIB)
+LIB1FILES+= $(SLB)$/salplug.lib \
+ $(SLB)$/fontman.lib \
+ $(SLB)$/printer.lib
.ELSE
LIB1FILES+= \
$(SLB)$/salwin.lib \
@@ -197,7 +198,7 @@ LIB1FILES+= \
.IF "$(USE_BUILTIN_RASTERIZER)"!=""
LIB1FILES += $(SLB)$/glyphs.lib
- SHL1STDLIBS+= $(FREETYPELIB) $(PSPLIB)
+ SHL1STDLIBS+= $(FREETYPELIB)
.ENDIF # USE_BUILTIN_RASTERIZER
SHL1LIBS= $(LIB1TARGET)
@@ -223,10 +224,6 @@ DEFLIB1NAME =vcl
.IF "$(GUI)" == "WNT"
-.IF "$(COM)" == "GCC"
-SHL1STDLIBS += $(PSPLIB)
-.ENDIF
-
SHL1STDLIBS += $(UWINAPILIB) \
$(GDI32LIB) \
$(GDIPLUSLIB) \
@@ -236,12 +233,7 @@ SHL1STDLIBS += $(UWINAPILIB) \
$(SHELL32LIB) \
$(ADVAPI32LIB)
-.IF "$(COM)" == "GCC"
SHL1STDLIBS += $(IMM32LIB)
-.ELSE
-SHL1STDLIBS += $(PSPLIB) \
- $(IMM32LIB)
-.ENDIF
.IF "$(GUI)$(COM)$(CPU)" == "WNTMSCI"
LINKFLAGSSHL += /ENTRY:LibMain@12
@@ -251,19 +243,18 @@ LINKFLAGSSHL += /ENTRY:LibMain@12
# --- OS2 ----------------------------------------------------------------
.IF "$(GUI)" == "OS2"
-STDSHL1 += ft2lib.lib apsp.lib
+STDSHL1 += ft2lib.lib
.ENDIF
# --- UNX ----------------------------------------------------------------
-SHL1STDLIBS += $(PSPLIB)
-
# UNX sal plugins
.IF "$(GUI)" == "UNX" && "$(GUIBASE)" != "aqua"
# basic pure X11 plugin
LIB2TARGET=$(SLB)$/ipure_x
LIB2FILES= \
+ $(SLB)$/printergfx.lib \
$(SLB)$/salwin.lib \
$(SLB)$/salgdi.lib \
$(SLB)$/salapp.lib
@@ -275,7 +266,6 @@ SHL2DEPN=$(SHL1IMPLIBN) $(SHL1TARGETN)
# libs for generic plugin
SHL2STDLIBS=\
$(VCLLIB)\
- $(PSPLIB)\
$(SOTLIB) \
$(UNOTOOLSLIB) \
$(TOOLSLIB) \
@@ -356,7 +346,6 @@ SHL4NOCHECK=TRUE
SHL4STDLIBS+=-l$(SHL2TARGET)
SHL4STDLIBS+=\
$(VCLLIB) \
- $(PSPLIB) \
$(SOTLIB) \
$(UNOTOOLSLIB) \
$(TOOLSLIB) \
@@ -391,7 +380,6 @@ SHL5STDLIBS=$(KDE_LIBS)
SHL5STDLIBS+=-l$(SHL2TARGET)
SHL5STDLIBS+=\
$(VCLLIB) \
- $(PSPLIB) \
$(TOOLSLIB) \
$(VOSLIB) \
$(SALLIB)
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index de08f1c25b50..70701e2ee19a 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -33,53 +33,47 @@
#include <string.h>
#include <malloc.h>
-#include <osl/module.h>
-#include <tools/svwin.h>
-#include <rtl/logfile.hxx>
-#include <rtl/tencinfo.h>
-#ifndef _OSL_FILE_HXX
-#include <osl/file.hxx>
-#endif
-#ifndef _OSL_THREAD_HXX
-#include <osl/thread.hxx>
-#endif
-#ifndef _OSL_PROCESS_HXX
-#include <osl/process.h>
-#endif
-#include <vcl/svapp.hxx>
-#include <wincomp.hxx>
-#include <saldata.hxx>
-#include <salgdi.h>
-#include <vcl/outfont.hxx>
-#include <vcl/font.hxx>
-#include <vcl/sallayout.hxx>
-#include <tools/poly.hxx>
-#include <basegfx/polygon/b2dpolygon.hxx>
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-
-
-#include <tools/debug.hxx>
-#ifndef __SUBFONT_H
-#include <psprint/list.h>
-#include <psprint/sft.h>
-#endif
-#include <rtl/textcvt.h>
+
+#include "tools/svwin.h"
+
+#include "wincomp.hxx"
+#include "saldata.hxx"
+#include "salgdi.h"
+
+#include "vcl/svapp.hxx"
+#include "vcl/outfont.hxx"
+#include "vcl/font.hxx"
+#include "vcl/sallayout.hxx"
+
+#include "rtl/logfile.hxx"
+#include "rtl/tencinfo.h"
+#include "rtl/textcvt.h"
+#include "rtl/bootstrap.hxx"
+
+
+#include "osl/module.h"
+#include "osl/file.hxx"
+#include "osl/thread.hxx"
+#include "osl/process.h"
+
+#include "tools/poly.hxx"
+#include "tools/debug.hxx"
+#include "tools/stream.hxx"
+
+#include "basegfx/polygon/b2dpolygon.hxx"
+#include "basegfx/polygon/b2dpolypolygon.hxx"
+#include "basegfx/matrix/b2dhommatrix.hxx"
+
+#include <list.h>
+#include <sft.h>
#ifdef GCP_KERN_HACK
#include <algorithm>
#endif
-#include <tools/stream.hxx>
-#include <rtl/bootstrap.hxx>
-
#include <vector>
#include <set>
-
-//#ifndef INCLUDED_MAP
#include <map>
-//#define INCLUDED_MAP
-//#endif
static const int MAXFONTHEIGHT = 2048;
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 046dcf17171c..34900aaa951a 100755
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -30,15 +30,22 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <tools/svwin.h>
-#include <rtl/ustring.hxx>
-#include <osl/module.h>
-#include <osl/file.h>
+#include "tools/svwin.h"
+
+#include "salgdi.h"
+#include "saldata.hxx"
+// for GetMirroredChar
+#include "sft.h"
+
+#include "vcl/sallayout.hxx"
+#include "vcl/svapp.hxx"
+
+#include "rtl/ustring.hxx"
+
+#include "osl/module.h"
+#include "osl/file.h"
-#include <salgdi.h>
-#include <saldata.hxx>
-#include <vcl/sallayout.hxx>
#include <cstdio>
#include <malloc.h>
@@ -50,9 +57,6 @@
#include <algorithm>
#endif // GCP_KERN_HACK
-#include <psprint/sft.h>
-// for GetMirroredChar
-#include <vcl/svapp.hxx>
#define USE_UNISCRIBE
#ifdef USE_UNISCRIBE
@@ -62,8 +66,9 @@
#endif // USE_UNISCRIBE
#include <hash_map>
-typedef std::hash_map<int,int> IntMap;
#include <set>
+
+typedef std::hash_map<int,int> IntMap;
typedef std::set<int> IntSet;
#define DROPPED_OUTGLYPH 0xFFFF