Hello community,
here is the log from the commit of package libcdr for openSUSE:Factory checked in at 2013-03-08 09:15:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libcdr (Old)
and /work/SRC/openSUSE:Factory/.libcdr.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libcdr", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/libcdr/libcdr.changes 2013-01-29 10:47:23.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libcdr.new/libcdr.changes 2013-03-08 09:15:21.000000000 +0100
@@ -1,0 +2,12 @@
+Fri Mar 1 14:24:12 CET 2013 - fridrich.strba@suse.com
+
+- Update to upstream version 0.0.11
+ * Fix positions of circles and their transformations
+ * Fix issues with large angle when the angles are negative
+ * Implement reading of multi-paragraph text
+ * Fix tranformation of bitmaps
+ * Miscellaneous coverity fixes
+ * Miscellaneous fixes of the SVG generator
+- Upstream patch for text encoding overrides in styles
+
+-------------------------------------------------------------------
Old:
----
libcdr-0.0.10-ellipse.patch
libcdr-0.0.10.tar.xz
New:
----
libcdr-0.0.11-encoding.patch
libcdr-0.0.11.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libcdr.spec ++++++
--- /var/tmp/diff_new_pack.KTUsMw/_old 2013-03-08 09:15:22.000000000 +0100
+++ /var/tmp/diff_new_pack.KTUsMw/_new 2013-03-08 09:15:22.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package libcdr
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -14,6 +14,8 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+
+
Name: libcdr
# note: the main package is empty, it only sets a sane name for the source rpm
%if 0%{?suse_version} > 1020
@@ -22,16 +24,22 @@
%else
%define build_doc 0
%endif
-BuildRequires: gcc-c++ pkgconfig xz zlib-devel liblcms2-devel libicu-devel
-BuildRequires: libwpd-devel >= 0.9.0 libwpg-devel >= 0.2.0
+BuildRequires: gcc-c++
+BuildRequires: libicu-devel
+BuildRequires: liblcms2-devel
+BuildRequires: libwpd-devel >= 0.9.0
+BuildRequires: libwpg-devel >= 0.2.0
+BuildRequires: pkgconfig
+BuildRequires: xz
+BuildRequires: zlib-devel
Summary: Library for parsing the Corel Draw file format structure
-Version: 0.0.10
-Release: 0
License: LGPL-2.0+ or GPL-2.0+ or MPL-1.1
Group: Productivity/Publishing/Word
+Version: 0.0.11
+Release: 0
Url: http://www.freedesktop.org/wiki/Software/libcdr
Source: http://dev-www.libreoffice.org/src/libcdr-%{version}.tar.xz
-Patch0: libcdr-0.0.10-ellipse.patch
+Patch0: libcdr-0.0.11-encoding.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -52,7 +60,9 @@
%package devel
Summary: Files for Developing with libcdr
Group: Development/Libraries/C and C++
-Requires: %libname = %version libwpd-devel libwpg-devel
+Requires: %libname = %version
+Requires: libwpd-devel
+Requires: libwpg-devel
%description devel
libcdr is a library for parsing the Corel Draw file format structure. It is
@@ -72,7 +82,6 @@
%endif
-
%package tools
Summary: Tools to work with documents in Corel Draw file-format
Group: Productivity/Publishing/Word
++++++ libcdr-0.0.11-encoding.patch ++++++
--- a/src/lib/CDRParser.cpp
+++ b/src/lib/CDRParser.cpp
@@ -2415,7 +2415,8 @@ void libcdr::CDRParser::readStlt(WPXInputStream *input, unsigned length)
}
unsigned numFonts = readU32(input);
CDR_DEBUG_MSG(("CDRParser::readStlt numFonts 0x%x\n", numFonts));
- std::map fontIds;
+ std::map fontIds;
+ std::map fontEncodings;
std::map fontSizes;
for (i=0; iseek(12, WPX_SEEK_CUR);
else
input->seek(20, WPX_SEEK_CUR);
- fontIds[fontStyleId] = readU32(input);
+ fontIds[fontStyleId] = readU16(input);
+ fontEncodings[fontStyleId] = readU16(input);
input->seek(8, WPX_SEEK_CUR);
fontSizes[fontStyleId] = readCoordinate(input);
if (m_version < 1000)
@@ -2578,9 +2580,12 @@ void libcdr::CDRParser::readStlt(WPXInputStream *input, unsigned length)
}
if (!fontRecordId)
continue;
- std::map::const_iterator iterFontId = fontIds.find(fontRecordId);
+ std::map::const_iterator iterFontId = fontIds.find(fontRecordId);
if (iterFontId != fontIds.end())
tmpCharStyle.m_fontId = iterFontId->second;
+ std::map::const_iterator iterCharSet = fontEncodings.find(fontRecordId);
+ if (iterCharSet != fontEncodings.end())
+ tmpCharStyle.m_charSet = iterCharSet->second;
std::map::const_iterator iterFontSize = fontSizes.find(fontRecordId);
if (iterFontSize != fontSizes.end())
tmpCharStyle.m_fontSize = iterFontSize->second;
++++++ libcdr-0.0.10.tar.xz -> libcdr-0.0.11.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/ChangeLog new/libcdr-0.0.11/ChangeLog
--- old/libcdr-0.0.10/ChangeLog 2013-01-25 09:01:56.000000000 +0100
+++ new/libcdr-0.0.11/ChangeLog 2013-03-01 10:32:40.000000000 +0100
@@ -1,3 +1,78 @@
+2013-03-01 Fridrich Štrba [6db42e0a640ee09e04a1980675bc1df4f7b79099]
+
+ Some more font encoding hackery
+
+
+2013-03-01 Fridrich Štrba [4c9a34b15ba348da33e5107514ec4e3eb34fea24]
+
+ Bump version for a point release
+
+
+2013-02-28 Fridrich Štrba [dd762061856bf745891a9952bd06106ec22d2b67]
+
+ Handle multiple paragraphs of text
+
+
+2013-02-27 Fridrich Štrba [1a57685d19fe29762b2c56b80fb5e342d7185ee6]
+
+ Simplify a bit
+
+
+2013-02-27 Fridrich Štrba [6522ca9fc4ffa63e6d3020903fd4c3869012fc32]
+
+ Extract encoding from font name
+
+
+2013-02-27 Fridrich Štrba [8fa13903271ef1b7979232fa65b69f4b6320171a]
+
+ Trying to fix rotations, sizes and positions of bitmap objects
+
+
+2013-02-27 Fridrich Štrba [16aad5b68991bb0ae2874f8a7fa196fab8fe5990]
+
+ Some improvements in rotation of objects in SVG generator
+
+
+2013-02-27 Fridrich Štrba [3f5713d58d85fb331d73ba01e958c4d3e628e0ee]
+
+ Some more arc fixes
+
+
+2013-02-26 Fridrich Štrba [2fd1c6c2939533ab3bf366c113b35d1a038e0e06]
+
+ Trying to fix some issues with circles
+
+
+2013-02-09 Julien Nabet [238768aed4dbd1ae3d679dbd09014c34de2afe03]
+
+ Some cppcheck cleaning
+
+
+2013-01-28 Fridrich Štrba [a1e065eefb22f877b231f19895c41090df4bb3f6]
+
+ no need of makefile.mk anymore
+
+
+2013-01-28 Fridrich Štrba [76e810ab718354fe9f246761876faff04951fc54]
+
+ Build cleanup
+
+
+2013-01-28 Fridrich Štrba [14d0efcd5387a26c8e364efbd4b7a6fd1f925194]
+
+ Check for icu CXXFLAGS in pkg-config branch too
+
+
+2013-01-27 Fridrich Štrba [715f2c8a7015676c26e009228a4197da14f929fa]
+
+ When running icu-config, get cxxflags too
+
+
+2013-01-25 Fridrich Štrba [fabf05464f137875a5ee74fcc21938161ecca077]
+
+ Handle correctly negative angles in ellipse
+
+
2013-01-24 Fridrich Štrba [7e6ea2b717c740489c3b5440ab5e8a82dd3c1caa]
Make ICU inconditional dependency + more intelligent check for ICU
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/Makefile.in new/libcdr-0.0.11/Makefile.in
--- old/libcdr-0.0.10/Makefile.in 2013-01-25 08:49:07.000000000 +0100
+++ new/libcdr-0.0.11/Makefile.in 2013-03-01 10:32:10.000000000 +0100
@@ -219,8 +219,6 @@
LCMS2_LIBS = @LCMS2_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
-LIBCDR_CXXFLAGS = @LIBCDR_CXXFLAGS@
-LIBCDR_LIBS = @LIBCDR_LIBS@
LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/build/Makefile.in new/libcdr-0.0.11/build/Makefile.in
--- old/libcdr-0.0.10/build/Makefile.in 2013-01-25 08:49:07.000000000 +0100
+++ new/libcdr-0.0.11/build/Makefile.in 2013-03-01 10:32:10.000000000 +0100
@@ -166,8 +166,6 @@
LCMS2_LIBS = @LCMS2_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
-LIBCDR_CXXFLAGS = @LIBCDR_CXXFLAGS@
-LIBCDR_LIBS = @LIBCDR_LIBS@
LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/build/win32/Makefile.in new/libcdr-0.0.11/build/win32/Makefile.in
--- old/libcdr-0.0.10/build/win32/Makefile.in 2013-01-25 08:49:07.000000000 +0100
+++ new/libcdr-0.0.11/build/win32/Makefile.in 2013-03-01 10:32:10.000000000 +0100
@@ -126,8 +126,6 @@
LCMS2_LIBS = @LCMS2_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
-LIBCDR_CXXFLAGS = @LIBCDR_CXXFLAGS@
-LIBCDR_LIBS = @LIBCDR_LIBS@
LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/configure new/libcdr-0.0.11/configure
--- old/libcdr-0.0.10/configure 2013-01-25 08:49:07.000000000 +0100
+++ new/libcdr-0.0.11/configure 2013-03-01 10:32:11.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libcdr 0.0.10.
+# Generated by GNU Autoconf 2.69 for libcdr 0.0.11.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@
# Identity of this package.
PACKAGE_NAME='libcdr'
PACKAGE_TARNAME='libcdr'
-PACKAGE_VERSION='0.0.10'
-PACKAGE_STRING='libcdr 0.0.10'
+PACKAGE_VERSION='0.0.11'
+PACKAGE_STRING='libcdr 0.0.11'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -637,8 +637,6 @@
DOXYGEN
STATIC_TOOLS_FALSE
STATIC_TOOLS_TRUE
-LIBCDR_LIBS
-LIBCDR_CXXFLAGS
DEBUG_CXXFLAGS
WINDRES
PLATFORM_WIN32_FALSE
@@ -1376,7 +1374,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libcdr 0.0.10 to adapt to many kinds of systems.
+\`configure' configures libcdr 0.0.11 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1446,7 +1444,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libcdr 0.0.10:";;
+ short | recursive ) echo "Configuration of libcdr 0.0.11:";;
esac
cat <<\_ACEOF
@@ -1578,7 +1576,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libcdr configure 0.0.10
+libcdr configure 0.0.11
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2064,7 +2062,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libcdr $as_me 0.0.10, which was
+It was created by libcdr $as_me 0.0.11, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2891,7 +2889,7 @@
# Define the identity of the package.
PACKAGE='libcdr'
- VERSION='0.0.10'
+ VERSION='0.0.11'
cat >>confdefs.h <<_ACEOF
@@ -16241,6 +16239,8 @@
fi
+
+
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WPG" >&5
$as_echo_n "checking for WPG... " >&6; }
@@ -16351,6 +16351,8 @@
fi
+
+
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS2" >&5
$as_echo_n "checking for LCMS2... " >&6; }
@@ -16460,6 +16462,8 @@
fi
+
+
# =========
# Find zlib
# =========
@@ -16643,6 +16647,13 @@
# ========
# Find icu
# ========
+if test "${ICU_CFLAGS+set}" = set; then :
+
+ ICU_CFLAGS_overriden=yes
+else
+
+ ICU_CFLAGS_overriden=no
+fi
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU" >&5
@@ -16745,14 +16756,16 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ICU installation" >&5
$as_echo_n "checking ICU installation... " >&6; }
- if ${ICU_CONFIG} --cflags >/dev/null 2>&1; then
- ICU_CFLAGS=`${ICU_CONFIG} --cppflags-searchpath`
+ if ${ICU_CONFIG} --cflags >/dev/null 2>&1; then :
+
+ ICU_CFLAGS=`${ICU_CONFIG} --cppflags-searchpath --cxxflags`
ICU_LIBS=`${ICU_CONFIG} --ldflags`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
$as_echo "found" >&6; }
- else
+else
+
as_fn_error $? "libicu config program icu-config not found" "$LINENO" 5
- fi
+fi
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -16800,14 +16813,16 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ICU installation" >&5
$as_echo_n "checking ICU installation... " >&6; }
- if ${ICU_CONFIG} --cflags >/dev/null 2>&1; then
- ICU_CFLAGS=`${ICU_CONFIG} --cppflags-searchpath`
+ if ${ICU_CONFIG} --cflags >/dev/null 2>&1; then :
+
+ ICU_CFLAGS=`${ICU_CONFIG} --cppflags-searchpath --cxxflags`
ICU_LIBS=`${ICU_CONFIG} --ldflags`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
$as_echo "found" >&6; }
- else
+else
+
as_fn_error $? "libicu config program icu-config not found" "$LINENO" 5
- fi
+fi
else
ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
@@ -16815,6 +16830,11 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ if test "${ICU_CFLAGS_overriden}" = no; then :
+
+ ICU_CFLAGS="${ICU_CFLAGS} `${PKG_CONFIG} icu-i18n --variable=CXXFLAGS`"
+fi
+
fi
@@ -16827,9 +16847,9 @@
CDR_MINOR_VERSION=0
-CDR_MICRO_VERSION=10
+CDR_MICRO_VERSION=11
-CDR_VERSION=0.0.10
+CDR_VERSION=0.0.11
# AC_SUBST(LT_RELEASE, [libcdr_version_major.libcdr_version_minor])
LT_CURRENT=`expr 100 '*' 0 + 0`
@@ -16837,7 +16857,7 @@
LT_AGE=0
# LT_AGE=libcdr_version_minor
-LT_REVISION=10
+LT_REVISION=11
@@ -17125,10 +17145,6 @@
DEBUG_CXXFLAGS="-DNDEBUG"
fi
-LIBCDR_CXXFLAGS="${WPD_CFLAGS} ${WPG_CFLAGS} ${LCMS2_CFLAGS}"
-LIBCDR_LIBS="${WPD_LIBS} ${WPG_LIBS} ${LCMS2_LIBS}"
-
-
# ============
@@ -17828,7 +17844,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libcdr $as_me 0.0.10, which was
+This file was extended by libcdr $as_me 0.0.11, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -17894,7 +17910,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libcdr config.status 0.0.10
+libcdr config.status 0.0.11
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/configure.ac new/libcdr-0.0.11/configure.ac
--- old/libcdr-0.0.10/configure.ac 2013-01-24 09:56:57.000000000 +0100
+++ new/libcdr-0.0.11/configure.ac 2013-03-01 09:46:05.000000000 +0100
@@ -7,7 +7,7 @@
# ====================
m4_define([libcdr_version_major],[0])
m4_define([libcdr_version_minor],[0])
-m4_define([libcdr_version_micro],[10])
+m4_define([libcdr_version_micro],[11])
m4_define([libcdr_version],[libcdr_version_major.libcdr_version_minor.libcdr_version_micro])
# =============
@@ -41,14 +41,20 @@
libwpd-0.9
libwpd-stream-0.9
])
+AC_SUBST(WPD_CFLAGS)
+AC_SUBST(WPD_LIBS)
PKG_CHECK_MODULES([WPG],[
libwpg-0.2
])
+AC_SUBST(WPG_CFLAGS)
+AC_SUBST(WPG_LIBS)
PKG_CHECK_MODULES([LCMS2],[
lcms2
])
+AC_SUBST(LCMS2_CFLAGS)
+AC_SUBST(LCMS2_LIBS)
# =========
# Find zlib
@@ -65,16 +71,20 @@
# ========
# Find icu
# ========
-PKG_CHECK_MODULES([ICU],[icu-i18n],[],[
+AS_IF([test "${ICU_CFLAGS+set}" = set],[
+ ICU_CFLAGS_overriden=yes],[
+ ICU_CFLAGS_overriden=no])
+PKG_CHECK_MODULES([ICU],[icu-i18n],[
+ AS_IF([test "${ICU_CFLAGS_overriden}" = no], [
+ ICU_CFLAGS="${ICU_CFLAGS} `${PKG_CONFIG} icu-i18n --variable=CXXFLAGS`"])
+ ], [
AC_PATH_PROG([ICU_CONFIG],[icu-config])
AC_MSG_CHECKING([ICU installation])
- if ${ICU_CONFIG} --cflags >/dev/null 2>&1; then
- ICU_CFLAGS=`${ICU_CONFIG} --cppflags-searchpath`
+ AS_IF([${ICU_CONFIG} --cflags >/dev/null 2>&1],[
+ ICU_CFLAGS=`${ICU_CONFIG} --cppflags-searchpath --cxxflags`
ICU_LIBS=`${ICU_CONFIG} --ldflags`
- AC_MSG_RESULT([found])
- else
- AC_MSG_ERROR([libicu config program icu-config not found])
- fi]
+ AC_MSG_RESULT([found])],[
+ AC_MSG_ERROR([libicu config program icu-config not found])])]
)
AC_SUBST(ICU_CFLAGS)
AC_SUBST(ICU_LIBS)
@@ -222,10 +232,6 @@
], [
DEBUG_CXXFLAGS="-DNDEBUG"
])
-LIBCDR_CXXFLAGS="${WPD_CFLAGS} ${WPG_CFLAGS} ${LCMS2_CFLAGS}"
-LIBCDR_LIBS="${WPD_LIBS} ${WPG_LIBS} ${LCMS2_LIBS}"
-AC_SUBST(LIBCDR_CXXFLAGS)
-AC_SUBST(LIBCDR_LIBS)
AC_SUBST(DEBUG_CXXFLAGS)
# ============
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/docs/Makefile.in new/libcdr-0.0.11/docs/Makefile.in
--- old/libcdr-0.0.10/docs/Makefile.in 2013-01-25 08:49:07.000000000 +0100
+++ new/libcdr-0.0.11/docs/Makefile.in 2013-03-01 10:32:10.000000000 +0100
@@ -166,8 +166,6 @@
LCMS2_LIBS = @LCMS2_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
-LIBCDR_CXXFLAGS = @LIBCDR_CXXFLAGS@
-LIBCDR_LIBS = @LIBCDR_LIBS@
LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/docs/doxygen/Makefile.in new/libcdr-0.0.11/docs/doxygen/Makefile.in
--- old/libcdr-0.0.10/docs/doxygen/Makefile.in 2013-01-25 08:49:07.000000000 +0100
+++ new/libcdr-0.0.11/docs/doxygen/Makefile.in 2013-03-01 10:32:10.000000000 +0100
@@ -126,8 +126,6 @@
LCMS2_LIBS = @LCMS2_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
-LIBCDR_CXXFLAGS = @LIBCDR_CXXFLAGS@
-LIBCDR_LIBS = @LIBCDR_LIBS@
LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/libcdr.spec new/libcdr-0.0.11/libcdr.spec
--- old/libcdr-0.0.10/libcdr.spec 2013-01-25 08:50:31.000000000 +0100
+++ new/libcdr-0.0.11/libcdr.spec 2013-03-01 10:32:17.000000000 +0100
@@ -1,5 +1,5 @@
%define name libcdr
-%define version 0.0.10
+%define version 0.0.11
%define RELEASE 1
%define release %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/src/Makefile.in new/libcdr-0.0.11/src/Makefile.in
--- old/libcdr-0.0.10/src/Makefile.in 2013-01-25 08:49:07.000000000 +0100
+++ new/libcdr-0.0.11/src/Makefile.in 2013-03-01 10:32:10.000000000 +0100
@@ -166,8 +166,6 @@
LCMS2_LIBS = @LCMS2_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
-LIBCDR_CXXFLAGS = @LIBCDR_CXXFLAGS@
-LIBCDR_LIBS = @LIBCDR_LIBS@
LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/src/conv/Makefile.in new/libcdr-0.0.11/src/conv/Makefile.in
--- old/libcdr-0.0.10/src/conv/Makefile.in 2013-01-25 08:49:07.000000000 +0100
+++ new/libcdr-0.0.11/src/conv/Makefile.in 2013-03-01 10:32:10.000000000 +0100
@@ -166,8 +166,6 @@
LCMS2_LIBS = @LCMS2_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
-LIBCDR_CXXFLAGS = @LIBCDR_CXXFLAGS@
-LIBCDR_LIBS = @LIBCDR_LIBS@
LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/src/conv/raw/Makefile.am new/libcdr-0.0.11/src/conv/raw/Makefile.am
--- old/libcdr-0.0.10/src/conv/raw/Makefile.am 2012-03-15 07:55:48.000000000 +0100
+++ new/libcdr-0.0.11/src/conv/raw/Makefile.am 2013-01-28 11:01:17.000000000 +0100
@@ -1,14 +1,14 @@
bin_PROGRAMS = cdr2raw cmx2raw
-AM_CXXFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib $(LIBCDR_CXXFLAGS) $(DEBUG_CXXFLAGS)
+AM_CXXFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib $(WPD_CFLAGS) $(WPG_CFLAGS) $(DEBUG_CXXFLAGS)
cdr2raw_DEPENDENCIES = @CDR2RAW_WIN32_RESOURCE@
if STATIC_TOOLS
-cdr2raw_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(LIBCDR_LIBS) @CDR2RAW_WIN32_RESOURCE@
+cdr2raw_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CDR2RAW_WIN32_RESOURCE@
cdr2raw_LDFLAGS = -all-static
else
-cdr2raw_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(LIBCDR_LIBS) @CDR2RAW_WIN32_RESOURCE@
+cdr2raw_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CDR2RAW_WIN32_RESOURCE@
endif
cdr2raw_SOURCES = \
@@ -17,10 +17,10 @@
cmx2raw_DEPENDENCIES = @CMX2RAW_WIN32_RESOURCE@
if STATIC_TOOLS
-cmx2raw_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(LIBCDR_LIBS) @CMX2RAW_WIN32_RESOURCE@
+cmx2raw_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CMX2RAW_WIN32_RESOURCE@
cmx2raw_LDFLAGS = -all-static
else
-cmx2raw_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(LIBCDR_LIBS) @CMX2RAW_WIN32_RESOURCE@
+cmx2raw_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CMX2RAW_WIN32_RESOURCE@
endif
cmx2raw_SOURCES = \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/src/conv/raw/Makefile.in new/libcdr-0.0.11/src/conv/raw/Makefile.in
--- old/libcdr-0.0.10/src/conv/raw/Makefile.in 2013-01-25 08:49:07.000000000 +0100
+++ new/libcdr-0.0.11/src/conv/raw/Makefile.in 2013-03-01 10:32:10.000000000 +0100
@@ -168,8 +168,6 @@
LCMS2_LIBS = @LCMS2_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
-LIBCDR_CXXFLAGS = @LIBCDR_CXXFLAGS@
-LIBCDR_LIBS = @LIBCDR_LIBS@
LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -266,17 +264,17 @@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AM_CXXFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib $(LIBCDR_CXXFLAGS) $(DEBUG_CXXFLAGS)
+AM_CXXFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib $(WPD_CFLAGS) $(WPG_CFLAGS) $(DEBUG_CXXFLAGS)
cdr2raw_DEPENDENCIES = @CDR2RAW_WIN32_RESOURCE@
-@STATIC_TOOLS_FALSE@cdr2raw_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(LIBCDR_LIBS) @CDR2RAW_WIN32_RESOURCE@
-@STATIC_TOOLS_TRUE@cdr2raw_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(LIBCDR_LIBS) @CDR2RAW_WIN32_RESOURCE@
+@STATIC_TOOLS_FALSE@cdr2raw_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CDR2RAW_WIN32_RESOURCE@
+@STATIC_TOOLS_TRUE@cdr2raw_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CDR2RAW_WIN32_RESOURCE@
@STATIC_TOOLS_TRUE@cdr2raw_LDFLAGS = -all-static
cdr2raw_SOURCES = \
cdr2raw.cpp
cmx2raw_DEPENDENCIES = @CMX2RAW_WIN32_RESOURCE@
-@STATIC_TOOLS_FALSE@cmx2raw_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(LIBCDR_LIBS) @CMX2RAW_WIN32_RESOURCE@
-@STATIC_TOOLS_TRUE@cmx2raw_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(LIBCDR_LIBS) @CMX2RAW_WIN32_RESOURCE@
+@STATIC_TOOLS_FALSE@cmx2raw_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CMX2RAW_WIN32_RESOURCE@
+@STATIC_TOOLS_TRUE@cmx2raw_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CMX2RAW_WIN32_RESOURCE@
@STATIC_TOOLS_TRUE@cmx2raw_LDFLAGS = -all-static
cmx2raw_SOURCES = \
cmx2raw.cpp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/src/conv/svg/Makefile.am new/libcdr-0.0.11/src/conv/svg/Makefile.am
--- old/libcdr-0.0.10/src/conv/svg/Makefile.am 2012-03-15 07:55:48.000000000 +0100
+++ new/libcdr-0.0.11/src/conv/svg/Makefile.am 2013-01-28 11:01:27.000000000 +0100
@@ -1,14 +1,14 @@
bin_PROGRAMS = cdr2xhtml cmx2xhtml
-AM_CXXFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib $(LIBCDR_CXXFLAGS) $(DEBUG_CXXFLAGS)
+AM_CXXFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib $(WPD_CFLAGS) $(WPG_CFLAGS) $(DEBUG_CXXFLAGS)
cdr2xhtml_DEPENDENCIES = @CDR2XHTML_WIN32_RESOURCE@
if STATIC_TOOLS
-cdr2xhtml_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(LIBCDR_LIBS) @CDR2XHTML_WIN32_RESOURCE@
+cdr2xhtml_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CDR2XHTML_WIN32_RESOURCE@
cdr2xhtml_LDFLAGS = -all-static
else
-cdr2xhtml_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(LIBCDR_LIBS) @CDR2XHTML_WIN32_RESOURCE@
+cdr2xhtml_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CDR2XHTML_WIN32_RESOURCE@
endif
cdr2xhtml_SOURCES = \
@@ -17,10 +17,10 @@
cmx2xhtml_DEPENDENCIES = @CMX2XHTML_WIN32_RESOURCE@
if STATIC_TOOLS
-cmx2xhtml_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(LIBCDR_LIBS) @CMX2XHTML_WIN32_RESOURCE@
+cmx2xhtml_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CMX2XHTML_WIN32_RESOURCE@
cmx2xhtml_LDFLAGS = -all-static
else
-cmx2xhtml_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(LIBCDR_LIBS) @CMX2XHTML_WIN32_RESOURCE@
+cmx2xhtml_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CMX2XHTML_WIN32_RESOURCE@
endif
cmx2xhtml_SOURCES = \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/src/conv/svg/Makefile.in new/libcdr-0.0.11/src/conv/svg/Makefile.in
--- old/libcdr-0.0.10/src/conv/svg/Makefile.in 2013-01-25 08:49:07.000000000 +0100
+++ new/libcdr-0.0.11/src/conv/svg/Makefile.in 2013-03-01 10:32:10.000000000 +0100
@@ -168,8 +168,6 @@
LCMS2_LIBS = @LCMS2_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
-LIBCDR_CXXFLAGS = @LIBCDR_CXXFLAGS@
-LIBCDR_LIBS = @LIBCDR_LIBS@
LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -266,17 +264,17 @@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AM_CXXFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib $(LIBCDR_CXXFLAGS) $(DEBUG_CXXFLAGS)
+AM_CXXFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib $(WPD_CFLAGS) $(WPG_CFLAGS) $(DEBUG_CXXFLAGS)
cdr2xhtml_DEPENDENCIES = @CDR2XHTML_WIN32_RESOURCE@
-@STATIC_TOOLS_FALSE@cdr2xhtml_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(LIBCDR_LIBS) @CDR2XHTML_WIN32_RESOURCE@
-@STATIC_TOOLS_TRUE@cdr2xhtml_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(LIBCDR_LIBS) @CDR2XHTML_WIN32_RESOURCE@
+@STATIC_TOOLS_FALSE@cdr2xhtml_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CDR2XHTML_WIN32_RESOURCE@
+@STATIC_TOOLS_TRUE@cdr2xhtml_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CDR2XHTML_WIN32_RESOURCE@
@STATIC_TOOLS_TRUE@cdr2xhtml_LDFLAGS = -all-static
cdr2xhtml_SOURCES = \
cdr2xhtml.cpp
cmx2xhtml_DEPENDENCIES = @CMX2XHTML_WIN32_RESOURCE@
-@STATIC_TOOLS_FALSE@cmx2xhtml_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(LIBCDR_LIBS) @CMX2XHTML_WIN32_RESOURCE@
-@STATIC_TOOLS_TRUE@cmx2xhtml_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(LIBCDR_LIBS) @CMX2XHTML_WIN32_RESOURCE@
+@STATIC_TOOLS_FALSE@cmx2xhtml_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CMX2XHTML_WIN32_RESOURCE@
+@STATIC_TOOLS_TRUE@cmx2xhtml_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CMX2XHTML_WIN32_RESOURCE@
@STATIC_TOOLS_TRUE@cmx2xhtml_LDFLAGS = -all-static
cmx2xhtml_SOURCES = \
cmx2xhtml.cpp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/src/lib/CDRCollector.h new/libcdr-0.0.11/src/lib/CDRCollector.h
--- old/libcdr-0.0.10/src/lib/CDRCollector.h 2012-10-06 11:04:01.000000000 +0200
+++ new/libcdr-0.0.11/src/lib/CDRCollector.h 2013-02-28 14:50:23.000000000 +0100
@@ -61,8 +61,8 @@
std::map m_vects;
std::vector<CDRPage> m_pages;
std::map m_documentPalette;
- std::map m_fonts;
- std::map m_texts;
+ std::map m_fonts;
+ std::map m_texts;
unsigned _getRGBColor(const CDRColor &color);
unsigned getBMPColor(const CDRColor &color);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/src/lib/CDRContentCollector.cpp new/libcdr-0.0.11/src/lib/CDRContentCollector.cpp
--- old/libcdr-0.0.10/src/lib/CDRContentCollector.cpp 2012-10-06 07:03:43.000000000 +0200
+++ new/libcdr-0.0.11/src/lib/CDRContentCollector.cpp 2013-02-28 15:08:46.000000000 +0100
@@ -52,7 +52,7 @@
m_isPageProperties(false), m_isPageStarted(false), m_ignorePage(false),
m_page(ps.m_pages[0]), m_pageIndex(0), m_currentFildId(0), m_currentOutlId(0), m_spnd(0),
m_currentObjectLevel(0), m_currentGroupLevel(0), m_currentVectLevel(0), m_currentPageLevel(0),
- m_currentImage(), m_currentText(), m_currentTextOffsetX(0.0), m_currentTextOffsetY(0.0),
+ m_currentImage(), m_currentText(0), m_currentTextOffsetX(0.0), m_currentTextOffsetY(0.0),
m_currentBBox(), m_currentPath(), m_currentTransforms(), m_fillTransforms(),
m_polygon(0), m_isInPolygon(false), m_isInSpline(false), m_outputElements(0),
m_contentOutputElements(), m_fillOutputElements(),
@@ -239,11 +239,11 @@
WPXPropertyListVector::Iter i(path);
for (i.rewind(); i.next();)
{
- bool ignoreM = false;
if (!i()["libwpg:path-action"])
continue;
if (i()["svg:x"] && i()["svg:y"])
{
+ bool ignoreM = false;
x = i()["svg:x"]->getDouble();
y = i()["svg:y"]->getDouble();
if (firstPoint)
@@ -328,18 +328,38 @@
{
double cx = m_currentImage.getMiddleX();
double cy = m_currentImage.getMiddleY();
+ double corner1x = m_currentImage.m_x1;
+ double corner1y = m_currentImage.m_y1;
+ double corner2x = m_currentImage.m_x1;
+ double corner2y = m_currentImage.m_y2;
+ double corner3x = m_currentImage.m_x2;
+ double corner3y = m_currentImage.m_y2;
m_currentTransforms.applyToPoint(cx, cy);
+ m_currentTransforms.applyToPoint(corner1x, corner1y);
+ m_currentTransforms.applyToPoint(corner2x, corner2y);
+ m_currentTransforms.applyToPoint(corner3x, corner3y);
if (!m_groupTransforms.empty())
+ {
m_groupTransforms.top().applyToPoint(cx, cy);
+ m_groupTransforms.top().applyToPoint(corner1x, corner1y);
+ m_groupTransforms.top().applyToPoint(corner2x, corner2y);
+ m_groupTransforms.top().applyToPoint(corner3x, corner3y);
+ }
CDRTransform tmpTrafo(1.0, 0.0, -m_page.offsetX, 0.0, 1.0, -m_page.offsetY);
tmpTrafo.applyToPoint(cx, cy);
+ tmpTrafo.applyToPoint(corner1x, corner1y);
+ tmpTrafo.applyToPoint(corner2x, corner2y);
+ tmpTrafo.applyToPoint(corner3x, corner3y);
tmpTrafo = CDRTransform(1.0, 0.0, 0.0, 0.0, -1.0, m_page.height);
tmpTrafo.applyToPoint(cx, cy);
+ tmpTrafo.applyToPoint(corner1x, corner1y);
+ tmpTrafo.applyToPoint(corner2x, corner2y);
+ tmpTrafo.applyToPoint(corner3x, corner3y);
bool flipX(m_currentTransforms.getFlipX());
bool flipY(m_currentTransforms.getFlipY());
- double width = m_currentTransforms.getScaleX() * m_currentImage.getWidth();
- double height = m_currentTransforms.getScaleY() * m_currentImage.getHeight();
- double rotate = m_currentTransforms.getRotation();
+ double width = sqrt((corner2x - corner3x)*(corner2x - corner3x) + (corner2y - corner3y)*(corner2y - corner3y));
+ double height = sqrt((corner2x - corner1x)*(corner2x - corner1x) + (corner2y - corner1y)*(corner2y - corner1y));
+ double rotate = atan2(corner3y-corner2y, corner3x-corner2x);
WPXPropertyList propList;
@@ -371,7 +391,7 @@
outputElement.addGraphicObject(propList, m_currentImage.getImage());
}
- if (m_currentText.m_text.len())
+ if (m_currentText && !m_currentText->empty())
{
double currentTextOffsetX = 0.0;
double currentTextOffsetY = 0.0;
@@ -397,17 +417,20 @@
textFrameProps.insert("fo:padding-left", 0.0);
textFrameProps.insert("fo:padding-right", 0.0);
outputElement.addStartTextObject(textFrameProps, WPXPropertyListVector());
- outputElement.addStartTextLine(WPXPropertyList());
- WPXPropertyList spanProps;
- double fontSize = (double)cdr_round(144.0*m_currentText.m_charStyle.m_fontSize) / 2.0;
- spanProps.insert("fo:font-size", fontSize, WPX_POINT);
- std::map::const_iterator iterFont = m_ps.m_fonts.find(m_currentText.m_charStyle.m_fontId);
- if (iterFont != m_ps.m_fonts.end())
- spanProps.insert("style:font-name", iterFont->second);
- outputElement.addStartTextSpan(spanProps);
- outputElement.addInsertText(m_currentText.m_text);
- outputElement.addEndTextSpan();
- outputElement.addEndTextLine();
+ for (unsigned i = 0; i < m_currentText->size(); ++i)
+ {
+ outputElement.addStartTextLine(WPXPropertyList());
+ WPXPropertyList spanProps;
+ double fontSize = (double)cdr_round(144.0*(*m_currentText)[i].m_charStyle.m_fontSize) / 2.0;
+ spanProps.insert("fo:font-size", fontSize, WPX_POINT);
+ std::map::const_iterator iterFont = m_ps.m_fonts.find((*m_currentText)[i].m_charStyle.m_fontId);
+ if (iterFont != m_ps.m_fonts.end())
+ spanProps.insert("style:font-name", iterFont->second.m_name);
+ outputElement.addStartTextSpan(spanProps);
+ outputElement.addInsertText((*m_currentText)[i].m_text);
+ outputElement.addEndTextSpan();
+ outputElement.addEndTextLine();
+ }
outputElement.addEndTextObject();
}
m_currentImage = libcdr::CDRImage();
@@ -416,7 +439,7 @@
m_currentTransforms.clear();
m_fillTransforms = libcdr::CDRTransforms();
m_fillOpacity = 1.0;
- m_currentText = CDRText();
+ m_currentText = 0;
}
void libcdr::CDRContentCollector::collectTransform(const CDRTransforms &transforms, bool considerGroupTransform)
@@ -1116,16 +1139,16 @@
void libcdr::CDRContentCollector::collectArtisticText()
{
- std::map::const_iterator iter = m_ps.m_texts.find(m_spnd);
+ std::map::const_iterator iter = m_ps.m_texts.find(m_spnd);
if (iter != m_ps.m_texts.end())
- m_currentText = iter->second;
+ m_currentText = &(iter->second);
}
void libcdr::CDRContentCollector::collectParagraphText()
{
- std::map::const_iterator iter = m_ps.m_texts.find(m_spnd);
+ std::map::const_iterator iter = m_ps.m_texts.find(m_spnd);
if (iter != m_ps.m_texts.end())
- m_currentText = iter->second;
+ m_currentText = &(iter->second);
}
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/src/lib/CDRContentCollector.h new/libcdr-0.0.11/src/lib/CDRContentCollector.h
--- old/libcdr-0.0.10/src/lib/CDRContentCollector.h 2012-10-06 11:03:50.000000000 +0200
+++ new/libcdr-0.0.11/src/lib/CDRContentCollector.h 2013-02-28 15:09:21.000000000 +0100
@@ -118,7 +118,7 @@
unsigned m_spnd;
unsigned m_currentObjectLevel, m_currentGroupLevel, m_currentVectLevel, m_currentPageLevel;
CDRImage m_currentImage;
- CDRText m_currentText;
+ const std::vector<CDRText> *m_currentText;
double m_currentTextOffsetX;
double m_currentTextOffsetY;
CDRBBox m_currentBBox;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/src/lib/CDRParser.cpp new/libcdr-0.0.11/src/lib/CDRParser.cpp
--- old/libcdr-0.0.10/src/lib/CDRParser.cpp 2013-01-23 10:50:56.000000000 +0100
+++ new/libcdr-0.0.11/src/lib/CDRParser.cpp 2013-03-01 10:27:25.000000000 +0100
@@ -84,8 +84,38 @@
unsigned dropCapId;
};
-static void processNameForEncoding(WPXString & /* name */, unsigned short & /* encoding */)
+static void processNameForEncoding(WPXString &name, unsigned short &encoding)
{
+ std::string fontName(name.cstr());
+ size_t found = std::string::npos;
+
+ if ((found=fontName.rfind(" CE")) != std::string::npos)
+ encoding = 0xee;
+ else if ((found=fontName.rfind(" Cyrillic")) != std::string::npos)
+ encoding = 0xcc;
+ else if ((found=fontName.rfind(" Cyr")) != std::string::npos)
+ encoding = 0xcc;
+ else if ((found=fontName.rfind(" CYR")) != std::string::npos)
+ encoding = 0xcc;
+ else if ((found=fontName.rfind(" Baltic")) != std::string::npos)
+ encoding = 0xba;
+ else if ((found=fontName.rfind(" Greek")) != std::string::npos)
+ encoding = 0xa1;
+ else if ((found=fontName.rfind(" Tur")) != std::string::npos)
+ encoding = 0xa2;
+ else if ((found=fontName.rfind(" Hebrew")) != std::string::npos)
+ encoding = 0xb1;
+ else if ((found=fontName.rfind(" Arabic")) != std::string::npos)
+ encoding = 0xb2;
+ else if ((found=fontName.rfind(" Thai")) != std::string::npos)
+ encoding = 0xde;
+
+ if (found != std::string::npos)
+ {
+ fontName.erase(found, std::string::npos);
+ name = fontName.c_str();
+ }
+ return;
}
} // anonymous namespace
@@ -1186,6 +1216,16 @@
double rx = fabs(cx);
double ry = fabs(cy);
+ while (angle1 < 0.0)
+ angle1 += 2*M_PI;
+ while (angle1 > 2*M_PI)
+ angle1 -= 2*M_PI;
+
+ while (angle2 < 0.0)
+ angle2 += 2*M_PI;
+ while (angle2 > 2*M_PI)
+ angle2 -= 2*M_PI;
+
if (angle1 != angle2)
{
if (angle2 < angle1)
@@ -1196,10 +1236,10 @@
double x1 = cx + rx*cos(angle2);
double y1 = cy - ry*sin(angle2);
- bool largeArc = (angle2 - angle1 > M_PI || angle2 - angle1 < -M_PI);
+ bool largeArc = (angle2 - angle1 > M_PI);
m_collector->collectMoveTo(x0, y0);
- m_collector->collectArcTo(rx, ry, largeArc, true, x1, y1);
+ m_collector->collectArcTo(rx, ry, largeArc, false, x1, y1);
if (pie)
{
m_collector->collectLineTo(cx, cy);
@@ -1209,15 +1249,16 @@
}
else
{
- double x0 = cx + rx;
- double y0 = cy;
+ angle2 += M_PI/2.0;
+ double x0 = cx + rx*cos(angle1);
+ double y0 = cy - ry*sin(angle1);
- double x1 = cx;
- double y1 = cy - ry;
+ double x1 = cx + rx*cos(angle2);
+ double y1 = cy - ry*sin(angle2);
m_collector->collectMoveTo(x0, y0);
- m_collector->collectArcTo(rx, ry, false, true, x1, y1);
- m_collector->collectArcTo(rx, ry, true, true, x0, y0);
+ m_collector->collectArcTo(rx, ry, false, false, x1, y1);
+ m_collector->collectArcTo(rx, ry, true, false, x0, y0);
m_collector->collectClosePath();
}
}
@@ -2309,8 +2350,8 @@
{
if (!_redirectX6Chunk(&input, length))
throw GenericException();
- unsigned fontId = readU32(input);
- unsigned short fontEncoding = fontId >> 16;
+ unsigned short fontId = readU16(input);
+ unsigned short fontEncoding = readU16(input);
input->seek(14, WPX_SEEK_CUR);
WPXString name;
if (m_version >= 1200)
@@ -2336,8 +2377,8 @@
else
break;
}
- processNameForEncoding(name, fontEncoding);
}
+ processNameForEncoding(name, fontEncoding);
m_collector->collectFont(fontId, fontEncoding, name);
}
@@ -2609,6 +2650,7 @@
if (m_version >= 1500)
input->seek(12, WPX_SEEK_CUR);
unsigned num = readU32(input);
+ unsigned num4 = 1;
if (!num)
{
if (m_version >= 800)
@@ -2620,92 +2662,96 @@
input->seek(24, WPX_SEEK_CUR);
if (m_version < 800)
input->seek(8, WPX_SEEK_CUR);
- input->seek(4, WPX_SEEK_CUR);
+ num4 = readU32(input);
}
- unsigned stlId = readU32(input);
- if (m_version >= 1300 && num)
- input->seek(1, WPX_SEEK_CUR);
- input->seek(1, WPX_SEEK_CUR);
- unsigned numRecords = readU32(input);
- std::map charStyles;
- unsigned i = 0;
- for (i=0; i= 800)
- fl3 = readU8(input);
-
- CDRCharacterStyle charStyle;
- // Read more information depending on the flags
- if (fl2&1) // Font
- {
- unsigned flag = readU32(input);
- charStyle.m_charSet = (flag >> 16);
- charStyle.m_fontId = flag & 0xff;
- }
- if (fl2&2) // Bold/Italic, etc.
- input->seek(4, WPX_SEEK_CUR);
- if (fl2&4) // Font Size
- charStyle.m_fontSize = readCoordinate(input);
- if (fl2&8) // assumption
- input->seek(4, WPX_SEEK_CUR);
- if (fl2&0x10) // Offset X
- input->seek(4, WPX_SEEK_CUR);
- if (fl2&0x20) // Offset Y
- input->seek(4, WPX_SEEK_CUR);
- if (fl2&0x40) // Font Colour
- {
- input->seek(4, WPX_SEEK_CUR);
- if (m_version >= 1500)
- input->seek(48, WPX_SEEK_CUR);
- }
- if (fl2&0x80) // Font Outl Colour
- input->seek(4, WPX_SEEK_CUR);
-
- if (fl3&8) // Encoding
+ unsigned stlId = readU32(input);
+ if (m_version >= 1300 && num)
+ input->seek(1, WPX_SEEK_CUR);
+ input->seek(1, WPX_SEEK_CUR);
+ unsigned numRecords = readU32(input);
+ std::map charStyles;
+ unsigned i = 0;
+ for (i=0; i= 1300)
+ readU8(input);
+ readU8(input);
+ unsigned char fl2 = readU8(input);
+ unsigned char fl3 = 0;
+ if (m_version >= 800)
+ fl3 = readU8(input);
+
+ CDRCharacterStyle charStyle;
+ // Read more information depending on the flags
+ if (fl2&1) // Font
+ {
+ unsigned flag = readU32(input);
+ charStyle.m_charSet = (flag >> 16);
+ charStyle.m_fontId = flag & 0xff;
+ }
+ if (fl2&2) // Bold/Italic, etc.
+ input->seek(4, WPX_SEEK_CUR);
+ if (fl2&4) // Font Size
+ charStyle.m_fontSize = readCoordinate(input);
+ if (fl2&8) // assumption
+ input->seek(4, WPX_SEEK_CUR);
+ if (fl2&0x10) // Offset X
+ input->seek(4, WPX_SEEK_CUR);
+ if (fl2&0x20) // Offset Y
+ input->seek(4, WPX_SEEK_CUR);
+ if (fl2&0x40) // Font Colour
{
- unsigned tlen = readU32(input);
- input->seek(tlen*2, WPX_SEEK_CUR);
+ input->seek(4, WPX_SEEK_CUR);
+ if (m_version >= 1500)
+ input->seek(48, WPX_SEEK_CUR);
}
- else
+ if (fl2&0x80) // Font Outl Colour
input->seek(4, WPX_SEEK_CUR);
+
+ if (fl3&8) // Encoding
+ {
+ if (m_version >= 1300)
+ {
+ unsigned tlen = readU32(input);
+ input->seek(tlen*2, WPX_SEEK_CUR);
+ }
+ else
+ input->seek(4, WPX_SEEK_CUR);
+ }
+ if (fl3&0x20) // Something
+ {
+ unsigned flag = readU8(input);
+ if (flag)
+ input->seek(52, WPX_SEEK_CUR);
+ }
+
+ charStyles[2*i] = charStyle;
}
- if (fl3&0x20) // Something
+ unsigned numChars = readU32(input);
+ std::vector charDescriptions(numChars);
+ for (i=0; iseek(52, WPX_SEEK_CUR);
+ if (m_version >= 1200)
+ charDescriptions[i] = readU64(input);
+ else
+ charDescriptions[i] = readU32(input);
}
-
- charStyles[2*i] = charStyle;
- }
- unsigned numChars = readU32(input);
- std::vector charDescriptions(numChars);
- for (i=0; i= 1200)
- charDescriptions[i] = readU64(input);
- else
- charDescriptions[i] = readU32(input);
- }
- unsigned numBytes = numChars;
- if (m_version >= 1200)
- numBytes = readU32(input);
- unsigned long numBytesRead = 0;
- const unsigned char *buffer = input->read(numBytes, numBytesRead);
- if (numBytesRead != numBytes)
- throw GenericException();
- std::vector<unsigned char> textData(numBytesRead);
- if (numBytesRead)
- memcpy(&textData[0], buffer, numBytesRead);
+ numBytes = readU32(input);
+ unsigned long numBytesRead = 0;
+ const unsigned char *buffer = input->read(numBytes, numBytesRead);
+ if (numBytesRead != numBytes)
+ throw GenericException();
+ std::vector<unsigned char> textData(numBytesRead);
+ if (numBytesRead)
+ memcpy(&textData[0], buffer, numBytesRead);
+ input->seek(1, WPX_SEEK_CUR); //skip the 0 ending character
- m_collector->collectText(textId, stlId, textData, charDescriptions, charStyles);
+ m_collector->collectText(textId, stlId, textData, charDescriptions, charStyles);
+ }
#ifndef DEBUG
}
catch (...)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/src/lib/CDRSVGGenerator.cpp new/libcdr-0.0.11/src/lib/CDRSVGGenerator.cpp
--- old/libcdr-0.0.10/src/lib/CDRSVGGenerator.cpp 2012-10-04 09:47:53.000000000 +0200
+++ new/libcdr-0.0.11/src/lib/CDRSVGGenerator.cpp 2013-02-27 09:29:06.000000000 +0100
@@ -368,10 +368,9 @@
m_outputSink << "rx=\"" << doubleToString(72*propList["svg:rx"]->getDouble()) << "\" ry=\"" << doubleToString(72*propList["svg:ry"]->getDouble()) << "\" ";
writeStyle();
if (propList["libwpg:rotate"] && propList["libwpg:rotate"]->getDouble() != 0.0)
- m_outputSink << " transform=\" translate(" << doubleToString(72*propList["svg:cx"]->getDouble()) << ", " << doubleToString(72*propList["svg:cy"]->getDouble())
- << ") rotate(" << doubleToString(-propList["libwpg:rotate"]->getDouble())
- << ") translate(" << doubleToString(-72*propList["svg:cx"]->getDouble())
- << ", " << doubleToString(-72*propList["svg:cy"]->getDouble())
+ m_outputSink << " transform=\" rotate(" << doubleToString(-propList["libwpg:rotate"]->getDouble())
+ << ", " << doubleToString(72*propList["svg:cy"]->getDouble())
+ << ", " << doubleToString(72*propList["svg:cy"]->getDouble())
<< ")\" ";
m_outputSink << "/>\n";
}
@@ -459,7 +458,7 @@
m_outputSink << (propList["libwpg:sweep"] ? propList["libwpg:sweep"]->getInt() : 1) << " ";
m_outputSink << doubleToString(72*(propList["svg:x"]->getDouble())) << "," << doubleToString(72*(propList["svg:y"]->getDouble()));
}
- else if ((i >= path.count()-1 && i > 2) && propList["libwpg:path-action"] && propList["libwpg:path-action"]->getStr() == "Z" )
+ else if (propList["libwpg:path-action"] && propList["libwpg:path-action"]->getStr() == "Z")
{
isClosed = true;
m_outputSink << "\nZ";
@@ -478,8 +477,34 @@
WPXString base64 = binaryData.getBase64Data();
m_outputSink << "getDouble())) << "\" y=\"" << doubleToString(72*(propList["svg:y"]->getDouble())) << "\" ";
- m_outputSink << "width=\"" << doubleToString(72*(propList["svg:width"]->getDouble())) << "\" height=\"" << doubleToString(72*(propList["svg:height"]->getDouble())) << "\" ";
+ {
+ double x(propList["svg:x"]->getDouble());
+ double y(propList["svg:y"]->getDouble());
+ double width(propList["svg:width"]->getDouble());
+ double height(propList["svg:height"]->getDouble());
+ bool flipX(propList["draw:mirror-horizontal"] && propList["draw:mirror-horizontal"]->getInt());
+ bool flipY(propList["draw:mirror-vertical"] && propList["draw:mirror-vertical"]->getInt());
+
+ double xmiddle = x + width / 2.0;
+ double ymiddle = y + height / 2.0;
+ m_outputSink << "x=\"" << doubleToString(72*x) << "\" y=\"" << doubleToString(72*y) << "\" ";
+ m_outputSink << "width=\"" << doubleToString(72*width) << "\" height=\"" << doubleToString(72*height) << "\" ";
+ m_outputSink << "transform=\"";
+ m_outputSink << " translate(" << doubleToString(72*xmiddle) << ", " << doubleToString (72*ymiddle) << ") ";
+ m_outputSink << " scale(" << (flipX ? "-1" : "1") << ", " << (flipY ? "-1" : "1") << ") ";
+ // rotation is around the center of the object's bounding box
+ if (propList["libwpg:rotate"])
+ {
+ double angle(propList["libwpg:rotate"]->getDouble());
+ while (angle > 180.0)
+ angle -= 360.0;
+ while (angle < -180.0)
+ angle += 360.0;
+ m_outputSink << " rotate(" << doubleToString(angle) << ") ";
+ }
+ m_outputSink << " translate(" << doubleToString(-72*xmiddle) << ", " << doubleToString (-72*ymiddle) << ") ";
+ m_outputSink << "\" ";
+ }
m_outputSink << "xlink:href=\"data:" << propList["libwpg:mime-type"]->getStr().cstr() << ";base64,";
m_outputSink << base64.cstr();
m_outputSink << "\" />\n";
@@ -487,15 +512,60 @@
void libcdr::CDRSVGGenerator::startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector & /* path */)
{
+ double x = 0.0;
+ double y = 0.0;
+ double height = 0.0;
m_outputSink << "getDouble())) << "\" y=\"" << doubleToString(72*(propList["svg:y"]->getDouble())) << "\"";
+ {
+ x = propList["svg:x"]->getDouble();
+ y = propList["svg:y"]->getDouble();
+ }
+
+ double xmiddle = x;
+ double ymiddle = y;
+
+ if (propList["svg:width"])
+ {
+ double width = propList["svg:width"]->getDouble();
+ xmiddle += width / 2.0;
+ }
+
+ if (propList["svg:height"])
+ {
+ height = propList["svg:height"]->getDouble();
+ ymiddle += height / 2.0;
+ }
+
+ if (propList["draw:textarea-vertical-align"])
+ {
+ if (propList["draw:textarea-vertical-align"]->getStr() == "middle")
+ y = ymiddle;
+ if (propList["draw:textarea-vertical-align"]->getStr() == "bottom")
+ {
+ y += height;
+ if (propList["fo:padding-bottom"])
+ y -= propList["fo:padding-bottom"]->getDouble();
+ }
+ }
+ else
+ y += height;
+
+ if (propList["fo:padding-left"])
+ x += propList["fo:padding-left"]->getDouble();
+
+ m_outputSink << "x=\"" << doubleToString(72*x) << "\" y=\"" << doubleToString(72*y) << "\"";
+
+ // rotation is around the center of the object's bounding box
if (propList["libwpg:rotate"] && propList["libwpg:rotate"]->getDouble() != 0.0)
- m_outputSink << " transform=\"translate(" << doubleToString(72*propList["svg:x"]->getDouble()) << ", " << doubleToString(72*propList["svg:y"]->getDouble())
- << ") rotate(" << doubleToString(-propList["libwpg:rotate"]->getDouble())
- << ") translate(" << doubleToString(-72*propList["svg:x"]->getDouble())
- << ", " << doubleToString(-72*propList["svg:y"]->getDouble())
- << ")\"";
+ {
+ double angle(propList["libwpg:rotate"]->getDouble());
+ while (angle > 180.0)
+ angle -= 360.0;
+ while (angle < -180.0)
+ angle += 360.0;
+ m_outputSink << " transform=\"rotate(" << doubleToString(angle) << ", " << doubleToString(72*xmiddle) << ", " << doubleToString(72*ymiddle) << ")\" ";
+ }
m_outputSink << ">\n";
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/src/lib/CDRStylesCollector.cpp new/libcdr-0.0.11/src/lib/CDRStylesCollector.cpp
--- old/libcdr-0.0.10/src/lib/CDRStylesCollector.cpp 2012-10-06 11:06:07.000000000 +0200
+++ new/libcdr-0.0.11/src/lib/CDRStylesCollector.cpp 2013-03-01 10:29:54.000000000 +0100
@@ -239,9 +239,14 @@
m_ps.m_documentPalette[colorId] = color;
}
-void libcdr::CDRStylesCollector::collectFont(unsigned fontId, unsigned short, const WPXString &font)
+void libcdr::CDRStylesCollector::collectFont(unsigned fontId, unsigned short encoding, const WPXString &font)
{
- m_ps.m_fonts[fontId] = font;
+ std::map::const_iterator iter = m_ps.m_fonts.find(fontId);
+ // Asume that the first font with the given ID is a font
+ // that we want, the others are substitution fonts. We might
+ // be utterly wrong in this one
+ if (iter == m_ps.m_fonts.end())
+ m_ps.m_fonts[fontId] = CDRFont(font, encoding);
}
void libcdr::CDRStylesCollector::collectText(unsigned textId, unsigned styleId, const std::vector<unsigned char> &data,
@@ -267,6 +272,12 @@
iter = styleOverrides.find((tmpCharDescription >> 16) & 0xff);
if (iter != styleOverrides.end())
tmpCharStyle.overrideCharacterStyle(iter->second);
+ if (!tmpCharStyle.m_charSet)
+ {
+ std::map::const_iterator iterFont = m_ps.m_fonts.find(tmpCharStyle.m_fontId);
+ if (iterFont != m_ps.m_fonts.end())
+ tmpCharStyle.m_charSet = iterFont->second.m_encoding;
+ }
if ((uint32_t)(charDescriptions[i] & 0xffffff) != tmpCharDescription)
{
if (!tmpTextData.empty())
@@ -292,7 +303,8 @@
}
CDR_DEBUG_MSG(("CDRStylesCollector::collectText - Text: %s\n", text.cstr()));
- m_ps.m_texts[textId] = CDRText(text, tmpCharStyle);
+ std::vector<CDRText> ¶graphVector = m_ps.m_texts[textId];
+ paragraphVector.push_back(CDRText(text, tmpCharStyle));
}
void libcdr::CDRStylesCollector::collectStlt(const std::map &charStyles)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/src/lib/CDRTransforms.cpp new/libcdr-0.0.11/src/lib/CDRTransforms.cpp
--- old/libcdr-0.0.10/src/lib/CDRTransforms.cpp 2012-10-04 15:20:37.000000000 +0200
+++ new/libcdr-0.0.11/src/lib/CDRTransforms.cpp 2013-02-27 10:32:13.000000000 +0100
@@ -116,7 +116,11 @@
}
// sweep is inversed each time the arc is flipped
- sweep = (m_v0*m_v4 < m_v3*m_v1);
+ if (v0 < 0)
+ sweep = !sweep;
+ if (v4 < 0)
+ sweep = !sweep;
+
}
double libcdr::CDRTransform::_getScaleX() const
@@ -161,20 +165,6 @@
return (0 > _getScaleY());
}
-double libcdr::CDRTransform::getRotation() const
-{
- double x0 = 0.0;
- double x1 = 1.0;
- double y0 = 0.0;
- double y1 = 0.0;
- applyToPoint(x0, y0);
- applyToPoint(x1, y1);
- double angle = atan2(y1-y0, x1-x0);
- if (angle < 0.0)
- angle += 2*M_PI;
- return angle;
-}
-
double libcdr::CDRTransform::getTranslateX() const
{
double x = 0.0;
@@ -280,20 +270,6 @@
return (0 > _getScaleY());
}
-double libcdr::CDRTransforms::getRotation() const
-{
- double x0 = 0.0;
- double x1 = 1.0;
- double y0 = 0.0;
- double y1 = 0.0;
- applyToPoint(x0, y0);
- applyToPoint(x1, y1);
- double angle = atan2(y1-y0, x1-x0);
- if (angle < 0.0)
- angle += 2*M_PI;
- return angle;
-}
-
double libcdr::CDRTransforms::getTranslateX() const
{
double x = 0.0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/src/lib/CDRTransforms.h new/libcdr-0.0.11/src/lib/CDRTransforms.h
--- old/libcdr-0.0.10/src/lib/CDRTransforms.h 2012-10-04 15:14:49.000000000 +0200
+++ new/libcdr-0.0.11/src/lib/CDRTransforms.h 2013-02-27 10:32:30.000000000 +0100
@@ -47,7 +47,6 @@
void applyToArc(double &rx, double &ry, double &rotation, bool &sweep, double &x, double &y) const;
double getScaleX() const;
double getScaleY() const;
- double getRotation() const;
double getTranslateX() const;
double getTranslateY() const;
bool getFlipX() const;
@@ -80,7 +79,6 @@
void applyToArc(double &rx, double &ry, double &rotation, bool &sweep, double &x, double &y) const;
double getScaleX() const;
double getScaleY() const;
- double getRotation() const;
double getTranslateX() const;
double getTranslateY() const;
bool getFlipX() const;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/src/lib/CDRTypes.h new/libcdr-0.0.11/src/lib/CDRTypes.h
--- old/libcdr-0.0.10/src/lib/CDRTypes.h 2012-10-06 11:06:51.000000000 +0200
+++ new/libcdr-0.0.11/src/lib/CDRTypes.h 2013-02-27 14:55:36.000000000 +0100
@@ -203,14 +203,6 @@
{
return (m_y1 + m_y2) / 2.0;
}
- double getWidth() const
- {
- return fabs(m_x1 - m_x2);
- }
- double getHeight() const
- {
- return fabs(m_y1 - m_y2);
- }
const WPXBinaryData &getImage() const
{
return m_image;
@@ -352,6 +344,17 @@
CDRCharacterStyle m_charStyle;
};
+struct CDRFont
+{
+ CDRFont() : m_name(), m_encoding(0) {}
+ CDRFont(const WPXString &name, unsigned short encoding)
+ : m_name(name), m_encoding(encoding) {}
+ CDRFont(const CDRFont &font)
+ : m_name(font.m_name), m_encoding(font.m_encoding) {}
+ WPXString m_name;
+ unsigned short m_encoding;
+};
+
} // namespace libcdr
#endif /* __CDRTYPES_H__ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/src/lib/Makefile.am new/libcdr-0.0.11/src/lib/Makefile.am
--- old/libcdr-0.0.10/src/lib/Makefile.am 2013-01-21 16:00:38.000000000 +0100
+++ new/libcdr-0.0.11/src/lib/Makefile.am 2013-01-28 11:09:05.000000000 +0100
@@ -12,9 +12,9 @@
CDRStringVector.h \
CMXDocument.h
-AM_CXXFLAGS = $(LIBCDR_CXXFLAGS) $(ZLIB_CFLAGS) $(ICU_CFLAGS) $(DEBUG_CXXFLAGS)
+AM_CXXFLAGS = $(WPD_CFLAGS) $(WPG_CFLAGS) $(LCMS2_CFLAGS) $(ZLIB_CFLAGS) $(ICU_CFLAGS) $(DEBUG_CXXFLAGS)
-libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_LIBADD = $(LIBCDR_LIBS) $(ZLIB_LIBS) $(ICU_LIBS) @LIBCDR_WIN32_RESOURCE@
+libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_LIBADD = $(WPD_LIBS) $(LCMS2_LIBS) $(ZLIB_LIBS) $(ICU_LIBS) @LIBCDR_WIN32_RESOURCE@
libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_DEPENDENCIES = @LIBCDR_WIN32_RESOURCE@
libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic -no-undefined
libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_SOURCES = \
@@ -64,8 +64,7 @@
EXTRA_DIST = \
- libcdr.rc.in \
- makefile.mk
+ libcdr.rc.in
# These may be in the builddir too
BUILD_EXTRA_DIST = \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/src/lib/Makefile.in new/libcdr-0.0.11/src/lib/Makefile.in
--- old/libcdr-0.0.10/src/lib/Makefile.in 2013-01-25 08:49:07.000000000 +0100
+++ new/libcdr-0.0.11/src/lib/Makefile.in 2013-03-01 10:32:10.000000000 +0100
@@ -218,8 +218,6 @@
LCMS2_LIBS = @LCMS2_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
-LIBCDR_CXXFLAGS = @LIBCDR_CXXFLAGS@
-LIBCDR_LIBS = @LIBCDR_LIBS@
LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -326,8 +324,8 @@
CDRStringVector.h \
CMXDocument.h
-AM_CXXFLAGS = $(LIBCDR_CXXFLAGS) $(ZLIB_CFLAGS) $(ICU_CFLAGS) $(DEBUG_CXXFLAGS)
-libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_LIBADD = $(LIBCDR_LIBS) $(ZLIB_LIBS) $(ICU_LIBS) @LIBCDR_WIN32_RESOURCE@
+AM_CXXFLAGS = $(WPD_CFLAGS) $(WPG_CFLAGS) $(LCMS2_CFLAGS) $(ZLIB_CFLAGS) $(ICU_CFLAGS) $(DEBUG_CXXFLAGS)
+libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_LIBADD = $(WPD_LIBS) $(LCMS2_LIBS) $(ZLIB_LIBS) $(ICU_LIBS) @LIBCDR_WIN32_RESOURCE@
libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_DEPENDENCIES = @LIBCDR_WIN32_RESOURCE@
libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic -no-undefined
libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_SOURCES = \
@@ -368,8 +366,7 @@
libcdr_utils.h
EXTRA_DIST = \
- libcdr.rc.in \
- makefile.mk
+ libcdr.rc.in
# These may be in the builddir too
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/src/lib/libcdr_utils.cpp new/libcdr-0.0.11/src/lib/libcdr_utils.cpp
--- old/libcdr-0.0.10/src/lib/libcdr_utils.cpp 2013-01-24 09:44:20.000000000 +0100
+++ new/libcdr-0.0.11/src/lib/libcdr_utils.cpp 2013-02-27 14:44:27.000000000 +0100
@@ -333,7 +333,7 @@
void libcdr::appendCharacters(WPXString &text, std::vector<unsigned char> characters, unsigned short charset)
{
- if (!characters.size())
+ if (characters.empty())
return;
static const unsigned short symbolmap [] =
{
@@ -367,7 +367,7 @@
0x23A0, 0x23A4, 0x23A5, 0x23A6, 0x23AB, 0x23AC, 0x23AD, 0x0020 // .. 0xFE
};
- if (!charset && characters.size())
+ if (!charset && !characters.empty())
charset = getEncoding(&characters[0], characters.size());
if (charset == 0x02) // SYMBOL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcdr-0.0.10/src/lib/makefile.mk new/libcdr-0.0.11/src/lib/makefile.mk
--- old/libcdr-0.0.10/src/lib/makefile.mk 2012-10-04 14:22:48.000000000 +0200
+++ new/libcdr-0.0.11/src/lib/makefile.mk 1970-01-01 01:00:00.000000000 +0100
@@ -1,64 +0,0 @@
-EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
-
-PRJ=..$/..$/..$/..$/..$/..
-
-PRJNAME=libcdr
-TARGET=cdrlib
-ENABLE_EXCEPTIONS=TRUE
-LIBTARGET=NO
-
-.INCLUDE : settings.mk
-
-.IF "$(GUI)$(COM)"=="WNTMSC"
-CFLAGS+=-GR
-.ENDIF
-.IF "$(COM)"=="GCC"
-CFLAGSCXX+=-frtti
-.ENDIF
-
-.IF "$(SYSTEM_LIBWPD)" == "YES"
-INCPRE+=$(WPD_CFLAGS)
-.ELSE
-INCPRE+=$(SOLARVER)$/$(INPATH)$/inc$/libwpd
-.ENDIF
-
-.IF "$(SYSTEM_LIBWPG)" == "YES"
-INCPRE+=$(WPG_CFLAGS)
-.ELSE
-INCPRE+=$(SOLARVER)$/$(INPATH)$/inc$/libwpg
-.ENDIF
-
-.IF "$(SYSTEM_LCMS2)" == "YES"
-INCPRE+=$(LCMS2_CFLAGS)
-.ELSE
-INCPRE+=$(SOLARVER)$/$(INPATH)$/inc$/lcms2
-.ENDIF
-
-.IF "$(SYSTEM_ZLIB)" != "YES"
-INCPRE+=-I$(SOLARVER)$/$(INPATH)$/inc$/external/zlib
-.ENDIF
-
-SLOFILES= \
- $(SLO)$/CDRCollector.obj \
- $(SLO)$/CDRContentCollector.obj \
- $(SLO)$/CDRDocument.obj \
- $(SLO)$/CDRInternalStream.obj \
- $(SLO)$/CDROutputElementList.obj \
- $(SLO)$/CDRParser.obj \
- $(SLO)$/CDRPath.obj \
- $(SLO)$/CDRStringVector.obj \
- $(SLO)$/CDRStylesCollector.obj \
- $(SLO)$/CDRSVGGenerator.obj \
- $(SLO)$/CDRTransforms.obj \
- $(SLO)$/CDRTypes.obj \
- $(SLO)$/CDRZipStream.obj \
- $(SLO)$/CMXDocument.obj \
- $(SLO)$/CMXParser.obj \
- $(SLO)$/CommonParser.obj \
- $(SLO)$/libcdr_utils.obj
-
-LIB1ARCHIV=$(LB)$/libcdrlib.a
-LIB1TARGET=$(SLB)$/$(TARGET).lib
-LIB1OBJFILES= $(SLOFILES)
-
-.INCLUDE : target.mk
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org