[Libreoffice-commits] core.git: 13 commits - cui/source dbaccess/source editeng/source extensions/source filter/source forms/source framework/source reportdesign/source sfx2/source
Caolán McNamara
caolanm at redhat.com
Sun Feb 23 06:23:11 PST 2014
cui/source/customize/cfg.cxx | 4 ++--
dbaccess/source/ui/control/FieldDescControl.cxx | 3 +--
editeng/source/editeng/impedit2.cxx | 7 ++++---
extensions/source/propctrlr/browserline.cxx | 4 ++--
filter/source/msfilter/msdffimp.cxx | 2 +-
filter/source/msfilter/svdfppt.cxx | 11 ++++++++---
forms/source/richtext/clipboarddispatcher.cxx | 12 ++++++++----
framework/source/layoutmanager/toolbarlayoutmanager.cxx | 6 +++---
reportdesign/source/ui/report/DesignView.cxx | 2 +-
sfx2/source/doc/objstor.cxx | 2 +-
10 files changed, 31 insertions(+), 22 deletions(-)
New commits:
commit 54ef215fa22c84d1b74f2bb63a2ec8f5a94f39fa
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Feb 23 13:42:57 2014 +0000
coverity#704657 Dereference after null check
Change-Id: Ia274c4f6ab148fd0390f3ff553e4cc4245681ab0
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index 613999d..9b66b82 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -251,7 +251,7 @@ void ODesignView::resizeDocumentView(Rectangle& _rPlayground)
// normalize the split pos
const long nSplitterWidth = GetSettings().GetStyleSettings().GetSplitSize();
Point aTaskPanePos(nSplitPos + nSplitterWidth, _rPlayground.Top());
- if ( m_pTaskPane && m_pTaskPane->IsVisible() )
+ if (m_pTaskPane && m_pTaskPane->IsVisible() && m_pPropWin)
{
aTaskPanePos.X() = aPlaygroundSize.Width() - m_pTaskPane->GetSizePixel().Width();
sal_Int32 nMinWidth = m_pPropWin->getMinimumSize().Width();
commit 44f5f2bd34f79d4035caa8310401f03b0797fe74
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Feb 23 13:39:03 2014 +0000
coverity#704648 Dereference after null check
Change-Id: I0b6c5dc5b1225fb15c99401501b2c5cc2bb94b58
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 9566a41..d9ebead 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -3737,7 +3737,7 @@ throw (uno::RuntimeException)
SolarMutexGuard aGuard;
if ( pToolBox )
aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( aUIDockingElement.m_aDockedData.m_nDockedArea ) );
- else
+ else if ( pWindow )
aSize = pWindow->GetSizePixel();
}
commit cc39a4b7d131c697d8f207da3acc4bba93cdd5cc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Feb 23 13:34:02 2014 +0000
coverity#704647 Dereference after null check
Change-Id: Ifc74e903f13e6065c507d9a90825e588c5e88a42
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index e495407..9566a41 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -744,9 +744,9 @@ bool ToolbarLayoutManager::dockToolbar( const OUString& rResourceURL, ui::Dockin
SolarMutexGuard aGuard;
{
- if ( pToolBox )
+ if (pToolBox)
aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea ) );
- else
+ else if (pWindow)
aSize = pWindow->GetSizePixel();
}
commit 2a83910e724d21b774d39f6faf4e7329a6fc5ee8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Feb 23 13:32:33 2014 +0000
coverity#704644 Dereference after null check
Change-Id: I9b2aad39c54497b5b53a86cf11a754f89c012d0e
diff --git a/forms/source/richtext/clipboarddispatcher.cxx b/forms/source/richtext/clipboarddispatcher.cxx
index 5f3d0fe..31a3131 100644
--- a/forms/source/richtext/clipboarddispatcher.cxx
+++ b/forms/source/richtext/clipboarddispatcher.cxx
@@ -176,10 +176,14 @@ namespace frm
void OPasteClipboardDispatcher::disposing( ::osl::ClearableMutexGuard& _rClearBeforeNotify )
{
OSL_ENSURE( getEditView() && getEditView()->GetWindow(), "OPasteClipboardDispatcher::disposing: EditView should not (yet) be disfunctional here!" );
- if ( getEditView() && getEditView()->GetWindow() && m_pClipListener )
- m_pClipListener->AddRemoveListener( getEditView()->GetWindow(), sal_False );
- m_pClipListener->release();
- m_pClipListener = NULL;
+ if (m_pClipListener)
+ {
+ if (getEditView() && getEditView()->GetWindow())
+ m_pClipListener->AddRemoveListener( getEditView()->GetWindow(), sal_False );
+
+ m_pClipListener->release();
+ m_pClipListener = NULL;
+ }
OClipboardDispatcher::disposing( _rClearBeforeNotify );
}
commit 09c0e5110a459d4b591385db6aebaff93c25cf10
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Feb 23 13:31:02 2014 +0000
coverity#704642 Dereference after null check
Change-Id: Iae9b7caf2076722a01e6882921622b193f2b4349
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 60e9c26..fa1d06f 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -2537,6 +2537,9 @@ bool SdrPowerPointImport::GetColorFromPalette( sal_uInt16 nNum, Color& rColor )
else
pMasterPersist = (*pPageList2)[ nNextMaster ];
}
+ }
+ if ( pMasterPersist )
+ {
((SdrPowerPointImport*)this)->aPageColors = pMasterPersist->aColorScheme;
}
}
commit 619b751f909421d03c1424f2c2b318d3c747d7c5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Feb 23 13:29:29 2014 +0000
coverity#704641 Dereference after null check
Change-Id: Ib30bcefedb2685038f22e33b4c7a97b0295b224c
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 9e68432..60e9c26 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -2503,9 +2503,11 @@ bool SdrPowerPointImport::GetColorFromPalette( sal_uInt16 nNum, Color& rColor )
{
PptSlidePersistEntry* pE = (*pPageList)[ nAktPageNum ];
if ( pE )
+ {
nSlideFlags = pE->aSlideAtom.nFlags;
- if ( ! ( nSlideFlags & 2 ) )
- ((SdrPowerPointImport*)this)->aPageColors = pE->aColorScheme;
+ if ( ! ( nSlideFlags & 2 ) )
+ ((SdrPowerPointImport*)this)->aPageColors = pE->aColorScheme;
+ }
}
if ( nSlideFlags & 2 ) // follow master colorscheme?
{
commit 324f33cb44b3b60061b31eb69e4e13d6f4be9e41
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Feb 23 13:27:09 2014 +0000
coverity#704640 Dereference after null check
Change-Id: I05b932002ff8176d76f842dcd57ea39c4112f181
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 52bbe8f..9e68432 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -3402,7 +3402,7 @@ sal_Bool PPTNumberFormatCreator::ImplGetExtNumberFormat( SdrPowerPointImport& rM
if ( nBuBlip != 0xffff ) // set graphical bullet
{
Graphic aGraphic;
- if ( pParaProv->GetGraphic( nBuBlip, aGraphic ) )
+ if ( pParaProv && pParaProv->GetGraphic( nBuBlip, aGraphic ) )
{
SvxBrushItem aBrush( aGraphic, GPOS_MM, SID_ATTR_BRUSH );
rNumberFormat.SetGraphicBrush( &aBrush );
commit fe56219fcc60e085a75de29757a45cf63709e78b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Feb 23 13:21:45 2014 +0000
coverity#704639 Dereference after null check
Change-Id: Ic176da3b05337678dd12fd23a726b958577cbefb
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 68cfc3a..3d2a7dc 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -6116,7 +6116,7 @@ sal_Bool SvxMSDffManager::GetShape(sal_uLong nId, SdrObject*& rpShape,
// restore old alte FilePos of the stream(s)
rStCtrl.Seek( nOldPosCtrl );
- if( &rStCtrl != pStData )
+ if( &rStCtrl != pStData && pStData )
pStData->Seek( nOldPosData );
return ( 0 != rpShape );
}
commit e4d8872d075231346848569747ea2bff8697a109
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Feb 23 13:18:13 2014 +0000
coverity#704631 Dereference after null check
Change-Id: Id74b7073b6e9075003a98172e85696274a8c1924
diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx
index e44f149..c9958d2 100644
--- a/extensions/source/propctrlr/browserline.cxx
+++ b/extensions/source/propctrlr/browserline.cxx
@@ -150,10 +150,10 @@ namespace pcr
if ( m_pControlWindow )
m_pControlWindow->SetZOrder( (Window*)&m_aFtTitle, WINDOW_ZORDER_BEHIND );
- if ( m_pBrowseButton )
+ if ( m_pBrowseButton && m_pControlWindow )
m_pBrowseButton->SetZOrder( m_pControlWindow, WINDOW_ZORDER_BEHIND );
- if ( m_pAdditionalBrowseButton )
+ if ( m_pAdditionalBrowseButton && m_pBrowseButton )
m_pAdditionalBrowseButton->SetZOrder( m_pBrowseButton, WINDOW_ZORDER_BEHIND );
}
commit ba9839d826a4660fff39d26791caa0acb9011b3a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Feb 23 13:16:43 2014 +0000
coverity#704625 Dereference after null check
Change-Id: I21f5e684c3a7d42056e1a5b36e5d63343e5c85ae
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 7824021..db8da11 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -3021,9 +3021,10 @@ EditPaM ImpEditEngine::GetPaM( Point aDocPos, sal_Bool bSmart )
nPortion++;
pPortion = GetParaPortions().SafeGetObject( nPortion );
}
- OSL_ENSURE( pPortion, "No visible paragraph found: GetPaM" );
- aPaM = GetPaM( pPortion, aDocPos, bSmart );
- return aPaM;
+ assert(pPortion); //No visible paragraph found: GetPaM
+ if (!pPortion)
+ return aPaM;
+ return GetPaM(pPortion, aDocPos, bSmart);
}
}
commit 1babae95f15544289610afb8458ff9a830ea340e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Feb 23 13:12:43 2014 +0000
coverity#704614 Dereference after null check
Change-Id: I0ee36c064bfd5cbd0aaa2554b36b9b1d51d5e6ec
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index 06e2b2d..3487c2f 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -305,8 +305,7 @@ void OFieldDescControl::CheckScrollBars()
for (sal_uInt16 i=0; i<sizeof(ppAggregates)/sizeof(ppAggregates[0]); ++i)
getMaxXPosition(ppAggregates[i],lMaxXPosition);
- if (m_pHorzScroll)
- lMaxXPosition += m_pHorzScroll->GetThumbPos() * HSCROLL_STEP;
+ lMaxXPosition += m_pHorzScroll->GetThumbPos() * HSCROLL_STEP;
long lMaxXAvailable = szOverallSize.Width();
bNeedHScrollBar = lMaxXPosition > lMaxXAvailable;
commit 057a663043aed3cf0d4e8741e49e150a9467e220
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Feb 23 13:10:11 2014 +0000
coverity#704595 Dereference after null check
Change-Id: I2c8aa1163d3eb228259db0c51f5cf9dca0657daf
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index d42203f..9991dcc 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1695,13 +1695,13 @@ void SvxConfigPage::Reset( const SfxItemSet& )
bool bURLToSelectFound = false;
if ( !m_aURLToSelect.isEmpty() )
{
- if ( pDocData != NULL && pDocData->HasURL( m_aURLToSelect ) )
+ if ( pDocData && pDocData->HasURL( m_aURLToSelect ) )
{
aSaveInListBox.SelectEntryPos( nPos, true );
pCurrentSaveInData = pDocData;
bURLToSelectFound = true;
}
- else if ( pModuleData->HasURL( m_aURLToSelect ) )
+ else if ( pModuleData && pModuleData->HasURL( m_aURLToSelect ) )
{
aSaveInListBox.SelectEntryPos( 0, true );
pCurrentSaveInData = pModuleData;
commit e4cfd04df6ba8f368bac063a71a7943c43d97c5a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Feb 23 12:35:13 2014 +0000
coverity#440977 Dereference after null check
Change-Id: I8350641f3b07e8a25080d4dfe7d9c212f89dd992
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index efe57bd..fb80c47 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1332,7 +1332,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
}
// TODO/LATER: error handling
- if( rMedium.GetErrorCode() || pMedium->GetErrorCode() || GetErrorCode() )
+ if( rMedium.GetErrorCode() || !pMedium || pMedium->GetErrorCode() || GetErrorCode() )
return sal_False;
AddLog( OUString( OSL_LOG_PREFIX "Locking" ) );
More information about the Libreoffice-commits
mailing list