summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-02-23 21:15:28 +0100
committerMiklos Vajna <vmiklos@collabora.com>2021-02-24 08:55:35 +0100
commit32042808aa43b8a45a95ef656987189ec1807f1d (patch)
tree609c4d014d280b14434a4c679a318715f160530a /vcl
parent8c62c2fb88a7a82939ad3b5c7355c93a41b76d5b (diff)
pdfium: move PDFiumLibrary::get() impl out of the header
Otherwise vcl::pdf::PDFium can't be turned into an interface. Change-Id: I9e9030e7e7ed36ec1ed777f017c521fa64588e8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111434 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/pdf/PDFiumLibrary.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx
index 232ed10cb9b6..617ea16cb6eb 100644
--- a/vcl/source/pdf/PDFiumLibrary.cxx
+++ b/vcl/source/pdf/PDFiumLibrary.cxx
@@ -1307,6 +1307,12 @@ int PDFiumSearchHandleImpl::getSearchResultIndex()
int PDFiumSearchHandleImpl::getSearchCount() { return FPDFText_GetSchCount(mpSearchHandle); }
+std::shared_ptr<PDFium>& PDFiumLibrary::get()
+{
+ static auto pInstance = std::make_shared<PDFium>();
+ return pInstance;
+}
+
} // end vcl::pdf
#endif // HAVE_FEATURE_PDFIUM