sc/source/filter/excel/xiname.cxx | 2 - vcl/source/window/dialog.cxx | 68 -------------------------------------- 2 files changed, 1 insertion(+), 69 deletions(-)
New commits: commit 96926d2f2f90ad8b0aadbc0f5e915abbce6a2518 Author: Markus Mohrhard <markus.mohrh...@collabora.co.uk> Date: Thu Mar 20 01:49:23 2014 +0100 don't crash with possibly invalid index, fdo#76209 Change-Id: Idde31b2b07e27a1d9c91145516f8e78c638ce3b4 diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx index 6ae1ddd..14391ba 100644 --- a/sc/source/filter/excel/xiname.cxx +++ b/sc/source/filter/excel/xiname.cxx @@ -301,7 +301,7 @@ const XclImpName* XclImpNameManager::FindName( const OUString& rXclName, SCTAB n const XclImpName* XclImpNameManager::GetName( sal_uInt16 nXclNameIdx ) const { OSL_ENSURE( nXclNameIdx > 0, "XclImpNameManager::GetName - index must be >0" ); - return ( nXclNameIdx > maNameList.size() ) ? NULL : &(maNameList.at( nXclNameIdx - 1 )); + return ( nXclNameIdx <= 0 || nXclNameIdx > maNameList.size() ) ? NULL : &(maNameList.at( nXclNameIdx - 1 )); } void XclImpNameManager::ConvertAllTokens() commit b987b1032c123aef4c087d1c3927bc80729a89ae Author: Markus Mohrhard <markus.mohrh...@collabora.co.uk> Date: Thu Mar 20 01:37:23 2014 +0100 remove whitespace Change-Id: I93caedfece5120c87d82ac4fa0c1e287cdc54edd diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index ab03297..c8ea35a 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -53,8 +53,6 @@ #include <touch/touch.h> #endif - - static OString ImplGetDialogText( Dialog* pDialog ) { OStringBuffer aErrorStr(OUStringToOString( @@ -72,8 +70,6 @@ static OString ImplGetDialogText( Dialog* pDialog ) return aErrorStr.makeStringAndClear(); } - - static bool ImplIsMnemonicCtrl( Window* pWindow ) { if( ! pWindow->GetSettings().GetStyleSettings().GetAutoMnemonic() ) @@ -113,8 +109,6 @@ static bool ImplIsMnemonicCtrl( Window* pWindow ) return false; } - - // Called by native error dialog popup implementations void ImplHideSplash() { @@ -187,8 +181,6 @@ Window * firstLogicalChildOfParent(Window *pTopLevel) return pChild; } - - void ImplWindowAutoMnemonic( Window* pWindow ) { MnemonicGenerator aMnemonicGenerator; @@ -266,8 +258,6 @@ static Window* getActionAreaButtonList(Dialog *pDialog) return pDialog->GetWindow(WINDOW_FIRSTCHILD); } - - static PushButton* ImplGetDefaultButton( Dialog* pDialog ) { Window* pChild = getActionAreaButtonList(pDialog); @@ -286,8 +276,6 @@ static PushButton* ImplGetDefaultButton( Dialog* pDialog ) return NULL; } - - static PushButton* ImplGetOKButton( Dialog* pDialog ) { Window* pChild = getActionAreaButtonList(pDialog); @@ -302,8 +290,6 @@ static PushButton* ImplGetOKButton( Dialog* pDialog ) return NULL; } - - static PushButton* ImplGetCancelButton( Dialog* pDialog ) { Window* pChild = getActionAreaButtonList(pDialog); @@ -319,8 +305,6 @@ static PushButton* ImplGetCancelButton( Dialog* pDialog ) return NULL; } - - static void ImplMouseAutoPos( Dialog* pDialog ) { sal_uLong nMouseOptions = pDialog->GetSettings().GetMouseSettings().GetOptions(); @@ -343,8 +327,6 @@ static void ImplMouseAutoPos( Dialog* pDialog ) } } - - struct DialogImpl { long mnResult; @@ -354,8 +336,6 @@ struct DialogImpl DialogImpl() : mnResult( -1 ), mbStartedModal( false ) {} }; - - void Dialog::ImplInitDialogData() { mpWindowImpl->mbDialog = true; @@ -376,8 +356,6 @@ void Dialog::ImplInitDialogData() maLayoutTimer.SetTimeoutHdl( LINK( this, Dialog, ImplHandleLayoutTimerHdl ) ); } - - void Dialog::ImplInit( Window* pParent, WinBits nStyle ) { sal_uInt16 nSysWinMode = Application::GetSystemWindowMode(); @@ -461,8 +439,6 @@ void Dialog::ImplInit( Window* pParent, WinBits nStyle ) ImplInitSettings(); } - - void Dialog::ImplInitSettings() { // user override @@ -479,8 +455,6 @@ void Dialog::ImplInitSettings() SetBackground( GetSettings().GetStyleSettings().GetDialogColor() ); } - - Dialog::Dialog( WindowType nType ) : SystemWindow( nType ) , mbIsDefferedInit(false) @@ -541,9 +515,6 @@ Dialog::Dialog(Window* pParent, const OString& rID, const OUString& rUIXMLDescri m_pUIBuilder = new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID); } - - - Dialog::Dialog( Window* pParent, WinBits nStyle ) : SystemWindow( WINDOW_DIALOG ) , mbIsDefferedInit(false) @@ -582,8 +553,6 @@ void Dialog::set_content_area(VclBox* pContentArea) mpContentArea = pContentArea; } - - Dialog::~Dialog() { maLayoutTimer.Stop(); @@ -591,16 +560,12 @@ Dialog::~Dialog() mpDialogImpl = NULL; } - - IMPL_LINK_NOARG(Dialog, ImplAsyncCloseHdl) { Close(); return 0; } - - bool Dialog::Notify( NotifyEvent& rNEvt ) { // first call the base class due to Tab control @@ -703,8 +668,6 @@ void Dialog::setOptimalLayoutSize() setPosSizeOnContainee(aSize, *pBox); } - - void Dialog::StateChanged( StateChangedType nType ) { SystemWindow::StateChanged( nType ); @@ -742,8 +705,6 @@ void Dialog::StateChanged( StateChangedType nType ) } } - - void Dialog::DataChanged( const DataChangedEvent& rDCEvt ) { SystemWindow::DataChanged( rDCEvt ); @@ -756,8 +717,6 @@ void Dialog::DataChanged( const DataChangedEvent& rDCEvt ) } } - - bool Dialog::Close() { ImplDelData aDelData; @@ -806,8 +765,6 @@ bool Dialog::Close() } } - - bool Dialog::ImplStartExecuteModal() { if ( mbInExecute ) @@ -885,16 +842,12 @@ bool Dialog::ImplStartExecuteModal() return true; } - - void Dialog::ImplEndExecuteModal() { ImplSVData* pSVData = ImplGetSVData(); pSVData->maAppData.mnModalMode--; } - - short Dialog::Execute() { #if HAVE_FEATURE_DESKTOP @@ -994,8 +947,6 @@ short Dialog::Execute() #endif } - - // virtual void Dialog::StartExecuteModal( const Link& rEndDialogHdl ) { @@ -1006,8 +957,6 @@ void Dialog::StartExecuteModal( const Link& rEndDialogHdl ) mpDialogImpl->mbStartedModal = true; } - - void Dialog::EndDialog( long nResult ) { if ( mbInExecute ) @@ -1064,15 +1013,11 @@ void Dialog::EndDialog( long nResult ) } } - - long Dialog::GetResult() const { return mpDialogImpl->mnResult; } - - void Dialog::EndAllDialogs( Window* pParent ) { ImplSVData* pSVData = ImplGetSVData(); @@ -1090,8 +1035,6 @@ void Dialog::EndAllDialogs( Window* pParent ) } } - - void Dialog::SetModalInputMode( bool bModal ) { if ( bModal == mbModalMode ) @@ -1158,8 +1101,6 @@ void Dialog::SetModalInputMode( bool bModal ) } } - - void Dialog::SetModalInputMode( bool bModal, bool bSubModalDialogs ) { if ( bSubModalDialogs ) @@ -1177,8 +1118,6 @@ void Dialog::SetModalInputMode( bool bModal, bool bSubModalDialogs ) SetModalInputMode( bModal ); } - - void Dialog::GrabFocusToFirstControl() { Window* pFocusControl; @@ -1215,7 +1154,6 @@ void Dialog::GetDrawWindowBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, aImplWin.GetBorder( rLeftBorder, rTopBorder, rRightBorder, rBottomBorder ); } - void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong ) { Point aPos = pDev->LogicToPixel( rPos ); @@ -1350,8 +1288,6 @@ VclBuilderContainer::~VclBuilderContainer() delete m_pUIBuilder; } - - ModelessDialog::ModelessDialog( Window* pParent, const ResId& rResId ) : Dialog( WINDOW_MODELESSDIALOG ) { @@ -1368,16 +1304,12 @@ ModelessDialog::ModelessDialog( Window* pParent, const OString& rID, const OUStr { } - - ModalDialog::ModalDialog( Window* pParent, WinBits nStyle ) : Dialog( WINDOW_MODALDIALOG ) { ImplInit( pParent, nStyle ); } - - ModalDialog::ModalDialog( Window* pParent, const ResId& rResId ) : Dialog( WINDOW_MODALDIALOG ) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits