libvisio/libvisio-0.0.13.patch | 20 ------------ libvisio/libvisio-0.0.14.patch | 20 ++++++++++++ libvisio/makefile.mk | 4 +- ooo.lst.in | 2 - writerperfect/source/filter/OdgGenerator.cxx | 43 +++++++++++++++++++++++++-- 5 files changed, 64 insertions(+), 25 deletions(-)
New commits: commit a61ea02511d6e81035495fefaa24e77b30701362 Author: Fridrich Å trba <fridrich.st...@bluewin.ch> Date: Fri Jan 20 10:51:35 2012 +0100 Uploading even newer and even more shiny libvisio 0.0.14 Signed-off-by: Thorsten Behrens <tbehr...@suse.com> diff --git a/libvisio/libvisio-0.0.13.patch b/libvisio/libvisio-0.0.13.patch deleted file mode 100644 index c93983b..0000000 --- a/libvisio/libvisio-0.0.13.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- misc/libvisio-0.0.13/src/lib/libvisio_utils.h -+++ misc/build/libvisio-0.0.13/src/lib/libvisio_utils.h -@@ -42,17 +42,8 @@ - - #else - --#ifdef HAVE_CONFIG_H --#include <config.h> --#endif -- --#ifdef HAVE_STDINT_H - #include <stdint.h> --#endif -- --#ifdef HAVE_INTTYPES_H - #include <inttypes.h> --#endif - - #endif - diff --git a/libvisio/libvisio-0.0.14.patch b/libvisio/libvisio-0.0.14.patch new file mode 100644 index 0000000..456f5ad --- /dev/null +++ b/libvisio/libvisio-0.0.14.patch @@ -0,0 +1,20 @@ +--- misc/libvisio-0.0.14/src/lib/libvisio_utils.h ++++ misc/build/libvisio-0.0.14/src/lib/libvisio_utils.h +@@ -42,17 +42,8 @@ + + #else + +-#ifdef HAVE_CONFIG_H +-#include <config.h> +-#endif +- +-#ifdef HAVE_STDINT_H + #include <stdint.h> +-#endif +- +-#ifdef HAVE_INTTYPES_H + #include <inttypes.h> +-#endif + + #endif + diff --git a/libvisio/makefile.mk b/libvisio/makefile.mk index 6d29b7d..9adf426 100644 --- a/libvisio/makefile.mk +++ b/libvisio/makefile.mk @@ -54,8 +54,8 @@ INCPRE+=$(WPG_CFLAGS) INCPRE+=$(SOLARVER)$/$(UPD)$/$(INPATH)$/inc$/libwpg .ENDIF -TARFILE_NAME=libvisio-0.0.13 -TARFILE_MD5=adb5c5c8398fd89ebee2d9b4e90e061e +TARFILE_NAME=libvisio-0.0.14 +TARFILE_MD5=776ad69a63ac1e99abed176e54ce25d9 PATCH_FILES=\ $(TARFILE_NAME).patch diff --git a/ooo.lst.in b/ooo.lst.in index 3ebd860..a71ed38 100644 --- a/ooo.lst.in +++ b/ooo.lst.in @@ -88,7 +88,7 @@ c01351d7db2b205de755d58769288224-libwpd-0.9.4.tar.bz2 f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2 3121aaf3e13e5d88dfff13fb4a5f1ab8-hunspell-1.3.2.tar.gz 3bf481ca95109b14435125c0dd1f2217-graphite2-1.0.3.tgz -adb5c5c8398fd89ebee2d9b4e90e061e-libvisio-0.0.13.tar.bz2 +776ad69a63ac1e99abed176e54ce25d9-libvisio-0.0.14.tar.bz2 e7a384790b13c29113e22e596ade9687-LinLibertineG-20120116.zip 7c2549f6b0a8bb604e6c4c729ffdcfe6-libcmis-0.1.0.tar.gz @GOOGLE_DOCS_EXTENSION_PACK@ commit 4a49fcfe961f7f6fe78378e8fa94fb3697c53007 Author: Fridrich Å trba <fridrich.st...@bluewin.ch> Date: Mon Jan 16 17:32:23 2012 +0100 Implementing text rotations Signed-off-by: Thorsten Behrens <tbehr...@suse.com> diff --git a/writerperfect/source/filter/OdgGenerator.cxx b/writerperfect/source/filter/OdgGenerator.cxx index 5681ed5..79722e8 100644 --- a/writerperfect/source/filter/OdgGenerator.cxx +++ b/writerperfect/source/filter/OdgGenerator.cxx @@ -1371,10 +1371,27 @@ void OdgGenerator::startTextObject(const WPXPropertyList &propList, const WPXPro pStyleGraphicPropertiesOpenElement->addAttribute("draw:fill", "none"); pStyleGraphicPropertiesOpenElement->addAttribute("draw:fill-color", "#ffffff"); + double x = 0.0; + double y = 0.0; + double height = 0.0; + double width = 0.0; if (propList["svg:x"]) - pDrawFrameOpenElement->addAttribute("svg:x", propList["svg:x"]->getStr()); + x = propList["svg:x"]->getDouble(); if (propList["svg:y"]) - pDrawFrameOpenElement->addAttribute("svg:y", propList["svg:y"]->getStr()); + y = propList["svg:y"]->getDouble(); + if (propList["svg:width"]) + width = propList["svg:width"]->getDouble(); + if (propList["svg:height"]) + height = propList["svg:height"]->getDouble(); + + double angle(propList["libwpg:rotate"] ? - M_PI * propList["libwpg:rotate"]->getDouble() / 180.0 : 0.0); + if (angle != 0.0) + { + double deltax((width*cos(angle)+height*sin(angle)-width)/2.0); + double deltay((-width*sin(angle)+height*cos(angle)-height)/2.0); + x -= deltax; + y -= deltay; + } if (!propList["svg:width"] && !propList["svg:height"]) { @@ -1452,6 +1469,28 @@ void OdgGenerator::startTextObject(const WPXPropertyList &propList, const WPXPro pDrawFrameOpenElement->addAttribute("draw:opacity", propList["draw:opacity"]->getStr()); pStyleGraphicPropertiesOpenElement->addAttribute("draw:opacity", propList["draw:opacity"]->getStr()); } + + WPXProperty *svg_x = WPXPropertyFactory::newInchProp(x); + WPXProperty *svg_y = WPXPropertyFactory::newInchProp(y); + if (angle != 0.0) + { + WPXProperty *libwpg_rotate = WPXPropertyFactory::newDoubleProp(angle); + sValue.sprintf("rotate (%s) translate(%s, %s)", + libwpg_rotate->getStr().cstr(), + svg_x->getStr().cstr(), + svg_y->getStr().cstr()); + delete libwpg_rotate; + pDrawFrameOpenElement->addAttribute("draw:transform", sValue); + } + else + { + if (propList["svg:x"]) + pDrawFrameOpenElement->addAttribute("svg:x", svg_x->getStr()); + if (propList["svg:y"]) + pDrawFrameOpenElement->addAttribute("svg:y", svg_y->getStr()); + } + delete svg_x; + delete svg_y; mpImpl->mBodyElements.push_back(pDrawFrameOpenElement); mpImpl->mBodyElements.push_back(new TagOpenElement("draw:text-box")); mpImpl->mGraphicsAutomaticStyles.push_back(pStyleGraphicPropertiesOpenElement);
_______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits