summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-01-14 21:34:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-10 16:23:56 +0200
commit434d611e22c4fe76a11d2de26b9f185bb04e5ad3 (patch)
treecdf297a6dd051f30717aeba6e81d691f71224a06 /svx/source
parent217d6ee31d6c892af63931ca4fc4158b8e713640 (diff)
external: update pdfium from 3963 to 4137
This is a combination of 6 commits, which brings pdfium to the same version as libreoffice-7-0. This is the 1st commit message: external: update pdfium to 4021 (cherry picked from commit 1cb70721ba00dd6c6958f0a10e39aa5c1866ec96) This is the commit message #2: external/pdfium: C++20 comparison operator fix Missing const leads to overload resolution ambiguity when a synthesized candidate of operator == for a reversed-argument rewrite conflicts with the actual operator ==, due to the asymmetric const-ness of the implicit object parameter and the RHS parameter: > In file included from workdir/UnpackedTarball/pdfium/core/fxge/cfx_font.cpp:7: > In file included from workdir/UnpackedTarball/pdfium/core/fxge/cfx_font.h:11: > llvm/inst/include/c++/v1/vector:1369:27: error: use of overloaded operator '!=' is ambiguous (with operand types 'std::__1::__vector_base<unsigned char, FxAllocAllocator<unsigned char> >::allocator_type' (aka 'FxAllocAllocator<unsigned char>') and 'std::__1::__vector_base<unsigned char, FxAllocAllocator<unsigned char> >::allocator_type') > if (__base::__alloc() != __c.__alloc()) > ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~ > llvm/inst/include/c++/v1/vector:1359:5: note: in instantiation of member function 'std::__1::vector<unsigned char, FxAllocAllocator<unsigned char> >::__move_assign' requested here > __move_assign(__x, integral_constant<bool, > ^ > workdir/UnpackedTarball/pdfium/core/fxge/cfx_font.cpp:384:24: note: in instantiation of member function 'std::__1::vector<unsigned char, FxAllocAllocator<unsigned char> >::operator=' requested here > m_FontDataAllocation = std::vector<uint8_t, FxAllocAllocator<uint8_t>>( > ^ > workdir/UnpackedTarball/pdfium/core/fxcrt/fx_memory_wrappers.h:74:8: note: candidate function > bool operator!=(const FxAllocAllocator& that) { return false; } > ^ > workdir/UnpackedTarball/pdfium/core/fxcrt/fx_memory_wrappers.h:73:8: note: candidate function > bool operator==(const FxAllocAllocator& that) { return true; } > ^ > workdir/UnpackedTarball/pdfium/core/fxcrt/fx_memory_wrappers.h:73:8: note: candidate function (with reversed parameter order) (cherry picked from commit 6e0461d576d9f386e458f98f3c57f0ba385aacb4) This is the commit message #3: pdfium: don't patch out the COMPONENT_BUILD check, define it So next time we update, no need to adapt a failing patch. (cherry picked from commit 9b4ab9bda41a818832c721933986c9c6e07a6e6c) This is the commit message #4: make update_pch also consider files in <module>/src/**/inc With --enable-pch=full there's not much difference between a "public" header in <module>/inc and a private one in <module>/src/somewhere/inc . And since the script searches recursively, this apparently helps to find even more headers for lower pch levels. [ Just the pdfium part. ] (cherry picked from commit 69e0d871ec1de2260f9213d3113464155eac173c) Change-Id: I8483d0aa5b4fea5a59107c20a8aa5f1ef694af0a This is the commit message #5: external: update pdfium to 4083 (cherry picked from commit 9054c36d4ea3bee25fb9a47a96a0ea2cd07148c3) This is the commit message #6: external: update pdfium to 4137 (cherry picked from commit 1ffe59ef31186e36ad0aa7bbcdd32e407ee8d26c) Change-Id: Ib7c12461e04fa97bf55ee967e8d6c9bcf92fdf4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102373 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/svdraw/svdpdf.cxx21
1 files changed, 11 insertions, 10 deletions
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 66b37df2aee4..c9a18c1dfcf9 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -757,9 +757,9 @@ void ImpSdrPdfImport::ImportForm(FPDF_PAGEOBJECT pPageObject, FPDF_TEXTPAGE pTex
// Get the form matrix to perform correct translation/scaling of the form sub-objects.
const Matrix aOldMatrix = mCurMatrix;
- double a, b, c, d, e, f;
- FPDFFormObj_GetMatrix(pPageObject, &a, &b, &c, &d, &e, &f);
- mCurMatrix = Matrix(a, b, c, d, e, f);
+ FS_MATRIX matrix;
+ FPDFFormObj_GetMatrix(pPageObject, &matrix);
+ mCurMatrix = Matrix(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f);
const int nCount = FPDFFormObj_CountObjects(pPageObject);
for (int nIndex = 0; nIndex < nCount; ++nIndex)
@@ -787,8 +787,8 @@ void ImpSdrPdfImport::ImportText(FPDF_PAGEOBJECT pPageObject, FPDF_TEXTPAGE pTex
if (left == right || top == bottom)
return;
- double a, b, c, d, e, f;
- FPDFTextObj_GetMatrix(pPageObject, &a, &b, &c, &d, &e, &f);
+ FS_MATRIX matrix;
+ FPDFTextObj_GetMatrix(pPageObject, &matrix);
Matrix aTextMatrix(mCurMatrix);
aTextMatrix.Transform(left, right, top, bottom);
@@ -806,8 +806,8 @@ void ImpSdrPdfImport::ImportText(FPDF_PAGEOBJECT pPageObject, FPDF_TEXTPAGE pTex
OUString sText(pText.get(), nActualChars);
const double dFontSize = FPDFTextObj_GetFontSize(pPageObject);
- double dFontSizeH = fabs(sqrt2(a, c) * dFontSize);
- double dFontSizeV = fabs(sqrt2(b, d) * dFontSize);
+ double dFontSizeH = fabs(sqrt2(matrix.a, matrix.c) * dFontSize);
+ double dFontSizeV = fabs(sqrt2(matrix.b, matrix.d) * dFontSize);
dFontSizeH = lcl_PointToPixel(dFontSizeH);
dFontSizeV = lcl_PointToPixel(dFontSizeV);
dFontSizeH = lcl_ToLogic(dFontSizeH);
@@ -850,6 +850,7 @@ void ImpSdrPdfImport::ImportText(FPDF_PAGEOBJECT pPageObject, FPDF_TEXTPAGE pTex
break;
case FPDF_TEXTRENDERMODE_STROKE:
case FPDF_TEXTRENDERMODE_STROKE_CLIP:
+ case FPDF_TEXTRENDERMODE_UNKNOWN:
break;
case FPDF_TEXTRENDERMODE_INVISIBLE:
case FPDF_TEXTRENDERMODE_CLIP:
@@ -1022,9 +1023,9 @@ void ImpSdrPdfImport::ImportImage(FPDF_PAGEOBJECT pPageObject, int /*nPageObject
void ImpSdrPdfImport::ImportPath(FPDF_PAGEOBJECT pPageObject, int /*nPageObjectIndex*/)
{
- double a, b, c, d, e, f;
- FPDFPath_GetMatrix(pPageObject, &a, &b, &c, &d, &e, &f);
- Matrix aPathMatrix(a, b, c, d, e, f);
+ FS_MATRIX matrix;
+ FPDFPath_GetMatrix(pPageObject, &matrix);
+ Matrix aPathMatrix(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f);
aPathMatrix.Concatinate(mCurMatrix);
basegfx::B2DPolyPolygon aPolyPoly;