diff options
25 files changed, 489 insertions, 362 deletions
diff --git a/dbaccess/source/ext/macromigration/rangeprogressbar.hxx b/dbaccess/source/ext/macromigration/rangeprogressbar.hxx index 5c3585a53986..de9341636718 100644 --- a/dbaccess/source/ext/macromigration/rangeprogressbar.hxx +++ b/dbaccess/source/ext/macromigration/rangeprogressbar.hxx @@ -20,7 +20,7 @@ #ifndef DBACCESS_RANGEPROGRESSBAR_HXX #define DBACCESS_RANGEPROGRESSBAR_HXX -#include <svtools/prgsbar.hxx> +#include <vcl/prgsbar.hxx> //........................................................................ namespace dbmm diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk index cb067b3205c6..1122360f4691 100644 --- a/desktop/Module_desktop.mk +++ b/desktop/Module_desktop.mk @@ -37,6 +37,7 @@ $(eval $(call gb_Module_add_targets,desktop,\ Library_sofficeapp \ Library_spl \ Package_intro \ + UI_deployment \ Zip_brand \ Zip_brand_dev \ )) diff --git a/desktop/UI_deployment.mk b/desktop/UI_deployment.mk new file mode 100644 index 000000000000..c06e91fe29b7 --- /dev/null +++ b/desktop/UI_deployment.mk @@ -0,0 +1,16 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UI_UI,desktop)) + +$(eval $(call gb_UI_add_uifiles,desktop,\ + desktop/uiconfig/ui/ExtensionManager \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/desktop/source/deployment/gui/dp_gui.hrc b/desktop/source/deployment/gui/dp_gui.hrc index 08c557e6aa78..0adbea5d1f0a 100644 --- a/desktop/source/deployment/gui/dp_gui.hrc +++ b/desktop/source/deployment/gui/dp_gui.hrc @@ -23,21 +23,14 @@ #include "helpid.hrc" // Package Manager Dialog: -#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_HELP 11 -#define RID_EM_BTN_ADD 12 -#define RID_EM_BTN_CHECK_UPDATES 13 -#define RID_EM_BTN_CANCEL 15 -#define RID_EM_FT_TYPE_EXTENSIONS 16 -#define RID_EM_CBX_BUNDLED 17 -#define RID_EM_CBX_SHARED 18 -#define RID_EM_CBX_USER 19 -#define RID_EM_FT_GET_EXTENSIONS 20 -#define RID_EM_FT_PROGRESS 21 -#define RID_EM_FT_MSG 22 +#define RID_EM_BTN_CHECK_UPDATES 12 +#define RID_EM_BTN_CANCEL 13 +#define RID_EM_FT_PROGRESS 14 +#define RID_EM_FT_MSG 15 // local RIDs: #define PB_LICENSE_DOWN 50 diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index b7d924a9b5f7..442f34991774 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -152,9 +152,11 @@ class ExtBoxWithBtns_Impl : public ExtensionBox_Impl DECL_DLLPRIVATE_LINK( HandleHyperlink, FixedHyperlink * ); public: - ExtBoxWithBtns_Impl( ExtMgrDialog* pParent, TheExtensionManager *pManager ); + ExtBoxWithBtns_Impl(Window* pParent); ~ExtBoxWithBtns_Impl(); + void InitFromDialog(ExtMgrDialog *pParentDialog); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); virtual long Notify( NotifyEvent& rNEvt ); @@ -166,15 +168,23 @@ public: void enableButtons( bool bEnable ); }; +ExtBoxWithBtns_Impl::ExtBoxWithBtns_Impl(Window* pParent) + : ExtensionBox_Impl(pParent) + , m_bInterfaceLocked(false) + , m_pOptionsBtn(NULL) + , m_pEnableBtn(NULL) + , m_pRemoveBtn(NULL) + , m_pParent(NULL) +{ +} + //------------------------------------------------------------------------------ -ExtBoxWithBtns_Impl::ExtBoxWithBtns_Impl( ExtMgrDialog* pParent, TheExtensionManager *pManager ) : - ExtensionBox_Impl( pParent, pManager ), - m_bInterfaceLocked( false ), - m_pOptionsBtn( NULL ), - m_pEnableBtn( NULL ), - m_pRemoveBtn( NULL ), - m_pParent( pParent ) +void ExtBoxWithBtns_Impl::InitFromDialog(ExtMgrDialog *pParentDialog) { + setExtensionManager(pParentDialog->getExtensionManager()); + + m_pParent = pParentDialog; + m_pOptionsBtn = new PushButton( this, WB_TABSTOP ); m_pEnableBtn = new PushButton( this, WB_TABSTOP ); m_pRemoveBtn = new PushButton( this, WB_TABSTOP ); @@ -203,6 +213,12 @@ ExtBoxWithBtns_Impl::ExtBoxWithBtns_Impl( ExtMgrDialog* pParent, TheExtensionMan SetScrollHdl( LINK( this, ExtBoxWithBtns_Impl, ScrollHdl ) ); } + +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeExtBoxWithBtns(Window *pParent, VclBuilder::stringmap &) +{ + return new ExtBoxWithBtns_Impl(pParent); +} + //------------------------------------------------------------------------------ ExtBoxWithBtns_Impl::~ExtBoxWithBtns_Impl() { @@ -700,79 +716,53 @@ void DialogHelper::PostUserEvent( const Link& rLink, void* pCaller ) //------------------------------------------------------------------------------ // ExtMgrDialog //------------------------------------------------------------------------------ -ExtMgrDialog::ExtMgrDialog( Window *pParent, TheExtensionManager *pManager ) : - ModelessDialog( pParent, getResId( RID_DLG_EXTENSION_MANAGER ) ), - DialogHelper( pManager->getContext(), (Dialog*) this ), - m_aAddBtn( this, getResId( RID_EM_BTN_ADD ) ), - m_aUpdateBtn( this, getResId( RID_EM_BTN_CHECK_UPDATES ) ), - m_aCloseBtn( this, getResId( RID_EM_BTN_CLOSE ) ), - m_aHelpBtn( this, getResId( RID_EM_BTN_HELP ) ), - m_aDivider( this ), - m_aDivider2(this), - m_aTypeOfExtTxt( this , getResId( RID_EM_FT_TYPE_EXTENSIONS ) ), - m_aBundledCbx(this, getResId (RID_EM_CBX_BUNDLED)), - m_aSharedCbx(this, getResId (RID_EM_CBX_SHARED)), - m_aUserCbx (this, getResId (RID_EM_CBX_USER)), - m_aGetExtensions( this, getResId( RID_EM_FT_GET_EXTENSIONS ) ), - m_aProgressText( this, getResId( RID_EM_FT_PROGRESS ) ), - m_aProgressBar( this, WB_BORDER + WB_3DLOOK ), - m_aCancelBtn( this, getResId( RID_EM_BTN_CANCEL ) ), - m_sAddPackages( getResourceString( RID_STR_ADD_PACKAGES ) ), - m_bHasProgress( false ), - m_bProgressChanged( false ), - m_bStartProgress( false ), - m_bStopProgress( false ), - m_bEnableWarning( false ), - m_bDisableWarning( false ), - m_bDeleteWarning( false ), - m_nProgress( 0 ), - m_pManager( pManager ) -{ - // free local resources (RID < 256): - FreeResource(); - - m_pExtensionBox = new ExtBoxWithBtns_Impl( this, pManager ); +ExtMgrDialog::ExtMgrDialog(Window *pParent, TheExtensionManager *pManager) + : ModelessDialog(pParent, "ExtensionManagerDialog", "desktop/ui/ExtensionManager.ui") + , DialogHelper(pManager->getContext(), (Dialog*) this) + , m_sAddPackages(getResourceString(RID_STR_ADD_PACKAGES)) + , m_bHasProgress(false) + , m_bProgressChanged(false) + , m_bStartProgress(false) + , m_bStopProgress(false) + , m_bEnableWarning(false) + , m_bDisableWarning(false) + , m_bDeleteWarning(false) + , m_nProgress(0) + , m_pManager(pManager) +{ + get(m_pExtensionBox, "extensions"); + get(m_pAddBtn, "add"); + get(m_pUpdateBtn, "update"); + get(m_pCloseBtn, "close"); + get(m_pBundledCbx, "bundled"); + get(m_pSharedCbx, "shared"); + get(m_pUserCbx, "user"); + get(m_pGetExtensions, "getextensions"); + get(m_pProgressText, "progressft"); + get(m_pProgressBar, "progressbar"); + get(m_pCancelBtn, "cancel"); + + m_pExtensionBox->InitFromDialog(this); m_pExtensionBox->SetHyperlinkHdl( LINK( this, ExtMgrDialog, HandleHyperlink ) ); - m_aAddBtn.SetClickHdl( LINK( this, ExtMgrDialog, HandleAddBtn ) ); - m_aUpdateBtn.SetClickHdl( LINK( this, ExtMgrDialog, HandleUpdateBtn ) ); - m_aGetExtensions.SetClickHdl( LINK( this, ExtMgrDialog, HandleHyperlink ) ); - m_aCancelBtn.SetClickHdl( LINK( this, ExtMgrDialog, HandleCancelBtn ) ); - - m_aBundledCbx.SetClickHdl( LINK( this, ExtMgrDialog, HandleExtTypeCbx ) ); - m_aSharedCbx.SetClickHdl( LINK( this, ExtMgrDialog, HandleExtTypeCbx ) ); - m_aUserCbx.SetClickHdl( LINK( this, ExtMgrDialog, HandleExtTypeCbx ) ); - - // resize update button - Size aBtnSize = m_aUpdateBtn.GetSizePixel(); - String sTitle = m_aUpdateBtn.GetText(); - long nWidth = m_aUpdateBtn.GetCtrlTextWidth( sTitle ); - nWidth += 2 * m_aUpdateBtn.GetTextHeight(); - if ( nWidth > aBtnSize.Width() ) - m_aUpdateBtn.SetSizePixel( Size( nWidth, aBtnSize.Height() ) ); + m_pAddBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleAddBtn ) ); + m_pCloseBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleCloseBtn ) ); - // minimum size: - SetMinOutputSizePixel( - Size( // width: - (3 * m_aHelpBtn.GetSizePixel().Width()) + - m_aUpdateBtn.GetSizePixel().Width() + - (5 * RSC_SP_DLG_INNERBORDER_LEFT ), - // height: - (1 * m_aHelpBtn.GetSizePixel().Height()) + - (1 * m_aGetExtensions.GetSizePixel().Height()) + - (1 * m_pExtensionBox->GetMinOutputSizePixel().Height()) + - (3 * RSC_SP_DLG_INNERBORDER_TOP) ) ); + m_pUpdateBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleUpdateBtn ) ); + m_pGetExtensions->SetClickHdl( LINK( this, ExtMgrDialog, HandleHyperlink ) ); + m_pCancelBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleCancelBtn ) ); - m_aDivider.Show(); - m_aDivider2.Show(); + m_pBundledCbx->SetClickHdl( LINK( this, ExtMgrDialog, HandleExtTypeCbx ) ); + m_pSharedCbx->SetClickHdl( LINK( this, ExtMgrDialog, HandleExtTypeCbx ) ); + m_pUserCbx->SetClickHdl( LINK( this, ExtMgrDialog, HandleExtTypeCbx ) ); - m_aBundledCbx.Check( true ); - m_aSharedCbx.Check( true ); - m_aUserCbx.Check( true ); + m_pBundledCbx->Check( true ); + m_pSharedCbx->Check( true ); + m_pUserCbx->Check( true ); - m_aProgressBar.Hide(); + m_pProgressBar->Hide(); - m_aUpdateBtn.Enable( false ); + m_pUpdateBtn->Enable(false); m_aTimeoutTimer.SetTimeout( 500 ); // mSec m_aTimeoutTimer.SetTimeoutHdl( LINK( this, ExtMgrDialog, TimeOutHdl ) ); @@ -782,13 +772,12 @@ ExtMgrDialog::ExtMgrDialog( Window *pParent, TheExtensionManager *pManager ) : ExtMgrDialog::~ExtMgrDialog() { m_aTimeoutTimer.Stop(); - delete m_pExtensionBox; } //------------------------------------------------------------------------------ void ExtMgrDialog::setGetExtensionsURL( const ::rtl::OUString &rURL ) { - m_aGetExtensions.SetURL( rURL ); + m_pGetExtensions->SetURL( rURL ); } //------------------------------------------------------------------------------ @@ -797,19 +786,19 @@ long ExtMgrDialog::addPackageToList( const uno::Reference< deployment::XPackage { const SolarMutexGuard aGuard; - m_aUpdateBtn.Enable( true ); + m_pUpdateBtn->Enable(true); m_pExtensionBox->removeEntry(xPackage); - if (m_aBundledCbx.IsChecked() && xPackage->getRepositoryName().equals( BUNDLED_PACKAGE_MANAGER )) + if (m_pBundledCbx->IsChecked() && xPackage->getRepositoryName().equals( BUNDLED_PACKAGE_MANAGER )) { return m_pExtensionBox->addEntry( xPackage, bLicenseMissing ); } - else if (m_aSharedCbx.IsChecked() && xPackage->getRepositoryName().equals( SHARED_PACKAGE_MANAGER )) + else if (m_pSharedCbx->IsChecked() && xPackage->getRepositoryName().equals( SHARED_PACKAGE_MANAGER )) { return m_pExtensionBox->addEntry( xPackage, bLicenseMissing ); } - else if (m_aUserCbx.IsChecked() && xPackage->getRepositoryName().equals( USER_PACKAGE_MANAGER )) + else if (m_pUserCbx->IsChecked() && xPackage->getRepositoryName().equals( USER_PACKAGE_MANAGER )) { return m_pExtensionBox->addEntry( xPackage, bLicenseMissing ); } @@ -1009,6 +998,13 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleCancelBtn) return 1; } +IMPL_LINK_NOARG(ExtMgrDialog, HandleCloseBtn) +{ + Close(); + return 1; +} + + // ------------------------------------------------------------------------------ IMPL_LINK( ExtMgrDialog, startProgress, void*, _bLockInterface ) { @@ -1020,8 +1016,8 @@ IMPL_LINK( ExtMgrDialog, startProgress, void*, _bLockInterface ) if ( m_bStopProgress ) { - if ( m_aProgressBar.IsVisible() ) - m_aProgressBar.SetValue( 100 ); + if ( m_pProgressBar->IsVisible() ) + m_pProgressBar->SetValue( 100 ); m_xAbortChannel.clear(); OSL_TRACE( " startProgress handler: stop" ); @@ -1031,9 +1027,9 @@ IMPL_LINK( ExtMgrDialog, startProgress, void*, _bLockInterface ) OSL_TRACE( " startProgress handler: start" ); } - m_aCancelBtn.Enable( bLockInterface ); - m_aAddBtn.Enable( !bLockInterface ); - m_aUpdateBtn.Enable( !bLockInterface && m_pExtensionBox->getItemCount() ); + m_pCancelBtn->Enable( bLockInterface ); + m_pAddBtn->Enable( !bLockInterface ); + m_pUpdateBtn->Enable( !bLockInterface && m_pExtensionBox->getItemCount() ); m_pExtensionBox->enableButtons( !bLockInterface ); clearEventID(); @@ -1136,30 +1132,30 @@ IMPL_LINK_NOARG(ExtMgrDialog, TimeOutHdl) { m_bHasProgress = false; m_bStopProgress = false; - m_aProgressText.Hide(); - m_aProgressBar.Hide(); - m_aCancelBtn.Hide(); + m_pProgressText->Hide(); + m_pProgressBar->Hide(); + m_pCancelBtn->Hide(); } else { if ( m_bProgressChanged ) { m_bProgressChanged = false; - m_aProgressText.SetText( m_sProgressText ); + m_pProgressText->SetText(m_sProgressText); } if ( m_bStartProgress ) { m_bStartProgress = false; m_bHasProgress = true; - m_aProgressBar.Show(); - m_aProgressText.Show(); - m_aCancelBtn.Enable(); - m_aCancelBtn.Show(); + m_pProgressBar->Show(); + m_pProgressText->Show(); + m_pCancelBtn->Enable(); + m_pCancelBtn->Show(); } - if ( m_aProgressBar.IsVisible() ) - m_aProgressBar.SetValue( (sal_uInt16) m_nProgress ); + if ( m_pProgressBar->IsVisible() ) + m_pProgressBar->SetValue( (sal_uInt16) m_nProgress ); m_aTimeoutTimer.Start(); } @@ -1169,126 +1165,6 @@ IMPL_LINK_NOARG(ExtMgrDialog, TimeOutHdl) //------------------------------------------------------------------------------ // VCL::Window / Dialog -void ExtMgrDialog::Resize() -{ - Size aTotalSize( GetOutputSizePixel() ); - Size aBtnSize( m_aHelpBtn.GetSizePixel() ); - Size aUpdBtnSize( m_aUpdateBtn.GetSizePixel() ); - long offsetX; - -// last row of the box, lower 4 buttons - - 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(); - m_aCloseBtn.SetPosPixel( aPos ); - - aPos.X() -= ( RSC_SP_CTRL_X + aUpdBtnSize.Width() ); - m_aUpdateBtn.SetPosPixel( aPos ); - - aPos.X() -= ( RSC_SP_CTRL_GROUP_X + aBtnSize.Width() ); - m_aAddBtn.SetPosPixel( aPos ); - -// horizontal line above lower buttons - - Size aDivSize( aTotalSize.Width(), LINE_SIZE ); - aPos = Point( 0, aPos.Y() - LINE_SIZE - RSC_SP_DLG_INNERBORDER_BOTTOM ); - m_aDivider.SetPosSizePixel( aPos, aDivSize ); - -// text "get more extensions" - - Size aFTSize( m_aGetExtensions.CalcMinimumSize() ); -// aPos = Point( RSC_SP_DLG_INNERBORDER_LEFT, aPos.Y() - RSC_CD_FIXEDTEXT_HEIGHT - 2*RSC_SP_DLG_INNERBORDER_BOTTOM ); - aPos = Point( RSC_SP_DLG_INNERBORDER_LEFT, aPos.Y() - RSC_CD_PUSHBUTTON_HEIGHT - 2*RSC_SP_DLG_INNERBORDER_BOTTOM ); - - m_aGetExtensions.SetPosSizePixel( aPos, aFTSize ); - -// installation progress bar + cancel button , on the right of the text to get extensions - - 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(); - - if( IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ) ) - { - ImplControlValue aValue; - Rectangle aControlRegion( Point( 0, 0 ), m_aProgressBar.GetSizePixel() ); - Rectangle aNativeControlRegion, aNativeContentRegion; - if( GetNativeControlRegion( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion, - CTRL_STATE_ENABLED, aValue, rtl::OUString(), - aNativeControlRegion, aNativeContentRegion ) != sal_False ) - { - nProgressHeight = aNativeControlRegion.GetHeight(); - } - } - - if ( nProgressHeight < PROGRESS_HEIGHT ) - nProgressHeight = PROGRESS_HEIGHT; - - aPos.X() -= ( RSC_SP_CTRL_GROUP_Y + PROGRESS_WIDTH ); - m_aProgressBar.SetPosSizePixel( Point( aPos.X(), aPos.Y() - ((nProgressHeight-aFTSize.Height())/2) ), - Size( PROGRESS_WIDTH, nProgressHeight ) ); - - Rectangle aRect1( m_aGetExtensions.GetPosPixel(), m_aGetExtensions.GetSizePixel() ); - Rectangle aRect2( m_aProgressBar.GetPosPixel(), m_aProgressBar.GetSizePixel() ); - - aFTSize.Width() = ( aRect2.Left() - aRect1.Right() ) - 2*RSC_SP_DLG_INNERBORDER_LEFT; - aPos.X() = aRect1.Right() + RSC_SP_DLG_INNERBORDER_LEFT; - m_aProgressText.SetPosSizePixel( aPos, aFTSize ); - -// checkboxes + text "type of extensions" - - long nWidth = m_aBundledCbx.GetCtrlTextWidth( m_aBundledCbx.GetText() ); - Size aBCBSize(m_aBundledCbx.GetSizePixel()); - aBCBSize.Width() = nWidth + 30; - m_aBundledCbx.SetSizePixel( aBCBSize ); - - nWidth = m_aSharedCbx.GetCtrlTextWidth( m_aSharedCbx.GetText() ); - Size aSCBSize(m_aSharedCbx.GetSizePixel()); - aSCBSize.Width() = nWidth + 30; - m_aSharedCbx.SetSizePixel( aSCBSize ); - - nWidth = m_aUserCbx.GetCtrlTextWidth( m_aUserCbx.GetText() ); - Size aUCBSize(m_aUserCbx.GetSizePixel()); - aUCBSize.Width() = nWidth + 30; - m_aUserCbx.SetSizePixel( aUCBSize ); - - offsetX = 0.5*(aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - RSC_SP_DLG_INNERBORDER_RIGHT - 3*RSC_SP_CTRL_GROUP_X - aBCBSize.Width() - aSCBSize.Width() - aUCBSize.Width() ); - - aPos = Point(offsetX, aPos.Y() - RSC_CD_CHECKBOX_HEIGHT - 2*RSC_SP_DLG_INNERBORDER_BOTTOM); - m_aBundledCbx.SetPosPixel( aPos ); - aPos.X() += aBCBSize.Width() + 3 * RSC_SP_CTRL_GROUP_X; - m_aSharedCbx.SetPosPixel( aPos ); - aPos.X() += aSCBSize.Width() + 3 * RSC_SP_CTRL_GROUP_X; - m_aUserCbx.SetPosPixel( aPos ); - - Size aFTTypeOfExtSize(m_aTypeOfExtTxt.GetSizePixel()); - aPos = Point(RSC_SP_DLG_INNERBORDER_LEFT , aPos.Y() - RSC_CD_FIXEDTEXT_HEIGHT - 2*RSC_SP_DLG_INNERBORDER_BOTTOM); - - m_aTypeOfExtTxt.SetPosSizePixel(aPos, aFTTypeOfExtSize); - - aPos.X() = RSC_SP_DLG_INNERBORDER_LEFT + aFTTypeOfExtSize.Width(); - aPos.Y() = aPos.Y() + RSC_CD_FIXEDTEXT_HEIGHT; - aDivSize.Width() = aTotalSize.Width() - aFTTypeOfExtSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - RSC_SP_DLG_INNERBORDER_RIGHT; - m_aDivider2.SetPosSizePixel( aPos , aDivSize ); - -// extension listbox - - Size aSize( aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - RSC_SP_DLG_INNERBORDER_RIGHT, - aTotalSize.Height() - aBtnSize.Height() - LINE_SIZE - aBtnSize.Height() - - aBCBSize.Height() - aFTTypeOfExtSize.Height() - - RSC_SP_DLG_INNERBORDER_TOP - 5*RSC_SP_DLG_INNERBORDER_BOTTOM ); - - m_pExtensionBox->SetSizePixel(aSize ); - -} -//------------------------------------------------------------------------------ -// VCL::Window / Dialog long ExtMgrDialog::Notify( NotifyEvent& rNEvt ) { @@ -1303,12 +1179,12 @@ long ExtMgrDialog::Notify( NotifyEvent& rNEvt ) if ( nKeyCode == KEY_TAB ) { if ( aKeyCode.IsShift() ) { - if ( m_aAddBtn.HasFocus() ) { + if ( m_pAddBtn->HasFocus() ) { m_pExtensionBox->GrabFocus(); bHandled = true; } } else { - if ( m_aGetExtensions.HasFocus() ) { + if ( m_pGetExtensions->HasFocus() ) { m_pExtensionBox->GrabFocus(); bHandled = true; } diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx index 542e04082545..8f8dd8955707 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx @@ -33,9 +33,9 @@ #include "vcl/button.hxx" #include "vcl/fixed.hxx" #include "vcl/fixedhyper.hxx" +#include "vcl/prgsbar.hxx" #include "vcl/timer.hxx" -#include "svtools/prgsbar.hxx" #include "svtools/svmedit.hxx" #include "osl/conditn.hxx" @@ -108,20 +108,16 @@ class ExtMgrDialog : public ModelessDialog, public DialogHelper { ExtBoxWithBtns_Impl *m_pExtensionBox; - PushButton m_aAddBtn; - PushButton m_aUpdateBtn; - OKButton m_aCloseBtn; - HelpButton m_aHelpBtn; - FixedLine m_aDivider; - FixedLine m_aDivider2; - FixedText m_aTypeOfExtTxt; - CheckBox m_aBundledCbx; - CheckBox m_aSharedCbx; - CheckBox m_aUserCbx; - FixedHyperlink m_aGetExtensions; - FixedText m_aProgressText; - ProgressBar m_aProgressBar; - CancelButton m_aCancelBtn; + PushButton *m_pAddBtn; + PushButton *m_pUpdateBtn; + PushButton *m_pCloseBtn; + CheckBox *m_pBundledCbx; + CheckBox *m_pSharedCbx; + CheckBox *m_pUserCbx; + FixedHyperlink *m_pGetExtensions; + FixedText *m_pProgressText; + ProgressBar *m_pProgressBar; + CancelButton *m_pCancelBtn; const String m_sAddPackages; String m_sProgressText; String m_sLastFolderURL; @@ -144,6 +140,7 @@ class ExtMgrDialog : public ModelessDialog, DECL_DLLPRIVATE_LINK( HandleAddBtn, void * ); DECL_DLLPRIVATE_LINK( HandleUpdateBtn, void * ); DECL_DLLPRIVATE_LINK( HandleCancelBtn, void * ); + DECL_DLLPRIVATE_LINK( HandleCloseBtn, void * ); DECL_DLLPRIVATE_LINK( HandleExtTypeCbx, void * ); DECL_DLLPRIVATE_LINK( HandleHyperlink, FixedHyperlink * ); DECL_DLLPRIVATE_LINK(TimeOutHdl, void *); @@ -153,7 +150,6 @@ public: ExtMgrDialog( Window * pParent, TheExtensionManager *pManager ); virtual ~ExtMgrDialog(); - virtual void Resize(); virtual long Notify( NotifyEvent& rNEvt ); virtual sal_Bool Close(); @@ -173,6 +169,8 @@ public: bool updatePackage(const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > &xPackage ); bool acceptLicense(const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > &xPackage ); + TheExtensionManager* getExtensionManager() const { return m_pManager; } + virtual void prepareChecking(); virtual void checkEntries(); diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.src b/desktop/source/deployment/gui/dp_gui_dialog2.src index 1be415a057a7..134ed1fd62a1 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.src +++ b/desktop/source/deployment/gui/dp_gui_dialog2.src @@ -28,102 +28,6 @@ #include "svtools/controldims.hrc" #include "dp_gui.hrc" -ModelessDialog RID_DLG_EXTENSION_MANAGER -{ - HelpId = HID_PACKAGE_MANAGER; - Text [ en-US ] = "Extension Manager"; - - Size = MAP_APPFONT( 300, 250 ); - OutputSize = TRUE; - SVLook = TRUE; - Moveable = TRUE; - Closeable = TRUE; - Sizeable = TRUE; - Hide = TRUE; - - FixedText RID_EM_FT_TYPE_EXTENSIONS - { - NoLabel = FALSE; - TabStop = TRUE; - Text [ en-US ] = "Type of Extension"; - Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_FIXEDTEXT_HEIGHT ); - }; - CheckBox RID_EM_CBX_BUNDLED - { - HelpID = "desktop:CheckBox:RID_DLG_EXTENSION_MANAGER:RID_EM_CBX_BUNDLED"; - Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_CHECKBOX_HEIGHT ); - TabStop = TRUE ; - Text [ en-US ] = "~Installation" ; - }; - CheckBox RID_EM_CBX_SHARED - { - HelpID = "desktop:CheckBox:RID_DLG_EXTENSION_MANAGER:RID_EM_CBX_SHARED"; - TabStop = TRUE ; - Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_CHECKBOX_HEIGHT ); - Text [ en-US ] = "~Shared" ; - }; - CheckBox RID_EM_CBX_USER - { - HelpID = "desktop:CheckBox:RID_DLG_EXTENSION_MANAGER:RID_EM_CBX_USER"; - TabStop = TRUE ; - Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_CHECKBOX_HEIGHT ); - Text [ en-US ] = "~User" ; - }; - - PushButton RID_EM_BTN_ADD - { - HelpID = "desktop:PushButton:RID_DLG_EXTENSION_MANAGER:RID_EM_BTN_ADD"; - TabStop = TRUE; - Text [ en-US ] = "~Add..."; - Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); - }; - - PushButton RID_EM_BTN_CHECK_UPDATES - { - HelpID = "desktop:PushButton:RID_DLG_EXTENSION_MANAGER:RID_EM_BTN_CHECK_UPDATES"; - TabStop = TRUE; - Text [ en-US ] = "~Check for Updates..."; - Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); - }; - - FixedText RID_EM_FT_GET_EXTENSIONS - { - NoLabel = TRUE; - TabStop = TRUE; - Text [ en-US ] = "Get more extensions online..."; - Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_FIXEDTEXT_HEIGHT ); - }; - - FixedText RID_EM_FT_PROGRESS - { - Hide = TRUE; - Right = TRUE; - Text [ en-US ] = "Adding %EXTENSION_NAME"; - Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_FIXEDTEXT_HEIGHT ); - }; - - CancelButton RID_EM_BTN_CANCEL - { - TabStop = TRUE; - Hide = TRUE; - Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); - }; - - OKButton RID_EM_BTN_CLOSE - { - TabStop = TRUE; - DefButton = TRUE; - Text [ en-US ] = "Close"; - Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); - }; - - HelpButton RID_EM_BTN_HELP - { - TabStop = TRUE; - Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); - }; -}; - ModalDialog RID_DLG_UPDATE_REQUIRED { HelpId = HID_PACKAGE_MANAGER_UPD_REQ; diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 4163dc53474f..b25150673315 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -168,7 +168,7 @@ ExtensionRemovedListener::~ExtensionRemovedListener() //------------------------------------------------------------------------------ // ExtensionBox_Impl //------------------------------------------------------------------------------ -ExtensionBox_Impl::ExtensionBox_Impl( Dialog* pParent, TheExtensionManager *pManager ) : +ExtensionBox_Impl::ExtensionBox_Impl( Window* pParent, TheExtensionManager *pManager ) : IExtensionListBox( pParent, WB_BORDER | WB_TABSTOP | WB_CHILDDLGCTRL ), m_bHasScrollBar( false ), m_bHasActive( false ), @@ -187,6 +187,33 @@ ExtensionBox_Impl::ExtensionBox_Impl( Dialog* pParent, TheExtensionManager *pMan m_pScrollBar( NULL ), m_pManager( pManager ) { + Init(); +} + +ExtensionBox_Impl::ExtensionBox_Impl(Window* pParent) : + IExtensionListBox( pParent, WB_BORDER | WB_TABSTOP | WB_CHILDDLGCTRL ), + m_bHasScrollBar( false ), + m_bHasActive( false ), + m_bNeedsRecalc( true ), + m_bInCheckMode( false ), + m_bAdjustActive( false ), + m_bInDelete( false ), + m_nActive( 0 ), + m_nTopIndex( 0 ), + m_nActiveHeight( 0 ), + m_nExtraHeight( 2 ), + m_aSharedImage( DialogHelper::getResId( RID_IMG_SHARED ) ), + m_aLockedImage( DialogHelper::getResId( RID_IMG_LOCKED ) ), + m_aWarningImage( DialogHelper::getResId( RID_IMG_WARNING ) ), + m_aDefaultImage( DialogHelper::getResId( RID_IMG_EXTENSION ) ), + m_pScrollBar( NULL ), + m_pManager( NULL ) +{ + Init(); +} + +void ExtensionBox_Impl::Init() +{ SetHelpId( HID_EXTENSION_MANAGER_LISTBOX ); m_pScrollBar = new ScrollBar( this, WB_VERT ); diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx index 2ca3da7bb94c..6104eb0d156b 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx @@ -178,8 +178,10 @@ class ExtensionBox_Impl : public ::svt::IExtensionListBox void checkIndex(sal_Int32 pos) const; + void Init(); public: - ExtensionBox_Impl( Dialog* pParent, TheExtensionManager *pManager ); + ExtensionBox_Impl(Window* pParent); + ExtensionBox_Impl(Window* pParent, TheExtensionManager *pManager); ~ExtensionBox_Impl(); virtual void MouseButtonDown( const MouseEvent& rMEvt ); @@ -211,6 +213,7 @@ public: void checkEntries(); TheExtensionManager* getExtensionManager() const { return m_pManager; } + void setExtensionManager(TheExtensionManager* pManager) { m_pManager = pManager; } //=================================================================================== //These functions are used for automatic testing diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx index d1e4e44c83e4..c0d24b22b791 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx @@ -24,7 +24,7 @@ #include "vcl/button.hxx" #include "vcl/fixed.hxx" #include "vcl/dialog.hxx" -#include "svtools/prgsbar.hxx" +#include "vcl/prgsbar.hxx" #include "rtl/ref.hxx" #include <vector> diff --git a/desktop/source/inc/helpid.hrc b/desktop/source/inc/helpid.hrc index 90ff58289aa2..768c57334388 100644 --- a/desktop/source/inc/helpid.hrc +++ b/desktop/source/inc/helpid.hrc @@ -19,7 +19,6 @@ #ifndef INCLUDED_DESKTOP_HELPID_HRC #define INCLUDED_DESKTOP_HELPID_HRC -#define HID_PACKAGE_MANAGER "DESKTOP_HID_PACKAGE_MANAGER" #define HID_PACKAGE_MANAGER_TREELISTBOX "DESKTOP_HID_PACKAGE_MANAGER_TREELISTBOX" #define HID_PACKAGE_MANAGER_PROGRESS "DESKTOP_HID_PACKAGE_MANAGER_PROGRESS" #define HID_PACKAGE_MANAGER_PROGRESS_CANCEL "DESKTOP_HID_PACKAGE_MANAGER_PROGRESS_CANCEL" diff --git a/desktop/uiconfig/ui/ExtensionManager.ui b/desktop/uiconfig/ui/ExtensionManager.ui new file mode 100644 index 000000000000..fc336970779a --- /dev/null +++ b/desktop/uiconfig/ui/ExtensionManager.ui @@ -0,0 +1,304 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="ExtensionManagerDialog"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Extension Manager</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + <property name="secondary">True</property> + </packing> + </child> + <child> + <object class="GtkButton" id="add"> + <property name="label" translatable="yes">Add...</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="update"> + <property name="label" translatable="yes">Check for updates...</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkButton" id="close"> + <property name="label">gtk-close</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">10</property> + <child> + <object class="deploymentgui:ExtBoxWithBtns" id="extensions"> + <property name="width_request">600</property> + <property name="height_request">320</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="xalign">1</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">center</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkCheckButton" id="shared"> + <property name="label" translatable="yes">Shared</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="halign">center</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="user"> + <property name="label" translatable="yes">User</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="halign">start</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="bundled"> + <property name="label" translatable="yes">Installation</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="halign">end</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Type of Extension</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkLabel" id="progressft"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="margin_left">50</property> + <property name="label" translatable="yes">Adding %EXTENSION_NAME</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> + <property name="use_action_appearance">False</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="no_show_all">True</property> + <property name="use_action_appearance">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkProgressBar" id="progressbar"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLinkButton" id="getextensions"> + <property name="label" translatable="yes">Get more extensions online...</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="has_tooltip">True</property> + <property name="use_action_appearance">False</property> + <property name="relief">none</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">help</action-widget> + <action-widget response="0">add</action-widget> + <action-widget response="0">update</action-widget> + <action-widget response="0">close</action-widget> + </action-widgets> + </object> +</interface> diff --git a/desktop/util/hidother.src b/desktop/util/hidother.src index 3e314f4cb05e..f2607b08789a 100644 --- a/desktop/util/hidother.src +++ b/desktop/util/hidother.src @@ -18,7 +18,6 @@ #include "../source/inc/helpid.hrc" -hidspecial HID_PACKAGE_MANAGER { HelpID = HID_PACKAGE_MANAGER; }; hidspecial HID_PACKAGE_MANAGER_MENU_ITEM { HelpID = HID_PACKAGE_MANAGER_MENU_ITEM; }; hidspecial HID_PACKAGE_MANAGER_TREELISTBOX { HelpID = HID_PACKAGE_MANAGER_TREELISTBOX; }; hidspecial HID_PACKAGE_MANAGER_PROGRESS { HelpID = HID_PACKAGE_MANAGER_PROGRESS; }; diff --git a/padmin/source/progress.hxx b/padmin/source/progress.hxx index dcb8a09a90db..a5f383b193b1 100644 --- a/padmin/source/progress.hxx +++ b/padmin/source/progress.hxx @@ -23,8 +23,7 @@ #include "vcl/dialog.hxx" #include "vcl/fixed.hxx" #include "vcl/button.hxx" - -#include "svtools/prgsbar.hxx" +#include "vcl/prgsbar.hxx" namespace padmin { diff --git a/sd/source/ui/inc/BreakDlg.hxx b/sd/source/ui/inc/BreakDlg.hxx index 5e7f415bb0b1..b4d3757e9200 100644 --- a/sd/source/ui/inc/BreakDlg.hxx +++ b/sd/source/ui/inc/BreakDlg.hxx @@ -34,7 +34,7 @@ #include <svx/dlgctrl.hxx> #include <vcl/field.hxx> #include <vcl/fixed.hxx> -#include <svtools/prgsbar.hxx> +#include <vcl/prgsbar.hxx> #include <vcl/edit.hxx> #include <svtools/stdctrl.hxx> #include <sfx2/basedlgs.hxx> diff --git a/sd/source/ui/inc/vectdlg.hxx b/sd/source/ui/inc/vectdlg.hxx index 0806a39ce276..a74114fa57ea 100644 --- a/sd/source/ui/inc/vectdlg.hxx +++ b/sd/source/ui/inc/vectdlg.hxx @@ -36,8 +36,8 @@ #include <vcl/field.hxx> #include <vcl/dialog.hxx> #include <vcl/gdimtf.hxx> +#include <vcl/prgsbar.hxx> #include <svx/graphctl.hxx> -#include <svtools/prgsbar.hxx> namespace sd { class DrawDocShell; diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk index 4916808e748c..56fd3c07990c 100644 --- a/svtools/Library_svt.mk +++ b/svtools/Library_svt.mk @@ -119,7 +119,6 @@ $(eval $(call gb_Library_add_exception_objects,svt,\ svtools/source/control/hyperlabel \ svtools/source/control/indexentryres \ svtools/source/control/inettbc \ - svtools/source/control/prgsbar \ svtools/source/control/roadmap \ svtools/source/control/ruler \ svtools/source/control/scriptedtext \ diff --git a/svtools/Package_inc.mk b/svtools/Package_inc.mk index 3aeb5d36d2f7..7ec94d3407d0 100644 --- a/svtools/Package_inc.mk +++ b/svtools/Package_inc.mk @@ -115,7 +115,6 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/place.hxx,svtools/plac $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/PlaceEditDialog.hxx,svtools/PlaceEditDialog.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/popupmenucontrollerbase.hxx,svtools/popupmenucontrollerbase.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/popupwindowcontroller.hxx,svtools/popupwindowcontroller.hxx)) -$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/prgsbar.hxx,svtools/prgsbar.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/printoptions.hxx,svtools/printoptions.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/prnsetup.hxx,svtools/prnsetup.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/roadmap.hxx,svtools/roadmap.hxx)) diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx index bb05a95e5a89..9034f1383055 100644 --- a/svtools/source/uno/unoiface.cxx +++ b/svtools/source/uno/unoiface.cxx @@ -29,6 +29,7 @@ #include <tools/debug.hxx> #include <vcl/fixedhyper.hxx> +#include <vcl/prgsbar.hxx> #include <vcl/svapp.hxx> #include <svtools/svmedit.hxx> #include <unoiface.hxx> @@ -43,7 +44,6 @@ #include <svtools/fmtfield.hxx> #include <svl/numuno.hxx> #include <svtools/calendar.hxx> -#include <svtools/prgsbar.hxx> #include <svtools/treelistbox.hxx> #include "treecontrolpeer.hxx" #include "svtxgridcontrol.hxx" diff --git a/sw/source/ui/dbui/mmoutputpage.hxx b/sw/source/ui/dbui/mmoutputpage.hxx index 0babb244d4ab..1a9bf7f882a7 100644 --- a/sw/source/ui/dbui/mmoutputpage.hxx +++ b/sw/source/ui/dbui/mmoutputpage.hxx @@ -33,11 +33,11 @@ #include <vcl/combobox.hxx> #include <vcl/field.hxx> #include <vcl/lstbox.hxx> +#include <vcl/prgsbar.hxx> #include <sfx2/objsh.hxx> #include <sfx2/basedlgs.hxx> #include <svtools/svtabbx.hxx> #include <svtools/headbar.hxx> -#include <svtools/prgsbar.hxx> #include "swdllapi.h" #include "mailmergehelper.hxx" diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 212eb8e07c94..004325af146f 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -140,6 +140,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/control/menubtn \ vcl/source/control/morebtn \ vcl/source/control/quickselectionengine \ + vcl/source/control/prgsbar \ vcl/source/control/scrbar \ vcl/source/control/slider \ vcl/source/control/spinbtn \ diff --git a/vcl/Package_inc.mk b/vcl/Package_inc.mk index a079a7a20088..1c488bed8cb0 100644 --- a/vcl/Package_inc.mk +++ b/vcl/Package_inc.mk @@ -106,6 +106,7 @@ $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/pngwrite.hxx,vcl/pngwrite.hxx) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/pointr.hxx,vcl/pointr.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/popupmenuwindow.hxx,vcl/popupmenuwindow.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/ppdparser.hxx,vcl/ppdparser.hxx)) +$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/prgsbar.hxx,vcl/prgsbar.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/printerinfomanager.hxx,vcl/printerinfomanager.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/print.hxx,vcl/print.hxx)) $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/prntypes.hxx,vcl/prntypes.hxx)) diff --git a/svtools/inc/svtools/prgsbar.hxx b/vcl/inc/vcl/prgsbar.hxx index 1f4b311fdc45..fb686702c4ac 100644 --- a/svtools/inc/svtools/prgsbar.hxx +++ b/vcl/inc/vcl/prgsbar.hxx @@ -20,7 +20,7 @@ #ifndef _PRGSBAR_HXX #define _PRGSBAR_HXX -#include "svtools/svtdllapi.h" +#include <vcl/dllapi.h> #include <vcl/window.hxx> /************************************************************************* @@ -58,7 +58,7 @@ groesser 100 gesetzt werden, faengt das letzte Rechteck an zu blinken. // - ProgressBar - // --------------- -class SVT_DLLPUBLIC ProgressBar : public Window +class VCL_DLLPUBLIC ProgressBar : public Window { private: Point maPos; @@ -68,12 +68,10 @@ private: sal_uInt16 mnPercentCount; sal_Bool mbCalcNew; -#ifdef _SV_PRGSBAR_CXX using Window::ImplInit; - SVT_DLLPRIVATE void ImplInit(); - SVT_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); - SVT_DLLPRIVATE void ImplDrawProgress( sal_uInt16 nOldPerc, sal_uInt16 nNewPerc ); -#endif + SAL_DLLPRIVATE void ImplInit(); + SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + SAL_DLLPRIVATE void ImplDrawProgress( sal_uInt16 nOldPerc, sal_uInt16 nNewPerc ); public: ProgressBar( Window* pParent, WinBits nWinBits = WB_STDPROGRESSBAR ); diff --git a/svtools/source/control/prgsbar.cxx b/vcl/source/control/prgsbar.cxx index 18881a07a59e..5b0d04ccdba7 100644 --- a/svtools/source/control/prgsbar.cxx +++ b/vcl/source/control/prgsbar.cxx @@ -22,7 +22,7 @@ #include <tools/debug.hxx> #include <vcl/status.hxx> -#include <svtools/prgsbar.hxx> +#include <vcl/prgsbar.hxx> // ======================================================================= diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 55c9ecbf661c..aa33c16f7143 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -20,6 +20,7 @@ #include <vcl/layout.hxx> #include <vcl/lstbox.hxx> #include <vcl/menubtn.hxx> +#include <vcl/prgsbar.hxx> #include <vcl/scrbar.hxx> #include <vcl/svapp.hxx> #include <vcl/tabctrl.hxx> @@ -765,6 +766,15 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri else pWindow = new ScrollBar(pParent, WB_HORZ); } + else if (name == "GtkProgressBar") + { + extractScrollAdjustment(id, rMap); + bVertical = extractOrientation(rMap); + if (bVertical) + pWindow = new ProgressBar(pParent, WB_VERT); + else + pWindow = new ProgressBar(pParent, WB_HORZ); + } else if (name == "GtkScrolledWindow") { pWindow = new VclScrolledWindow(pParent); |