Uploading libcdr 0.0.10, hoping it works

Change-Id: Ibf21b856c0f9da276df60680513421be3c871a2d
This commit is contained in:
Fridrich Štrba 2013-01-25 10:29:59 +01:00
parent d46b2086f2
commit 851ca9c0c2
8 changed files with 25 additions and 771 deletions

View file

@ -909,6 +909,7 @@ endif # SYSTEM_GRAPHITE
ifeq ($(SYSTEM_ICU),YES)
gb_LinkTarget__use_icu_headers:=
gb_ExternalProject__use_icu_headers:=
define gb_LinkTarget__use_icudata
$(call gb_LinkTarget_add_libs,$(1),-licudata)
@ -950,6 +951,17 @@ $(call gb_LinkTarget_set_include,$(1),\
endef
define gb_ExternalProject__use_icu_headers
$(call gb_ExternalProject_get_preparation_target,$(1)) :| $(call gb_UnpackedTarball_get_final_target,icu)
$(call gb_ExternalProject_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,icu)/source \
-I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
-I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
$$(INCLUDE) \
)
endef
# icudata and icui18n is called icudt and icuin when built with MSVC :-/
ifeq ($(OS)$(COM),WNTMSC)
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \

View file

@ -1,5 +1,5 @@
CDR_MD5SUM := 3c0037fb07dea2f0bbae8386fa7c6a9a
export CDR_TARBALL := libcdr-0.0.9.tar.bz2
CDR_MD5SUM := bfc46d536c39b03563ab2a0e3beaf51b
export CDR_TARBALL := libcdr-0.0.10.tar.bz2
MSPUB_MD5SUM := b2db54b6e96287ac995d7ed654ace4fc
export MSPUB_TARBALL := libmspub-0.0.3.tar.bz2
VISIO_MD5SUM := 1962a4183bac8a247989af17ef8882ea

View file

