[Libreoffice-commits] core.git: Branch 'aoo/trunk' - dbaccess/source oox/source reportdesign/source sd/source sfx2/source sw/source unoxml/source writerfilter/source xmloff/source
Herbert Dürr
hdu at apache.org
Tue Jan 28 08:08:23 PST 2014
dbaccess/source/ui/misc/UITools.cxx | 22 +++---
dbaccess/source/ui/querydesign/JoinController.cxx | 2
dbaccess/source/ui/querydesign/QueryTableView.cxx | 2
dbaccess/source/ui/tabledesign/TEditControl.cxx | 2
oox/source/ppt/slidepersist.cxx | 2
reportdesign/source/ui/report/FixedTextColor.cxx | 2
reportdesign/source/ui/report/FormattedFieldBeautifier.cxx | 2
reportdesign/source/ui/report/ViewsWindow.cxx | 8 --
sd/source/ui/animations/CustomAnimationPane.cxx | 2
sd/source/ui/animations/SlideTransitionPane.cxx | 2
sd/source/ui/framework/factories/FullScreenPane.cxx | 4 -
sd/source/ui/framework/factories/ViewShellWrapper.cxx | 2
sd/source/ui/sidebar/MasterPageContainer.cxx | 2
sd/source/ui/sidebar/PanelBase.cxx | 2
sd/source/ui/slidesorter/controller/SlideSorterController.cxx | 2
sd/source/ui/slidesorter/controller/SlsPageSelector.cxx | 2
sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx | 32 +++++-----
sd/source/ui/slidesorter/model/SlideSorterModel.cxx | 2
sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx | 2
sd/source/ui/view/Outliner.cxx | 6 -
sd/source/ui/view/ViewShellBase.cxx | 2
sd/source/ui/view/ViewShellManager.cxx | 2
sfx2/source/sidebar/DeckLayouter.cxx | 4 -
sfx2/source/sidebar/SidebarController.cxx | 6 -
sfx2/source/sidebar/TabBar.cxx | 2
sw/source/filter/ww8/WW8TableInfo.cxx | 2
sw/source/filter/ww8/wrtw8sty.cxx | 2
unoxml/source/dom/element.cxx | 4 -
unoxml/source/xpath/nodelist.cxx | 2
unoxml/source/xpath/xpathapi.cxx | 2
writerfilter/source/dmapper/DomainMapper.cxx | 4 -
writerfilter/source/dmapper/NumberingManager.cxx | 2
writerfilter/source/doctok/DffImpl.cxx | 2
writerfilter/source/doctok/WW8DocumentImpl.cxx | 2
writerfilter/source/doctok/WW8ResourceModelImpl.cxx | 2
xmloff/source/text/txtimp.cxx | 2
36 files changed, 70 insertions(+), 74 deletions(-)
New commits:
commit b89fd5b3f8f692cba007f377d7334e846a38705d
Author: Herbert Dürr <hdu at apache.org>
Date: Tue Jan 28 14:39:14 2014 +0000
#i124131# use smart pointer's bool operator instead of comparing its content against NULL
this makes the code more typesafe and avoids the -Wnull-conversion warnings
seen with boost>=1.55 smart pointers in C+11 enabled build environments
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 2c0ac6d..60f0f35 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1577,22 +1577,22 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType
{
case DataType::TINYINT:
pTypeInfo = queryTypeInfoByType(DataType::SMALLINT,_rTypeInfo);
- if( pTypeInfo != NULL)
+ if( bool(pTypeInfo))
break;
// run through
case DataType::SMALLINT:
pTypeInfo = queryTypeInfoByType(DataType::INTEGER,_rTypeInfo);
- if( pTypeInfo != NULL)
+ if( bool(pTypeInfo))
break;
// run through
case DataType::INTEGER:
pTypeInfo = queryTypeInfoByType(DataType::FLOAT,_rTypeInfo);
- if( pTypeInfo != NULL)
+ if( bool(pTypeInfo))
break;
// run through
case DataType::FLOAT:
pTypeInfo = queryTypeInfoByType(DataType::REAL,_rTypeInfo);
- if( pTypeInfo != NULL)
+ if( bool(pTypeInfo))
break;
// run through
case DataType::DATE:
@@ -1600,7 +1600,7 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType
if( DataType::DATE == _nDataType || DataType::TIME == _nDataType )
{
pTypeInfo = queryTypeInfoByType(DataType::TIMESTAMP,_rTypeInfo);
- if( pTypeInfo != NULL)
+ if( bool(pTypeInfo))
break;
}
// run through
@@ -1608,12 +1608,12 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType
case DataType::REAL:
case DataType::BIGINT:
pTypeInfo = queryTypeInfoByType(DataType::DOUBLE,_rTypeInfo);
- if( pTypeInfo != NULL)
+ if( bool(pTypeInfo))
break;
// run through
case DataType::DOUBLE:
pTypeInfo = queryTypeInfoByType(DataType::NUMERIC,_rTypeInfo);
- if( pTypeInfo != NULL)
+ if( bool(pTypeInfo))
break;
// run through
case DataType::NUMERIC:
@@ -1621,20 +1621,20 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType
break;
case DataType::DECIMAL:
pTypeInfo = queryTypeInfoByType(DataType::NUMERIC,_rTypeInfo);
- if( pTypeInfo != NULL)
+ if( bool(pTypeInfo))
break;
pTypeInfo = queryTypeInfoByType(DataType::DOUBLE,_rTypeInfo);
- if( pTypeInfo != NULL)
+ if( bool(pTypeInfo))
break;
break;
case DataType::VARCHAR:
pTypeInfo = queryTypeInfoByType(DataType::LONGVARCHAR,_rTypeInfo);
- if( pTypeInfo != NULL)
+ if( bool(pTypeInfo))
break;
break;
case DataType::LONGVARCHAR:
pTypeInfo = queryTypeInfoByType(DataType::CLOB,_rTypeInfo);
- if( pTypeInfo != NULL)
+ if( bool(pTypeInfo))
break;
break;
default:
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index a6dc4bd..46afd19 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -300,7 +300,7 @@ void OJoinController::SaveTabWinPosSize(OTableWindow* pTabWin, long nOffsetX, lo
{
// die Daten zum Fenster
TTableWindowData::value_type pData = pTabWin->GetData();
- OSL_ENSURE(pData != NULL, "SaveTabWinPosSize : TabWin hat keine Daten !");
+ OSL_ENSURE( bool(pData), "SaveTabWinPosSize : TabWin hat keine Daten !");
// Position & Size der Daten neu setzen (aus den aktuellen Fenster-Parametern)
Point aPos = pTabWin->GetPosPixel();
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index 0984fa3..2400ff2 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -1011,7 +1011,7 @@ sal_Bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUn
if (pTabWin->Init())
{
TTableWindowData::value_type pData = pTabWin->GetData();
- DBG_ASSERT(pData != NULL, "OQueryTableView::ShowTabWin : TabWin hat keine Daten !");
+ DBG_ASSERT( bool(pData), "OQueryTableView::ShowTabWin : TabWin hat keine Daten !");
// Wenn die Daten schon PosSize haben, diese benutzen
if (pData->HasPosition() && pData->HasSize())
{
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index b3a0da8..a2560a0 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -420,7 +420,7 @@ sal_Bool OTableEditorCtrl::SetDataPtr( long nRow )
if(nRow >= (long)m_pRowList->size())
return sal_False;
pActRow = (*m_pRowList)[nRow];
- return pActRow != NULL;
+ return bool(pActRow);
}
//------------------------------------------------------------------------------
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index ad61912..73e3011 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -179,7 +179,7 @@ void setTextStyle( Reference< beans::XPropertySet >& rxPropSet, const XmlFilterB
oox::drawingml::TextListStylePtr& pTextListStylePtr, int nLevel )
{
::oox::drawingml::TextParagraphPropertiesPtr pTextParagraphPropertiesPtr( pTextListStylePtr->getListStyle()[ nLevel ] );
- if( pTextParagraphPropertiesPtr == NULL )
+ if( !bool(pTextParagraphPropertiesPtr) )
{
// no properties. return
return;
diff --git a/reportdesign/source/ui/report/FixedTextColor.cxx b/reportdesign/source/ui/report/FixedTextColor.cxx
index b8fc4b8..a7ecb1b 100644
--- a/reportdesign/source/ui/report/FixedTextColor.cxx
+++ b/reportdesign/source/ui/report/FixedTextColor.cxx
@@ -250,7 +250,7 @@ namespace rptui
if ( pUnoObj ) // this doesn't need to be done for shapes
{
::boost::shared_ptr<OSectionWindow> pSectionWindow = pController->getSectionWindow(xSection);
- if (pSectionWindow != NULL)
+ if( bool(pSectionWindow) )
{
OReportSection& aOutputDevice = pSectionWindow->getReportSection(); // OutputDevice
OSectionView& aSdrView = aOutputDevice.getSectionView(); // SdrView
diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
index 2f84f84..bbdcb6e 100644
--- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
+++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
@@ -184,7 +184,7 @@ namespace rptui
{
// Rectangle aRect = pUnoObj->GetCurrentBoundRect();
::boost::shared_ptr<OSectionWindow> pSectionWindow = m_rReportController.getSectionWindow(xSection);
- if (pSectionWindow != NULL)
+ if( bool(pSectionWindow))
{
OReportSection& aOutputDevice = pSectionWindow->getReportSection(); // OutputDevice
OSectionView& aSdrView = aOutputDevice.getSectionView(); // SdrView
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 51aaff4..bb3f0f9 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -464,10 +464,8 @@ void OViewsWindow::Paste()
if (nCurrentPosition > 0)
{
pRet = (*(--aIter));
- if (pRet == NULL)
- {
+ if( !bool(pRet) )
pRet = (*m_aSections.begin());
- }
}
else
{
@@ -482,10 +480,8 @@ void OViewsWindow::Paste()
if ((nCurrentPosition + 1) < nSize)
{
pRet = *(++aIter);
- if (pRet == NULL)
- {
+ if( !bool(pRet) )
pRet = (*(--aEnd));
- }
}
else
{
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index a77ab2e..073106d 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -352,7 +352,7 @@ IMPL_LINK(CustomAnimationPane,EventMultiplexerListener,
// At this moment the controller may not yet been set at model
// or ViewShellBase. Take it from the view shell passed with
// the event.
- if (mrBase.GetMainViewShell() != NULL)
+ if( bool(mrBase.GetMainViewShell()) )
{
if( mrBase.GetMainViewShell()->GetShellType() == ViewShell::ST_IMPRESS )
{
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index e618a68..7da86f4 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -1190,7 +1190,7 @@ IMPL_LINK(SlideTransitionPane,EventMultiplexerListener,
// At this moment the controller may not yet been set at
// model or ViewShellBase. Take it from the view shell
// passed with the event.
- if (mrBase.GetMainViewShell() != NULL)
+ if( bool(mrBase.GetMainViewShell()) )
{
mxView = Reference<drawing::XDrawView>::query(mrBase.GetController());
onSelectionChanged();
diff --git a/sd/source/ui/framework/factories/FullScreenPane.cxx b/sd/source/ui/framework/factories/FullScreenPane.cxx
index 6b3aff7..4b973c8 100644
--- a/sd/source/ui/framework/factories/FullScreenPane.cxx
+++ b/sd/source/ui/framework/factories/FullScreenPane.cxx
@@ -161,7 +161,7 @@ void SAL_CALL FullScreenPane::setVisible (const sal_Bool bIsVisible)
if (mpWindow != NULL)
mpWindow->Show(bIsVisible);
- if (mpWorkWindow != NULL)
+ if( bool(mpWorkWindow))
mpWorkWindow->Show(bIsVisible);
}
@@ -173,7 +173,7 @@ Reference<accessibility::XAccessible> SAL_CALL FullScreenPane::getAccessible (vo
{
ThrowIfDisposed();
- if (mpWorkWindow != NULL)
+ if( bool(mpWorkWindow))
return mpWorkWindow->GetAccessible(sal_False);
else
return NULL;
diff --git a/sd/source/ui/framework/factories/ViewShellWrapper.cxx b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
index 5aec3f2..1db437a 100644
--- a/sd/source/ui/framework/factories/ViewShellWrapper.cxx
+++ b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
@@ -64,7 +64,7 @@ ViewShellWrapper::ViewShellWrapper (
if (rxWindow.is())
{
rxWindow->addWindowListener(this);
- if (pViewShell != NULL)
+ if( bool(pViewShell) )
{
pViewShell->Resize();
}
diff --git a/sd/source/ui/sidebar/MasterPageContainer.cxx b/sd/source/ui/sidebar/MasterPageContainer.cxx
index d326294..202db58 100644
--- a/sd/source/ui/sidebar/MasterPageContainer.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainer.cxx
@@ -699,7 +699,7 @@ void MasterPageContainer::Implementation::UpdatePreviewSizePixel (void)
MasterPageContainerType::const_iterator iDescriptor;
MasterPageContainerType::const_iterator iContainerEnd(maContainer.end());
for (iDescriptor=maContainer.begin(); iDescriptor!=iContainerEnd; ++iDescriptor)
- if (*iDescriptor!=NULL && (*iDescriptor)->mpMasterPage != NULL)
+ if( bool(*iDescriptor) && (*iDescriptor)->mpMasterPage != NULL)
{
Size aPageSize ((*iDescriptor)->mpMasterPage->GetSize());
nWidth = aPageSize.Width();
diff --git a/sd/source/ui/sidebar/PanelBase.cxx b/sd/source/ui/sidebar/PanelBase.cxx
index ba2519c..f3c2279 100644
--- a/sd/source/ui/sidebar/PanelBase.cxx
+++ b/sd/source/ui/sidebar/PanelBase.cxx
@@ -106,7 +106,7 @@ void PanelBase::Resize (void)
void PanelBase::SetSidebar (const cssu::Reference<css::ui::XSidebar>& rxSidebar)
{
mxSidebar = rxSidebar;
- if (mxSidebar.is() && mpWrappedControl!=NULL)
+ if (mxSidebar.is() && bool(mpWrappedControl))
mxSidebar->requestLayout();
}
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index 6b3a7bb..83650d7 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -665,7 +665,7 @@ IMPL_LINK(SlideSorterController, WindowEventHandler, VclWindowEvent*, pEvent)
: ViewShell::OUTPUT_DRAWMODE_COLOR);
if (mrSlideSorter.GetViewShell() != NULL)
mrSlideSorter.GetViewShell()->GetFrameView()->SetDrawMode(nDrawMode);
- if (pActiveWindow != NULL)
+ if( bool(pActiveWindow) )
pActiveWindow->SetDrawMode(nDrawMode);
mrView.HandleDrawModeChange();
diff --git a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
index a0578eb..e03e202 100644
--- a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
@@ -183,7 +183,7 @@ void PageSelector::SelectPage (const SharedPageDescriptor& rpDescriptor)
mrSlideSorter.GetView().RequestRepaint(rpDescriptor);
mpMostRecentlySelectedPage = rpDescriptor;
- if (mpSelectionAnchor == NULL)
+ if( !bool(mpSelectionAnchor) )
mpSelectionAnchor = rpDescriptor;
if (mnBroadcastDisableLevel > 0)
diff --git a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
index ca9a9cc..86f4d64 100644
--- a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
@@ -91,12 +91,12 @@ void ScrollBarManager::LateInitialization (void)
void ScrollBarManager::Connect (void)
{
- if (mpVerticalScrollBar != NULL)
+ if( bool(mpVerticalScrollBar))
{
mpVerticalScrollBar->SetScrollHdl (
LINK(this, ScrollBarManager, VerticalScrollBarHandler));
}
- if (mpHorizontalScrollBar != NULL)
+ if( bool(mpHorizontalScrollBar))
{
mpHorizontalScrollBar->SetScrollHdl(
LINK(this, ScrollBarManager, HorizontalScrollBarHandler));
@@ -108,11 +108,11 @@ void ScrollBarManager::Connect (void)
void ScrollBarManager::Disconnect (void)
{
- if (mpVerticalScrollBar != NULL)
+ if( bool(mpVerticalScrollBar) )
{
mpVerticalScrollBar->SetScrollHdl (Link());
}
- if (mpHorizontalScrollBar != NULL)
+ if( bool(mpHorizontalScrollBar) )
{
mpHorizontalScrollBar->SetScrollHdl (Link());
}
@@ -142,13 +142,13 @@ Rectangle ScrollBarManager::PlaceScrollBars (
bIsHorizontalScrollBarAllowed,
bIsVerticalScrollBarAllowed));
- if (mpHorizontalScrollBar!=NULL && mpHorizontalScrollBar->IsVisible())
+ if( bool(mpHorizontalScrollBar) && mpHorizontalScrollBar->IsVisible())
PlaceHorizontalScrollBar (rAvailableArea);
- if (mpVerticalScrollBar!=NULL && mpVerticalScrollBar->IsVisible())
+ if( bool(mpVerticalScrollBar) && mpVerticalScrollBar->IsVisible())
PlaceVerticalScrollBar (rAvailableArea);
- if (mpScrollBarFiller!=NULL && mpScrollBarFiller->IsVisible())
+ if( bool(mpScrollBarFiller) && mpScrollBarFiller->IsVisible())
PlaceFiller (rAvailableArea);
return aRemainingSpace;
@@ -219,7 +219,7 @@ void ScrollBarManager::UpdateScrollBars (bool bResetThumbPosition, bool bUseScro
// The horizontal scroll bar is only shown when the window is
// horizontally smaller than the view.
- if (mpHorizontalScrollBar != NULL && mpHorizontalScrollBar->IsVisible())
+ if( bool(mpHorizontalScrollBar) && mpHorizontalScrollBar->IsVisible())
{
mpHorizontalScrollBar->Show();
mpHorizontalScrollBar->SetRange (
@@ -249,7 +249,7 @@ void ScrollBarManager::UpdateScrollBars (bool bResetThumbPosition, bool bUseScro
}
// The vertical scroll bar is always shown.
- if (mpVerticalScrollBar != NULL && mpVerticalScrollBar->IsVisible())
+ if( bool(mpVerticalScrollBar) && mpVerticalScrollBar->IsVisible())
{
mpVerticalScrollBar->SetRange (
Range(aModelArea.Top(), aModelArea.Bottom()));
@@ -298,7 +298,7 @@ IMPL_LINK(ScrollBarManager, VerticalScrollBarHandler, ScrollBar*, pScrollBar)
if (pScrollBar!=NULL
&& pScrollBar==mpVerticalScrollBar.get()
&& pScrollBar->IsVisible()
- && mrSlideSorter.GetContentWindow()!=NULL)
+ && bool(mrSlideSorter.GetContentWindow()) )
{
double nRelativePosition = double(pScrollBar->GetThumbPos())
/ double(pScrollBar->GetRange().Len());
@@ -317,7 +317,7 @@ IMPL_LINK(ScrollBarManager, HorizontalScrollBarHandler, ScrollBar*, pScrollBar)
if (pScrollBar!=NULL
&& pScrollBar==mpHorizontalScrollBar.get()
&& pScrollBar->IsVisible()
- && mrSlideSorter.GetContentWindow()!=NULL)
+ && bool(mrSlideSorter.GetContentWindow()) )
{
double nRelativePosition = double(pScrollBar->GetThumbPos())
/ double(pScrollBar->GetRange().Len());
@@ -490,7 +490,7 @@ void ScrollBarManager::SetTopLeft (const Point aNewTopLeft)
sal_Int32 ScrollBarManager::GetTop (void) const
{
- if (mpVerticalScrollBar != NULL)
+ if( bool(mpVerticalScrollBar))
return mpVerticalScrollBar->GetThumbPos();
else
return 0;
@@ -501,7 +501,7 @@ sal_Int32 ScrollBarManager::GetTop (void) const
sal_Int32 ScrollBarManager::GetLeft (void) const
{
- if (mpHorizontalScrollBar != NULL)
+ if( bool(mpHorizontalScrollBar))
return mpHorizontalScrollBar->GetThumbPos();
else
return 0;
@@ -512,7 +512,7 @@ sal_Int32 ScrollBarManager::GetLeft (void) const
int ScrollBarManager::GetVerticalScrollBarWidth (void) const
{
- if (mpVerticalScrollBar != NULL && mpVerticalScrollBar->IsVisible())
+ if( bool(mpVerticalScrollBar) && mpVerticalScrollBar->IsVisible())
return mpVerticalScrollBar->GetSizePixel().Width();
else
return 0;
@@ -523,7 +523,7 @@ int ScrollBarManager::GetVerticalScrollBarWidth (void) const
int ScrollBarManager::GetHorizontalScrollBarHeight (void) const
{
- if (mpHorizontalScrollBar != NULL && mpHorizontalScrollBar->IsVisible())
+ if( bool(mpHorizontalScrollBar) && mpHorizontalScrollBar->IsVisible())
return mpHorizontalScrollBar->GetSizePixel().Height();
else
return 0;
@@ -545,7 +545,7 @@ void ScrollBarManager::CalcAutoScrollOffset (const Point& rMouseWindowPosition)
pWindow->LogicToPixel(mrSlideSorter.GetView().GetModelArea()));
if (aWindowSize.Width() > maScrollBorder.Width() * 3
- && mpHorizontalScrollBar != NULL
+ && bool(mpHorizontalScrollBar)
&& mpHorizontalScrollBar->IsVisible())
{
if (rMouseWindowPosition.X() < maScrollBorder.Width()
diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
index f0e7ec8..63b58b2 100644
--- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
+++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
@@ -217,7 +217,7 @@ SharedPageDescriptor SlideSorterModel::GetPageDescriptor (
if (nPageIndex>=0 && nPageIndex<GetPageCount())
{
pDescriptor = maPageDescriptors[nPageIndex];
- if (pDescriptor == NULL && bCreate && mxSlides.is())
+ if( !bool(pDescriptor) && bCreate && mxSlides.is())
{
SdPage* pPage = GetPage(nPageIndex);
pDescriptor.reset(new PageDescriptor (
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
index 84a7f91..259a7a9 100644
--- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
@@ -254,7 +254,7 @@ void PageObjectPainter::PaintPreview (
PageObjectLayouter::Preview,
PageObjectLayouter::ModelCoordinateSystem));
- if (mpCache != NULL)
+ if( bool(mpCache))
{
const SdrPage* pPage = rpDescriptor->GetPage();
mpCache->SetPreciousFlag(pPage, true);
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index b03a699..319172b 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -685,7 +685,7 @@ bool Outliner::SearchAndReplaceOnce (void)
return true;
::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
- if (pViewShell != NULL)
+ if( bool(pViewShell))
{
mpView = pViewShell->GetView();
mpWindow = pViewShell->GetActiveWindow();
@@ -932,7 +932,7 @@ void Outliner::RestoreStartPosition (void)
bRestore = false;
// Dont't restore when the view shell is not valid.
::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
- if (pViewShell == NULL)
+ if( !bool(pViewShell))
bRestore = false;
if (bRestore)
@@ -1030,7 +1030,7 @@ void Outliner::ProvideNextTextObject (void)
PutTextIntoOutliner ();
::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
- if (pViewShell != NULL)
+ if( bool(pViewShell))
switch (meMode)
{
case SEARCH:
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index b59c39e..4e3c5e6 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -1552,7 +1552,7 @@ void CurrentPageSetter::operator() (bool)
{
FrameView* pFrameView = NULL;
- if (mrBase.GetMainViewShell() != NULL)
+ if( bool(mrBase.GetMainViewShell()))
{
pFrameView = mrBase.GetMainViewShell()->GetFrameView();
}
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index e8b31a1..e6860c2 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -1228,7 +1228,7 @@ ShellDescriptor ViewShellManager::Implementation::CreateSubShell (
for (FactoryList::const_iterator iFactory=aRange.first; iFactory!=aRange.second; ++iFactory)
{
SharedShellFactory pFactory = iFactory->second;
- if (pFactory != NULL)
+ if( bool(pFactory))
aResult.mpShell = pFactory->CreateShell(nShellId, pParentWindow, pFrameView);
// Exit the loop when the shell has been successfully created.
diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx
index 1bd129a..2c04095 100644
--- a/sfx2/source/sidebar/DeckLayouter.cxx
+++ b/sfx2/source/sidebar/DeckLayouter.cxx
@@ -212,7 +212,7 @@ sal_Int32 DeckLayouter::PlacePanels (
// Assign heights and places.
IterateLayoutItems(iItem,rLayoutItems)
{
- if (iItem->mpPanel == NULL)
+ if( !bool(iItem->mpPanel))
continue;
Panel& rPanel (*iItem->mpPanel);
@@ -305,7 +305,7 @@ void DeckLayouter::GetRequestedSizes (
IterateLayoutItems(iItem,rLayoutItems)
{
ui::LayoutSize aLayoutSize (ui::LayoutSize(0,0,0));
- if (iItem->mpPanel != NULL)
+ if( bool(iItem->mpPanel))
{
if (rLayoutItems.size() == 1
&& iItem->mpPanel->IsTitleBarOptional())
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 730bbc5..4b6fc57 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -335,9 +335,9 @@ void SidebarController::BroadcastPropertyChange (void)
void SidebarController::NotifyResize (void)
{
- if (mpTabBar == NULL)
+ if( !bool(mpTabBar))
{
- OSL_ASSERT(mpTabBar!=NULL);
+ OSL_ASSERT( bool(mpTabBar));
return;
}
@@ -645,7 +645,7 @@ void SidebarController::SwitchToDeck (
rContext);
bHasPanelSetChanged = true;
}
- if (aNewPanels[nWriteIndex] != NULL)
+ if( bool(aNewPanels[nWriteIndex]))
{
// Depending on the context we have to change the command
// for the "more options" dialog.
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 5e1a2c5..46398d2 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -198,7 +198,7 @@ void TabBar::Layout (void)
Theme::GetInteger(Theme::Int_TabItemHeight));
// Place the menu button and the separator.
- if (mpMenuButton != NULL)
+ if( bool(mpMenuButton))
{
mpMenuButton->SetPosSizePixel(
Point(nX,nY),
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index 69a258f..4e7902f 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -1341,7 +1341,7 @@ string WW8TableCellGrid::toString()
WW8TableCellGridRow::Pointer_t pRow = getRow(*aTopsIt);
WidthsPtr pWidths = pRow->getWidths();
- if (pWidths != NULL)
+ if( bool(pWidths))
{
sResult += "<widths>";
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index e861d33..a8ce690 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1799,7 +1799,7 @@ void WW8_WrPlcSepx::WriteSepx( SvStream& rStrm ) const
for (size_t i = 0; i < m_SectionAttributes.size(); i++) // all sections
{
WW8_PdAttrDesc *const pA = m_SectionAttributes[i].get();
- if (pA->m_nLen && pA->m_pData != NULL)
+ if (pA->m_nLen && bool(pA->m_pData))
{
SVBT16 nL;
pA->m_nSepxFcPos = rStrm.Tell();
diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx
index 2787334..59a9674 100644
--- a/unoxml/source/dom/element.cxx
+++ b/unoxml/source/dom/element.cxx
@@ -630,7 +630,7 @@ namespace DOM
AttrChangeType aChangeType = AttrChangeType_MODIFICATION;
::boost::shared_ptr<xmlChar const> const pOld(
xmlGetProp(m_aNodePtr, xName), xmlFree);
- if (pOld == NULL) {
+ if( !bool(pOld)) {
aChangeType = AttrChangeType_ADDITION;
xmlNewProp(m_aNodePtr, xName, xValue);
} else {
@@ -713,7 +713,7 @@ namespace DOM
AttrChangeType aChangeType = AttrChangeType_MODIFICATION;
::boost::shared_ptr<xmlChar const> const pOld(
xmlGetNsProp(m_aNodePtr, xLName, pNs->href), xmlFree);
- if (pOld == NULL) {
+ if( !bool(pOld)) {
aChangeType = AttrChangeType_ADDITION;
xmlNewNsProp(m_aNodePtr, pNs, xLName, xValue);
} else {
diff --git a/unoxml/source/xpath/nodelist.cxx b/unoxml/source/xpath/nodelist.cxx
index 87697dc..1df0fc1 100644
--- a/unoxml/source/xpath/nodelist.cxx
+++ b/unoxml/source/xpath/nodelist.cxx
@@ -35,7 +35,7 @@ namespace XPath
, m_rMutex(rMutex)
, m_pNodeSet(0)
{
- if (rxpathObj != NULL && rxpathObj->type == XPATH_NODESET)
+ if( bool(rxpathObj) && rxpathObj->type == XPATH_NODESET)
{
m_pNodeSet = rxpathObj->nodesetval;
m_pXPathObj = rxpathObj;
diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx
index 5a7ef1c..52c1dc0 100644
--- a/unoxml/source/xpath/xpathapi.cxx
+++ b/unoxml/source/xpath/xpathapi.cxx
@@ -378,7 +378,7 @@ namespace XPath
/* Create xpath evaluation context */
::boost::shared_ptr<xmlXPathContext> const xpathCtx(
xmlXPathNewContext(pDoc), xmlXPathFreeContext);
- if (xpathCtx == NULL) { throw XPathException(); }
+ if( !bool(xpathCtx)) { throw XPathException(); }
// set context node
xpathCtx->node = pNode;
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 2778fec..c5acdd8 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -4470,7 +4470,7 @@ void DomainMapper::lcl_text(const sal_uInt8 * data_, size_t len)
//sal_uInt32 nSize = pContext->size();
//<--
- if (pContext == NULL)
+ if( !bool(pContext))
pContext.reset(new PropertyMap());
m_pImpl->appendTextPortion( sText, pContext );
@@ -4533,7 +4533,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
m_pImpl->SetFieldResult( sText );
else
{
- if (pContext == NULL)
+ if( !bool(pContext))
pContext.reset(new PropertyMap());
m_pImpl->appendTextPortion( sText, pContext );
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 634bdbf..bcd9960 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -1029,7 +1029,7 @@ AbstractListDef::Pointer ListsManager::GetAbstractList( sal_Int32 nId )
if( pStyleSheetProperties && pStyleSheetProperties->GetNumId() >= 0 )
{
ListDef::Pointer pList = GetList( pStyleSheetProperties->GetNumId() );
- if ( pList!=NULL )
+ if( bool(pList) )
return pList->GetAbstractDefinition();
else
pAbstractList = m_aAbstractLists[i];
diff --git a/writerfilter/source/doctok/DffImpl.cxx b/writerfilter/source/doctok/DffImpl.cxx
index 4121e92..0ec0e2e 100644
--- a/writerfilter/source/doctok/DffImpl.cxx
+++ b/writerfilter/source/doctok/DffImpl.cxx
@@ -43,7 +43,7 @@ protected:
public:
static Pointer_t Instance()
{
- if (pInstance == NULL)
+ if( !bool(pInstance))
pInstance = Pointer_t(new ShapeTypeToString());
return pInstance;
diff --git a/writerfilter/source/doctok/WW8DocumentImpl.cxx b/writerfilter/source/doctok/WW8DocumentImpl.cxx
index 2583682..e3e6d44 100644
--- a/writerfilter/source/doctok/WW8DocumentImpl.cxx
+++ b/writerfilter/source/doctok/WW8DocumentImpl.cxx
@@ -1278,7 +1278,7 @@ WW8DocumentImpl::getBlip(sal_uInt32 nBid)
{
writerfilter::Reference<Properties>::Pointer_t pResult;
- if (mpDffBlock != NULL)
+ if( bool(mpDffBlock))
{
DffRecord::Pointer_t pDffRecord(mpDffBlock->getBlip(nBid));
diff --git a/writerfilter/source/doctok/WW8ResourceModelImpl.cxx b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
index 3eb6d9e..4fc94f0 100644
--- a/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
+++ b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
@@ -162,7 +162,7 @@ string WW8TableReference::getType() const
void WW8PropertiesReference::resolve(Properties & rHandler)
{
- if (mpPropSet != NULL)
+ if( bool(mpPropSet))
{
//mpPropSet->dump(clog);
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 620376e..fdd6324 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -2061,7 +2061,7 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels )
static ::rtl::OUString s_HeadingStyleName(
RTL_CONSTASCII_USTRINGPARAM("HeadingStyleName"));
- if ((m_pImpl->m_pOutlineStylesCandidates != NULL || bSetEmptyLevels) &&
+ if (( bool(m_pImpl->m_pOutlineStylesCandidates) || bSetEmptyLevels) &&
m_pImpl->m_xChapterNumbering.is() &&
!IsInsertMode())
{
More information about the Libreoffice-commits
mailing list