[Libreoffice-commits] .: 9 commits - cui/source extensions/source setup_native/source UnoControls/source xmlsecurity/workben

Thomas Arnhold tarnhold at kemper.freedesktop.org
Tue Mar 1 23:48:44 PST 2011


 UnoControls/source/base/registercontrols.cxx                      |   51 --
 cui/source/options/optsave.cxx                                    |   56 --
 extensions/source/activex/main/so_activex.cpp                     |    6 
 extensions/source/bibliography/bibmod.cxx                         |    3 
 extensions/source/bibliography/bibprop.hrc                        |    3 
 extensions/source/scanner/sanedlg.cxx                             |   63 ---
 setup_native/source/win32/customactions/regactivex/regactivex.cxx |   55 --
 setup_native/source/win32/customactions/sellang/sellang.cxx       |   48 --
 xmlsecurity/workben/signaturetest.cxx                             |  196 ----------
 9 files changed, 481 deletions(-)

New commits:
commit f6e0b00643e252001768e0b2e19de070654e9afe
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Mar 1 23:22:22 2011 +0100

    Remove TF_SDBAPI

diff --git a/extensions/source/bibliography/bibmod.cxx b/extensions/source/bibliography/bibmod.cxx
index a980928..2db648d 100644
--- a/extensions/source/bibliography/bibmod.cxx
+++ b/extensions/source/bibliography/bibmod.cxx
@@ -112,13 +112,10 @@ STATIC_USTRING(FM_PROP_LABEL,C2U("Label"));
 STATIC_USTRING(FM_PROP_CONTROLSOURCE,C2U("DataField"));
 STATIC_USTRING(FM_PROP_NAME,C2U("Name"));
 STATIC_USTRING(FM_PROP_FORMATKEY,C2U("FormatKey"));
-#ifdef TF_SDBAPI
-#else // !TF_SDBAPI
 STATIC_USTRING(FM_PROP_EDITMODE,C2U("RecordMode"));
 STATIC_USTRING(FM_PROP_CURSORSOURCETYPE,C2U("DataSelectionType"));
 STATIC_USTRING(FM_PROP_CURSORSOURCE,C2U("DataSelection"));
 STATIC_USTRING(FM_PROP_DATASOURCE, C2U("DataSource"));
-#endif // !TF_SDBAPI
 STATIC_USTRING(FM_PROP_VALUE,C2U("Value"));
 STATIC_USTRING(FM_PROP_TEXT,C2U("Text"));
 
diff --git a/extensions/source/bibliography/bibprop.hrc b/extensions/source/bibliography/bibprop.hrc
index 0f24597..7c51ec0 100644
--- a/extensions/source/bibliography/bibprop.hrc
+++ b/extensions/source/bibliography/bibprop.hrc
@@ -32,13 +32,10 @@ extern rtl::OUString FM_PROP_NAME;
 extern rtl::OUString FM_PROP_CONTROLSOURCE;
 extern rtl::OUString FM_PROP_FORMATKEY;
 extern rtl::OUString FM_PROP_VALUE;
-#ifdef TF_SDBAPI
-#else // !TF_SDBAPI
 extern rtl::OUString FM_PROP_EDITMODE;
 extern rtl::OUString FM_PROP_DATASOURCE;
 extern rtl::OUString FM_PROP_CURSORSOURCE;
 extern rtl::OUString FM_PROP_CURSORSOURCETYPE;
-#endif // !TF_SDBAPI
 extern rtl::OUString FM_PROP_TEXT;
 
 #endif // _SVX_FMPROP_HRC
commit 9e16bde5ab7d0333c707a21d2bc3265511ae3fa4
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Mar 1 23:20:34 2011 +0100

    Remove MY_DEBUG

diff --git a/extensions/source/activex/main/so_activex.cpp b/extensions/source/activex/main/so_activex.cpp
index 588056b..9767c61 100644
--- a/extensions/source/activex/main/so_activex.cpp
+++ b/extensions/source/activex/main/so_activex.cpp
@@ -17,8 +17,6 @@
 
 #include <comphelper\documentconstants.hxx>
 
-// #define MY_DEBUG 1
-
 CComModule _Module;
 
 BEGIN_OBJECT_MAP(ObjectMap)
