[Libreoffice-commits] .: 7 commits - desktop/source framework/source sfx2/source svx/source
David Tardon
dtardon at kemper.freedesktop.org
Mon Oct 11 01:27:58 PDT 2010
desktop/source/deployment/gui/dp_gui_dialog2.cxx | 5 +
desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx | 2
framework/source/uielement/comboboxtoolbarcontroller.cxx | 33 ++++++++-----
sfx2/source/dialog/dinfdlg.cxx | 3 -
sfx2/source/dialog/splitwin.cxx | 8 ++-
svx/source/form/fmcontrollayout.cxx | 3 -
svx/source/unodraw/unoprov.cxx | 3 +
7 files changed, 42 insertions(+), 15 deletions(-)
New commits:
commit cbd15532dc7cc6c08f3352a41441df766e2cf585
Author: David Tardon <dtardon at redhat.com>
Date: Mon Oct 11 10:27:09 2010 +0200
#i112795# ignore empty windows when inserting dock
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index e76869b..0b64226 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -614,6 +614,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
// Das Fenster mu\s vor dem ersten Fenster eingef"ugt werden, das die
// gleiche oder eine gr"o\sere Position hat als pDockWin.
USHORT nCount = pDockArr->Count();
+ USHORT nLastWindowIdx(0);
// Wenn gar kein Fenster gefunden wird, wird als erstes eingef"ugt
USHORT nInsertPos = 0;
@@ -627,6 +628,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
// Wenn kein geeignetes Fenster hinter der gew"unschten Einf"ugeposition
// gefunden wird, wird am Ende eingef"ugt
nInsertPos = nCount;
+ nLastWindowIdx = n;
USHORT nL=0, nP=0;
GetWindowPos( pD->pWin, nL, nP );
@@ -642,11 +644,15 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
pDock->bNewLine = TRUE;
}
- nInsertPos = n;
+ nInsertPos = n != 0 ? nLastWindowIdx + 1 : 0; // ignore all non-windows after the last window
break;
}
}
}
+ if (nInsertPos == nCount && nLastWindowIdx != nCount - 1)
+ {
+ nInsertPos = nLastWindowIdx + 1; // ignore all non-windows after the last window
+ }
pDockArr->Insert(pDock, nInsertPos);
InsertWindow_Impl( pDock, rSize, nLine, nPos, bNewLine );
commit d6163394a58630043d14cc900ac780dcbe790b9b
Author: David Tardon <dtardon at redhat.com>
Date: Mon Oct 11 10:26:39 2010 +0200
#i114423# prevent possible use of a ref. to deleted LocaleDataWrapper
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index f843d17..a2cd55f 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -162,7 +162,8 @@ String CreateSizeText( ULONG nSize, BOOL bExtraBytes, BOOL bSmartExtraBytes )
fSize /= nGiga;
nDec = 3;
}
- const LocaleDataWrapper& rLocaleWrapper = SvtSysLocale().GetLocaleData();
+ const SvtSysLocale aSysLocale;
+ const LocaleDataWrapper& rLocaleWrapper = aSysLocale.GetLocaleData();
String aSizeStr( rLocaleWrapper.getNum( nSize1, 0 ) );
aSizeStr += aUnitStr;
if ( bExtraBytes && ( nSize1 < nSize2 ) )
commit 5f53b1ac48f432011a3422306ca9de1fab496097
Author: David Tardon <dtardon at redhat.com>
Date: Mon Oct 11 10:24:03 2010 +0200
#i112597# add display properties to control shapes
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index d1b0a5b..1b2f131 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -645,6 +645,9 @@ SfxItemPropertyMapEntry* ImplGetSvxControlShapePropertyMap()
// #i68101#
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
+ // #i112587#
+ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_PRINTABLE), SDRATTR_OBJPRINTABLE , &::getBooleanCppuType(), 0, 0}, \
+ { MAP_CHAR_LEN("Visible"), SDRATTR_OBJVISIBLE , &::getBooleanCppuType(), 0, 0}, \
{0,0,0,0,0,0}
};
commit 06c2ff3bd4f085b98f6f3336e80f13c5c31c6a8a
Author: David Tardon <dtardon at redhat.com>
Date: Mon Oct 11 10:21:17 2010 +0200
#i114427# prevent possible use of a ref. to deleted LocaleDataWrapper
diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx
index bd4ebde..94e73a3 100644
--- a/svx/source/form/fmcontrollayout.cxx
+++ b/svx/source/form/fmcontrollayout.cxx
@@ -143,7 +143,8 @@ namespace svxform
Reference< XPropertySetInfo > xStylePSI( xStyle->getPropertySetInfo(), UNO_SET_THROW );
// determine the script type associated with the system locale
- const LocaleDataWrapper& rSysLocaleData = SvtSysLocale().GetLocaleData();
+ const SvtSysLocale aSysLocale;
+ const LocaleDataWrapper& rSysLocaleData = aSysLocale.GetLocaleData();
const sal_Int16 eSysLocaleScriptType = MsLangId::getScriptType( MsLangId::convertLocaleToLanguage( rSysLocaleData.getLocale() ) );
// depending on this script type, use the right property from the document's style which controls the
commit b769cc464d34f3f13733831b31fb41884734f6ab
Author: David Tardon <dtardon at redhat.com>
Date: Mon Oct 11 10:19:11 2010 +0200
#i110567# lock SolarMutex before calling Invalidate()
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 5f1b359..00d9cd3 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -413,6 +413,7 @@ void ExtBoxWithBtns_Impl::MouseButtonDown( const MouseEvent& rMEvt )
}
else if ( rMEvt.IsLeft() )
{
+ const vos::OGuard aGuard( Application::GetSolarMutex() );
if ( rMEvt.IsMod1() && HasActive() )
selectEntry( EXTENSION_LISTBOX_ENTRY_NOTFOUND ); // Selecting an not existing entry will deselect the current one
else
@@ -766,6 +767,7 @@ void ExtMgrDialog::setGetExtensionsURL( const ::rtl::OUString &rURL )
long ExtMgrDialog::addPackageToList( const uno::Reference< deployment::XPackage > &xPackage,
bool bLicenseMissing )
{
+ const vos::OGuard aGuard( Application::GetSolarMutex() );
m_aUpdateBtn.Enable( true );
return m_pExtensionBox->addEntry( xPackage, bLicenseMissing );
}
@@ -1037,6 +1039,7 @@ void ExtMgrDialog::updateProgress( const OUString &rText,
//------------------------------------------------------------------------------
void ExtMgrDialog::updatePackageInfo( const uno::Reference< deployment::XPackage > &xPackage )
{
+ const vos::OGuard aGuard( Application::GetSolarMutex() );
m_pExtensionBox->updateEntry( xPackage );
}
@@ -1322,6 +1325,7 @@ long UpdateRequiredDialog::addPackageToList( const uno::Reference< deployment::X
if ( !bLicenseMissing && !checkDependencies( xPackage ) )
{
m_bHasLockedEntries |= m_pManager->isReadOnly( xPackage );
+ const vos::OGuard aGuard( Application::GetSolarMutex() );
m_aUpdateBtn.Enable( true );
return m_pExtensionBox->addEntry( xPackage );
}
@@ -1450,6 +1454,7 @@ void UpdateRequiredDialog::updatePackageInfo( const uno::Reference< deployment::
// We will remove all updated packages with satisfied dependencies, but
// we will show all disabled entries so the user sees the result
// of the 'disable all' button
+ const vos::OGuard aGuard( Application::GetSolarMutex() );
if ( isEnabled( xPackage ) && checkDependencies( xPackage ) )
m_pExtensionBox->removeEntry( xPackage );
else
commit 18c96c06428488fb4882a71aaafcee65c2485d33
Author: David Tardon <dtardon at redhat.com>
Date: Mon Oct 11 10:16:20 2010 +0200
#i113359# avoid possible null pointer dereference
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index fce9bd8..dfe28fb 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -167,7 +167,7 @@ public:
m_bWarnUser( false )
{}
- Dialog * activeDialog() { return m_pDialogHelper->getWindow(); }
+ Dialog * activeDialog() { return m_pDialogHelper ? m_pDialogHelper->getWindow() : NULL; }
void setTitle( const OUString& rNewTitle ) { m_sTitle = rNewTitle; }
void startProgress();
commit 5438392e13a3f022073725dd85e4d71d6f56e55b
Author: David Tardon <dtardon at redhat.com>
Date: Mon Oct 11 10:12:21 2010 +0200
#i112582# fire focus events from ComboboxToolbarController
diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx
index 52212e1..f8404b6 100644
--- a/framework/source/uielement/comboboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx
@@ -255,19 +255,30 @@ void ComboboxToolbarController::LoseFocus()
long ComboboxToolbarController::PreNotify( NotifyEvent& rNEvt )
{
- if( rNEvt.GetType() == EVENT_KEYINPUT )
+ switch ( rNEvt.GetType() )
{
- const ::KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
- const KeyCode& rKeyCode = pKeyEvent->GetKeyCode();
- if(( rKeyCode.GetModifier() | rKeyCode.GetCode()) == KEY_RETURN )
- {
- // Call execute only with non-empty text
- if ( m_pComboBox->GetText().Len() > 0 )
- execute( rKeyCode.GetModifier() );
- return 1;
- }
+ case EVENT_KEYINPUT :
+ {
+ const ::KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
+ const KeyCode& rKeyCode = pKeyEvent->GetKeyCode();
+ if(( rKeyCode.GetModifier() | rKeyCode.GetCode()) == KEY_RETURN )
+ {
+ // Call execute only with non-empty text
+ if ( m_pComboBox->GetText().Len() > 0 )
+ execute( rKeyCode.GetModifier() );
+ return 1;
+ }
+ }
+ break;
+ case EVENT_GETFOCUS :
+ notifyFocusGet();
+ break;
+ case EVENT_LOSEFOCUS :
+ notifyFocusLost();
+ break;
+ default :
+ break;
}
-
return 0;
}
More information about the Libreoffice-commits
mailing list