config_host/config_features.h.in | 6 +++ configure.ac | 1 include/vcl/embeddedfontsmanager.hxx | 3 - include/vcl/task.hxx | 2 - sc/inc/colorscale.hxx | 2 - sc/source/core/data/colorscale.cxx | 2 - sc/source/ui/unoobj/funcuno.cxx | 4 +- slideshow/source/engine/slide/slideanimations.cxx | 2 - slideshow/source/engine/slide/slideanimations.hxx | 2 - svx/source/inc/svdpdf.hxx | 5 -- svx/source/svdraw/svdpdf.cxx | 11 ------ vcl/inc/saltimer.hxx | 2 - vcl/inc/salusereventlist.hxx | 2 - vcl/source/app/salusereventlist.cxx | 2 - vcl/source/app/salvtables.cxx | 2 - vcl/source/app/scheduler.cxx | 2 - vcl/source/gdi/embeddedfontsafdko.cxx | 38 +++++++++++++++++++--- 17 files changed, 53 insertions(+), 35 deletions(-)
New commits: commit 2595f031fa93c1eb89fb4dce6f337de9be813e15 Author: Caolán McNamara <[email protected]> AuthorDate: Fri Oct 17 12:17:50 2025 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Oct 20 15:05:34 2025 +0200 configure afdko as a feature Change-Id: I9282f02e29f59c585f557075da03bbf4b631dcae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192702 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in index 0faa67c64dbd..453594095017 100644 --- a/config_host/config_features.h.in +++ b/config_host/config_features.h.in @@ -7,6 +7,12 @@ #ifndef CONFIG_FEATURES_H #define CONFIG_FEATURES_H +/* AFDKO - Whether to have functionality to convert and merge + * embedded fonts of documents + */ + +#define HAVE_FEATURE_AFDKO 0 + /* AVMEDIA - Whether to have functionality to display and manipulate * embedded AV media in documents */ diff --git a/configure.ac b/configure.ac index bfa4c9ac0ab4..721ffb1e31f1 100644 --- a/configure.ac +++ b/configure.ac @@ -12942,6 +12942,7 @@ if test "$ENABLE_PDFIUM" = "TRUE"; then # which doesn't currently have --with-system support if test "$ENABLE_PDFIMPORT" = "TRUE"; then BUILD_TYPE="$BUILD_TYPE AFDKO" + AC_DEFINE(HAVE_FEATURE_AFDKO) fi fi AC_SUBST(SYSTEM_OPENJPEG2) diff --git a/include/vcl/embeddedfontsmanager.hxx b/include/vcl/embeddedfontsmanager.hxx index dcfa29eb836e..95a3580898f5 100644 --- a/include/vcl/embeddedfontsmanager.hxx +++ b/include/vcl/embeddedfontsmanager.hxx @@ -13,7 +13,6 @@ #include <com/sun/star/uno/Reference.hxx> -#include <config_features.h> #include <rtl/ustring.hxx> #include <tools/fontenum.hxx> #include <tools/long.hxx> @@ -118,7 +117,6 @@ public: static OUString getFileUrlForTemporaryFont(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 @@ -131,7 +129,6 @@ 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 089c0621f535..0209b358e8a8 100644 --- a/svx/source/inc/svdpdf.hxx +++ b/svx/source/inc/svdpdf.hxx @@ -25,7 +25,6 @@ #include <memory> #include <map> -#include <config_features.h> #include <tools/fract.hxx> #include <vcl/virdev.hxx> #include <vcl/graph.hxx> @@ -173,8 +172,6 @@ class ImpSdrPdfImport final void DoObjects(SvdProgressInfo* pProgrInfo, sal_uInt32* pActionsToReport, int nPageIndex); -#if HAVE_FEATURE_PDFIMPORT - void CollectFonts(); sal_Int64 getPrefix() const { return reinterpret_cast<sal_Int64>(this); } @@ -185,8 +182,6 @@ 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 ed25fc3a0c39..0e2e61a78111 100644 --- a/svx/source/svdraw/svdpdf.cxx +++ b/svx/source/svdraw/svdpdf.cxx @@ -19,7 +19,6 @@ #include <svdpdf.hxx> -#include <config_features.h> #include <tools/UnitConversion.hxx> #include <vcl/embeddedfontsmanager.hxx> #include <vcl/graph.hxx> @@ -118,9 +117,7 @@ ImpSdrPdfImport::ImpSdrPdfImport(SdrModel& rModel, SdrLayerID nLay, const tools: mnPageCount = mpPdfDocument->getPageCount(); -#if HAVE_FEATURE_PDFIMPORT CollectFonts(); -#endif // Same as SdModule mpVD = VclPtr<VirtualDevice>::Create(); @@ -141,8 +138,6 @@ ImpSdrPdfImport::ImpSdrPdfImport(SdrModel& rModel, SdrLayerID nLay, const tools: ImpSdrPdfImport::~ImpSdrPdfImport() = default; -#if HAVE_FEATURE_PDFIMPORT - namespace { OUString GetPostScriptName(const OUString& rBaseFontName) @@ -359,8 +354,6 @@ void ImpSdrPdfImport::CollectFonts() } } -#endif - void ImpSdrPdfImport::DoObjects(SvdProgressInfo* pProgrInfo, sal_uInt32* pActionsToReport, int nPageIndex) { @@ -938,8 +931,6 @@ 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; @@ -1724,8 +1715,6 @@ EmbeddedFontInfo ImpSdrPdfImport::convertToOTF(sal_Int64 prefix, SubSetInfo& rSu 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 c067c6e2d10f..a6db3f3fe070 100644 --- a/vcl/source/gdi/embeddedfontsafdko.cxx +++ b/vcl/source/gdi/embeddedfontsafdko.cxx @@ -17,11 +17,12 @@ #include <config_features.h> -#if HAVE_FEATURE_PDFIMPORT - #include <osl/file.hxx> #include <rtl/strbuf.hxx> #include <vcl/embeddedfontsmanager.hxx> + +#if HAVE_FEATURE_AFDKO + #include "afdko.hxx" static bool convertTx(txCtx h) @@ -62,10 +63,12 @@ static bool convertTx(txCtx h) return true; } +#endif // System afdko could be used by calling: tx -dump src dest here bool EmbeddedFontsManager::tx_dump(const OUString& srcFontUrl, const OUString& destFileUrl) { +#if HAVE_FEATURE_AFDKO OUString srcFontPath, destFilePath; if (osl::FileBase::E_None != osl::FileBase::getSystemPathFromFileURL(srcFontUrl, srcFontPath) || osl::FileBase::E_None @@ -89,11 +92,17 @@ bool EmbeddedFontsManager::tx_dump(const OUString& srcFontUrl, const OUString& d bool result = convertTx(h); txFree(h); return result; +#else + (void)srcFontUrl; + (void)destFileUrl; + return false; +#endif } // System afdko could be used by calling: tx -t1 src dest here bool EmbeddedFontsManager::tx_t1(const OUString& srcFontUrl, const OUString& destFileUrl) { +#if HAVE_FEATURE_AFDKO OUString srcFontPath, destFilePath; if (osl::FileBase::E_None != osl::FileBase::getSystemPathFromFileURL(srcFontUrl, srcFontPath) || osl::FileBase::E_None @@ -116,12 +125,18 @@ bool EmbeddedFontsManager::tx_t1(const OUString& srcFontUrl, const OUString& des bool result = convertTx(h); txFree(h); return result; +#else + (void)srcFontUrl; + (void)destFileUrl; + return false; +#endif } // System afdko could be used by calling: mergefonts -cid cidfontinfo destfile [glyphaliasfile mergefontfile]+ here bool EmbeddedFontsManager::mergefonts(const OUString& cidFontInfoUrl, const OUString& destFileUrl, const std::vector<std::pair<OUString, OUString>>& fonts) { +#if HAVE_FEATURE_AFDKO OUString cidFontInfoPath, destFilePath; if (osl::FileBase::E_None != osl::FileBase::getSystemPathFromFileURL(cidFontInfoUrl, cidFontInfoPath) @@ -192,8 +207,15 @@ bool EmbeddedFontsManager::mergefonts(const OUString& cidFontInfoUrl, const OUSt rename(tmpdestfile.getStr(), destFilePathA.getStr()); return result; +#else + (void)cidFontInfoUrl; + (void)destFileUrl; + (void)fonts; + return false; +#endif } +#if HAVE_FEATURE_AFDKO static void* cb_memory(ctlMemoryCallbacks* /*cb*/, void* old, size_t size) { if (size == 0) @@ -207,12 +229,14 @@ static void* cb_memory(ctlMemoryCallbacks* /*cb*/, void* old, size_t size) return malloc(size); } +#endif // System afdko could be used by calling: makeotf[exe] -mf fontMenuNameDB -f srcFont -o destFile -ch charMap [-ff features] bool EmbeddedFontsManager::makeotf(const OUString& srcFontUrl, const OUString& destFileUrl, const OUString& fontMenuNameDBUrl, const OUString& charMapUrl, const OUString& featuresUrl) { +#if HAVE_FEATURE_AFDKO OUString srcFontPath, destFilePath, charMapPath, fontMenuNameDBPath, featuresPath; if (osl::FileBase::E_None != osl::FileBase::getSystemPathFromFileURL(srcFontUrl, srcFontPath) || osl::FileBase::E_None @@ -267,8 +291,14 @@ bool EmbeddedFontsManager::makeotf(const OUString& srcFontUrl, const OUString& d nullptr, nullptr, 0, 0, 0, 0, 0, -1, -1, 0, nullptr); return true; -} - +#else + (void)srcFontUrl; + (void)destFileUrl; + (void)fontMenuNameDBUrl; + (void)charMapUrl; + (void)featuresUrl; + return false; #endif +} /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ commit 10b7bed6f32cd9fb051e1ef560fa012df2b0c6fc Author: Caolán McNamara <[email protected]> AuthorDate: Sun Oct 12 17:21:26 2025 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Oct 20 15:05:25 2025 +0200 drop some more COVERITY stuff Change-Id: Ieb15457e53a1cb68e71aea6be20a72e35f367588 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192701 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/include/vcl/task.hxx b/include/vcl/task.hxx index f7913d66e96b..c8f79a3cc382 100644 --- a/include/vcl/task.hxx +++ b/include/vcl/task.hxx @@ -75,7 +75,7 @@ protected: public: Task( const char *pDebugName ); Task( const Task& rTask ); - virtual ~Task() COVERITY_NOEXCEPT_FALSE; + virtual ~Task(); Task& operator=( const Task& rTask ); void SetPriority(TaskPriority ePriority); diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx index 20a3d623f428..cd42c67b6513 100644 --- a/sc/inc/colorscale.hxx +++ b/sc/inc/colorscale.hxx @@ -61,7 +61,7 @@ public: SC_DLLPUBLIC ScColorScaleEntry(); ScColorScaleEntry(const ScColorScaleEntry& rEntry); ScColorScaleEntry(ScDocument& rDoc, const ScColorScaleEntry& rEntry); - SC_DLLPUBLIC ~ScColorScaleEntry() COVERITY_NOEXCEPT_FALSE; + SC_DLLPUBLIC ~ScColorScaleEntry(); const Color& GetColor() const { return maColor;} void SetColor(const Color&); diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index 15b424591d03..5891c10566f1 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -209,7 +209,7 @@ void ScColorScaleEntry::ImplDestroy() mpCell->EndListeningTo(mpCell->GetDocument()); } -ScColorScaleEntry::~ScColorScaleEntry() COVERITY_NOEXCEPT_FALSE +ScColorScaleEntry::~ScColorScaleEntry() { suppress_fun_call_w_exception(ImplDestroy()); } diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx index 40628e0ea1fe..3998ecb3a104 100644 --- a/sc/source/ui/unoobj/funcuno.cxx +++ b/sc/source/ui/unoobj/funcuno.cxx @@ -70,7 +70,7 @@ private: public: explicit ScTempDocSource( ScTempDocCache& rDocCache ); - ~ScTempDocSource() COVERITY_NOEXCEPT_FALSE; + ~ScTempDocSource(); ScDocument* GetDocument(); }; @@ -97,7 +97,7 @@ ScTempDocSource::ScTempDocSource( ScTempDocCache& rDocCache ) : } } -ScTempDocSource::~ScTempDocSource() COVERITY_NOEXCEPT_FALSE +ScTempDocSource::~ScTempDocSource() { if ( !pTempDoc ) rCache.SetInUse( false ); diff --git a/slideshow/source/engine/slide/slideanimations.cxx b/slideshow/source/engine/slide/slideanimations.cxx index 224256c43379..b574b62d284a 100644 --- a/slideshow/source/engine/slide/slideanimations.cxx +++ b/slideshow/source/engine/slide/slideanimations.cxx @@ -38,7 +38,7 @@ namespace slideshow::internal "SlideAnimations::SlideAnimations(): Invalid SlideShowContext" ); } - SlideAnimations::~SlideAnimations() COVERITY_NOEXCEPT_FALSE + SlideAnimations::~SlideAnimations() { if( !mpRootNode ) return; diff --git a/slideshow/source/engine/slide/slideanimations.hxx b/slideshow/source/engine/slide/slideanimations.hxx index ab1a1815d89a..47faead82863 100644 --- a/slideshow/source/engine/slide/slideanimations.hxx +++ b/slideshow/source/engine/slide/slideanimations.hxx @@ -49,7 +49,7 @@ namespace slideshow::internal */ SlideAnimations( SlideShowContext aContext, const ::basegfx::B2DVector& rSlideSize ); - ~SlideAnimations() COVERITY_NOEXCEPT_FALSE; + ~SlideAnimations(); /** Import animations from a SMIL root animation node. diff --git a/vcl/inc/saltimer.hxx b/vcl/inc/saltimer.hxx index 3cdb47777139..5b4d1ad8eedc 100644 --- a/vcl/inc/saltimer.hxx +++ b/vcl/inc/saltimer.hxx @@ -35,7 +35,7 @@ class VCL_PLUGIN_PUBLIC SalTimer public: SalTimer() : m_pProc( nullptr ) {} - virtual ~SalTimer() COVERITY_NOEXCEPT_FALSE; + virtual ~SalTimer(); // AutoRepeat and Restart virtual void Start( sal_uInt64 nMS ) = 0; diff --git a/vcl/inc/salusereventlist.hxx b/vcl/inc/salusereventlist.hxx index f4d26a75b412..f857477a2e54 100644 --- a/vcl/inc/salusereventlist.hxx +++ b/vcl/inc/salusereventlist.hxx @@ -70,7 +70,7 @@ protected: inline bool HasUserEvents_NoLock() const; public: SalUserEventList(); - virtual ~SalUserEventList() COVERITY_NOEXCEPT_FALSE; + virtual ~SalUserEventList(); inline const SalFrameSet& getFrames() const; inline SalFrame* anyFrame() const; diff --git a/vcl/source/app/salusereventlist.cxx b/vcl/source/app/salusereventlist.cxx index c677ff56a411..960310266fd8 100644 --- a/vcl/source/app/salusereventlist.cxx +++ b/vcl/source/app/salusereventlist.cxx @@ -38,7 +38,7 @@ SalUserEventList::SalUserEventList() { } -SalUserEventList::~SalUserEventList() COVERITY_NOEXCEPT_FALSE +SalUserEventList::~SalUserEventList() { } diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 813b7ceb78e0..9ce9f2f64e8a 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -180,7 +180,7 @@ void SalInstance::DoQuit() std::abort(); } -SalTimer::~SalTimer() COVERITY_NOEXCEPT_FALSE {} +SalTimer::~SalTimer() {} void SalBitmap::DropScaledCache() { diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx index 73a9f1388044..31f53de9ddfa 100644 --- a/vcl/source/app/scheduler.cxx +++ b/vcl/source/app/scheduler.cxx @@ -787,7 +787,7 @@ Task::Task( const Task& rTask ) Start(); } -Task::~Task() COVERITY_NOEXCEPT_FALSE +Task::~Task() { if ( !IsStatic() ) {
