[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/source

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 5 04:39:32 UTC 2019


 vcl/source/filter/graphicfilter.cxx |   30 ++++++++++++++----------------
 1 file changed, 14 insertions(+), 16 deletions(-)

New commits:
commit 36d1d9c826b6a4a82cd4c99aabfe000c5ba89153
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Jun 4 14:20:45 2019 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Wed Jun 5 06:38:49 2019 +0200

    Fix "external" graphic filter code for the DISABLE_DYNLOADING case
    
    The DISABLE_DYNLOADING case in ImpFilterLibCacheEntry::GetImportFunction()
    had apparently been broken from the start, but nobody never noticed as
    the common formats (PNG, JPEG, GIF etc) use a more "internal"code
    path. The problem was noticed now with a TIFF image in a presentation.
    
    The fix for the import case seems to work, but I could not test the
    fix for the export case.
    
    Change-Id: Icbd33c7cb654136a562f18b06d5b0896e701bf3d
    Reviewed-on: https://gerrit.libreoffice.org/73468
    Tested-by: Jenkins
    Reviewed-by: Tor Lillqvist <tml at collabora.com>

diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 1307f31817bf..61c38ec51067 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -721,27 +721,27 @@ PFilterCall ImpFilterLibCacheEntry::GetImportFunction()
         else if (maFormatName == "iti")
             mpfnImport = reinterpret_cast<PFilterCall>(maLibrary.getFunctionSymbol("itiGraphicImport"));
  #else
-        if (maFiltername ==  "icd")
+        if (maFormatName ==  "icd")
             mpfnImport = icdGraphicImport;
-        else if (maFiltername ==  "idx")
+        else if (maFormatName ==  "idx")
             mpfnImport = idxGraphicImport;
-        else if (maFiltername ==  "ime")
+        else if (maFormatName ==  "ime")
             mpfnImport = imeGraphicImport;
-        else if (maFiltername ==  "ipb")
+        else if (maFormatName ==  "ipb")
             mpfnImport = ipbGraphicImport;
-        else if (maFiltername ==  "ipd")
+        else if (maFormatName ==  "ipd")
             mpfnImport = ipdGraphicImport;
-        else if (maFiltername ==  "ips")
+        else if (maFormatName ==  "ips")
             mpfnImport = ipsGraphicImport;
-        else if (maFiltername ==  "ipt")
+        else if (maFormatName ==  "ipt")
             mpfnImport = iptGraphicImport;
-        else if (maFiltername ==  "ipx")
+        else if (maFormatName ==  "ipx")
             mpfnImport = ipxGraphicImport;
-        else if (maFiltername ==  "ira")
+        else if (maFormatName ==  "ira")
             mpfnImport = iraGraphicImport;
-        else if (maFiltername ==  "itg")
+        else if (maFormatName ==  "itg")
             mpfnImport = itgGraphicImport;
-        else if (maFiltername ==  "iti")
+        else if (maFormatName ==  "iti")
             mpfnImport = itiGraphicImport;
  #endif
     }
@@ -1893,9 +1893,7 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r
 
     FilterConfigItem aConfigItem( pFilterData );
     OUString aFilterName( pConfig->GetExportFilterName( nFormat ) );
-#ifndef DISABLE_DYNLOADING
     OUString aExternalFilterName(pConfig->GetExternalFilterName(nFormat, true));
-#endif
     ErrCode     nStatus = ERRCODE_NONE;
     GraphicType eType;
     Graphic     aGraphic = ImpGetScaledGraphic( rGraphic, aConfigItem );
@@ -2187,11 +2185,11 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r
  #else
                 --nIdx; // Just one iteration
                 PFilterCall pFunc = NULL;
-                if (aFilterName == "egi")
+                if (aExternalFilterName == "egi")
                     pFunc = egiGraphicExport;
-                else if (aFilterName == "eps")
+                else if (aExternalFilterName == "eps")
                     pFunc = epsGraphicExport;
-                else if (aFilterName == "eti")
+                else if (aExternalFilterName == "eti")
                     pFunc = etiGraphicExport;
  #endif
                 if( pFunc )


More information about the Libreoffice-commits mailing list