[Libreoffice-commits] .: 4 commits - sal/osl sd/source svtools/inc svtools/source vcl/source

Thomas Arnhold tarnhold at kemper.freedesktop.org
Sat Feb 18 16:35:12 PST 2012


 sal/osl/w32/nlsupport.c              |   16 ++++++++--------
 sal/osl/w32/security.c               |    1 -
 sd/source/filter/grf/sdgrffilter.cxx |    4 ----
 svtools/inc/svtools/filter.hxx       |    3 ---
 svtools/source/filter/filter.cxx     |   30 ------------------------------
 vcl/source/gdi/pngread.cxx           |    7 -------
 vcl/source/gdi/pngwrite.cxx          |    6 ------
 7 files changed, 8 insertions(+), 59 deletions(-)

New commits:
commit c08308508aec99652256be333990ad9cd4e62dba
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sun Feb 19 00:28:56 2012 +0100

    WaE: unused variable bOk

diff --git a/sal/osl/w32/security.c b/sal/osl/w32/security.c
index 29e5047..29f35a1 100644
--- a/sal/osl/w32/security.c
+++ b/sal/osl/w32/security.c
@@ -646,7 +646,6 @@ void SAL_CALL osl_unloadUserProfile(oslSecurity Security)
         HMODULE                 hUserEnvLib         = NULL;
         LPFNLOADUSERPROFILE     fLoadUserProfile    = NULL;
         LPFNUNLOADUSERPROFILE   fUnloadUserProfile  = NULL;
-        BOOL                    bOk                 = FALSE;
         HANDLE                  hAccessToken        = ((oslSecurityImpl*)Security)->m_hToken;
 
         if ( !hAccessToken )
commit 7ad3c6caae954a121985a142b35cf0b96fbf0b53
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sun Feb 19 00:22:30 2012 +0100

    WaE: do this right...

diff --git a/sal/osl/w32/nlsupport.c b/sal/osl/w32/nlsupport.c
index c974409..9a4ec7d 100644
--- a/sal/osl/w32/nlsupport.c
+++ b/sal/osl/w32/nlsupport.c
@@ -51,14 +51,14 @@ struct EnumLocalesParams
 
 static DWORD g_dwTLSLocaleEncId = (DWORD) -1;
 
-/*****************************************************************************/
+/*****************************************************************************
  * callback function test
  *
  * osl_getTextEncodingFromLocale calls EnumSystemLocalesA, so that we don't
  * need to provide a unicode wrapper for this function under Win9x
  * that means the callback function has an ansi prototype and receives
  * the locale strings as ansi strings
-/*****************************************************************************/
+ *****************************************************************************/
 
 BOOL CALLBACK EnumLocalesProcA( LPSTR lpLocaleStringA )
 {
@@ -123,9 +123,9 @@ BOOL CALLBACK EnumLocalesProcA( LPSTR lpLocaleStringA )
 }
 
 
-/*****************************************************************************/
+/*****************************************************************************
  * GetTextEncodingFromLCID
-/*****************************************************************************/
+ *****************************************************************************/
 
 rtl_TextEncoding GetTextEncodingFromLCID( LCID localeId )
 {
@@ -155,9 +155,9 @@ rtl_TextEncoding GetTextEncodingFromLCID( LCID localeId )
 }
 
 
-/*****************************************************************************/
+/*****************************************************************************
  * osl_getTextEncodingFromLocale
-/*****************************************************************************/
+ *****************************************************************************/
 
 rtl_TextEncoding SAL_CALL osl_getTextEncodingFromLocale( rtl_Locale * pLocale )
 {
@@ -202,9 +202,9 @@ rtl_TextEncoding SAL_CALL osl_getTextEncodingFromLocale( rtl_Locale * pLocale )
     return RTL_TEXTENCODING_DONTKNOW;
 }
 
-/*****************************************************************************/
+/*****************************************************************************
  * imp_getProcessLocale
-/*****************************************************************************/
+ *****************************************************************************/
 
 void _imp_getProcessLocale( rtl_Locale ** ppLocale )
 {
commit 7e116943f1578a614b14132b02e89771240f4259
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat Feb 18 23:08:49 2012 +0100

    pngread: remove some unused defines

diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index 9837537..a85a8ec 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -49,16 +49,9 @@
 #define PNGCHUNK_IDAT       0x49444154
 #define PNGCHUNK_IEND       0x49454e44
 #define PNGCHUNK_bKGD       0x624b4744
-#define PNGCHUNK_cHRM       0x6348524d
 #define PNGCHUNK_gAMA       0x67414d41
-#define PNGCHUNK_hIST       0x68495354
 #define PNGCHUNK_pHYs       0x70485973
-#define PNGCHUNK_sBIT       0x73425420
-#define PNGCHUNK_tIME       0x74494d45
-#define PNGCHUNK_tEXt       0x74455874
 #define PNGCHUNK_tRNS       0x74524e53
-#define PNGCHUNK_zTXt       0x7a545874
-#define PMGCHUNG_msOG       0x6d734f47      // Microsoft Office Animated GIF
 
 #define VIEWING_GAMMA       2.35
 #define DISPLAY_GAMMA       1.0
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index bc25105..3e828da 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -52,15 +52,9 @@
 #define PNGCHUNK_IDAT 0x49444154
 #define PNGCHUNK_IEND 0x49454e44
 #define PNGCHUNK_bKGD 0x624b4744
-#define PNGCHUNK_cHRM 0x6348524d
 #define PNGCHUNK_gAMA 0x67414d41
-#define PNGCHUNK_hIST 0x68495354
 #define PNGCHUNK_pHYs 0x70485973
-#define PNGCHUNK_sBIT 0x73425420
-#define PNGCHUNK_tIME 0x74494d45
-#define PNGCHUNK_tEXt 0x74455874
 #define PNGCHUNK_tRNS 0x74524e53
-#define PNGCHUNK_zTXt 0x7a545874
 
 namespace vcl
 {
commit e51aca1fa61f2e433da2185e53e9be982f50eb74
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat Feb 18 22:55:00 2012 +0100

    svtools: Remove obsolete GraphicFilter::{Do,Has}ImportDialog
    
    And simplify sdgrffilter because this if is always true.

diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index 48d46ab..4f50f37 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -210,9 +210,6 @@ sal_Bool SdGRFFilter::Import()
     const sal_uInt16 nFilter = rGraphicFilter.GetImportFormatNumberForTypeName( mrMedium.GetFilter()->GetTypeName() );
     sal_Bool        bRet = sal_False;
 
-    // ggf. Filterdialog ausfuehren
-    if ( !rGraphicFilter.HasImportDialog( nFilter ) || rGraphicFilter.DoImportDialog( NULL, nFilter ) )
-    {
         SvStream*       pIStm = mrMedium.GetInStream();
         sal_uInt16          nReturn = pIStm ? rGraphicFilter.ImportGraphic( aGraphic, aFileName, *pIStm, nFilter ) : 1;
 
@@ -259,7 +256,6 @@ sal_Bool SdGRFFilter::Import()
             pPage->InsertObject( new SdrGrafObj( aGraphic, Rectangle( aPos, aGrfSize ) ) );
             bRet = sal_True;
         }
-    }
     return bRet;
 }
 
diff --git a/svtools/inc/svtools/filter.hxx b/svtools/inc/svtools/filter.hxx
index ce530b5..526ef93 100644
--- a/svtools/inc/svtools/filter.hxx
+++ b/svtools/inc/svtools/filter.hxx
@@ -316,9 +316,6 @@ public:
     String          GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry = 0 );
     sal_Bool            IsExportPixelFormat( sal_uInt16 nFormat );
 
-    sal_Bool            HasImportDialog( sal_uInt16 nFormat );
-    sal_Bool            DoImportDialog( Window* pWindow, sal_uInt16 nFormat );
-
     sal_Bool            HasExportDialog( sal_uInt16 nFormat );
     sal_Bool            DoExportDialog( Window* pWindow, sal_uInt16 nFormat );
     sal_Bool            DoExportDialog( Window* pWindow, sal_uInt16 nFormat, FieldUnit eFieldUnit );
diff --git a/svtools/source/filter/filter.cxx b/svtools/source/filter/filter.cxx
index ee1f329..dce88f4 100644
--- a/svtools/source/filter/filter.cxx
+++ b/svtools/source/filter/filter.cxx
@@ -26,7 +26,6 @@
  *
  ************************************************************************/
 
-
 #include <osl/mutex.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/string.hxx>
@@ -77,8 +76,6 @@
 
 #define IMPORT_FUNCTION_NAME    "GraphicImport"
 #define EXPORT_FUNCTION_NAME    "GraphicExport"
-#define IMPDLG_FUNCTION_NAME    "DoImportDialog"
-#define EXPDLG_FUNCTION_NAME    "DoExportDialog"
 
 // -----------
 // - statics -
@@ -926,9 +923,6 @@ struct ImpFilterLibCacheEntry
     int                     operator==( const String& rFiltername ) const { return maFiltername == rFiltername; }
 
     PFilterCall             GetImportFunction();
-    PFilterDlgCall          GetImportDlgFunction();
-    PFilterCall             GetExportFunction() { return (PFilterCall) maLibrary.getFunctionSymbol( UniString::CreateFromAscii( EXPORT_FUNCTION_NAME ) ); }
-    PFilterDlgCall          GetExportDlgFunction() { return (PFilterDlgCall) maLibrary.getFunctionSymbol( UniString::CreateFromAscii( EXPDLG_FUNCTION_NAME ) ); }
 };
 
 // ------------------------------------------------------------------------
@@ -954,14 +948,6 @@ PFilterCall ImpFilterLibCacheEntry::GetImportFunction()
 
 // ------------------------------------------------------------------------
 
-PFilterDlgCall ImpFilterLibCacheEntry::GetImportDlgFunction()
-{
-    if( !mpfnImportDlg )
-        mpfnImportDlg = (PFilterDlgCall)maLibrary.getFunctionSymbol( UniString::CreateFromAscii( IMPDLG_FUNCTION_NAME ) );
-
-    return mpfnImportDlg;
-}
-
 // ---------------------
 // - ImpFilterLibCache -
 // ---------------------
@@ -2094,22 +2080,6 @@ sal_Bool GraphicFilter::Setup( sal_uInt16 )
     return sal_False;
 }
 
-/* ------------------------------------------------------------------------
-    No Import filter has a dialog, so
-   the following two methods are obsolete */
-
-sal_Bool GraphicFilter::HasImportDialog( sal_uInt16 )
-{
-    return sal_True;
-}
-
-// ------------------------------------------------------------------------
-
-sal_Bool GraphicFilter::DoImportDialog( Window*, sal_uInt16 )
-{
-    return sal_True;
-}
-
 // ------------------------------------------------------------------------
 
 sal_Bool GraphicFilter::HasExportDialog( sal_uInt16 nFormat )


More information about the Libreoffice-commits mailing list