@@ -211,10 +209,6 @@ STDAPI DllRegisterServerNative_Impl( int nMode, BOOL bForAllUsers, REGSAM nKeyAc
     if ( bForAllUsers )
         DllUnregisterServerNative( nMode, sal_False, sal_False );
 
-#ifdef MY_DEBUG
-    MessageBoxA(NULL, pProgramPath, "Library Path, ( from library )", MB_OK | MB_ICONINFORMATION);
-#endif
-
     if ( pProgramPath && strlen( pProgramPath ) < 1024 )
     {
         sprintf( pActiveXPath, "%s\\%s", pProgramPath, pLibName );
commit 29bdb45819bbe5ede48ed8ee4a260493040bc85d
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Mar 1 23:19:09 2011 +0100

    Remove USE_SAVE_STATE

diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index c384c6d..99e07df 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -40,8 +40,6 @@
 #include <math.h>
 #include <sal/macros.h>
 
-#define USE_SAVE_STATE
-
 ResId SaneResId( sal_uInt32 nID )
 {
     static ResMgr* pResMgr = ResMgr::CreateResMgr( "san" );
@@ -1169,7 +1167,6 @@ void SaneDlg::UpdateScanArea( BOOL bSend )
 
 BOOL SaneDlg::LoadState()
 {
-#ifdef USE_SAVE_STATE
     int i;
 
     if( ! Sane::IsSane() )
@@ -1235,14 +1232,10 @@ BOOL SaneDlg::LoadState()
     InitFields();
 
     return TRUE;
-#else
-    return FALSE;
-#endif
 }
 
 void SaneDlg::SaveState()
 {
-#ifdef USE_SAVE_STATE
     if( ! Sane::IsSane() )
         return;
 
@@ -1319,7 +1312,6 @@ void SaneDlg::SaveState()
             }
         }
     }
-#endif
 }
 
 BOOL SaneDlg::SetAdjustedNumericalValue(
commit 241ad440cdd57b112fe1080f93ea960a7b746ec9
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Mar 1 23:18:14 2011 +0100

    Remove SAVE_ALL_STATES

diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 98c6546..c384c6d 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -41,7 +41,6 @@
 #include <sal/macros.h>
 
 #define USE_SAVE_STATE
-#undef  SAVE_ALL_STATES
 
 ResId SaneResId( sal_uInt32 nID )
 {
@@ -1256,59 +1255,6 @@ void SaneDlg::SaveState()
     aConfig.SetGroup( "SANE" );
     aConfig.WriteKey( "SO_LastSANEDevice", ByteString( maDeviceBox.GetSelectEntry(), RTL_TEXTENCODING_UTF8 ) );
 
-#ifdef SAVE_ALL_STATES
-    for( int i = 1; i < mrSane.CountOptions(); i++ )
-    {
-        String aOption=mrSane.GetOptionName( i );
-        SANE_Value_Type nType = mrSane.GetOptionType( i );
-        switch( nType )
-        {
-            case SANE_TYPE_BOOL:
-            {
-                BOOL bValue;
-                if( mrSane.GetOptionValue( i, bValue ) )
-                {
-                    ByteString aString( "BOOL=" );
-                    aString += (ULONG)bValue;
-                    aConfig.WriteKey( aOption, aString );
-                }
-            }
-            break;
-            case SANE_TYPE_STRING:
-            {
-                String aString( "STRING=" );
-                String aValue;
-                if( mrSane.GetOptionValue( i, aValue ) )
-                {
-                    aString += aValue;
-                    aConfig.WriteKey( aOption, aString );
-                }
-            }
-            break;
-            case SANE_TYPE_FIXED:
-            case SANE_TYPE_INT:
-            {
-                String aString( "NUMERIC=" );
-                double fValue;
-                char buf[256];
-                for( int n = 0; n < mrSane.GetOptionElements( i ); n++ )
-                {
-                    if( ! mrSane.GetOptionValue( i, fValue, n ) )
-                        break;
-                    if( n > 0 )
-                        aString += ":";
-                    sprintf( buf, "%lg", fValue );
-                    aString += buf;
-                }
-                if( n >= mrSane.GetOptionElements( i ) )
-                    aConfig.WriteKey( aOption, aString );
-            }
-            break;
-            default:
-                break;
-        }
-     }
-#else
     static char const* pSaveOptions[] = {
         "resolution",
         "tl-x",
@@ -1374,7 +1320,6 @@ void SaneDlg::SaveState()
         }
     }
 #endif
-#endif
 }
 
 BOOL SaneDlg::SetAdjustedNumericalValue(
commit 503391d026671833bd9e2296e18c0f5b8180b868
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Mar 1 23:15:48 2011 +0100

    Remove AS_DBG_SWITCH

diff --git a/UnoControls/source/base/registercontrols.cxx b/UnoControls/source/base/registercontrols.cxx
index b735b9b..8d5e347 100644
--- a/UnoControls/source/base/registercontrols.cxx
+++ b/UnoControls/source/base/registercontrols.cxx
@@ -52,15 +52,6 @@
 //=============================================================================
 
 //______________________________________________________________________________________________________________
-//	defines
-//______________________________________________________________________________________________________________
-
-// If you will debug macros of this file ... you must define follow constant!
-// Ths switch on another macro AS_DBG_OUT(...), which will print text to "stdout".
-
-//#define AS_DBG_SWITCH
-
-//______________________________________________________________________________________________________________
 //	namespaces
 //______________________________________________________________________________________________________________
 
@@ -77,26 +68,16 @@ using namespace ::com::sun::star::registry						;
 //______________________________________________________________________________________________________________
 
 //******************************************************************************************************************************
-// See AS_DBG_SWITCH below !!!
-#ifdef AS_DBG_SWITCH
-    #define AS_DBG_OUT(OUTPUT)	printf( OUTPUT );
-#else
-    #define AS_DBG_OUT(OUTPUT)
-#endif
-
-//******************************************************************************************************************************
 #define	CREATEINSTANCE(CLASS)																												\
                                                                                                                                             \
     static Reference< XInterface > SAL_CALL CLASS##_createInstance ( const Reference< XMultiServiceFactory >& rServiceManager ) throw ( Exception )	\
     {																																		\
-        AS_DBG_OUT ( "\tCREATEINSTANCE():\tOK\n" )																							\
         return Reference< XInterface >( *(OWeakObject*)(new CLASS( rServiceManager )) );													\
     }
 
 //******************************************************************************************************************************
 #define	COMPONENT_INFO(CLASS)																							\
                                                                                                                         \
-    AS_DBG_OUT ( "\tCOMPONENT_INFO():\t[start]\n" )																		\
     try																													\
     {                                                                                               					\
         /* Set default result of follow operations !!! */																\
@@ -105,7 +86,6 @@ using namespace ::com::sun::star::registry						;
         /* Do the follow only, if given key is valid ! */																\
         if ( xKey.is () )                                                                         						\
         {                                                                                           					\
-            AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\txkey is valid ...\n" )													\
             /* Build new keyname */																						\
             sKeyName	 =	OUString(RTL_CONSTASCII_USTRINGPARAM("/"))			;		                   						\
             sKeyName	+=	CLASS::impl_getStaticImplementationName()	;   	                						\
@@ -117,39 +97,31 @@ using namespace ::com::sun::star::registry						;
             /* If this new key valid ... */																				\
             if ( xNewKey.is () )                                                                    					\
             {                                                                                       					\
-                AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\txNewkey is valid ...\n" )											\
                 /* Get information about supported services. */															\
                 seqServiceNames	=	CLASS::impl_getStaticSupportedServiceNames()	;           						\
                 pArray			=	seqServiceNames.getArray()						;           						\
                 nLength			=	seqServiceNames.getLength()						;           						\
                 nCounter		=	0												;           						\
                                                                                                                         \
-                AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\tloop ..." )														\
                 /* Then set this information on this key. */															\
                 for ( nCounter = 0; nCounter < nLength; ++nCounter )                                					\
                 {                                                                                   					\
                     xNewKey->createKey( pArray [nCounter] );                                      						\
                 }                                                                                   					\
-                AS_DBG_OUT ( " OK\n" )																					\
                                                                                                                         \
                 /* Result of this operations = OK. */																	\
                 bReturn = sal_True ;                                                                					\
             }                                                                                       					\
-            AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\t... leave xNewKey\n" )													\
         }                                                                                           					\
-        AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\t... leave xKey\n" )														\
     }                                                                                               					\
     catch( InvalidRegistryException& )                                                             						\
     {                                                                                               					\
-        AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\tInvalidRegistryException detected!!!\n" )									\
         bReturn = sal_False ;                                                                       					\
     }																													\
-    AS_DBG_OUT ( "\tCOMPONENT_INFO():\t[end]\n" )
 
 //******************************************************************************************************************************
 #define	CREATEFACTORY_ONEINSTANCE(CLASS)																				\
                                                                                                                         \
-    AS_DBG_OUT ( "\tCREATEFACTORY_ONEINSTANCE():\t[start]\n" )															\
     /* Create right factory ... */																						\
     xFactory = Reference< XSingleServiceFactory >																		\
                     (																									\
@@ -158,12 +130,10 @@ using namespace ::com::sun::star::registry						;
                                                             CLASS##_createInstance								,		\
                                                             CLASS::impl_getStaticSupportedServiceNames	()	)		\
                     ) ;																									\
