CWS-TOOLING: integrate CWS dv05

2008-12-12 11:36:32 +0100 dv  r265399 : #i93992# Reverted changes made for this issues
2008-12-11 10:22:09 +0100 dv  r265252 : #i96735# the check for existance of the online update module needs to catch exceptions!
2008-12-10 13:28:32 +0100 dv  r265179 : CWS-TOOLING: rebase CWS dv05 to trunk@264807 (milestone: DEV300:m37)
2008-12-09 11:38:53 +0100 dv  r265069 : #i94154#: migrate CWS dv05 to SVN.
This commit is contained in:
Jens-Heiner Rechtien 2009-01-06 16:30:03 +00:00
parent 0cf944e41a
commit c9c843ab6f
5 changed files with 37 additions and 15 deletions

View file

@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: download.cxx,v $
* $Revision: 1.7 $
* $Revision: 1.7.88.1 $
*
* This file is part of OpenOffice.org.
*
@ -365,8 +365,10 @@ Download::start(const rtl::OUString& rURL, const rtl::OUString& rFile, const rtl
osl_syncFile(out.FileHandle);
osl_closeFile(out.FileHandle);
if( ! ret )
osl_removeFile(out.File.pData);
// #i90930# Don't remove already downloaded bits, when curl_run reports an error
// because later calls might be successful
// if( ! ret )
// osl_removeFile(out.File.pData);
}
m_aCondition.reset();

View file

@ -7,7 +7,6 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: updatecheck.cxx,v $
* $Revision: 1.21.76.1 $
*
* This file is part of OpenOffice.org.
*
@ -664,10 +663,9 @@ DownloadThread::run()
// release config class for now
rModel.clear();
static sal_uInt8 n = 0;
if( ! m_aDownload.start(m_aURL, aLocalFile, aDownloadDest ) )
{
static sal_uInt8 n = 0;
// retry every 15s unless the dialog is not visible
TimeValue tv;
tv.Seconds = 15;
@ -684,6 +682,11 @@ DownloadThread::run()
}
m_aCondition.wait(&tv);
}
else
{
// reset wait period after successful download
n=0;
}
}
}
@ -1382,6 +1385,12 @@ void UpdateCheck::setUIState(UpdateState eState, bool suppressBubble)
m_xMenuBarUI = createMenuBarUI(m_xContext, new MenuBarButtonJob(this));
}
// Show bubble only when the status has changed
if ( eState == m_eUpdateState )
suppressBubble = true;
else
m_eUpdateState = eState;
rtl::Reference<UpdateHandler> aUpdateHandler(getUpdateHandler());
OSL_ASSERT( aUpdateHandler.is() );

View file

@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: updatecheck.hxx,v $
* $Revision: 1.6 $
* $Revision: 1.6.70.1 $
*
* This file is part of OpenOffice.org.
*
@ -67,7 +67,7 @@ class UpdateCheck :
public salhelper::ReferenceObject,
public rtl::StaticWithInit< rtl::Reference< UpdateCheck >, UpdateCheckInitData >
{
UpdateCheck() : m_eState(NOT_INITIALIZED), m_pThread(NULL) {};
UpdateCheck() : m_eState(NOT_INITIALIZED), m_eUpdateState(UPDATESTATES_COUNT), m_pThread(NULL) {};
public:
inline SAL_CALL operator rtl::Reference< UpdateCheckConfigListener > ()
@ -170,6 +170,7 @@ private:
};
State m_eState;
UpdateState m_eUpdateState;
mutable osl::Mutex m_aMutex;
WorkerThread *m_pThread;

View file

@ -7,7 +7,6 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: updatehdl.cxx,v $
* $Revision: 1.7.60.1 $
*
* This file is part of OpenOffice.org.
*
@ -338,7 +337,8 @@ void SAL_CALL UpdateHandler::actionPerformed( awt::ActionEvent const & rEvent )
bool bCancel = true;
if ( ( meCurState == UPDATESTATE_DOWNLOADING ) ||
( meCurState == UPDATESTATE_DOWNLOAD_PAUSED ) )
( meCurState == UPDATESTATE_DOWNLOAD_PAUSED ) ||
( meCurState == UPDATESTATE_ERROR_DOWNLOADING ) )
bCancel = showWarning( msCancelMessage );
if ( bCancel )

View file

@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: updatecheckui.cxx,v $
* $Revision: 1.19 $
* $Revision: 1.19.18.2 $
*
* This file is part of OpenOffice.org.
*
@ -595,6 +595,7 @@ BubbleWindow * UpdateCheckUI::GetBubbleWindow()
XubString( maBubbleTitle ),
XubString( maBubbleText ),
maBubbleImage );
mbBubbleChanged = false;
}
else if ( mbBubbleChanged ) {
pBubbleWin->SetTitleAndText( XubString( maBubbleTitle ),
@ -709,13 +710,22 @@ IMPL_LINK( UpdateCheckUI, UserEventHdl, UpdateCheckUI*, EMPTYARG )
Window *pActiveWin = Application::GetActiveTopWindow();
SystemWindow *pActiveSysWin = NULL;
if ( pActiveWin && pActiveWin->IsTopWindow() )
Window *pBubbleWin = NULL;
if ( mpBubbleWin )
pBubbleWin = mpBubbleWin;
if ( pActiveWin && ( pActiveWin != pBubbleWin ) && pActiveWin->IsTopWindow() )
pActiveSysWin = pActiveWin->GetSystemWindow();
while ( !pActiveSysWin && pTopWin ) {
if ( pTopWin->IsTopWindow() )
if ( pActiveWin == pBubbleWin )
pActiveSysWin = NULL;
while ( !pActiveSysWin && pTopWin )
{
if ( ( pTopWin != pBubbleWin ) && pTopWin->IsTopWindow() )
pActiveSysWin = pTopWin->GetSystemWindow();
pTopWin = Application::GetNextTopLevelWindow( pTopWin );
if ( !pActiveSysWin )
pTopWin = Application::GetNextTopLevelWindow( pTopWin );
}
if ( pActiveSysWin )