[Libreoffice-commits] .: 2 commits - basic/source

Joseph Powers jpowers at kemper.freedesktop.org
Thu Dec 16 06:07:48 PST 2010


 basic/source/app/app.cxx     |    6 +++---
 basic/source/app/appwin.cxx  |   12 ++++++------
 basic/source/app/dialogs.cxx |   24 +++++++++++-------------
 basic/source/app/dialogs.hxx |    9 +++------
 basic/source/app/process.cxx |    9 +--------
 5 files changed, 24 insertions(+), 36 deletions(-)

New commits:
commit 507695b80ce431cd292277fbf11ba35660c6aaba
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Thu Dec 16 06:01:26 2010 -0800

    Remove DECLARE_LIST( StringList, String * )

diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx
index 70759b8..73c9e15 100644
--- a/basic/source/app/app.cxx
+++ b/basic/source/app/app.cxx
@@ -154,20 +154,20 @@ void TestToolDebugMessageFilter( const sal_Char *pString, BOOL bIsOsl )
             printf("DbgPrintMsgBox failed: %s\n", pString );
         }
     }
-/*    DBG_INSTOUTERROR( DBG_OUT_MSGBOX )
-    DBG_ERROR( pString );
-    DBG_INSTOUTERROR( DBG_OUT_TESTTOOL )*/
     static_bInsideFilter = FALSE;
 }
+
 void SAL_CALL DBG_TestToolDebugMessageFilter( const sal_Char *pString )
 {
         TestToolDebugMessageFilter( pString, FALSE );
 }
+
 extern "C" void SAL_CALL osl_TestToolDebugMessageFilter( const sal_Char *pString )
 {
     if ( !getenv( "DISABLE_SAL_DBGBOX" ) )
         TestToolDebugMessageFilter( pString, TRUE );
 }
+
 #endif
 
 // #94145# Due to a tab in TT_SIGNATURE_FOR_UNICODE_TEXTFILES which is changed to blanks by some editors
diff --git a/basic/source/app/appwin.cxx b/basic/source/app/appwin.cxx
index 0d393af..25dd2f1 100644
--- a/basic/source/app/appwin.cxx
+++ b/basic/source/app/appwin.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -188,14 +188,14 @@ void AppWin::RequestHelp( const HelpEvent& )
 void AppWin::Help()
 {
   String s = pDataEdit->GetSelected();
-  if( s.Len() > 0 ) 
+  if( s.Len() > 0 )
   {
     // Trim leading whitespaces
-    while( s.GetChar(0) == ' ' ) 
+    while( s.GetChar(0) == ' ' )
       s.Erase( 0, 1 );
 //		aBasicApp.pHelp->Start( s );
-  } 
-  else 
+  }
+  else
   {
 //		aBasicApp.pHelp->Start( OOO_HELP_INDEX );
   }
@@ -317,7 +317,7 @@ void AppWin::Command( const CommandEvent& rCEvt )
         case RID_EDITPASTE:
             {
                 ::rtl::OUString aTemp;
-                if( ::svt::OStringTransfer::PasteString( aTemp, this ) ) 
+                if( ::svt::OStringTransfer::PasteString( aTemp, this ) )
                     pDataEdit->Paste();
             }
             break;
diff --git a/basic/source/app/dialogs.cxx b/basic/source/app/dialogs.cxx
index c55b4dd..cf5cfe2 100644
--- a/basic/source/app/dialogs.cxx
+++ b/basic/source/app/dialogs.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -314,7 +314,7 @@ IMPL_LINK( OptionsDialog, ActivatePageHdl, TabControl *, pTabCtrl )
 
 IMPL_LINK( OptionsDialog, OKClick, Button *, pButton )
 {
-    (void) pButton; /* avoid warning about unused parameter */ 
+    (void) pButton; /* avoid warning about unused parameter */
     aConfig.EnablePersistence();
     GenericOptions *pGeneric;
     pGeneric = (GenericOptions*)aTabCtrl.GetTabPage( RID_TP_GEN );
@@ -468,7 +468,7 @@ IMPL_LINK( ProfileOptions, NewProfile, Button*, EMPTYARG )
 
 IMPL_LINK( ProfileOptions, CheckButtonsHdl, ComboBox*, pCB )
 {
-    (void) pCB; /* avoid warning about unused parameter */ 
+    (void) pCB; /* avoid warning about unused parameter */
     CheckButtons( aCbProfile, aPbNewProfile, aPbDelProfile );
     return 0;
 }
@@ -792,7 +792,7 @@ StringList* GenericOptions::GetAllGroups()
     for ( USHORT i = 0 ; i < aConf.GetGroupCount() ; i++ )
     {
         String *pGroup = new String( aConf.GetGroupName( i ), RTL_TEXTENCODING_UTF8 );
-        pGroups->Insert( pGroup );
+        pGroups->push_back( pGroup );
     }
     return pGroups;
 }