@ -16,6 +16,7 @@ $(eval $(call gb_ExternalProject_register_targets,libcdr,\
))
$(eval $(call gb_ExternalProject_use_externals,libcdr,\
icu_headers \
lcms2 \
wpd \
wpg \
@ -30,6 +31,7 @@ $(call gb_ExternalProject_get_state_target,libcdr,build) :
&& export LIBWPG_INCLUDE_DIR=$(OUTDIR)/inc/external \
&& export LCMS2_INCLUDE_DIR=$(call gb_UnpackedTarball_get_dir,lcms2/include) \
&& export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \
&& export ICU_INCLUDE_DIR=$(OUTDIR)/inc/external \
&& $(COMPATH)/vcpackages/vcbuild.exe libcdr.vcproj "Release|Win32" \
&& touch $@
else ifeq ($(VCVER),100)
@ -39,6 +41,7 @@ $(call gb_ExternalProject_get_state_target,libcdr,build) :
&& export LIBWPG_INCLUDE_DIR=$(OUTDIR)/inc/external \
&& export LCMS2_INCLUDE_DIR=$(call gb_UnpackedTarball_get_dir,lcms2/include) \
&& export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \
&& export ICU_INCLUDE_DIR=$(OUTDIR)/inc/external \
&& msbuild.exe libcdr.vcxproj /p:Configuration=Release \
&& touch $@
else
@ -48,6 +51,7 @@ $(call gb_ExternalProject_get_state_target,libcdr,build) :
&& export LIBWPG_INCLUDE_DIR=$(OUTDIR)/inc/external \
&& export LCMS2_INCLUDE_DIR=$(call gb_UnpackedTarball_get_dir,lcms2/include) \
&& export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \
&& export ICU_INCLUDE_DIR=$(OUTDIR)/inc/external \
&& msbuild.exe libcdr.vcxproj /p:PlatformToolset=v110 /p:VisualStudioVersion=11.0 /p:Configuration=Release \
&& touch $@
endif
@ -56,8 +60,10 @@ else
$(call gb_ExternalProject_get_state_target,libcdr,build) :
cd $(EXTERNAL_WORKDIR) \
&& PKG_CONFIG="" \
./configure \
&& export PKG_CONFIG="" \
&& export ICU_LIBS=" " \
&& export ICU_CFLAGS="-I$(OUTDIR)/inc/external" \
&& ./configure \
--with-pic \
--enable-static \
--disable-shared \

View file

@ -11,12 +11,4 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,cdr))
$(eval $(call gb_UnpackedTarball_set_tarball,cdr,$(CDR_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,cdr,1))
$(eval $(call gb_UnpackedTarball_add_patches,cdr,\
libcdr/libcdr-configure.patch.1 \
libcdr/libcdr-issupported-exception.patch.1 \
libcdr/libcdr-msvc.patch \
))
# vim: set noet sw=4 ts=4:

View file

@ -1,432 +0,0 @@
--- cdr/configure 2012-10-05 21:47:11.246958344 +0200
+++ cdr/configure 2012-10-05 22:05:33.913874511 +0200
@@ -637,6 +617,7 @@
DOXYGEN
STATIC_TOOLS_FALSE
STATIC_TOOLS_TRUE
+LIBCDR_LIBS
LIBCDR_CXXFLAGS
DEBUG_CXXFLAGS
WINDRES
@@ -658,8 +639,12 @@
CDR_MAJOR_VERSION
ZLIB_LIBS
ZLIB_CFLAGS
-LIBCDR_LIBS
-LIBCDR_CFLAGS
+LCMS2_LIBS
+LCMS2_CFLAGS
+WPG_LIBS
+WPG_CFLAGS
+WPD_LIBS
+WPD_CFLAGS
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
@@ -816,8 +801,12 @@
PKG_CONFIG
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
-LIBCDR_CFLAGS
-LIBCDR_LIBS
+WPD_CFLAGS
+WPD_LIBS
+WPG_CFLAGS
+WPG_LIBS
+LCMS2_CFLAGS
+LCMS2_LIBS
ZLIB_CFLAGS
ZLIB_LIBS'
@@ -1481,9 +1472,13 @@
directories to add to pkg-config's search path
PKG_CONFIG_LIBDIR
path overriding pkg-config's built-in search path
- LIBCDR_CFLAGS
- C compiler flags for LIBCDR, overriding pkg-config
- LIBCDR_LIBS linker flags for LIBCDR, overriding pkg-config
+ WPD_CFLAGS C compiler flags for WPD, overriding pkg-config
+ WPD_LIBS linker flags for WPD, overriding pkg-config
+ WPG_CFLAGS C compiler flags for WPG, overriding pkg-config
+ WPG_LIBS linker flags for WPG, overriding pkg-config
+ LCMS2_CFLAGS
+ C compiler flags for LCMS2, overriding pkg-config
+ LCMS2_LIBS linker flags for LCMS2, overriding pkg-config
ZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-config
ZLIB_LIBS linker flags for ZLIB, overriding pkg-config
@@ -16098,33 +16094,27 @@
# ====================
pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBCDR" >&5
-$as_echo_n "checking for LIBCDR... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WPD" >&5
+$as_echo_n "checking for WPD... " >&6; }
-if test -n "$LIBCDR_CFLAGS"; then
- pkg_cv_LIBCDR_CFLAGS="$LIBCDR_CFLAGS"
+if test -n "$WPD_CFLAGS"; then
+ pkg_cv_WPD_CFLAGS="$WPD_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
libwpd-0.9
libwpd-stream-0.9
- libwpg-0.2
- lcms2
\""; } >&5
($PKG_CONFIG --exists --print-errors "
libwpd-0.9
libwpd-stream-0.9
- libwpg-0.2
- lcms2
") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_LIBCDR_CFLAGS=`$PKG_CONFIG --cflags "
+ pkg_cv_WPD_CFLAGS=`$PKG_CONFIG --cflags "
libwpd-0.9
libwpd-stream-0.9
- libwpg-0.2
- lcms2
" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
@@ -16133,30 +16123,24 @@
else
pkg_failed=untried
fi
-if test -n "$LIBCDR_LIBS"; then
- pkg_cv_LIBCDR_LIBS="$LIBCDR_LIBS"
+if test -n "$WPD_LIBS"; then
+ pkg_cv_WPD_LIBS="$WPD_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
libwpd-0.9
libwpd-stream-0.9
- libwpg-0.2
- lcms2
\""; } >&5
($PKG_CONFIG --exists --print-errors "
libwpd-0.9
libwpd-stream-0.9
- libwpg-0.2
- lcms2
") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_LIBCDR_LIBS=`$PKG_CONFIG --libs "
+ pkg_cv_WPD_LIBS=`$PKG_CONFIG --libs "
libwpd-0.9
libwpd-stream-0.9
- libwpg-0.2
- lcms2
" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
@@ -16178,37 +16162,251 @@
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- LIBCDR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "
+ WPD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "
libwpd-0.9
libwpd-stream-0.9
- libwpg-0.2
- lcms2
" 2>&1`
else
- LIBCDR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "
+ WPD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "
libwpd-0.9
libwpd-stream-0.9
- libwpg-0.2
- lcms2
" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
- echo "$LIBCDR_PKG_ERRORS" >&5
+ echo "$WPD_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (
libwpd-0.9
libwpd-stream-0.9
+) were not met:
+
+$WPD_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables WPD_CFLAGS
+and WPD_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables WPD_CFLAGS
+and WPD_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ WPD_CFLAGS=$pkg_cv_WPD_CFLAGS
+ WPD_LIBS=$pkg_cv_WPD_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WPG" >&5
+$as_echo_n "checking for WPG... " >&6; }
+
+if test -n "$WPG_CFLAGS"; then
+ pkg_cv_WPG_CFLAGS="$WPG_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
+ libwpg-0.2
+\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "
+ libwpg-0.2
+") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_WPG_CFLAGS=`$PKG_CONFIG --cflags "
+ libwpg-0.2
+" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$WPG_LIBS"; then
+ pkg_cv_WPG_LIBS="$WPG_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
+ libwpg-0.2
+\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "
+ libwpg-0.2
+") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_WPG_LIBS=`$PKG_CONFIG --libs "
+ libwpg-0.2
+" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ WPG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "
+ libwpg-0.2
+" 2>&1`
+ else
+ WPG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "
+ libwpg-0.2
+" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$WPG_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (
libwpg-0.2
+) were not met:
+
+$WPG_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables WPG_CFLAGS
+and WPG_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables WPG_CFLAGS
+and WPG_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ WPG_CFLAGS=$pkg_cv_WPG_CFLAGS
+ WPG_LIBS=$pkg_cv_WPG_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS2" >&5
+$as_echo_n "checking for LCMS2... " >&6; }
+
+if test -n "$LCMS2_CFLAGS"; then
+ pkg_cv_LCMS2_CFLAGS="$LCMS2_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
+ lcms2
+\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "
+ lcms2
+") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LCMS2_CFLAGS=`$PKG_CONFIG --cflags "
+ lcms2
+" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$LCMS2_LIBS"; then
+ pkg_cv_LCMS2_LIBS="$LCMS2_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
+ lcms2
+\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "
+ lcms2
+") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LCMS2_LIBS=`$PKG_CONFIG --libs "
+ lcms2
+" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LCMS2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "
+ lcms2
+" 2>&1`
+ else
+ LCMS2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "
+ lcms2
+" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LCMS2_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (
lcms2
) were not met:
-$LIBCDR_PKG_ERRORS
+$LCMS2_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
-Alternatively, you may set the environment variables LIBCDR_CFLAGS
-and LIBCDR_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables LCMS2_CFLAGS
+and LCMS2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -16219,15 +16417,15 @@
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
-Alternatively, you may set the environment variables LIBCDR_CFLAGS
-and LIBCDR_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables LCMS2_CFLAGS
+and LCMS2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details" "$LINENO" 5; }
else
- LIBCDR_CFLAGS=$pkg_cv_LIBCDR_CFLAGS
- LIBCDR_LIBS=$pkg_cv_LIBCDR_LIBS
+ LCMS2_CFLAGS=$pkg_cv_LCMS2_CFLAGS
+ LCMS2_LIBS=$pkg_cv_LCMS2_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -16574,7 +16772,7 @@
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_WINDRES="windres"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -16678,7 +16876,9 @@
DEBUG_CXXFLAGS="-DNDEBUG"
fi
-LIBCDR_CXXFLAGS="$LIBCDR_CFLAGS"
+LIBCDR_CXXFLAGS="${WPD_CFLAGS} ${WPG_CFLAGS} ${LCMS2_CFLAGS}"
+LIBCDR_LIBS="${WPD_LIBS} ${WPG_LIBS} ${LCMS2_LIBS}"
+

