diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:21:32 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:34 +0100 |
commit | 5bbdb9423e15b68438bb8397c15635e044129e28 (patch) | |
tree | 737406d1586cdd8b5247f7f230ab59bf0bb87bbb /rsc | |
parent | e96bf3c40f945d15a8bdc9cffc27346dfb3cb246 (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I8df6c1c7d2312a4864750180561a3e63fe37003f
Diffstat (limited to 'rsc')
31 files changed, 234 insertions, 234 deletions
diff --git a/rsc/inc/rscclass.hxx b/rsc/inc/rscclass.hxx index fb240d073931..d6a5b4836499 100644 --- a/rsc/inc/rscclass.hxx +++ b/rsc/inc/rscclass.hxx @@ -70,7 +70,7 @@ public: RSCINST GetVariable( const RSCINST & rInst, Atom nVarName, const RSCINST & rInitInst, bool bInitDflt = false, - RscTop * pCreateClass = NULL ) override; + RscTop * pCreateClass = nullptr ) override; RSCINST GetCopyVar( const RSCINST & rInst, Atom nVarName ) override; // gives the class size in bytes diff --git a/rsc/inc/rsccont.hxx b/rsc/inc/rsccont.hxx index e6095c36f9a6..cd1deaa595e4 100644 --- a/rsc/inc/rsccont.hxx +++ b/rsc/inc/rsccont.hxx @@ -55,11 +55,11 @@ protected: RscTypCont * pTC, sal_uInt32, bool bExtra ); public: RscBaseCont( Atom nId, sal_uInt32 nTypId, - RscTop * pSuper = NULL, + RscTop * pSuper = nullptr, bool bNoId = true ); virtual ~RscBaseCont(); virtual RSCCLASS_TYPE GetClassType() const override; - void SetTypeClass( RscTop * pClass, RscTop * pClass1 = NULL ) + void SetTypeClass( RscTop * pClass, RscTop * pClass1 = nullptr ) { pTypeClass = pClass; pTypeClass1 = pClass1; @@ -107,7 +107,7 @@ class RscContWriteSrc : public RscBaseCont { public: RscContWriteSrc( Atom nId, sal_uInt32 nTypId, - RscTop * pSuper = NULL, + RscTop * pSuper = nullptr, bool bNoId = true ); void WriteSrc( const RSCINST & rInst, FILE * fOutput, RscTypCont * pTC, sal_uInt32 nTab, const char * ) override; @@ -117,7 +117,7 @@ class RscCont : public RscContWriteSrc { public: RscCont( Atom nId, sal_uInt32 nTypId, - RscTop * pSuper = NULL, + RscTop * pSuper = nullptr, bool bNoId = true ); ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem, RscTypCont * pTC, sal_uInt32, bool bExtra ) override; @@ -127,7 +127,7 @@ class RscContExtraData : public RscContWriteSrc { public: RscContExtraData( Atom nId, sal_uInt32 nTypId, - RscTop * pSuper = NULL, + RscTop * pSuper = nullptr, bool bNoId = true ); ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem, RscTypCont * pTC, sal_uInt32, bool bExtra ) override; diff --git a/rsc/inc/rscdef.hxx b/rsc/inc/rscdef.hxx index 2f8b69c0dbfc..60ce424e636b 100644 --- a/rsc/inc/rscdef.hxx +++ b/rsc/inc/rscdef.hxx @@ -228,7 +228,7 @@ class RscDefTree RscDefine * pDefRoot; public: static bool Evaluate( RscDefine * pDef ); - RscDefTree(){ pDefRoot = NULL; } + RscDefTree(){ pDefRoot = nullptr; } ~RscDefTree(); void Remove(); RscDefine * Search( const char * pName ); diff --git a/rsc/inc/rsclex.hxx b/rsc/inc/rsclex.hxx index 6d6fc43a5c3a..f3406f76bb5d 100644 --- a/rsc/inc/rsclex.hxx +++ b/rsc/inc/rsclex.hxx @@ -60,7 +60,7 @@ struct Node Node* pPrev; RSCINST aInst; sal_uInt32 nTupelRec; // Rekursionstiefe fuer Tupel - Node() { pPrev = NULL; nTupelRec = 0; } + Node() { pPrev = nullptr; nTupelRec = 0; } }; class ObjectStack @@ -69,10 +69,10 @@ class ObjectStack Node* pRoot; public: - ObjectStack () { pRoot = NULL; } + ObjectStack () { pRoot = nullptr; } const RSCINST & Top () { return pRoot->aInst; } - bool IsEmpty() { return( pRoot == NULL ); } + bool IsEmpty() { return( pRoot == nullptr ); } void Push( RSCINST aInst ) { Node* pTmp; diff --git a/rsc/inc/rsctop.hxx b/rsc/inc/rsctop.hxx index 43b32ca9d98a..13cdbc5a056d 100644 --- a/rsc/inc/rsctop.hxx +++ b/rsc/inc/rsctop.hxx @@ -42,7 +42,7 @@ class RscTop : public RefNode protected: RscTop( Atom nId, sal_uInt32 nTypIdent, - RscTop * pSuperCl = NULL ); + RscTop * pSuperCl = nullptr ); public: OString aCallPar1; // class call without types until ResId @@ -81,7 +81,7 @@ public: // sets the variable virtual ERRTYPE SetVariable( Atom nVarName, RscTop * pClass, - RSCINST * pDflt = NULL, + RSCINST * pDflt = nullptr, RSCVAR nVarType = 0, sal_uInt32 nMask = 0, Atom nDataBaseName = InvalidAtom ); @@ -93,7 +93,7 @@ public: virtual RSCINST GetVariable( const RSCINST & rInst, Atom nVarName, const RSCINST & rInitInst, bool bInitDflt = false, - RscTop * pCreateClass = NULL ); + RscTop * pCreateClass = nullptr ); virtual RSCINST GetCopyVar( const RSCINST & rInst, Atom nVarName ); virtual RSCINST GetTupelVar( const RSCINST & rInst, sal_uInt32 nPos, diff --git a/rsc/source/parser/erscerr.cxx b/rsc/source/parser/erscerr.cxx index c5a9fd73abe8..edd7a4dc3f96 100644 --- a/rsc/source/parser/erscerr.cxx +++ b/rsc/source/parser/erscerr.cxx @@ -391,7 +391,7 @@ void RscError::FatalError( const ERRTYPE& rError, const RscId &aId, { if( ERR_USAGE != rError ){ nErrors++; - ErrorFormat( rError, NULL, aId ); + ErrorFormat( rError, nullptr, aId ); WriteError( rError, pMessage ); StdLstErr( "\nTerminating compiler\n" ); } diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx index 883f0b1df72d..d3daab20d5af 100644 --- a/rsc/source/parser/rscdb.cxx +++ b/rsc/source/parser/rscdb.cxx @@ -221,7 +221,7 @@ RscTop * RscTypCont::SearchType( Atom nId ) Search for base type nId; */ if( nId == InvalidAtom ) - return NULL; + return nullptr; #define ELSE_IF( a ) \ else if( a.GetId() == nId ) \ @@ -251,14 +251,14 @@ RscTop * RscTypCont::SearchType( Atom nId ) if( pEle->GetId() == nId ) return pEle; } - return NULL; + return nullptr; } sal_uInt32 RscTypCont::PutSysName( sal_uInt32 nRscTyp, char * pFileName, sal_uInt32 nConst, sal_uInt32 nId, bool bFirst ) { RscSysEntry *pSysEntry; - RscSysEntry *pFoundEntry = NULL; + RscSysEntry *pFoundEntry = nullptr; bool bId1 = false; for ( size_t i = 0, n = aSysLst.size(); i < n; ++i ) diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx index 395ba1f032a3..0de9953356ef 100644 --- a/rsc/source/parser/rscibas.cxx +++ b/rsc/source/parser/rscibas.cxx @@ -381,7 +381,7 @@ RscTupel * RscTypCont::InitGeometry() // Clientvariablen einfuegen pTupel = new RscTupel( pHS->getID( "TupelDeltaSystem" ), - RSC_NOTYPE, NULL ); + RSC_NOTYPE, nullptr ); nId = aNmTb.Put( "X", VARNAME ); pTupel->SetVariable( nId, &aShort ); nId = aNmTb.Put( "Y", VARNAME ); @@ -421,7 +421,7 @@ RscTupel * RscTypCont::InitStringTupel() Atom nId; // Clientvariablen einfuegen - pTupel = new RscTupel( pHS->getID( "CharsTupel" ), RSC_NOTYPE, NULL ); + pTupel = new RscTupel( pHS->getID( "CharsTupel" ), RSC_NOTYPE, nullptr ); nId = aNmTb.Put( "FILTER", VARNAME ); pTupel->SetVariable( nId, &aString ); nId = aNmTb.Put( "MASK", VARNAME ); @@ -436,7 +436,7 @@ RscTupel * RscTypCont::InitStringLongTupel() Atom nId; // Clientvariablen einfuegen - pTupel = new RscTupel( pHS->getID( "CharsLongTupel" ), RSC_NOTYPE, NULL ); + pTupel = new RscTupel( pHS->getID( "CharsLongTupel" ), RSC_NOTYPE, nullptr ); nId = aNmTb.Put( "ItemText", VARNAME ); pTupel->SetVariable( nId, &aString ); nId = aNmTb.Put( "ItemId", VARNAME ); diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx index 608126f2f243..e19e78e6287d 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -43,7 +43,7 @@ void RscTypCont::InsWinBit( RscTop * pClass, const OString& rName, pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, &aWinBits, nVal ) ); Atom nId = aNmTb.Put( rName.getStr(), VARNAME ); - pClass->SetVariable( nId, pClient, NULL, + pClass->SetVariable( nId, pClient, nullptr, VAR_NODATAINST, 0, nWinBitVarId ); } @@ -56,7 +56,7 @@ RscTop * RscTypCont::InitClassMgr() RscBaseCont * pClass; Atom nId; - aBaseLst.push_back( pClass = new RscBaseCont( InvalidAtom, RSC_NOTYPE, NULL, false ) ); + aBaseLst.push_back( pClass = new RscBaseCont( InvalidAtom, RSC_NOTYPE, nullptr, false ) ); nId = pHS->getID( "Resource" ); pClassMgr = new RscMgr( nId, RSC_RESOURCE, pClass ); @@ -74,7 +74,7 @@ RscTop * RscTypCont::InitClassMgr() pClassMgr->SetVariable( nId, pCont ); }; nId = aNmTb.Put( "Comment", VARNAME ); - pClassMgr->SetVariable( nId, &aString, NULL, VAR_NORC ); + pClassMgr->SetVariable( nId, &aString, nullptr, VAR_NORC ); pClass->SetTypeClass( pClassMgr ); @@ -109,7 +109,7 @@ RscTop * RscTypCont::InitClassBitmap( RscTop * pSuper ) // the class RscSysDepend handles variables "FILE" in a specific way nId = aNmTb.Put( "File", VARNAME ); - pClassBitmap->SetVariable( nId, &aLangString, NULL, VAR_NORC ); + pClassBitmap->SetVariable( nId, &aLangString, nullptr, VAR_NORC ); return pClassBitmap; } @@ -152,11 +152,11 @@ RscTop * RscTypCont::InitClassImage( RscTop * pSuper, RscTop * pClassBitmap, // initialize variables nId = aNmTb.Put( "ImageBitmap", VARNAME ); - pClassImage->SetVariable( nId, pClassBitmap, NULL, 0, RSC_IMAGE_IMAGEBITMAP ); + pClassImage->SetVariable( nId, pClassBitmap, nullptr, 0, RSC_IMAGE_IMAGEBITMAP ); nId = aNmTb.Put( "MaskBitmap", VARNAME ); - pClassImage->SetVariable( nId, pClassBitmap, NULL, 0, RSC_IMAGE_MASKBITMAP ); + pClassImage->SetVariable( nId, pClassBitmap, nullptr, 0, RSC_IMAGE_MASKBITMAP ); nId = aNmTb.Put( "MaskColor", VARNAME ); - pClassImage->SetVariable( nId, pClassColor, NULL, + pClassImage->SetVariable( nId, pClassColor, nullptr, VAR_SVDYNAMIC, RSC_IMAGE_MASKCOLOR ); return pClassImage; @@ -178,21 +178,21 @@ RscTop * RscTypCont::InitClassImageList( RscTop * pSuper, pClassImageList->SetVariable( nId, &aString ); nId = aNmTb.Put( "MaskColor", VARNAME ); - pClassImageList->SetVariable( nId, pClassColor, NULL, + pClassImageList->SetVariable( nId, pClassColor, nullptr, VAR_SVDYNAMIC, RSC_IMAGELIST_MASKCOLOR ); RscCont * pCont = new RscCont( pHS->getID( "sal_uInt16 *" ), RSC_NOTYPE ); pCont->SetTypeClass( &aIdUShort ); aBaseLst.push_back( pCont ); nId = aNmTb.Put( "IdList", VARNAME ); - pClassImageList->SetVariable( nId, pCont, NULL, 0, + pClassImageList->SetVariable( nId, pCont, nullptr, 0, RSC_IMAGELIST_IDLIST ); nId = aNmTb.Put( "FileList", VARNAME ); pClassImageList->SetVariable( nId, pStrLst ); nId = aNmTb.Put( "IdCount", VARNAME ); - pClassImageList->SetVariable( nId, &aUShort, NULL, 0, + pClassImageList->SetVariable( nId, &aUShort, nullptr, 0, RSC_IMAGELIST_IDCOUNT ); return pClassImageList; } @@ -225,25 +225,25 @@ RscTop * RscTypCont::InitClassWindow( RscTop * pSuper, RscEnum * pMapUnit, // add variable nVarId = aNmTb.Put( "_RscExtraFlags", VARNAME ); - pClassWindow->SetVariable( nVarId, pFlag, NULL, + pClassWindow->SetVariable( nVarId, pFlag, nullptr, VAR_HIDDEN | VAR_NOENUM ); aBaseLst.push_back( pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nDisableId ) ); nId = aNmTb.Put( "Disable", VARNAME ); - pClassWindow->SetVariable( nId, pClient, NULL, + pClassWindow->SetVariable( nId, pClient, nullptr, VAR_NODATAINST, 0, nVarId ); aBaseLst.push_back( pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nOutputSizeId ) ); nId = aNmTb.Put( "OutputSize", VARNAME ); - pClassWindow->SetVariable( nId, pClient, NULL, + pClassWindow->SetVariable( nId, pClient, nullptr, VAR_NODATAINST, 0, nVarId ); } - pClassWindow->SetVariable( nWinBitVarId, &aWinBits, NULL, + pClassWindow->SetVariable( nWinBitVarId, &aWinBits, nullptr, VAR_HIDDEN | VAR_NOENUM ); INS_WINBIT(pClassWindow,Border) @@ -253,35 +253,35 @@ RscTop * RscTypCont::InitClassWindow( RscTop * pSuper, RscEnum * pMapUnit, InsWinBit( pClassWindow, "DialogControl", nTabControlId ); nId = aNmTb.Put( "HelpID", VARNAME ); - pClassWindow->SetVariable( nId, &aStringLiteral, NULL, 0, WINDOW_HELPID ); + pClassWindow->SetVariable( nId, &aStringLiteral, nullptr, 0, WINDOW_HELPID ); nRsc_XYMAPMODEId = nId = aNmTb.Put( "_XYMapMode", VARNAME ); - pClassWindow->SetVariable( nId, pMapUnit, NULL, 0, WINDOW_XYMAPMODE ); + pClassWindow->SetVariable( nId, pMapUnit, nullptr, 0, WINDOW_XYMAPMODE ); nRsc_X = nId = aNmTb.Put( "_X", VARNAME ); - pClassWindow->SetVariable( nId, &aLong, NULL, 0, WINDOW_X ); + pClassWindow->SetVariable( nId, &aLong, nullptr, 0, WINDOW_X ); nRsc_Y = nId = aNmTb.Put( "_Y", VARNAME ); - pClassWindow->SetVariable( nId, &aLong, NULL, 0, WINDOW_Y ); + pClassWindow->SetVariable( nId, &aLong, nullptr, 0, WINDOW_Y ); nRsc_WHMAPMODEId = nId = aNmTb.Put( "_WHMapMode", VARNAME ); - pClassWindow->SetVariable( nId, pMapUnit, NULL, 0, WINDOW_WHMAPMODE ); + pClassWindow->SetVariable( nId, pMapUnit, nullptr, 0, WINDOW_WHMAPMODE ); nRsc_WIDTH = nId = aNmTb.Put( "_Width", VARNAME ); - pClassWindow->SetVariable( nId, &aLong, NULL, 0, WINDOW_WIDTH ); + pClassWindow->SetVariable( nId, &aLong, nullptr, 0, WINDOW_WIDTH ); nRsc_HEIGHT = nId = aNmTb.Put( "_Height", VARNAME ); - pClassWindow->SetVariable( nId, &aLong, NULL, 0, WINDOW_HEIGHT ); + pClassWindow->SetVariable( nId, &aLong, nullptr, 0, WINDOW_HEIGHT ); nRsc_DELTALANG = nId = aNmTb.Put( "DeltaLang", VARNAME ); - pClassWindow->SetVariable( nId, pLangGeo, NULL, VAR_NORC | VAR_NOENUM); + pClassWindow->SetVariable( nId, pLangGeo, nullptr, VAR_NORC | VAR_NOENUM); nId = aNmTb.Put( "Text", VARNAME ); - pClassWindow->SetVariable( nId, &aLangString, NULL, 0, WINDOW_TEXT ); + pClassWindow->SetVariable( nId, &aLangString, nullptr, 0, WINDOW_TEXT ); nId = aNmTb.Put( "HelpText", VARNAME ); - pClassWindow->SetVariable( nId, &aLangString, NULL, 0, WINDOW_HELPTEXT ); + pClassWindow->SetVariable( nId, &aLangString, nullptr, 0, WINDOW_HELPTEXT ); nId = aNmTb.Put( "QuickHelpText", VARNAME ); - pClassWindow->SetVariable( nId, &aLangString, NULL, 0, WINDOW_QUICKTEXT ); + pClassWindow->SetVariable( nId, &aLangString, nullptr, 0, WINDOW_QUICKTEXT ); nId = aNmTb.Put( "ExtraLong", VARNAME ); - pClassWindow->SetVariable( nId, &aLong, NULL, 0, WINDOW_EXTRALONG ); + pClassWindow->SetVariable( nId, &aLong, nullptr, 0, WINDOW_EXTRALONG ); nId = aNmTb.Put( "UniqueId", VARNAME ); - pClassWindow->SetVariable( nId, &aString, NULL, 0, WINDOW_UNIQUEID ); + pClassWindow->SetVariable( nId, &aString, nullptr, 0, WINDOW_UNIQUEID ); // border style RscEnum* pBorderStyleEnum = new RscEnum( pHS->getID( "WindowBorderStyle" ), RSC_NOTYPE ); @@ -295,7 +295,7 @@ RscTop * RscTypCont::InitClassWindow( RscTop * pSuper, RscEnum * pMapUnit, // add variable nId = aNmTb.Put( "BorderStyle", VARNAME ); - pClassWindow->SetVariable( nId, pBorderStyleEnum, NULL, + pClassWindow->SetVariable( nId, pBorderStyleEnum, nullptr, 0, WINDOW_BORDER_STYLE ); @@ -431,7 +431,7 @@ RscTop * RscTypCont::InitClassImageButton( RscTop * pSuper, // initialize variables { nId = aNmTb.Put( "ButtonImage", VARNAME ); - pClassImageButton->SetVariable( nId, pClassImage, NULL, 0, + pClassImageButton->SetVariable( nId, pClassImage, nullptr, 0, RSC_IMAGEBUTTON_IMAGE ); } // initialize variables @@ -468,11 +468,11 @@ RscTop * RscTypCont::InitClassImageButton( RscTop * pSuper, // add variable nVarId = aNmTb.Put( "Symbol", VARNAME ); - pClassImageButton->SetVariable( nVarId, pSymbol, NULL, 0, + pClassImageButton->SetVariable( nVarId, pSymbol, nullptr, 0, RSC_IMAGEBUTTON_SYMBOL ); } nId = aNmTb.Put( "State", VARNAME ); - pClassImageButton->SetVariable( nId, pTriState, NULL, 0, + pClassImageButton->SetVariable( nId, pTriState, nullptr, 0, RSC_IMAGEBUTTON_STATE ); INS_WINBIT(pClassImageButton,Repeat) @@ -526,7 +526,7 @@ RscTop * RscTypCont::InitClassListBox( RscTop * pSuper, RscArray * pStrLst ) INS_WINBIT(pClassListBox,DDExtraWidth) { - RSCINST aDflt = aUShort.Create( NULL, RSCINST(), false ); + RSCINST aDflt = aUShort.Create( nullptr, RSCINST(), false ); aDflt.pClass->SetNumber( aDflt, (sal_uInt16)0xFFFF ); nId = aNmTb.Put( "CurPos", VARNAME ); pClassListBox->SetVariable( nId, &aUShort, &aDflt ); @@ -601,7 +601,7 @@ RscTop * RscTypCont::InitClassFixedImage( RscTop * pSuper, RscTop * pClassImage // initialize variables nId = aNmTb.Put( "Fixed", VARNAME ); - pClassFixedImage->SetVariable( nId, pClassImage, 0, 0, RSC_FIXEDIMAGE_IMAGE ); + pClassFixedImage->SetVariable( nId, pClassImage, nullptr, 0, RSC_FIXEDIMAGE_IMAGE ); return pClassFixedImage; } @@ -660,7 +660,7 @@ RscTop * RscTypCont::InitClassKeyCode( RscTop * pSuper, RscEnum * pKey ) // add variable nVarId = aNmTb.Put( "_ModifierFlags", VARNAME ); - pClassKeyCode->SetVariable( nVarId, pFlag, NULL, + pClassKeyCode->SetVariable( nVarId, pFlag, nullptr, VAR_HIDDEN | VAR_NOENUM ); // add client variables @@ -668,14 +668,14 @@ RscTop * RscTypCont::InitClassKeyCode( RscTop * pSuper, RscEnum * pKey ) pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nShiftId ) ); nId = aNmTb.Put( "Shift", VARNAME ); - pClassKeyCode->SetVariable( nId, pClient, NULL, + pClassKeyCode->SetVariable( nId, pClient, nullptr, VAR_NODATAINST, 0, nVarId ); aBaseLst.push_back( pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nMod1Id ) ); nId = aNmTb.Put( "Modifier1", VARNAME ); - pClassKeyCode->SetVariable( nId, pClient, NULL, + pClassKeyCode->SetVariable( nId, pClient, nullptr, VAR_NODATAINST, 0, nVarId ); @@ -683,7 +683,7 @@ RscTop * RscTypCont::InitClassKeyCode( RscTop * pSuper, RscEnum * pKey ) pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nMod2Id ) ); nId = aNmTb.Put( "Modifier2", VARNAME ); - pClassKeyCode->SetVariable( nId, pClient, NULL, + pClassKeyCode->SetVariable( nId, pClient, nullptr, VAR_NODATAINST, 0, nVarId ); } { @@ -736,7 +736,7 @@ RscTop * RscTypCont::InitClassAccelItem( RscTop * pSuper, nId = aNmTb.Put( "Disable", VARNAME ); pClassAccelItem->SetVariable( nId, &aBool ); nId = aNmTb.Put( "Key", VARNAME ); - pClassAccelItem->SetVariable( nId, pClassKeyCode, NULL, 0, + pClassAccelItem->SetVariable( nId, pClassKeyCode, nullptr, 0, ACCELITEM_KEY ); return pClassAccelItem; @@ -784,10 +784,10 @@ RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper, // initialize variables nId = aNmTb.Put( "Separator", VARNAME ); - pClassMenuItem->SetVariable( nId, &aBool, NULL, 0, + pClassMenuItem->SetVariable( nId, &aBool, nullptr, 0, RSC_MENUITEM_SEPARATOR ); nId = aNmTb.Put( "Identifier", VARNAME ); - pClassMenuItem->SetVariable( nId, &aIdNoZeroUShort, NULL, 0, + pClassMenuItem->SetVariable( nId, &aIdNoZeroUShort, nullptr, 0, RSC_MENUITEM_ID ); { RscFlag * pFlag; @@ -811,7 +811,7 @@ RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper, // add variable nVarId = aNmTb.Put( "_MenuItemFlags", VARNAME ); - pClassMenuItem->SetVariable( nVarId, pFlag, NULL, + pClassMenuItem->SetVariable( nVarId, pFlag, nullptr, VAR_HIDDEN | VAR_NOENUM, RSC_MENUITEM_STATUS ); @@ -820,61 +820,61 @@ RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper, pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nCheckableId ) ); nId = aNmTb.Put( "Checkable", VARNAME ); - pClassMenuItem->SetVariable( nId, pClient, NULL, + pClassMenuItem->SetVariable( nId, pClient, nullptr, VAR_NODATAINST, 0, nVarId ); aBaseLst.push_back( pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nAutoCheckId ) ); nId = aNmTb.Put( "AutoCheck", VARNAME ); - pClassMenuItem->SetVariable( nId, pClient, NULL, + pClassMenuItem->SetVariable( nId, pClient, nullptr, VAR_NODATAINST, 0, nVarId ); aBaseLst.push_back( pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nRadioCheckId ) ); nId = aNmTb.Put( "RadioCheck", VARNAME ); - pClassMenuItem->SetVariable( nId, pClient, NULL, + pClassMenuItem->SetVariable( nId, pClient, nullptr, VAR_NODATAINST, 0, nVarId ); aBaseLst.push_back( pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nAboutId ) ); nId = aNmTb.Put( "About", VARNAME ); - pClassMenuItem->SetVariable( nId, pClient, NULL, + pClassMenuItem->SetVariable( nId, pClient, nullptr, VAR_NODATAINST, 0, nVarId ); aBaseLst.push_back( pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nHelpId ) ); nId = aNmTb.Put( "Help", VARNAME ); - pClassMenuItem->SetVariable( nId, pClient, NULL, + pClassMenuItem->SetVariable( nId, pClient, nullptr, VAR_NODATAINST, 0, nVarId ); } nId = aNmTb.Put( "Text", VARNAME ); - pClassMenuItem->SetVariable( nId, &aLangString, NULL, 0, + pClassMenuItem->SetVariable( nId, &aLangString, nullptr, 0, RSC_MENUITEM_TEXT ); nId = aNmTb.Put( "ItemBitmap", VARNAME ); - pClassMenuItem->SetVariable( nId, pClassBitmap, NULL, 0, + pClassMenuItem->SetVariable( nId, pClassBitmap, nullptr, 0, RSC_MENUITEM_BITMAP ); nId = aNmTb.Put( "HelpText", VARNAME ); - pClassMenuItem->SetVariable( nId, &aLangString, NULL, 0, + pClassMenuItem->SetVariable( nId, &aLangString, nullptr, 0, RSC_MENUITEM_HELPTEXT ); nId = aNmTb.Put( "HelpID", VARNAME ); - pClassMenuItem->SetVariable( nId, &aStringLiteral, NULL, 0, + pClassMenuItem->SetVariable( nId, &aStringLiteral, nullptr, 0, RSC_MENUITEM_HELPID ); nId = aNmTb.Put( "AccelKey", VARNAME ); - pClassMenuItem->SetVariable( nId, pClassKeyCode, NULL, 0, + pClassMenuItem->SetVariable( nId, pClassKeyCode, nullptr, 0, RSC_MENUITEM_KEYCODE ); nId = aNmTb.Put( "Check", VARNAME ); - pClassMenuItem->SetVariable( nId, &aBool, NULL, 0, + pClassMenuItem->SetVariable( nId, &aBool, nullptr, 0, RSC_MENUITEM_CHECKED ); nId = aNmTb.Put( "Disable", VARNAME ); - pClassMenuItem->SetVariable( nId, &aBool, NULL, 0, + pClassMenuItem->SetVariable( nId, &aBool, nullptr, 0, RSC_MENUITEM_DISABLE ); nId = aNmTb.Put( "Command", VARNAME ); - pClassMenuItem->SetVariable( nId, &aString, NULL, 0, + pClassMenuItem->SetVariable( nId, &aString, nullptr, 0, RSC_MENUITEM_COMMAND ); return pClassMenuItem; @@ -899,12 +899,12 @@ RscTop * RscTypCont::InitClassMenu( RscTop * pSuper, aBaseLst.push_back( pCont = new RscCont( pHS->getID( "ContMenuItem" ), RSC_NOTYPE ) ); pCont->SetTypeClass( pClassMenuItem ); nId = aNmTb.Put( "ItemList", VARNAME ); - pClassMenu->SetVariable( nId, pCont, NULL, 0, RSC_MENU_ITEMS ); + pClassMenu->SetVariable( nId, pCont, nullptr, 0, RSC_MENU_ITEMS ); } nId = aNmTb.Put( "Text", VARNAME ); - pClassMenu->SetVariable( nId, &aLangString, NULL, 0, RSC_MENU_TEXT ); + pClassMenu->SetVariable( nId, &aLangString, nullptr, 0, RSC_MENU_TEXT ); nId = aNmTb.Put( "DefaultItemId", VARNAME ); - pClassMenu->SetVariable( nId, &aIdUShort, NULL, 0, + pClassMenu->SetVariable( nId, &aIdUShort, nullptr, 0, RSC_MENU_DEFAULTITEMID ); return pClassMenu; @@ -940,22 +940,22 @@ RscTop * RscTypCont::InitClassNumericFormatter( RscTop * pSuper ) // initialize variables nId = aNmTb.Put( "Minimum", VARNAME ); - pClassNumeric->SetVariable( nId, &aIdLong, NULL, + pClassNumeric->SetVariable( nId, &aIdLong, nullptr, 0, NUMERICFORMATTER_MIN ); nId = aNmTb.Put( "Maximum", VARNAME ); - pClassNumeric->SetVariable( nId, &aIdLong, NULL, + pClassNumeric->SetVariable( nId, &aIdLong, nullptr, 0, NUMERICFORMATTER_MAX ); nId = aNmTb.Put( "StrictFormat", VARNAME ); - pClassNumeric->SetVariable( nId, &aBool, NULL, + pClassNumeric->SetVariable( nId, &aBool, nullptr, 0, NUMERICFORMATTER_STRICTFORMAT ); nId = aNmTb.Put( "DecimalDigits", VARNAME ); - pClassNumeric->SetVariable( nId, &aUShort, NULL, + pClassNumeric->SetVariable( nId, &aUShort, nullptr, 0, NUMERICFORMATTER_DECIMALDIGITS ); nId = aNmTb.Put( "Value", VARNAME ); - pClassNumeric->SetVariable( nId, &aIdLong, NULL, + pClassNumeric->SetVariable( nId, &aIdLong, nullptr, 0, NUMERICFORMATTER_VALUE ); nId = aNmTb.Put( "NoThousandSep", VARNAME ); - pClassNumeric->SetVariable( nId, &aBool, NULL, + pClassNumeric->SetVariable( nId, &aBool, nullptr, 0, NUMERICFORMATTER_NOTHOUSANDSEP ); return pClassNumeric; @@ -974,10 +974,10 @@ RscTop * RscTypCont::InitClassMetricFormatter( RscTop * pSuper, // initialize variables nId = aNmTb.Put( "Unit", VARNAME ); - pClassMetric->SetVariable( nId, pFieldUnits, NULL, + pClassMetric->SetVariable( nId, pFieldUnits, nullptr, 0, METRICFORMATTER_UNIT ); nId = aNmTb.Put( "CustomUnitText", VARNAME ); - pClassMetric->SetVariable( nId, &aLangString, NULL, + pClassMetric->SetVariable( nId, &aLangString, nullptr, 0, METRICFORMATTER_CUSTOMUNITTEXT ); return pClassMetric; @@ -1015,13 +1015,13 @@ RscTop * RscTypCont::InitClassNumericField( RscTop * pSuper ) // initialize variables nId = aNmTb.Put( "First", VARNAME ); - pClassNumericField->SetVariable( nId, &aIdLong, NULL, + pClassNumericField->SetVariable( nId, &aIdLong, nullptr, 0, NUMERICFIELD_FIRST ); nId = aNmTb.Put( "Last", VARNAME ); - pClassNumericField->SetVariable( nId, &aIdLong, NULL, + pClassNumericField->SetVariable( nId, &aIdLong, nullptr, 0, NUMERICFIELD_LAST ); nId = aNmTb.Put( "SpinSize", VARNAME ); - pClassNumericField->SetVariable( nId, &aIdLong, NULL, + pClassNumericField->SetVariable( nId, &aIdLong, nullptr, 0, NUMERICFIELD_SPINSIZE ); return pClassNumericField; } @@ -1040,13 +1040,13 @@ RscTop * RscTypCont::InitClassMetricField( RscTop * pSuper ) // initialize variables nId = aNmTb.Put( "First", VARNAME ); - pClassMetricField->SetVariable( nId, &aIdLong, NULL, + pClassMetricField->SetVariable( nId, &aIdLong, nullptr, 0, METRICFIELD_FIRST ); nId = aNmTb.Put( "Last", VARNAME ); - pClassMetricField->SetVariable( nId, &aIdLong, NULL, + pClassMetricField->SetVariable( nId, &aIdLong, nullptr, 0, METRICFIELD_LAST ); nId = aNmTb.Put( "SpinSize", VARNAME ); - pClassMetricField->SetVariable( nId, &aIdLong, NULL, + pClassMetricField->SetVariable( nId, &aIdLong, nullptr, 0, METRICFIELD_SPINSIZE ); return pClassMetricField; @@ -1066,16 +1066,16 @@ RscTop * RscTypCont::InitClassDockingWindow( RscTop * pSuper, // initialize variables nId = aNmTb.Put( "_FloatingPosMapMode", VARNAME ); - pClassDockWindow->SetVariable( nId, pMapUnit, NULL, 0, + pClassDockWindow->SetVariable( nId, pMapUnit, nullptr, 0, RSC_DOCKINGWINDOW_XYMAPMODE ); nId = aNmTb.Put( "_FloatingPosX", VARNAME ); - pClassDockWindow->SetVariable( nId, &aShort, NULL, 0, + pClassDockWindow->SetVariable( nId, &aShort, nullptr, 0, RSC_DOCKINGWINDOW_X ); nId = aNmTb.Put( "_FloatingPosY", VARNAME ); - pClassDockWindow->SetVariable( nId, &aShort, NULL, 0, + pClassDockWindow->SetVariable( nId, &aShort, nullptr, 0, RSC_DOCKINGWINDOW_Y ); nId = aNmTb.Put( "FloatingMode", VARNAME ); - pClassDockWindow->SetVariable( nId, &aBool, NULL, 0, + pClassDockWindow->SetVariable( nId, &aBool, nullptr, 0, RSC_DOCKINGWINDOW_FLOATING ); INS_WINBIT(pClassDockWindow,Moveable) @@ -1104,7 +1104,7 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper, // initialize variables nId = aNmTb.Put( "Identifier", VARNAME ); - pClassToolBoxItem->SetVariable( nId, &aIdNoZeroUShort, NULL, 0, + pClassToolBoxItem->SetVariable( nId, &aIdNoZeroUShort, nullptr, 0, RSC_TOOLBOXITEM_ID ); { RscEnum * pEnum; @@ -1117,7 +1117,7 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper, // add variable nId = aNmTb.Put( "Type", VARNAME ); - pClassToolBoxItem->SetVariable( nId, pEnum, NULL, 0, + pClassToolBoxItem->SetVariable( nId, pEnum, nullptr, 0, RSC_TOOLBOXITEM_TYPE ); } { @@ -1143,7 +1143,7 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper, // add variable l_nVarId = aNmTb.Put( "_ToolBoxItemFlags", VARNAME ); - pClassToolBoxItem->SetVariable( l_nVarId, pFlag, NULL, + pClassToolBoxItem->SetVariable( l_nVarId, pFlag, nullptr, VAR_HIDDEN | VAR_NOENUM, RSC_TOOLBOXITEM_STATUS ); @@ -1152,68 +1152,68 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper, pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, l_nCheckableId ) ); nId = aNmTb.Put( "Checkable", VARNAME ); - pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId ); + pClassToolBoxItem->SetVariable( nId, pClient, nullptr, VAR_NODATAINST, 0, l_nVarId ); aBaseLst.push_back( pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, l_nAutoCheckId ) ); nId = aNmTb.Put( "AutoCheck", VARNAME ); - pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId ); + pClassToolBoxItem->SetVariable( nId, pClient, nullptr, VAR_NODATAINST, 0, l_nVarId ); aBaseLst.push_back( pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, l_nRadioCheckId ) ); nId = aNmTb.Put( "RadioCheck", VARNAME ); - pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId ); + pClassToolBoxItem->SetVariable( nId, pClient, nullptr, VAR_NODATAINST, 0, l_nVarId ); aBaseLst.push_back( pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, l_nLeftId ) ); nId = aNmTb.Put( "Left", VARNAME ); - pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId ); + pClassToolBoxItem->SetVariable( nId, pClient, nullptr, VAR_NODATAINST, 0, l_nVarId ); aBaseLst.push_back( pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, l_nAutoSizeId ) ); nId = aNmTb.Put( "AutoSize", VARNAME ); - pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId ); + pClassToolBoxItem->SetVariable( nId, pClient, nullptr, VAR_NODATAINST, 0, l_nVarId ); aBaseLst.push_back( pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, l_nDropDownId ) ); nId = aNmTb.Put( "DropDown", VARNAME ); - pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId ); + pClassToolBoxItem->SetVariable( nId, pClient, nullptr, VAR_NODATAINST, 0, l_nVarId ); } nId = aNmTb.Put( "HelpID", VARNAME ); - pClassToolBoxItem->SetVariable( nId, &aStringLiteral, NULL, 0, + pClassToolBoxItem->SetVariable( nId, &aStringLiteral, nullptr, 0, RSC_TOOLBOXITEM_HELPID ); nId = aNmTb.Put( "Text", VARNAME ); - pClassToolBoxItem->SetVariable( nId, &aLangString, NULL, 0, + pClassToolBoxItem->SetVariable( nId, &aLangString, nullptr, 0, RSC_TOOLBOXITEM_TEXT ); nId = aNmTb.Put( "HelpText", VARNAME ); - pClassToolBoxItem->SetVariable( nId, &aLangString, NULL, 0, + pClassToolBoxItem->SetVariable( nId, &aLangString, nullptr, 0, RSC_TOOLBOXITEM_HELPTEXT ); nId = aNmTb.Put( "ItemBitmap", VARNAME ); - pClassToolBoxItem->SetVariable( nId, pClassBitmap, NULL, 0, + pClassToolBoxItem->SetVariable( nId, pClassBitmap, nullptr, 0, RSC_TOOLBOXITEM_BITMAP ); nId = aNmTb.Put( "ItemImage", VARNAME ); - pClassToolBoxItem->SetVariable( nId, pClassImage, NULL, 0, + pClassToolBoxItem->SetVariable( nId, pClassImage, nullptr, 0, RSC_TOOLBOXITEM_IMAGE ); nId = aNmTb.Put( "Disable", VARNAME ); - pClassToolBoxItem->SetVariable( nId, &aBool, NULL, 0, + pClassToolBoxItem->SetVariable( nId, &aBool, nullptr, 0, RSC_TOOLBOXITEM_DISABLE ); nId = aNmTb.Put( "State", VARNAME ); - pClassToolBoxItem->SetVariable( nId, pTriState, NULL, 0, + pClassToolBoxItem->SetVariable( nId, pTriState, nullptr, 0, RSC_TOOLBOXITEM_STATE ); nId = aNmTb.Put( "Hide", VARNAME ); - pClassToolBoxItem->SetVariable( nId, &aBool, NULL, 0, + pClassToolBoxItem->SetVariable( nId, &aBool, nullptr, 0, RSC_TOOLBOXITEM_HIDE ); nId = aNmTb.Put( "Hide", VARNAME ); - pClassToolBoxItem->SetVariable( nId, &aBool, NULL, 0, + pClassToolBoxItem->SetVariable( nId, &aBool, nullptr, 0, RSC_TOOLBOXITEM_HIDE ); nId = aNmTb.Put( "Command", VARNAME ); - pClassToolBoxItem->SetVariable( nId, &aString, NULL, 0, + pClassToolBoxItem->SetVariable( nId, &aString, nullptr, 0, RSC_TOOLBOXITEM_COMMAND ); return pClassToolBoxItem; @@ -1243,7 +1243,7 @@ RscTop * RscTypCont::InitClassToolBox( RscTop * pSuper, // add variable nId = aNmTb.Put( "ButtonType", VARNAME ); - pClassToolBox->SetVariable( nId, pEnum, NULL, 0, + pClassToolBox->SetVariable( nId, pEnum, nullptr, 0, RSC_TOOLBOX_BUTTONTYPE ); } { @@ -1257,23 +1257,23 @@ RscTop * RscTypCont::InitClassToolBox( RscTop * pSuper, // add variable nId = aNmTb.Put( "Align", VARNAME ); - pClassToolBox->SetVariable( nId, pEnum, NULL, 0, + pClassToolBox->SetVariable( nId, pEnum, nullptr, 0, RSC_TOOLBOX_ALIGN ); } nId = aNmTb.Put( "LineCount", VARNAME ); - pClassToolBox->SetVariable( nId, &aIdNoZeroUShort, NULL, 0, + pClassToolBox->SetVariable( nId, &aIdNoZeroUShort, nullptr, 0, RSC_TOOLBOX_LINECOUNT ); nId = aNmTb.Put( "FloatingLines", VARNAME ); - pClassToolBox->SetVariable( nId, &aUShort, NULL, 0, + pClassToolBox->SetVariable( nId, &aUShort, nullptr, 0, RSC_TOOLBOX_FLOATLINES ); nId = aNmTb.Put( "Customize", VARNAME ); - pClassToolBox->SetVariable( nId, &aBool, NULL, 0, + pClassToolBox->SetVariable( nId, &aBool, nullptr, 0, RSC_TOOLBOX_CUSTOMIZE ); nId = aNmTb.Put( "MenuStrings", VARNAME ); - pClassToolBox->SetVariable( nId, &aBool, NULL, 0, + pClassToolBox->SetVariable( nId, &aBool, nullptr, 0, RSC_TOOLBOX_MENUSTRINGS ); nId = aNmTb.Put( "ItemImageList", VARNAME ); - pClassToolBox->SetVariable( nId, pClassImageList, NULL, 0, + pClassToolBox->SetVariable( nId, pClassImageList, nullptr, 0, RSC_TOOLBOX_ITEMIMAGELIST ); { RscLangArray* pLA; @@ -1289,7 +1289,7 @@ RscTop * RscTypCont::InitClassToolBox( RscTop * pSuper, ) ); nId = aNmTb.Put( "ItemList", VARNAME ); - pClassToolBox->SetVariable( nId, pLA, NULL, 0, + pClassToolBox->SetVariable( nId, pLA, nullptr, 0, RSC_TOOLBOX_ITEMLIST ); } INS_WINBIT(pClassToolBox,Scroll) @@ -1314,16 +1314,16 @@ RscTop * RscTypCont::InitClassSfxStyleFamilyItem( RscTop * pSuper, aNmTb.Put( nId, CLASSNAME, pClassSfxFamilyStyleItem ); nId = aNmTb.Put( "FilterList", VARNAME ); - pClassSfxFamilyStyleItem->SetVariable( nId, pStrLst, NULL, 0, + pClassSfxFamilyStyleItem->SetVariable( nId, pStrLst, nullptr, 0, RSC_SFX_STYLE_ITEM_LIST ); nId = aNmTb.Put( "StyleBitmap", VARNAME ); - pClassSfxFamilyStyleItem->SetVariable( nId, pClassBitmap, NULL, 0, + pClassSfxFamilyStyleItem->SetVariable( nId, pClassBitmap, nullptr, 0, RSC_SFX_STYLE_ITEM_BITMAP ); nId = aNmTb.Put( "Text", VARNAME ); - pClassSfxFamilyStyleItem->SetVariable( nId, &aLangString, NULL, 0, + pClassSfxFamilyStyleItem->SetVariable( nId, &aLangString, nullptr, 0, RSC_SFX_STYLE_ITEM_TEXT ); nId = aNmTb.Put( "HelpText", VARNAME ); - pClassSfxFamilyStyleItem->SetVariable( nId, &aLangString, NULL, 0, + pClassSfxFamilyStyleItem->SetVariable( nId, &aLangString, nullptr, 0, RSC_SFX_STYLE_ITEM_HELPTEXT ); { RscEnum * pSfxStyleFamily; @@ -1338,11 +1338,11 @@ RscTop * RscTypCont::InitClassSfxStyleFamilyItem( RscTop * pSuper, aBaseLst.push_back( pSfxStyleFamily ); nId = aNmTb.Put( "StyleFamily", VARNAME ); - pClassSfxFamilyStyleItem->SetVariable( nId, pSfxStyleFamily, NULL, 0, + pClassSfxFamilyStyleItem->SetVariable( nId, pSfxStyleFamily, nullptr, 0, RSC_SFX_STYLE_ITEM_STYLEFAMILY ); } nId = aNmTb.Put( "StyleImage", VARNAME ); - pClassSfxFamilyStyleItem->SetVariable( nId, pClassImage, NULL, 0, + pClassSfxFamilyStyleItem->SetVariable( nId, pClassImage, nullptr, 0, RSC_SFX_STYLE_ITEM_IMAGE ); return pClassSfxFamilyStyleItem; } @@ -1384,10 +1384,10 @@ RscTop * RscTypCont::InitClassSfxSlotInfo( RscTop * pSuper ) aNmTb.Put( nId, CLASSNAME, pClassSfxSlotInfo ); nId = aNmTb.Put( "SlotName", VARNAME ); - pClassSfxSlotInfo->SetVariable( nId, &aLangString, NULL, 0, + pClassSfxSlotInfo->SetVariable( nId, &aLangString, nullptr, 0, RSC_SFX_SLOT_INFO_SLOTNAME ); nId = aNmTb.Put( "HelpText", VARNAME ); - pClassSfxSlotInfo->SetVariable( nId, &aLangString, NULL, 0, + pClassSfxSlotInfo->SetVariable( nId, &aLangString, nullptr, 0, RSC_SFX_SLOT_INFO_HELPTEXT ); return pClassSfxSlotInfo; } diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index f78ed7f72dab..30ca6a733683 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -270,7 +270,7 @@ void RscTypCont::Init() aVersion.pClass = new RscClass( pHS->getID( "VersionControl" ), RSC_VERSIONCONTROL, pClassMgr ); - aVersion = aVersion.pClass->Create( NULL, RSCINST() ); + aVersion = aVersion.pClass->Create( nullptr, RSCINST() ); pClassString = InitClassString( pClassMgr ); pRoot->Insert( pClassString ); @@ -377,7 +377,7 @@ void RscTypCont::Init() // pClassAccel is only completely defined here nId = aNmTb.Put( "SubAccelerator", VARNAME ); - pClassAccelItem->SetVariable( nId, pClassAccel, NULL, VAR_SVDYNAMIC, + pClassAccelItem->SetVariable( nId, pClassAccel, nullptr, VAR_SVDYNAMIC, ACCELITEM_ACCEL ); RscTop* pClassMenuItem = InitClassMenuItem( pClassMgr, pClassBitmap, @@ -389,7 +389,7 @@ void RscTypCont::Init() // pClassMenu is only completely defined here nId = aNmTb.Put( "SubMenu", VARNAME ); - pClassMenuItem->SetVariable( nId, pClassMenu, NULL, VAR_SVDYNAMIC, + pClassMenuItem->SetVariable( nId, pClassMenu, nullptr, VAR_SVDYNAMIC, RSC_MENUITEM_MENU ); } { @@ -410,7 +410,7 @@ void RscTypCont::Init() pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, &aWinBits, nRepeatId ) ); nId = aNmTb.Put( "Repeat", VARNAME ); - pClassSpinButton->SetVariable( nId, pClient, NULL, + pClassSpinButton->SetVariable( nId, pClient, nullptr, VAR_NODATAINST, 0, nWinBitVarId ); } pRoot->Insert( pClassSpinButton ); diff --git a/rsc/source/parser/rsckey.cxx b/rsc/source/parser/rsckey.cxx index 32cb54ec6865..0779e13f1934 100644 --- a/rsc/source/parser/rsckey.cxx +++ b/rsc/source/parser/rsckey.cxx @@ -48,7 +48,7 @@ RscNameTable::RscNameTable() { bSort = true; nEntries = 0; - pTable = NULL; + pTable = nullptr; }; RscNameTable::~RscNameTable() @@ -110,7 +110,7 @@ Atom RscNameTable::Put( Atom nName, sal_uInt32 nTyp, RscTop * pClass ) bool RscNameTable::Get( Atom nName, KEY_STRUCT * pEle ) { - KEY_STRUCT * pKey = NULL; + KEY_STRUCT * pKey = nullptr; KEY_STRUCT aSearchName; sal_uInt32 i; diff --git a/rsc/source/parser/rsclex.cxx b/rsc/source/parser/rsclex.cxx index d0a7a3c6f7d7..47c31877ef6e 100644 --- a/rsc/source/parser/rsclex.cxx +++ b/rsc/source/parser/rsclex.cxx @@ -61,7 +61,7 @@ struct KeyVal } aKeyVal[ 1 ]; bool bTargetDefined; -StringContainer* pStringContainer = NULL; +StringContainer* pStringContainer = nullptr; sal_uInt32 GetNumber() @@ -331,7 +331,7 @@ extern "C" void yyerror( const char* pMessage ) void yyerror( char* pMessage ) #endif { - pTC->pEH->Error( ERR_YACC, NULL, RscId(), pMessage ); + pTC->pEH->Error( ERR_YACC, nullptr, RscId(), pMessage ); } void InitParser( RscFileInst * pFileInst ) @@ -339,7 +339,7 @@ void InitParser( RscFileInst * pFileInst ) pTC = pFileInst->pTypCont; // set file container pFI = pFileInst; pStringContainer = new StringContainer(); - pExp = NULL; // for macro parser + pExp = nullptr; // for macro parser bTargetDefined = false; // initialize first character @@ -355,12 +355,12 @@ void EndParser() // free string container delete pStringContainer; - pStringContainer = NULL; + pStringContainer = nullptr; delete pExp; - pTC = NULL; - pFI = NULL; - pExp = NULL; + pTC = nullptr; + pFI = nullptr; + pExp = nullptr; } diff --git a/rsc/source/prj/gui.cxx b/rsc/source/prj/gui.cxx index 89d5d6e9e89c..540563895f44 100644 --- a/rsc/source/prj/gui.cxx +++ b/rsc/source/prj/gui.cxx @@ -29,7 +29,7 @@ static RscVerbosity lcl_determineVerbosity( int argc, char ** argv ) { for ( int i = 0; i < argc; ++i ) { - if ( argv[i] == NULL ) + if ( argv[i] == nullptr ) continue; if ( rsc_stricmp( argv[i], "-verbose" ) == 0 ) return RscVerbosityVerbose; diff --git a/rsc/source/prj/start.cxx b/rsc/source/prj/start.cxx index b61b8d89a512..bf496473af48 100644 --- a/rsc/source/prj/start.cxx +++ b/rsc/source/prj/start.cxx @@ -49,7 +49,7 @@ static bool CallPrePro( const OString& rInput, RscPtrPtr aRespCmdL; // Kommandozeile RscPtrPtr * pCmdL = &aNewCmdL; int i, nRet; - FILE* fRspFile = NULL; + FILE* fRspFile = nullptr; OString aRspFileName; if( bResponse ) diff --git a/rsc/source/res/rscarray.cxx b/rsc/source/res/rscarray.cxx index 4db3fb2c8dbb..595963b67ebc 100644 --- a/rsc/source/res/rscarray.cxx +++ b/rsc/source/res/rscarray.cxx @@ -69,16 +69,16 @@ RscTop * RscArray::GetTypeClass() const static RscInstNode * Create( RscInstNode * pNode ) { - RscInstNode * pRetNode = NULL; + RscInstNode * pRetNode = nullptr; if( pNode ) { pRetNode = new RscInstNode( pNode->GetId() ); - pRetNode->aInst = pNode->aInst.pClass->Create( NULL, pNode->aInst ); + pRetNode->aInst = pNode->aInst.pClass->Create( nullptr, pNode->aInst ); RscInstNode * pTmpNode = Create(pNode->Left()); if (pTmpNode) pRetNode->Insert( pTmpNode ); - if( (pTmpNode = Create( pNode->Right() )) != NULL ) + if( (pTmpNode = Create( pNode->Right() )) != nullptr ) pRetNode->Insert( pTmpNode ); } @@ -105,7 +105,7 @@ RSCINST RscArray::Create( RSCINST * pInst, const RSCINST & rDflt, RscTop::Create( &aInst, rDflt, bOwnClass ); pClassData = reinterpret_cast<RscArrayInst *>(aInst.pData + nOffInstData); - pClassData->pNode = NULL; + pClassData->pNode = nullptr; if( bOwnClass ) { RscArrayInst * pDfltClassData; @@ -160,15 +160,15 @@ ERRTYPE RscArray::GetValueEle( const RSCINST & rInst, if( pClassData->pNode ) pNode = pClassData->pNode->Search( sal_uInt32(lValue) ); else - pNode = NULL; + pNode = nullptr; if( !pNode ) { pNode = new RscInstNode( sal_uInt32(lValue) ); if( pCreateClass && GetSuperClass()->InHierarchy( pCreateClass ) ) - pNode->aInst = pCreateClass->Create( NULL, rInst ); + pNode->aInst = pCreateClass->Create( nullptr, rInst ); else - pNode->aInst = GetSuperClass()->Create( NULL, rInst ); + pNode->aInst = GetSuperClass()->Create( nullptr, rInst ); pNode->aInst.pClass->SetToDefault( pNode->aInst ); if( pClassData->pNode ) @@ -311,7 +311,7 @@ void RscArray::WriteSrcHeader( const RSCINST & rInst, FILE * fOutput, if( pTC->IsSrsDefault() ) { // nur einen Wert schreiben - RscInstNode * pNode = NULL; + RscInstNode * pNode = nullptr; if( pClassData->pNode ) { std::vector< sal_uInt32 >::const_iterator it; @@ -392,7 +392,7 @@ ERRTYPE RscArray::WriteRc( const RSCINST & rInst, RscWriteRc & rMem, { ERRTYPE aError; RscArrayInst * pClassData; - RscInstNode * pNode = NULL; + RscInstNode * pNode = nullptr; pClassData = reinterpret_cast<RscArrayInst *>(rInst.pData + nOffInstData); diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx index a16755202bcb..41647629008b 100644 --- a/rsc/source/res/rscclass.cxx +++ b/rsc/source/res/rscclass.cxx @@ -32,7 +32,7 @@ RscClass::RscClass( Atom nId, sal_uInt32 nTypeId, RscTop * pSuperCl ) : RscTop( nId, nTypeId, pSuperCl ) { nEntries = 0; - pVarTypeList = NULL; + pVarTypeList = nullptr; nSuperSize = RscTop::Size(); nSize = nSuperSize + ALIGNED_SIZE( sizeof( RscClassInst ) ); } @@ -51,7 +51,7 @@ void RscClass::Pre_dtor() RSCINST( pVarTypeList[ i ].pClass, pVarTypeList[ i ].pDefault ) ); rtl_freeMemory( pVarTypeList[ i ].pDefault ); - pVarTypeList[ i ].pDefault = NULL; + pVarTypeList[ i ].pDefault = nullptr; } } } @@ -166,7 +166,7 @@ RSCINST RscClass::Create( RSCINST * pInst, for( i = 0; i < nEntries; i++ ) { - aDfltI = GetInstData( bOwnClass ? rDflt.pData : NULL, i, true ); + aDfltI = GetInstData( bOwnClass ? rDflt.pData : nullptr, i, true ); if( (VAR_POINTER & pVarTypeList[ i ].nVarType) && !(VAR_NODATAINST & pVarTypeList[ i ].nVarType) ) @@ -181,10 +181,10 @@ RSCINST RscClass::Create( RSCINST * pInst, else ppData = reinterpret_cast<CLASS_DATA*>(aInst.pData + pVarTypeList[ i ].nOffset ); - *ppData = NULL; + *ppData = nullptr; if( aDfltI.IsInst() ) { - aMemInst = pVarTypeList[ i ].pClass->Create( NULL, aDfltI ); + aMemInst = pVarTypeList[ i ].pClass->Create( nullptr, aDfltI ); *ppData = aMemInst.pData; } } @@ -250,7 +250,7 @@ ERRTYPE RscClass::SetVariable( Atom nVarName, if( pDflt ) pVarTypeList[ nEntries ].pDefault = pDflt->pData; else - pVarTypeList[ nEntries ].pDefault = NULL; + pVarTypeList[ nEntries ].pDefault = nullptr; pVarTypeList[ nEntries ].nVarType = ~VAR_POINTER & nVarType; if( pClass->Size() > 10 || (nVarType & VAR_EXTENDABLE) ) @@ -338,16 +338,16 @@ RSCINST RscClass::GetVariable( const RSCINST & rInst, RSCINST * pInst = reinterpret_cast<RSCINST *> (rInst.pData + pVarTypeList[ i ].nOffset ); if( pCreateClass && pCreateClass->InHierarchy( aTmpI.pClass ) ) - *pInst = pCreateClass->Create( NULL, aDefInst ); + *pInst = pCreateClass->Create( nullptr, aDefInst ); else - *pInst = aTmpI.pClass->Create( NULL, aDefInst ); + *pInst = aTmpI.pClass->Create( nullptr, aDefInst ); aTmpI = *pInst; } else { CLASS_DATA * ppData = reinterpret_cast<CLASS_DATA *>(rInst.pData + pVarTypeList[ i ].nOffset); - aTmpI = aTmpI.pClass->Create( NULL, aDefInst ); + aTmpI = aTmpI.pClass->Create( nullptr, aDefInst ); *ppData = aTmpI.pData; } } diff --git a/rsc/source/res/rscclobj.cxx b/rsc/source/res/rscclobj.cxx index 8788ecba1659..940163644632 100644 --- a/rsc/source/res/rscclobj.cxx +++ b/rsc/source/res/rscclobj.cxx @@ -24,7 +24,7 @@ RefNode::RefNode( Atom nTyp ) { - pObjBiTree = 0; + pObjBiTree = nullptr; nTypNameId = nTyp; } @@ -54,7 +54,7 @@ ObjNode * RefNode::GetObjNode( const RscId & rRscId ) { if( pObjBiTree ) return pObjBiTree->Search( rRscId ); - return NULL; + return nullptr; } ObjNode::ObjNode( const RscId & rId, CLASS_DATA pData, sal_uLong lKey ) diff --git a/rsc/source/res/rscconst.cxx b/rsc/source/res/rscconst.cxx index ed47f9ae2e5a..6e6c54c052cf 100644 --- a/rsc/source/res/rscconst.cxx +++ b/rsc/source/res/rscconst.cxx @@ -29,7 +29,7 @@ RscConst::RscConst( Atom nId, sal_uInt32 nTypeId ) : RscTop( nId, nTypeId ) { - pVarArray = NULL; + pVarArray = nullptr; nEntries = 0; } diff --git a/rsc/source/res/rsccont.cxx b/rsc/source/res/rsccont.cxx index 2adc1fcf5769..d2fe2889e386 100644 --- a/rsc/source/res/rsccont.cxx +++ b/rsc/source/res/rsccont.cxx @@ -40,8 +40,8 @@ RscBaseCont::RscBaseCont( Atom nId, sal_uInt32 nTypeId, RscTop * pSuper, : RscTop( nId, nTypeId, pSuper ) , nSize( 0 ) { - pTypeClass = NULL; - pTypeClass1 = NULL; + pTypeClass = nullptr; + pTypeClass1 = nullptr; bNoId = bNoIdent; nOffInstData = RscTop::Size(); nSize = nOffInstData + ALIGNED_SIZE( sizeof( RscBaseContInst ) ); @@ -65,7 +65,7 @@ void RscBaseCont::DestroyElements( RscBaseContInst * pClassData ) pClassData->pEntries[ i ].Destroy(); } rtl_freeMemory( pClassData->pEntries ); - pClassData->pEntries = NULL; + pClassData->pEntries = nullptr; pClassData->nEntries = 0; } } @@ -91,7 +91,7 @@ RSCINST RscBaseCont::Create( RSCINST * pInst, const RSCINST & rDflt, pClassData = reinterpret_cast<RscBaseContInst *>(aInst.pData + nOffInstData); pClassData->nEntries = 0; - pClassData->pEntries = NULL; + pClassData->pEntries = nullptr; pClassData->bDflt = true; if( bOwnClass ) @@ -114,7 +114,7 @@ RSCINST RscBaseCont::Create( RSCINST * pInst, const RSCINST & rDflt, pDfltClassData->pEntries[ i ].aName; aDfltI = pDfltClassData->pEntries[ i ].aInst; pClassData->pEntries[ i ].aInst = - aDfltI.pClass->Create( NULL, aDfltI ); + aDfltI.pClass->Create( nullptr, aDfltI ); } } } @@ -230,12 +230,12 @@ ERRTYPE RscBaseCont::GetElement( const RSCINST & rInst, const RscId & rEleName, { // initialize instance with CreateInst data pClassData->pEntries[ pClassData->nEntries ].aInst = - pCreateClass->Create( NULL, rCreateInst ); + pCreateClass->Create( nullptr, rCreateInst ); } else { pClassData->pEntries[ pClassData->nEntries ].aInst = - pCreateClass->Create( NULL, RSCINST() ); + pCreateClass->Create( nullptr, RSCINST() ); } pClassData->nEntries++; diff --git a/rsc/source/res/rscflag.cxx b/rsc/source/res/rscflag.cxx index d0f1573e1b3a..1c4b04ba1974 100644 --- a/rsc/source/res/rscflag.cxx +++ b/rsc/source/res/rscflag.cxx @@ -339,7 +339,7 @@ RSCINST RscClient::Create( RSCINST * pInst, const RSCINST & rDflt, aTmpI = pRefClass->CreateClient( &aTmpI, aDfltI, bOwnClass, nConstId ); else - aTmpI = pRefClass->CreateClient( NULL, aDfltI, + aTmpI = pRefClass->CreateClient( nullptr, aDfltI, bOwnClass, nConstId ); aTmpI.pClass = this; diff --git a/rsc/source/res/rscmgr.cxx b/rsc/source/res/rscmgr.cxx index cb4ca66719f2..3c4fdbe1a75e 100644 --- a/rsc/source/res/rscmgr.cxx +++ b/rsc/source/res/rscmgr.cxx @@ -162,7 +162,7 @@ ERRTYPE RscMgr::WriteRcHeader( const RSCINST & rInst, RscWriteRc & rMem, { RscMgrInst * pClassData; ERRTYPE aError; - ObjNode * pObjNode = NULL; + ObjNode * pObjNode = nullptr; pClassData = reinterpret_cast<RscMgrInst *>(rInst.pData + RscClass::Size()); @@ -200,7 +200,7 @@ ERRTYPE RscMgr::WriteRcHeader( const RSCINST & rInst, RscWriteRc & rMem, } else { - RSCINST aRefInst = rInst.pClass->Create( NULL, aRefI ); + RSCINST aRefInst = rInst.pClass->Create( nullptr, aRefI ); aError = aRefI.pClass->WriteRcHeader( aRefInst, rMem, pTC, rId, nDeep, bExtra ); pTmpRefClass->Destroy( aRefInst ); @@ -302,7 +302,7 @@ ERRTYPE RscMgr::IsToDeep( const RSCINST & rInst, sal_uInt32 nDeep ) nDeep++; } else //aTmpI.IsInst() becomes false, end loop - aTmpI.pData = NULL; + aTmpI.pData = nullptr; } if( nDeep >= nRefDeep ) diff --git a/rsc/source/res/rscstr.cxx b/rsc/source/res/rscstr.cxx index f656e72b0ed8..5bd886e44460 100644 --- a/rsc/source/res/rscstr.cxx +++ b/rsc/source/res/rscstr.cxx @@ -32,7 +32,7 @@ RscString::RscString( Atom nId, sal_uInt32 nTypeId ) : RscTop( nId, nTypeId ) { nSize = ALIGNED_SIZE( sizeof( RscStringInst ) ); - pRefClass = NULL; + pRefClass = nullptr; } RSCCLASS_TYPE RscString::GetClassType() const @@ -53,7 +53,7 @@ ERRTYPE RscString::SetString( const RSCINST & rInst, const char * pStr ) if( pTmp ) { rtl_freeMemory( pTmp ); - pTmp = NULL; + pTmp = nullptr; } if( pStr ) @@ -112,7 +112,7 @@ RSCINST RscString::Create( RSCINST * pInst, const RSCINST & rDflt, bOwnClass = rDflt.pClass->InHierarchy( this ); reinterpret_cast<RscStringInst *>(aInst.pData)->aRefId.Create(); - reinterpret_cast<RscStringInst *>(aInst.pData)->pStr = NULL; + reinterpret_cast<RscStringInst *>(aInst.pData)->pStr = nullptr; reinterpret_cast<RscStringInst *>(aInst.pData)->bDflt = true; if( bOwnClass ) @@ -230,7 +230,7 @@ ERRTYPE RscString::WriteRc( const RSCINST & rInst, RscWriteRc & rMem, RscTypCont * pTC, sal_uInt32 nDeep, bool bExtra ) { ERRTYPE aError; - ObjNode * pObjNode = NULL; + ObjNode * pObjNode = nullptr; if( reinterpret_cast<RscStringInst *>(rInst.pData)->aRefId.IsId() ) diff --git a/rsc/source/res/rsctop.cxx b/rsc/source/res/rsctop.cxx index 1688e3951078..02ee9413632e 100644 --- a/rsc/source/res/rsctop.cxx +++ b/rsc/source/res/rsctop.cxx @@ -44,7 +44,7 @@ void RscTop::SetCallPar(const OString& rPar1, const OString& rPar2, RSCINST RscTop::GetDefault() { if( !aDfltInst.IsInst() ) - aDfltInst = this->Create( NULL, RSCINST() ); + aDfltInst = this->Create( nullptr, RSCINST() ); return aDfltInst; } @@ -63,7 +63,7 @@ RscTop * RscTop::GetTypeClass() const if( pSuperClass ) return pSuperClass->GetTypeClass(); else - return NULL; + return nullptr; } sal_uInt32 RscTop::Size() diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index c4409c4fb0f2..77ec2b85aa7d 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -56,14 +56,14 @@ using comphelper::string::getTokenCount; -OString* pStdParType = NULL; -OString* pStdPar1 = NULL; -OString* pStdPar2 = NULL; -OString* pWinParType = NULL; -OString* pWinPar1 = NULL; -OString* pWinPar2 = NULL; +OString* pStdParType = nullptr; +OString* pStdPar1 = nullptr; +OString* pStdPar2 = nullptr; +OString* pWinParType = nullptr; +OString* pWinPar1 = nullptr; +OString* pWinPar2 = nullptr; sal_uInt32 nRefDeep = 10; -AtomContainer* pHS = NULL; +AtomContainer* pHS = nullptr; void RscCmdLine::Init() @@ -296,8 +296,8 @@ OString RscCmdLine::substitutePaths( const OString& rIn ) RscCompiler::RscCompiler( RscCmdLine * pLine, RscTypCont * pTypCont ) { - fListing = NULL; - fExitFile = NULL; + fListing = nullptr; + fExitFile = nullptr; //Set Command Line, set Type Container pCL = pLine; @@ -306,7 +306,7 @@ RscCompiler::RscCompiler( RscCmdLine * pLine, RscTypCont * pTypCont ) RscCompiler::~RscCompiler() { - pTC->pEH->SetListFile( NULL ); + pTC->pEH->SetListFile( nullptr ); if( fListing ) fclose( fListing ); @@ -331,7 +331,7 @@ ERRTYPE RscCompiler::Start() if( pCL->nCommands & NOPREPRO_FLAG ) { - pTC->pEH->SetListFile( NULL ); + pTC->pEH->SetListFile( nullptr ); sal_uIntPtr aIndex = pTC->aFileTab.FirstIndex(); while( aIndex != UNIQUEINDEX_ENTRY_NOTFOUND && aError.IsOk() ) @@ -371,7 +371,7 @@ ERRTYPE RscCompiler::Start() EndCompile(); if( aError.IsError() ) - pTC->pEH->Error( ERR_ERROR, NULL, RscId() ); + pTC->pEH->Error( ERR_ERROR, nullptr, RscId() ); return aError; } @@ -390,7 +390,7 @@ void RscCompiler::EndCompile() { FILE * foutput; - if( NULL == (foutput = fopen( pCL->aOutputSrs.getStr(), "w" )) ) + if( nullptr == (foutput = fopen( pCL->aOutputSrs.getStr(), "w" )) ) pTC->pEH->FatalError( ERR_OPENFILE, RscId(), pCL->aOutputSrs.getStr() ); else { @@ -427,7 +427,7 @@ ERRTYPE RscCompiler::IncludeParser( sal_uLong lFileKey ) if( !finput ) { aError = ERR_OPENFILE; - pTC->pEH->Error( aError, NULL, RscId(), + pTC->pEH->Error( aError, nullptr, RscId(), pFName->aPathName.getStr() ); } else @@ -459,7 +459,7 @@ ERRTYPE RscCompiler::ParseOneFile( sal_uLong lFileKey, const RscCmdLine::OutputFile* pOutputFile, const WriteRcContext* pContext ) { - FILE * finput = NULL; + FILE * finput = nullptr; ERRTYPE aError; RscFile * pFName; @@ -485,7 +485,7 @@ ERRTYPE RscCompiler::ParseOneFile( sal_uLong lFileKey, OUString aTmpPath; OUString aSrsPath = OStringToOUString( pFName->aPathName, RTL_TEXTENCODING_ASCII_US ); - osl::FileBase::createTempFile( 0, 0, &aTmpPath ); + osl::FileBase::createTempFile( nullptr, nullptr, &aTmpPath ); osl::FileBase::getFileURLFromSystemPath( aSrsPath, aSrsPath ); if( pContext && pOutputFile ) @@ -499,7 +499,7 @@ ERRTYPE RscCompiler::ParseOneFile( sal_uLong lFileKey, if( !finput ) { - pTC->pEH->Error( ERR_OPENFILE, NULL, RscId(), pFName->aPathName.getStr() ); + pTC->pEH->Error( ERR_OPENFILE, nullptr, RscId(), pFName->aPathName.getStr() ); aError = ERR_OPENFILE; } else @@ -552,7 +552,7 @@ namespace { // get a temp file name for the rc file OUString sTempUrl; - if(FileBase::createTempFile(&sTempDirUrl, NULL, &sTempUrl) != FileBase::E_None) + if(FileBase::createTempFile(&sTempDirUrl, nullptr, &sTempUrl) != FileBase::E_None) throw RscIoError(); OSL_TRACE("temporary url: %s", OUStringToOString(sTempUrl, RTL_TEXTENCODING_UTF8).getStr()); return lcl_getSystemPath(sTempUrl); @@ -627,7 +627,7 @@ ERRTYPE RscCompiler::Link() sMsg += "ilst file: " + aSysList + "\n"; pTC->pEH->FatalError(ERR_OPENFILE, RscId(), sMsg.getStr()); } - if ( NULL == (fExitFile = foutput = fopen( aRcTmp.getStr(), "wb" )) ) + if ( nullptr == (fExitFile = foutput = fopen( aRcTmp.getStr(), "wb" )) ) pTC->pEH->FatalError( ERR_OPENFILE, RscId(), aRcTmp.getStr() ); // write file @@ -688,7 +688,7 @@ ERRTYPE RscCompiler::Link() aError = pTC->WriteRc( aContext ); fclose( foutput ); - fExitFile = NULL; + fExitFile = nullptr; unlink( it->aOutputRc.getStr() ); if( rename( aRcTmp.getStr(), it->aOutputRc.getStr() ) ) { @@ -732,7 +732,7 @@ ERRTYPE RscCompiler::Link() pFName = pTC->aFileTab.Get( aIndex ); if( !pFName->IsIncFile() ) { - aError = ParseOneFile( aIndex, NULL, NULL ); + aError = ParseOneFile( aIndex, nullptr, nullptr ); aIndex = pTC->aFileTab.GetIndexOf( pFName ); } }; @@ -834,7 +834,7 @@ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile, SvFileStream aIStm( rSrsInPath, StreamMode::READ ); SvFileStream aOStm( rSrsOutPath, StreamMode::WRITE | StreamMode::TRUNC ); ::std::vector< OString > aMissingImages; - FILE* pSysListFile = rContext.aOutputSysList.isEmpty() ? NULL : fopen( rContext.aOutputSysList.getStr(), "ab" ); + FILE* pSysListFile = rContext.aOutputSysList.isEmpty() ? nullptr : fopen( rContext.aOutputSysList.getStr(), "ab" ); if( !aIStm.GetError() && !aOStm.GetError() ) { diff --git a/rsc/source/rscpp/cpp1.c b/rsc/source/rscpp/cpp1.c index 02fcb4eb7664..f277b6b05695 100644 --- a/rsc/source/rscpp/cpp1.c +++ b/rsc/source/rscpp/cpp1.c @@ -233,7 +233,7 @@ void InitCpp1() int MAIN(int argc, char** argv) { int i; - char** useargv = 0; + char** useargv = NULL; char** pfargv = NULL; if( nRunde == 0 ) diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c index 60762d8a188d..9bc16eaeb19c 100644 --- a/rsc/source/rscpp/cpp3.c +++ b/rsc/source/rscpp/cpp3.c @@ -348,7 +348,7 @@ int readoptions(char* filename, char*** pfargv) { pfa[fargc + 1] = strdup(optbuff); fargc++; - pfa[fargc + 1] = 0; + pfa[fargc + 1] = NULL; poptbuff = &optbuff[0]; } } diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c index daa91735f6cc..5d1cf7dc75a3 100644 --- a/rsc/source/rscpp/cpp4.c +++ b/rsc/source/rscpp/cpp4.c @@ -84,7 +84,7 @@ void dodefine() int c; DEFBUF* dp; /* -> new definition */ int isredefine; /* TRUE if redefined */ - char* old = 0; /* Remember redefined */ + char* old = NULL; /* Remember redefined */ if (type[(c = skipws())] != LET) goto bad_define; diff --git a/rsc/source/tools/rscchar.cxx b/rsc/source/tools/rscchar.cxx index e216c13c09e5..b458822b61db 100644 --- a/rsc/source/tools/rscchar.cxx +++ b/rsc/source/tools/rscchar.cxx @@ -95,7 +95,7 @@ char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding ) { // value is too big, or more than 3 digits delete [] pOrgStr; - return NULL; + return nullptr; } c = (char)nChar; pStr--; @@ -136,7 +136,7 @@ char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding ) sal_uInt32 nInfo; sal_Size nSrcCvtBytes; - sal_Size nUniSize = rtl_convertTextToUnicode( hConv, 0, + sal_Size nUniSize = rtl_convertTextToUnicode( hConv, nullptr, pOrgStr, nOrgLen, pUniCode, nMaxUniCodeBuf, RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_DEFAULT @@ -147,12 +147,12 @@ char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding ) &nSrcCvtBytes ); rtl_destroyTextToUnicodeConverter( hConv ); - delete[] pOrgStr, pOrgStr = 0; + delete[] pOrgStr, pOrgStr = nullptr; hConv = rtl_createUnicodeToTextConverter( RTL_TEXTENCODING_UTF8 ); // factor of 6 is the maximum size of an UNICODE character as utf8 char * pUtf8 = static_cast<char *>(rtl_allocateMemory( nUniSize * 6 )); - rtl_convertUnicodeToText( hConv, 0, + rtl_convertUnicodeToText( hConv, nullptr, pUniCode, nUniSize, pUtf8, nUniSize * 6, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_DEFAULT @@ -162,7 +162,7 @@ char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding ) &nSrcCvtBytes ); rtl_destroyTextToUnicodeConverter( hConv ); - delete[] pUniCode, pUniCode = 0; + delete[] pUniCode, pUniCode = nullptr; return pUtf8; }; diff --git a/rsc/source/tools/rscdef.cxx b/rsc/source/tools/rscdef.cxx index fc6a41ac47b3..816fbd8a22d1 100644 --- a/rsc/source/tools/rscdef.cxx +++ b/rsc/source/tools/rscdef.cxx @@ -123,7 +123,7 @@ RscDefine::RscDefine( sal_uLong lKey, const OString& rDefName, sal_Int32 lDefId nRefCount = 0; lFileKey = lKey; lId = lDefId; - pExp = NULL; + pExp = nullptr; } RscDefine::RscDefine( sal_uLong lKey, const OString& rDefName, @@ -156,7 +156,7 @@ void RscDefine::DecRef() void RscDefine::DefineToNumber() { delete pExp; - pExp = NULL; + pExp = nullptr; SetName(OString::number(lId)); } @@ -451,7 +451,7 @@ RscDefine * RscDefTree::Search( const char * pName ) { if( pDefRoot ) return pDefRoot->Search( pName ); - return NULL; + return nullptr; } void RscDefTree::Insert( RscDefine * pDef ) @@ -600,7 +600,7 @@ RscDefine * RscFileTab::NewDef( sal_uLong lFileKey, const OString& rDefName, } } else - pDef = NULL; + pDef = nullptr; return pDef; } @@ -625,7 +625,7 @@ RscDefine * RscFileTab::NewDef( sal_uLong lFileKey, const OString& rDefName, } } else - pDef = NULL; + pDef = nullptr; if( !pDef ) { diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx index 175ec0f8d357..09307c1bfcea 100644 --- a/rsc/source/tools/rsctools.cxx +++ b/rsc/source/tools/rsctools.cxx @@ -83,7 +83,7 @@ char* rsc_strdup( const char* pStr ) OString GetTmpFileName() { OUString aTmpURL, aTmpFile; - osl_createTempFile( NULL, NULL, &aTmpURL.pData ); + osl_createTempFile( nullptr, nullptr, &aTmpURL.pData ); osl_getSystemPathFromFileURL( aTmpURL.pData, &aTmpFile.pData ); return OUStringToOString( aTmpFile, RTL_TEXTENCODING_MS_1252 ); } @@ -114,7 +114,7 @@ char * ResponseFile( RscPtrPtr * ppCmd, char ** ppArgv, sal_uInt32 nArgc ) for( i = 1; i < nArgc; i++ ) { if( '@' == **(ppArgv +i) ){ // when @, then response file - if( NULL == (fFile = fopen( (*(ppArgv +i)) +1, "r" )) ) + if( nullptr == (fFile = fopen( (*(ppArgv +i)) +1, "r" )) ) return( (*(ppArgv +i)) ); nItems = fread( &szBuffer[ 0 ], 1, sizeof( char ), fFile ); while( nItems ) @@ -149,14 +149,14 @@ char * ResponseFile( RscPtrPtr * ppCmd, char ** ppArgv, sal_uInt32 nArgc ) ppCmd->Append( rsc_strdup( *(ppArgv +i) ) ); } ppCmd->Append( static_cast<void *>(nullptr) ); - return NULL; + return nullptr; } RscPtrPtr::RscPtrPtr() { nCount = 0; - pMem = NULL; + pMem = nullptr; } RscPtrPtr::~RscPtrPtr() @@ -178,7 +178,7 @@ void RscPtrPtr::Reset() rtl_freeMemory( static_cast<void *>(pMem) ); }; nCount = 0; - pMem = NULL; + pMem = nullptr; } sal_uInt32 RscPtrPtr::Append( void * pBuffer ) @@ -197,7 +197,7 @@ void * RscPtrPtr::GetEntry( sal_uInt32 nEntry ) { if( nEntry < nCount ) return pMem[ nEntry ]; - return NULL; + return nullptr; } RscWriteRc::RscWriteRc( RSCBYTEORDER_TYPE nOrder ) @@ -215,7 +215,7 @@ RscWriteRc::RscWriteRc( RSCBYTEORDER_TYPE nOrder ) } nByteOrder = nOrder; nLen = 0; - pMem = NULL; + pMem = nullptr; } RscWriteRc::~RscWriteRc() diff --git a/rsc/source/tools/rsctree.cxx b/rsc/source/tools/rsctree.cxx index 494575429dcd..61ebb067a37c 100644 --- a/rsc/source/tools/rsctree.cxx +++ b/rsc/source/tools/rsctree.cxx @@ -28,7 +28,7 @@ NameNode::NameNode() { - pLeft = pRight = NULL; + pLeft = pRight = nullptr; } NameNode::~NameNode() @@ -71,7 +71,7 @@ NameNode * NameNode::ChangeDLListBTree( NameNode * pList ) { pList = nullptr; } - if( NULL != (pTmp = pMiddle->Left()) ) // set right pointer to NULL + if( nullptr != (pTmp = pMiddle->Left()) ) // set right pointer to NULL pTmp->pRight = nullptr; // set left pointer to NULL @@ -147,7 +147,7 @@ NameNode * NameNode::Remove( NameNode * pRemove ) pRoot = Left(); } } - pRemove->pLeft = pRemove->pRight = NULL; + pRemove->pLeft = pRemove->pRight = nullptr; return pRoot; } @@ -221,7 +221,7 @@ NameNode* NameNode::Search( const NameNode * pSearch ) const else return const_cast<NameNode *>(this); - return NULL; + return nullptr; } // search for a node. @@ -244,7 +244,7 @@ NameNode* NameNode::Search( const void * pSearch ) const else return const_cast<NameNode *>(this); - return NULL; + return nullptr; } // A node is inserted into the tree @@ -304,8 +304,8 @@ void NameNode::OrderTree() NameNode * pTmpLeft = static_cast<NameNode *>(Left()); NameNode * pTmpRight = static_cast<NameNode *>(Right()); - pLeft = NULL; - pRight = NULL; + pLeft = nullptr; + pRight = nullptr; SubOrderTree( pTmpLeft ); SubOrderTree( pTmpRight ); } @@ -316,8 +316,8 @@ void NameNode::SubOrderTree( NameNode * pOrderNode ) { NameNode * pTmpLeft = static_cast<NameNode *>(pOrderNode->Left()); NameNode * pTmpRight = static_cast<NameNode *>(pOrderNode->Right()); - pOrderNode->pLeft = NULL; - pOrderNode->pRight = NULL; + pOrderNode->pLeft = nullptr; + pOrderNode->pRight = nullptr; Insert( pOrderNode ); SubOrderTree( pTmpLeft ); SubOrderTree( pTmpRight ); |