Compare commits

...

No commits in common. "c8" and "c9" have entirely different histories.
c8 ... c9

4 changed files with 54 additions and 69 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/libodfgen-0.1.6.tar.xz SOURCES/libodfgen-0.1.8.tar.xz

View File

@ -1 +1 @@
49da7cc0dc4adfe0452e951d2dea3c225358fd63 SOURCES/libodfgen-0.1.6.tar.xz 9b36d313e64c6ce1026485d521fbdeff7f47594c SOURCES/libodfgen-0.1.8.tar.xz

View File

@ -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

View File

@ -1,8 +1,8 @@
%global apiversion 0.1 %global apiversion 0.1
Name: libodfgen Name: libodfgen
Version: 0.1.6 Version: 0.1.8
Release: 11%{?dist} Release: 4%{?dist}
Summary: An ODF generator library Summary: An ODF generator library
License: LGPLv2+ or MPLv2.0 License: LGPLv2+ or MPLv2.0
@ -10,9 +10,11 @@ URL: https://sourceforge.net/p/libwpd/wiki/libodfgen/
Source: http://downloads.sourceforge.net/libwpd/%{name}-%{version}.tar.xz Source: http://downloads.sourceforge.net/libwpd/%{name}-%{version}.tar.xz
BuildRequires: doxygen BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: pkgconfig(librevenge-0.0) BuildRequires: pkgconfig(librevenge-0.0)
BuildRequires: pkgconfig(librevenge-stream-0.0)
Patch0: 0001-tdf-101077-make-double-string-conversion-locale-agno.patch BuildRequires: pkgconfig(libxml-2.0)
%description %description
%{name} is a library for generating ODF documents. It is directly %{name} is a library for generating ODF documents. It is directly
@ -38,21 +40,20 @@ The %{name}-doc package contains documentation files for %{name}.
%autosetup -p1 %autosetup -p1
%build %build
%configure --disable-silent-rules --disable-static --disable-werror --with-sharedptr=c++11 %configure --disable-silent-rules --disable-static
sed -i \ sed -i \
-e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \ -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
libtool libtool
make %{?_smp_mflags} %make_build
%install %install
make install DESTDIR=%{buildroot} %make_install
rm -f %{buildroot}/%{_libdir}/*.la rm -f %{buildroot}/%{_libdir}/*.la
# we install API docs directly from build # we install API docs directly from build
rm -rf %{buildroot}/%{_docdir}/%{name} rm -rf %{buildroot}/%{_docdir}/%{name}
%post -p /sbin/ldconfig %ldconfig_scriptlets
%postun -p /sbin/ldconfig
%files %files
%doc README NEWS %doc README NEWS
@ -70,6 +71,48 @@ rm -rf %{buildroot}/%{_docdir}/%{name}
%doc docs/doxygen/html %doc docs/doxygen/html
%changelog %changelog
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.1.8-4
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.1.8-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Thu Jan 14 17:28:38 CET 2021 David Tardon <dtardon@redhat.com> - 0.1.8-1
- new upstream release
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.7-9
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.7-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 14 2020 Tom Stellard <tstellar@redhat.com> - 0.1.7-7
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.7-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jan 25 2019 Jonathan Wakely <jwakely@redhat.com> - 0.1.7-3
- Rebuilt for Boost 1.69
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* 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 * Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.6-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild