summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/source/ui/view/sdview.cxx2
-rw-r--r--starmath/source/unomodel.cxx4
-rw-r--r--sw/source/core/doc/docdesc.cxx17
-rw-r--r--sw/source/filter/xml/xmlitmpr.cxx2
-rw-r--r--sw/source/ui/uiview/view2.cxx3
-rw-r--r--vcl/source/window/decoview.cxx2
6 files changed, 14 insertions, 16 deletions
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 8670778981ee..2e34358b1957 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -623,7 +623,7 @@ sal_Bool View::IsPresObjSelected(sal_Bool bOnPage, sal_Bool bOnMasterPage, sal_B
if ( pObj && ( bCheckPresObjListOnly || pObj->IsEmptyPresObj() || pObj->GetUserCall() ) )
{
pPage = (SdPage*) pObj->GetPage();
- bMasterPage = pPage->IsMasterPage();
+ bMasterPage = pPage && pPage->IsMasterPage();
if ( (bMasterPage && bOnMasterPage) || (!bMasterPage && bOnPage) )
{
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 4ac92976567e..fae257901e07 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -882,9 +882,9 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
for (size_t i = 0; i < aSymbols.size(); ++i)
{
const SmSym * pSymbol = aSymbols[ i ];
- const bool bIsUsedSymbol = rUsedSymbols.find( pSymbol->GetName() ) != rUsedSymbols.end();
if (pSymbol && !pSymbol->IsPredefined() &&
- (!bUsedSymbolsOnly || bIsUsedSymbol))
+ (!bUsedSymbolsOnly ||
+ rUsedSymbols.find( pSymbol->GetName() ) != rUsedSymbols.end()))
{
aVector.push_back ( pSymbol );
nCount++;
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 52312a075006..7310b07fd842 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -611,8 +611,9 @@ void SwDoc::PrtDataChanged()
if ( pTmpRoot )
{
ViewShell *pSh = GetCurrentViewShell();
- if( !pSh->GetViewOptions()->getBrowseMode() ||
- pSh->GetViewOptions()->IsPrtFormat() )
+ if( pSh &&
+ (!pSh->GetViewOptions()->getBrowseMode() ||
+ pSh->GetViewOptions()->IsPrtFormat()) )
{
if ( GetDocShell() )
pWait = new SwWait( *GetDocShell(), sal_True );
@@ -632,16 +633,12 @@ void SwDoc::PrtDataChanged()
std::set<SwRootFrm*> aAllLayouts = GetAllLayouts();
std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::bind2nd(std::mem_fun(&SwRootFrm::InvalidateAllCntnt), INV_SIZE));
- if ( pSh )
+ do
{
- do
- {
- pSh->InitPrt( pPrt );
- pSh = (ViewShell*)pSh->GetNext();
- }
- while ( pSh != GetCurrentViewShell() );
+ pSh->InitPrt( pPrt );
+ pSh = (ViewShell*)pSh->GetNext();
}
-
+ while ( pSh != GetCurrentViewShell() );
}
}
if ( bDraw && pDrawModel )
diff --git a/sw/source/filter/xml/xmlitmpr.cxx b/sw/source/filter/xml/xmlitmpr.cxx
index 27c66e9b5640..d61b4dfa762c 100644
--- a/sw/source/filter/xml/xmlitmpr.cxx
+++ b/sw/source/filter/xml/xmlitmpr.cxx
@@ -77,7 +77,7 @@ SvXMLItemMapEntry* SvXMLItemMapEntries::getByName( sal_uInt16 nNameSpace,
pMap++;
}
- return (pMap->eLocalName != XML_TOKEN_INVALID) ? pMap : NULL;
+ return (pMap && (pMap->eLocalName != XML_TOKEN_INVALID)) ? pMap : NULL;
}
SvXMLItemMapEntry* SvXMLItemMapEntries::getByIndex( sal_uInt16 nIndex ) const
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 7b69a02aaccd..afc609342cc2 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -2282,10 +2282,11 @@ void SwView::GenerateFormLetter(sal_Bool bUseCurrentDocument)
rSh.EnterStdMode(); // Wechsel in Textshell erzwingen; ist fuer
// das Mischen von DB-Feldern notwendig.
AttrChangedNotify( &rSh );
- pNewDBMgr->SetMergeType( DBMGR_MERGE );
if (pNewDBMgr)
{
+ pNewDBMgr->SetMergeType( DBMGR_MERGE );
+
Sequence<PropertyValue> aProperties(3);
PropertyValue* pValues = aProperties.getArray();
pValues[0].Name = C2U("DataSourceName");
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index ba41187f0241..ab617418ea81 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -786,7 +786,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
if ( nStyle & FRAME_DRAW_NODRAW )
{
sal_uInt16 nValueStyle = bMenuStyle ? nStyle | FRAME_DRAW_MENU : nStyle;
- if( pWin->GetType() == WINDOW_BORDERWINDOW )
+ if( pWin && pWin->GetType() == WINDOW_BORDERWINDOW )
nValueStyle |= FRAME_DRAW_BORDERWINDOWBORDER;
ImplControlValue aControlValue( nValueStyle );
Rectangle aBound, aContent;