-    AS_DBG_OUT ( "\tCREATEFACTORY_ONEINSTANCE():\t[end]\n" )
 
 //******************************************************************************************************************************
 #define	CREATEFACTORY_SINGLE(CLASS)																						\
                                                                                                                         \
-    AS_DBG_OUT ( "\tCREATEFACTORY_SINGLE():\t[start]\n" )																\
     /* Create right factory ... */																						\
     xFactory = Reference< XSingleServiceFactory >																		\
                     (																									\
@@ -172,14 +142,12 @@ using namespace ::com::sun::star::registry						;
                                                         CLASS##_createInstance								,			\
                                                         CLASS::impl_getStaticSupportedServiceNames	()	)			\
                     ) ;																									\
-    AS_DBG_OUT ( "\tCREATEFACTORY_SINGLE():\t[end]\n" )
 
 //******************************************************************************************************************************
 #define	IF_NAME_CREATECOMPONENTFACTORY_ONEINSTANCE(CLASS)																\
                                                                                                                         \
     if ( CLASS::impl_getStaticImplementationName().equals( OUString::createFromAscii( pImplementationName ) ) )		\
     {																													\
-        AS_DBG_OUT ( "\tIF_NAME_CREATECOMPONENTFACTORY_ONEINSTANCE():\timplementationname found\n" )					\
         CREATEFACTORY_ONEINSTANCE ( CLASS )																			\
     }
 
@@ -188,7 +156,6 @@ using namespace ::com::sun::star::registry						;
                                                                                                                         \
     if ( CLASS::impl_getStaticImplementationName().equals( OUString::createFromAscii( pImplementationName ) ) )		\
     {																													\
-        AS_DBG_OUT ( "\tIF_NAME_CREATECOMPONENTFACTORY_SINGLE():\timplementationname found\n" )							\
         CREATEFACTORY_SINGLE ( CLASS )																				\
     }
 
