summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-28 10:25:22 +0200
committerNoel Grandin <noel@peralex.com>2014-05-29 09:01:40 +0200
commitf0ae48b684e89acd7088c31a8feff5fc03d51105 (patch)
treec2560690a0d7ba016ff832cd1561da5d4532c6d9
parent7e4c6e1ff1961ad7a48cc9c1d9b3668372c6aed8 (diff)
remove unnecessary NULL parameter passed to UNO Exception
.. now that we have a default value for that parameter Change-Id: I54d6b0a0a01ce2f2e5168ada0c427424de0477bc
-rw-r--r--canvas/source/cairo/cairo_canvas.cxx2
-rw-r--r--canvas/source/directx/dx_9rm.cxx10
-rw-r--r--canvas/source/directx/dx_canvas.cxx6
-rw-r--r--canvas/source/directx/dx_spritecanvas.cxx2
-rw-r--r--canvas/source/directx/dx_spritedevicehelper.cxx2
-rw-r--r--canvas/source/opengl/ogl_spritedevicehelper.cxx4
-rw-r--r--comphelper/source/property/propertycontainerhelper.cxx2
-rw-r--r--comphelper/source/property/propertysetinfo.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx2
-rw-r--r--dbaccess/source/ext/macromigration/migrationengine.cxx2
-rw-r--r--dbaccess/source/ui/app/subcomponentmanager.cxx2
-rw-r--r--extensions/source/config/ldap/ldapaccess.cxx7
-rw-r--r--extensions/source/logging/loggerconfig.cxx2
-rw-r--r--extensions/source/logging/loghandler.cxx4
-rw-r--r--sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx2
-rw-r--r--sd/source/ui/sidebar/PanelFactory.cxx8
-rw-r--r--sdext/source/presenter/PresenterAccessibility.cxx2
-rw-r--r--sfx2/source/sidebar/Theme.cxx4
-rw-r--r--shell/source/backends/gconfbe/gconfaccess.cxx4
-rw-r--r--shell/source/sessioninstall/SyncDbusSessionHelper.cxx4
-rw-r--r--svx/source/form/fmcontrollayout.cxx2
-rw-r--r--toolkit/source/controls/unocontrolcontainer.cxx4
-rw-r--r--unotools/source/config/eventcfg.cxx2
23 files changed, 39 insertions, 42 deletions
diff --git a/canvas/source/cairo/cairo_canvas.cxx b/canvas/source/cairo/cairo_canvas.cxx
index 1acc283b5aca..74da4c94efca 100644
--- a/canvas/source/cairo/cairo_canvas.cxx
+++ b/canvas/source/cairo/cairo_canvas.cxx
@@ -90,7 +90,7 @@ namespace cairocanvas
const SystemGraphicsData* pSysData=reinterpret_cast<const SystemGraphicsData*>(aSeq.getConstArray());
if( !pSysData || !pSysData->nSize )
- throw lang::NoSupportException( "Passed SystemGraphicsData invalid!", NULL);
+ throw lang::NoSupportException( "Passed SystemGraphicsData invalid!" );
bool bHasXRender = IsCairoWorking(pOutDev);
ENSURE_ARG_OR_THROW( bHasXRender == true, "SpriteCanvas::SpriteCanvas: No RENDER extension" );
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index aab66832f757..e34233849fcc 100644
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -588,7 +588,7 @@ namespace dxcanvas
if(!(create(rWindow)))
{
- throw lang::NoSupportException( "Could not create DirectX device!" ,NULL);
+ throw lang::NoSupportException( "Could not create DirectX device!" );
}
// allocate a single texture surface which can be used later.
@@ -607,7 +607,7 @@ namespace dxcanvas
(aPageSize.getY() < MIN_TEXTURE_SIZE))
{
throw lang::NoSupportException(
- "Could not create DirectX device - insufficient texture space!", NULL );
+ "Could not create DirectX device - insufficient texture space!" );
}
}
maPageSize=aPageSize;
@@ -622,7 +622,7 @@ namespace dxcanvas
NULL)) )
{
throw lang::NoSupportException(
- "Could not create DirectX device - out of memory!", NULL );
+ "Could not create DirectX device - out of memory!" );
}
mpVertexBuffer=COMReference<IDirect3DVertexBuffer9>(pVB);
@@ -903,7 +903,7 @@ namespace dxcanvas
NULL)) )
{
throw lang::NoSupportException(
- "Could not create offscreen surface - out of mem!", NULL );
+ "Could not create offscreen surface - out of mem!" );
}
return COMReference<IDirect3DSurface9>(pSurface);
@@ -957,7 +957,7 @@ namespace dxcanvas
NULL)) )
{
throw lang::NoSupportException(
- "Could not create DirectX device - out of memory!", NULL );
+ "Could not create DirectX device - out of memory!" );
}
mpVertexBuffer=COMReference<IDirect3DVertexBuffer9>(pVB);
diff --git a/canvas/source/directx/dx_canvas.cxx b/canvas/source/directx/dx_canvas.cxx
index 2c471eefe593..0cfb5420d0cb 100644
--- a/canvas/source/directx/dx_canvas.cxx
+++ b/canvas/source/directx/dx_canvas.cxx
@@ -96,7 +96,7 @@ namespace dxcanvas
const SystemGraphicsData* pSysData=reinterpret_cast<const SystemGraphicsData*>(aSeq.getConstArray());
if( !pSysData || !pSysData->hDC )
- throw lang::NoSupportException("Passed SystemGraphicsData or HDC invalid!", NULL);
+ throw lang::NoSupportException("Passed SystemGraphicsData or HDC invalid!");
sal_Int64 nPtr = 0;
maArguments[0] >>= nPtr;
@@ -157,7 +157,7 @@ namespace dxcanvas
const SystemGraphicsData* pSysData=reinterpret_cast<const SystemGraphicsData*>(aSeq.getConstArray());
if( !pSysData || !pSysData->hDC )
- throw lang::NoSupportException( "Passed SystemGraphicsData or HDC invalid!", NULL);
+ throw lang::NoSupportException( "Passed SystemGraphicsData or HDC invalid!");
sal_Int64 nPtr = 0;
maArguments[0] >>= nPtr;
@@ -175,7 +175,7 @@ namespace dxcanvas
hBmp=(HBITMAP)GetCurrentObject(pSysData->hDC, OBJ_BITMAP);
if( !hBmp || GetObjectType(pSysData->hDC) != OBJ_MEMDC )
{
- throw lang::NoSupportException( "Passed HDC is no mem DC/has no bitmap selected!", NULL);
+ throw lang::NoSupportException( "Passed HDC is no mem DC/has no bitmap selected!");
}
mpTarget.reset( new DXBitmap(
diff --git a/canvas/source/directx/dx_spritecanvas.cxx b/canvas/source/directx/dx_spritecanvas.cxx
index d4d9072f9cf9..3d36b2033962 100644
--- a/canvas/source/directx/dx_spritecanvas.cxx
+++ b/canvas/source/directx/dx_spritecanvas.cxx
@@ -90,7 +90,7 @@ namespace dxcanvas
maArguments[4] >>= xParentWindow;
Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow);
if( !pParentWindow )
- throw lang::NoSupportException( "Parent window not VCL window, or canvas out-of-process!", NULL);
+ throw lang::NoSupportException( "Parent window not VCL window, or canvas out-of-process!" );
awt::Rectangle aRect;
maArguments[2] >>= aRect;
diff --git a/canvas/source/directx/dx_spritedevicehelper.cxx b/canvas/source/directx/dx_spritedevicehelper.cxx
index cd407b6aece6..76cf78efceb0 100644
--- a/canvas/source/directx/dx_spritedevicehelper.cxx
+++ b/canvas/source/directx/dx_spritedevicehelper.cxx
@@ -68,7 +68,7 @@ namespace dxcanvas
const SystemEnvData *pData = rWindow.GetSystemData();
const HWND hWnd = reinterpret_cast<HWND>(pData->hWnd);
if( !IsWindow( hWnd ) )
- throw lang::NoSupportException( "Passed window has invalid system window, or canvas out-of-process!", NULL);
+ throw lang::NoSupportException( "Passed window has invalid system window, or canvas out-of-process!" );
mpSpriteCanvas = &rSpriteCanvas;
diff --git a/canvas/source/opengl/ogl_spritedevicehelper.cxx b/canvas/source/opengl/ogl_spritedevicehelper.cxx
index 52491c678737..d0dd6bb04931 100644
--- a/canvas/source/opengl/ogl_spritedevicehelper.cxx
+++ b/canvas/source/opengl/ogl_spritedevicehelper.cxx
@@ -608,7 +608,7 @@ namespace oglcanvas
{
glXDestroyContext(pDisplay, pContext1);
glXDestroyContext(pDisplay, pContext2);
- throw lang::NoSupportException("Could not select OpenGL context!", NULL);
+ throw lang::NoSupportException("Could not select OpenGL context!");
}
const GLubyte* extensions=glGetString( GL_EXTENSIONS );
@@ -694,7 +694,7 @@ namespace oglcanvas
if( !mpGLContext || glGetError() != GL_NO_ERROR )
throw lang::NoSupportException(
- "Could not create OpenGL context, or an error occurred doing so!", NULL);
+ "Could not create OpenGL context, or an error occurred doing so!");
notifySizeUpdate(rViewArea);
mpChildWindow->Show();
diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx
index 0fd8e9ee288f..fca26062e0ad 100644
--- a/comphelper/source/property/propertycontainerhelper.cxx
+++ b/comphelper/source/property/propertycontainerhelper.cxx
@@ -464,7 +464,7 @@ const Property& OPropertyContainerHelper::getProperty( const OUString& _rName )
PropertyDescriptionNameMatch( _rName )
);
if ( pos == m_aProperties.end() )
- throw UnknownPropertyException( _rName, NULL );
+ throw UnknownPropertyException( _rName );
return pos->aProperty;
}
diff --git a/comphelper/source/property/propertysetinfo.cxx b/comphelper/source/property/propertysetinfo.cxx
index 4945a4a258fc..bda50a89be52 100644
--- a/comphelper/source/property/propertysetinfo.cxx
+++ b/comphelper/source/property/propertysetinfo.cxx
@@ -131,7 +131,7 @@ Property PropertyMapImpl::getPropertyByName( const OUString& aName ) throw( Unkn
PropertyMap::iterator aIter = maPropertyMap.find( aName );
if( maPropertyMap.end() == aIter )
- throw UnknownPropertyException( aName, NULL );
+ throw UnknownPropertyException( aName );
PropertyMapEntry const * pEntry = (*aIter).second;
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index edd1e79c868d..ad6b71a7b48b 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -2298,7 +2298,7 @@ namespace
}
catch(const Exception&)
{
- throw ElementExistException(newName,NULL);
+ throw ElementExistException(newName);
}
}
}
diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx
index 499ea4bcfd93..5dea02bb9f7b 100644
--- a/dbaccess/source/ext/macromigration/migrationengine.cxx
+++ b/dbaccess/source/ext/macromigration/migrationengine.cxx
@@ -1276,7 +1276,7 @@ namespace dbmm
SharedStorage xScriptsRoot( aDocStorage.getScriptsRoot( _eScriptType ) );
if ( !xScriptsRoot.is() )
- throw RuntimeException("internal error", NULL );
+ throw RuntimeException("internal error");
// loop through the script libraries
Sequence< OUString > aStorageElements( xScriptsRoot->getElementNames() );
diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx
index 17f21dfe2b20..e4c05397585b 100644
--- a/dbaccess/source/ui/app/subcomponentmanager.cxx
+++ b/dbaccess/source/ui/app/subcomponentmanager.cxx
@@ -113,7 +113,7 @@ namespace dbaui
Reference< XComponentSupplier > xCompSupp( i_rComponent, UNO_QUERY_THROW );
Reference< XComponent > xComponent( xCompSupp->getComponent(), UNO_QUERY_THROW );
if ( !impl_constructFrom( xComponent ) )
- throw RuntimeException("Illegal component type.", NULL );
+ throw RuntimeException("Illegal component type." );
xComponentCommandProcessor.set( i_rComponent, UNO_QUERY_THROW );
xDocumentDefinitionProperties.set( i_rComponent, UNO_QUERY_THROW );
}
diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx
index 405c721b5174..2acd02731973 100644
--- a/extensions/source/config/ldap/ldapaccess.cxx
+++ b/extensions/source/config/ldap/ldapaccess.cxx
@@ -153,7 +153,7 @@ void LdapConnection::initConnection()
OUStringBuffer message ;
message.appendAscii("Cannot initialise connection to LDAP: No server specified.") ;
- throw ldap::LdapConnectionException(message.makeStringAndClear(), NULL) ;
+ throw ldap::LdapConnectionException(message.makeStringAndClear()) ;
}
if (mLdapDefinition.mPort == 0) mLdapDefinition.mPort = LDAP_PORT;
@@ -173,8 +173,7 @@ void LdapConnection::initConnection()
message.append(mLdapDefinition.mServer) ;
message.appendAscii(":") ;
message.append(mLdapDefinition.mPort) ;
- throw ldap::LdapConnectionException(message.makeStringAndClear(),
- NULL) ;
+ throw ldap::LdapConnectionException(message.makeStringAndClear());
}
}
@@ -246,7 +245,7 @@ void LdapConnection::initConnection()
if (aUser.isEmpty())
{
throw lang::IllegalArgumentException(
- OUString("LdapConnection::findUserDn -User id is empty"),
+ "LdapConnection::findUserDn -User id is empty",
NULL, 0) ;
}
diff --git a/extensions/source/logging/loggerconfig.cxx b/extensions/source/logging/loggerconfig.cxx
index 2c9b462c2464..b951945fee18 100644
--- a/extensions/source/logging/loggerconfig.cxx
+++ b/extensions/source/logging/loggerconfig.cxx
@@ -227,7 +227,7 @@ namespace logging
}
if ( !bSuccess )
- throw ServiceNotRegisteredException( sServiceName, NULL );
+ throw ServiceNotRegisteredException( sServiceName );
}
return xInstance;
diff --git a/extensions/source/logging/loghandler.cxx b/extensions/source/logging/loghandler.cxx
index 2547f87468ee..c0b6958964e0 100644
--- a/extensions/source/logging/loghandler.cxx
+++ b/extensions/source/logging/loghandler.cxx
@@ -81,10 +81,10 @@ namespace logging
m_rMutex.acquire();
if ( !getIsInitialized() )
- throw DisposedException("component not initialized", NULL );
+ throw DisposedException("component not initialized" );
if ( m_rBHelper.bDisposed )
- throw DisposedException("component already disposed", NULL );
+ throw DisposedException("component already disposed" );
// fallback settings, in case they weren't passed at construction time
if ( !getFormatter().is() )
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index 1bede88c285c..0dba41cc3d5b 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -277,7 +277,7 @@ Reference<XAccessible> SAL_CALL
if (nIndex == 0)
return mxAccessibleOLEObject;
- throw lang::IndexOutOfBoundsException ( "no child with index " + OUString::number(nIndex), NULL);
+ throw lang::IndexOutOfBoundsException ( "no child with index " + OUString::number(nIndex) );
}
diff --git a/sd/source/ui/sidebar/PanelFactory.cxx b/sd/source/ui/sidebar/PanelFactory.cxx
index 847ec576ec2f..ec1f3d4929a4 100644
--- a/sd/source/ui/sidebar/PanelFactory.cxx
+++ b/sd/source/ui/sidebar/PanelFactory.cxx
@@ -137,12 +137,10 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement (
::Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow);
if ( ! xParentWindow.is() || pParentWindow==NULL)
throw RuntimeException(
- OUString("PanelFactory::createUIElement called without ParentWindow"),
- NULL);
+ "PanelFactory::createUIElement called without ParentWindow");
if ( ! xFrame.is())
throw RuntimeException(
- OUString("PanelFactory::createUIElement called without XFrame"),
- NULL);
+ "PanelFactory::createUIElement called without XFrame");
// Tunnel through the controller to obtain a ViewShellBase.
ViewShellBase* pBase = NULL;
@@ -155,7 +153,7 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement (
pBase = pController->GetViewShellBase();
}
if (pBase == NULL)
- throw RuntimeException("can not get ViewShellBase for frame", NULL);
+ throw RuntimeException("can not get ViewShellBase for frame");
// Get bindings from given arguments.
const sal_uInt64 nBindingsValue (aArguments.getOrDefault("SfxBindings", sal_uInt64(0)));
diff --git a/sdext/source/presenter/PresenterAccessibility.cxx b/sdext/source/presenter/PresenterAccessibility.cxx
index 2dd8de5db854..9ee589ec9ea2 100644
--- a/sdext/source/presenter/PresenterAccessibility.cxx
+++ b/sdext/source/presenter/PresenterAccessibility.cxx
@@ -1380,7 +1380,7 @@ sal_uInt32 AccessibleStateSet::GetStateMask (const sal_Int16 nState)
{
if (nState<0 || nState>=sal_Int16(sizeof(sal_uInt32)*8))
{
- throw RuntimeException("AccessibleStateSet::GetStateMask: invalid state", NULL);
+ throw RuntimeException("AccessibleStateSet::GetStateMask: invalid state");
}
return 1<<nState;
diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx
index 701a09474082..94a2fe9fbbba 100644
--- a/sfx2/source/sidebar/Theme.cxx
+++ b/sfx2/source/sidebar/Theme.cxx
@@ -483,11 +483,11 @@ void SAL_CALL Theme::setPropertyValue (
{
PropertyNameToIdMap::const_iterator iId (maPropertyNameToIdMap.find(rsPropertyName));
if (iId == maPropertyNameToIdMap.end())
- throw beans::UnknownPropertyException(rsPropertyName, NULL);
+ throw beans::UnknownPropertyException(rsPropertyName);
const PropertyType eType (GetPropertyType(iId->second));
if (eType == PT_Invalid)
- throw beans::UnknownPropertyException(rsPropertyName, NULL);
+ throw beans::UnknownPropertyException(rsPropertyName);
const ThemeItem eItem (iId->second);
diff --git a/shell/source/backends/gconfbe/gconfaccess.cxx b/shell/source/backends/gconfbe/gconfaccess.cxx
index da2096062280..5add3bb6765b 100644
--- a/shell/source/backends/gconfbe/gconfaccess.cxx
+++ b/shell/source/backends/gconfbe/gconfaccess.cxx
@@ -65,13 +65,13 @@ GConfClient* getGconfClient()
g_error_free(aError);
aError = NULL;
- throw uno::RuntimeException(msg, NULL);
+ throw uno::RuntimeException(msg);
}
mClient = gconf_client_get_default();
if (!mClient)
{
- throw uno::RuntimeException("GconfBackend:GconfLayer: Cannot Initialize Gconf connection",NULL);
+ throw uno::RuntimeException("GconfBackend:GconfLayer: Cannot Initialize Gconf connection");
}
static const char * const PreloadValuesList[] =
diff --git a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx
index b62606097af2..c02274dbfb11 100644
--- a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx
+++ b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx
@@ -34,7 +34,7 @@ namespace
return;
OUString sMsg = OUString::createFromAscii(m_pError->message);
g_error_free(m_pError);
- throw RuntimeException(sMsg, NULL);
+ throw RuntimeException(sMsg);
}
GError** getRef() { return &m_pError; }
};
@@ -51,7 +51,7 @@ namespace
NULL,
error.getRef());
if(!proxy)
- throw RuntimeException("couldnt get a proxy!",NULL);
+ throw RuntimeException("couldnt get a proxy!");
return proxy;
}
}
diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx
index 2d61c9c91a44..95e9c94a454d 100644
--- a/svx/source/form/fmcontrollayout.cxx
+++ b/svx/source/form/fmcontrollayout.cxx
@@ -203,7 +203,7 @@ namespace svxform
// the names of the family, and the style - depends on the document type we live in
OUString sFamilyName, sStyleName;
if ( !lcl_getDocumentDefaultStyleAndFamily( xSuppStyleFamilies.get(), sFamilyName, sStyleName ) )
- throw RuntimeException("unknown document type!", NULL );
+ throw RuntimeException("unknown document type!");
// the concrete style
Reference< XNameAccess > xStyleFamily( xStyleFamilies->getByName( sFamilyName ), UNO_QUERY_THROW );
diff --git a/toolkit/source/controls/unocontrolcontainer.cxx b/toolkit/source/controls/unocontrolcontainer.cxx
index c9ada6b734a1..d8ff558bc3dc 100644
--- a/toolkit/source/controls/unocontrolcontainer.cxx
+++ b/toolkit/source/controls/unocontrolcontainer.cxx
@@ -285,7 +285,7 @@ UnoControlHolderList::ControlIdentifier UnoControlHolderList::impl_getFreeIdenti
if ( existent == maControls.end() )
return candidateId;
}
- throw uno::RuntimeException("out of identifiers", NULL );
+ throw uno::RuntimeException("out of identifiers" );
}
@@ -304,7 +304,7 @@ OUString UnoControlHolderList::impl_getFreeName_throw()
if ( loop == maControls.end() )
return candidateName;
}
- throw uno::RuntimeException("out of identifiers", NULL );
+ throw uno::RuntimeException("out of identifiers" );
}
// Function to set the controls' visibility according
diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx
index 141fe8dd393f..2e0c081ece5d 100644
--- a/unotools/source/config/eventcfg.cxx
+++ b/unotools/source/config/eventcfg.cxx
@@ -264,7 +264,7 @@ Any SAL_CALL GlobalEventConfig_Impl::getByName( const OUString& aName ) throw (c
SupportedEventsVector::const_iterator pos = ::std::find(
m_supportedEvents.begin(), m_supportedEvents.end(), aName );
if ( pos == m_supportedEvents.end() )
- throw container::NoSuchElementException( aName, NULL );
+ throw container::NoSuchElementException( aName );
props[1].Value <<= OUString();
}