summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-05-31 12:13:59 +0200
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-07-30 15:24:22 +0200
commit8ced05ba5557c66f3d38155b65fabac7dddd321b (patch)
tree65749b4aa67d62cd6f0854a769e95302ebfb2367
parentvcl: VectorGraphicSearch - move SearchContext into Implementation (diff)
downloadcore-8ced05ba5557c66f3d38155b65fabac7dddd321b.tar.gz
core-8ced05ba5557c66f3d38155b65fabac7dddd321b.zip
vcl: use HAVE_FEATURE_PDFIUM in VectorGraphicSearch impl.
Change-Id: Id6c30e8f1c5bdb0481b0c7d4680554e3e8caa323 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95393 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 67f7a26c047ae2878e3ecd76f83af3941b9079c3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95935 Tested-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 8c0776fb005cb99a1f8e289f26173bec9c246585)
-rw-r--r--vcl/source/graphic/VectorGraphicSearch.cxx45
1 files changed, 45 insertions, 0 deletions
diff --git a/vcl/source/graphic/VectorGraphicSearch.cxx b/vcl/source/graphic/VectorGraphicSearch.cxx
index 911c19cebd38..a719329b7708 100644
--- a/vcl/source/graphic/VectorGraphicSearch.cxx
+++ b/vcl/source/graphic/VectorGraphicSearch.cxx
@@ -10,6 +10,10 @@
#include <vcl/VectorGraphicSearch.hxx>
+#include <config_features.h>
+
+#if HAVE_FEATURE_PDFIUM
+
#include <vcl/filter/PDFiumLibrary.hxx>
#include <sal/config.h>
@@ -289,4 +293,45 @@ std::vector<basegfx::B2DRectangle> VectorGraphicSearch::getTextRectangles()
return std::vector<basegfx::B2DRectangle>();
}
+#else // !HAVE_FEATURE_PDFIUM
+
+class VectorGraphicSearch::Implementation
+{
+};
+
+VectorGraphicSearch::VectorGraphicSearch(Graphic const& rGraphic)
+ : maGraphic(rGraphic)
+{
+}
+
+VectorGraphicSearch::~VectorGraphicSearch() {}
+
+bool VectorGraphicSearch::search(OUString const& /*rSearchString*/,
+ SearchStartPosition /*eStartPosition*/)
+{
+ return false;
+}
+
+bool VectorGraphicSearch::searchPDF(std::shared_ptr<VectorGraphicData> const& /*rData*/,
+ OUString const& /*rSearchString*/,
+ SearchStartPosition /*eStartPosition*/)
+{
+ return false;
+}
+
+basegfx::B2DSize VectorGraphicSearch::pageSize() { return basegfx::B2DSize(); }
+
+bool VectorGraphicSearch::next() { return false; }
+
+bool VectorGraphicSearch::previous() { return false; }
+
+int VectorGraphicSearch::index() { return -1; }
+
+std::vector<basegfx::B2DRectangle> VectorGraphicSearch::getTextRectangles()
+{
+ return std::vector<basegfx::B2DRectangle>();
+}
+
+#endif // HAVE_FEATURE_PDFIUM
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */