include/vcl/embeddedfontsmanager.hxx  |    3 +++
 svx/source/inc/svdpdf.hxx             |    5 +++++
 svx/source/svdraw/svdpdf.cxx          |   11 +++++++++++
 vcl/source/gdi/embeddedfontsafdko.cxx |    8 ++++++++
 4 files changed, 27 insertions(+)

New commits:
commit 309d9488f150dda97ca8e64cd7f71ecc27c7b880
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Tue Sep 30 15:54:19 2025 +0200
Commit:     Caolán McNamara <[email protected]>
CommitDate: Tue Oct 14 17:14:51 2025 +0200

    Fix --disable-pdfimport builds
    
    ...like the Emscripten one, which started to fail with
    
    > In file included from vcl/source/gdi/embeddedfontsafdko.cxx:18:
    > vcl/source/gdi/afdko.hxx:18:10: fatal error: 'tx_shared.h' file not found
    >    18 | #include <tx_shared.h>
    >       |          ^~~~~~~~~~~~~
    
    after fe9e639b38e6b6a07e0a37e215d1fc75e62e537b "add apis for font format
    conversion and merging"
    
    Change-Id: Ida6d97dbb1ab5ddc204e0421736d9ecf06c98a2f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191669
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    (cherry picked from commit 71ba3817eb8cf2ac55b5c726b1c14e6e7cd597f1)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192337
    Tested-by: Jenkins

diff --git a/include/vcl/embeddedfontsmanager.hxx 
b/include/vcl/embeddedfontsmanager.hxx
index 5fc98cfe6617..537f8e704d05 100644
--- a/include/vcl/embeddedfontsmanager.hxx
+++ b/include/vcl/embeddedfontsmanager.hxx
@@ -13,6 +13,7 @@
 
 #include <com/sun/star/uno/Reference.hxx>
 
+#include <config_features.h>
 #include <rtl/ustring.hxx>
 #include <tools/fontenum.hxx>
 #include <tools/long.hxx>
@@ -117,6 +118,7 @@ public:
 
     static OUString fileUrlForTemporaryFont(std::u16string_view name, 
std::u16string_view suffix);
 
+#if HAVE_FEATURE_PDFIMPORT
     // write text dump
     static bool tx_dump(const OUString& srcFontUrl, const OUString& 
destFileUrl);
     // write Type 1 font
@@ -129,6 +131,7 @@ public:
     static bool makeotf(const OUString& srcFontUrl, const OUString& 
destFileUrl,
                         const OUString& fontMenuNameDBUrl, const OUString& 
charMapUrl,
                         const OUString& featuresUrl);
+#endif
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/inc/svdpdf.hxx b/svx/source/inc/svdpdf.hxx
index 8407df9ccb42..d439b8987987 100644
--- a/svx/source/inc/svdpdf.hxx
+++ b/svx/source/inc/svdpdf.hxx
@@ -25,6 +25,7 @@
 #include <memory>
 #include <map>
 
+#include <config_features.h>
 #include <tools/fract.hxx>
 #include <vcl/virdev.hxx>
 #include <vcl/graph.hxx>
@@ -156,6 +157,8 @@ class ImpSdrPdfImport final
 
     void DoObjects(SvdProgressInfo* pProgrInfo, sal_uInt32* pActionsToReport, 
int nPageIndex);
 
+#if HAVE_FEATURE_PDFIMPORT
+
     void CollectFonts();
 
     static EmbeddedFontInfo convertToOTF(SubSetInfo& rSubSetInfo, const 
OUString& fileUrl,
@@ -163,6 +166,8 @@ class ImpSdrPdfImport final
                                          std::u16string_view fontFileName,
                                          const std::vector<uint8_t>& 
toUnicodeData);
 
+#endif
+
     // Copy assignment is forbidden and not implemented.
     ImpSdrPdfImport(const ImpSdrPdfImport&) = delete;
     ImpSdrPdfImport& operator=(const ImpSdrPdfImport&) = delete;
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 54ea9f87ef02..ee414709cbe6 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -19,6 +19,7 @@
 
 #include <svdpdf.hxx>
 
+#include <config_features.h>
 #include <tools/UnitConversion.hxx>
 #include <vcl/embeddedfontsmanager.hxx>
 #include <vcl/graph.hxx>
@@ -116,7 +117,9 @@ ImpSdrPdfImport::ImpSdrPdfImport(SdrModel& rModel, 
SdrLayerID nLay, const tools:
 
     mnPageCount = mpPdfDocument->getPageCount();
 
+#if HAVE_FEATURE_PDFIMPORT
     CollectFonts();
+#endif
 
     // Same as SdModule
     mpVD = VclPtr<VirtualDevice>::Create();
@@ -137,6 +140,8 @@ ImpSdrPdfImport::ImpSdrPdfImport(SdrModel& rModel, 
SdrLayerID nLay, const tools:
 
 ImpSdrPdfImport::~ImpSdrPdfImport() = default;
 
+#if HAVE_FEATURE_PDFIMPORT
+
 namespace
 {
 OUString GetPostScriptName(const OUString& rBaseFontName)
@@ -301,6 +306,8 @@ void ImpSdrPdfImport::CollectFonts()
     }
 }
 
+#endif
+
 void ImpSdrPdfImport::DoObjects(SvdProgressInfo* pProgrInfo, sal_uInt32* 
pActionsToReport,
                                 int nPageIndex)
 {
@@ -878,6 +885,8 @@ void 
ImpSdrPdfImport::ImportForm(std::unique_ptr<vcl::pdf::PDFiumPageObject> con
     maCurrentMatrix = aOldMatrix;
 }
 
+#if HAVE_FEATURE_PDFIMPORT
+
 static bool extractEntry(std::string_view line, std::string_view key, OString& 
ret)
 {
     std::string_view result;
@@ -1395,6 +1404,8 @@ EmbeddedFontInfo 
ImpSdrPdfImport::convertToOTF(SubSetInfo& rSubSetInfo, const OU
     return EmbeddedFontInfo();
 }
 
+#endif
+
 void ImpSdrPdfImport::ImportText(std::unique_ptr<vcl::pdf::PDFiumPageObject> 
const& pPageObject,
                                  std::unique_ptr<vcl::pdf::PDFiumTextPage> 
const& pTextPage,
                                  int /*nPageObjectIndex*/)
diff --git a/vcl/source/gdi/embeddedfontsafdko.cxx 
b/vcl/source/gdi/embeddedfontsafdko.cxx
index cbac66a0aa38..ca274acb6327 100644
--- a/vcl/source/gdi/embeddedfontsafdko.cxx
+++ b/vcl/source/gdi/embeddedfontsafdko.cxx
@@ -13,6 +13,12 @@
  * This license is available at: http://opensource.org/licenses/Apache-2.0.
  */
 
+#include <sal/config.h>
+
+#include <config_features.h>
+
+#if HAVE_FEATURE_PDFIMPORT
+
 #include <vcl/embeddedfontsmanager.hxx>
 #include <osl/file.hxx>
 #include "afdko.hxx"
@@ -237,4 +243,6 @@ bool EmbeddedFontsManager::makeotf(const OUString& 
srcFontUrl, const OUString& d
     return true;
 }
 
+#endif
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */

Reply via email to