Index: head/editors/calligra/Makefile =================================================================== --- head/editors/calligra/Makefile (revision 492701) +++ head/editors/calligra/Makefile (revision 492702) @@ -1,72 +1,76 @@ # $FreeBSD$ PORTNAME= calligra DISTVERSION= 3.1.0 PORTREVISION= 10 CATEGORIES= editors kde MASTER_SITES= KDE/stable/${PORTNAME}/${PORTVERSION} DIST_SUBDIR= KDE/${PORTNAME} MAINTAINER= kde@FreeBSD.org COMMENT= KDE office suite LIB_DEPENDS= libImath.so:graphics/ilmbase \ libKPropertyCore3.so:x11-toolkits/kproperty \ libKReport3.so:textproc/kreport \ libboost_thread.so:devel/boost-libs \ libetonyek-0.1.so:graphics/libetonyek01 \ libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ libgsl.so:math/gsl \ liblcms2.so:graphics/lcms2 \ libKGantt.so:graphics/kdiagram \ libodfgen-0.1.so:textproc/libodfgen01 \ libopenjpeg.so:graphics/openjpeg15 \ libpng.so:graphics/png \ libpoppler-qt5.so:graphics/poppler-qt5 \ libpoppler.so:graphics/poppler \ libqca-qt5.so:devel/qca@qt5 \ librevenge-0.0.so:textproc/librevenge \ libtiff.so:graphics/tiff \ libvisio-0.1.so:textproc/libvisio01 \ libwpd-0.10.so:textproc/libwpd010 \ libwpg-0.3.so:graphics/libwpg03 \ libwps-0.3.so:textproc/libwps03 BUILD_DEPENDS= pstoedit:graphics/pstoedit RUN_DEPENDS= pstoedit:graphics/pstoedit USES= cmake cpe compiler:c++11-lib desktop-file-utils eigen:3 \ gettext iconv:translit jpeg kde:5 localbase:ldflags perl5 pkgconfig \ qt:5 shared-mime-info sqlite tar:xz USE_KDE= activities archive auth bookmarks codecs completion config \ configwidgets coreaddons crash dbusaddons doctools ecm \ emoticons guiaddons i18n iconthemes init itemmodels itemviews \ jobwidgets js kcmutils kdelibs4support khtml kio \ kross notifications notifyconfig parts service solid sonnet \ texteditor textwidgets threadweaver unitconversion wallet \ widgetsaddons windowsystem xmlgui \ calendarcore okular USE_QT= buildtools_build core dbus declarative gui network opengl \ phonon4 printsupport qmake_build \ script sql svg testlib webkit widgets x11extras xml USE_XORG= ice sm x11 xext USE_LDCONFIG= yes OPTIONS_DEFINE= OPENEXR OPTIONS_DEFAULT= OPENEXR OPENEXR_LIB_DEPENDS= libIlmImf.so:graphics/openexr OPENEXR_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_OpenEXR CMAKE_ARGS= -DCMAKE_INCLUDE_PATH:STRING="${QT_INCDIR} ${LOCALBASE}/include" \ -DPRODUCTSET:STRING="DESKTOP" # Requested by upstream, to not include unfinished modules CMAKE_ON= RELEASE_BUILD # Performance increase according to README.PACKAGERS CMAKE_ARGS+= -DCMAKE_CXX_FLAGS="-DKDE_NO_DEBUG_OUTPUT" PLIST_SUB+= SHLIB_VER=16.0.0 +post-patch: + # Fix with poppler 0.73 + ${REINPLACE_CMD} -e 's|Guchar|unsigned char|g' \ + ${WRKSRC}/filters/karbon/pdf/SvgOutputDev.cpp .include Index: head/editors/libreoffice/Makefile =================================================================== --- head/editors/libreoffice/Makefile (revision 492701) +++ head/editors/libreoffice/Makefile (revision 492702) @@ -1,319 +1,325 @@ # $FreeBSD$ .include "${.CURDIR}/Makefile.common" PORTREVISION= 5 MASTER_SITES= https://download.documentfoundation.org/libreoffice/src/${PORTVERSION}/ \ https://dev-www.libreoffice.org/src/:src \ https://dev-www.libreoffice.org/extern/:ext DISTFILES= ${PORTNAME}-${LOVERSION}${EXTRACT_SUFX} \ ${PORTNAME}-help-${LOVERSION}${EXTRACT_SUFX} DIST_SUBDIR= libreoffice EXTRACT_ONLY:= ${DISTFILES} COMMENT= Full integrated office productivity suite BUILD_DEPENDS= p5-Archive-Zip>=0:archivers/p5-Archive-Zip \ zip:archivers/zip \ ${LOCALBASE}/include/sqlext.h:databases/unixODBC \ cppunit-config:devel/cppunit \ dmake:devel/dmake \ ${LOCALBASE}/bin/gperf:devel/gperf \ ${LOCALBASE}/include/mdds-1.2/mdds/global.hpp:devel/mdds \ gpatch:devel/patch \ ucpp:devel/ucpp \ ${LOCALBASE}/include/sane/sane.h:graphics/sane-backends \ vigra-config:graphics/vigra \ ${LOCALBASE}/include/glm/glm.hpp:math/glm \ bash:shells/bash \ gsed:textproc/gsed LIB_DEPENDS= libapr-1.so:devel/apr1 \ libboost_date_time.so:devel/boost-libs \ libicutu.so:devel/icu \ liblangtag.so:devel/liblangtag \ libltdl.so:devel/libltdl \ liborcus-0.13.so:devel/liborcus \ libplds4.so:devel/nspr \ libcurl.so:ftp/curl \ libcairo.so:graphics/cairo \ libgraphite2.so:graphics/graphite2 \ liblcms2.so:graphics/lcms2 \ libcdr-0.1.so:graphics/libcdr01 \ libepoxy.so:graphics/libepoxy \ libetonyek-0.1.so:graphics/libetonyek01 \ libfreehand-0.1.so:graphics/libfreehand \ libgltf-0.0.so:graphics/libgltf \ libwpg-0.3.so:graphics/libwpg03 \ libzmf-0.0.so:graphics/libzmf \ libGeneratedSaxParser.so:graphics/opencollada \ libpng.so:graphics/png \ libpoppler.so:graphics/poppler \ libCoinMP.so:math/coinmp \ liblpsolve55.so:math/lp_solve \ libcmis-0.5.so:net/libcmis \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libharfbuzz-icu.so:print/harfbuzz-icu \ libmspub-0.1.so:print/libmspub01 \ libpagemaker-0.0.so:print/libpagemaker \ libnss3.so:security/nss \ libxmlsec1-nss.so:security/xmlsec1 \ libclucene-core.so:textproc/clucene \ libexpat.so:textproc/expat2 \ libhunspell-1.7.so:textproc/hunspell \ libhyphen.so:textproc/hyphen \ libabw-0.1.so:textproc/libabw \ libe-book-0.1.so:textproc/libe-book \ libepubgen-0.1.so:textproc/libepubgen \ libexttextcat-2.0.so:textproc/libexttextcat \ libmwaw-0.3.so:textproc/libmwaw03 \ libodfgen-0.1.so:textproc/libodfgen01 \ libqxp-0.0.so:textproc/libqxp \ librevenge-0.0.so:textproc/librevenge \ libstaroffice-0.0.so:textproc/libstaroffice \ libvisio-0.1.so:textproc/libvisio01 \ libwpd-0.10.so:textproc/libwpd010 \ libwps-0.4.so:textproc/libwps \ libxml2.so:textproc/libxml2 \ libxslt.so:textproc/libxslt \ libmythes-1.2.so:textproc/mythes \ libraptor2.so:textproc/raptor2 \ librdf.so:textproc/redland \ libfontconfig.so:x11-fonts/fontconfig \ libserf-1.so:www/serf RUN_DEPENDS= xdg-open:devel/xdg-utils \ ${LOCALBASE}/share/fonts/Caladea/Caladea-Bold.ttf:x11-fonts/crosextrafonts-caladea-ttf \ ${LOCALBASE}/share/fonts/Carlito/Carlito-Bold.ttf:x11-fonts/crosextrafonts-carlito-ttf \ ${LOCALBASE}/share/fonts/dejavu/DejaVuSans.ttf:x11-fonts/dejavu \ ${LOCALBASE}/share/fonts/twemoji-color-font-ttf/TwitterColorEmoji-SVGinOT.ttf:x11-fonts/twemoji-color-font-ttf \ ${LOCALBASE}/share/fonts/GentiumBasic/GenBasI.ttf:x11-fonts/gentium-basic \ ${LOCALBASE}/share/fonts/Liberation/LiberationMono-Bold.ttf:x11-fonts/liberation-fonts-ttf \ ${LOCALBASE}/share/fonts/LinLibertineG/LinLibertine_DR_G.ttf:x11-fonts/linuxlibertine-g DISTFILES+= 4b87018f7fff1d054939d19920b751a0-collada2gltf-master-cb1d97788a.tar.bz2:src NOT_FOR_ARCHS= aarch64 armv6 armv7 NOT_FOR_ARCHS_REASON= Unsupported host_cpu .if defined(PRERELEASE) MASTER_SITES+= http://dev-builds.libreoffice.org/pre-releases/src/ .endif INSTALL_TARGET= distro-pack-install WRKSRC= ${WRKDIR}/${PORTNAME}-${LOVERSION} SHEBANG_GLOB= *.py GNU_CONFIGURE= yes USE_GL= gl glew glu USE_OPENLDAP= yes USE_PERL5= build USE_XORG= ice sm x11 xaw xext xinerama xrandr xrender USES= autoreconf:build bison compiler:c++14-lang cpe gmake jpeg \ perl5 pkgconfig python shebangfix shared-mime-info ssl tar:xz OPTIONS_DEFINE= CUPS DOCS GNOME GTK2 GTK3 JAVA MMEDIA PGSQL SDK SYSTRAY \ TEST WEBDAV OPTIONS_DEFAULT= CUPS GTK2 MMEDIA GTK2_DESC= GTK+ 2 GUI toolkit support GTK3_DESC= GTK+ 3 GUI toolkit support (experimental) JAVA_DESC= Add Java support (XML filters, macros, DB connections) MMEDIA_DESC= Enable multimedia backend for Impress PGSQL_DESC= Build with PostgreSQL-SDBC driver SDK_DESC= Build with SDK SYSTRAY_DESC= Enable systemtray quickstarter TEST_DESC= Run all regression tests WEBDAV_DESC= Enable WebDAV protocol CUPS_CONFIGURE_ENABLE= cups CUPS_LIB_DEPENDS= libcups.so:print/cups DOCS_CONFIGURE_WITH= help GNOME_CONFIGURE_ENABLE= dbus dconf GNOME_IMPLIES= GTK2 GNOME_LIB_DEPENDS= libdbus-glib-1.so:devel/dbus-glib GNOME_USE= GNOME=dconf GTK_USE_GNOME= gtk-update-icon-cache GTK_USES= desktop-file-utils GTK_VARS= POST_PLIST=add-plist-gnome GTK2_CONFIGURE_ENABLE= gtk GTK2_USE= GNOME=gtk20,${GTK_USE_GNOME} GTK2_USES= ${GTK_USES} GTK2_VARS= ${GTK_VARS} GTK3_CONFIGURE_ENABLE= gtk3 GTK3_USE= GNOME=gtk30,${GTK_USE_GNOME} GTK3_USES= ${GTK_USES} GTK3_VARS= ${GTK_VARS} JAVA_BUILD_DEPENDS= ant:devel/apache-ant \ ${JAVAJARDIR}/commons-codec.jar:java/jakarta-commons-codec \ ${JAVAJARDIR}/commons-httpclient.jar:java/jakarta-commons-httpclient \ ${JAVAJARDIR}/commons-lang.jar:java/jakarta-commons-lang \ ${JAVAJARDIR}/commons-logging.jar:java/jakarta-commons-logging \ ${JAVAJARDIR}/junit.jar:java/junit \ ${JAVAJARDIR}/bsh.jar:lang/bsh JAVA_CATEGORIES= java JAVA_CONFIGURE_ON= --with-ant-home=${LOCALBASE}/share/java/apache-ant \ --with-beanshell-jar=${JAVAJARDIR}/bsh.jar \ --with-commons-codec-jar=${JAVAJARDIR}/commons-codec.jar \ --with-commons-httpclient-jar=${JAVAJARDIR}/commons-httpclient.jar \ --with-commons-lang-jar=${JAVAJARDIR}/commons-lang.jar \ --with-commons-logging-jar=${JAVAJARDIR}/commons-logging.jar \ --with-jdk-home="${JAVA_HOME}" \ --with-junit=${JAVAJARDIR}/junit.jar \ --with-hamcrest=${JAVAJARDIR}/hamcrest.jar \ --without-system-jfreereport JAVA_CONFIGURE_WITH= java # XXX jni.h from GNU classpath causes ABI conflicts. JAVA_CONFLICTS_BUILD= classpath-[0-9]* JAVA_DISTFILES= 17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip:src \ 3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip:src \ 35c94d2df8893241173de1d16b6034c0-swingExSrc.zip:src \ 39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip:src \ 3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip:src \ 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip:src \ 8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar:ext \ 8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip:src \ 97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip:src \ a084cd548b586552cb7d3ee51f1af969-odfvalidator-1.1.8-incubating-SNAPSHOT-jar-with-dependencies.jar:ext \ ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip:src \ ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip:src \ d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip:src \ db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip:src \ eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip:src \ f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip:src JAVA_USE= JAVA=yes JAVA_VARS= JAVA_BUILD=yes MMEDIA_CONFIGURE_ENABLE= gstreamer-1-0 MMEDIA_USE= GSTREAMER1=yes PGSQL_CONFIGURE_ENABLE= postgresql-sdbc PGSQL_CONFIGURE_WITH= gssapi krb5 PGSQL_USES= pgsql SDK_BUILD_DEPENDS= doxygen:devel/doxygen SDK_CONFIGURE_ENABLE= odk SDK_CONFIGURE_OFF= --without-doxygen SDK_CONFIGURE_ON= --with-doxygen=${LOCALBASE}/bin/doxygen SDK_DISTFILES= 185d60944ea767075d27247c3162b3bc-unowinreg.dll:ext SYSTRAY_CONFIGURE_ENABLE= systray TEST_ALL_TARGET_OFF= build-nocheck TEST_CONFIGURE_ENABLE= cve-tests WEBDAV_CONFIGURE_ENABLE= neon WEBDAV_LIB_DEPENDS= libneon.so:www/neon CPPFLAGS+= -isystem ${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib COLLADA_MODS= COLLADABaseUtils COLLADAFramework \ COLLADASaxFrameworkLoader GeneratedSaxParser COLLADA_CFLAGS= ${COLLADA_MODS:S|^|-isystem ${LOCALBASE}/include/opencollada/|} COLLADA_LIBS= -L${LOCALBASE}/lib/opencollada \ ${COLLADA_MODS:S|^COLLADA|OpenCOLLADA|:S|^|-l|} CONFIGURE_ARGS= --disable-dependency-tracking \ --disable-epm \ --disable-fetch-external \ --disable-firebird-sdbc \ --disable-mergelibs \ --disable-online-update \ --enable-cairo-canvas \ --enable-python=system \ --enable-release-build \ --disable-pdfium \ --exec-prefix=${PREFIX} \ --with-alloc=system \ --with-boost=${LOCALBASE} \ --with-build-version="FreeBSD ports ${PKGVERSION}" \ --with-external-dict-dir=${LOCALBASE}/share/hunspell \ --with-external-hyph-dir=${LOCALBASE}/share/hyphen \ --with-external-tar=${DISTDIR}/${DIST_SUBDIR} \ --with-external-thes-dir=${LOCALBASE}/share/mythes \ --with-gnu-patch=${LOCALBASE}/bin/gpatch \ --with-os-version=${OSVERSION} \ --with-parallelism=${MAKE_JOBS_NUMBER} \ --with-system-cppunit \ --with-system-curl \ --with-system-dicts \ --with-system-libs \ --with-system-libxml \ --with-system-opencollada \ --with-system-ucpp \ --with-system-zlib \ --with-vendor="FreeBSD ports" \ --without-fonts \ --without-myspell-dicts CONFIGURE_ENV= DMAKE=${LOCALBASE}/bin/dmake \ GNUTAR="${TAR}" \ GPERF=${LOCALBASE}/bin/gperf \ ICU_CFLAGS="`icu-config --cflags`" \ ICU_LIBS="`icu-config --ldflags`" \ OPENCOLLADA_CFLAGS="${COLLADA_CFLAGS}" \ OPENCOLLADA_LIBS="${COLLADA_LIBS}" \ PYTHON_CFLAGS="`${PYTHON_VERSION}-config --cflags`" \ PYTHON_LIBS="`${PYTHON_VERSION}-config --libs`" MAKE_ARGS+= TMPDIR=${WRKDIR} MAKE_ENV+= CXXFLAGS_WARN="${CXXFLAGS_WARN}" MAKE_ENV+= GNUSED=${LOCALBASE}/bin/gsed MAKE_ENV+= DISPLAY= MAKE_ENV+= verbose=1 .include .include .if ${CHOSEN_COMPILER_TYPE} == clang CXXFLAGS_WARN= -Woverloaded-virtual -Wno-unused-parameter -Wno-unused-local-typedefs .else CXXFLAGS_WARN= -Wshadow -Woverloaded-virtual .endif post-patch: ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ ${WRKSRC}/shell/source/unix/exec/shellexec.cxx + # Fix with poppler 0.73 + ${REINPLACE_CMD} -e 's|Guchar|unsigned char|g' \ + ${WRKSRC}/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx \ + ${WRKSRC}/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx \ + ${WRKSRC}/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx + .if ${COMPILER_FEATURES:Mlibstdc++} ${REINPLACE_CMD} -e 's/gb_CC/gb_CXX/' ${WRKSRC}/solenv/gbuild/platform/unxgcc.mk .endif pre-configure: @${TOUCH} ${WRKSRC}/autogen.lastrun post-configure: @${TOUCH} ${WRKSRC}/src.downloaded post-install: @cd ${STAGEDIR}${PREFIX} && \ ${FIND} -s lib/libreoffice -type d -empty \ -exec ${ECHO_CMD} "@dir {}" \; >> ${TMPPLIST} @cd ${STAGEDIR}${PREFIX} && \ ${FIND} -s bin lib man -not -type d >> ${TMPPLIST} .for subdir in appdata application-registry applications bash-completion icons mime mime-info @cd ${STAGEDIR}${PREFIX} && \ ${FIND} -s share/${subdir} -not -type d >> ${TMPPLIST} .endfor post-install-SDK-on: .for subdir in include share share/doc share/idl @cd ${STAGEDIR}${PREFIX} && \ ${FIND} -s ${subdir}/libreoffice -not -type d >> ${TMPPLIST} .endfor add-plist-gnome: .for subdir in gnome hicolor locolor @${ECHO_CMD} "@rmtry share/icons/${subdir}/icon-theme.cache" >> ${TMPPLIST} @${ECHO_CMD} "@postexec ${LOCALBASE}/bin/gtk-update-icon-cache -q -f %D/share/icons/${subdir} 2>/dev/null || ${TRUE}" >> ${TMPPLIST} @${ECHO_CMD} "@postunexec ${LOCALBASE}/bin/gtk-update-icon-cache -q -f %D/share/icons/${subdir} 2>/dev/null || ${TRUE}" >> ${TMPPLIST} .endfor .include Index: head/graphics/inkscape/Makefile =================================================================== --- head/graphics/inkscape/Makefile (revision 492701) +++ head/graphics/inkscape/Makefile (revision 492702) @@ -1,89 +1,92 @@ # Created by: Alexander Nedotsukov # $FreeBSD$ PORTNAME= inkscape PORTVERSION= 0.92.3 PORTREVISION= 7 CATEGORIES= graphics gnome MASTER_SITES= https://inkscape.org/en/gallery/item/12187/ MAINTAINER= gnome@FreeBSD.org COMMENT= Full featured open source SVG editor LICENSE= GPLv2+ GPLv3+ LGPL21 MPL11 LICENSE_COMB= multi LICENSE_FILE_GPLv2= ${WRKSRC}/GPL2.txt LICENSE_FILE_GPLv3= ${WRKSRC}/GPL3.txt LICENSE_FILE_LGPL21= ${WRKSRC}/LGPL2.1.txt BUILD_DEPENDS= ${LOCALBASE}/include/boost/concept_check.hpp:devel/boost-libs LIB_DEPENDS= libpopt.so:devel/popt \ libgc.so:devel/boehm-gc \ libgsl.so:math/gsl \ libgtkspell.so:textproc/gtkspell \ liblcms2.so:graphics/lcms2 \ libfribidi.so:converters/fribidi \ libaspell.so:textproc/aspell \ libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ libpotrace.so:graphics/libpotrace \ libpng.so:graphics/png \ libMagick++-6.so:graphics/ImageMagick6 USES= compiler:c++11-lib cmake cpe desktop-file-utils gnome \ iconv:wchar_t jpeg pathfix pkgconfig python:2.7,build \ shebangfix tar:bzip2 USE_GNOME= gtkmm24 libxml2 libxslt USE_XORG= x11 INSTALLS_ICONS= yes CMAKE_ARGS+= -DWITH_GNOME_VFS:BOOL=NO SHEBANG_FILES= cxxtest/cxxtestgen.pl share/extensions/*.p[lm] \ share/extensions/*.py share/extensions/genpofiles.sh \ fix-roff-punct OPTIONS_DEFINE= POPPLER VISIO CDR DBUS WPG OPTIONS_DEFAULT=POPPLER VISIO CDR WPG OPTIONS_SUB= yes CDR_DESC= Support for CorelDRAW diagrams CDR_CMAKE_BOOL= WITH_LIBCDR CDR_LIB_DEPENDS= librevenge-stream-0.0.so:textproc/librevenge \ libcdr-0.1.so:graphics/libcdr01 DBUS_CMAKE_BOOL= WITH_DBUS DBUS_LIB_DEPENDS= libdbus-glib-1.so:devel/dbus-glib \ libdbus-1.so:devel/dbus #OPENMP_USES= compiler:openmp #OPENMP_USES_OFF= compiler:c++11-lib #OPENMP_CMAKE_BOOL= WITH_OPENMP CMAKE_ARGS+= -DWITH_OPENMP:BOOL=NO POPPLER_DESC= PDF preview rendering POPPLER_CMAKE_BOOL= ENABLE_POPPLER ENABLE_POPPLER_CAIRO POPPLER_LIB_DEPENDS= libpoppler.so:graphics/poppler \ libpoppler-glib.so:graphics/poppler-glib VISIO_DESC= Support for Microsoft Visio diagrams VISIO_CMAKE_BOOL= WITH_LIBVISIO VISIO_LIB_DEPENDS= librevenge-stream-0.0.so:textproc/librevenge \ libvisio-0.1.so:textproc/libvisio01 WPG_DESC= Support for WordPerfect graphics WPG_CMAKE_BOOL= WITH_LIBWPG WPG_LIB_DEPENDS= libwpg-0.3.so:graphics/libwpg03 # temporary until the build works for the !NLS case USES+= gettext #NLS_CMAKE_BOOL= WITH_NLS #NLS_USES= gettext post-patch: @${REINPLACE_CMD} -e 's|COMMAND python|COMMAND ${PYTHON_VERSION}|g' \ ${WRKSRC}/share/*/CMakeLists.txt # Obtained from Arch Linux @${REINPLACE_CMD} -e 's|gTrue|true|g' -e 's|gFalse|false|g' -e 's|GBool|bool|g' \ ${WRKSRC}/src/extension/internal/pdfinput/pdf-parser.* + # Fix with poppler 0.73 + @${REINPLACE_CMD} -E '/#include "goo\/gtypes.h"/d' \ + ${WRKSRC}/src/extension/internal/pdfinput/pdf-parser.h .include Index: head/graphics/poppler/Makefile =================================================================== --- head/graphics/poppler/Makefile (revision 492701) +++ head/graphics/poppler/Makefile (revision 492702) @@ -1,95 +1,95 @@ # Created by: marcus@FreeBSD.org # $FreeBSD$ PORTNAME= poppler -DISTVERSION= 0.72.0 +DISTVERSION= 0.74.0 CATEGORIES= graphics print MASTER_SITES= http://poppler.freedesktop.org/ MAINTAINER?= gnome@FreeBSD.org COMMENT?= PDF rendering library LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libnspr4.so:devel/nspr \ liblcms2.so:graphics/lcms2 \ libpng.so:graphics/png \ libtiff.so:graphics/tiff \ libfreetype.so:print/freetype2 \ libnss3.so:security/nss \ libfontconfig.so:x11-fonts/fontconfig RUN_DEPENDS= poppler-data>0:graphics/poppler-data USES= compiler:c++11-lang cpe cmake:insource gnome jpeg libtool \ localbase pathfix pkgconfig tar:xz CPE_VENDOR= freedesktop USE_GNOME= cairo libxml2 USE_LDCONFIG= yes CMAKE_ON= ENABLE_LIBJPEG \ ENABLE_LIBPNG \ ENABLE_LIBTIFF \ - ENABLE_XPDF_HEADERS \ + ENABLE_UNSTABLE_API_ABI_HEADERS \ ENABLE_ZLIB \ ENABLE_NSS \ ENABLE_SPLASH # Slave ports. _POPPLER_SLAVES= library glib qt5 utils _SLAVE_PORT?= library # Activate the wanted module, and deactivate the others. CMAKE_ON+= ENABLE_${_SLAVE_PORT:tu} CMAKE_OFF+= ${_POPPLER_SLAVES:N${_SLAVE_PORT}:tu:S/^/ENABLE_/} .if ${_SLAVE_PORT} == library PORTSCOUT= limitw:1,even USES+= iconv CMAKE_ON+= ENABLE_CPP OPTIONS_DEFINE= CURL OPENJPEG OPTIONS_DEFAULT= OPENJPEG OPTIONS_SUB= yes .else PORTSCOUT= ignore:1 LIB_DEPENDS+= libpoppler.so:graphics/poppler PKGNAMESUFFIX= -${_SLAVE_PORT} BUILD_WRKSRC= ${WRKSRC}/${_SLAVE_PORT} INSTALL_WRKSRC= ${WRKSRC}/${_SLAVE_PORT} CMAKE_ARGS+= -DENABLE_LIBOPENJPEG:STRING="none" \ -DENABLE_LIBCURL:BOOL=FALSE . if ${_SLAVE_PORT} == glib USE_GNOME+= glib20 introspection:Build . elif ${_SLAVE_PORT} == qt5 USES+= qt:5 USE_QT= core gui widgets xml \ buildtools_build qmake_build testlib_build . elif ${_SLAVE_PORT} == utils LIB_DEPENDS+= libpoppler-glib.so:graphics/poppler-glib USES+= gnome . endif .endif CURL_CMAKE_BOOL= ENABLE_LIBCURL CURL_LIB_DEPENDS= libcurl.so:ftp/curl OPENJPEG_LIB_DEPENDS= libopenjp2.so:graphics/openjpeg OPENJPEG_CMAKE_ON= -DENABLE_LIBOPENJPEG:STRING="openjpeg2" OPENJPEG_CMAKE_OFF= -DENABLE_LIBOPENJPEG:STRING="none" post-install: .if ${_SLAVE_PORT} == glib ${INSTALL_DATA} ${WRKSRC}/poppler-glib.pc \ ${STAGEDIR}${PREFIX}/libdata/pkgconfig .elif ${_SLAVE_PORT} == qt5 ${INSTALL_DATA} ${WRKSRC}/poppler-qt5.pc \ ${STAGEDIR}${PREFIX}/libdata/pkgconfig .endif .include Index: head/graphics/poppler/distinfo =================================================================== --- head/graphics/poppler/distinfo (revision 492701) +++ head/graphics/poppler/distinfo (revision 492702) @@ -1,3 +1,3 @@ -TIMESTAMP = 1544313959 -SHA256 (poppler-0.72.0.tar.xz) = c1747eb8f26e9e753c4001ed951db2896edc1021b6d0f547a0bd2a27c30ada51 -SIZE (poppler-0.72.0.tar.xz) = 1492912 +TIMESTAMP = 1549603391 +SHA256 (poppler-0.74.0.tar.xz) = 92e09fd3302567fd36146b36bb707db43ce436e8841219025a82ea9fb0076b2f +SIZE (poppler-0.74.0.tar.xz) = 1514044 Index: head/graphics/poppler/pkg-plist =================================================================== --- head/graphics/poppler/pkg-plist (revision 492701) +++ head/graphics/poppler/pkg-plist (revision 492702) @@ -1,141 +1,142 @@ include/poppler/Annot.h include/poppler/Array.h include/poppler/BuiltinFont.h include/poppler/BuiltinFontTables.h include/poppler/CMap.h include/poppler/CachedFile.h include/poppler/Catalog.h +include/poppler/CertificateInfo.h include/poppler/CharCodeToUnicode.h include/poppler/CharTypes.h include/poppler/CompactFontTables.h %%CURL%%include/poppler/CurlCachedFile.h %%CURL%%include/poppler/CurlPDFDocBuilder.h include/poppler/DateInfo.h include/poppler/Decrypt.h include/poppler/Dict.h include/poppler/Error.h include/poppler/ErrorCodes.h include/poppler/FileSpec.h include/poppler/FontEncodingTables.h include/poppler/FontInfo.h include/poppler/Form.h include/poppler/Function.h include/poppler/Gfx.h include/poppler/GfxFont.h include/poppler/GfxState.h include/poppler/GfxState_helpers.h include/poppler/GlobalParams.h include/poppler/Hints.h include/poppler/JArithmeticDecoder.h include/poppler/JBIG2Stream.h %%OPENJPEG%%include/poppler/JPEG2000Stream.h %%NO_OPENJPEG%%include/poppler/JPXStream.h include/poppler/Lexer.h include/poppler/Linearization.h include/poppler/Link.h include/poppler/LocalPDFDocBuilder.h include/poppler/MarkedContentOutputDev.h include/poppler/Movie.h include/poppler/NameToCharCode.h include/poppler/NameToUnicodeTable.h include/poppler/Object.h include/poppler/OptionalContent.h include/poppler/Outline.h include/poppler/OutputDev.h include/poppler/PDFDoc.h include/poppler/PDFDocBuilder.h include/poppler/PDFDocEncoding.h include/poppler/PDFDocFactory.h include/poppler/PSOutputDev.h include/poppler/PSTokenizer.h include/poppler/Page.h include/poppler/PageTransition.h include/poppler/Parser.h include/poppler/PopplerCache.h include/poppler/PreScanOutputDev.h include/poppler/ProfileData.h include/poppler/Rendition.h include/poppler/SecurityHandler.h include/poppler/Sound.h include/poppler/SplashOutputDev.h include/poppler/StdinCachedFile.h include/poppler/StdinPDFDocBuilder.h include/poppler/Stream-CCITT.h include/poppler/Stream.h include/poppler/StructElement.h include/poppler/StructTreeRoot.h include/poppler/TextOutputDev.h include/poppler/UTF.h include/poppler/UnicodeCClassTables.h include/poppler/UnicodeCompTables.h include/poppler/UnicodeDecompTables.h include/poppler/UnicodeMap.h include/poppler/UnicodeMapFuncs.h include/poppler/UnicodeMapTables.h include/poppler/UnicodeTypeTable.h include/poppler/ViewerPreferences.h include/poppler/XRef.h +include/poppler/cpp/poppler-destination.h include/poppler/cpp/poppler-document.h include/poppler/cpp/poppler-embedded-file.h include/poppler/cpp/poppler-font.h include/poppler/cpp/poppler-global.h include/poppler/cpp/poppler-image.h include/poppler/cpp/poppler-page-renderer.h include/poppler/cpp/poppler-page-transition.h include/poppler/cpp/poppler-page.h include/poppler/cpp/poppler-rectangle.h include/poppler/cpp/poppler-toc.h include/poppler/cpp/poppler-version.h include/poppler/fofi/FoFiBase.h include/poppler/fofi/FoFiEncodings.h include/poppler/fofi/FoFiIdentifier.h include/poppler/fofi/FoFiTrueType.h include/poppler/fofi/FoFiType1.h include/poppler/fofi/FoFiType1C.h include/poppler/goo/FixedPoint.h include/poppler/goo/GooCheckedOps.h include/poppler/goo/GooLikely.h include/poppler/goo/GooList.h include/poppler/goo/GooString.h include/poppler/goo/GooTimer.h include/poppler/goo/ImgWriter.h include/poppler/goo/JpegWriter.h include/poppler/goo/PNGWriter.h include/poppler/goo/TiffWriter.h include/poppler/goo/gdir.h include/poppler/goo/gfile.h include/poppler/goo/gmem.h include/poppler/goo/grandom.h include/poppler/goo/gstrtod.h -include/poppler/goo/gtypes.h include/poppler/poppler-config.h include/poppler/splash/Splash.h include/poppler/splash/SplashBitmap.h include/poppler/splash/SplashClip.h include/poppler/splash/SplashErrorCodes.h include/poppler/splash/SplashFTFont.h include/poppler/splash/SplashFTFontEngine.h include/poppler/splash/SplashFTFontFile.h include/poppler/splash/SplashFont.h include/poppler/splash/SplashFontEngine.h include/poppler/splash/SplashFontFile.h include/poppler/splash/SplashFontFileID.h include/poppler/splash/SplashGlyphBitmap.h include/poppler/splash/SplashMath.h include/poppler/splash/SplashPath.h include/poppler/splash/SplashPattern.h include/poppler/splash/SplashScreen.h include/poppler/splash/SplashState.h include/poppler/splash/SplashTypes.h include/poppler/splash/SplashXPath.h include/poppler/splash/SplashXPathScanner.h lib/libpoppler-cpp.so lib/libpoppler-cpp.so.0 -lib/libpoppler-cpp.so.0.5.0 +lib/libpoppler-cpp.so.0.7.0 lib/libpoppler.so -lib/libpoppler.so.83 -lib/libpoppler.so.83.0.0 +lib/libpoppler.so.85 +lib/libpoppler.so.85.0.0 libdata/pkgconfig/poppler-cairo.pc libdata/pkgconfig/poppler-cpp.pc libdata/pkgconfig/poppler-splash.pc libdata/pkgconfig/poppler.pc Index: head/graphics/poppler-glib/pkg-plist =================================================================== --- head/graphics/poppler-glib/pkg-plist (revision 492701) +++ head/graphics/poppler-glib/pkg-plist (revision 492702) @@ -1,21 +1,21 @@ include/poppler/glib/poppler-action.h include/poppler/glib/poppler-annot.h include/poppler/glib/poppler-attachment.h include/poppler/glib/poppler-date.h include/poppler/glib/poppler-document.h include/poppler/glib/poppler-enums.h include/poppler/glib/poppler-features.h include/poppler/glib/poppler-form-field.h include/poppler/glib/poppler-layer.h include/poppler/glib/poppler-macros.h include/poppler/glib/poppler-media.h include/poppler/glib/poppler-movie.h include/poppler/glib/poppler-page.h include/poppler/glib/poppler-structure-element.h include/poppler/glib/poppler.h lib/girepository-1.0/Poppler-0.18.typelib lib/libpoppler-glib.so lib/libpoppler-glib.so.8 -lib/libpoppler-glib.so.8.11.0 +lib/libpoppler-glib.so.8.12.0 libdata/pkgconfig/poppler-glib.pc share/gir-1.0/Poppler-0.18.gir Index: head/graphics/poppler-qt5/Makefile =================================================================== --- head/graphics/poppler-qt5/Makefile (revision 492701) +++ head/graphics/poppler-qt5/Makefile (revision 492702) @@ -1,12 +1,12 @@ # $FreeBSD$ -PORTREVISION= 1 +PORTREVISION= 0 PKGNAMESUFFIX= -qt5 COMMENT= Qt 5 bindings to poppler MASTERDIR= ${.CURDIR}/../../graphics/poppler _SLAVE_PORT= qt5 PLIST= ${.CURDIR}/pkg-plist .include "${MASTERDIR}/Makefile" Index: head/graphics/poppler-qt5/pkg-plist =================================================================== --- head/graphics/poppler-qt5/pkg-plist (revision 492701) +++ head/graphics/poppler-qt5/pkg-plist (revision 492702) @@ -1,12 +1,13 @@ include/poppler/qt5/poppler-annotation.h include/poppler/qt5/poppler-export.h include/poppler/qt5/poppler-form.h include/poppler/qt5/poppler-link.h include/poppler/qt5/poppler-media.h include/poppler/qt5/poppler-optcontent.h include/poppler/qt5/poppler-page-transition.h include/poppler/qt5/poppler-qt5.h +include/poppler/qt5/poppler-version.h lib/libpoppler-qt5.so lib/libpoppler-qt5.so.1 -lib/libpoppler-qt5.so.1.17.0 +lib/libpoppler-qt5.so.1.19.0 libdata/pkgconfig/poppler-qt5.pc Index: head/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.cpp =================================================================== --- head/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.cpp (revision 492701) +++ head/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.cpp (revision 492702) @@ -1,823 +1,935 @@ ---- scribus/plugins/import/pdf/slaoutput.cpp.orig 2018-12-11 13:04:07 UTC +--- scribus/plugins/import/pdf/slaoutput.cpp.orig 2019-01-10 06:21:56 UTC +++ scribus/plugins/import/pdf/slaoutput.cpp @@ -44,7 +44,7 @@ LinkSubmitForm::LinkSubmitForm(Object *actionObj) { if (obj3.isName()) { - char *name = obj3.getName(); + const char *name = obj3.getName(); if (!strcmp(name, "URL")) { obj2 = obj1.dictLookup("F"); @@ -179,7 +179,7 @@ void AnoOutputDev::stroke(GfxState *state) CurrColorStroke = getColor(state->getStrokeColorSpace(), state->getStrokeColor(), &shade); } -void AnoOutputDev::drawString(GfxState *state, GooString *s) +void AnoOutputDev::drawString(GfxState *state, const GooString *s) { int shade = 100; CurrColorText = getColor(state->getFillColorSpace(), state->getFillColor(), &shade); @@ -189,7 +189,7 @@ void AnoOutputDev::drawString(GfxState *state, GooStri m_itemText = s->copy(); } -QString AnoOutputDev::getColor(GfxColorSpace *color_space, GfxColor *color, int *shade) +QString AnoOutputDev::getColor(GfxColorSpace *color_space, const GfxColor *color, int *shade) { QString fNam; QString namPrefix = "FromPDF"; @@ -229,7 +229,7 @@ QString AnoOutputDev::getColor(GfxColorSpace *color_sp else if (color_space->getMode() == csSeparation) { GfxCMYK cmyk; - QString name = QString(((GfxSeparationColorSpace*)color_space)->getName()->getCString()); + QString name = QString(((GfxSeparationColorSpace*)color_space)->getName()->c_str()); double Cc, Mc, Yc, Kc; bool isRegistrationColor = (name == "All"); if (!isRegistrationColor) @@ -410,7 +410,7 @@ LinkAction* SlaOutputDev::SC_getAdditionalAction(const return linkAction; } -GBool SlaOutputDev::annotations_callback(Annot *annota, void *user_data) +bool SlaOutputDev::annotations_callback(Annot *annota, void *user_data) { SlaOutputDev *dev = (SlaOutputDev*)user_data; PDFRectangle *box = annota->getRect(); @@ -509,7 +509,7 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, doub if (act->getKind() == actionGoTo) { LinkGoTo *gto = (LinkGoTo*)act; - LinkDest *dst = gto->getDest(); + const LinkDest *dst = gto->getDest(); if (dst) { if (dst->getKind() == destXYZ) @@ -528,10 +528,10 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, doub } else { - GooString *ndst = gto->getNamedDest(); + const GooString *ndst = gto->getNamedDest(); if (ndst) { - LinkDest *dstn = pdfDoc->findDest(ndst); + const LinkDest *dstn = pdfDoc->findDest(ndst); if (dstn) { if (dstn->getKind() == destXYZ) @@ -555,7 +555,7 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, doub { LinkGoToR *gto = (LinkGoToR*)act; fileName = UnicodeParsedString(gto->getFileName()); - LinkDest *dst = gto->getDest(); + const LinkDest *dst = gto->getDest(); if (dst) { if (dst->getKind() == destXYZ) @@ -568,10 +568,10 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, doub } else { - GooString *ndst = gto->getNamedDest(); + const GooString *ndst = gto->getNamedDest(); if (ndst) { - LinkDest *dstn = pdfDoc->findDest(ndst); + const LinkDest *dstn = pdfDoc->findDest(ndst); if (dstn) { if (dstn->getKind() == destXYZ) @@ -709,7 +709,7 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, do bool bgFound = false; if (achar) { - AnnotColor *bgCol = achar->getBackColor(); + const AnnotColor *bgCol = achar->getBackColor(); if (bgCol) { bgFound = true; @@ -717,7 +717,7 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, do } else CurrColorFill = CommonStrings::None; - AnnotColor *fgCol = achar->getBorderColor(); + const AnnotColor *fgCol = achar->getBorderColor(); if (fgCol) { fgFound = true; @@ -1054,7 +1054,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotW int xco = 0; int yco = 0; LinkGoTo *gto = (LinkGoTo*)Lact; - LinkDest *dst = gto->getDest(); + const LinkDest *dst = gto->getDest(); if (dst) { if (dst->getKind() == destXYZ) @@ -1075,10 +1075,10 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotW } else { - GooString *ndst = gto->getNamedDest(); + const GooString *ndst = gto->getNamedDest(); if (ndst) { - LinkDest *dstn = pdfDoc->findDest(ndst); + const LinkDest *dstn = pdfDoc->findDest(ndst); if (dstn) { if (dstn->getKind() == destXYZ) @@ -1107,7 +1107,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotW int yco = 0; LinkGoToR *gto = (LinkGoToR*)Lact; QString fileName = UnicodeParsedString(gto->getFileName()); - LinkDest *dst = gto->getDest(); + const LinkDest *dst = gto->getDest(); if (dst) { if (dst->getKind() == destXYZ) @@ -1123,10 +1123,10 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotW } else { - GooString *ndst = gto->getNamedDest(); + const GooString *ndst = gto->getNamedDest(); if (ndst) { - LinkDest *dstn = pdfDoc->findDest(ndst); + const LinkDest *dstn = pdfDoc->findDest(ndst); if (dstn) { if (dstn->getKind() == destXYZ) @@ -1462,7 +1462,7 @@ void SlaOutputDev::restoreState(GfxState *state) m_currentClipPath = m_clipPaths.pop(); } -void SlaOutputDev::beginTransparencyGroup(GfxState *state, double *bbox, GfxColorSpace * /*blendingColorSpace*/, GBool isolated, GBool knockout, GBool forSoftMask) +void SlaOutputDev::beginTransparencyGroup(GfxState *state, double *bbox, GfxColorSpace * /*blendingColorSpace*/, bool isolated, bool knockout, bool forSoftMask) { pushGroup("", forSoftMask); m_groupStack.top().isolated = isolated; @@ -1562,7 +1562,7 @@ void SlaOutputDev::endTransparencyGroup(GfxState *stat } } -void SlaOutputDev::setSoftMask(GfxState * /*state*/, double * /*bbox*/, GBool alpha, Function *transferFunc, GfxColor * /*backdropColor*/) +void SlaOutputDev::setSoftMask(GfxState * /*state*/, const double * /*bbox*/, bool alpha, Function *transferFunc, GfxColor * /*backdropColor*/) { if (m_groupStack.count() != 0) { @@ -1604,8 +1604,7 @@ void SlaOutputDev::updateStrokeColor(GfxState *state) void SlaOutputDev::clip(GfxState *state) { // qDebug() << "Clip"; - double *ctm; - ctm = state->getCTM(); + const double *ctm = state->getCTM(); m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]); QString output = convertPath(state->getPath()); FPointArray out; @@ -1641,8 +1640,7 @@ void SlaOutputDev::clip(GfxState *state) void SlaOutputDev::eoClip(GfxState *state) { // qDebug() << "EoClip"; - double *ctm; - ctm = state->getCTM(); + const double *ctm = state->getCTM(); m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]); QString output = convertPath(state->getPath()); FPointArray out; @@ -1678,7 +1676,7 @@ void SlaOutputDev::eoClip(GfxState *state) void SlaOutputDev::stroke(GfxState *state) { // qDebug() << "Stroke"; - double *ctm; + const double *ctm; ctm = state->getCTM(); double xCoor = m_doc->currentPage()->xOffset(); double yCoor = m_doc->currentPage()->yOffset(); @@ -1770,7 +1768,7 @@ void SlaOutputDev::stroke(GfxState *state) void SlaOutputDev::fill(GfxState *state) { // qDebug() << "Fill"; - double *ctm; + const double *ctm; ctm = state->getCTM(); double xCoor = m_doc->currentPage()->xOffset(); double yCoor = m_doc->currentPage()->yOffset(); @@ -1815,7 +1813,7 @@ void SlaOutputDev::fill(GfxState *state) void SlaOutputDev::eoFill(GfxState *state) { // qDebug() << "EoFill"; - double *ctm; + const double *ctm; ctm = state->getCTM(); double xCoor = m_doc->currentPage()->xOffset(); double yCoor = m_doc->currentPage()->yOffset(); @@ -1857,21 +1855,21 @@ void SlaOutputDev::eoFill(GfxState *state) } } -GBool SlaOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) +bool SlaOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) { double GrStartX; double GrStartY; double GrEndX; double GrEndY; int shade = 100; - Function *func = shading->getFunc(0); + const Function *func = shading->getFunc(0); VGradient FillGradient = VGradient(VGradient::linear); FillGradient.clearStops(); GfxColorSpace *color_space = shading->getColorSpace(); if (func->getType() == 3) { StitchingFunction *stitchingFunc = (StitchingFunction*)func; - double *bounds = stitchingFunc->getBounds(); + const double *bounds = stitchingFunc->getBounds(); int num_funcs = stitchingFunc->getNumFuncs(); // Add stops from all the stitched functions for ( int i = 0 ; i < num_funcs ; i++ ) @@ -1905,8 +1903,7 @@ GBool SlaOutputDev::axialShadedFill(GfxState *state, G state->getClipBBox(&xmin, &ymin, &xmax, &ymax); QRectF crect = QRectF(QPointF(xmin, ymin), QPointF(xmax, ymax)); crect = crect.normalized(); - double *ctm; - ctm = state->getCTM(); + const double *ctm = state->getCTM(); m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]); FPointArray gr; gr.addPoint(GrStartX, GrStartY); @@ -1965,24 +1962,24 @@ GBool SlaOutputDev::axialShadedFill(GfxState *state, G m_groupStack.top().Items.append(ite); applyMask(ite); } - return gTrue; + return true; } -GBool SlaOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax) +bool SlaOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax) { double GrStartX; double GrStartY; double GrEndX; double GrEndY; int shade = 100; - Function *func = shading->getFunc(0); + const Function *func = shading->getFunc(0); VGradient FillGradient = VGradient(VGradient::linear); FillGradient.clearStops(); GfxColorSpace *color_space = shading->getColorSpace(); if (func->getType() == 3) { StitchingFunction *stitchingFunc = (StitchingFunction*)func; - double *bounds = stitchingFunc->getBounds(); + const double *bounds = stitchingFunc->getBounds(); int num_funcs = stitchingFunc->getNumFuncs(); // Add stops from all the stitched functions for ( int i = 0 ; i < num_funcs ; i++ ) @@ -2021,8 +2018,7 @@ GBool SlaOutputDev::radialShadedFill(GfxState *state, double GrFocalY = y1; GrEndX = GrFocalX + r1; GrEndY = GrFocalY; - double *ctm; - ctm = state->getCTM(); + const double *ctm = state->getCTM(); m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]); FPointArray gr; gr.addPoint(GrStartX, GrStartY); @@ -2084,10 +2080,10 @@ GBool SlaOutputDev::radialShadedFill(GfxState *state, m_groupStack.top().Items.append(ite); applyMask(ite); } - return gTrue; + return true; } -GBool SlaOutputDev::gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading) +bool SlaOutputDev::gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading) { double xCoor = m_doc->currentPage()->xOffset(); double yCoor = m_doc->currentPage()->yOffset(); @@ -2104,8 +2100,7 @@ GBool SlaOutputDev::gouraudTriangleShadedFill(GfxState output += QString("Z"); pathIsClosed = true; Coords = output; - double *ctm; - ctm = state->getCTM(); + const double *ctm = state->getCTM(); m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]); int z = m_doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, xCoor + crect.x(), yCoor + crect.y(), crect.width(), crect.height(), 0, CurrColorFill, CommonStrings::None); PageItem* ite = m_doc->Items->at(z); @@ -2164,10 +2159,10 @@ GBool SlaOutputDev::gouraudTriangleShadedFill(GfxState ite->meshGradientPatches.append(patchM); } ite->GrType = 12; - return gTrue; + return true; } -GBool SlaOutputDev::patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading) +bool SlaOutputDev::patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading) { // qDebug() << "mesh shaded fill"; double xCoor = m_doc->currentPage()->xOffset(); @@ -2185,8 +2180,7 @@ GBool SlaOutputDev::patchMeshShadedFill(GfxState *stat output += QString("Z"); pathIsClosed = true; Coords = output; - double *ctm; - ctm = state->getCTM(); + const double *ctm = state->getCTM(); m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]); int z = m_doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, xCoor + crect.x(), yCoor + crect.y(), crect.width(), crect.height(), 0, CurrColorFill, CommonStrings::None); PageItem* ite = m_doc->Items->at(z); @@ -2211,7 +2205,7 @@ GBool SlaOutputDev::patchMeshShadedFill(GfxState *stat for (int i = 0; i < shading->getNPatches(); i++) { int shade = 100; - GfxPatch *patch = shading->getPatch(i); + const GfxPatch *patch = shading->getPatch(i); GfxColor color; meshGradientPatch patchM; int u, v; @@ -2314,18 +2308,18 @@ GBool SlaOutputDev::patchMeshShadedFill(GfxState *stat ite->meshGradientPatches.append(patchM); } ite->GrType = 12; - return gTrue; + return true; } -GBool SlaOutputDev::tilingPatternFill(GfxState *state, Gfx * /*gfx*/, Catalog *cat, Object *str, double *pmat, int paintType, int tilingType, Dict *resDict, double *mat, double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep) +bool SlaOutputDev::tilingPatternFill(GfxState *state, Gfx * /*gfx*/, Catalog *cat, Object *str, double *pmat, int paintType, int tilingType, Dict *resDict, double *mat, double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep) { PDFRectangle box; Gfx *gfx; QString id; PageItem *ite; groupEntry gElements; - gElements.forSoftMask = gFalse; - gElements.alpha = gFalse; + gElements.forSoftMask = false; + gElements.alpha = false; gElements.inverted = false; gElements.maskName = ""; gElements.Items.clear(); @@ -2334,13 +2328,12 @@ GBool SlaOutputDev::tilingPatternFill(GfxState *state, width = bbox[2] - bbox[0]; height = bbox[3] - bbox[1]; if (xStep != width || yStep != height) - return gFalse; + return false; box.x1 = bbox[0]; box.y1 = bbox[1]; box.x2 = bbox[2]; box.y2 = bbox[3]; - double *ctm; - ctm = state->getCTM(); + const double *ctm = state->getCTM(); m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]); QTransform mm = QTransform(mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]); QTransform mmx = mm * m_ctm; @@ -2437,10 +2430,10 @@ GBool SlaOutputDev::tilingPatternFill(GfxState *state, applyMask(ite); } delete gfx; - return gTrue; + return true; } -void SlaOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg) +void SlaOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, bool invert, bool interpolate, bool inlineImg) { // qDebug() << "Draw Image Mask"; QImage * image = 0; +@@ -2449,7 +2442,7 @@ void SlaOutputDev::drawImageMask(GfxState *state, Obje + int x, y, i, bit; + unsigned char *dest = 0; + unsigned char *buffer; +- Guchar *pix; ++ unsigned char *pix; + ImageStream * imgStr = new ImageStream(str, width, 1, 1); + imgStr->reset(); + #ifdef WORDS_BIGENDIAN @@ -2512,8 +2505,7 @@ void SlaOutputDev::drawImageMask(GfxState *state, Obje t++; } } - double *ctm; - ctm = state->getCTM(); + const double *ctm = state->getCTM(); double xCoor = m_doc->currentPage()->xOffset(); double yCoor = m_doc->currentPage()->yOffset(); QRectF crect = QRectF(0, 0, width, height); @@ -2605,8 +2597,8 @@ void SlaOutputDev::drawImageMask(GfxState *state, Obje delete image; } -void SlaOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, Stream *maskStr, int maskWidth, int maskHeight, - GfxImageColorMap *maskColorMap, GBool maskInterpolate) +void SlaOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, Stream *maskStr, int maskWidth, int maskHeight, + GfxImageColorMap *maskColorMap, bool maskInterpolate) { // qDebug() << "Masked Image Components" << colorMap->getNumPixelComps(); ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits()); +@@ -2617,7 +2609,7 @@ void SlaOutputDev::drawSoftMaskedImage(GfxState *state + for (int y = 0; y < height; y++) + { + dest = (unsigned int *)(buffer + y * 4 * width); +- Guchar * pix = imgStr->getLine(); ++ unsigned char * pix = imgStr->getLine(); + colorMap->getRGBLine(pix, dest, width); + } + image = new QImage(buffer, width, height, QImage::Format_RGB32); +@@ -2630,13 +2622,13 @@ void SlaOutputDev::drawSoftMaskedImage(GfxState *state + } + ImageStream *mskStr = new ImageStream(maskStr, maskWidth, maskColorMap->getNumPixelComps(), maskColorMap->getBits()); + mskStr->reset(); +- Guchar *mdest = 0; ++ unsigned char *mdest = 0; + unsigned char * mbuffer = new unsigned char[maskWidth * maskHeight]; + memset(mbuffer, 0, maskWidth * maskHeight); + for (int y = 0; y < maskHeight; y++) + { +- mdest = (Guchar *)(mbuffer + y * maskWidth); +- Guchar * pix = mskStr->getLine(); ++ mdest = (unsigned char *)(mbuffer + y * maskWidth); ++ unsigned char * pix = mskStr->getLine(); + maskColorMap->getGrayLine(pix, mdest, maskWidth); + } + if ((maskWidth != width) || (maskHeight != height)) @@ -2658,8 +2650,7 @@ void SlaOutputDev::drawSoftMaskedImage(GfxState *state t++; } } - double *ctm; - ctm = state->getCTM(); + const double *ctm = state->getCTM(); double xCoor = m_doc->currentPage()->xOffset(); double yCoor = m_doc->currentPage()->yOffset(); QRectF crect = QRectF(0, 0, width, height); @@ -2750,7 +2741,7 @@ void SlaOutputDev::drawSoftMaskedImage(GfxState *state delete[] mbuffer; } -void SlaOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, Stream *maskStr, int maskWidth, int maskHeight, GBool maskInvert, GBool maskInterpolate) +void SlaOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, Stream *maskStr, int maskWidth, int maskHeight, bool maskInvert, bool maskInterpolate) { ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits()); imgStr->reset(); +@@ -2760,7 +2751,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Ob + for (int y = 0; y < height; y++) + { + dest = (unsigned int *)(buffer + y * 4 * width); +- Guchar * pix = imgStr->getLine(); ++ unsigned char * pix = imgStr->getLine(); + colorMap->getRGBLine(pix, dest, width); + } + image = new QImage(buffer, width, height, QImage::Format_RGB32); +@@ -2773,14 +2764,14 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Ob + } + ImageStream *mskStr = new ImageStream(maskStr, maskWidth, 1, 1); + mskStr->reset(); +- Guchar *mdest = 0; ++ unsigned char *mdest = 0; + int invert_bit = maskInvert ? 1 : 0; + unsigned char * mbuffer = new unsigned char[maskWidth * maskHeight]; + memset(mbuffer, 0, maskWidth * maskHeight); + for (int y = 0; y < maskHeight; y++) + { +- mdest = (Guchar *)(mbuffer + y * maskWidth); +- Guchar * pix = mskStr->getLine(); ++ mdest = (unsigned char *)(mbuffer + y * maskWidth); ++ unsigned char * pix = mskStr->getLine(); + for (int x = 0; x < maskWidth; x++) + { + if (pix[x] ^ invert_bit) @@ -2808,8 +2799,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Ob t++; } } - double *ctm; - ctm = state->getCTM(); + const double *ctm = state->getCTM(); double xCoor = m_doc->currentPage()->xOffset(); double yCoor = m_doc->currentPage()->yOffset(); QRectF crect = QRectF(0, 0, width, height); @@ -2900,7 +2890,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Ob delete[] mbuffer; } -void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg) +void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, int *maskColors, bool inlineImg) { ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits()); // qDebug() << "Image Components" << colorMap->getNumPixelComps() << "Mask" << maskColors; +@@ -2912,7 +2902,7 @@ void SlaOutputDev::drawImage(GfxState *state, Object * + for (int y = 0; y < height; y++) + { + QRgb *s = (QRgb*)(image->scanLine(y)); +- Guchar *pix = imgStr->getLine(); ++ unsigned char *pix = imgStr->getLine(); + for (int x = 0; x < width; x++) + { + GfxRGB rgb; +@@ -2940,7 +2930,7 @@ void SlaOutputDev::drawImage(GfxState *state, Object * + for (int y = 0; y < height; y++) + { + QRgb *s = (QRgb*)(image->scanLine(y)); +- Guchar *pix = imgStr->getLine(); ++ unsigned char *pix = imgStr->getLine(); + for (int x = 0; x < width; x++) + { + if (colorMap->getNumPixelComps() == 4) @@ -2973,8 +2963,7 @@ void SlaOutputDev::drawImage(GfxState *state, Object * delete image; return; } - double *ctm; - ctm = state->getCTM(); + const double *ctm = state->getCTM(); double xCoor = m_doc->currentPage()->xOffset(); double yCoor = m_doc->currentPage()->yOffset(); QRectF crect = QRectF(0, 0, width, height); @@ -3103,7 +3092,7 @@ void SlaOutputDev::drawImage(GfxState *state, Object * delete image; } -void SlaOutputDev::beginMarkedContent(char *name, Object *dictRef) +void SlaOutputDev::beginMarkedContent(const char *name, Object *dictRef) { mContent mSte; mSte.name = QString(name); @@ -3172,7 +3161,7 @@ void SlaOutputDev::beginMarkedContent(char *name, Obje m_mcStack.push(mSte); } -void SlaOutputDev::beginMarkedContent(char *name, Dict *properties) +void SlaOutputDev::beginMarkedContent(const char *name, Dict *properties) { // qDebug() << "Begin Marked Content with Name " << QString(name); QString nam = QString(name); @@ -3190,13 +3179,13 @@ void SlaOutputDev::beginMarkedContent(char *name, Dict #if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0) Object obj = properties->lookup((char*) "Title"); if (obj.isString()) - lName = QString(obj.getString()->getCString()); + lName = QString(obj.getString()->c_str()); #else Object obj; if (properties->lookup((char*)"Title", &obj)) { if (obj.isString()) - lName = QString(obj.getString()->getCString()); + lName = QString(obj.getString()->c_str()); obj.free(); } #endif @@ -3299,12 +3288,12 @@ void SlaOutputDev::endMarkedContent(GfxState *state) } } -void SlaOutputDev::markPoint(char *name) +void SlaOutputDev::markPoint(const char *name) { // qDebug() << "Begin Marked Point with Name " << QString(name); } -void SlaOutputDev::markPoint(char *name, Dict *properties) +void SlaOutputDev::markPoint(const char *name, Dict *properties) { // qDebug() << "Begin Marked Point with Name " << QString(name) << "and Properties"; beginMarkedContent(name, properties); @@ -3326,7 +3315,7 @@ void SlaOutputDev::updateFont(GfxState *state) char *tmpBuf; int tmpBufLen = 0; int *codeToGID; - double *textMat; + const double *textMat; double m11, m12, m21, m22, fontSize; SplashCoord mat[4]; int n = 0; @@ -3355,7 +3344,7 @@ void SlaOutputDev::updateFont(GfxState *state) if (!(fontLoc = gfxFont->locateFont(xref, 0))) { error(errSyntaxError, -1, "Couldn't find a font for '{0:s}'", - gfxFont->getName() ? gfxFont->getName()->getCString() + gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); goto err2; } @@ -3375,9 +3364,9 @@ void SlaOutputDev::updateFont(GfxState *state) fontsrc = new SplashFontSrc; if (fileName) - fontsrc->setFile(fileName, gFalse); + fontsrc->setFile(fileName, false); else - fontsrc->setBuf(tmpBuf, tmpBufLen, gTrue); + fontsrc->setBuf(tmpBuf, tmpBufLen, true); // load the font file switch (fontType) { @@ -3388,7 +3377,7 @@ void SlaOutputDev::updateFont(GfxState *state) (const char **)((Gfx8BitFont *)gfxFont)->getEncoding()))) { error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", - gfxFont->getName() ? gfxFont->getName()->getCString() + gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); goto err2; } @@ -3400,7 +3389,7 @@ void SlaOutputDev::updateFont(GfxState *state) (const char **)((Gfx8BitFont *)gfxFont)->getEncoding()))) { error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", - gfxFont->getName() ? gfxFont->getName()->getCString() + gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); goto err2; } @@ -3412,7 +3401,7 @@ void SlaOutputDev::updateFont(GfxState *state) (const char **)((Gfx8BitFont *)gfxFont)->getEncoding()))) { error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", - gfxFont->getName() ? gfxFont->getName()->getCString() + gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); goto err2; } @@ -3420,7 +3409,7 @@ void SlaOutputDev::updateFont(GfxState *state) case fontTrueType: case fontTrueTypeOT: if (fileName) - ff = FoFiTrueType::load(fileName->getCString()); + ff = FoFiTrueType::load(fileName->c_str()); else ff = FoFiTrueType::make(tmpBuf, tmpBufLen); if (ff) { @@ -3437,7 +3426,7 @@ void SlaOutputDev::updateFont(GfxState *state) codeToGID, n))) { error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", - gfxFont->getName() ? gfxFont->getName()->getCString() + gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); goto err2; } @@ -3449,7 +3438,7 @@ void SlaOutputDev::updateFont(GfxState *state) fontsrc))) { error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", - gfxFont->getName() ? gfxFont->getName()->getCString() + gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); goto err2; } @@ -3470,7 +3459,7 @@ void SlaOutputDev::updateFont(GfxState *state) codeToGID, n))) { error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", - gfxFont->getName() ? gfxFont->getName()->getCString() + gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); goto err2; } -@@ -3488,7 +3477,7 @@ void SlaOutputDev::updateFont(GfxState *state) +@@ -3484,11 +3473,11 @@ void SlaOutputDev::updateFont(GfxState *state) + if (n) { + codeToGID = (int *)gmallocn(n, sizeof(int)); + memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), +- n * sizeof(Gushort)); ++ n * sizeof(unsigned short)); } } else { if (fileName) - ff = FoFiTrueType::load(fileName->getCString()); + ff = FoFiTrueType::load(fileName->c_str()); else ff = FoFiTrueType::make(tmpBuf, tmpBufLen); if (! ff) @@ -3502,7 +3491,7 @@ void SlaOutputDev::updateFont(GfxState *state) codeToGID, n, faceIndex))) { error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", - gfxFont->getName() ? gfxFont->getName()->getCString() + gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); goto err2; } +@@ -3559,7 +3548,7 @@ void SlaOutputDev::updateFont(GfxState *state) + GooString *fileName; + char *tmpBuf; + int tmpBufLen; +- Gushort *codeToGID; ++ unsigned short *codeToGID; + DisplayFontParam *dfp; + double *textMat; + double m11, m12, m21, m22, fontSize; @@ -3604,7 +3593,7 @@ void SlaOutputDev::updateFont(GfxState *state) } if (!dfp) { - // error(-1, "Couldn't find a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); + // error(-1, "Couldn't find a font for '%s'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); goto err2; } switch (dfp->kind) @@ -3622,37 +3611,37 @@ void SlaOutputDev::updateFont(GfxState *state) } fontsrc = new SplashFontSrc; if (fileName) - fontsrc->setFile(fileName, gFalse); + fontsrc->setFile(fileName, false); else - fontsrc->setBuf(tmpBuf, tmpBufLen, gTrue); + fontsrc->setBuf(tmpBuf, tmpBufLen, true); // load the font file switch (fontType) { case fontType1: if (!(fontFile = m_fontEngine->loadType1Font( id, fontsrc, ((Gfx8BitFont *)gfxFont)->getEncoding()))) { - // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); + // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); goto err2; } break; case fontType1C: if (!(fontFile = m_fontEngine->loadType1CFont( id, fontsrc, ((Gfx8BitFont *)gfxFont)->getEncoding()))) { - // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); + // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); goto err2; } break; case fontType1COT: if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont( id, fontsrc, ((Gfx8BitFont *)gfxFont)->getEncoding()))) { - // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); + // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); goto err2; } break; case fontTrueType: case fontTrueTypeOT: if (fileName) - ff = FoFiTrueType::load(fileName->getCString()); + ff = FoFiTrueType::load(fileName->c_str()); else ff = FoFiTrueType::make(tmpBuf, tmpBufLen); if (ff) @@ -3668,7 +3657,7 @@ void SlaOutputDev::updateFont(GfxState *state) } if (!(fontFile = m_fontEngine->loadTrueTypeFont( id, fontsrc, codeToGID, n))) { - // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); + // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); goto err2; } break; @@ -3676,14 +3665,14 @@ void SlaOutputDev::updateFont(GfxState *state) case fontCIDType0C: if (!(fontFile = m_fontEngine->loadCIDFont( id, fontsrc))) { - // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); + // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); goto err2; } break; case fontCIDType0COT: if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont( id, fontsrc))) { - // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); + // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); goto err2; } break; -@@ -3703,7 +3692,7 @@ void SlaOutputDev::updateFont(GfxState *state) +@@ -3696,14 +3685,14 @@ void SlaOutputDev::updateFont(GfxState *state) + n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen(); + if (n) + { +- codeToGID = (Gushort *)gmallocn(n, sizeof(Gushort)); +- memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), n * sizeof(Gushort)); ++ codeToGID = (unsigned short *)gmallocn(n, sizeof(unsigned short)); ++ memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), n * sizeof(unsigned short)); + } + } else { if (fileName) - ff = FoFiTrueType::load(fileName->getCString()); + ff = FoFiTrueType::load(fileName->c_str()); else ff = FoFiTrueType::make(tmpBuf, tmpBufLen); if (!ff) @@ -3713,7 +3702,7 @@ void SlaOutputDev::updateFont(GfxState *state) } if (!(fontFile = m_fontEngine->loadTrueTypeFont( id, fontsrc, codeToGID, n, faceIndex))) { - // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); + // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)"); goto err2; } break; +@@ -3775,7 +3764,7 @@ void SlaOutputDev::drawChar(GfxState *state, double x, + qPath.setFillRule(Qt::WindingFill); + for (int i = 0; i < fontPath->getLength(); ++i) + { +- Guchar f; ++ unsigned char f; + fontPath->getPoint(i, &x1, &y1, &f); + if (f & splashPathFirst) + qPath.moveTo(x1,y1); @@ -3793,8 +3782,7 @@ void SlaOutputDev::drawChar(GfxState *state, double x, if (f & splashPathLast) qPath.closeSubpath(); } - double *ctm; - ctm = state->getCTM(); + const double *ctm = state->getCTM(); m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]); double xCoor = m_doc->currentPage()->xOffset(); double yCoor = m_doc->currentPage()->yOffset(); @@ -3842,19 +3830,19 @@ void SlaOutputDev::drawChar(GfxState *state, double x, } } -GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, Unicode *u, int uLen) +bool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, Unicode *u, int uLen) { // qDebug() << "beginType3Char"; GfxFont *gfxFont; if (!(gfxFont = state->getFont())) - return gTrue; + return true; if (gfxFont->getType() != fontType3) - return gTrue; + return true; F3Entry f3e; f3e.colored = false; m_F3Stack.push(f3e); pushGroup(); - return gFalse; + return false; } void SlaOutputDev::endType3Char(GfxState *state) @@ -3948,7 +3936,7 @@ void SlaOutputDev::endTextObject(GfxState *state) } } -QString SlaOutputDev::getColor(GfxColorSpace *color_space, GfxColor *color, int *shade) +QString SlaOutputDev::getColor(GfxColorSpace *color_space, const GfxColor *color, int *shade) { QString fNam; QString namPrefix = "FromPDF"; @@ -3993,7 +3981,7 @@ QString SlaOutputDev::getColor(GfxColorSpace *color_sp else if (color_space->getMode() == csSeparation) { GfxCMYK cmyk; - QString name = QString(((GfxSeparationColorSpace*)color_space)->getName()->getCString()); + QString name = QString(((GfxSeparationColorSpace*)color_space)->getName()->c_str()); double Cc, Mc, Yc, Kc; bool isRegistrationColor = (name == "All"); if (!isRegistrationColor) @@ -4032,7 +4020,7 @@ QString SlaOutputDev::getColor(GfxColorSpace *color_sp return fNam; } -QString SlaOutputDev::getAnnotationColor(AnnotColor *color) +QString SlaOutputDev::getAnnotationColor(const AnnotColor *color) { QString fNam; QString namPrefix = "FromPDF"; @@ -4242,7 +4230,7 @@ void SlaOutputDev::applyMask(PageItem *ite) } } -void SlaOutputDev::pushGroup(QString maskName, GBool forSoftMask, GBool alpha, bool inverted) +void SlaOutputDev::pushGroup(QString maskName, bool forSoftMask, bool alpha, bool inverted) { groupEntry gElements; gElements.forSoftMask = forSoftMask; @@ -4252,23 +4240,23 @@ void SlaOutputDev::pushGroup(QString maskName, GBool f m_groupStack.push(gElements); } -QString SlaOutputDev::UnicodeParsedString(GooString *s1) +QString SlaOutputDev::UnicodeParsedString(const GooString *s1) { if ( !s1 || s1->getLength() == 0 ) return QString(); - GBool isUnicode; + bool isUnicode; int i; Unicode u; QString result; if ((s1->getChar(0) & 0xff) == 0xfe && (s1->getLength() > 1 && (s1->getChar(1) & 0xff) == 0xff)) { - isUnicode = gTrue; + isUnicode = true; i = 2; result.reserve((s1->getLength() - 2) / 2); } else { - isUnicode = gFalse; + isUnicode = false; i = 0; result.reserve(s1->getLength()); } Index: head/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.h =================================================================== --- head/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.h (revision 492701) +++ head/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.h (revision 492702) @@ -1,240 +1,248 @@ ---- scribus/plugins/import/pdf/slaoutput.h.orig 2018-12-11 13:04:07 UTC +--- scribus/plugins/import/pdf/slaoutput.h.orig 2019-01-10 06:21:56 UTC +++ scribus/plugins/import/pdf/slaoutput.h -@@ -61,9 +61,9 @@ class LinkSubmitForm: public LinkAction (public) +@@ -26,7 +26,6 @@ for which a new license (GPL+exception) is in place. + #include "selection.h" + #include "vgradient.h" + +-#include + #include + #include + #include +@@ -61,9 +60,9 @@ class LinkSubmitForm: public LinkAction (public) // Destructor. virtual ~LinkSubmitForm(); // Was the LinkImportData created successfully? - virtual GBool isOk() { return fileName != NULL; } + virtual bool isOk() const { return fileName != NULL; } // Accessors. - virtual LinkActionKind getKind() { return actionUnknown; } + virtual LinkActionKind getKind() const { return actionUnknown; } GooString *getFileName() { return fileName; } int getFlags() { return m_flags; } private: -@@ -83,9 +83,9 @@ class LinkImportData: public LinkAction (public) +@@ -83,9 +82,9 @@ class LinkImportData: public LinkAction (public) // Destructor. virtual ~LinkImportData(); // Was the LinkImportData created successfully? - virtual GBool isOk() { return fileName != NULL; } + virtual bool isOk() const { return fileName != NULL; } // Accessors. - virtual LinkActionKind getKind() { return actionUnknown; } + virtual LinkActionKind getKind() const { return actionUnknown; } GooString *getFileName() { return fileName; } private: GooString *fileName; // file name -@@ -98,9 +98,9 @@ class SplashOutFontFileID: public SplashFontFileID +@@ -98,9 +97,9 @@ class SplashOutFontFileID: public SplashFontFileID { public: - SplashOutFontFileID(Ref *rA) { r = *rA; } + SplashOutFontFileID(const Ref *rA) { r = *rA; } ~SplashOutFontFileID() {} - GBool matches(SplashFontFileID *id) + bool matches(SplashFontFileID *id) { return ((SplashOutFontFileID *)id)->r.num == r.num && ((SplashOutFontFileID *)id)->r.gen == r.gen; } -@@ -115,18 +115,18 @@ class AnoOutputDev : public OutputDev +@@ -115,18 +114,18 @@ class AnoOutputDev : public OutputDev public: AnoOutputDev(ScribusDoc* doc, QStringList *importedColors); virtual ~AnoOutputDev(); - GBool isOk() { return gTrue; } - virtual GBool upsideDown() { return gTrue; } - virtual GBool useDrawChar() { return gFalse; } - virtual GBool interpretType3Chars() { return gFalse; } - virtual GBool useTilingPatternFill() { return gFalse; } - virtual GBool useShadedFills(int type) { return gFalse; } - virtual GBool useFillColorStop() { return gFalse; } - virtual GBool useDrawForm() { return gFalse; } + bool isOk() { return true; } + virtual bool upsideDown() { return true; } + virtual bool useDrawChar() { return false; } + virtual bool interpretType3Chars() { return false; } + virtual bool useTilingPatternFill() { return false; } + virtual bool useShadedFills(int type) { return false; } + virtual bool useFillColorStop() { return false; } + virtual bool useDrawForm() { return false; } virtual void stroke(GfxState *state); virtual void eoFill(GfxState *state); virtual void fill(GfxState *state); - virtual void drawString(GfxState *state, GooString *s); + virtual void drawString(GfxState *state, const GooString *s); QString CurrColorText; QString CurrColorFill; -@@ -135,7 +135,7 @@ class AnoOutputDev : public OutputDev +@@ -135,7 +134,7 @@ class AnoOutputDev : public OutputDev GooString *m_fontName; GooString *m_itemText; private: - QString getColor(GfxColorSpace *color_space, GfxColor *color, int *shade); + QString getColor(GfxColorSpace *color_space, const GfxColor *color, int *shade); ScribusDoc* m_doc; QStringList *m_importedColors; }; -@@ -148,7 +148,7 @@ class SlaOutputDev : public OutputDev (public) +@@ -148,7 +147,7 @@ class SlaOutputDev : public OutputDev (public) virtual ~SlaOutputDev(); LinkAction* SC_getAction(AnnotWidget *ano); LinkAction* SC_getAdditionalAction(const char *key, AnnotWidget *ano); - static GBool annotations_callback(Annot *annota, void *user_data); + static bool annotations_callback(Annot *annota, void *user_data); bool handleTextAnnot(Annot* annota, double xCoor, double yCoor, double width, double height); bool handleLinkAnnot(Annot* annota, double xCoor, double yCoor, double width, double height); bool handleWidgetAnnot(Annot* annota, double xCoor, double yCoor, double width, double height); -@@ -156,15 +156,15 @@ class SlaOutputDev : public OutputDev (public) +@@ -156,15 +155,15 @@ class SlaOutputDev : public OutputDev (public) void handleActions(PageItem* ite, AnnotWidget *ano); void startDoc(PDFDoc *doc, XRef *xrefA, Catalog *catA); - GBool isOk() { return gTrue; } - virtual GBool upsideDown() { return gTrue; } - virtual GBool useDrawChar() { return gTrue; } - virtual GBool interpretType3Chars() { return gTrue; } - virtual GBool useTilingPatternFill() { return gTrue; } - virtual GBool useShadedFills(int type) { return type <= 7; } - virtual GBool useFillColorStop() { return gTrue; } - virtual GBool useDrawForm() { return gFalse; } -// virtual GBool needClipToCropBox() { return gTrue; } + bool isOk() { return true; } + virtual bool upsideDown() { return true; } + virtual bool useDrawChar() { return true; } + virtual bool interpretType3Chars() { return true; } + virtual bool useTilingPatternFill() { return true; } + virtual bool useShadedFills(int type) { return type <= 7; } + virtual bool useFillColorStop() { return true; } + virtual bool useDrawForm() { return false; } +// virtual bool needClipToCropBox() { return true; } virtual void startPage(int pageNum, GfxState *, XRef *); virtual void endPage(); // graphics state -@@ -175,30 +175,30 @@ class SlaOutputDev : public OutputDev (public) +@@ -175,30 +174,30 @@ class SlaOutputDev : public OutputDev (public) virtual void stroke(GfxState *state); virtual void fill(GfxState *state); virtual void eoFill(GfxState *state); - GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, double *pmat, int paintType, int tilingType, Dict *resDict, double *mat, double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep); - virtual GBool functionShadedFill(GfxState * /*state*/, GfxFunctionShading * /*shading*/) { qDebug() << "Function Shaded Fill"; return gFalse; } - virtual GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax); - virtual GBool axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading) { return (shading->getExtend0() == shading->getExtend1()); } - virtual GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax); - virtual GBool radialShadedSupportExtend(GfxState *state, GfxRadialShading *shading) { return (shading->getExtend0() == shading->getExtend1()); } - virtual GBool gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading); - virtual GBool patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading); + bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, double *pmat, int paintType, int tilingType, Dict *resDict, double *mat, double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep); + virtual bool functionShadedFill(GfxState * /*state*/, GfxFunctionShading * /*shading*/) { qDebug() << "Function Shaded Fill"; return false; } + virtual bool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax); + virtual bool axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading) { return (shading->getExtend0() == shading->getExtend1()); } + virtual bool radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax); + virtual bool radialShadedSupportExtend(GfxState *state, GfxRadialShading *shading) { return (shading->getExtend0() == shading->getExtend1()); } + virtual bool gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading); + virtual bool patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading); //----- path clipping virtual void clip(GfxState *state); virtual void eoClip(GfxState *state); virtual void clipToStrokePath(GfxState * /*state*/) { qDebug() << "Clip to StrokePath"; } - virtual GBool deviceHasTextClip(GfxState *state) { return gFalse; } + virtual bool deviceHasTextClip(GfxState *state) { return false; } // If current colorspace is pattern, // does this device support text in pattern colorspace? - virtual GBool supportTextCSPattern(GfxState *state) + virtual bool supportTextCSPattern(GfxState *state) { return state->getFillColorSpace()->getMode() == csPattern; } // If current colorspace is pattern, // need this device special handling for masks in pattern colorspace? - virtual GBool fillMaskCSPattern(GfxState * state) + virtual bool fillMaskCSPattern(GfxState * state) { return state->getFillColorSpace()->getMode() == csPattern; } -@@ -206,36 +206,36 @@ class SlaOutputDev : public OutputDev (public) +@@ -206,36 +205,36 @@ class SlaOutputDev : public OutputDev (public) virtual void endMaskClip(GfxState *state) { qDebug() << "End Mask Clip"; } //----- grouping operators - virtual void beginMarkedContent(char *name, Dict *properties); - virtual void beginMarkedContent(char *name, Object *dictRef); + virtual void beginMarkedContent(const char *name, Dict *properties); + virtual void beginMarkedContent(const char *name, Object *dictRef); virtual void endMarkedContent(GfxState *state); - virtual void markPoint(char *name); - virtual void markPoint(char *name, Dict *properties); + virtual void markPoint(const char *name); + virtual void markPoint(const char *name, Dict *properties); //----- image drawing - virtual void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg); - virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg); + virtual void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, bool invert, bool interpolate, bool inlineImg); + virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, int *maskColors, bool inlineImg); virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - GBool interpolate, + bool interpolate, Stream *maskStr, int maskWidth, int maskHeight, GfxImageColorMap *maskColorMap, - GBool maskInterpolate); + bool maskInterpolate); virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - GBool interpolate, + bool interpolate, Stream *maskStr, int maskWidth, int maskHeight, - GBool maskInvert, GBool maskInterpolate); // { qDebug() << "Draw Masked Image"; } + bool maskInvert, bool maskInterpolate); // { qDebug() << "Draw Masked Image"; } //----- transparency groups and soft masks - virtual void beginTransparencyGroup(GfxState *state, double *bbox, GfxColorSpace * /*blendingColorSpace*/, GBool /*isolated*/, GBool /*knockout*/, GBool /*forSoftMask*/); + virtual void beginTransparencyGroup(GfxState *state, double *bbox, GfxColorSpace * /*blendingColorSpace*/, bool /*isolated*/, bool /*knockout*/, bool /*forSoftMask*/); virtual void paintTransparencyGroup(GfxState *state, double *bbox); virtual void endTransparencyGroup(GfxState *state); - virtual void setSoftMask(GfxState * /*state*/, double * /*bbox*/, GBool /*alpha*/, Function * /*transferFunc*/, GfxColor * /*backdropColor*/); + virtual void setSoftMask(GfxState * /*state*/, const double * /*bbox*/, bool /*alpha*/, Function * /*transferFunc*/, GfxColor * /*backdropColor*/); virtual void clearSoftMask(GfxState * /*state*/); virtual void updateFillColor(GfxState *state); -@@ -245,7 +245,7 @@ class SlaOutputDev : public OutputDev (public) +@@ -245,7 +244,7 @@ class SlaOutputDev : public OutputDev (public) virtual void beginTextObject(GfxState *state); virtual void endTextObject(GfxState *state); virtual void drawChar(GfxState *state, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode /*code*/, int /*nBytes*/, Unicode * /*u*/, int /*uLen*/); - virtual GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, Unicode * /*u*/, int /*uLen*/); + virtual bool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, Unicode * /*u*/, int /*uLen*/); virtual void endType3Char(GfxState * /*state*/); virtual void type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/); virtual void type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/); -@@ -260,13 +260,13 @@ class SlaOutputDev : public OutputDev (public) +@@ -260,13 +259,13 @@ class SlaOutputDev : public OutputDev (public) private: void getPenState(GfxState *state); - QString getColor(GfxColorSpace *color_space, GfxColor *color, int *shade); - QString getAnnotationColor(AnnotColor *color); + QString getColor(GfxColorSpace *color_space, const GfxColor *color, int *shade); + QString getAnnotationColor(const AnnotColor *color); QString convertPath(GfxPath *path); int getBlendMode(GfxState *state); void applyMask(PageItem *ite); - void pushGroup(QString maskName = "", GBool forSoftMask = gFalse, GBool alpha = gFalse, bool inverted = false); - QString UnicodeParsedString(GooString *s1); + void pushGroup(QString maskName = "", bool forSoftMask = false, bool alpha = false, bool inverted = false); + QString UnicodeParsedString(const GooString *s1); bool checkClip(); bool pathIsClosed; QString CurrColorFill; -@@ -283,9 +283,9 @@ class SlaOutputDev : public OutputDev (public) +@@ -283,9 +282,9 @@ class SlaOutputDev : public OutputDev (public) struct groupEntry { QList Items; - GBool forSoftMask; - GBool isolated; - GBool alpha; + bool forSoftMask; + bool isolated; + bool alpha; QString maskName; bool inverted; };