summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-07-21 15:39:17 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-07-22 07:02:34 +0000
commit90e8ad7ab779740c7381d26ffe7d08acc3a9ff96 (patch)
tree05f271eff42a09203d07326ec7752ff5bfe40f08 /scripting
parentb975aceec3c5f101916b525c10c44408b3e9da9d (diff)
loplugin:unusedmethods scripting,sc
Change-Id: I0016aefce1aad3a89bd23dcec6fbab58a7c844d7 Reviewed-on: https://gerrit.libreoffice.org/17263 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'scripting')
-rw-r--r--scripting/source/inc/util/MiscUtils.hxx24
-rw-r--r--scripting/source/inc/util/scriptingconstants.hxx71
-rw-r--r--scripting/source/provider/ActiveMSPList.cxx1
-rw-r--r--scripting/source/provider/MasterScriptProvider.cxx1
-rw-r--r--scripting/source/provider/MasterScriptProvider.hxx2
-rw-r--r--scripting/source/provider/ProviderCache.cxx2
6 files changed, 7 insertions, 94 deletions
diff --git a/scripting/source/inc/util/MiscUtils.hxx b/scripting/source/inc/util/MiscUtils.hxx
index 80d8d6860cd0..74ea6cead460 100644
--- a/scripting/source/inc/util/MiscUtils.hxx
+++ b/scripting/source/inc/util/MiscUtils.hxx
@@ -44,7 +44,8 @@ namespace sf_misc
class MiscUtils
{
public:
- static css::uno::Sequence< OUString > allOpenTDocUrls( const css::uno::Reference< css::uno::XComponentContext >& xCtx)
+
+static css::uno::Sequence< OUString > allOpenTDocUrls( const css::uno::Reference< css::uno::XComponentContext >& xCtx)
{
css::uno::Sequence< OUString > result;
try
@@ -62,8 +63,8 @@ public:
return result;
}
- static OUString xModelToTdocUrl( const css::uno::Reference< css::frame::XModel >& xModel,
- const css::uno::Reference< css::uno::XComponentContext >& xContext )
+static OUString xModelToTdocUrl( const css::uno::Reference< css::frame::XModel >& xModel,
+ const css::uno::Reference< css::uno::XComponentContext >& xContext )
{
css::uno::Reference< css::lang::XMultiComponentFactory > xMCF(
xContext->getServiceManager() );
@@ -102,7 +103,8 @@ public:
OSL_FAIL( "Unable to obtain URL for document model!" );
return OUString();
}
- static css::uno::Reference< css::frame::XModel > tDocUrlToModel( const OUString& url )
+
+static css::uno::Reference< css::frame::XModel > tDocUrlToModel( const OUString& url )
{
css::uno::Any result;
@@ -128,7 +130,7 @@ public:
}
- static css::uno::Any getUCBProperty( ::ucbhelper::Content& content, OUString& prop )
+static css::uno::Any getUCBProperty( ::ucbhelper::Content& content, OUString& prop )
{
css::uno::Any result;
try
@@ -141,18 +143,6 @@ public:
return result;
}
-private:
-static OUString parseLocationName( const OUString& location )
-{
- // strip out the last leaf of location name
- // e.g. file://dir1/dir2/Blah.sxw - > Blah.sxw
- OUString temp = location;
- INetURLObject aURLObj( temp );
- if ( !aURLObj.HasError() )
- temp = aURLObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
- return temp;
-}
-
};
} // namespace sf_misc
#endif
diff --git a/scripting/source/inc/util/scriptingconstants.hxx b/scripting/source/inc/util/scriptingconstants.hxx
deleted file mode 100644
index ea0e4371d916..000000000000
--- a/scripting/source/inc/util/scriptingconstants.hxx
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_SCRIPTING_SOURCE_INC_UTIL_SCRIPTINGCONSTANTS_HXX
-#define INCLUDED_SCRIPTING_SOURCE_INC_UTIL_SCRIPTINGCONSTANTS_HXX
-
-namespace scripting_constants
-{
-
-class ScriptingConstantsPool
-{
-public:
- const OUString DOC_REF;
- const OUString DOC_STORAGE_ID;
- const OUString DOC_URI;
- const OUString RESOLVED_STORAGE_ID;
- const OUString SCRIPT_INFO;
- const OUString SCRIPTSTORAGEMANAGER_SERVICE;
- const sal_Int32 SHARED_STORAGE_ID;
- const sal_Int32 USER_STORAGE_ID;
- const sal_Int32 DOC_STORAGE_ID_NOT_SET;
-
- static ScriptingConstantsPool& instance()
- {
- static ScriptingConstantsPool *pPool = 0;
- if( ! pPool )
- {
- ::osl::MutexGuard guard( ::osl::Mutex::getGlobalMutex() );
- if( ! pPool )
- {
- static ScriptingConstantsPool pool;
- pPool = &pool;
- }
- }
- return *pPool;
- }
-private:
- ScriptingConstantsPool( const ScriptingConstantsPool & ) SAL_DELETED_FUNCTION;
- ScriptingConstantsPool& operator = ( const ScriptingConstantsPool & ) SAL_DELETED_FUNCTION;
- ScriptingConstantsPool()
- : DOC_REF( "SCRIPTING_DOC_REF" ),
- DOC_STORAGE_ID( "SCRIPTING_DOC_STORAGE_ID" ),
- DOC_URI( "SCRIPTING_DOC_URI" ),
- RESOLVED_STORAGE_ID( "SCRIPTING_RESOLVED_STORAGE_ID" ),
- SCRIPT_INFO( "SCRIPT_INFO" ),
- SCRIPTSTORAGEMANAGER_SERVICE(
- "/singletons/com.sun.star.script.framework.storage.theScriptStorageManager" ),
- SHARED_STORAGE_ID( 0 ), USER_STORAGE_ID( 1 ),
- DOC_STORAGE_ID_NOT_SET( -1 )
- {}
-};
-
-}
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/scripting/source/provider/ActiveMSPList.cxx b/scripting/source/provider/ActiveMSPList.cxx
index 2df8ed325cdc..e3d3e71d6882 100644
--- a/scripting/source/provider/ActiveMSPList.cxx
+++ b/scripting/source/provider/ActiveMSPList.cxx
@@ -21,7 +21,6 @@
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/exc_hlp.hxx>
-#include <util/scriptingconstants.hxx>
#include <util/MiscUtils.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx
index 5c8422e41a7b..d7321bbb8528 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -40,7 +40,6 @@
#include <com/sun/star/script/provider/theMasterScriptProviderFactory.hpp>
#include <com/sun/star/script/provider/ScriptFrameworkErrorType.hpp>
-#include <util/scriptingconstants.hxx>
#include <util/MiscUtils.hxx>
#include "ActiveMSPList.hxx"
diff --git a/scripting/source/provider/MasterScriptProvider.hxx b/scripting/source/provider/MasterScriptProvider.hxx
index 74523bbae442..47fa67939213 100644
--- a/scripting/source/provider/MasterScriptProvider.hxx
+++ b/scripting/source/provider/MasterScriptProvider.hxx
@@ -115,8 +115,6 @@ private:
static OUString parseLocationName( const OUString& location );
void createPkgProvider();
bool isValid() { return m_bIsValid;}
- OUString getURLForModel();
- const css::uno::Sequence< OUString >& getProviderNames();
ProviderCache* providerCache();
/* to obtain other services if needed */
diff --git a/scripting/source/provider/ProviderCache.cxx b/scripting/source/provider/ProviderCache.cxx
index d02550e3ea87..6a133e15de6b 100644
--- a/scripting/source/provider/ProviderCache.cxx
+++ b/scripting/source/provider/ProviderCache.cxx
@@ -21,8 +21,6 @@
#include <cppuhelper/factory.hxx>
#include <tools/diagnose_ex.h>
-#include <util/scriptingconstants.hxx>
-
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
#include "ProviderCache.hxx"