@@ -225,15 +192,11 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(	const	sal_Char*
 extern "C" sal_Bool SAL_CALL component_writeInfo(	void*	/*pServiceManager*/	,
                                                     void*	pRegistryKey	)
 {
-    AS_DBG_OUT ( "component_writeInfo():\t[start]\n" )
-
     // Set default return value for this operation - if it failed.
     sal_Bool bReturn = sal_False ;
 
     if ( pRegistryKey != NULL )
     {
-        AS_DBG_OUT ( "component_writeInfo():\t\tpRegistryKey is valid ... enter scope\n" )
-
         // Define variables for following macros!
         // bReturn is set automaticly.
         Reference< XRegistryKey >		xKey( reinterpret_cast< XRegistryKey* >( pRegistryKey ) )	;
@@ -255,12 +218,8 @@ extern "C" sal_Bool SAL_CALL component_writeInfo(	void*	/*pServiceManager*/	,
         COMPONENT_INFO	( ProgressMonitor	)
         COMPONENT_INFO	( StatusIndicator	)
         //=============================================================================
-
-        AS_DBG_OUT ( "component_writeInfo():\t\t... leave pRegistryKey scope\n" )
     }
 
-    AS_DBG_OUT ( "component_writeInfo():\t[end]\n" )
-
     // Return with result of this operation.
     return bReturn ;
 }
@@ -273,8 +232,6 @@ extern "C" void* SAL_CALL component_getFactory(	const	sal_Char*	pImplementationN
                                                         void*		pServiceManager		,
                                                         void*		/*pRegistryKey*/		)
 {
-    AS_DBG_OUT( "component_getFactory():\t[start]\n" )
-
     // Set default return value for this operation - if it failed.
     void* pReturn = NULL ;
 
@@ -283,8 +240,6 @@ extern "C" void* SAL_CALL component_getFactory(	const	sal_Char*	pImplementationN
             ( pServiceManager		!=	NULL )
         )
     {
-        AS_DBG_OUT( "component_getFactory():\t\t... enter scope - pointer are valid\n" )
-
         // Define variables which are used in following macros.
         Reference< XSingleServiceFactory >	xFactory																		;
         Reference< XMultiServiceFactory >	xServiceManager( reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) )	;
@@ -307,17 +262,11 @@ extern "C" void* SAL_CALL component_getFactory(	const	sal_Char*	pImplementationN
         // Factory is valid - service was found.
         if ( xFactory.is() )
         {
-            AS_DBG_OUT( "component_getFactory():\t\t\t... xFactory valid - service was found\n" )
-
             xFactory->acquire();
             pReturn = xFactory.get();
         }
-
-        AS_DBG_OUT( "component_getFactory():\t\t... leave scope\n" )
     }
 
-    AS_DBG_OUT ( "component_getFactory():\t[end]\n" )
-
     // Return with result of this operation.
     return pReturn ;
 }
commit 4a177c01c81c2277f1a83d1560eb865a557ec78f
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Mar 1 23:11:22 2011 +0100

    Remove TEST_IMPLEMENTATION_DIRECTLY

diff --git a/xmlsecurity/workben/signaturetest.cxx b/xmlsecurity/workben/signaturetest.cxx
index 0e3c6a0..40f6329 100644
--- a/xmlsecurity/workben/signaturetest.cxx
+++ b/xmlsecurity/workben/signaturetest.cxx
@@ -83,9 +83,6 @@ void Main();
 
 #define LISTBOXHEIGHT   120
 
-// #define TEST_IMPLEMENTATION_DIRECTLY
-
-
 // -----------------------------------------------------------------------
 
     SAL_IMPLEMENT_MAIN()
@@ -209,11 +206,7 @@ MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :
     maCryptoCheckBox( this )
 
 {
-#ifdef TEST_IMPLEMENTATION_DIRECTLY
-    Size aOutputSize( 400, 600 );
-#else
     Size aOutputSize( 400, 400 );
-#endif
     SetOutputSizePixel( aOutputSize );
     SetText( String( RTL_CONSTASCII_USTRINGPARAM( "XML Signature Test" ) ) );
 
@@ -244,55 +237,6 @@ MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :
 
     nY += EDITHEIGHT*3;
 
-#ifdef TEST_IMPLEMENTATION_DIRECTLY
-
-    maTest1Line.SetPosSizePixel( TEXTFIELDSTARTX, nY, aOutputSize.Width()-2*TEXTFIELDSTARTX, FIXEDLINEHEIGHT );
-    maTest1Line.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Test simple files" ) ) );
-    maTest1Line.Show();
-
-    nY += EDITHEIGHT*3/2;
-
-    maFixedTextXMLFileName.SetPosSizePixel( TEXTFIELDSTARTX, nY, TEXTFIELDWIDTH, EDITHEIGHT );
-    maFixedTextXMLFileName.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "XML File:" ) ) );
-    maFixedTextXMLFileName.Show();
-
-    maEditXMLFileName.SetPosSizePixel( TEXTFIELDSTARTX+TEXTFIELDWIDTH, nY, EDITWIDTH, EDITHEIGHT );
-    maEditXMLFileName.Show();
-
-    nY += EDITHEIGHT*3/2;
-
-    maFixedTextBINFileName.SetPosSizePixel( TEXTFIELDSTARTX, nY, TEXTFIELDWIDTH, EDITHEIGHT );
-    maFixedTextBINFileName.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Binary File:" ) ) );
-    maFixedTextBINFileName.Show();
-
-    maEditBINFileName.SetPosSizePixel( TEXTFIELDSTARTX+TEXTFIELDWIDTH, nY, EDITWIDTH, EDITHEIGHT );
-    maEditBINFileName.Show();
-
-    nY += EDITHEIGHT*3/2;
-
-    maFixedTextSIGFileName.SetPosSizePixel( TEXTFIELDSTARTX, nY, TEXTFIELDWIDTH, EDITHEIGHT );
-    maFixedTextSIGFileName.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Signature File:" ) ) );
-    maFixedTextSIGFileName.Show();
-
-    maEditSIGFileName.SetPosSizePixel( TEXTFIELDSTARTX+TEXTFIELDWIDTH, nY, EDITWIDTH, EDITHEIGHT );
-    maEditSIGFileName.Show();
-
-    nY += EDITHEIGHT*2;
-
-    maSignButton.SetPosSizePixel( TEXTFIELDSTARTX, nY, BUTTONWIDTH, BUTTONHEIGHT );
-    maSignButton.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Sign" ) ) );
-    maSignButton.SetClickHdl( LINK( this, MyWin, SignButtonHdl ) );
-    maSignButton.Show();
-
-    maVerifyButton.SetPosSizePixel( TEXTFIELDSTARTX+BUTTONWIDTH+BUTTONSPACE, nY, BUTTONWIDTH, BUTTONHEIGHT );
-    maVerifyButton.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Verify" ) ) );
-    maVerifyButton.SetClickHdl( LINK( this, MyWin, VerifyButtonHdl ) );
-    maVerifyButton.Show();
-
-    nY += EDITHEIGHT*3;
-
-#endif // TEST_IMPLEMENTATION_DIRECTLY
-
     maTest2Line.SetPosSizePixel( TEXTFIELDSTARTX, nY, aOutputSize.Width()-2*TEXTFIELDSTARTX, FIXEDLINEHEIGHT );
     maTest2Line.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Test Office Document" ) ) );
     maTest2Line.Show();
@@ -411,144 +355,4 @@ IMPL_LINK( MyWin, VerifyDigitalSignaturesHdl, Button*, EMPTYARG )
     return 0;
 }
 
