Compare commits
No commits in common. "c9" and "c8" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/libodfgen-0.1.8.tar.xz
|
||||
SOURCES/libodfgen-0.1.6.tar.xz
|
||||
|
@ -1 +1 @@
|
||||
9b36d313e64c6ce1026485d521fbdeff7f47594c SOURCES/libodfgen-0.1.8.tar.xz
|
||||
49da7cc0dc4adfe0452e951d2dea3c225358fd63 SOURCES/libodfgen-0.1.6.tar.xz
|
||||
|
@ -0,0 +1,58 @@
|
||||
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.8
|
||||
Release: 4%{?dist}
|
||||
Version: 0.1.6
|
||||
Release: 11%{?dist}
|
||||
Summary: An ODF generator library
|
||||
|
||||
License: LGPLv2+ or MPLv2.0
|
||||
@ -10,11 +10,9 @@ URL: https://sourceforge.net/p/libwpd/wiki/libodfgen/
|
||||
Source: http://downloads.sourceforge.net/libwpd/%{name}-%{version}.tar.xz
|
||||
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: make
|
||||
BuildRequires: pkgconfig(librevenge-0.0)
|
||||
BuildRequires: pkgconfig(librevenge-stream-0.0)
|
||||
BuildRequires: pkgconfig(libxml-2.0)
|
||||
|
||||
Patch0: 0001-tdf-101077-make-double-string-conversion-locale-agno.patch
|
||||
|
||||
%description
|
||||
%{name} is a library for generating ODF documents. It is directly
|
||||
@ -40,20 +38,21 @@ The %{name}-doc package contains documentation files for %{name}.
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%configure --disable-silent-rules --disable-static
|
||||
%configure --disable-silent-rules --disable-static --disable-werror --with-sharedptr=c++11
|
||||
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' \
|
||||
libtool
|
||||
%make_build
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%make_install
|
||||
make install DESTDIR=%{buildroot}
|
||||
rm -f %{buildroot}/%{_libdir}/*.la
|
||||
# we install API docs directly from build
|
||||
rm -rf %{buildroot}/%{_docdir}/%{name}
|
||||
|
||||
%ldconfig_scriptlets
|
||||
%post -p /sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%doc README NEWS
|
||||
@ -71,48 +70,6 @@ rm -rf %{buildroot}/%{_docdir}/%{name}
|
||||
%doc docs/doxygen/html
|
||||
|
||||
%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
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user