office-gobmx/external/pdfium/build.patch.1
Miklos Vajna 71b9523407 external: update pdfium to 4933
Stop tracking build_config.h in our repo, it can be now part of the
release tarball. It was a mistake in the past to think that this is
generated code, it's just external code.

Change-Id: Ife2fed362e28c53859399244e2f1247efb1efe86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131695
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-03-17 11:22:48 +01:00

83 lines
3.2 KiB
Diff

-*- Mode: diff -*-
diff --git a/core/fpdfdoc/cpdf_metadata.cpp b/core/fpdfdoc/cpdf_metadata.cpp
index 323de4ffc..f11a0b0ad 100644
--- a/core/fpdfdoc/cpdf_metadata.cpp
+++ b/core/fpdfdoc/cpdf_metadata.cpp
@@ -74,7 +74,7 @@ std::vector<UnsupportedFeature> CPDF_Metadata::CheckForSharedForm() const {
CFX_XMLParser parser(stream);
std::unique_ptr<CFX_XMLDocument> doc = parser.Parse();
if (!doc)
- return {};
+ return std::vector<UnsupportedFeature>();
std::vector<UnsupportedFeature> unsupported;
CheckForSharedFormInternal(doc->GetRoot(), &unsupported);
diff --git a/third_party/base/span.h b/third_party/base/span.h
index 0fb627ba8..f71c362e2 100644
--- a/third_party/base/span.h
+++ b/third_party/base/span.h
@@ -214,7 +214,7 @@ class span {
// Conversions from spans of compatible types: this allows a span<T> to be
// seamlessly used as a span<const T>, but not the other way around.
template <typename U, typename = internal::EnableIfLegalSpanConversion<U, T>>
- constexpr span(const span<U>& other) : span(other.data(), other.size()) {}
+ span(const span<U>& other) : span(other.data(), other.size()) {}
span& operator=(const span& other) noexcept = default;
~span() noexcept {
if (!size_) {
diff --git a/third_party/base/span.h b/third_party/base/span.h
index 0fb627ba8..dda1fc8bc 100644
--- a/third_party/base/span.h
+++ b/third_party/base/span.h
@@ -204,7 +204,7 @@ class span {
// size()|.
template <typename Container,
typename = internal::EnableIfSpanCompatibleContainer<Container, T>>
- constexpr span(Container& container)
+ span(Container& container)
: span(container.data(), container.size()) {}
template <
typename Container,
diff --git a/core/fxcodec/jpx/cjpx_decoder.cpp b/core/fxcodec/jpx/cjpx_decoder.cpp
index d8875786c..bc019ebe1 100644
--- a/core/fxcodec/jpx/cjpx_decoder.cpp
+++ b/core/fxcodec/jpx/cjpx_decoder.cpp
@@ -73,7 +73,7 @@ absl::optional<OpjImageRgbData> alloc_rgb(size_t size) {
if (!data.b)
return absl::nullopt;
- return data;
+ return std::move(data);
}
void sycc_to_rgb(int offset,
diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp
index 8b3a72700..ea1db23f4 100644
--- a/core/fxge/cfx_font.cpp
+++ b/core/fxge/cfx_font.cpp
@@ -47,25 +47,9 @@ struct OUTLINE_PARAMS {
// TODO(crbug.com/pdfium/1400): When FT_Done_MM_Var() is more likely to be
// available to all users in the future, remove FreeMMVar() and use
// FT_Done_MM_Var() directly.
-//
-// Use weak symbols to check if FT_Done_MM_Var() is available at runtime.
-#if !BUILDFLAG(IS_WIN)
-extern "C" __attribute__((weak)) decltype(FT_Done_MM_Var) FT_Done_MM_Var;
-#endif
void FreeMMVar(FXFT_FaceRec* rec, FXFT_MM_VarPtr variation_desc) {
-#if BUILDFLAG(IS_WIN)
- // Assume `use_system_freetype` GN var is never set on Windows.
- constexpr bool has_ft_done_mm_var_func = true;
-#else
- static const bool has_ft_done_mm_var_func = !!FT_Done_MM_Var;
-#endif
- if (has_ft_done_mm_var_func) {
- FT_Done_MM_Var(CFX_GEModule::Get()->GetFontMgr()->GetFTLibrary(),
- variation_desc);
- } else {
FXFT_Free(rec, variation_desc);
- }
}
FX_RECT FXRectFromFTPos(FT_Pos left, FT_Pos top, FT_Pos right, FT_Pos bottom) {