View file

@ -1,43 +0,0 @@
rhbz#891082: CMXDocument::isSupported: catch exceptions
diff -ru cdr.old/src/lib/CMXDocument.cpp cdr/src/lib/CMXDocument.cpp
--- cdr.old/src/lib/CMXDocument.cpp
+++ cdr/src/lib/CMXDocument.cpp
@@ -46,20 +46,24 @@
*/
bool libcdr::CMXDocument::isSupported(WPXInputStream *input)
{
- input->seek(0, WPX_SEEK_SET);
- unsigned riff = readU32(input);
- if (riff != FOURCC_RIFF && riff != FOURCC_RIFX)
- return false;
- input->seek(4, WPX_SEEK_CUR);
- char signature_c = (char)readU8(input);
- if (signature_c != 'C' && signature_c != 'c')
- return false;
- char signature_d = (char)readU8(input);
- if (signature_d != 'M' && signature_d != 'm')
- return false;
- char signature_r = (char)readU8(input);
- if (signature_r != 'X' && signature_r != 'x')
+ try {
+ input->seek(0, WPX_SEEK_SET);
+ unsigned riff = readU32(input);
+ if (riff != FOURCC_RIFF && riff != FOURCC_RIFX)
+ return false;
+ input->seek(4, WPX_SEEK_CUR);
+ char signature_c = (char)readU8(input);
+ if (signature_c != 'C' && signature_c != 'c')
+ return false;
+ char signature_d = (char)readU8(input);
+ if (signature_d != 'M' && signature_d != 'm')
+ return false;
+ char signature_r = (char)readU8(input);
+ if (signature_r != 'X' && signature_r != 'x')
+ return false;
+ } catch (...) {
return false;
+ }
return true;
}

