diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:14:53 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:25 +0100 |
commit | f19dda5a55156afda2c6dde6c51c455cc5657fc2 (patch) | |
tree | a0ec501f676cf5ec67aaf0eb3b8572dc1bad0db0 /extensions/source/scanner/sanedlg.cxx | |
parent | e1e967a1bb0f4e4fac50f353c990389ccc73a053 (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I5bbef6c88255f3e8c740a5239a5010cf1251b7fa
Diffstat (limited to 'extensions/source/scanner/sanedlg.cxx')
-rw-r--r-- | extensions/source/scanner/sanedlg.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 85f7b08a53cb..95505d159589 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -84,7 +84,7 @@ public: ScanPreview(vcl::Window* pParent, WinBits nStyle) : Window(pParent, nStyle) , maMaxBottomRight(PREVIEW_WIDTH, PREVIEW_HEIGHT) - , mpParentDialog(NULL) + , mpParentDialog(nullptr) , meDragDirection(TopLeft) , mbDragEnable(false) , mbDragDrawn(false) @@ -214,7 +214,7 @@ SaneDlg::SaneDlg( vcl::Window* pParent, Sane& rSane, bool bScanEnabled ) : mbScanEnabled( bScanEnabled ), mnCurrentOption(0), mnCurrentElement(0), - mpRange(0), + mpRange(nullptr), mfMin(0.0), mfMax(0.0), doScan(false) @@ -399,7 +399,7 @@ void SaneDlg::InitFields() mpReslBox->Enable(); mpReslBox->SetValue( (long)fRes ); - double *pDouble = NULL; + double *pDouble = nullptr; nValue = mrSane.GetRange( nOption, pDouble ); if( nValue > -1 ) { @@ -445,8 +445,8 @@ void SaneDlg::InitFields() // set scan area for( i = 0; i < 4; i++ ) { - char const *pOptionName = NULL; - MetricField* pField = NULL; + char const *pOptionName = nullptr; + MetricField* pField = nullptr; switch( i ) { case 0: @@ -487,7 +487,7 @@ void SaneDlg::InitFields() case 3: aBottomRight.Y() = (int)fValue;break; } } - double *pDouble = NULL; + double *pDouble = nullptr; nValue = mrSane.GetRange( nOption, pDouble ); if( nValue > -1 ) { @@ -558,7 +558,7 @@ void SaneDlg::InitFields() // fill OptionBox mpOptionBox->Clear(); - SvTreeListEntry* pParentEntry = 0; + SvTreeListEntry* pParentEntry = nullptr; bool bGroupRejected = false; for( i = 1; i < mrSane.CountOptions(); i++ ) { @@ -789,7 +789,7 @@ IMPL_LINK_TYPED( SaneDlg, ModifyHdl, Edit&, rEdit, void ) int nOption = mrSane.GetOptionByName( "resolution" ); if( nOption != -1 ) { - double* pDouble = NULL; + double* pDouble = nullptr; int nValues = mrSane.GetRange( nOption, pDouble ); if( nValues > 0 ) { @@ -1010,7 +1010,7 @@ void SaneDlg::EstablishStringRange() { const char** ppStrings = mrSane.GetStringConstraint( mnCurrentOption ); mpStringRangeBox->Clear(); - for( int i = 0; ppStrings[i] != 0; i++ ) + for( int i = 0; ppStrings[i] != nullptr; i++ ) mpStringRangeBox->InsertEntry( OUString( ppStrings[i], strlen(ppStrings[i]), osl_getThreadTextEncoding() ) ); OString aValue; mrSane.GetOptionValue( mnCurrentOption, aValue ); @@ -1025,7 +1025,7 @@ void SaneDlg::EstablishQuantumRange() if( mpRange ) { delete [] mpRange; - mpRange = 0; + mpRange = nullptr; } int nValues = mrSane.GetRange( mnCurrentOption, mpRange ); if( nValues == 0 ) @@ -1033,7 +1033,7 @@ void SaneDlg::EstablishQuantumRange() mfMin = mpRange[ 0 ]; mfMax = mpRange[ 1 ]; delete [] mpRange; - mpRange = 0; + mpRange = nullptr; EstablishNumericOption(); } else if( nValues > 0 ) @@ -1484,7 +1484,7 @@ bool SaneDlg::SetAdjustedNumericalValue( if( nElement < 0 || nElement >= mrSane.GetOptionElements( nOption ) ) return false; - double* pValues = NULL; + double* pValues = nullptr; int nValues; if( ( nValues = mrSane.GetRange( nOption, pValues ) ) < 0 ) { |