parent
4a05749059
commit
dd559c7efd
@ -1,38 +0,0 @@
|
|||||||
From 800731dd5910e5af928f05a77a921abe13ec8346 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
||||||
Date: Mon, 23 Nov 2020 10:04:38 +0000
|
|
||||||
Subject: [PATCH] Resolves: rhbz#1900428 don't crash on invalid index used in
|
|
||||||
StarBasic macro
|
|
||||||
|
|
||||||
Change-Id: I05064f7e9216c9c43b49950b309afe72466857a6
|
|
||||||
---
|
|
||||||
dbaccess/source/core/api/RowSetBase.cxx | 11 ++++++++---
|
|
||||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
|
|
||||||
index 0bbe5e80ae0a..df8c46a72554 100644
|
|
||||||
--- a/dbaccess/source/core/api/RowSetBase.cxx
|
|
||||||
+++ b/dbaccess/source/core/api/RowSetBase.cxx
|
|
||||||
@@ -230,11 +230,16 @@ const ORowSetValue& ORowSetBase::impl_getValue(sal_Int32 columnIndex)
|
|
||||||
OSL_ENSURE( pTemp != reinterpret_cast<void*>(0xfeeefeee),"HALT!" );
|
|
||||||
}
|
|
||||||
OSL_ENSURE(!m_aCurrentRow.isNull() && m_aCurrentRow < m_pCache->getEnd() && aCacheIter != m_pCache->m_aCacheIterators.end(),"Invalid iterator set for currentrow!");
|
|
||||||
- ORowSetRow rRow = *m_aCurrentRow;
|
|
||||||
- OSL_ENSURE(rRow.is() && o3tl::make_unsigned(columnIndex) < rRow->size(),"Invalid size of vector!");
|
|
||||||
#endif
|
|
||||||
+ ORowSetRow rRow = *m_aCurrentRow;
|
|
||||||
+ bool bValidPosition = rRow.is() && o3tl::make_unsigned(columnIndex) < rRow->size();
|
|
||||||
+ if (!bValidPosition)
|
|
||||||
+ {
|
|
||||||
+ SAL_WARN("dbaccess", "ORowSetBase::getValue: Invalid size of vector!");
|
|
||||||
+ ::dbtools::throwSQLException( DBA_RES( RID_STR_CURSOR_BEFORE_OR_AFTER ), StandardSQLState::INVALID_CURSOR_POSITION, *m_pMySelf );
|
|
||||||
+ }
|
|
||||||
m_nLastColumnIndex = columnIndex;
|
|
||||||
- return (**m_aCurrentRow)[m_nLastColumnIndex];
|
|
||||||
+ return (*rRow)[m_nLastColumnIndex];
|
|
||||||
}
|
|
||||||
|
|
||||||
// we should normally never reach this
|
|
||||||
--
|
|
||||||
2.28.0
|
|
||||||
|
|
@ -1,74 +0,0 @@
|
|||||||
From e835e268f3140f26987041222c7ed0cdd4bc51a1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
||||||
Date: Thu, 29 Oct 2020 15:45:01 +0000
|
|
||||||
Subject: [PATCH] fix --disable-pdfium build
|
|
||||||
|
|
||||||
Change-Id: I580972220bc39abe16288fa62c717e4ab25833d9
|
|
||||||
---
|
|
||||||
vcl/source/filter/ipdf/pdfread.cxx | 2 +-
|
|
||||||
xmlsecurity/source/pdfio/pdfdocument.cxx | 11 +++++++----
|
|
||||||
2 files changed, 8 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx
|
|
||||||
index 3066c4deba4a..bf11578089e0 100644
|
|
||||||
--- a/vcl/source/filter/ipdf/pdfread.cxx
|
|
||||||
+++ b/vcl/source/filter/ipdf/pdfread.cxx
|
|
||||||
@@ -218,7 +218,7 @@ size_t RenderPDFBitmaps(const void* pBuffer, int nSize, std::vector<Bitmap>& rBi
|
|
||||||
(void)rBitmaps;
|
|
||||||
(void)nFirstPage;
|
|
||||||
(void)nPages;
|
|
||||||
- (void)fResolutionDPI;
|
|
||||||
+ (void)pSizeHint;
|
|
||||||
return 0;
|
|
||||||
#endif // HAVE_FEATURE_PDFIUM
|
|
||||||
}
|
|
||||||
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx b/xmlsecurity/source/pdfio/pdfdocument.cxx
|
|
||||||
index c132d02cc2b0..b229206391f2 100644
|
|
||||||
--- a/xmlsecurity/source/pdfio/pdfdocument.cxx
|
|
||||||
+++ b/xmlsecurity/source/pdfio/pdfdocument.cxx
|
|
||||||
@@ -138,10 +138,10 @@ bool IsCompleteSignature(SvStream& rStream, vcl::filter::PDFDocument& rDocument,
|
|
||||||
return std::find(rAllEOFs.begin(), rAllEOFs.end(), nFileEnd) != rAllEOFs.end();
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if HAVE_FEATURE_PDFIUM
|
|
||||||
/// Collects the checksum of each page of one version of the PDF.
|
|
||||||
void AnalyizeSignatureStream(SvMemoryStream& rStream, std::vector<BitmapChecksum>& rPageChecksums)
|
|
||||||
{
|
|
||||||
-#if HAVE_FEATURE_PDFIUM
|
|
||||||
auto pPdfium = vcl::pdf::PDFiumLibrary::get();
|
|
||||||
vcl::pdf::PDFiumDocument aPdfDocument(
|
|
||||||
FPDF_LoadMemDocument(rStream.GetData(), rStream.GetSize(), /*password=*/nullptr));
|
|
||||||
@@ -158,10 +158,8 @@ void AnalyizeSignatureStream(SvMemoryStream& rStream, std::vector<BitmapChecksum
|
|
||||||
BitmapChecksum nPageChecksum = pPdfPage->getChecksum();
|
|
||||||
rPageChecksums.push_back(nPageChecksum);
|
|
||||||
}
|
|
||||||
-#else
|
|
||||||
- (void)rStream;
|
|
||||||
-#endif
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if incremental updates after singing performed valid modifications only.
|
|
||||||
@@ -175,6 +173,7 @@ bool IsValidSignature(SvStream& rStream, vcl::filter::PDFObjectElement* pSignatu
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if HAVE_FEATURE_PDFIUM
|
|
||||||
SvMemoryStream aSignatureStream;
|
|
||||||
sal_uInt64 nPos = rStream.Tell();
|
|
||||||
rStream.Seek(0);
|
|
||||||
@@ -196,6 +195,10 @@ bool IsValidSignature(SvStream& rStream, vcl::filter::PDFObjectElement* pSignatu
|
|
||||||
// Fail if any page looks different after signing and at the end. Annotations/commenting doesn't
|
|
||||||
// count, though.
|
|
||||||
return aSignedPages == aAllPages;
|
|
||||||
+#else
|
|
||||||
+ (void)rStream;
|
|
||||||
+ return true;
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
|||||||
From 3c19d5bd51673d3ec776ac7b3a4e43137b98b789 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Noel Grandin <noelgrandin@gmail.com>
|
|
||||||
Date: Thu, 20 Aug 2020 21:54:25 +0200
|
|
||||||
Subject: [PATCH] fix unit-test with non-pdfium build
|
|
||||||
|
|
||||||
otherwise testSwappingPageNumber will crash accessing out of
|
|
||||||
bounds element in vector.
|
|
||||||
|
|
||||||
Change-Id: I07499e79d523931e1f3cc02a5150f033e1ea9578
|
|
||||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101094
|
|
||||||
Tested-by: Jenkins
|
|
||||||
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
||||||
(cherry picked from commit 17798a503bc67f2a38f4b558e37447d1ea8f4623)
|
|
||||||
---
|
|
||||||
filter/source/pdf/pdfdecomposer.cxx | 5 ++++-
|
|
||||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/filter/source/pdf/pdfdecomposer.cxx b/filter/source/pdf/pdfdecomposer.cxx
|
|
||||||
index e053fd215369..e54206e4c175 100644
|
|
||||||
--- a/filter/source/pdf/pdfdecomposer.cxx
|
|
||||||
+++ b/filter/source/pdf/pdfdecomposer.cxx
|
|
||||||
@@ -70,7 +70,10 @@ uno::Sequence<uno::Reference<graphic::XPrimitive2D>> SAL_CALL XPdfDecomposer::ge
|
|
||||||
nPageIndex = 0;
|
|
||||||
|
|
||||||
std::vector<Bitmap> aBitmaps;
|
|
||||||
- vcl::RenderPDFBitmaps(xPdfData.getConstArray(), xPdfData.getLength(), aBitmaps, nPageIndex, 1);
|
|
||||||
+ int rv = vcl::RenderPDFBitmaps(xPdfData.getConstArray(), xPdfData.getLength(), aBitmaps,
|
|
||||||
+ nPageIndex, 1);
|
|
||||||
+ if (rv == 0)
|
|
||||||
+ return {}; // happens if we do not have PDFium
|
|
||||||
|
|
||||||
BitmapEx aReplacement(aBitmaps[0]);
|
|
||||||
|
|
||||||
--
|
|
||||||
2.28.0
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
|||||||
From 42c62def5f94ae070ac98bd75e3da1381982ebe7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
||||||
Date: Sun, 25 Oct 2020 20:39:50 +0000
|
|
||||||
Subject: [PATCH] rhbz#1891326 suggest package install of the most appropiate
|
|
||||||
pt langpack
|
|
||||||
|
|
||||||
Change-Id: I87ff1a941a3a5dc0c321440a9c286ae73c9d0384
|
|
||||||
---
|
|
||||||
svtools/source/misc/langhelp.cxx | 12 ++++++++++++
|
|
||||||
1 file changed, 12 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/svtools/source/misc/langhelp.cxx b/svtools/source/misc/langhelp.cxx
|
|
||||||
index e64a3b869076..9f1e84ba4580 100644
|
|
||||||
--- a/svtools/source/misc/langhelp.cxx
|
|
||||||
+++ b/svtools/source/misc/langhelp.cxx
|
|
||||||
@@ -139,6 +139,18 @@ OUString getInstalledLocaleForSystemUILanguage(const css::uno::Sequence<OUString
|
|
||||||
aPackages.emplace_back("libreoffice-langpack-zh-Hans");
|
|
||||||
else if (MsLangId::isTraditionalChinese(eType))
|
|
||||||
aPackages.emplace_back("libreoffice-langpack-zh-Hant");
|
|
||||||
+ else if (install == "pt")
|
|
||||||
+ {
|
|
||||||
+ if (aWantedTag.getCountry().equalsIgnoreAsciiCase("PT"))
|
|
||||||
+ aPackages.emplace_back("libreoffice-langpack-pt-PT");
|
|
||||||
+ else if (aWantedTag.getCountry().equalsIgnoreAsciiCase("BR"))
|
|
||||||
+ aPackages.emplace_back("libreoffice-langpack-pt-BR");
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ aPackages.emplace_back("libreoffice-langpack-pt-PT");
|
|
||||||
+ aPackages.emplace_back("libreoffice-langpack-pt-BR");
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
else
|
|
||||||
aPackages.emplace_back("libreoffice-langpack-" + install);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
Loading…
Reference in new issue