Author: hdu
Date: Tue Jan 28 14:39:14 2014
New Revision: 1562080
URL: http://svn.apache.org/r1562080
Log:
#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
Modified:
openoffice/trunk/main/dbaccess/source/ui/misc/UITools.cxx
openoffice/trunk/main/dbaccess/source/ui/querydesign/JoinController.cxx
openoffice/trunk/main/dbaccess/source/ui/querydesign/QueryTableView.cxx
openoffice/trunk/main/dbaccess/source/ui/tabledesign/TEditControl.cxx
openoffice/trunk/main/oox/source/ppt/slidepersist.cxx
openoffice/trunk/main/reportdesign/source/ui/report/FixedTextColor.cxx
openoffice/trunk/main/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
openoffice/trunk/main/reportdesign/source/ui/report/ViewsWindow.cxx
openoffice/trunk/main/sd/source/ui/animations/CustomAnimationPane.cxx
openoffice/trunk/main/sd/source/ui/animations/SlideTransitionPane.cxx
openoffice/trunk/main/sd/source/ui/framework/factories/FullScreenPane.cxx
openoffice/trunk/main/sd/source/ui/framework/factories/ViewShellWrapper.cxx
openoffice/trunk/main/sd/source/ui/sidebar/MasterPageContainer.cxx
openoffice/trunk/main/sd/source/ui/sidebar/PanelBase.cxx
openoffice/trunk/main/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
openoffice/trunk/main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
openoffice/trunk/main/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
openoffice/trunk/main/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
openoffice/trunk/main/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
openoffice/trunk/main/sd/source/ui/view/Outliner.cxx
openoffice/trunk/main/sd/source/ui/view/ViewShellBase.cxx
openoffice/trunk/main/sd/source/ui/view/ViewShellManager.cxx
openoffice/trunk/main/sfx2/source/sidebar/DeckLayouter.cxx
openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx
openoffice/trunk/main/sfx2/source/sidebar/TabBar.cxx
openoffice/trunk/main/sw/source/filter/ww8/WW8TableInfo.cxx
openoffice/trunk/main/sw/source/filter/ww8/wrtw8sty.cxx
openoffice/trunk/main/unoxml/source/dom/element.cxx
openoffice/trunk/main/unoxml/source/xpath/nodelist.cxx
openoffice/trunk/main/unoxml/source/xpath/xpathapi.cxx
openoffice/trunk/main/writerfilter/source/dmapper/DomainMapper.cxx
openoffice/trunk/main/writerfilter/source/dmapper/NumberingManager.cxx
openoffice/trunk/main/writerfilter/source/doctok/DffImpl.cxx
openoffice/trunk/main/writerfilter/source/doctok/WW8DocumentImpl.cxx
openoffice/trunk/main/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
openoffice/trunk/main/xmloff/source/text/txtimp.cxx
Modified: openoffice/trunk/main/dbaccess/source/ui/misc/UITools.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/dbaccess/source/ui/misc/UITools.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/dbaccess/source/ui/misc/UITools.cxx (original)
+++ openoffice/trunk/main/dbaccess/source/ui/misc/UITools.cxx Tue Jan 28
14:39:14 2014
@@ -1577,22 +1577,22 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int
{
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_Int
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_Int
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_Int
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:
Modified:
openoffice/trunk/main/dbaccess/source/ui/querydesign/JoinController.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/dbaccess/source/ui/querydesign/JoinController.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/dbaccess/source/ui/querydesign/JoinController.cxx
(original)
+++ openoffice/trunk/main/dbaccess/source/ui/querydesign/JoinController.cxx Tue
Jan 28 14:39:14 2014
@@ -300,7 +300,7 @@ void OJoinController::SaveTabWinPosSize(
{
// 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();
Modified:
openoffice/trunk/main/dbaccess/source/ui/querydesign/QueryTableView.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/dbaccess/source/ui/querydesign/QueryTableView.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/dbaccess/source/ui/querydesign/QueryTableView.cxx
(original)
+++ openoffice/trunk/main/dbaccess/source/ui/querydesign/QueryTableView.cxx Tue
Jan 28 14:39:14 2014
@@ -1011,7 +1011,7 @@ sal_Bool OQueryTableView::ShowTabWin( OQ
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())
{
Modified: openoffice/trunk/main/dbaccess/source/ui/tabledesign/TEditControl.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/dbaccess/source/ui/tabledesign/TEditControl.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/dbaccess/source/ui/tabledesign/TEditControl.cxx
(original)
+++ openoffice/trunk/main/dbaccess/source/ui/tabledesign/TEditControl.cxx Tue
Jan 28 14:39:14 2014
@@ -420,7 +420,7 @@ sal_Bool OTableEditorCtrl::SetDataPtr( l
if(nRow >= (long)m_pRowList->size())
return sal_False;
pActRow = (*m_pRowList)[nRow];
- return pActRow != NULL;
+ return bool(pActRow);
}
//------------------------------------------------------------------------------
Modified: openoffice/trunk/main/oox/source/ppt/slidepersist.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/oox/source/ppt/slidepersist.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/oox/source/ppt/slidepersist.cxx (original)
+++ openoffice/trunk/main/oox/source/ppt/slidepersist.cxx Tue Jan 28 14:39:14
2014
@@ -179,7 +179,7 @@ void setTextStyle( Reference< beans::XPr
oox::drawingml::TextListStylePtr& pTextListStylePtr, int nLevel )
{
::oox::drawingml::TextParagraphPropertiesPtr
pTextParagraphPropertiesPtr( pTextListStylePtr->getListStyle()[ nLevel ] );
- if( pTextParagraphPropertiesPtr == NULL )
+ if( !bool(pTextParagraphPropertiesPtr) )
{
// no properties. return
return;
Modified: openoffice/trunk/main/reportdesign/source/ui/report/FixedTextColor.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/reportdesign/source/ui/report/FixedTextColor.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/reportdesign/source/ui/report/FixedTextColor.cxx
(original)
+++ openoffice/trunk/main/reportdesign/source/ui/report/FixedTextColor.cxx Tue
Jan 28 14:39:14 2014
@@ -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
Modified:
openoffice/trunk/main/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
---
openoffice/trunk/main/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
(original)
+++
openoffice/trunk/main/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
Tue Jan 28 14:39:14 2014
@@ -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
Modified: openoffice/trunk/main/reportdesign/source/ui/report/ViewsWindow.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/reportdesign/source/ui/report/ViewsWindow.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/reportdesign/source/ui/report/ViewsWindow.cxx
(original)
+++ openoffice/trunk/main/reportdesign/source/ui/report/ViewsWindow.cxx Tue Jan
28 14:39:14 2014
@@ -464,10 +464,8 @@ void OViewsWindow::Paste()
if (nCurrentPosition > 0)
{
pRet = (*(--aIter));
- if (pRet == NULL)
- {
- pRet = (*m_aSections.begin());
- }
+ if( !bool(pRet) )
+ pRet = (*m_aSections.begin());
}
else
{
@@ -482,10 +480,8 @@ void OViewsWindow::Paste()
if ((nCurrentPosition + 1) < nSize)
{
pRet = *(++aIter);
- if (pRet == NULL)
- {
- pRet = (*(--aEnd));
- }
+ if( !bool(pRet) )
+ pRet = (*(--aEnd));
}
else
{
Modified: openoffice/trunk/main/sd/source/ui/animations/CustomAnimationPane.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/animations/CustomAnimationPane.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/animations/CustomAnimationPane.cxx
(original)
+++ openoffice/trunk/main/sd/source/ui/animations/CustomAnimationPane.cxx Tue
Jan 28 14:39:14 2014
@@ -352,7 +352,7 @@ IMPL_LINK(CustomAnimationPane,EventMulti
// 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 )
{
Modified: openoffice/trunk/main/sd/source/ui/animations/SlideTransitionPane.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/animations/SlideTransitionPane.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/animations/SlideTransitionPane.cxx
(original)
+++ openoffice/trunk/main/sd/source/ui/animations/SlideTransitionPane.cxx Tue
Jan 28 14:39:14 2014
@@ -1190,7 +1190,7 @@ IMPL_LINK(SlideTransitionPane,EventMulti
// 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();
Modified:
openoffice/trunk/main/sd/source/ui/framework/factories/FullScreenPane.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/framework/factories/FullScreenPane.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/framework/factories/FullScreenPane.cxx
(original)
+++ openoffice/trunk/main/sd/source/ui/framework/factories/FullScreenPane.cxx
Tue Jan 28 14:39:14 2014
@@ -161,7 +161,7 @@ void SAL_CALL FullScreenPane::setVisible
if (mpWindow != NULL)
mpWindow->Show(bIsVisible);
- if (mpWorkWindow != NULL)
+ if( bool(mpWorkWindow))
mpWorkWindow->Show(bIsVisible);
}
@@ -173,7 +173,7 @@ Reference<accessibility::XAccessible> SA
{
ThrowIfDisposed();
- if (mpWorkWindow != NULL)
+ if( bool(mpWorkWindow))
return mpWorkWindow->GetAccessible(sal_False);
else
return NULL;
Modified:
openoffice/trunk/main/sd/source/ui/framework/factories/ViewShellWrapper.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/framework/factories/ViewShellWrapper.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/framework/factories/ViewShellWrapper.cxx
(original)
+++ openoffice/trunk/main/sd/source/ui/framework/factories/ViewShellWrapper.cxx
Tue Jan 28 14:39:14 2014
@@ -64,7 +64,7 @@ ViewShellWrapper::ViewShellWrapper (
if (rxWindow.is())
{
rxWindow->addWindowListener(this);
- if (pViewShell != NULL)
+ if( bool(pViewShell) )
{
pViewShell->Resize();
}
Modified: openoffice/trunk/main/sd/source/ui/sidebar/MasterPageContainer.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/sidebar/MasterPageContainer.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/sidebar/MasterPageContainer.cxx
(original)
+++ openoffice/trunk/main/sd/source/ui/sidebar/MasterPageContainer.cxx Tue Jan
28 14:39:14 2014
@@ -699,7 +699,7 @@ void MasterPageContainer::Implementation
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();
Modified: openoffice/trunk/main/sd/source/ui/sidebar/PanelBase.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/sidebar/PanelBase.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/sidebar/PanelBase.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/sidebar/PanelBase.cxx Tue Jan 28
14:39:14 2014
@@ -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();
}
Modified:
openoffice/trunk/main/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/slidesorter/controller/SlideSorterController.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
---
openoffice/trunk/main/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
(original)
+++
openoffice/trunk/main/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
Tue Jan 28 14:39:14 2014
@@ -665,7 +665,7 @@ IMPL_LINK(SlideSorterController, WindowE
: ViewShell::OUTPUT_DRAWMODE_COLOR);
if (mrSlideSorter.GetViewShell() != NULL)
mrSlideSorter.GetViewShell()->GetFrameView()->SetDrawMode(nDrawMode);
- if (pActiveWindow != NULL)
+ if( bool(pActiveWindow) )
pActiveWindow->SetDrawMode(nDrawMode);
mrView.HandleDrawModeChange();
Modified:
openoffice/trunk/main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
---
openoffice/trunk/main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
(original)
+++
openoffice/trunk/main/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
Tue Jan 28 14:39:14 2014
@@ -183,7 +183,7 @@ void PageSelector::SelectPage (const Sha
mrSlideSorter.GetView().RequestRepaint(rpDescriptor);
mpMostRecentlySelectedPage = rpDescriptor;
- if (mpSelectionAnchor == NULL)
+ if( !bool(mpSelectionAnchor) )
mpSelectionAnchor = rpDescriptor;
if (mnBroadcastDisableLevel > 0)
Modified:
openoffice/trunk/main/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
---
openoffice/trunk/main/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
(original)
+++
openoffice/trunk/main/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
Tue Jan 28 14:39:14 2014
@@ -91,12 +91,12 @@ void ScrollBarManager::LateInitializatio
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::PlaceScrollB
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
// 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
}
// 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, VerticalScro
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, HorizontalSc
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
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
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 (voi
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::GetVerticalScrollB
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::CalcAutoScrollOff
pWindow->LogicToPixel(mrSlideSorter.GetView().GetModelArea()));
if (aWindowSize.Width() > maScrollBorder.Width() * 3
- && mpHorizontalScrollBar != NULL
+ && bool(mpHorizontalScrollBar)
&& mpHorizontalScrollBar->IsVisible())
{
if (rMouseWindowPosition.X() < maScrollBorder.Width()
Modified:
openoffice/trunk/main/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/slidesorter/model/SlideSorterModel.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
(original)
+++ openoffice/trunk/main/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
Tue Jan 28 14:39:14 2014
@@ -217,7 +217,7 @@ SharedPageDescriptor SlideSorterModel::G
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 (
Modified:
openoffice/trunk/main/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
---
openoffice/trunk/main/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
(original)
+++
openoffice/trunk/main/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
Tue Jan 28 14:39:14 2014
@@ -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);
Modified: openoffice/trunk/main/sd/source/ui/view/Outliner.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/view/Outliner.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/view/Outliner.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/view/Outliner.cxx Tue Jan 28 14:39:14
2014
@@ -685,7 +685,7 @@ bool Outliner::SearchAndReplaceOnce (voi
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 (voi
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 (vo
PutTextIntoOutliner ();
::boost::shared_ptr<ViewShell> pViewShell
(mpWeakViewShell.lock());
- if (pViewShell != NULL)
+ if( bool(pViewShell))
switch (meMode)
{
case SEARCH:
Modified: openoffice/trunk/main/sd/source/ui/view/ViewShellBase.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/view/ViewShellBase.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/view/ViewShellBase.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/view/ViewShellBase.cxx Tue Jan 28
14:39:14 2014
@@ -1552,7 +1552,7 @@ void CurrentPageSetter::operator() (bool
{
FrameView* pFrameView = NULL;
- if (mrBase.GetMainViewShell() != NULL)
+ if( bool(mrBase.GetMainViewShell()))
{
pFrameView = mrBase.GetMainViewShell()->GetFrameView();
}
Modified: openoffice/trunk/main/sd/source/ui/view/ViewShellManager.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/view/ViewShellManager.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/view/ViewShellManager.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/view/ViewShellManager.cxx Tue Jan 28
14:39:14 2014
@@ -1228,7 +1228,7 @@ ShellDescriptor ViewShellManager::Implem
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.
Modified: openoffice/trunk/main/sfx2/source/sidebar/DeckLayouter.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/DeckLayouter.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/DeckLayouter.cxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/DeckLayouter.cxx Tue Jan 28
14:39:14 2014
@@ -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())
Modified: openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/SidebarController.cxx Tue Jan 28
14:39:14 2014
@@ -335,9 +335,9 @@ void SidebarController::BroadcastPropert
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.
Modified: openoffice/trunk/main/sfx2/source/sidebar/TabBar.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/sidebar/TabBar.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/sidebar/TabBar.cxx (original)
+++ openoffice/trunk/main/sfx2/source/sidebar/TabBar.cxx Tue Jan 28 14:39:14
2014
@@ -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),
Modified: openoffice/trunk/main/sw/source/filter/ww8/WW8TableInfo.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/WW8TableInfo.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww8/WW8TableInfo.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww8/WW8TableInfo.cxx Tue Jan 28
14:39:14 2014
@@ -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>";
Modified: openoffice/trunk/main/sw/source/filter/ww8/wrtw8sty.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/wrtw8sty.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww8/wrtw8sty.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww8/wrtw8sty.cxx Tue Jan 28 14:39:14
2014
@@ -1799,7 +1799,7 @@ void WW8_WrPlcSepx::WriteSepx( SvStream&
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();
Modified: openoffice/trunk/main/unoxml/source/dom/element.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/unoxml/source/dom/element.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/unoxml/source/dom/element.cxx (original)
+++ openoffice/trunk/main/unoxml/source/dom/element.cxx Tue Jan 28 14:39:14 2014
@@ -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 {
Modified: openoffice/trunk/main/unoxml/source/xpath/nodelist.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/unoxml/source/xpath/nodelist.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/unoxml/source/xpath/nodelist.cxx (original)
+++ openoffice/trunk/main/unoxml/source/xpath/nodelist.cxx Tue Jan 28 14:39:14
2014
@@ -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;
Modified: openoffice/trunk/main/unoxml/source/xpath/xpathapi.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/unoxml/source/xpath/xpathapi.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/unoxml/source/xpath/xpathapi.cxx (original)
+++ openoffice/trunk/main/unoxml/source/xpath/xpathapi.cxx Tue Jan 28 14:39:14
2014
@@ -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;
Modified: openoffice/trunk/main/writerfilter/source/dmapper/DomainMapper.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/writerfilter/source/dmapper/DomainMapper.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/writerfilter/source/dmapper/DomainMapper.cxx
(original)
+++ openoffice/trunk/main/writerfilter/source/dmapper/DomainMapper.cxx Tue Jan
28 14:39:14 2014
@@ -4470,7 +4470,7 @@ void DomainMapper::lcl_text(const sal_uI
//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_u
m_pImpl->SetFieldResult( sText );
else
{
- if (pContext == NULL)
+ if( !bool(pContext))
pContext.reset(new PropertyMap());
m_pImpl->appendTextPortion( sText, pContext );
Modified: openoffice/trunk/main/writerfilter/source/dmapper/NumberingManager.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/writerfilter/source/dmapper/NumberingManager.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/writerfilter/source/dmapper/NumberingManager.cxx
(original)
+++ openoffice/trunk/main/writerfilter/source/dmapper/NumberingManager.cxx Tue
Jan 28 14:39:14 2014
@@ -1029,7 +1029,7 @@ AbstractListDef::Pointer ListsManager::G
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];
Modified: openoffice/trunk/main/writerfilter/source/doctok/DffImpl.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/writerfilter/source/doctok/DffImpl.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/writerfilter/source/doctok/DffImpl.cxx (original)
+++ openoffice/trunk/main/writerfilter/source/doctok/DffImpl.cxx Tue Jan 28
14:39:14 2014
@@ -43,7 +43,7 @@ protected:
public:
static Pointer_t Instance()
{
- if (pInstance == NULL)
+ if( !bool(pInstance))
pInstance = Pointer_t(new ShapeTypeToString());
return pInstance;
Modified: openoffice/trunk/main/writerfilter/source/doctok/WW8DocumentImpl.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/writerfilter/source/doctok/WW8DocumentImpl.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/writerfilter/source/doctok/WW8DocumentImpl.cxx
(original)
+++ openoffice/trunk/main/writerfilter/source/doctok/WW8DocumentImpl.cxx Tue
Jan 28 14:39:14 2014
@@ -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));
Modified:
openoffice/trunk/main/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/writerfilter/source/doctok/WW8ResourceModelImpl.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
(original)
+++ openoffice/trunk/main/writerfilter/source/doctok/WW8ResourceModelImpl.cxx
Tue Jan 28 14:39:14 2014
@@ -162,7 +162,7 @@ string WW8TableReference::getType() cons
void WW8PropertiesReference::resolve(Properties & rHandler)
{
- if (mpPropSet != NULL)
+ if( bool(mpPropSet))
{
//mpPropSet->dump(clog);
Modified: openoffice/trunk/main/xmloff/source/text/txtimp.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/xmloff/source/text/txtimp.cxx?rev=1562080&r1=1562079&r2=1562080&view=diff
==============================================================================
--- openoffice/trunk/main/xmloff/source/text/txtimp.cxx (original)
+++ openoffice/trunk/main/xmloff/source/text/txtimp.cxx Tue Jan 28 14:39:14 2014
@@ -2061,7 +2061,7 @@ void XMLTextImportHelper::SetOutlineStyl
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())
{