View file

@ -1,284 +0,0 @@
--- cdr/src/lib/CDRCollector.h
+++ cdr/src/lib/CDRCollector.h
@@ -103,7 +103,7 @@ public:
virtual void collectOutlId(unsigned id) = 0;
virtual void collectFild(unsigned id, unsigned short fillType, const CDRColor &color1, const CDRColor &color2, const CDRGradient &gradient, const CDRImageFill &imageFill) = 0;
virtual void collectOutl(unsigned id, unsigned short lineType, unsigned short capsType, unsigned short joinType, double lineWidth,
- double stretch, double angle, const CDRColor &color, const std::vector<unsigned short> &dashArray,
+ double stretch, double angle, const CDRColor &color, const std::vector<unsigned> &dashArray,
unsigned startMarkerId, unsigned endMarkerId) = 0;
virtual void collectRotate(double angle, double cx, double cy) = 0;
virtual void collectFlags(unsigned flags, bool considerFlags) = 0;
--- cdr/src/lib/CDRContentCollector.h
+++ cdr/src/lib/CDRContentCollector.h
@@ -67,7 +67,7 @@ public:
void collectOutlId(unsigned id);
void collectFild(unsigned, unsigned short, const CDRColor &, const CDRColor &, const CDRGradient &, const CDRImageFill &) {}
void collectOutl(unsigned, unsigned short, unsigned short, unsigned short, double, double, double, const CDRColor &,
- const std::vector<unsigned short> &, unsigned, unsigned) {}
+ const std::vector<unsigned> &, unsigned, unsigned) {}
void collectRotate(double angle, double cx, double cy);
void collectFlags(unsigned flags, bool considerFlags);
void collectPageSize(double, double, double, double) {}
--- cdr/src/lib/CDRParser.cpp
+++ cdr/src/lib/CDRParser.cpp
@@ -1376,7 +1376,7 @@ void libcdr::CDRParser::readWaldoOutl(WPXInputStream *input)
input->seek(7, WPX_SEEK_CUR);
unsigned short numDash = readU8(input);
int fixPosition = input->tell();
- std::vector<unsigned short> dashArray;
+ std::vector<unsigned> dashArray;
for (unsigned short i = 0; i < numDash; ++i)
dashArray.push_back(readU8(input));
input->seek(fixPosition + 10, WPX_SEEK_SET);
@@ -1870,7 +1870,7 @@ void libcdr::CDRParser::readOutl(WPXInputStream *input, unsigned length)
input->seek(16, WPX_SEEK_CUR);
unsigned short numDash = readU16(input);
int fixPosition = input->tell();
- std::vector<unsigned short> dashArray;
+ std::vector<unsigned> dashArray;
for (unsigned short i = 0; i < numDash; ++i)
dashArray.push_back(readU16(input));
if (m_version < 600)
--- cdr/src/lib/CDRStylesCollector.cpp
+++ cdr/src/lib/CDRStylesCollector.cpp
@@ -56,7 +56,7 @@ void libcdr::CDRStylesCollector::collectFild(unsigned id, unsigned short fillTyp
}
void libcdr::CDRStylesCollector::collectOutl(unsigned id, unsigned short lineType, unsigned short capsType, unsigned short joinType, double lineWidth,
- double stretch, double angle, const CDRColor &color, const std::vector<unsigned short> &dashArray,
+ double stretch, double angle, const CDRColor &color, const std::vector<unsigned> &dashArray,
unsigned startMarkerId, unsigned endMarkerId)
{
m_ps.m_lineStyles[id] = CDRLineStyle(lineType, capsType, joinType, lineWidth, stretch, angle, color, dashArray, startMarkerId, endMarkerId);
--- cdr/src/lib/CDRStylesCollector.h
+++ cdr/src/lib/CDRStylesCollector.h
@@ -68,7 +68,7 @@ public:
void collectOutlId(unsigned) {}
void collectFild(unsigned id, unsigned short fillType, const CDRColor &color1, const CDRColor &color2, const CDRGradient &gradient, const CDRImageFill &imageFill);
void collectOutl(unsigned id, unsigned short lineType, unsigned short capsType, unsigned short joinType, double lineWidth,
- double stretch, double angle, const CDRColor &color, const std::vector<unsigned short> &dashArray,
+ double stretch, double angle, const CDRColor &color, const std::vector<unsigned> &dashArray,
unsigned startMarkerId, unsigned endMarkerId);
void collectRotate(double,double,double) {}
void collectFlags(unsigned, bool) {}
--- cdr/src/lib/CDRTypes.h
+++ cdr/src/lib/CDRTypes.h
@@ -136,7 +136,7 @@ struct CDRLineStyle
double stretch;
double angle;
CDRColor color;
- std::vector<unsigned short> dashArray;
+ std::vector<unsigned> dashArray;
unsigned startMarkerId;
unsigned endMarkerId;
CDRLineStyle()
@@ -144,7 +144,7 @@ struct CDRLineStyle
stretch(0.0), angle(0.0), color(), dashArray(),
startMarkerId(0), endMarkerId(0) {}
CDRLineStyle(unsigned short lt, unsigned short ct, unsigned short jt,
- double lw, double st, double a, const CDRColor &c, const std::vector<unsigned short> &da,
+ double lw, double st, double a, const CDRColor &c, const std::vector<unsigned> &da,
unsigned smi, unsigned emi)
: lineType(lt), capsType(ct), joinType(jt), lineWidth(lw),
stretch(st), angle(a), color(c), dashArray(da),
--- cdr/build/win32/cdr2raw.vcproj 2012-10-06 06:45:36.436443100 +0200
+++ cdr/build/win32/cdr2raw.vcproj 2012-10-06 06:46:42.153510700 +0200
@@ -69,7 +69,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="libcdr-0.2.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
+ AdditionalDependencies="libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
OutputFile="Debug\bin\cdr2raw.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
@@ -157,7 +157,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="libcdr-0.2.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
+ AdditionalDependencies="libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
OutputFile="Release\bin\cdr2raw.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
--- cdr/build/win32/cdr2raw.vcxproj 2012-10-06 06:45:36.436443100 +0200
+++ cdr/build/win32/cdr2raw.vcxproj 2012-10-06 06:46:42.153510700 +0200
@@ -68,7 +68,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <AdditionalDependencies>libcdr-0.2.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>Debug\bin\cdr2raw.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>Debug\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);$(ZLIB_LIB_DIR);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
@@ -109,7 +109,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <AdditionalDependencies>libcdr-0.2.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>Release\bin\cdr2raw.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>Release\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);$(ZLIB_LIB_DIR);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
--- cdr/build/win32/cdr2xhtml.vcproj 2012-10-06 06:45:36.436443100 +0200
+++ cdr/build/win32/cdr2xhtml.vcproj 2012-10-06 06:46:42.169135300 +0200
@@ -67,7 +67,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="libcdr-0.2.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
+ AdditionalDependencies="libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
OutputFile="Release\bin\cdr2xhtml.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
@@ -156,7 +156,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="libcdr-0.2.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
+ AdditionalDependencies="libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
OutputFile="Debug\bin\cdr2xhtml.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
--- cdr/build/win32/cdr2xhtml.vcxproj 2012-10-06 06:45:36.452067700 +0200
+++ cdr/build/win32/cdr2xhtml.vcxproj 2012-10-06 06:46:42.169135300 +0200
@@ -66,7 +66,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <AdditionalDependencies>libcdr-0.2.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>Release\bin\cdr2xhtml.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>Release\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);$(ZLIB_LIB_DIR);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
@@ -108,7 +108,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <AdditionalDependencies>libcdr-0.2.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>Debug\bin\cdr2xhtml.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>Debug\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
--- cdr/build/win32/cmx2raw.vcproj 2012-10-06 06:45:36.452067700 +0200
+++ cdr/build/win32/cmx2raw.vcproj 2012-10-06 06:46:42.169135300 +0200
@@ -69,7 +69,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="libcdr-0.2.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
+ AdditionalDependencies="libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
OutputFile="Debug\bin\cmx2raw.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
@@ -157,7 +157,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="libcdr-0.2.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
+ AdditionalDependencies="libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
OutputFile="Release\bin\cmx2raw.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
--- cdr/build/win32/cmx2raw.vcxproj 2012-10-06 06:45:36.452067700 +0200
+++ cdr/build/win32/cmx2raw.vcxproj 2012-10-06 06:46:42.184759900 +0200
@@ -68,7 +68,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <AdditionalDependencies>libcdr-0.2.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>Debug\bin\cmx2raw.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>Debug\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);$(ZLIB_LIB_DIR);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
@@ -109,7 +109,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <AdditionalDependencies>libcdr-0.2.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>Release\bin\cmx2raw.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>Release\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);$(ZLIB_LIB_DIR);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
--- cdr/build/win32/cmx2xhtml.vcproj 2012-10-06 06:45:36.452067700 +0200
+++ cdr/build/win32/cmx2xhtml.vcproj 2012-10-06 06:46:42.184759900 +0200
@@ -69,7 +69,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="libcdr-0.2.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
+ AdditionalDependencies="libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
OutputFile="Debug\bin\cmx2xhtml.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
@@ -157,7 +157,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="libcdr-0.2.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
+ AdditionalDependencies="libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
OutputFile="Release\bin\cmx2xhtml.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
--- cdr/build/win32/cmx2xhtml.vcxproj 2012-10-06 06:45:36.467692300 +0200
+++ cdr/build/win32/cmx2xhtml.vcxproj 2012-10-06 06:46:42.184759900 +0200
@@ -68,7 +68,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <AdditionalDependencies>libcdr-0.2.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>Debug\bin\cmx2xhtml.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>Debug\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);$(ZLIB_LIB_DIR);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
@@ -109,7 +109,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <AdditionalDependencies>libcdr-0.2.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>Release\bin\cmx2xhtml.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>Release\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);$(ZLIB_LIB_DIR);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
--- cdr/build/win32/libcdr.vcproj 2012-10-06 06:45:36.483316900 +0200
+++ cdr/build/win32/libcdr.vcproj 2012-10-06 06:46:42.216009100 +0200
@@ -67,7 +67,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="Debug\lib\libcdr-0.2.lib"
+ OutputFile="Debug\lib\libcdr-0.0.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -141,7 +141,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="Release\lib\libcdr-0.2.lib"
+ OutputFile="Release\lib\libcdr-0.0.lib"
SuppressStartupBanner="true"
/>
<Tool
--- cdr/build/win32/libcdr.vcxproj 2012-10-06 06:45:36.483316900 +0200
+++ cdr/build/win32/libcdr.vcxproj 2012-10-06 06:46:42.231633700 +0200
@@ -61,7 +61,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Lib>
- <OutputFile>Debug\lib\libcdr-0.2.lib</OutputFile>
+ <OutputFile>Debug\lib\libcdr-0.0.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<Bscmake>
@@ -91,7 +91,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Lib>
- <OutputFile>Release\lib\libcdr-0.2.lib</OutputFile>
+ <OutputFile>Release\lib\libcdr-0.0.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<Bscmake>

View file

@ -53,6 +53,9 @@ $(eval $(call gb_Library_use_externals,wpftdraw,\
lcms2 \
libxml2 \
zlib \
icui18n \
icuuc \
icudata \
))
$(eval $(call gb_Library_add_exception_objects,wpftdraw,\