This patch removes unused code as listed in unusedcode.easy
From 19f0c3ee363967fdd01601d640aff69c705b0303 Mon Sep 17 00:00:00 2001
From: Santiago Martinez <[email protected]>
Date: Wed, 7 Mar 2012 21:32:29 +0100
Subject: [PATCH] Remove unused code in vbahelper
---
unusedcode.easy | 3 ---
vbahelper/inc/vbahelper/vbahelper.hxx | 7 -------
vbahelper/source/vbahelper/vbahelper.cxx | 17 -----------------
3 files changed, 0 insertions(+), 27 deletions(-)
diff --git a/unusedcode.easy b/unusedcode.easy
index 255ef66..381d978 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -907,11 +907,8 @@ nullcanvas::SpriteCanvasHelper::opaqueUpdate(basegfx::B2DConnectedRanges<canvas:
nullcanvas::SpriteCanvasHelper::scrollUpdate(basegfx::B2DRange const&, basegfx::B2DRange const&, basegfx::B2DConnectedRanges<canvas::SpriteRedrawManager::SpriteInfo>::ConnectedComponents const&)
o3tltests::cow_wrapper_client2::queryUnmodified() const
o3tltests::cow_wrapper_client3::queryUnmodified() const
-ooo::vba::createVBAUnoAPIService(SfxObjectShell*, char const*)
ooo::vba::excel::getViewFrame(com::sun::star::uno::Reference<com::sun::star::frame::XModel> const&)
ooo::vba::excel::isInPrintPreview(SfxViewFrame*)
-ooo::vba::extractBoolFromAny(com::sun::star::uno::Any const&, bool)
-ooo::vba::extractIntFromAny(com::sun::star::uno::Any const&, int)
oox::AttributeConversion::decodeHyperHex(rtl::OUString const&)
oox::AttributeConversion::decodeUnsignedHex(rtl::OUString const&)
oox::ContainerHelper::insertByIndex(com::sun::star::uno::Reference<com::sun::star::container::XIndexContainer> const&, int, com::sun::star::uno::Any const&)
diff --git a/vbahelper/inc/vbahelper/vbahelper.hxx b/vbahelper/inc/vbahelper/vbahelper.hxx
index 190243c..9a3da3c 100644
--- a/vbahelper/inc/vbahelper/vbahelper.hxx
+++ b/vbahelper/inc/vbahelper/vbahelper.hxx
@@ -75,7 +75,6 @@ namespace ooo
VBAHELPER_DLLPUBLIC css::uno::Reference< XHelperInterface > getVBADocument( const css::uno::Reference< css::frame::XModel >& xModel );
VBAHELPER_DLLPUBLIC css::uno::Reference< XHelperInterface > getUnoDocModule( const String& aModName, SfxObjectShell* pShell );
VBAHELPER_DLLPUBLIC SfxObjectShell* getSfxObjShell( const css::uno::Reference< css::frame::XModel >& xModel ) throw ( css::uno::RuntimeException);
- VBAHELPER_DLLPUBLIC css::uno::Reference< css::uno::XInterface > createVBAUnoAPIService( SfxObjectShell* pShell, const sal_Char* _pAsciiName ) throw (css::uno::RuntimeException);
css::uno::Reference< css::frame::XModel > getCurrentDoc( const rtl::OUString& sKey ) throw (css::uno::RuntimeException);
VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getThisExcelDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException);
@@ -103,16 +102,10 @@ namespace ooo
/** Extracts a 32-bit integer value from the passed Any, which may contain an integer or floating-point value.
Throws, if the Any is empty or contains an incompatible type. */
VBAHELPER_DLLPUBLIC sal_Int32 extractIntFromAny( const css::uno::Any& rAny ) throw (css::uno::RuntimeException);
- /** Extracts a 32-bit integer value from the passed Any, which may contain an integer or floating-point value.
- Returns nDefault, if rAny is empty. Throws, if the Any contains an incompatible type. */
- VBAHELPER_DLLPUBLIC sal_Int32 extractIntFromAny( const css::uno::Any& rAny, sal_Int32 nDefault ) throw (css::uno::RuntimeException);
/** Extracts a boolean value from the passed Any, which may contain a Boolean or an integer or floating-point value.
Throws, if the Any is empty or contains an incompatible type. */
VBAHELPER_DLLPUBLIC bool extractBoolFromAny( const css::uno::Any& rAny ) throw (css::uno::RuntimeException);
- /** Extracts a boolean value from the passed Any, which may contain a Boolean or an integer or floating-point value.
- Returns bDefault, if rAny is empty. Throws, if the Any contains an incompatible type. */
- VBAHELPER_DLLPUBLIC bool extractBoolFromAny( const css::uno::Any& rAny, bool bDefault ) throw (css::uno::RuntimeException);
/** Extracts a string from the passed Any, which may contain a Boolean, a value, or a string.
Throws, if the Any is empty or contains an incompatible type. */
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index 70fe850..03525baf 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -97,13 +97,6 @@ namespace vba
namespace { const double factor = 2540.0 / 72.0; }
-css::uno::Reference< css::uno::XInterface > createVBAUnoAPIService( SfxObjectShell* pShell, const sal_Char* _pAsciiName ) throw (css::uno::RuntimeException)
-{
- OSL_PRECOND( pShell, "createVBAUnoAPIService: no shell!" );
- ::rtl::OUString sVarName( ::rtl::OUString::createFromAscii( _pAsciiName ) );
- return getVBAServiceFactory( pShell )->createInstance( sVarName );
-}
-
// helper method to determine if the view ( calc ) is in print-preview mode
bool isInPrintPreview( SfxViewFrame* pView )
{
@@ -501,11 +494,6 @@ sal_Int32 extractIntFromAny( const uno::Any& rAny ) throw (uno::RuntimeException
throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Invalid type, cannot convert to integer." ) ), 0 );
}
-sal_Int32 extractIntFromAny( const uno::Any& rAny, sal_Int32 nDefault ) throw (uno::RuntimeException)
-{
- return rAny.hasValue() ? extractIntFromAny( rAny ) : nDefault;
-}
-
bool extractBoolFromAny( const uno::Any& rAny ) throw (uno::RuntimeException)
{
switch( rAny.getValueType().getTypeClass() )
@@ -527,11 +515,6 @@ bool extractBoolFromAny( const uno::Any& rAny ) throw (uno::RuntimeException)
throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Invalid type, cannot convert to boolean." ) ), 0 );
}
-bool extractBoolFromAny( const uno::Any& rAny, bool bDefault ) throw (uno::RuntimeException)
-{
- return rAny.hasValue() ? extractBoolFromAny( rAny ) : bDefault;
-}
-
::rtl::OUString extractStringFromAny( const uno::Any& rAny, bool bUppercaseBool ) throw (uno::RuntimeException)
{
switch( rAny.getValueType().getTypeClass() )
--
1.7.7.6
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice