summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-12-06 11:37:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-12-07 07:38:24 +0100
commit38187ec15b6cbaedcadcbd8f3bcb632a5c6be88f (patch)
treeac3de03a8c2944371ce43443750f6eeb8d318046 /basic
parent60714a814847f6d10f00aa6809a3896a48741e0b (diff)
loplugin:singlevalfields extend to all static vars
Change-Id: Ic238bb5291539fd1b7e98cb4afc9b25f37e7d528 Reviewed-on: https://gerrit.libreoffice.org/64710 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/sbunoobj.cxx9
-rw-r--r--basic/source/classes/sbxmod.cxx1
-rw-r--r--basic/source/inc/sbunoobj.hxx3
-rw-r--r--basic/source/runtime/methods.cxx8
4 files changed, 4 insertions, 17 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 21e57c5d206b..f3c276d88003 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -3657,15 +3657,6 @@ void SbUnoService::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
-static SbUnoServiceCtor* pFirstCtor = nullptr;
-
-void clearUnoServiceCtors()
-{
- SbUnoServiceCtor* pCtor = pFirstCtor;
- if( pCtor )
- pCtor->SbxValue::Clear();
-}
-
SbUnoServiceCtor::SbUnoServiceCtor( const OUString& aName_, Reference< XServiceConstructorDescription > const & xServiceCtorDesc )
: SbxMethod( aName_, SbxOBJECT )
, m_xServiceCtorDesc( xServiceCtorDesc )
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 8fb9d12a5ce0..db86e597b12b 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -973,7 +973,6 @@ static void ClearUnoObjectsInRTL_Impl( StarBASIC* pBasic )
{
// #67781 Delete return values of the Uno-methods
clearUnoMethods();
- clearUnoServiceCtors();
ClearUnoObjectsInRTL_Impl_Rek( pBasic );
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx
index d9c654b77d23..8cc966da66fa 100644
--- a/basic/source/inc/sbunoobj.hxx
+++ b/basic/source/inc/sbunoobj.hxx
@@ -259,12 +259,9 @@ public:
SbUnoService* findUnoService( const OUString& rName );
-void clearUnoServiceCtors();
-
class SbUnoServiceCtor : public SbxMethod
{
friend class SbUnoService;
- friend void clearUnoServiceCtors();
css::uno::Reference< css::reflection::XServiceConstructorDescription > m_xServiceCtorDesc;
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index c137909935b0..0ecced15e6b3 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2508,10 +2508,10 @@ void SbRtl_IsMissing(StarBASIC *, SbxArray & rPar, bool)
// Function looks for wildcards, removes them and always returns the pure path
static OUString implSetupWildcard(const OUString& rFileParam, SbiRTLData& rRTLData)
{
- static sal_Char cDelim1 = '/';
- static sal_Char cDelim2 = '\\';
- static sal_Char cWild1 = '*';
- static sal_Char cWild2 = '?';
+ static const sal_Char cDelim1 = '/';
+ static const sal_Char cDelim2 = '\\';
+ static const sal_Char cWild1 = '*';
+ static const sal_Char cWild2 = '?';
rRTLData.pWildCard.reset();
rRTLData.sFullNameToBeChecked.clear();