[Libreoffice-commits] core.git: 3 commits - basctl/source basic/source desktop/source desktop/uiconfig desktop/UIConfig_deployment.mk extras/source
Caolán McNamara
caolanm at redhat.com
Fri Jun 13 01:51:20 PDT 2014
basctl/source/basicide/scriptdocument.cxx | 22 +
basic/source/uno/namecont.cxx | 28 +-
desktop/UIConfig_deployment.mk | 1
desktop/source/deployment/gui/dp_gui.hrc | 10
desktop/source/deployment/gui/dp_gui_dialog2.cxx | 233 ++++----------------
desktop/source/deployment/gui/dp_gui_dialog2.hxx | 17 -
desktop/source/deployment/gui/dp_gui_dialog2.src | 62 -----
desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 9
desktop/source/deployment/gui/dp_gui_extlistbox.hxx | 1
desktop/source/inc/helpid.hrc | 2
desktop/uiconfig/ui/updaterequireddialog.ui | 178 +++++++++++++++
extras/source/glade/libreoffice-catalog.xml.in | 5
12 files changed, 288 insertions(+), 280 deletions(-)
New commits:
commit e88c019fba743999c7b5f31adc5ff5946649734b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 13 09:44:26 2014 +0100
convert extensions update required dialog to .ui
Change-Id: Ia3ad4032f500e95db5db520292e6c8b07b0f5c0b
diff --git a/desktop/UIConfig_deployment.mk b/desktop/UIConfig_deployment.mk
index 208876c..c41eaa7 100644
--- a/desktop/UIConfig_deployment.mk
+++ b/desktop/UIConfig_deployment.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_UIConfig_add_uifiles,desktop,\
desktop/uiconfig/ui/showlicensedialog \
desktop/uiconfig/ui/updatedialog \
desktop/uiconfig/ui/updateinstalldialog \
+ desktop/uiconfig/ui/updaterequireddialog \
))
# 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 71b25df..c0a9aef 100644
--- a/desktop/source/deployment/gui/dp_gui.hrc
+++ b/desktop/source/deployment/gui/dp_gui.hrc
@@ -23,16 +23,6 @@
#include "deployment.hrc"
#include "helpid.hrc"
-// Package Manager Dialog:
-#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_CHECK_UPDATES 12
-#define RID_EM_BTN_CANCEL 13
-#define RID_EM_FT_PROGRESS 14
-#define RID_EM_FT_MSG 15
-
#define RID_DLG_DEPENDENCIES (RID_DEPLOYMENT_GUI_START + 1)
#define RID_DLG_DEPENDENCIES_TEXT 1
#define RID_DLG_DEPENDENCIES_LIST 2
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 5b9cb7b..ea71dff 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -81,9 +81,6 @@ using namespace ::com::sun::star::system;
namespace dp_gui {
#define TOP_OFFSET 5
-#define LINE_SIZE 4
-#define PROGRESS_WIDTH 60
-#define PROGRESS_HEIGHT 14
#define USER_PACKAGE_MANAGER "user"
#define SHARED_PACKAGE_MANAGER "shared"
@@ -146,8 +143,6 @@ public:
virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
- virtual Size GetOptimalSize() const SAL_OVERRIDE;
-
virtual void RecalcAll() SAL_OVERRIDE;
virtual void selectEntry( const long nPos ) SAL_OVERRIDE;
@@ -164,12 +159,6 @@ ExtBoxWithBtns_Impl::ExtBoxWithBtns_Impl(Window* pParent)
{
}
-Size ExtBoxWithBtns_Impl::GetOptimalSize() const
-{
- return LogicToPixel(Size(250, 150), MAP_APPFONT);
-}
-
-
void ExtBoxWithBtns_Impl::InitFromDialog(ExtMgrDialog *pParentDialog)
{
setExtensionManager(pParentDialog->getExtensionManager());
@@ -691,9 +680,7 @@ void DialogHelper::PostUserEvent( const Link& rLink, void* pCaller )
m_nEventID = Application::PostUserEvent( rLink, pCaller );
}
-
// ExtMgrDialog
-
ExtMgrDialog::ExtMgrDialog(Window *pParent, TheExtensionManager *pManager)
: ModelessDialog(pParent, "ExtensionManagerDialog", "desktop/ui/extensionmanager.ui")
, DialogHelper(pManager->getContext(), (Dialog*) this)
@@ -1186,92 +1173,55 @@ bool ExtMgrDialog::Close()
return bRet;
}
+//UpdateRequiredDialog
+UpdateRequiredDialog::UpdateRequiredDialog(Window *pParent, TheExtensionManager *pManager)
+ : ModalDialog(pParent, "UpdateRequiredDialog", "desktop/ui/updaterequireddialog.ui")
+ , DialogHelper(pManager->getContext(), (Dialog*) this)
+ , m_sAddPackages(getResourceString(RID_STR_ADD_PACKAGES))
+ , m_sCloseText(getResourceString(RID_STR_CLOSE_BTN))
+ , m_bHasProgress(false)
+ , m_bProgressChanged(false)
+ , m_bStartProgress(false)
+ , m_bStopProgress(false)
+ , m_bUpdateWarning(false)
+ , m_bDisableWarning(false)
+ , m_bHasLockedEntries(false)
+ , m_nProgress(0)
+ , m_pManager(pManager)
+{
+ get(m_pExtensionBox, "extensions");
+ m_pExtensionBox->setExtensionManager(pManager);
+ get(m_pUpdateNeeded, "updatelabel");
+ get(m_pUpdateBtn, "check");
+ get(m_pCloseBtn, "disable");
+ get(m_pCancelBtn, "cancel");
+ get(m_pProgressText, "progresslabel");
+ get(m_pProgressBar, "progress");
-// UpdateRequiredDialog
-
-UpdateRequiredDialog::UpdateRequiredDialog( Window *pParent, TheExtensionManager *pManager ) :
- ModalDialog( pParent, getResId( RID_DLG_UPDATE_REQUIRED ) ),
- DialogHelper( pManager->getContext(), (Dialog*) this ),
- m_aUpdateNeeded( this, getResId( RID_EM_FT_MSG ) ),
- 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_aCancelBtn( this, getResId( RID_EM_BTN_CANCEL ) ),
- m_aDivider( this ),
- m_aProgressText( this, getResId( RID_EM_FT_PROGRESS ) ),
- m_aProgressBar( this, WB_BORDER + WB_3DLOOK ),
- m_sAddPackages( getResourceString( RID_STR_ADD_PACKAGES ) ),
- m_sCloseText( getResourceString( RID_STR_CLOSE_BTN ) ),
- m_bHasProgress( false ),
- m_bProgressChanged( false ),
- m_bStartProgress( false ),
- m_bStopProgress( false ),
- m_bUpdateWarning( false ),
- m_bDisableWarning( false ),
- m_bHasLockedEntries( false ),
- m_nProgress( 0 ),
- m_pManager( pManager )
-{
- // free local resources (RID < 256):
- FreeResource();
-
- m_pExtensionBox = new ExtensionBox_Impl( this, pManager );
m_pExtensionBox->SetHyperlinkHdl( LINK( this, UpdateRequiredDialog, HandleHyperlink ) );
- m_aUpdateBtn.SetClickHdl( LINK( this, UpdateRequiredDialog, HandleUpdateBtn ) );
- m_aCloseBtn.SetClickHdl( LINK( this, UpdateRequiredDialog, HandleCloseBtn ) );
- m_aCancelBtn.SetClickHdl( LINK( this, UpdateRequiredDialog, HandleCancelBtn ) );
+ m_pUpdateBtn->SetClickHdl( LINK( this, UpdateRequiredDialog, HandleUpdateBtn ) );
+ m_pCloseBtn->SetClickHdl( LINK( this, UpdateRequiredDialog, HandleCloseBtn ) );
+ m_pCancelBtn->SetClickHdl( LINK( this, UpdateRequiredDialog, HandleCancelBtn ) );
- OUString aText = m_aUpdateNeeded.GetText();
+ OUString aText = m_pUpdateNeeded->GetText();
aText = aText.replaceAll(
"%PRODUCTNAME", utl::ConfigManager::getProductName());
- m_aUpdateNeeded.SetText(aText);
-
- // resize update button
- Size aBtnSize = m_aUpdateBtn.GetSizePixel();
- OUString 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() ) );
-
- // resize update button
- aBtnSize = m_aCloseBtn.GetSizePixel();
- sTitle = m_aCloseBtn.GetText();
- nWidth = m_aCloseBtn.GetCtrlTextWidth( sTitle );
- nWidth += 2 * m_aCloseBtn.GetTextHeight();
- if ( nWidth > aBtnSize.Width() )
- m_aCloseBtn.SetSizePixel( Size( nWidth, aBtnSize.Height() ) );
-
- // minimum size:
- SetMinOutputSizePixel(
- Size( // width:
- (5 * m_aHelpBtn.GetSizePixel().Width()) +
- (5 * RSC_SP_DLG_INNERBORDER_LEFT ),
- // height:
- (1 * m_aHelpBtn.GetSizePixel().Height()) +
- (1 * m_aUpdateNeeded.GetSizePixel().Height()) +
- (1 * m_pExtensionBox->GetMinOutputSizePixel().Height()) +
- (3 * RSC_SP_DLG_INNERBORDER_LEFT) ) );
-
- m_aDivider.Show();
- m_aProgressBar.Hide();
- m_aUpdateBtn.Enable( false );
- m_aCloseBtn.GrabFocus();
+ m_pUpdateNeeded->SetText(aText);
+
+ m_pProgressBar->Hide();
+ m_pUpdateBtn->Enable( false );
+ m_pCloseBtn->GrabFocus();
m_aTimeoutTimer.SetTimeout( 50 ); // mSec
m_aTimeoutTimer.SetTimeoutHdl( LINK( this, UpdateRequiredDialog, TimeOutHdl ) );
}
-
UpdateRequiredDialog::~UpdateRequiredDialog()
{
m_aTimeoutTimer.Stop();
-
- delete m_pExtensionBox;
}
-
long UpdateRequiredDialog::addPackageToList( const uno::Reference< deployment::XPackage > &xPackage,
bool bLicenseMissing )
{
@@ -1280,7 +1230,7 @@ long UpdateRequiredDialog::addPackageToList( const uno::Reference< deployment::X
{
m_bHasLockedEntries |= m_pManager->isReadOnly( xPackage );
const SolarMutexGuard aGuard;
- m_aUpdateBtn.Enable( true );
+ m_pUpdateBtn->Enable( true );
return m_pExtensionBox->addEntry( xPackage );
}
return 0;
@@ -1300,8 +1250,8 @@ void UpdateRequiredDialog::checkEntries()
if ( ! hasActiveEntries() )
{
- m_aCloseBtn.SetText( m_sCloseText );
- m_aCloseBtn.GrabFocus();
+ m_pCloseBtn->SetText( m_sCloseText );
+ m_pCloseBtn->GrabFocus();
}
}
@@ -1342,8 +1292,8 @@ IMPL_LINK( UpdateRequiredDialog, 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" );
}
@@ -1352,8 +1302,8 @@ IMPL_LINK( UpdateRequiredDialog, startProgress, void*, _bLockInterface )
OSL_TRACE( " startProgress handler: start" );
}
- m_aCancelBtn.Enable( bLockInterface );
- m_aUpdateBtn.Enable( false );
+ m_pCancelBtn->Enable( bLockInterface );
+ m_pUpdateBtn->Enable( false );
clearEventID();
return 0;
@@ -1415,8 +1365,8 @@ void UpdateRequiredDialog::updatePackageInfo( const uno::Reference< deployment::
if ( ! hasActiveEntries() )
{
- m_aCloseBtn.SetText( m_sCloseText );
- m_aCloseBtn.GrabFocus();
+ m_pCloseBtn->SetText( m_sCloseText );
+ m_pCloseBtn->GrabFocus();
}
}
@@ -1474,30 +1424,30 @@ IMPL_LINK_NOARG(UpdateRequiredDialog, 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();
}
@@ -1505,76 +1455,6 @@ IMPL_LINK_NOARG(UpdateRequiredDialog, TimeOutHdl)
return 1;
}
-
-// VCL::Window / Dialog
-void UpdateRequiredDialog::Resize()
-{
- Size aTotalSize( GetOutputSizePixel() );
- Size aBtnSize( m_aHelpBtn.GetSizePixel() );
-
- 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();
- m_aCloseBtn.SetPosPixel( aPos );
-
- aPos.X() -= ( RSC_SP_CTRL_X + m_aUpdateBtn.GetSizePixel().Width() );
- m_aUpdateBtn.SetPosPixel( aPos );
-
- Size aDivSize( aTotalSize.Width(), LINE_SIZE );
- aPos = Point( 0, aPos.Y() - LINE_SIZE - RSC_SP_DLG_INNERBORDER_BOTTOM );
- m_aDivider.SetPosSizePixel( aPos, aDivSize );
-
- // Calc fixed text size
- aPos = Point( RSC_SP_DLG_INNERBORDER_LEFT, RSC_SP_DLG_INNERBORDER_TOP );
- Size aFTSize = m_aUpdateNeeded.CalcMinimumSize( aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_RIGHT - RSC_SP_DLG_INNERBORDER_LEFT );
- m_aUpdateNeeded.SetPosSizePixel( aPos, aFTSize );
-
- // Calc list box size
- Size aSize( aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - RSC_SP_DLG_INNERBORDER_RIGHT,
- aTotalSize.Height() - 2*aBtnSize.Height() - LINE_SIZE -
- 2*RSC_SP_DLG_INNERBORDER_TOP - 3*RSC_SP_DLG_INNERBORDER_BOTTOM - aFTSize.Height() );
- aPos.Y() += aFTSize.Height()+RSC_SP_DLG_INNERBORDER_TOP;
-
- m_pExtensionBox->SetPosSizePixel( aPos, aSize );
-
- aPos.X() = aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_RIGHT - aBtnSize.Width();
- aPos.Y() += aSize.Height()+RSC_SP_DLG_INNERBORDER_TOP;
- m_aCancelBtn.SetPosPixel( aPos );
-
- // Calc progress height
- aFTSize = m_aProgressText.GetSizePixel();
- 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, OUString(),
- aNativeControlRegion, aNativeContentRegion ) )
- {
- 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() + ((aBtnSize.Height()-nProgressHeight)/2) ),
- Size( PROGRESS_WIDTH, nProgressHeight ) );
-
- aFTSize.Width() = aPos.X() - 2*RSC_SP_DLG_INNERBORDER_LEFT;
- aPos.X() = RSC_SP_DLG_INNERBORDER_LEFT;
- aPos.Y() += ( aBtnSize.Height() - aFTSize.Height() - 1 ) / 2;
- m_aProgressText.SetPosSizePixel( aPos, aFTSize );
-}
-
-
// VCL::Dialog
short UpdateRequiredDialog::Execute()
{
@@ -1588,9 +1468,9 @@ short UpdateRequiredDialog::Execute()
if ( m_bHasLockedEntries )
{
// Set other text, disable update btn, remove not shared entries from list;
- m_aUpdateNeeded.SetText( DialogHelper::getResourceString( RID_STR_NO_ADMIN_PRIVILEGE ) );
- m_aCloseBtn.SetText( DialogHelper::getResourceString( RID_STR_EXIT_BTN ) );
- m_aUpdateBtn.Enable( false );
+ m_pUpdateNeeded->SetText( DialogHelper::getResourceString( RID_STR_NO_ADMIN_PRIVILEGE ) );
+ m_pCloseBtn->SetText( DialogHelper::getResourceString( RID_STR_EXIT_BTN ) );
+ m_pUpdateBtn->Enable( false );
m_pExtensionBox->RemoveUnlocked();
Resize();
}
@@ -1598,7 +1478,6 @@ short UpdateRequiredDialog::Execute()
return Dialog::Execute();
}
-
// VCL::Dialog
bool UpdateRequiredDialog::Close()
{
@@ -1696,7 +1575,7 @@ void UpdateRequiredDialog::disableAllEntries()
setBusy( false );
if ( ! hasActiveEntries() )
- m_aCloseBtn.SetText( m_sCloseText );
+ m_pCloseBtn->SetText( m_sCloseText );
}
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
index 35af003..df9622d 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
@@ -172,15 +172,13 @@ public:
class UpdateRequiredDialog : public ModalDialog,
public DialogHelper
{
- ExtensionBox_Impl *m_pExtensionBox;
- FixedText m_aUpdateNeeded;
- PushButton m_aUpdateBtn;
- PushButton m_aCloseBtn;
- HelpButton m_aHelpBtn;
- CancelButton m_aCancelBtn;
- FixedLine m_aDivider;
- FixedText m_aProgressText;
- ProgressBar m_aProgressBar;
+ ExtensionBox_Impl* m_pExtensionBox;
+ FixedText* m_pUpdateNeeded;
+ PushButton* m_pUpdateBtn;
+ PushButton* m_pCloseBtn;
+ CancelButton* m_pCancelBtn;
+ FixedText* m_pProgressText;
+ ProgressBar* m_pProgressBar;
const OUString m_sAddPackages;
const OUString m_sCloseText;
OUString m_sProgressText;
@@ -215,7 +213,6 @@ public:
virtual ~UpdateRequiredDialog();
virtual short Execute() SAL_OVERRIDE;
- virtual void Resize() SAL_OVERRIDE;
virtual bool Close() SAL_OVERRIDE;
virtual void showProgress( bool bStart ) SAL_OVERRIDE;
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.src b/desktop/source/deployment/gui/dp_gui_dialog2.src
index b4978ef..ca6e0af 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.src
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.src
@@ -20,68 +20,6 @@
#include <svtools/controldims.hrc>
#include "dp_gui.hrc"
-ModalDialog RID_DLG_UPDATE_REQUIRED
-{
- HelpId = HID_PACKAGE_MANAGER_UPD_REQ;
- Text [ en-US ] = "Extension Update Required";
-
- Size = MAP_APPFONT( 300, 200 );
- OutputSize = TRUE;
- SVLook = TRUE;
- Moveable = TRUE;
- Closeable = TRUE;
- Sizeable = TRUE;
- Hide = TRUE;
-
- FixedText RID_EM_FT_MSG
- {
- Text [ en-US ] = "%PRODUCTNAME has been updated to a new version. Some installed %PRODUCTNAME extensions are not compatible with this version and need to be updated before they can be used.";
- WordBreak = TRUE;
- NoLabel = TRUE;
- Size = MAP_APPFONT( 280, 3*RSC_BS_CHARHEIGHT );
- Pos = MAP_APPFONT( 5, 5 );
- };
-
- 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 );
- };
-
- HelpButton RID_EM_BTN_HELP
- {
- TabStop = TRUE;
- Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- };
-
- PushButton RID_EM_BTN_CHECK_UPDATES
- {
- HelpID = "desktop:PushButton:RID_DLG_UPDATE_REQUIRED:RID_EM_BTN_CHECK_UPDATES";
- TabStop = TRUE;
- Text [ en-US ] = "Check for ~Updates...";
- Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- };
-
- PushButton RID_EM_BTN_CLOSE
- {
- HelpID = "desktop:PushButton:RID_DLG_UPDATE_REQUIRED:RID_EM_BTN_CLOSE";
- TabStop = TRUE;
- DefButton = TRUE;
- Text [ en-US ] = "Disable all";
- Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- };
-
- CancelButton RID_EM_BTN_CANCEL
- {
- TabStop = TRUE;
- Hide = TRUE;
- Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- };
-
-};
-
Image RID_IMG_WARNING
{
ImageBitmap = Bitmap { File = "caution_16.png"; };
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index a67eb95..7e8a9b6 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -862,6 +862,15 @@ void ExtensionBox_Impl::Resize()
RecalcAll();
}
+Size ExtensionBox_Impl::GetOptimalSize() const
+{
+ return LogicToPixel(Size(250, 150), MAP_APPFONT);
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeExtensionBox(Window *pParent, VclBuilder::stringmap &)
+{
+ return new ExtensionBox_Impl(pParent);
+}
long ExtensionBox_Impl::PointToPos( const Point& rPos )
{
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
index 509c08a..019e804 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
@@ -190,6 +190,7 @@ public:
virtual void Paint( const Rectangle &rPaintRect ) SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
+ virtual Size GetOptimalSize() const SAL_OVERRIDE;
const Size GetMinOutputSizePixel() const;
void SetExtraSize( long nSize ) { m_nExtraHeight = nSize; }
diff --git a/desktop/source/inc/helpid.hrc b/desktop/source/inc/helpid.hrc
index 6d14ab5..5a66286 100644
--- a/desktop/source/inc/helpid.hrc
+++ b/desktop/source/inc/helpid.hrc
@@ -26,8 +26,6 @@
#define HID_EXTENSION_MANAGER_LISTBOX_DISABLE "DESKTOP_HID_EXTENSION_MANAGER_LISTBOX_DISABLE"
#define HID_EXTENSION_MANAGER_LISTBOX_REMOVE "DESKTOP_HID_EXTENSION_MANAGER_LISTBOX_REMOVE"
-#define HID_PACKAGE_MANAGER_UPD_REQ "DESKTOP_HID_PACKAGE_MANAGER_UPD_REQ"
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/uiconfig/ui/updaterequireddialog.ui b/desktop/uiconfig/ui/updaterequireddialog.ui
new file mode 100644
index 0000000..7c641c7
--- /dev/null
+++ b/desktop/uiconfig/ui/updaterequireddialog.ui
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkDialog" id="UpdateRequiredDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Extension Update Required</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">12</property>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="updatelabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">%PRODUCTNAME has been updated to a new version. Some installed %PRODUCTNAME extensions are not compatible with this version and need to be updated before they can be used.</property>
+ <property name="wrap">True</property>
+ <property name="max_width_chars">95</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>
+ <child>
+ <object class="deploymentgui-ExtensionBox" id="extensions">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="progresslabel">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Adding %EXTENSION_NAME</property>
+ <property name="use_underline">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>
+ <child>
+ <object class="GtkProgressBar" id="progress">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</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">0</property>
+ </packing>
+ </child>
+ <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="check">
+ <property name="label">Check for_Updates...</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_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="disable">
+ <property name="label">Disable all</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</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="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
+ <property name="use_stock">True</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="help">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</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">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">check</action-widget>
+ <action-widget response="0">disable</action-widget>
+ <action-widget response="0">help</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index be14101..843df8c 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -406,9 +406,12 @@
<glade-widget-class title="Drop Caps Preview" name="swuilo-SwDropCapsPict"
generic-name="Drop Caps Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
- <glade-widget-class title="Extension List" name="deploymentgui-ExtBoxWithBtns"
+ <glade-widget-class title="Extension List" name="deploymentgui-ExtensionBox"
generic-name="Extensions List" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
+ <glade-widget-class title="Extension List With Buttons" name="deploymentgui-ExtBoxWithBtns"
+ generic-name="Extensions List With Buttons" parent="deploymentgui-ExtensionBox"
+ icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Path List" name="xsltdlglo-SvxPathControl"
generic-name="Path List" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
commit 2278e8f80e3d06829a120e57c38e36118f8778f1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jun 12 17:02:12 2014 +0100
coverity#1213486 Uncaught exception
Change-Id: Ia4d919d88bf22168aa770ad35fd8360b0b155efe
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 01250f4..49be779 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/ucb/ContentCreationException.hpp>
#include <vcl/svapp.hxx>
#include <osl/mutex.hxx>
#include <tools/errinf.hxx>
@@ -414,20 +415,27 @@ void SfxLibraryContainer::leaveMethod()
maMutex.release();
}
-BasicManager* SfxLibraryContainer::getBasicManager( void )
+BasicManager* SfxLibraryContainer::getBasicManager()
{
- if ( mpBasMgr )
+ try
{
- return mpBasMgr;
+ if ( mpBasMgr )
+ {
+ return mpBasMgr;
+ }
+ Reference< XModel > xDocument( mxOwnerDocument.get(), UNO_QUERY );
+ SAL_WARN_IF(
+ !xDocument.is(), "basic",
+ ("SfxLibraryContainer::getBasicManager: cannot obtain a BasicManager"
+ " without document!"));
+ if ( xDocument.is() )
+ {
+ mpBasMgr = BasicManagerRepository::getDocumentBasicManager( xDocument );
+ }
}
- Reference< XModel > xDocument( mxOwnerDocument.get(), UNO_QUERY );
- SAL_WARN_IF(
- !xDocument.is(), "basic",
- ("SfxLibraryContainer::getBasicManager: cannot obtain a BasicManager"
- " without document!"));
- if ( xDocument.is() )
+ catch (const css::ucb::ContentCreationException& e)
{
- mpBasMgr = BasicManagerRepository::getDocumentBasicManager( xDocument );
+ SAL_WARN( "basic", "SfxLibraryContainer::getBasicManager : Caught exception: " << e.Message );
}
return mpBasMgr;
}
commit 9a1298cf868bb82a0232e51dc7410ebf3a62b646
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jun 12 16:57:43 2014 +0100
coverity#1213488 Uncaught exception
Change-Id: Iee4e5dd2936979a9bcb8bd5db781e51551270a7f
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index 63cab3c..4847ad0 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -421,20 +421,26 @@ namespace basctl
return bResult;
}
-
BasicManager* ScriptDocument::Impl::getBasicManager() const
{
- OSL_ENSURE( isValid(), "ScriptDocument::Impl::getBasicManager: invalid state!" );
- if ( !isValid() )
- return NULL;
+ try
+ {
+ OSL_ENSURE( isValid(), "ScriptDocument::Impl::getBasicManager: invalid state!" );
+ if ( !isValid() )
+ return NULL;
- if ( isApplication() )
- return SFX_APP()->GetBasicManager();
+ if ( isApplication() )
+ return SFX_APP()->GetBasicManager();
- return ::basic::BasicManagerRepository::getDocumentBasicManager( m_xDocument );
+ return ::basic::BasicManagerRepository::getDocumentBasicManager( m_xDocument );
+ }
+ catch (const css::ucb::ContentCreationException& e)
+ {
+ SAL_WARN( "basctl.basicide", "ScriptDocument::getBasicManager: Caught exception: " << e.Message );
+ }
+ return NULL;
}
-
Reference< XModel > ScriptDocument::Impl::getDocument() const
{
OSL_ENSURE( isValid(), "ScriptDocument::Impl::getDocument: invalid state!" );
More information about the Libreoffice-commits
mailing list