diff --git a/0001-Adapt-to-C-20-deleted-ostream-for-sal_Unicode-aka-ch.patch b/0001-Adapt-to-C-20-deleted-ostream-for-sal_Unicode-aka-ch.patch new file mode 100644 index 0000000..6bb4b90 --- /dev/null +++ b/0001-Adapt-to-C-20-deleted-ostream-for-sal_Unicode-aka-ch.patch @@ -0,0 +1,52 @@ +From e8cb5f2e11838060f85e7940540b5f7096d9eeb7 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Tue, 3 Dec 2019 13:30:41 +0100 +Subject: [PATCH] Adapt to C++20 deleted ostream << for sal_Unicode (aka + char16_t) + + "char8_t +backward compatibility remediation", as implemented now by "libstdc++: +P1423R3 char8_t remediation (2/4)" for -std=c++2a, deletes operator << overloads +that would print an integer rather than a (presumably expected) character. + +But in these cases printing an integer is as expected, so add explicit casts. + +Change-Id: I7c2f1afaa2982b284aef8af183b71466c37142c2 +Reviewed-on: https://gerrit.libreoffice.org/84339 +Tested-by: Jenkins +Reviewed-by: Stephan Bergmann +--- + include/com/sun/star/uno/Any.hxx | 2 +- + sw/source/filter/ww8/docxattributeoutput.cxx | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/com/sun/star/uno/Any.hxx b/include/com/sun/star/uno/Any.hxx +index 05f032fc5b81..c7089a0b5810 100644 +--- a/include/com/sun/star/uno/Any.hxx ++++ b/include/com/sun/star/uno/Any.hxx +@@ -720,7 +720,7 @@ inline std::basic_ostream &operator<<(std::basic_ostream(any.getValue()); ++ << unsigned(*static_cast(any.getValue())); + o.setf(flgs); + o.fill(fill); + break; +diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx +index 91d77e81ddbb..c9b1835ab792 100644 +--- a/sw/source/filter/ww8/docxattributeoutput.cxx ++++ b/sw/source/filter/ww8/docxattributeoutput.cxx +@@ -2783,7 +2783,7 @@ void DocxAttributeOutput::RunText( const OUString& rText, rtl_TextEncoding /*eCh + if ( *pIt < 0x0020 ) // filter out the control codes + { + impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt ); +- SAL_INFO("sw.ww8", "Ignored control code in a text run: " << *pIt ); ++ SAL_INFO("sw.ww8", "Ignored control code in a text run: " << unsigned(*pIt) ); + } + prevUnicode = *pIt; + break; +-- +2.24.1 + diff --git a/libreoffice.spec b/libreoffice.spec index 33bf189..f34e436 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -247,6 +247,7 @@ Patch2: 0001-replace-boost-bimap-in-sdext-pdfimport.patch Patch3: 0001-fix-detecting-qrcodegen.patch Patch4: 0001-Fix-build-with-poppler-0.83.patch Patch5: 0001-Adapt-SAL_WARN-to-C-20-deleted-ostream-for-sal_Unico.patch +Patch6: 0001-Adapt-to-C-20-deleted-ostream-for-sal_Unicode-aka-ch.patch %if 0%{?rhel} # not upstreamed