mirror of
https://github.com/LibreOffice/core.git
synced 2025-08-15 20:47:46 +00:00
librevenge: upgrade to 0.0.5
* Add C2039-unique-shared_ptr.patch.0 to fix C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/workdir/UnpackedTarball/librevenge/src/lib/RVNGBinaryData.cpp(96): error C2039: 'unique': is not a member of 'std::shared_ptr<librevenge::`anonymous-namespace'::DataImpl>' C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/workdir/UnpackedTarball/librevenge/src/lib/RVNGBinaryData.cpp(86): note: see declaration of 'std::shared_ptr<librevenge::`anonymous-namespace'::DataImpl>' make[1]: *** [C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/solenv/gbuild/LinkTarget.mk:398: C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/workdir/GenCxxObject/UnpackedTarball/librevenge/src/lib/RVNGBinaryData.o] Error 2 on Windows Change-Id: I31023633426fc902e2298c696826d8371bb4d63b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167388 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
This commit is contained in:
@ -580,8 +580,8 @@ REDLAND_TARBALL := e5be03eda13ef68aabab6e42aa67715e-redland-1.0.17.tar.gz
|
||||
# three static lines
|
||||
# so that git cherry-pick
|
||||
# will not run into conflicts
|
||||
REVENGE_SHA256SUM := c51601cd08320b75702812c64aae0653409164da7825fd0f451ac2c5dbe77cbf
|
||||
REVENGE_VERSION_MICRO := 4
|
||||
REVENGE_SHA256SUM := 5892ca6796f7a2a93d580832e907e849b19d980b40d326a283b18877ab6de0c5
|
||||
REVENGE_VERSION_MICRO := 5
|
||||
REVENGE_TARBALL := librevenge-0.0.$(REVENGE_VERSION_MICRO).tar.bz2
|
||||
# three static lines
|
||||
# so that git cherry-pick
|
||||
|
11
external/librevenge/C2039-unique-shared_ptr.patch.0
vendored
Normal file
11
external/librevenge/C2039-unique-shared_ptr.patch.0
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/lib/RVNGBinaryData.cpp 2024-05-10 13:20:09.278288686 +0200
|
||||
+++ src/lib/RVNGBinaryData.cpp 2024-05-10 13:23:14.365139906 +0200
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
void RVNGBinaryDataImpl::makeUnique()
|
||||
{
|
||||
- if (!m_ptr.unique())
|
||||
+ if (!(m_ptr.use_count() == 1))
|
||||
{
|
||||
std::shared_ptr<DataImpl> ptr(new DataImpl());
|
||||
ptr->m_buf = m_ptr->m_buf;
|
@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,librevenge,0))
|
||||
$(eval $(call gb_UnpackedTarball_add_patches,librevenge, \
|
||||
external/librevenge/rpath.patch \
|
||||
external/librevenge/tdf63130-improve-perf.patch.0 \
|
||||
external/librevenge/C2039-unique-shared_ptr.patch.0 \
|
||||
))
|
||||
|
||||
ifneq ($(OS),MACOSX)
|
||||
|
@ -18,7 +18,7 @@
|
||||
/** Create a new string from \a s as escaped XML.
|
||||
--- src/lib/RVNGBinaryData.cpp 2023-05-17 15:48:15.373159469 +0200
|
||||
+++ src/lib/RVNGBinaryData.cpp 2023-05-17 15:49:00.773411873 +0200
|
||||
@@ -67,9 +67,9 @@
|
||||
@@ -68,9 +68,9 @@
|
||||
boost::archive::iterators::transform_width<std::vector<unsigned char>::const_iterator, 6, 8 > > base64_encoder;
|
||||
|
||||
// Encode the buffer and create a string
|
||||
@ -30,14 +30,14 @@
|
||||
|
||||
result.append(numPadding, '='); // add '=' for each padded character
|
||||
}
|
||||
@@ -150,10 +150,10 @@
|
||||
@@ -153,10 +153,10 @@
|
||||
{
|
||||
m_binaryDataImpl->makeUnique();
|
||||
|
||||
- unsigned long previousSize = m_binaryDataImpl->m_ptr->m_buf.size();
|
||||
- m_binaryDataImpl->m_ptr->m_buf.reserve(previousSize + data.m_binaryDataImpl->m_ptr->m_buf.size());
|
||||
- for (unsigned long i = 0; i < data.m_binaryDataImpl->m_ptr->m_buf.size(); i++)
|
||||
- m_binaryDataImpl->m_ptr->m_buf.push_back(data.m_binaryDataImpl->m_ptr->m_buf[i]);
|
||||
- const auto &src = data.m_binaryDataImpl->m_ptr->m_buf;
|
||||
- std::copy(src.begin(), src.end(), std::back_inserter(m_binaryDataImpl->m_ptr->m_buf));
|
||||
+ m_binaryDataImpl->m_ptr->m_buf.insert(
|
||||
+ m_binaryDataImpl->m_ptr->m_buf.end(),
|
||||
+ data.m_binaryDataImpl->m_ptr->m_buf.begin(),
|
||||
@ -45,7 +45,7 @@
|
||||
}
|
||||
|
||||
void RVNGBinaryData::appendBase64Data(const RVNGString &base64)
|
||||
@@ -231,8 +231,9 @@
|
||||
@@ -234,8 +234,9 @@
|
||||
const RVNGString RVNGBinaryData::getBase64Data() const
|
||||
{
|
||||
std::string base64;
|
||||
@ -58,7 +58,7 @@
|
||||
RVNGInputStream *RVNGBinaryData::getDataStream() const
|
||||
--- src/lib/RVNGString.cpp 2023-05-17 15:48:15.373159469 +0200
|
||||
+++ src/lib/RVNGString.cpp 2023-05-17 15:49:00.773411873 +0200
|
||||
@@ -73,6 +73,7 @@
|
||||
@@ -76,6 +76,7 @@
|
||||
{
|
||||
public:
|
||||
RVNGStringImpl() : m_buf() {}
|
||||
@ -66,8 +66,8 @@
|
||||
bool empty() const
|
||||
{
|
||||
return m_buf.empty();
|
||||
@@ -157,6 +158,11 @@
|
||||
m_stringImpl->m_buf = str;
|
||||
@@ -200,6 +201,11 @@
|
||||
m_stringImpl->append(str);
|
||||
}
|
||||
|
||||
+RVNGString::RVNGString(std::string&& str) :
|
||||
|
Reference in New Issue
Block a user