new upstream release 0.1.7

f41
David Tardon 7 years ago
parent f43fdb9b0d
commit a89b55066f

1
.gitignore vendored

@ -10,3 +10,4 @@
/libodfgen-0.1.4.tar.xz
/libodfgen-0.1.5.tar.xz
/libodfgen-0.1.6.tar.xz
/libodfgen-0.1.7.tar.xz

@ -1,58 +0,0 @@
From 68e0c8e4c834df57bc9a0e8da72151f69ff5e7a6 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Fri, 12 Aug 2016 12:50:39 +0200
Subject: [PATCH] tdf#101077 make double->string conversion locale-agnostic
---
src/OdsGenerator.cxx | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/src/OdsGenerator.cxx b/src/OdsGenerator.cxx
index 52e135e..8cb7203 100644
--- a/src/OdsGenerator.cxx
+++ b/src/OdsGenerator.cxx
@@ -26,6 +26,8 @@
#include <librevenge/librevenge.h>
+#include <iomanip>
+#include <locale>
#include <map>
#include <stack>
#include <sstream>
@@ -46,6 +48,19 @@
#include "OdcGenerator.hxx"
#include "OdfGenerator.hxx"
+namespace
+{
+
+librevenge::RVNGString makePreciseStr(const double value)
+{
+ std::ostringstream os;
+ os.imbue(std::locale::classic());
+ os << std::fixed << std::setprecision(8) << value;
+ return os.str().c_str();
+}
+
+}
+
class OdsGeneratorPrivate : public OdfGenerator
{
public:
@@ -968,10 +983,10 @@ void OdsGenerator::openSheetCell(const librevenge::RVNGPropertyList &propList)
// we need the maximum precision here, so we must avoid getStr() when possible
librevenge::RVNGString value;
if (propList["librevenge:value"]->getUnit()==librevenge::RVNG_GENERIC)
- value.sprintf("%.8f", propList["librevenge:value"]->getDouble());
+ value = makePreciseStr(propList["librevenge:value"]->getDouble());
else if (propList["librevenge:value"]->getUnit()==librevenge::RVNG_PERCENT)
{
- value.sprintf("%.8f", propList["librevenge:value"]->getDouble()*100.);
+ value = makePreciseStr(propList["librevenge:value"]->getDouble()*100.);
value.append('%');
}
else
--
2.7.4

@ -1,8 +1,8 @@
%global apiversion 0.1
Name: libodfgen
Version: 0.1.6
Release: 11%{?dist}
Version: 0.1.7
Release: 1%{?dist}
Summary: An ODF generator library
License: LGPLv2+ or MPLv2.0
@ -12,8 +12,7 @@ Source: http://downloads.sourceforge.net/libwpd/%{name}-%{version}.tar.xz
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: pkgconfig(librevenge-0.0)
Patch0: 0001-tdf-101077-make-double-string-conversion-locale-agno.patch
BuildRequires: pkgconfig(librevenge-stream-0.0)
%description
%{name} is a library for generating ODF documents. It is directly
@ -39,7 +38,7 @@ The %{name}-doc package contains documentation files for %{name}.
%autosetup -p1
%build
%configure --disable-silent-rules --disable-static --disable-werror --with-sharedptr=c++11
%configure --disable-silent-rules --disable-static
sed -i \
-e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
@ -71,6 +70,9 @@ rm -rf %{buildroot}/%{_docdir}/%{name}
%doc docs/doxygen/html
%changelog
* Wed Jun 13 2018 David Tardon <dtardon@redhat.com> - 0.1.7-1
- new upstream release
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.6-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

@ -1 +1 @@
731fd5e5513c55ed64458a0a8c33a830 libodfgen-0.1.6.tar.xz
SHA512 (libodfgen-0.1.7.tar.xz) = eaf5c6646a9cacf54cb0416b08526f35d18d0618f3f64cf14f4b24537b0285da2786d2f6d6e2c204c8248f900d37287b2c5af79720b0d49452f67b14c86ea36e

Loading…
Cancel
Save