diff options
Diffstat (limited to 'desktop/source/deployment/gui')
36 files changed, 302 insertions, 302 deletions
diff --git a/desktop/source/deployment/gui/descedit.cxx b/desktop/source/deployment/gui/descedit.cxx index 8887b40a3946..0291ce5802f1 100644 --- a/desktop/source/deployment/gui/descedit.cxx +++ b/desktop/source/deployment/gui/descedit.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 diff --git a/desktop/source/deployment/gui/descedit.hxx b/desktop/source/deployment/gui/descedit.hxx index ed8b8f9c333f..27e36e14a0c8 100644 --- a/desktop/source/deployment/gui/descedit.hxx +++ b/desktop/source/deployment/gui/descedit.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 diff --git a/desktop/source/deployment/gui/dp_gui.h b/desktop/source/deployment/gui/dp_gui.h index 1c57aa5b800e..043a86f1aff8 100644 --- a/desktop/source/deployment/gui/dp_gui.h +++ b/desktop/source/deployment/gui/dp_gui.h @@ -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 diff --git a/desktop/source/deployment/gui/dp_gui.hrc b/desktop/source/deployment/gui/dp_gui.hrc index 5f52b042edf3..19b2faf129a0 100755 --- a/desktop/source/deployment/gui/dp_gui.hrc +++ b/desktop/source/deployment/gui/dp_gui.hrc @@ -1,7 +1,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 @@ -35,7 +35,7 @@ #define RID_DLG_EXTENSION_MANAGER RID_DEPLOYMENT_GUI_START #define RID_DLG_UPDATE_REQUIRED (RID_DEPLOYMENT_GUI_START + 11) -#define RID_EM_BTN_CLOSE 10 +#define RID_EM_BTN_CLOSE 10 #define RID_EM_BTN_HELP 11 #define RID_EM_BTN_ADD 12 #define RID_EM_BTN_CHECK_UPDATES 13 @@ -46,19 +46,19 @@ #define RID_EM_FT_MSG 22 // local RIDs: -#define PB_LICENSE_DOWN 50 -#define ML_LICENSE 51 -#define BTN_LICENSE_DECLINE 53 -#define FT_LICENSE_HEADER 54 -#define FT_LICENSE_BODY_1 55 -#define FT_LICENSE_BODY_1_TXT 56 -#define FT_LICENSE_BODY_2 57 -#define FT_LICENSE_BODY_2_TXT 58 -#define FL_LICENSE 69 -#define FI_LICENSE_ARROW1 60 -#define FI_LICENSE_ARROW2 61 -#define IMG_LICENCE_ARROW_HC 62 -#define BTN_LICENSE_ACCEPT 63 +#define PB_LICENSE_DOWN 50 +#define ML_LICENSE 51 +#define BTN_LICENSE_DECLINE 53 +#define FT_LICENSE_HEADER 54 +#define FT_LICENSE_BODY_1 55 +#define FT_LICENSE_BODY_1_TXT 56 +#define FT_LICENSE_BODY_2 57 +#define FT_LICENSE_BODY_2_TXT 58 +#define FL_LICENSE 69 +#define FI_LICENSE_ARROW1 60 +#define FI_LICENSE_ARROW2 61 +#define IMG_LICENCE_ARROW_HC 62 +#define BTN_LICENSE_ACCEPT 63 // local RIDs for "Download and Install" dialog @@ -123,8 +123,8 @@ #define RID_DLG_UPDATE_BROWSERBASED 25 #define RID_DLG_UPDATE_PUBLISHER_LABEL 26 #define RID_DLG_UPDATE_PUBLISHER_LINK 27 -#define RID_DLG_UPDATE_RELEASENOTES_LABEL 28 -#define RID_DLG_UPDATE_RELEASENOTES_LINK 29 +#define RID_DLG_UPDATE_RELEASENOTES_LABEL 28 +#define RID_DLG_UPDATE_RELEASENOTES_LINK 29 #define RID_DLG_UPDATE_NOUPDATE 30 #define RID_DLG_UPDATE_VERSION 31 @@ -173,7 +173,7 @@ #define RID_WARNINGBOX_ENABLE_SHARED_EXTENSION (RID_DEPLOYMENT_GUI_START+105) #define RID_WARNINGBOX_DISABLE_SHARED_EXTENSION (RID_DEPLOYMENT_GUI_START+106) -#define RID_DLG_LICENSE RID_DEPLOYMENT_LICENSE_START +#define RID_DLG_LICENSE RID_DEPLOYMENT_LICENSE_START diff --git a/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx b/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx index 9bde835bf140..c00123fb912e 100644 --- a/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx +++ b/desktop/source/deployment/gui/dp_gui_autoscrolledit.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 @@ -62,7 +62,7 @@ void AutoScrollEdit::Notify( SfxBroadcaster&, const SfxHint& rHint ) { ULONG nId = ((const TextHint&)rHint).GetId(); if ( nId == TEXT_HINT_VIEWSCROLLED ) - { + { ScrollBar* pScroll = GetVScrollBar(); if ( pScroll ) pScroll->Show(); diff --git a/desktop/source/deployment/gui/dp_gui_autoscrolledit.hxx b/desktop/source/deployment/gui/dp_gui_autoscrolledit.hxx index c49477358c1b..ddec1e81ae93 100644 --- a/desktop/source/deployment/gui/dp_gui_autoscrolledit.hxx +++ b/desktop/source/deployment/gui/dp_gui_autoscrolledit.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 @@ -34,7 +34,7 @@ namespace dp_gui { /** This control shows automatically the vertical scroll bar if text is inserted, - that does not fit into the text area. In the resource one uses MultiLineEdit + that does not fit into the text area. In the resource one uses MultiLineEdit and needs to set VScroll = TRUE */ class AutoScrollEdit : public ExtMultiLineEdit, public SfxListener diff --git a/desktop/source/deployment/gui/dp_gui_backend.src b/desktop/source/deployment/gui/dp_gui_backend.src index 4d554ab4ded9..343d75df6a5e 100644 --- a/desktop/source/deployment/gui/dp_gui_backend.src +++ b/desktop/source/deployment/gui/dp_gui_backend.src @@ -1,7 +1,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 diff --git a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx b/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx index 7019db610b85..694f764d5ed7 100644 --- a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.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 diff --git a/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx b/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx index 48ef45fd15c0..72f8334d38dc 100644 --- a/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx +++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.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 diff --git a/desktop/source/deployment/gui/dp_gui_dependencydialog.src b/desktop/source/deployment/gui/dp_gui_dependencydialog.src index fa7465678326..80b584f89423 100644 --- a/desktop/source/deployment/gui/dp_gui_dependencydialog.src +++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.src @@ -1,7 +1,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 diff --git a/desktop/source/deployment/gui/dp_gui_dialog.src b/desktop/source/deployment/gui/dp_gui_dialog.src index 15823288ee20..db2e09769de3 100755 --- a/desktop/source/deployment/gui/dp_gui_dialog.src +++ b/desktop/source/deployment/gui/dp_gui_dialog.src @@ -1,7 +1,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 @@ -121,9 +121,9 @@ String RID_STR_ERROR_MISSING_LICENSE // Dialog layout // --------------------------------------------------- -// row 1 | multi line edit +// row 1 | multi line edit // --------------------------------------------------- -// row 2 | fixed text +// row 2 | fixed text // --------------------------------------------------- // row 3 | img | fixed text | fixed text | button // ---------------------------------------------------- @@ -131,7 +131,7 @@ String RID_STR_ERROR_MISSING_LICENSE // --------------------------------------------------- // row 5 |fixed line // --------------------------------------------------- -// row 6 | | |button | button +// row 6 | | |button | button // --------------------------------------------------- // | col 1 | col 2 | col3 | col4 | col5 @@ -187,7 +187,7 @@ ModalDialog RID_DLG_LICENSE VScroll = TRUE; ReadOnly = TRUE; }; - + FixedText FT_LICENSE_HEADER { Pos = MAP_APPFONT(COL1_X, ROW2_Y); @@ -195,14 +195,14 @@ ModalDialog RID_DLG_LICENSE WordBreak = TRUE; NoLabel = TRUE; Text [ en-US ] = "Please follow these steps to proceed with the installation of the extension:"; - }; + }; FixedText FT_LICENSE_BODY_1 { Pos = MAP_APPFONT(COL2_X, ROW3_Y); Size = MAP_APPFONT( COL2_WIDTH, ROW3_HEIGHT ); NoLabel = TRUE; Text [ en-US ] = "1."; - }; + }; //spans col3 + col4 FixedText FT_LICENSE_BODY_1_TXT { @@ -211,14 +211,14 @@ ModalDialog RID_DLG_LICENSE WordBreak = TRUE; NoLabel = TRUE; Text [ en-US ] = "Read the complete License Agreement. Use the scroll bar or the \'Scroll Down\' button in this dialog to view the entire license text."; - }; + }; FixedText FT_LICENSE_BODY_2 { Pos = MAP_APPFONT(COL2_X, ROW4_Y); Size = MAP_APPFONT(COL2_WIDTH, ROW4_HEIGHT); NoLabel = TRUE; Text [ en-US ] = "2."; - }; + }; FixedText FT_LICENSE_BODY_2_TXT { Pos = MAP_APPFONT(COL3_X, ROW4_Y); @@ -226,22 +226,22 @@ ModalDialog RID_DLG_LICENSE WordBreak = TRUE; NoLabel = TRUE; Text [ en-US ] = "Accept the License Agreement for the extension by pressing the \'Accept\' button."; - - }; + + }; PushButton PB_LICENSE_DOWN { TabStop = TRUE ; Pos = MAP_APPFONT(COL5_X , ROW3_Y) ; Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT) ; Text [ en-US ] = "~Scroll Down"; - + }; FixedLine FL_LICENSE { Pos = MAP_APPFONT ( 0, ROW5_Y) ; Size = MAP_APPFONT ( LIC_DLG_WIDTH, ROW5_HEIGHT ) ; }; - + FixedImage FI_LICENSE_ARROW1 { Pos = MAP_APPFONT (COL1_X, ROW3_Y) ; @@ -252,7 +252,7 @@ ModalDialog RID_DLG_LICENSE MASKCOLOR }; }; - + FixedImage FI_LICENSE_ARROW2 { Pos = MAP_APPFONT (COL1_X, ROW4_Y) ; @@ -263,13 +263,13 @@ ModalDialog RID_DLG_LICENSE MASKCOLOR }; }; - + Image IMG_LICENCE_ARROW_HC { ImageBitmap = Bitmap { File = "sch06300.png"; }; MASKCOLOR }; - + OKButton BTN_LICENSE_ACCEPT { Pos = MAP_APPFONT(COL4_X, ROW6_Y); @@ -279,7 +279,7 @@ ModalDialog RID_DLG_LICENSE DefButton = TRUE; Text [ en-US ] = "Accept"; }; - + CancelButton BTN_LICENSE_DECLINE { Pos = MAP_APPFONT(COL5_X, ROW6_Y); @@ -287,7 +287,7 @@ ModalDialog RID_DLG_LICENSE Text [ en-US ] = "Decline" ; TabStop = TRUE; }; - + }; @@ -338,7 +338,7 @@ WARNINGBOX RID_WARNINGBOX_DISABLE_SHARED_EXTENSION "Click \'Cancel\' to stop disabling the extension."; }; - + String RID_STR_UNSUPPORTED_PLATFORM { Text [ en-US ] = "The extension \'%Name\' does not work on this computer."; diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 4b631a45939a..53628fb8546d 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.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 @@ -126,7 +126,7 @@ class ExtBoxWithBtns_Impl : public ExtensionBox_Impl { Size m_aOutputSize; bool m_bInterfaceLocked; - + PushButton *m_pOptionsBtn; PushButton *m_pEnableBtn; PushButton *m_pRemoveBtn; @@ -466,13 +466,13 @@ void ExtBoxWithBtns_Impl::enableButtons( bool bEnable ) IMPL_LINK( ExtBoxWithBtns_Impl, ScrollHdl, ScrollBar*, pScrBar ) { long nDelta = pScrBar->GetDelta(); - + Point aNewOptPt( m_pOptionsBtn->GetPosPixel() - Point( 0, nDelta ) ); Point aNewRemPt( m_pRemoveBtn->GetPosPixel() - Point( 0, nDelta ) ); Point aNewEnPt( m_pEnableBtn->GetPosPixel() - Point( 0, nDelta ) ); DoScroll( nDelta ); - + m_pOptionsBtn->SetPosPixel( aNewOptPt ); m_pRemoveBtn->SetPosPixel( aNewRemPt ); m_pEnableBtn->SetPosPixel( aNewEnPt ); @@ -488,14 +488,14 @@ IMPL_LINK( ExtBoxWithBtns_Impl, HandleOptionsBtn, void*, EMPTYARG ) if ( nActive != EXTENSION_LISTBOX_ENTRY_NOTFOUND ) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - + if ( pFact ) { OUString sExtensionId = GetEntryData( nActive )->m_xPackage->getIdentifier().Value; VclAbstractDialog* pDlg = pFact->CreateOptionsDialog( this, sExtensionId, rtl::OUString() ); - + pDlg->Execute(); - + delete pDlg; } } @@ -601,7 +601,7 @@ bool DialogHelper::continueOnSharedExtension( const uno::Reference< deployment:: aInfoBox.SetMessText( aMsgText ); bHadWarning = true; - + if ( RET_OK == aInfoBox.Execute() ) return true; else @@ -617,7 +617,7 @@ void DialogHelper::openWebBrowser( const OUString & sURL, const OUString &sTitle if ( ! sURL.getLength() ) // Nothing to do, when the URL is empty return; - try + try { uno::Reference< XSystemShellExecute > xSystemShellExecute( m_xContext->getServiceManager()->createInstanceWithContext( OUSTR( "com.sun.star.system.SystemShellExecute" ), m_xContext), uno::UNO_QUERY_THROW); @@ -849,10 +849,10 @@ bool ExtMgrDialog::updatePackage( const uno::Reference< deployment::XPackage > & return false; // get the extension with highest version - uno::Sequence<uno::Reference<deployment::XPackage> > seqExtensions = + uno::Sequence<uno::Reference<deployment::XPackage> > seqExtensions = m_pManager->getExtensionManager()->getExtensionsWithSameIdentifier( dp_misc::getIdentifier(xPackage), xPackage->getName(), uno::Reference<ucb::XCommandEnvironment>()); - uno::Reference<deployment::XPackage> extension = + uno::Reference<deployment::XPackage> extension = dp_misc::getExtensionWithHighestVersion(seqExtensions); OSL_ASSERT(extension.is()); std::vector< css::uno::Reference< css::deployment::XPackage > > vEntries; @@ -905,7 +905,7 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker() const OUString title( xPackageType->getShortDescription() ); const ::std::pair< t_string2string::iterator, bool > insertion( title2filter.insert( t_string2string::value_type( title, filter ) ) ); - if ( ! insertion.second ) + if ( ! insertion.second ) { // already existing, append extensions: ::rtl::OUStringBuffer buf; buf.append( insertion.first->second ); @@ -1124,7 +1124,7 @@ void ExtMgrDialog::Resize() Point aPos( RSC_SP_DLG_INNERBORDER_LEFT, aTotalSize.Height() - RSC_SP_DLG_INNERBORDER_BOTTOM - aBtnSize.Height() ); - + m_aHelpBtn.SetPosPixel( aPos ); aPos.X() = aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_RIGHT - aBtnSize.Width(); @@ -1142,12 +1142,12 @@ void ExtMgrDialog::Resize() Size aFTSize( m_aGetExtensions.CalcMinimumSize() ); aPos = Point( RSC_SP_DLG_INNERBORDER_LEFT, aPos.Y() - RSC_CD_FIXEDTEXT_HEIGHT - 2*RSC_SP_DLG_INNERBORDER_BOTTOM ); - + m_aGetExtensions.SetPosSizePixel( aPos, aFTSize ); aPos.X() = aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_RIGHT - aBtnSize.Width(); m_aCancelBtn.SetPosPixel( Point( aPos.X(), aPos.Y() - ((aBtnSize.Height()-aFTSize.Height())/2) ) ); - + // Calc progress height long nProgressHeight = aFTSize.Height(); @@ -1562,7 +1562,7 @@ void UpdateRequiredDialog::Resize() Point aPos( RSC_SP_DLG_INNERBORDER_LEFT, aTotalSize.Height() - RSC_SP_DLG_INNERBORDER_BOTTOM - aBtnSize.Height() ); - + m_aHelpBtn.SetPosPixel( aPos ); aPos.X() = aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_RIGHT - m_aCloseBtn.GetSizePixel().Width(); @@ -1717,7 +1717,7 @@ bool UpdateRequiredDialog::hasActiveEntries() for ( long nIndex = 0; nIndex < nCount; nIndex++ ) { TEntry_Impl pEntry = m_pExtensionBox->GetEntryData( nIndex ); - + if ( !checkDependencies( pEntry->m_xPackage ) ) { bRet = true; @@ -1743,7 +1743,7 @@ void UpdateRequiredDialog::disableAllEntries() } setBusy( false ); - + if ( ! hasActiveEntries() ) m_aCloseBtn.SetText( m_sCloseText ); } diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx index 795360732837..bb8c9785d91b 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.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 @@ -149,7 +149,7 @@ public: virtual void Resize(); virtual long Notify( NotifyEvent& rNEvt ); - virtual BOOL Close(); + virtual BOOL Close(); virtual void showProgress( bool bStart ); virtual void updateProgress( const ::rtl::OUString &rText, @@ -219,9 +219,9 @@ public: UpdateRequiredDialog( Window * pParent, TheExtensionManager *pManager ); virtual ~UpdateRequiredDialog(); - virtual short Execute(); + virtual short Execute(); virtual void Resize(); - virtual BOOL Close(); + virtual BOOL Close(); // virtual long Notify( NotifyEvent& rNEvt ); virtual void showProgress( bool bStart ); diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.src b/desktop/source/deployment/gui/dp_gui_dialog2.src index 7c47365999a0..b74a802ceb0f 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.src +++ b/desktop/source/deployment/gui/dp_gui_dialog2.src @@ -1,7 +1,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 @@ -203,9 +203,9 @@ QueryBox RID_QUERYBOX_INSTALL_FOR_ALL // Dialog layout // --------------------------------------------------- -// row 1 | multi line edit +// row 1 | multi line edit // --------------------------------------------------- -// row 2 | fixed text +// row 2 | fixed text // --------------------------------------------------- // row 3 | img | fixed text | fixed text | button // ---------------------------------------------------- @@ -213,7 +213,7 @@ QueryBox RID_QUERYBOX_INSTALL_FOR_ALL // --------------------------------------------------- // row 5 |fixed line // --------------------------------------------------- -// row 6 | | |button | button +// row 6 | | |button | button // --------------------------------------------------- // | col 1 | col 2 | col3 | col4 | col5 diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index 6b904dd65b34..3674759f6f04 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.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 @@ -151,10 +151,10 @@ class ProgressCmdEnv public: virtual ~ProgressCmdEnv(); - /** When param bAskWhenInstalling = true, then the user is asked if he + /** When param bAskWhenInstalling = true, then the user is asked if he agrees to install this extension. In case this extension is already installed - then the user is also notified and asked if he wants to replace that existing - extension. In first case an interaction request with an InstallException + then the user is also notified and asked if he wants to replace that existing + extension. In first case an interaction request with an InstallException will be handled and in the second case a VersionException will be handled. */ @@ -373,7 +373,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & OSL_ASSERT( request.getValueTypeClass() == uno::TypeClass_EXCEPTION ); dp_misc::TRACE( OUSTR("[dp_gui_cmdenv.cxx] incoming request:\n") + ::comphelper::anyToString(request) + OUSTR("\n")); - + lang::WrappedTargetException wtExc; deployment::DependencyException depExc; deployment::LicenseException licExc; @@ -400,7 +400,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & cause = wtExc.TargetException; } update_( cause ); - + // ignore intermediate errors of legacy packages, i.e. // former pkgchk behaviour: const uno::Reference< deployment::XPackage > xPackage( wtExc.Context, uno::UNO_QUERY ); @@ -418,7 +418,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & "vnd.sun.star.legacy-package-bundle") )); } } - abort = !approve; + abort = !approve; } else if (request >>= depExc) { @@ -442,7 +442,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & { uno::Reference< ui::dialogs::XExecutableDialog > xDialog( deployment::ui::LicenseDialog::create( - m_xContext, VCLUnoHelper::GetInterface( m_pDialogHelper? m_pDialogHelper->getWindow() : NULL ), + m_xContext, VCLUnoHelper::GetInterface( m_pDialogHelper? m_pDialogHelper->getWindow() : NULL ), licExc.ExtensionName, licExc.Text ) ); sal_Int16 res = xDialog->execute(); if ( res == ui::dialogs::ExecutableDialogResults::CANCEL ) @@ -481,10 +481,10 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & { s = box.GetMessText(); } - else if (id == RID_WARNINGBOX_VERSION_EQUAL) + else if (id == RID_WARNINGBOX_VERSION_EQUAL) { - //hypothetical: requires two instances of an extension with the same - //version to have different display names. Probably the developer forgot + //hypothetical: requires two instances of an extension with the same + //version to have different display names. Probably the developer forgot //to change the version. s = String(ResId(RID_STR_WARNINGBOX_VERSION_EQUAL_DIFFERENT_NAMES, *DeploymentGuiResMgr::get())); } @@ -516,7 +516,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & if ( m_pDialogHelper ) { SolarMutexGuard guard; - + approve = m_pDialogHelper->installExtensionWarn( instExc.displayName ); } else @@ -569,7 +569,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & } else if (abort) { uno::Reference< task::XInteractionAbort > xInteractionAbort( pConts[ pos ], uno::UNO_QUERY ); - if (xInteractionAbort.is()) { + if (xInteractionAbort.is()) { xInteractionAbort->select(); // don't query again for ongoing continuations: abort = false; @@ -647,7 +647,7 @@ ExtensionCmdQueue::Thread::Thread( DialogHelper *pDialogHelper, void ExtensionCmdQueue::Thread::addExtension( const ::rtl::OUString &rExtensionURL, const ::rtl::OUString &rRepository, const bool bWarnUser ) -{ +{ ::osl::MutexGuard aGuard( m_mutex ); //If someone called stop then we do not add the extension -> game over! @@ -666,7 +666,7 @@ void ExtensionCmdQueue::Thread::addExtension( const ::rtl::OUString &rExtensionU //------------------------------------------------------------------------------ void ExtensionCmdQueue::Thread::removeExtension( const uno::Reference< deployment::XPackage > &rPackage ) -{ +{ ::osl::MutexGuard aGuard( m_mutex ); //If someone called stop then we do not remove the extension -> game over! @@ -685,7 +685,7 @@ void ExtensionCmdQueue::Thread::removeExtension( const uno::Reference< deploymen //------------------------------------------------------------------------------ void ExtensionCmdQueue::Thread::acceptLicense( const uno::Reference< deployment::XPackage > &rPackage ) -{ +{ ::osl::MutexGuard aGuard( m_mutex ); //If someone called stop then we do not remove the extension -> game over! @@ -705,7 +705,7 @@ void ExtensionCmdQueue::Thread::acceptLicense( const uno::Reference< deployment: //------------------------------------------------------------------------------ void ExtensionCmdQueue::Thread::enableExtension( const uno::Reference< deployment::XPackage > &rPackage, const bool bEnable ) -{ +{ ::osl::MutexGuard aGuard( m_mutex ); //If someone called stop then we do not remove the extension -> game over! @@ -726,7 +726,7 @@ void ExtensionCmdQueue::Thread::enableExtension( const uno::Reference< deploymen //------------------------------------------------------------------------------ void ExtensionCmdQueue::Thread::checkForUpdates( const std::vector<uno::Reference<deployment::XPackage > > &vExtensionList ) -{ +{ ::osl::MutexGuard aGuard( m_mutex ); //If someone called stop then we do not update the extension -> game over! @@ -741,7 +741,7 @@ void ExtensionCmdQueue::Thread::checkForUpdates( //------------------------------------------------------------------------------ //Stopping this thread will not abort the installation of extensions. -void ExtensionCmdQueue::Thread::stop() +void ExtensionCmdQueue::Thread::stop() { osl::MutexGuard aGuard( m_mutex ); m_bStopped = true; @@ -750,7 +750,7 @@ void ExtensionCmdQueue::Thread::stop() } //------------------------------------------------------------------------------ -bool ExtensionCmdQueue::Thread::isBusy() +bool ExtensionCmdQueue::Thread::isBusy() { osl::MutexGuard aGuard( m_mutex ); return m_bWorking; @@ -760,15 +760,15 @@ bool ExtensionCmdQueue::Thread::isBusy() ExtensionCmdQueue::Thread::~Thread() {} //------------------------------------------------------------------------------ -void ExtensionCmdQueue::Thread::execute() +void ExtensionCmdQueue::Thread::execute() { #ifdef WNT - //Needed for use of the service "com.sun.star.system.SystemShellExecute" in + //Needed for use of the service "com.sun.star.system.SystemShellExecute" in //DialogHelper::openWebBrowser CoUninitialize(); HRESULT r = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); #endif - for (;;) + for (;;) { if ( m_wakeup.wait() != osl::Condition::result_ok ) { @@ -791,13 +791,13 @@ void ExtensionCmdQueue::Thread::execute() // then input is NONE and we wait again. // We only install the extension which are currently in the queue. // The progressbar will be set to show the progress of the current number - // of extensions. If we allowed to add extensions now then the progressbar may + // of extensions. If we allowed to add extensions now then the progressbar may // have reached the end while we still install newly added extensions. if ( ( eInput == NONE ) || ( nSize == 0 ) ) continue; if ( eInput == STOP ) break; - + ::rtl::Reference< ProgressCmdEnv > currentCmdEnv( new ProgressCmdEnv( m_xContext, m_pDialogHelper, m_sDefaultCmd ) ); // Do not lock the following part with addExtension. addExtension may be called in the main thread. @@ -847,17 +847,17 @@ void ExtensionCmdQueue::Thread::execute() _acceptLicense( currentCmdEnv, pEntry->m_xPackage ); break; } - } - //catch ( deployment::DeploymentException &) - //{ + } + //catch ( deployment::DeploymentException &) + //{ //} - //catch ( lang::IllegalArgumentException &) + //catch ( lang::IllegalArgumentException &) //{ //} - catch ( ucb::CommandAbortedException & ) + catch ( ucb::CommandAbortedException & ) { //This exception is thrown when the user clicks cancel on the progressbar. - //Then we cancel the installation of all extensions and remove them from + //Then we cancel the installation of all extensions and remove them from //the queue. { ::osl::MutexGuard queueGuard2(m_mutex); @@ -866,16 +866,16 @@ void ExtensionCmdQueue::Thread::execute() } break; } - catch ( ucb::CommandFailedException & ) + catch ( ucb::CommandFailedException & ) { - //This exception is thrown when a user clicked cancel in the messagebox which was + //This exception is thrown when a user clicked cancel in the messagebox which was //startet by the interaction handler. For example the user will be asked if he/she //really wants to install the extension. //These interaction are run for exectly one extension at a time. Therefore we continue //with installing the remaining extensions. continue; - } - catch ( uno::Exception & ) + } + catch ( uno::Exception & ) { //Todo display the user an error //see also DialogImpl::SyncPushButton::Click() @@ -883,7 +883,7 @@ void ExtensionCmdQueue::Thread::execute() OUString msg; deployment::DeploymentException dpExc; if ((exc >>= dpExc) && - dpExc.Cause.getValueTypeClass() == uno::TypeClass_EXCEPTION) + dpExc.Cause.getValueTypeClass() == uno::TypeClass_EXCEPTION) { // notify error cause only: msg = reinterpret_cast< uno::Exception const * >( dpExc.Cause.getValue() )->Message; @@ -892,7 +892,7 @@ void ExtensionCmdQueue::Thread::execute() msg = ::comphelper::anyToString(exc); const SolarMutexGuard guard; - ::std::auto_ptr<ErrorBox> box( + ::std::auto_ptr<ErrorBox> box( new ErrorBox( currentCmdEnv->activeDialog(), WB_OK, msg ) ); if ( m_pDialogHelper ) box->SetText( m_pDialogHelper->getWindow()->GetText() ); @@ -1008,7 +1008,7 @@ void ExtensionCmdQueue::Thread::_checkForUpdates( const SolarMutexGuard guard; pUpdateDialog = new UpdateDialog( m_xContext, m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, vExtensionList, &vData ); - + pUpdateDialog->notifyMenubar( true, false ); // prepare the checking, if there updates to be notified via menu bar icon if ( ( pUpdateDialog->Execute() == RET_OK ) && !vData.empty() ) @@ -1027,7 +1027,7 @@ void ExtensionCmdQueue::Thread::_checkForUpdates( dataDownload.push_back( *i ); } - short nDialogResult = RET_OK; + short nDialogResult = RET_OK; if ( !dataDownload.empty() ) { nDialogResult = UpdateInstallDialog( m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, dataDownload, m_xContext ).Execute(); @@ -1044,7 +1044,7 @@ void ExtensionCmdQueue::Thread::_checkForUpdates( if ( m_pDialogHelper && ( i->sWebsiteURL.getLength() > 0 ) ) m_pDialogHelper->openWebBrowser( i->sWebsiteURL, m_pDialogHelper->getWindow()->GetText() ); } - } + } } else pUpdateDialog->notifyMenubar( false, false ); // check if there updates to be notified via menu bar icon @@ -1121,7 +1121,7 @@ void ExtensionCmdQueue::Thread::_acceptLicense( ::rtl::Reference< ProgressCmdEnv //------------------------------------------------------------------------------ void ExtensionCmdQueue::Thread::onTerminated() { - ::osl::MutexGuard g(m_mutex); + ::osl::MutexGuard g(m_mutex); m_bTerminated = true; } @@ -1194,7 +1194,7 @@ void ExtensionCmdQueue::syncRepositories( const uno::Reference< uno::XComponentC dp_misc::syncRepositories( new ProgressCmdEnv( xContext, NULL, OUSTR("Extension Manager") ) ); } -void ExtensionCmdQueue::stop() +void ExtensionCmdQueue::stop() { m_thread->stop(); } diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.hxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.hxx index f8fd1f1b2e05..8794c5113248 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.hxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.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 @@ -51,13 +51,13 @@ class DialogHelper; class TheExtensionManager; /** - Manages installing of extensions in the GUI mode. Requests for installing - Extensions can be asynchronous. For example, the Extension Manager is running - in an office process and someone uses the system integration to install an Extension. - That is, the user double clicks an extension symbol in a file browser, which then + Manages installing of extensions in the GUI mode. Requests for installing + Extensions can be asynchronous. For example, the Extension Manager is running + in an office process and someone uses the system integration to install an Extension. + That is, the user double clicks an extension symbol in a file browser, which then causes an invocation of "unopkg gui ext". When at that time the Extension Manager already performs a task, triggered by the user (for example, add, update, disable, - enable) then adding of the extension will be postponed until the user has finished + enable) then adding of the extension will be postponed until the user has finished the task. This class also ensures that the extensions are not installed in the main thread. @@ -76,7 +76,7 @@ public: ~ExtensionCmdQueue(); - /** + /** */ void addExtension( const ::rtl::OUString &rExtensionURL, const ::rtl::OUString &rRepository, @@ -90,7 +90,7 @@ public: static void syncRepositories( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext ); /** This call does not block. It signals the internal thread - that it should install the remaining extensions and then terminate. + that it should install the remaining extensions and then terminate. */ void stop(); diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 8f9de5860544..05511135e2dd 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -334,7 +334,7 @@ void ExtensionBox_Impl::select( sal_Int32 nIndex ) { const ::osl::MutexGuard aGuard( m_entriesMutex ); checkIndex( nIndex ); - selectEntry( nIndex ); + selectEntry( nIndex ); } //------------------------------------------------------------------------------ @@ -382,7 +382,7 @@ void ExtensionBox_Impl::CalcActiveHeight( const long nPos ) if ( aText.getLength() ) aText += OUSTR("\n"); aText += m_vEntries[ nPos ]->m_sDescription; - + Rectangle aRect = GetTextRect( Rectangle( Point(), aSize ), aText, TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK ); aTextHeight += aRect.GetHeight(); @@ -455,10 +455,10 @@ void ExtensionBox_Impl::DeleteRemoved() void ExtensionBox_Impl::selectEntry( const long nPos ) { //ToDo whe should not use the guard at such a big scope here. - //Currently it is used to gard m_vEntries and m_nActive. m_nActive will be + //Currently it is used to gard m_vEntries and m_nActive. m_nActive will be //modified in this function. //It would be probably best to always use a copy of m_vEntries - //and some other state variables from ExtensionBox_Impl for + //and some other state variables from ExtensionBox_Impl for //the whole painting operation. See issue i86993 ::osl::ClearableMutexGuard guard(m_entriesMutex); @@ -648,7 +648,7 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl pEntr aPos = rRect.TopRight() + Point( -(RIGHT_ICON_OFFSET + SPACE_BETWEEN + 2*SMALL_ICON_SIZE), TOP_OFFSET ); DrawImage( aPos, Size( SMALL_ICON_SIZE, SMALL_ICON_SIZE ), isHCMode() ? m_aWarningImageHC : m_aWarningImage ); } - + SetLineColor( Color( COL_LIGHTGRAY ) ); DrawLine( rRect.BottomLeft(), rRect.BottomRight() ); } @@ -1062,7 +1062,7 @@ void ExtensionBox_Impl::removeEntry( const uno::Reference< deployment::XPackage long nPos = iIndex - m_vEntries.begin(); // Entries mustn't removed here, because they contain a hyperlink control - // which can only be deleted when the thread has the solar mutex. Therefor + // which can only be deleted when the thread has the solar mutex. Therefor // the entry will be moved into the m_vRemovedEntries list which will be // cleared on the next paint event m_vRemovedEntries.push_back( *iIndex ); @@ -1137,7 +1137,7 @@ void ExtensionBox_Impl::checkEntries() long nNewPos = -1; long nPos = 0; bool bNeedsUpdate = false; - + ::osl::ClearableMutexGuard guard(m_entriesMutex); typedef std::vector< TEntry_Impl >::iterator ITER; ITER iIndex = m_vEntries.begin(); diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx index 8120d3b3bfad..4726a0c9e20d 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.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 @@ -145,14 +145,14 @@ class ExtensionBox_Impl : public ::svt::IExtensionListBox Image m_aDefaultImage; Image m_aDefaultImageHC; Link m_aClickHdl; - + ScrollBar *m_pScrollBar; com::sun::star::uno::Reference< ExtensionRemovedListener > m_xRemoveListener; TheExtensionManager *m_pManager; //This mutex is used for synchronizing access to m_vEntries. - //Currently it is used to synchronize adding, removing entries and + //Currently it is used to synchronize adding, removing entries and //functions like getItemName, getItemDescription, etc. to prevent //that m_vEntries is accessed at an invalid index. //ToDo: There are many more places where m_vEntries is read and which may @@ -194,7 +194,7 @@ public: const Size GetMinOutputSizePixel() const; void SetExtraSize( long nSize ) { m_nExtraHeight = nSize; } - TEntry_Impl GetEntryData( long nPos ) { return m_vEntries[ nPos ]; } + TEntry_Impl GetEntryData( long nPos ) { return m_vEntries[ nPos ]; } long GetEntryCount() { return (long) m_vEntries.size(); } Rectangle GetEntryRect( const long nPos ) const; bool HasActive() { return m_bHasActive; } diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx index 94323f6c49d8..a01b8b309d00 100644 --- a/desktop/source/deployment/gui/dp_gui_service.cxx +++ b/desktop/source/deployment/gui/dp_gui_service.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 @@ -262,7 +262,7 @@ void ServiceImpl::startExecuteModal( app->SetSettings( as ); String sTitle = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTNAME).get<OUString>() - + String(static_cast<sal_Unicode>(' ')) + + String(static_cast<sal_Unicode>(' ')) + ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTVERSION).get<OUString>(); app->SetDisplayName(sTitle); @@ -272,12 +272,12 @@ void ServiceImpl::startExecuteModal( else { // When m_bShowUpdateOnly is set, we are inside the office and the user clicked - // the update notification icon in the menu bar. We must not close the extensions + // the update notification icon in the menu bar. We must not close the extensions // dialog after displaying the update dialog when it has been visible before if ( m_bShowUpdateOnly ) bCloseDialog = ! dp_gui::TheExtensionManager::s_ExtMgr->isVisible(); } - + { const SolarMutexGuard guard; ::rtl::Reference< ::dp_gui::TheExtensionManager > myExtMgr( diff --git a/desktop/source/deployment/gui/dp_gui_shared.hxx b/desktop/source/deployment/gui/dp_gui_shared.hxx index 50eb9c393f45..af3a0bd5b980 100644 --- a/desktop/source/deployment/gui/dp_gui_shared.hxx +++ b/desktop/source/deployment/gui/dp_gui_shared.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 diff --git a/desktop/source/deployment/gui/dp_gui_system.cxx b/desktop/source/deployment/gui/dp_gui_system.cxx index 6230e72dc39d..0e6416f1616d 100644 --- a/desktop/source/deployment/gui/dp_gui_system.cxx +++ b/desktop/source/deployment/gui/dp_gui_system.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 diff --git a/desktop/source/deployment/gui/dp_gui_system.hxx b/desktop/source/deployment/gui/dp_gui_system.hxx index 319d627d2dc8..8c8feb43cf00 100644 --- a/desktop/source/deployment/gui/dp_gui_system.hxx +++ b/desktop/source/deployment/gui/dp_gui_system.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 diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx index cac4ae05f65e..564580c520bc 100644 --- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx +++ b/desktop/source/deployment/gui/dp_gui_theextmgr.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 @@ -94,7 +94,7 @@ TheExtensionManager::TheExtensionManager( Window *pParent, xNameAccessRepositories = uno::Reference< container::XNameAccess > ( xConfig->createInstanceWithArguments( OUSTR("com.sun.star.configuration.ConfigurationAccess"), uno::Sequence< uno::Any >( args, 1 )), uno::UNO_QUERY_THROW); - try + try { //throws css::container::NoSuchElementException, css::lang::WrappedTargetException uno::Any value = xNameAccessRepositories->getByName( OUSTR( "WebsiteLink" ) ); m_sGetExtensionsURL = value.get< OUString > (); @@ -249,14 +249,14 @@ bool TheExtensionManager::installPackage( const OUString &rPackageURL, bool bWar bool bInstall = true; bool bInstallForAll = false; - // DV! missing function is read only repository from extension manager + // DV! missing function is read only repository from extension manager if ( !bWarnUser && ! m_xExtensionManager->isReadOnlyRepository( SHARED_PACKAGE_MANAGER ) ) bInstall = getDialogHelper()->installForAllUsers( bInstallForAll ); if ( !bInstall ) return false; - if ( bInstallForAll ) + if ( bInstallForAll ) m_pExecuteCmdQueue->addExtension( rPackageURL, SHARED_PACKAGE_MANAGER, false ); else m_pExecuteCmdQueue->addExtension( rPackageURL, USER_PACKAGE_MANAGER, bWarnUser ); @@ -434,7 +434,7 @@ bool TheExtensionManager::supportsOptions( const uno::Reference< deployment::XPa void TheExtensionManager::disposing( lang::EventObject const & rEvt ) throw ( uno::RuntimeException ) { - bool shutDown = (rEvt.Source == m_xDesktop); + bool shutDown = (rEvt.Source == m_xDesktop); if ( shutDown && m_xDesktop.is() ) { diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx index 8289a3469aa0..13ba06d0b3d0 100644 --- a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx +++ b/desktop/source/deployment/gui/dp_gui_theextmgr.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 diff --git a/desktop/source/deployment/gui/dp_gui_thread.cxx b/desktop/source/deployment/gui/dp_gui_thread.cxx index 1ad857ad7b86..3bf0ff0d6c75 100644 --- a/desktop/source/deployment/gui/dp_gui_thread.cxx +++ b/desktop/source/deployment/gui/dp_gui_thread.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 diff --git a/desktop/source/deployment/gui/dp_gui_thread.hxx b/desktop/source/deployment/gui/dp_gui_thread.hxx index 624624b0cb3f..eb4fe43c9496 100644 --- a/desktop/source/deployment/gui/dp_gui_thread.hxx +++ b/desktop/source/deployment/gui/dp_gui_thread.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 diff --git a/desktop/source/deployment/gui/dp_gui_updatedata.hxx b/desktop/source/deployment/gui/dp_gui_updatedata.hxx index d64fe351673d..314f44935878 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedata.hxx +++ b/desktop/source/deployment/gui/dp_gui_updatedata.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 @@ -35,11 +35,11 @@ #include <boost/shared_ptr.hpp> -namespace com { namespace sun { namespace star { namespace deployment { +namespace com { namespace sun { namespace star { namespace deployment { class XPackage; }}}} -namespace com { namespace sun { namespace star { namespace xml { namespace dom { - class XNode; +namespace com { namespace sun { namespace star { namespace xml { namespace dom { + class XNode; }}}}} diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index b2e176550f0f..91f1aff66384 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.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 @@ -287,7 +287,7 @@ private: bool update( UpdateDialog::DisabledUpdate const & du, dp_gui::UpdateData const & data) const; - + css::uno::Reference< css::uno::XComponentContext > m_context; UpdateDialog & m_dialog; std::vector< css::uno::Reference< css::deployment::XPackage > > m_vExtensionList; @@ -341,7 +341,7 @@ void UpdateDialog::Thread::stop() { UpdateDialog::Thread::Entry::Entry( css::uno::Reference< css::deployment::XPackage > const & thePackage, rtl::OUString const & theVersion): - + package(thePackage), version(theVersion), bProvidesOwnUpdate(false), @@ -365,7 +365,7 @@ void UpdateDialog::Thread::execute() } css::uno::Reference<css::deployment::XExtensionManager> extMgr = css::deployment::ExtensionManager::get(m_context); - + std::vector<std::pair<css::uno::Reference<css::deployment::XPackage>, css::uno::Any > > errors; dp_misc::UpdateInfoMap updateInfoMap = dp_misc::getOnlineUpdateInfos( @@ -383,11 +383,11 @@ void UpdateDialog::Thread::execute() DisabledUpdate disableUpdate; //determine if online updates meet the requirements prepareUpdateData(info.info, disableUpdate, updateData); - + //determine if the update is installed in the user or shared repository rtl::OUString sOnlineVersion; if (info.info.is()) - sOnlineVersion = info.version; + sOnlineVersion = info.version; rtl::OUString sVersionUser; rtl::OUString sVersionShared; rtl::OUString sVersionBundled; @@ -406,9 +406,9 @@ void UpdateDialog::Thread::execute() sVersionShared = extensions[1]->getVersion(); if (extensions[2].is() ) sVersionBundled = extensions[2]->getVersion(); - + bool bSharedReadOnly = extMgr->isReadOnlyRepository(OUSTR("shared")); - + dp_misc::UPDATE_SOURCE sourceUser = dp_misc::isUpdateUserExtension( bSharedReadOnly, sVersionUser, sVersionShared, sVersionBundled, sOnlineVersion); dp_misc::UPDATE_SOURCE sourceShared = dp_misc::isUpdateSharedExtension( @@ -430,8 +430,8 @@ void UpdateDialog::Thread::execute() if (!update(disableUpdate, updateData)) return; } - - if (sourceShared != dp_misc::UPDATE_SOURCE_NONE) + + if (sourceShared != dp_misc::UPDATE_SOURCE_NONE) { if (sourceShared == dp_misc::UPDATE_SOURCE_BUNDLED) { @@ -441,10 +441,10 @@ void UpdateDialog::Thread::execute() updateData.bIsShared = true; if (!update(disableUpdate, updateData)) return; - } + } } - + SolarMutexGuard g; if (!m_stop) { m_dialog.checkingDone(); @@ -485,16 +485,16 @@ void UpdateDialog::Thread::handleSpecificError( b.append(version); else b.append(data.updateVersion); - - if (data.sWebsiteURL.getLength()) + + if (data.sWebsiteURL.getLength()) { b.append(static_cast< sal_Unicode >(' ')); { SolarMutexGuard g; - if(!m_stop) + if(!m_stop) b.append(m_dialog.m_browserbased); } - } + } return b.makeStringAndClear(); } @@ -845,7 +845,7 @@ void UpdateDialog::createNotifyJob( bool bPrepareOnly, } catch( const css::uno::Exception& e ) { - dp_misc::TRACE( OUSTR("Caught exception: ") + dp_misc::TRACE( OUSTR("Caught exception: ") + e.Message + OUSTR("\n thread terminated.\n\n")); } } @@ -864,14 +864,14 @@ void UpdateDialog::notifyMenubar( bool bPrepareOnly, bool bRecheckOnly ) for ( sal_Int16 i = 0; i < m_updates.getItemCount(); ++i ) { css::uno::Sequence< rtl::OUString > aItem(2); - + UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >(m_updates.GetEntryData(i)); - + if ( p->kind == ENABLED_UPDATE ) { dp_gui::UpdateData aUpdData = m_enabledUpdates[ p->index.enabledUpdate ]; aItem[0] = dp_misc::getIdentifier( aUpdData.aInstalledPackage ); - + dp_misc::DescriptionInfoset aInfoset( m_context, aUpdData.aUpdateInfo ); aItem[1] = aInfoset.getVersion(); } @@ -879,7 +879,7 @@ void UpdateDialog::notifyMenubar( bool bPrepareOnly, bool bRecheckOnly ) continue; else continue; - + aItemList.realloc( nCount + 1 ); aItemList[ nCount ] = aItem; nCount += 1; @@ -1052,10 +1052,10 @@ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG) if (p != NULL) { //When the index is greater or equal than the amount of enabled updates then the "Show all" - //button is probably checked. Then we show first all enabled and then the disabled - //updates. + //button is probably checked. Then we show first all enabled and then the disabled + //updates. USHORT pos = m_updates.GetSelectEntryPos(); - const std::vector< dp_gui::UpdateData >::size_type sizeEnabled = + const std::vector< dp_gui::UpdateData >::size_type sizeEnabled = m_enabledUpdates.size(); const std::vector< UpdateDialog::DisabledUpdate >::size_type sizeDisabled = m_disabledUpdates.size(); @@ -1066,7 +1066,7 @@ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG) else bInserted = showDescription(m_enabledUpdates[pos].aUpdateInfo); } - else if (pos >= sizeEnabled + else if (pos >= sizeEnabled && pos < (sizeEnabled + sizeDisabled)) bInserted = showDescription(m_disabledUpdates[pos - sizeEnabled].aUpdateInfo); @@ -1092,7 +1092,7 @@ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG) ::rtl::Bootstrap::expandMacros(sCurVersion); m_noDependencyCurVer = m_noDependencyCurVer.replaceAt( nPos, sVersion.getLength(), sCurVersion ); } - + b.append(m_noInstall); b.append(LF); b.append(m_noDependency); @@ -1207,7 +1207,7 @@ IMPL_LINK(UpdateDialog, allHandler, void *, EMPTYARG) { return 0; } -IMPL_LINK(UpdateDialog, okHandler, void *, EMPTYARG) +IMPL_LINK(UpdateDialog, okHandler, void *, EMPTYARG) { //If users are going to update a shared extension then we need //to warn them @@ -1220,7 +1220,7 @@ IMPL_LINK(UpdateDialog, okHandler, void *, EMPTYARG) // OSL_ASSERT(isReadOnly(i->aInstalledPackage) == sal_False); } - + for (USHORT i = 0; i < m_updates.getItemCount(); ++i) { UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >( diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx index b9882123d0fd..a9a8bcf71615 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.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 @@ -108,7 +108,7 @@ public: private: UpdateDialog(UpdateDialog &); // not defined void operator =(UpdateDialog &); // not defined - + struct DisabledUpdate; struct SpecificError; union IndexUnion; @@ -117,7 +117,7 @@ private: friend struct Index; class Thread; friend class Thread; - + class CheckListBox: public SvxCheckListBox { public: CheckListBox( @@ -171,7 +171,7 @@ private: ::com::sun::star::deployment::XPackage > const & aExtension); bool showDescription(std::pair< rtl::OUString, rtl::OUString > const & pairPublisher, rtl::OUString const & sReleaseNotes); - bool showDescription( ::com::sun::star::uno::Reference< + bool showDescription( ::com::sun::star::uno::Reference< ::com::sun::star::xml::dom::XNode > const & aUpdateInfo); bool showDescription( const String& rDescription, bool bWithPublisher ); bool isReadOnly( const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > &xPackage ) const; diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.src b/desktop/source/deployment/gui/dp_gui_updatedialog.src index 325d98c88d48..59539d55c1fc 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.src +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.src @@ -1,7 +1,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 @@ -247,7 +247,7 @@ ModalDialog RID_DLG_UPDATE { String RID_DLG_UPDATE_BROWSERBASED { Text[en-US] = "browser based update"; }; - + String RID_DLG_UPDATE_VERSION { Text[en-US] = "Version"; }; diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx index 685ce8b7c533..cfc42aa8d88c 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.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 @@ -64,7 +64,7 @@ #include "com/sun/star/deployment/ui/LicenseDialog.hpp" #include "com/sun/star/task/XInteractionHandler.hpp" #include "com/sun/star/ui/dialogs/XExecutableDialog.hpp" -#include "com/sun/star/ui/dialogs/ExecutableDialogResults.hpp" +#include "com/sun/star/ui/dialogs/ExecutableDialogResults.hpp" #include "com/sun/star/task/XInteractionAbort.hpp" #include "com/sun/star/task/XInteractionApprove.hpp" @@ -106,7 +106,7 @@ public: void stop(); - + private: Thread(Thread &); // not defined @@ -145,12 +145,12 @@ class UpdateCommandEnv friend class UpdateInstallDialog::Thread; UpdateInstallDialog & m_updateDialog; - ::rtl::Reference<UpdateInstallDialog::Thread> m_installThread; + ::rtl::Reference<UpdateInstallDialog::Thread> m_installThread; cssu::Reference< cssu::XComponentContext > m_xContext; public: virtual ~UpdateCommandEnv(); - UpdateCommandEnv( cssu::Reference< cssu::XComponentContext > const & xCtx, + UpdateCommandEnv( cssu::Reference< cssu::XComponentContext > const & xCtx, UpdateInstallDialog & updateDialog, ::rtl::Reference<UpdateInstallDialog::Thread>const & thread); @@ -199,13 +199,13 @@ void UpdateInstallDialog::Thread::stop() { UpdateInstallDialog::Thread::~Thread() {} -void UpdateInstallDialog::Thread::execute() +void UpdateInstallDialog::Thread::execute() { try { - downloadExtensions(); + downloadExtensions(); installExtensions(); } - catch (...) + catch (...) { } @@ -218,7 +218,7 @@ void UpdateInstallDialog::Thread::execute() { //make sure m_dialog is still alive SolarMutexGuard g; - if (! m_stop) + if (! m_stop) m_dialog.updateDone(); } //UpdateCommandEnv keeps a reference to Thread and prevents destruction. Therefore remove it. @@ -227,7 +227,7 @@ void UpdateInstallDialog::Thread::execute() UpdateInstallDialog::UpdateInstallDialog( - Window * parent, + Window * parent, std::vector<dp_gui::UpdateData> & aVecUpdateData, cssu::Reference< cssu::XComponentContext > const & xCtx): ModalDialog( @@ -245,7 +245,7 @@ UpdateInstallDialog::UpdateInstallDialog( m_sErrorDownload(String(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_DOWNLOAD))), m_sErrorInstallation(String(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_INSTALLATION))), m_sErrorLicenseDeclined(String(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_LIC_DECLINED))), - m_sNoInstall(String(DpGuiResId(RID_DLG_UPDATE_INSTALL_EXTENSION_NOINSTALL))), + m_sNoInstall(String(DpGuiResId(RID_DLG_UPDATE_INSTALL_EXTENSION_NOINSTALL))), m_sThisErrorOccurred(String(DpGuiResId(RID_DLG_UPDATE_INSTALL_THIS_ERROR_OCCURRED))), m_ft_action(this, DpGuiResId(RID_DLG_UPDATE_INSTALL_DOWNLOADING)), m_statusbar(this,DpGuiResId(RID_DLG_UPDATE_INSTALL_STATUSBAR)), @@ -269,21 +269,21 @@ UpdateInstallDialog::UpdateInstallDialog( UpdateInstallDialog::~UpdateInstallDialog() {} -BOOL UpdateInstallDialog::Close() +BOOL UpdateInstallDialog::Close() { m_thread->stop(); return ModalDialog::Close(); } -short UpdateInstallDialog::Execute() -{ +short UpdateInstallDialog::Execute() +{ m_thread->launch(); return ModalDialog::Execute(); } // make sure the solar mutex is locked before calling -void UpdateInstallDialog::updateDone() +void UpdateInstallDialog::updateDone() { if (!m_bError) m_mle_info.InsertText(m_sNoErrors); @@ -293,8 +293,8 @@ void UpdateInstallDialog::updateDone() } // make sure the solar mutex is locked before calling //sets an error message in the text area -void UpdateInstallDialog::setError(INSTALL_ERROR err, ::rtl::OUString const & sExtension, - OUString const & exceptionMessage) +void UpdateInstallDialog::setError(INSTALL_ERROR err, ::rtl::OUString const & sExtension, + OUString const & exceptionMessage) { String sError; m_bError = true; @@ -302,13 +302,13 @@ void UpdateInstallDialog::setError(INSTALL_ERROR err, ::rtl::OUString const & sE switch (err) { case ERROR_DOWNLOAD: - sError = m_sErrorDownload; + sError = m_sErrorDownload; break; case ERROR_INSTALLATION: - sError = m_sErrorInstallation; + sError = m_sErrorInstallation; break; case ERROR_LICENSE_DECLINED: - sError = m_sErrorLicenseDeclined; + sError = m_sErrorLicenseDeclined; break; default: @@ -316,14 +316,14 @@ void UpdateInstallDialog::setError(INSTALL_ERROR err, ::rtl::OUString const & sE } sError.SearchAndReplace(String(OUSTR("%NAME")), String(sExtension), 0); - //We want to have an empty line between the error messages. However, + //We want to have an empty line between the error messages. However, //there shall be no empty line after the last entry. if (m_bNoEntry) m_bNoEntry = false; else m_mle_info.InsertText(OUSTR("\n")); m_mle_info.InsertText(sError); - //Insert more information about the error + //Insert more information about the error if (exceptionMessage.getLength()) m_mle_info.InsertText(m_sThisErrorOccurred + exceptionMessage + OUSTR("\n")); @@ -331,13 +331,13 @@ void UpdateInstallDialog::setError(INSTALL_ERROR err, ::rtl::OUString const & sE m_mle_info.InsertText(OUSTR("\n")); } -void UpdateInstallDialog::setError(OUString const & exceptionMessage) +void UpdateInstallDialog::setError(OUString const & exceptionMessage) { m_bError = true; m_mle_info.InsertText(exceptionMessage + OUSTR("\n")); } -IMPL_LINK(UpdateInstallDialog, cancelHandler, void *, EMPTYARG) +IMPL_LINK(UpdateInstallDialog, cancelHandler, void *, EMPTYARG) { m_thread->stop(); EndDialog(RET_CANCEL); @@ -348,7 +348,7 @@ IMPL_LINK(UpdateInstallDialog, cancelHandler, void *, EMPTYARG) void UpdateInstallDialog::Thread::downloadExtensions() { - try + try { //create the download directory in the temp folder OUString sTempDir; @@ -358,35 +358,35 @@ void UpdateInstallDialog::Thread::downloadExtensions() //create a unique name for the directory OUString tempEntry, destFolder; if (::osl::File::createTempFile(&sTempDir, 0, &tempEntry ) != ::osl::File::E_None) - throw cssu::Exception(OUSTR("Could not create a temporary file in ") + sTempDir + + throw cssu::Exception(OUSTR("Could not create a temporary file in ") + sTempDir + OUSTR(". No extensions will be installed"), 0 ); - + tempEntry = tempEntry.copy( tempEntry.lastIndexOf( '/' ) + 1 ); - + destFolder = dp_misc::makeURL( sTempDir, tempEntry ); destFolder += OUSTR("_"); m_sDownloadFolder = destFolder; - try + try { dp_misc::create_folder(0, destFolder, m_updateCmdEnv.get(), true ); - } catch (cssu::Exception & e) + } catch (cssu::Exception & e) { throw cssu::Exception(e.Message + OUSTR(" No extensions will be installed."), 0); } - + sal_uInt16 count = 0; typedef std::vector<UpdateData>::iterator It; for (It i = m_aVecUpdateData.begin(); i != m_aVecUpdateData.end(); i++) { UpdateData & curData = *i; - + if (!curData.aUpdateInfo.is() || curData.aUpdateSource.is()) continue; - //We assume that m_aVecUpdateData contains only information about extensions which + //We assume that m_aVecUpdateData contains only information about extensions which //can be downloaded directly. OSL_ASSERT(curData.sWebsiteURL.getLength() == 0); - + //update the name of the extension which is to be downloaded { SolarMutexGuard g; @@ -405,7 +405,7 @@ void UpdateInstallDialog::Thread::downloadExtensions() OSL_ENSURE(seqDownloadURLs.getLength() > 0, "No download URL provided!"); for (sal_Int32 j = 0; j < seqDownloadURLs.getLength(); j++) { - try + try { OSL_ENSURE(seqDownloadURLs[j].getLength() > 0, "Download URL is empty!"); download(seqDownloadURLs[j], curData); @@ -420,7 +420,7 @@ void UpdateInstallDialog::Thread::downloadExtensions() //cases. Therefore ignore and continue. continue; } - } + } //update the progress and display download error { SolarMutexGuard g; @@ -441,11 +441,11 @@ void UpdateInstallDialog::Thread::downloadExtensions() buf.appendAscii(". "); buf.append(j->second.Message); } - m_dialog.setError(UpdateInstallDialog::ERROR_DOWNLOAD, curData.aInstalledPackage->getDisplayName(), + m_dialog.setError(UpdateInstallDialog::ERROR_DOWNLOAD, curData.aInstalledPackage->getDisplayName(), buf.makeStringAndClear()); } } - + } } catch (cssu::Exception & e) @@ -472,7 +472,7 @@ void UpdateInstallDialog::Thread::installExtensions() sal_uInt16 count = 0; typedef std::vector<UpdateData>::iterator It; for (It i = m_aVecUpdateData.begin(); i != m_aVecUpdateData.end(); i++, count++) - { + { //update the name of the extension which is to be installed { SolarMutexGuard g; @@ -551,7 +551,7 @@ void UpdateInstallDialog::Thread::installExtensions() { exc = e; bError = true; - } + } if (bLicenseDeclined) { @@ -559,7 +559,7 @@ void UpdateInstallDialog::Thread::installExtensions() if (m_stop) { return; } - m_dialog.setError(UpdateInstallDialog::ERROR_LICENSE_DECLINED, + m_dialog.setError(UpdateInstallDialog::ERROR_LICENSE_DECLINED, curData.aInstalledPackage->getDisplayName(), OUString()); } else if (!xExtension.is() || bError) @@ -568,7 +568,7 @@ void UpdateInstallDialog::Thread::installExtensions() if (m_stop) { return; } - m_dialog.setError(UpdateInstallDialog::ERROR_INSTALLATION, + m_dialog.setError(UpdateInstallDialog::ERROR_INSTALLATION, curData.aInstalledPackage->getDisplayName(), exc.Message); } } @@ -587,7 +587,7 @@ void UpdateInstallDialog::Thread::removeTempDownloads() { if (m_sDownloadFolder.getLength()) { - dp_misc::erase_path(m_sDownloadFolder, + dp_misc::erase_path(m_sDownloadFolder, cssu::Reference<css::ucb::XCommandEnvironment>(),false /* no throw: ignore errors */ ); //remove also the temp file which we have used to create the unique name OUString tempFile = m_sDownloadFolder.copy(0, m_sDownloadFolder.getLength() - 1); @@ -619,16 +619,16 @@ void UpdateInstallDialog::Thread::download(OUString const & sDownloadURL, Update destFolder = dp_misc::makeURL( m_sDownloadFolder, tempEntry ); destFolder += OUSTR("_"); - + ::ucbhelper::Content destFolderContent; dp_misc::create_folder( &destFolderContent, destFolder, m_updateCmdEnv.get() ); - ::ucbhelper::Content sourceContent; - dp_misc::create_ucb_content( &sourceContent, sDownloadURL, m_updateCmdEnv.get() ); + ::ucbhelper::Content sourceContent; + dp_misc::create_ucb_content( &sourceContent, sDownloadURL, m_updateCmdEnv.get() ); const OUString sTitle(sourceContent.getPropertyValue( dp_misc::StrTitle::get() ).get<OUString>() ); - + if (destFolderContent.transferContent( sourceContent, ::ucbhelper::InsertOperation_COPY, sTitle, css::ucb::NameClash::OVERWRITE )) @@ -648,7 +648,7 @@ void UpdateInstallDialog::Thread::download(OUString const & sDownloadURL, Update // ------------------------------------------------------------------------------------------------------- -UpdateCommandEnv::UpdateCommandEnv( cssu::Reference< cssu::XComponentContext > const & xCtx, +UpdateCommandEnv::UpdateCommandEnv( cssu::Reference< cssu::XComponentContext > const & xCtx, UpdateInstallDialog & updateDialog, ::rtl::Reference<UpdateInstallDialog::Thread>const & thread) : m_updateDialog( updateDialog ), @@ -686,8 +686,8 @@ void UpdateCommandEnv::handle( OSL_ASSERT( request.getValueTypeClass() == cssu::TypeClass_EXCEPTION ); dp_misc::TRACE(OUSTR("[dp_gui_cmdenv.cxx] incoming request:\n") + ::comphelper::anyToString(request) + OUSTR("\n\n")); - - css::deployment::VersionException verExc; + + css::deployment::VersionException verExc; bool approve = false; bool abort = false; @@ -695,7 +695,7 @@ void UpdateCommandEnv::handle( { //We must catch the version exception during the update, //because otherwise the user would be confronted with the dialogs, asking //them if they want to replace an already installed version of the same extension. - //During an update we assume that we always want to replace the old version with the + //During an update we assume that we always want to replace the old version with the //new version. approve = true; } @@ -727,7 +727,7 @@ void UpdateCommandEnv::handle( else if (abort) { cssu::Reference< css::task::XInteractionAbort > xInteractionAbort( pConts[ pos ], cssu::UNO_QUERY ); - if (xInteractionAbort.is()) { + if (xInteractionAbort.is()) { xInteractionAbort->select(); // don't query again for ongoing continuations: abort = false; diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx index a7b11ef355ec..a23488bfbf86 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.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 @@ -107,14 +107,14 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XExtensionManager > getExtensionManager() const { return m_xExtensionManager; } - rtl::Reference< Thread > m_thread; + rtl::Reference< Thread > m_thread; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xComponentContext; ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XExtensionManager > m_xExtensionManager; //Signals that an error occurred during download and installation bool m_bError; bool m_bNoEntry; bool m_bActivated; - + ::rtl::OUString m_sInstalling; ::rtl::OUString m_sFinished; ::rtl::OUString m_sNoErrors; @@ -124,8 +124,8 @@ private: ::rtl::OUString m_sNoInstall; ::rtl::OUString m_sThisErrorOccurred; - FixedText m_ft_action; - ProgressBar m_statusbar; + FixedText m_ft_action; + ProgressBar m_statusbar; FixedText m_ft_extension_name; FixedText m_ft_results; AutoScrollEdit m_mle_info; diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.src b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.src index d77dd256582c..7c4381775464 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.src +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.src @@ -1,7 +1,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 @@ -38,12 +38,12 @@ ModalDialog RID_DLG_UPDATEINSTALL { HelpId = HID_DEPLOYMENT_GUI_UPDATEINSTALL; Size = MAP_APPFONT( (RSC_SP_DLG_INNERBORDER_LEFT + LOCAL_WIDTH + - RSC_SP_DLG_INNERBORDER_RIGHT), + RSC_SP_DLG_INNERBORDER_RIGHT), (RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + RSC_CD_CHECKBOX_HEIGHT + - RSC_SP_CTRL_DESC_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_FLGR_SPACE_Y + LOCAL_LIST_HEIGHT + + RSC_SP_CTRL_DESC_Y + RSC_CD_CHECKBOX_HEIGHT + + RSC_SP_CTRL_DESC_Y + RSC_CD_FIXEDTEXT_HEIGHT + + RSC_SP_CTRL_Y + RSC_CD_FIXEDTEXT_HEIGHT + + RSC_SP_FLGR_SPACE_Y + LOCAL_LIST_HEIGHT + RSC_SP_FLGR_SPACE_Y + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_SPACE_Y + RSC_CD_PUSHBUTTON_HEIGHT + RSC_SP_DLG_INNERBORDER_BOTTOM)); @@ -60,30 +60,30 @@ ModalDialog RID_DLG_UPDATEINSTALL { Window RID_DLG_UPDATE_INSTALL_STATUSBAR { Pos = MAP_APPFONT( - RSC_SP_DLG_INNERBORDER_LEFT, + RSC_SP_DLG_INNERBORDER_LEFT, (RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_DESC_Y)); Size = MAP_APPFONT(LOCAL_WIDTH, RSC_CD_CHECKBOX_HEIGHT); Border = TRUE; }; - + FixedText RID_DLG_UPDATE_INSTALL_EXTENSION_NAME { Pos = MAP_APPFONT( - RSC_SP_DLG_INNERBORDER_LEFT, + RSC_SP_DLG_INNERBORDER_LEFT, RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_DESC_Y + RSC_CD_CHECKBOX_HEIGHT + RSC_SP_CTRL_DESC_Y); Size = MAP_APPFONT(LOCAL_WIDTH, RSC_CD_FIXEDTEXT_HEIGHT); Text[en-US] = ""; NoLabel = TRUE; }; - + FixedText RID_DLG_UPDATE_INSTALL_RESULTS { Pos = MAP_APPFONT( - RSC_SP_DLG_INNERBORDER_LEFT, + RSC_SP_DLG_INNERBORDER_LEFT, RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + RSC_CD_CHECKBOX_HEIGHT + - RSC_SP_CTRL_DESC_Y + RSC_CD_FIXEDTEXT_HEIGHT + + RSC_SP_CTRL_DESC_Y + RSC_CD_CHECKBOX_HEIGHT + + RSC_SP_CTRL_DESC_Y + RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_Y); Size = MAP_APPFONT(LOCAL_WIDTH, RSC_CD_FIXEDTEXT_HEIGHT); Text[en-US] = "Result"; @@ -93,9 +93,9 @@ ModalDialog RID_DLG_UPDATEINSTALL { Pos = MAP_APPFONT( RSC_SP_DLG_INNERBORDER_LEFT, RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + RSC_CD_CHECKBOX_HEIGHT + - RSC_SP_CTRL_DESC_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_Y + RSC_CD_FIXEDTEXT_HEIGHT + + RSC_SP_CTRL_DESC_Y + RSC_CD_CHECKBOX_HEIGHT + + RSC_SP_CTRL_DESC_Y + RSC_CD_FIXEDTEXT_HEIGHT + + RSC_SP_CTRL_Y + RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_DESC_Y); Size = MAP_APPFONT(LOCAL_WIDTH, LOCAL_LIST_HEIGHT); @@ -104,30 +104,30 @@ ModalDialog RID_DLG_UPDATEINSTALL { VScroll = TRUE; TabStop = FALSE; }; - + FixedLine RID_DLG_UPDATE_INSTALL_LINE { Pos = MAP_APPFONT( RSC_SP_DLG_INNERBORDER_LEFT, RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + RSC_CD_CHECKBOX_HEIGHT + - RSC_SP_CTRL_DESC_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT + + RSC_SP_CTRL_DESC_Y + RSC_CD_CHECKBOX_HEIGHT + + RSC_SP_CTRL_DESC_Y + RSC_CD_FIXEDTEXT_HEIGHT + + RSC_SP_CTRL_Y + RSC_CD_FIXEDTEXT_HEIGHT + + RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT + RSC_SP_FLGR_SPACE_Y); Size = MAP_APPFONT(LOCAL_WIDTH, RSC_CD_FIXEDLINE_HEIGHT); }; - - OKButton RID_DLG_UPDATE_INSTALL_OK { + + OKButton RID_DLG_UPDATE_INSTALL_OK { Disable = TRUE; Pos = MAP_APPFONT( RSC_SP_DLG_INNERBORDER_LEFT + LOCAL_WIDTH - LOCAL_BUTTON_WIDTH - RSC_SP_CTRL_GROUP_X - RSC_CD_PUSHBUTTON_WIDTH, RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + RSC_CD_CHECKBOX_HEIGHT + - RSC_SP_CTRL_DESC_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT + + RSC_SP_CTRL_DESC_Y + RSC_CD_CHECKBOX_HEIGHT + + RSC_SP_CTRL_DESC_Y + RSC_CD_FIXEDTEXT_HEIGHT + + RSC_SP_CTRL_Y + RSC_CD_FIXEDTEXT_HEIGHT + + RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT + RSC_SP_FLGR_SPACE_Y + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_SPACE_Y); @@ -138,12 +138,12 @@ ModalDialog RID_DLG_UPDATEINSTALL { CancelButton RID_DLG_UPDATE_INSTALL_ABORT { Pos = MAP_APPFONT( - RSC_SP_DLG_INNERBORDER_LEFT + LOCAL_WIDTH - LOCAL_BUTTON_WIDTH, + RSC_SP_DLG_INNERBORDER_LEFT + LOCAL_WIDTH - LOCAL_BUTTON_WIDTH, RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + RSC_CD_CHECKBOX_HEIGHT + - RSC_SP_CTRL_DESC_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT + + RSC_SP_CTRL_DESC_Y + RSC_CD_CHECKBOX_HEIGHT + + RSC_SP_CTRL_DESC_Y + RSC_CD_FIXEDTEXT_HEIGHT + + RSC_SP_CTRL_Y + RSC_CD_FIXEDTEXT_HEIGHT + + RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT + RSC_SP_FLGR_SPACE_Y + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_SPACE_Y); @@ -154,34 +154,34 @@ ModalDialog RID_DLG_UPDATEINSTALL { HelpButton RID_DLG_UPDATE_INSTALL_HELP { Pos = MAP_APPFONT( - RSC_SP_DLG_INNERBORDER_LEFT, + RSC_SP_DLG_INNERBORDER_LEFT, RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + RSC_CD_CHECKBOX_HEIGHT + - RSC_SP_CTRL_DESC_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT + + RSC_SP_CTRL_DESC_Y + RSC_CD_CHECKBOX_HEIGHT + + RSC_SP_CTRL_DESC_Y + RSC_CD_FIXEDTEXT_HEIGHT + + RSC_SP_CTRL_Y + RSC_CD_FIXEDTEXT_HEIGHT + + RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT + RSC_SP_FLGR_SPACE_Y + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_SPACE_Y); Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT); }; - - + + String RID_DLG_UPDATE_INSTALL_INSTALLING { Text[en-US] = "Installing extensions..."; }; - + String RID_DLG_UPDATE_INSTALL_FINISHED { Text[en-US] = "Installation finished"; }; - + String RID_DLG_UPDATE_INSTALL_NO_ERRORS { Text[en-US] = "No errors."; }; - + String RID_DLG_UPDATE_INSTALL_ERROR_DOWNLOAD { Text[en-US] = "Error while downloading extension %NAME. "; }; - + String RID_DLG_UPDATE_INSTALL_THIS_ERROR_OCCURRED { Text[en-US] = "The error message is: "; }; @@ -190,14 +190,14 @@ ModalDialog RID_DLG_UPDATEINSTALL { String RID_DLG_UPDATE_INSTALL_ERROR_INSTALLATION { Text[en-US] = "Error while installing extension %NAME. "; }; - + String RID_DLG_UPDATE_INSTALL_ERROR_LIC_DECLINED { Text[en-US] = "The license agreement for extension %NAME was refused. "; }; - + String RID_DLG_UPDATE_INSTALL_EXTENSION_NOINSTALL{ Text[en-US] = "The extension will not be installed."; - }; - + }; + }; diff --git a/desktop/source/deployment/gui/dp_gui_versionboxes.src b/desktop/source/deployment/gui/dp_gui_versionboxes.src index 878521ad6dd2..cc6edc0ad760 100644 --- a/desktop/source/deployment/gui/dp_gui_versionboxes.src +++ b/desktop/source/deployment/gui/dp_gui_versionboxes.src @@ -1,7 +1,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 @@ -40,7 +40,7 @@ String RID_STR_WARNINGBOX_VERSION_LESS_DIFFERENT_NAMES { Text [en-US] = "You are about to install version $NEW of the extension \'$NAME\'.\n" "The newer version $DEPLOYED, named \'$OLDNAME\', is already installed.\n" "Click \'OK\' to replace the installed extension.\n" - "Click \'Cancel\' to stop the installation."; + "Click \'Cancel\' to stop the installation."; }; WarningBox RID_WARNINGBOX_VERSION_EQUAL { @@ -62,7 +62,7 @@ String RID_STR_WARNINGBOX_VERSION_EQUAL_DIFFERENT_NAMES { WarningBox RID_WARNINGBOX_VERSION_GREATER { Buttons = WB_OK_CANCEL; DefButton = WB_DEF_OK; - Message[en-US] = "You are about to install version $NEW of the extension \'$NAME\'.\n" + Message[en-US] = "You are about to install version $NEW of the extension \'$NAME\'.\n" "The older version $DEPLOYED is already installed.\n" "Click \'OK\' to replace the installed extension.\n" "Click \'Cancel\' to stop the installation."; diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx index 2ebd75cbc377..9fd55d293859 100644 --- a/desktop/source/deployment/gui/license_dialog.cxx +++ b/desktop/source/deployment/gui/license_dialog.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 @@ -90,7 +90,7 @@ protected: }; struct LicenseDialogImpl : public ModalDialog -{ +{ cssu::Reference<cssu::XComponentContext> m_xComponentContext; FixedText m_ftHead; FixedText m_ftBody1; @@ -102,7 +102,7 @@ struct LicenseDialogImpl : public ModalDialog LicenseView m_mlLicense; PushButton m_pbDown; FixedLine m_flBottom; - + OKButton m_acceptButton; CancelButton m_declineButton; @@ -121,7 +121,7 @@ struct LicenseDialogImpl : public ModalDialog const ::rtl::OUString & sLicenseText); virtual void Activate(); - + }; LicenseView::LicenseView( Window* pParent, const ResId& rResId ) @@ -229,7 +229,7 @@ LicenseDialogImpl::LicenseDialogImpl( m_fiArrow2.Show(false); m_mlLicense.SetText(sLicenseText); m_ftHead.SetText(m_ftHead.GetText() + OUString('\n') + sExtensionName); - + m_mlLicense.SetEndReachedHdl( LINK(this, LicenseDialogImpl, EndReachedHdl) ); m_mlLicense.SetScrolledHdl( LINK(this, LicenseDialogImpl, ScrolledHdl) ); m_pbDown.SetClickHdl( LINK(this, LicenseDialogImpl, PageDownHdl) ); @@ -307,7 +307,7 @@ LicenseDialog::LicenseDialog( Sequence<Any> const& args, //______________________________________________________________________________ void LicenseDialog::setTitle( OUString const & ) throw (RuntimeException) { - + } //______________________________________________________________________________ diff --git a/desktop/source/deployment/gui/license_dialog.hxx b/desktop/source/deployment/gui/license_dialog.hxx index cb43f74ee528..7e7a8592e66f 100644 --- a/desktop/source/deployment/gui/license_dialog.hxx +++ b/desktop/source/deployment/gui/license_dialog.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 |