-
-#ifdef TEST_IMPLEMENTATION_DIRECTLY
-
-IMPL_LINK( MyWin, DigitalSignaturesWithTokenHdl, Button*, EMPTYARG )
-{
-    String aDocFileName = maEditDOCFileName.GetText();
-    String aTokenFileName = maEditTokenName.GetText();
-
-    DigitalSignaturesDialog aSignaturesDialog( this, comphelper::getProcessServiceFactory(), SignatureModeDocumentContent, false );
-
-    bool bInit = aSignaturesDialog.Init( aTokenFileName );
-    if ( !bInit )
-    {
-        ErrorBox( this, WB_OK, String( RTL_CONSTASCII_USTRINGPARAM( "Error initializing security context!" ) ) ).Execute();
-        return 0;
-    }
-
-    uno::Reference < embed::XStorage > xStore = ::comphelper::OStorageHelper::GetStorageFromURL( 
-            aDocFileName, embed::ElementModes::READWRITE, comphelper::getProcessServiceFactory() );
-
-    aSignaturesDialog.SetStorage( xStore );
-
-    aSignaturesDialog.Execute();
-    
-    return 0;
-}
-
-IMPL_LINK( MyWin, SignButtonHdl, Button*, EMPTYARG )
-{
-    String aXMLFileName = maEditXMLFileName.GetText();
-    String aBINFileName = maEditBINFileName.GetText();
-    String aSIGFileName = maEditSIGFileName.GetText();
-
-    String aTokenFileName;
-    if ( !maCryptoCheckBox.IsChecked() )
-        aTokenFileName = maEditTokenName.GetText();
-
-    XMLSignatureHelper aSignatureHelper( comphelper::getProcessServiceFactory() );
-    bool bInit = aSignatureHelper.Init( aTokenFileName );
-
-    if ( !bInit )
-    {
-        ErrorBox( this, WB_OK, String( RTL_CONSTASCII_USTRINGPARAM( "Error initializing security context!" ) ) ).Execute();
-        return 0;
-    }
-
-    uno::Reference< ::com::sun::star::security::XCertificate > xCertToUse;
-    CertificateChooser aChooser( this, aSignatureHelper.GetSecurityEnvironment(), SignatureInformations() );
-    if ( aChooser.Execute() )
-        xCertToUse = aChooser.GetSelectedCertificate();
-
-    if ( !xCertToUse.is() )
-        return 0;
-
-
-    aSignatureHelper.StartMission();
-
-    sal_Int32 nSecurityId = aSignatureHelper.GetNewSecurityId();
-
-    aSignatureHelper.SetX509Certificate( nSecurityId, xCertToUse->getIssuerName(), bigIntegerToNumericString( xCertToUse->getSerialNumber() ) );
-    
-    aSignatureHelper.AddForSigning( nSecurityId, aXMLFileName, aXMLFileName, sal_False );
-    aSignatureHelper.AddForSigning( nSecurityId, aBINFileName, aBINFileName, sal_True );
-    
-    SvFileStream* pStream = new SvFileStream( aSIGFileName, STREAM_WRITE );
-    SvLockBytesRef xLockBytes = new SvLockBytes( pStream, TRUE );
-     uno::Reference< io::XOutputStream > xOutputStream = new utl::OOutputStreamHelper( xLockBytes );
-    bool bDone = aSignatureHelper.CreateAndWriteSignature( xOutputStream );
-    
-    aSignatureHelper.EndMission();
-
-    if ( !bDone )
-    {
-        ErrorBox( this, WB_OK, String( RTL_CONSTASCII_USTRINGPARAM( "Error creating Signature!" ) ) ).Execute();
-    }
-    else
-    {
-        rtl::OUString aInfo( String( RTL_CONSTASCII_USTRINGPARAM( "Signature successfully created!\n\n" ) ) );
-        // aInfo += getSignatureInformationmations( aSignatureHelper.getAllSignatureInformation(), aSignatureHelper.GetSecurityEnvironment() );
-
-                    
-        InfoBox( this, aInfo ).Execute();
-    }
-
-    // Check for more detailed results...
-
-    return 0;
-}
-
-IMPL_LINK( MyWin, VerifyButtonHdl, Button*, EMPTYARG )
-{
-    String aXMLFileName = maEditXMLFileName.GetText();
-    String aBINFileName = maEditBINFileName.GetText();
-    String aSIGFileName = maEditSIGFileName.GetText();
-
-    String aTokenFileName;
-    if ( !maCryptoCheckBox.IsChecked() )
-        aTokenFileName = maEditTokenName.GetText();
-
-    XMLSignatureHelper aSignatureHelper( comphelper::getProcessServiceFactory() );
-    bool bInit = aSignatureHelper.Init( aTokenFileName );
-
-    if ( !bInit )
-    {
-        ErrorBox( this, WB_OK, String( RTL_CONSTASCII_USTRINGPARAM( "Error initializing security context!" ) ) ).Execute();
-        return 0;
-    }
-
-    aSignatureHelper.SetStartVerifySignatureHdl( LINK( this, MyWin, StartVerifySignatureHdl ) );
-
-    aSignatureHelper.StartMission();
-
-    SvFileStream* pStream = new SvFileStream( aSIGFileName, STREAM_READ );
-    pStream->Seek( STREAM_SEEK_TO_END );
-    ULONG nBytes = pStream->Tell();
-    pStream->Seek( STREAM_SEEK_TO_BEGIN );
-    SvLockBytesRef xLockBytes = new SvLockBytes( pStream, TRUE );
-     uno::Reference< io::XInputStream > xInputStream = new utl::OInputStreamHelper( xLockBytes, nBytes );
-    bool bDone = aSignatureHelper.ReadAndVerifySignature( xInputStream );
-    xInputStream->closeInput();
-    
-    aSignatureHelper.EndMission();
-
-    if ( !bDone )
-        ErrorBox( this, WB_OK, String( RTL_CONSTASCII_USTRINGPARAM( "Error in Signature!" ) ) ).Execute();
-    else
-        InfoBox( this, String( RTL_CONSTASCII_USTRINGPARAM( "Signatures verified without any problems!" ) ) ).Execute();
-
-    return 0;
-}
-
-IMPL_LINK( MyWin, StartVerifySignatureHdl, void*, EMPTYARG )
-{
-    QueryBox aQueryBox( this, WB_YES_NO|WB_DEF_YES, String( RTL_CONSTASCII_USTRINGPARAM( "Found Signature - Verify?" ) ) );
-    return ( aQueryBox.Execute() == RET_YES ) ? 1 : 0;
-}
-
-
-#endif // #ifdef TEST_IMPLEMENTATION_DIRECTLY
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit a71b066d80d67edefd8f1bfb68863f2f781f0470
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Mar 1 23:09:54 2011 +0100

    Remove VERBOSE_DEBUG_OUTPUT

