diff options
-rw-r--r-- | basctl/source/basicide/basidesh.cxx | 62 | ||||
-rw-r--r-- | basctl/source/basicide/bastypes.cxx | 19 | ||||
-rw-r--r-- | basctl/source/inc/bastypes.hxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/propcontroller.cxx | 4 | ||||
-rw-r--r-- | forms/qa/integration/forms/ListSelection.java | 6 | ||||
-rw-r--r-- | forms/qa/makefile.mk | 15 |
6 files changed, 49 insertions, 61 deletions
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index b58502066a03..e6b147cc46c8 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: basidesh.cxx,v $ - * $Revision: 1.50 $ + * $Revision: 1.49.26.2 $ * * This file is part of OpenOffice.org. * @@ -261,51 +261,37 @@ void BasicIDEShell::onDocumentClosed( const ScriptDocument& _rDocument ) return; bool bSetCurWindow = false; - bool bSetCurLib = false; + bool bSetCurLib = ( _rDocument == m_aCurDocument ); - Sequence< ::rtl::OUString > aLibNames = _rDocument.getLibraryNames();; - sal_Int32 nLibCount = aLibNames.getLength(); - const ::rtl::OUString* pLibNames = aLibNames.getConstArray(); - - for ( sal_Int32 i = 0 ; i < nLibCount ; ++i ) + // remove all windows which belong to this document + for ( ULONG nWin = aIDEWindowTable.Count(); nWin; ) { - String aLibName = pLibNames[ i ]; - if ( !aLibName.Len() ) - continue; - - // remove all windows which belong to this library - for ( ULONG nWin = aIDEWindowTable.Count(); nWin; ) + IDEBaseWindow* pWin = aIDEWindowTable.GetObject( --nWin ); + if ( pWin->IsDocument( _rDocument ) ) { - IDEBaseWindow* pWin = aIDEWindowTable.GetObject( --nWin ); - if ( pWin->IsDocument( _rDocument ) && pWin->GetLibName() == aLibName ) + if ( pWin->GetStatus() & (BASWIN_RUNNINGBASIC|BASWIN_INRESCHEDULE) ) { - if ( pWin->GetStatus() & (BASWIN_RUNNINGBASIC|BASWIN_INRESCHEDULE) ) - { - pWin->AddStatus( BASWIN_TOBEKILLED ); - pWin->Hide(); - StarBASIC::Stop(); - // there's no notify - pWin->BasicStopped(); - } - else - { - pWin->StoreData(); - if ( pWin == pCurWin ) - bSetCurWindow = true; - RemoveWindow( pWin, TRUE, FALSE ); - } + pWin->AddStatus( BASWIN_TOBEKILLED ); + pWin->Hide(); + StarBASIC::Stop(); + // there's no notify + pWin->BasicStopped(); + } + else + { + pWin->StoreData(); + if ( pWin == pCurWin ) + bSetCurWindow = true; + RemoveWindow( pWin, TRUE, FALSE ); } } - - // remove lib info - BasicIDEData* pData = IDE_DLL()->GetExtraData(); - if ( pData ) - pData->GetLibInfos().RemoveInfo( LibInfoKey( _rDocument, aLibName ) ); - - if ( _rDocument == m_aCurDocument && aLibName == m_aCurLibName ) - bSetCurLib = true; } + // remove lib info + BasicIDEData* pData = IDE_DLL()->GetExtraData(); + if ( pData ) + pData->GetLibInfos().RemoveInfoFor( _rDocument ); + if ( bSetCurLib ) SetCurLib( ScriptDocument::getApplicationScriptDocument(), String::CreateFromAscii( "Standard" ), true, false ); else if ( bSetCurWindow ) diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index f42866b84d39..33d6f5af4961 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: bastypes.cxx,v $ - * $Revision: 1.32 $ + * $Revision: 1.32.30.1 $ * * This file is part of OpenOffice.org. * @@ -900,13 +900,24 @@ void LibInfos::InsertInfo( LibInfoItem* pItem ) m_aLibInfoMap.insert( LibInfoMap::value_type( aKey, pItem ) ); } -void LibInfos::RemoveInfo( const LibInfoKey& rKey ) +void LibInfos::RemoveInfoFor( const ScriptDocument& _rDocument ) { - LibInfoMap::iterator it = m_aLibInfoMap.find( rKey ); - if ( it != m_aLibInfoMap.end() ) + for ( LibInfoMap::iterator it = m_aLibInfoMap.begin(); + it != m_aLibInfoMap.end(); + ) { + if ( it->first.GetDocument() != _rDocument ) + { + ++it; + continue; + } + LibInfoItem* pItem = it->second; + + LibInfoMap::iterator next_it = it; ++next_it; m_aLibInfoMap.erase( it ); + it = next_it; + delete pItem; } } diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx index 6edaf5560704..ba1ac9c57068 100644 --- a/basctl/source/inc/bastypes.hxx +++ b/basctl/source/inc/bastypes.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: bastypes.hxx,v $ - * $Revision: 1.10 $ + * $Revision: 1.10.30.1 $ * * This file is part of OpenOffice.org. * @@ -323,7 +323,7 @@ public: ~LibInfos(); void InsertInfo( LibInfoItem* pItem ); - void RemoveInfo( const LibInfoKey& rKey ); + void RemoveInfoFor( const ScriptDocument& _rDocument ); LibInfoItem* GetInfo( const LibInfoKey& rKey ); }; diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index b85591da68ac..f6b456a2ab04 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: propcontroller.cxx,v $ - * $Revision: 1.41 $ + * $Revision: 1.41.66.1 $ * * This file is part of OpenOffice.org. * @@ -1362,7 +1362,7 @@ namespace pcr } catch (Exception&) { - DBG_ERROR("OPropertyBrowserController::Clicked : caught an exception !") + DBG_UNHANDLED_EXCEPTION(); } m_xInteractiveHandler = NULL; } diff --git a/forms/qa/integration/forms/ListSelection.java b/forms/qa/integration/forms/ListSelection.java index c04a241aaa4d..110380cc660f 100644 --- a/forms/qa/integration/forms/ListSelection.java +++ b/forms/qa/integration/forms/ListSelection.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ListSelection.java,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.44.1 $ * * This file is part of OpenOffice.org. * @@ -295,7 +295,9 @@ public class ListSelection extends integration.forms.TestCase implements com.sun try { XStorable storable = (XStorable)m_document.query( XStorable.class ); - storable.storeAsURL( java.io.File.createTempFile( getTestObjectName(),".oxs").getAbsoluteFile().toURL().toString(), new com.sun.star.beans.PropertyValue[]{} ); + java.io.File testFile = java.io.File.createTempFile( getTestObjectName(),".ods"); + storable.storeAsURL( testFile.getAbsoluteFile().toURL().toString(), new com.sun.star.beans.PropertyValue[]{} ); + testFile.deleteOnExit(); } catch( java.lang.Throwable e ) { diff --git a/forms/qa/makefile.mk b/forms/qa/makefile.mk index 9f5a3fd9e1f4..7be518dc063b 100644 --- a/forms/qa/makefile.mk +++ b/forms/qa/makefile.mk @@ -8,7 +8,7 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.3 $ +# $Revision: 1.2.20.2 $ # # This file is part of OpenOffice.org. # @@ -55,20 +55,9 @@ JARCOMPRESS = TRUE # --- Runner Settings ---------------------------------------------- -# create connection string for OOoRunner -.IF "$(RUNNER_CONNECTION_STRING)" == "" - .IF "$(OOO_RUNNER_PORT)" == "" - OOO_RUNNER_PORT=8100 - .ENDIF - .IF "$(OOO_RUNNER_HOST)" == "" - OOO_RUNNER_HOST=localhost - .ENDIF - RUNNER_CONNECTION_STRING=socket,host=$(OOO_RUNNER_HOST),port=$(OOO_RUNNER_PORT) -.ENDIF - # classpath and argument list RUNNER_CLASSPATH = -cp $(CLASSPATH)$(PATH_SEPERATOR)$(SOLARBINDIR)$/OOoRunner.jar$(PATH_SEPERATOR)$(CLASSPATH)$(PATH_SEPERATOR)$(SOLARBINDIR)$/ConnectivityTools.jar -RUNNER_ARGS = org.openoffice.Runner -TestBase java_complex -cs $(RUNNER_CONNECTION_STRING) +RUNNER_ARGS = org.openoffice.Runner -TestBase java_complex .END # --- Targets ------------------------------------------------------ |