@@ -800,19 +800,17 @@ StringList* GenericOptions::GetAllGroups()
 void GenericOptions::LoadData()
 {
     StringList* pGroups = GetAllGroups();
-    String* pGroup;
-    while ( (pGroup = pGroups->First()) != NULL )
+    for ( size_t i = 0, n = pGroups->size(); i < n; ++i )
     {
-        pGroups->Remove( pGroup );
+        String* pGroup = pGroups->at( i );
         aConf.SetGroup( ByteString( *pGroup, RTL_TEXTENCODING_UTF8 ) );
         if ( aConf.ReadKey( C_KEY_AKTUELL ).Len() > 0 )
-        {
             aCbArea.InsertEntry( *pGroup );
-        }
         delete pGroup;
     }
+    pGroups->clear();
     delete pGroups;
-    aCbArea.SetText( aCbArea.GetEntry( 0 ) );
+        aCbArea.SetText( aCbArea.GetEntry( 0 ) );
     CheckButtons( aCbArea, aPbNewArea, aPbDelArea );
 
     // Add load the data
@@ -993,7 +991,7 @@ IMPL_LINK( GenericOptions, CheckButtonsHdl, ComboBox*, pCB )
 
 void GenericOptions::Save( Config &aConfig )
 {
-    (void) aConfig; /* avoid warning about unused parameter */ 
+    (void) aConfig; /* avoid warning about unused parameter */
     DBG_ASSERT( &aConfig == &aConf, "Saving to different Configuration" );
 
     // Save changes
@@ -1386,7 +1384,7 @@ VarEditDialog::VarEditDialog( Window * pParent, SbxVariable *pPVar )
 
 IMPL_LINK( VarEditDialog, OKClick, Button *, pButton )
 {
-    (void) pButton; /* avoid warning about unused parameter */ 
+    (void) pButton; /* avoid warning about unused parameter */
     BOOL bWasError = SbxBase::IsError();	// Probably an error is thrown
 
 
@@ -1416,7 +1414,7 @@ SvNumberformat::
                                 int& nErrno,
                                 const xub_Unicode** ppEnd = NULL );
     // Converts just as strtod a decimal string to a double.
-    // Decimal and thousand separators come from International, 
+    // Decimal and thousand separators come from International,
     // leading spaces are omitted.
     // If ppEnd!=NULL then *ppEnd is set after the parsed data.
     // If pStr contains only the String to be parsed, then if success:
diff --git a/basic/source/app/dialogs.hxx b/basic/source/app/dialogs.hxx
index 7e9c78b..abae90c 100644
--- a/basic/source/app/dialogs.hxx
+++ b/basic/source/app/dialogs.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -44,6 +44,7 @@
 #include <vcl/toolbox.hxx>
 #include <svtools/ctrltool.hxx>
 #include <svtools/ctrlbox.hxx>
+#include <vector>
 
 class SbxVariable;
 
@@ -239,8 +240,7 @@ public:
     void Save( Config &aConfig );
 };
 
-
-DECLARE_LIST( StringList, String * )
+typedef ::std::vector< String* > StringList;
 #define C_KEY_ALLE			CByteString("All")
 #define C_KEY_AKTUELL		CByteString("Current")
 #define C_KEY_TYPE			CByteString("Type")
@@ -349,9 +349,6 @@ protected:
 
     DECL_LINK( OKClick, Button * );
 
-//	BOOL bCompare = FALSE;
-//	String aCompareString;
-
 public:
     VarEditDialog( Window * pParent, SbxVariable *pPVar );
 };
commit 7fbc9d18437e058b5ad1cee6369dcaae17903c66
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Thu Dec 16 05:58:42 2010 -0800

    Remove DECLARE_LIST( ByteStringList, ByteString * )
    
    It was already remaked out, so no real code change.

diff --git a/basic/source/app/process.cxx b/basic/source/app/process.cxx
index 367ba2d..b910577 100644
--- a/basic/source/app/process.cxx
+++ b/basic/source/app/process.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -42,12 +42,6 @@
 #include <osl/process.h>
 
 #include <basic/ttstrhlp.hxx>
-
-//#ifndef _BYTE_STRING_LIST
-//DECLARE_LIST( ByteStringList, ByteString * );
-//#define _BYTE_STRING_LIST
-//#endif
-
 #include <basic/process.hxx>
 
 Process::Process()
@@ -183,7 +177,6 @@ BOOL Process::Start()
     {
         bWasGPF = FALSE;
 #ifdef WNT
-//		sal_uInt32 nErrorMode = SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_NOALIGNMENTFAULTEXCEPT | SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
         sal_uInt32 nErrorMode = SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_NOALIGNMENTFAULTEXCEPT | SEM_NOGPFAULTERRORBOX);
         try
         {


More information about the Libreoffice-commits mailing list