diff --git a/setup_native/source/win32/customactions/sellang/sellang.cxx b/setup_native/source/win32/customactions/sellang/sellang.cxx
index 5d36787..e0a775a 100644
--- a/setup_native/source/win32/customactions/sellang/sellang.cxx
+++ b/setup_native/source/win32/customactions/sellang/sellang.cxx
@@ -49,8 +49,6 @@
 #include <sal/macros.h>
 #include <systools/win32/uwinapi.h>
 
-/* #define VERBOSE_DEBUG_OUTPUT 1 */
-
 static const char *
 langid_to_string( LANGID langid, int *have_default_lang )
 {
@@ -195,9 +193,6 @@ present_in_ui_langs(const char *lang)
 
 extern "C" UINT __stdcall SelectLanguage( MSIHANDLE handle )
 {
-#ifdef VERBOSE_DEBUG_OUTPUT
-    char tem[2000];
-#endif
     char feature[100];
     MSIHANDLE database, view, record;
     DWORD length;
@@ -211,20 +206,12 @@ extern "C" UINT __stdcall SelectLanguage( MSIHANDLE handle )
         return ERROR_SUCCESS;
     }
 
-#ifdef VERBOSE_DEBUG_OUTPUT
-    MessageBoxA(NULL, "MsiDatabaseOpenViewA success!", "SelectLanguage", MB_OK);
-#endif
-
     if (MsiViewExecute(view, NULL) != ERROR_SUCCESS) {
         MsiCloseHandle(view);
         MsiCloseHandle(database);
         return ERROR_SUCCESS;
     }
 
-#ifdef VERBOSE_DEBUG_OUTPUT
-    MessageBoxA(NULL, "MsiViewExecute success!", "SelectLanguage", MB_OK);
-#endif
-
     while (nlangs < MAX_LANGUAGES &&
            MsiViewFetch(view, &record) == ERROR_SUCCESS) {
         length = sizeof(feature);
@@ -256,24 +243,8 @@ extern "C" UINT __stdcall SelectLanguage( MSIHANDLE handle )
         const char *system_default_lang = langid_to_string(GetSystemDefaultUILanguage(), &have_system_default_lang);
         const char *user_locale_lang = langid_to_string(LANGIDFROMLCID(GetThreadLocale()), NULL);
 
-#ifdef VERBOSE_DEBUG_OUTPUT
-        sprintf(tem, "GetSystemDefaultUILanguage(): %#x = %s", GetSystemDefaultUILanguage(), system_default_lang);
-        MessageBoxA(NULL, tem, "SelectLanguage", MB_OK);
-#endif
-
         EnumUILanguagesA(enum_ui_lang_proc, 0, 0);
 
-#ifdef VERBOSE_DEBUG_OUTPUT
-        sprintf(tem, "Have %d UI languages: ", num_ui_langs);
-        for (i = 0; i < num_ui_langs; i++) {
-            char *p = tem + strlen(tem);
-            sprintf(p, "%s%s",
-                    ui_langs[i],
-                    (i + 1 < num_ui_langs) ? ", " : "");
-        }
-        MessageBoxA(NULL, tem, "SelectLanguage", MB_OK);
-#endif
-
         /* If one of the alternative languages in a multi-language installer
          * is the system default UI language, deselect those languages that
          * aren't among the UI languages available on the system.
@@ -293,20 +264,12 @@ extern "C" UINT __stdcall SelectLanguage( MSIHANDLE handle )
         if (system_default_lang[0]) {
             for (i = 0; i < nlangs; i++) {
                 if (memcmp (system_default_lang, langs[i], 2) == 0) {
-#ifdef VERBOSE_DEBUG_OUTPUT
-                    sprintf(tem, "We have the system default language %s in the installer", system_default_lang);
-                    MessageBoxA(NULL, tem, "SelectLanguage", MB_OK);
-#endif
                     have_system_default_lang = 1;
                 }
             }
         }
 
         if (!have_system_default_lang) {
-#ifdef VERBOSE_DEBUG_OUTPUT
-            sprintf(tem, "We don't have the system default language %s in the installer, so pretend that English is the system default, sigh.", system_default_lang);
-            MessageBoxA(NULL, tem, "SelectLanguage", MB_OK);
-#endif
             system_default_lang = "en";
             have_system_default_lang = 1;
         }
@@ -318,17 +281,6 @@ extern "C" UINT __stdcall SelectLanguage( MSIHANDLE handle )
                     UINT rc;
                     sprintf(feature, "gm_Langpack_r_%s", langs[i]);
                     rc = MsiSetFeatureStateA(handle, feature, INSTALLSTATE_ABSENT);
-                    if (rc != ERROR_SUCCESS) {
-#ifdef VERBOSE_DEBUG_OUTPUT
-                        sprintf(tem, "MsiSetFeatureStateA %s failed: %d", feature, rc);
-                        MessageBoxA(NULL, tem, "SelectLanguage", MB_OK);
-#endif
-                    } else {
-#ifdef VERBOSE_DEBUG_OUTPUT
-                        sprintf(tem, "MsiSetFeatureStateA %s OK!", feature);
-                        MessageBoxA(NULL, tem, "SelectLanguage", MB_OK);
-#endif
-                    }
                 }
             }
         }
commit d898e6ff0182e3c6274bc7a13f9fa70c3ff6661c
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Mar 1 23:06:57 2011 +0100

    Remove OWN_DEBUG_PRINT

diff --git a/setup_native/source/win32/customactions/regactivex/regactivex.cxx b/setup_native/source/win32/customactions/regactivex/regactivex.cxx
index fa4188b..e3a14e8 100644
--- a/setup_native/source/win32/customactions/regactivex/regactivex.cxx
+++ b/setup_native/source/win32/customactions/regactivex/regactivex.cxx
@@ -47,8 +47,6 @@
 #define WRITER_COMPONENT 16
 #define MATH_COMPONENT 32
 
-// #define OWN_DEBUG_PRINT
-
 typedef int ( __stdcall * DllNativeRegProc ) ( int, BOOL, BOOL, const char* );
 typedef int ( __stdcall * DllNativeUnregProc ) ( int, BOOL, BOOL );
 
@@ -79,22 +77,9 @@ char* UnicodeToAnsiString( wchar_t* pUniString )
     return buff;
 }
 
-#ifdef OWN_DEBUG_PRINT
-void WarningMessageInt( wchar_t* pWarning, unsigned int nValue )
-{
-    wchar_t pStr[5] = { nValue%10000/1000 + 48, nValue%1000/100 + 48, nValue%100/10 + 48, nValue%10 + 48, 0 };
-       MessageBox(NULL, pStr, pWarning, MB_OK | MB_ICONINFORMATION);
-}
-#endif
-
 //----------------------------------------------------------
 void RegisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallForAllUser, BOOL InstallFor64Bit )
 {
-#ifdef OWN_DEBUG_PRINT
-    MessageBoxW(NULL, L"RegisterActiveXNative", L"Information", MB_OK | MB_ICONINFORMATION);
-    MessageBoxA(NULL, pActiveXPath, "Library Path", MB_OK | MB_ICONINFORMATION);
-#endif
-
     // For Win98/WinME the values should be written to the local machine
     OSVERSIONINFO		aVerInfo;
     aVerInfo.dwOSVersionInfoSize = sizeof( aVerInfo );
@@ -107,9 +92,6 @@ void RegisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallFor
         DllNativeRegProc pNativeProc = ( DllNativeRegProc )GetProcAddress( hModule, "DllRegisterServerNative" );
         if( pNativeProc!=NULL )
         {
-#ifdef OWN_DEBUG_PRINT
-            MessageBoxA(NULL, pActiveXPath, "Library Path", MB_OK | MB_ICONINFORMATION);
-#endif
             int nLen = strlen( pActiveXPath );
             int nRemoveLen = strlen( "\\so_activex.dll" );
             if ( nLen > nRemoveLen )
@@ -174,10 +156,6 @@ BOOL GetActiveXControlPath( MSIHANDLE hMSI, char** ppActiveXPath )
     if ( GetMsiProp( hMSI, L"INSTALLLOCATION", &pProgPath ) && pProgPath )
        {
         char* pCharProgPath = UnicodeToAnsiString( pProgPath );
-#ifdef OWN_DEBUG_PRINT
-        MessageBox(NULL, pProgPath, L"Basis Installation Path", MB_OK | MB_ICONINFORMATION);
-        MessageBoxA(NULL, pCharProgPath, "Basis Installation Path( char )", MB_OK | MB_ICONINFORMATION);
-#endif
 
         if ( pCharProgPath )
         {
@@ -211,11 +189,6 @@ BOOL GetDelta( MSIHANDLE hMSI, int& nOldInstallMode, int& nInstallMode, int& nDe
 
     if ( ERROR_SUCCESS == MsiGetFeatureState( hMSI, L"gm_p_Wrt_Bin", &current_state, &future_state ) )
     {
-#ifdef OWN_DEBUG_PRINT
-        WarningMessageInt( L"writer current_state = ", current_state );
-        WarningMessageInt( L"writer future_state = ", future_state );
-#endif
-
         // analyze writer installation mode
         if ( current_state == INSTALLSTATE_LOCAL )
             nOldInstallMode |= WRITER_COMPONENT;
@@ -233,11 +206,6 @@ BOOL GetDelta( MSIHANDLE hMSI, int& nOldInstallMode, int& nInstallMode, int& nDe
 
     if ( ERROR_SUCCESS == MsiGetFeatureState( hMSI, L"gm_p_Calc_Bin", &current_state, &future_state ) )
     {
-#ifdef OWN_DEBUG_PRINT
-        WarningMessageInt( L"calc current_state = ", current_state );
-        WarningMessageInt( L"calc future_state = ", future_state );
-#endif
-
         // analyze calc installation mode
         if ( current_state == INSTALLSTATE_LOCAL )
             nOldInstallMode |= CALC_COMPONENT;
@@ -341,19 +309,11 @@ extern "C" UINT __stdcall InstallActiveXControl( MSIHANDLE hMSI )
     int nInstallMode = 0;
     int nDeinstallMode = 0;
 
-#ifdef OWN_DEBUG_PRINT
-    MessageBox(NULL, L"InstallActiveXControl", L"Information", MB_OK | MB_ICONINFORMATION);
-#endif
-
     INSTALLSTATE current_state;
     INSTALLSTATE future_state;
 
     if ( ERROR_SUCCESS == MsiGetFeatureState( hMSI, L"gm_o_Activexcontrol", &current_state, &future_state ) )
     {
-#ifdef OWN_DEBUG_PRINT
-        MessageBox(NULL, L"InstallActiveXControl Step2", L"Information", MB_OK | MB_ICONINFORMATION);
-#endif
-
         BOOL bInstallForAllUser = MakeInstallForAllUsers( hMSI );
         BOOL bInstallFor64Bit = MakeInstallFor64Bit( hMSI );
 
@@ -361,17 +321,9 @@ extern "C" UINT __stdcall InstallActiveXControl( MSIHANDLE hMSI )
         if ( GetActiveXControlPath( hMSI, &pActiveXPath ) && pActiveXPath
         && GetDelta( hMSI, nOldInstallMode, nInstallMode, nDeinstallMode ) )
         {
-#ifdef OWN_DEBUG_PRINT
-            MessageBox(NULL, L"InstallActiveXControl Step3", L"Information", MB_OK | MB_ICONINFORMATION);
-#endif
-
             if ( future_state == INSTALLSTATE_LOCAL
               || ( current_state == INSTALLSTATE_LOCAL && future_state == INSTALLSTATE_UNKNOWN ) )
             {
-#ifdef OWN_DEBUG_PRINT
-                MessageBox(NULL, L"InstallActiveXControl, adjusting", L"Information", MB_OK | MB_ICONINFORMATION);
-                WarningMessageInt( L"nInstallMode = ", nInstallMode );
-#endif
                 // the control is installed in the new selected configuration
 
                 if ( current_state == INSTALLSTATE_LOCAL && nDeinstallMode )
@@ -382,9 +334,6 @@ extern "C" UINT __stdcall InstallActiveXControl( MSIHANDLE hMSI )
             }
             else if ( current_state == INSTALLSTATE_LOCAL && future_state == INSTALLSTATE_ABSENT )
             {
-#ifdef OWN_DEBUG_PRINT
-                MessageBox(NULL, L"InstallActiveXControl, removing", L"Information", MB_OK | MB_ICONINFORMATION);
-#endif
                 if ( nOldInstallMode )
                     UnregisterActiveXNative( pActiveXPath, nOldInstallMode, bInstallForAllUser, bInstallFor64Bit );
             }
@@ -407,10 +356,6 @@ extern "C" UINT __stdcall DeinstallActiveXControl( MSIHANDLE hMSI )
     INSTALLSTATE current_state;
     INSTALLSTATE future_state;
 
-#ifdef OWN_DEBUG_PRINT
-    MessageBox(NULL, L"DeinstallActiveXControl", L"Information", MB_OK | MB_ICONINFORMATION);
-#endif
-
     if ( ERROR_SUCCESS == MsiGetFeatureState( hMSI, L"gm_o_Activexcontrol", &current_state, &future_state ) )
     {
         char* pActiveXPath = NULL;
commit 6f6316ebb9a9e33e1d8f492083849aad62d0b9f1
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Mar 1 23:04:59 2011 +0100

    Remove FILTER_WARNING_ENABLED

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index d819314..86ef52f 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -103,62 +103,6 @@ void    FilterWarningDialog_Impl::SetFilterName(const String& rFilterUIName)
     aFilterWarningFT.SetText(sTmp);
 }
 // ----------------------------------------------------------------------
-#ifdef FILTER_WARNING_ENABLED
-class SvxAlienFilterWarningConfig_Impl : public utl::ConfigItem
-{
-    sal_Bool bWarning;
-    com::sun::star::uno::Sequence< OUString > aPropNames;
-
-    public:
-        SvxAlienFilterWarningConfig_Impl();
-        ~SvxAlienFilterWarningConfig_Impl();
-
-    virtual void			Commit();
-
-    void                    ResetWarning()
-                            {
-                                if(bWarning)
-                                {
-                                    bWarning = sal_False;
-                                    ConfigItem::SetModified();
-                                }
-
-                            }
-    sal_Bool                IsWarning()const{return bWarning;}
-};
-// ----------------------------------------------------------------------
-SvxAlienFilterWarningConfig_Impl::SvxAlienFilterWarningConfig_Impl() :
-    ConfigItem(C2U("TypeDetection.Misc/Defaults"),
-        CONFIG_MODE_IMMEDIATE_UPDATE),
-    aPropNames(1),
-    bWarning(sal_True)
-{
-    aPropNames.getArray()[0] = C2U("ShowAlienFilterWarning");
-    Sequence<Any> aValues = GetProperties(aPropNames);
-    const Any* pValues = aValues.getConstArray();
-    DBG_ASSERT(aValues.getLength() == aPropNames.getLength(), "GetProperties failed");
-    if(aValues.getLength() == aPropNames.getLength() &&
-        pValues[0].hasValue() &&
-            pValues[0].getValueType() == ::getBooleanCppuType())
-        bWarning = *(sal_Bool*)pValues[0].getValue();
-}
-// ----------------------------------------------------------------------
-SvxAlienFilterWarningConfig_Impl::~SvxAlienFilterWarningConfig_Impl()
-{
-    if(IsModified())
-        Commit();
-}
-// ----------------------------------------------------------------------
-void SvxAlienFilterWarningConfig_Impl::Commit()
-{
-    Sequence<Any> aValues(aPropNames.getLength());
-    Any* pValues = aValues.getArray();
-    pValues[0].setValue(&bWarning, ::getBooleanCppuType());
-    PutProperties(aPropNames, aValues);
-}
-#endif // FILTER_WARNING_ENABLED
-// ----------------------------------------------------------------------
-// ----------------------------------------------------------------------
 
 struct SvxSaveTabPage_Impl
 {


More information about the Libreoffice-commits mailing list