[PATCH] unusedcode.easy: Removed unused code
Alexander Bergmann
myaddons at gmx.de
Thu Feb 9 12:18:30 PST 2012
---
.../source/drivers/postgresql/pq_tools.cxx | 14 ---
.../source/drivers/postgresql/pq_tools.hxx | 2 -
pyuno/inc/pyuno/pyuno.hxx | 11 --
pyuno/source/module/pyuno_impl.hxx | 2 -
pyuno/source/module/pyuno_runtime.cxx | 17 ---
pyuno/source/module/pyuno_type.cxx | 104 --------------------
salhelper/inc/salhelper/timer.hxx | 13 ---
salhelper/source/timer.cxx | 23 -----
sax/inc/sax/tools/converter.hxx | 12 ---
sax/source/tools/converter.cxx | 76 --------------
sdext/source/pdfimport/inc/pdfparse.hxx | 1 -
sdext/source/pdfimport/pdfparse/pdfparse.cxx | 49 ---------
unusedcode.easy | 10 --
13 files changed, 0 insertions(+), 334 deletions(-)
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx
index c27bf15..a01d4ca 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -367,20 +367,6 @@ void disposeNoThrow( const com::sun::star::uno::Reference< com::sun::star::uno::
}
-void rollbackNoThrow( const com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & r )
-{
- try
- {
- Reference< XStatement > stmt = r->createStatement();
- stmt->executeUpdate( getStatics().ROLLBACK );
-
- }
- catch( SQLException & )
- {
- // ignore this
- }
-}
-
Reference< XConnection > extractConnectionFromStatement( const Reference< XInterface > & stmt )
{
Reference< XConnection > ret;
diff --git a/connectivity/source/drivers/postgresql/pq_tools.hxx b/connectivity/source/drivers/postgresql/pq_tools.hxx
index 2f68802..152d005 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.hxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.hxx
@@ -125,8 +125,6 @@ sal_Bool extractBoolProperty(
void disposeNoThrow( const com::sun::star::uno::Reference< com::sun::star::uno::XInterface > & r );
void disposeObject( const com::sun::star::uno::Reference< com::sun::star::uno::XInterface > & r );
-void rollbackNoThrow( const com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > & r );
-
::rtl::OUString extractTableFromInsert( const rtl::OUString & sql );
::rtl::OString extractSingleTableFromSelect( const OStringVector &vec );
diff --git a/pyuno/inc/pyuno/pyuno.hxx b/pyuno/inc/pyuno/pyuno.hxx
index e3db6ac..3b2a4b78 100644
--- a/pyuno/inc/pyuno/pyuno.hxx
+++ b/pyuno/inc/pyuno/pyuno.hxx
@@ -174,21 +174,10 @@ public:
const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > & ctx )
throw ( com::sun::star::uno::RuntimeException );
-
/** Checks, whether the uno runtime is already initialized in the current python interpreter.
*/
static bool SAL_CALL isInitialized() throw (com::sun::star::uno::RuntimeException);
-
- /** disposes the UNO bridge in this interpreter. All existing stubs/proxies
- become non-functional, using these proxies/stubs leads to runtime errors.
-
- preconditions: python has been initialized before and
- the global interpreter lock is held and pyuno was
- initialized before for the currently in use interpreter.
- */
- static void SAL_CALL finalize() throw(com::sun::star::uno::RuntimeException );
-
/** converts something contained in an UNO Any to a Python object
preconditions: python has been initialized before,
diff --git a/pyuno/source/module/pyuno_impl.hxx b/pyuno/source/module/pyuno_impl.hxx
index 944b879..bf785a7 100644
--- a/pyuno/source/module/pyuno_impl.hxx
+++ b/pyuno/source/module/pyuno_impl.hxx
@@ -206,8 +206,6 @@ PyObject* PyUNO_Enum_new( const char *enumBase, const char *enumValue, const Run
PyObject* PyUNO_char_new (sal_Unicode c , const Runtime &r);
PyObject *PyUNO_ByteSequence_new( const com::sun::star::uno::Sequence< sal_Int8 > &, const Runtime &r );
-PyObject *importToGlobal( PyObject *typeName, PyObject *dict, PyObject *targetName );
-
PyRef getTypeClass( const Runtime &);
PyRef getEnumClass( const Runtime &);
PyRef getBoolClass( const Runtime &);
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index f38dccd..459e887 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -356,23 +356,6 @@ bool Runtime::isInitialized() throw ( RuntimeException )
return runtime.is() && impl->cargo->valid;
}
-void Runtime::finalize() throw (RuntimeException)
-{
- PyRef globalDict, runtime;
- getRuntimeImpl( globalDict , runtime );
- RuntimeImpl *impl = reinterpret_cast< RuntimeImpl * > (runtime.get());
- if( !runtime.is() || ! impl->cargo->valid )
- {
- throw RuntimeException( OUString( RTL_CONSTASCII_USTRINGPARAM(
- "pyuno bridge must have been initialized before finalizing" )),
- Reference< XInterface > () );
- }
- impl->cargo->valid = false;
- impl->cargo->xInvocation.clear();
- impl->cargo->xContext.clear();
- impl->cargo->xTypeConverter.clear();
-}
-
Runtime::Runtime() throw( RuntimeException )
: impl( 0 )
{
diff --git a/pyuno/source/module/pyuno_type.cxx b/pyuno/source/module/pyuno_type.cxx
index c189764..4e97e3f 100644
--- a/pyuno/source/module/pyuno_type.cxx
+++ b/pyuno/source/module/pyuno_type.cxx
@@ -259,110 +259,6 @@ Type PyType2Type( PyObject * o ) throw(RuntimeException )
return desc.get()->pWeakRef;
}
-PyObject *importToGlobal(PyObject *str, PyObject *dict, PyObject *target)
-{
- // maybe a constant ?
- PyObject *ret = 0;
- OUString name = pyString2ustring(str);
- try
- {
- Runtime runtime;
- TypeDescription desc(name );
- desc.makeComplete();
- if( desc.is() )
- {
- com::sun::star::uno::TypeClass tc =
- (com::sun::star::uno::TypeClass)desc.get()->eTypeClass;
-
- PyRef typesModule( PyDict_GetItemString( dict, "unotypes" ) );
- if( ! typesModule.is() || ! PyModule_Check( typesModule.get() ))
- {
- typesModule = PyRef( PyModule_New( "unotypes" ), SAL_NO_ACQUIRE );
- Py_INCREF( typesModule.get() );
- PyDict_SetItemString( dict, "unotypes" , typesModule.get() );
- }
- PyModule_AddObject(
- typesModule.get(),
- PyString_AsString( target ),
- PyUNO_Type_new( PyString_AsString(str),tc,runtime ) );
-
- if( com::sun::star::uno::TypeClass_EXCEPTION == tc ||
- com::sun::star::uno::TypeClass_STRUCT == tc )
- {
- PyRef exc = getClass( name, runtime );
- PyDict_SetItem( dict, target, exc.getAcquired() );
- }
- else if( com::sun::star::uno::TypeClass_ENUM == tc )
- {
- // introduce all enums into the dictionary !
- typelib_EnumTypeDescription *pDesc =
- (typelib_EnumTypeDescription *) desc.get();
- for( int i = 0 ; i < pDesc->nEnumValues; i ++ )
- {
- OString enumElementName(
- OUStringToOString( pDesc->ppEnumNames[i], RTL_TEXTENCODING_ASCII_US) );
- PyDict_SetItemString(
- dict, (char*)enumElementName.getStr(),
- PyUNO_Enum_new(PyString_AsString(str) , enumElementName.getStr(), runtime ) );
- }
- }
- Py_INCREF( Py_None );
- ret = Py_None;
- }
- else
- {
- Any a = runtime.getImpl()->cargo->xTdMgr->getByHierarchicalName(name);
- if(a.hasValue())
- {
- PyRef constant = runtime.any2PyObject( a );
- if( constant.is() )
- {
- Py_INCREF( constant.get() );
- PyDict_SetItem( dict, target , constant.get());
- ret = constant.get();
- }
- else
- {
- OStringBuffer buf;
- buf.append( "constant " ).append(PyString_AsString(str)).append( " unknown" );
- PyErr_SetString( PyExc_RuntimeError, buf.getStr() );
- }
- }
- else
- {
- OUStringBuffer buf;
- buf.appendAscii( "pyuno.imp unknown type " );
- buf.append( name );
- PyErr_SetString(
- PyExc_RuntimeError,
- OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US).getStr() );
- }
- }
- }
- catch( com::sun::star::container::NoSuchElementException & )
- {
- OUStringBuffer buf;
- buf.appendAscii( "pyuno.imp unknown type " );
- buf.append( name );
- PyErr_SetString(
- PyExc_RuntimeError,
- OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US).getStr() );
- }
- catch( const com::sun::star::script::CannotConvertException & e )
- {
- raisePyExceptionWithAny( com::sun::star::uno::makeAny( e ) );
- }
- catch( const com::sun::star::lang::IllegalArgumentException & e )
- {
- raisePyExceptionWithAny( com::sun::star::uno::makeAny( e ) );
- }
- catch( const RuntimeException &e )
- {
- raisePyExceptionWithAny( com::sun::star::uno::makeAny( e ));
- }
- return ret;
-}
-
static PyObject* callCtor( const Runtime &r , const char * clazz, const PyRef & args )
{
PyRef code( PyDict_GetItemString( r.getImpl()->cargo->getUnoModule().get(), (char*)clazz ) );
diff --git a/salhelper/inc/salhelper/timer.hxx b/salhelper/inc/salhelper/timer.hxx
index c3e8e0f..0c38b6a 100644
--- a/salhelper/inc/salhelper/timer.hxx
+++ b/salhelper/inc/salhelper/timer.hxx
@@ -170,23 +170,10 @@ public:
*/
sal_Bool SAL_CALL expiresBefore( const Timer* pTimer ) const;
- /** Set the absolute time when the timer should fire.
- */
- void SAL_CALL setAbsoluteTime( const TTimeValue& Time );
-
/** Set the time to fire to 'now' + Remaining.
*/
void SAL_CALL setRemainingTime( const TTimeValue& Remaining );
- /** Set the time to fire to 'now' + Remaining with repeat interveal
- * Repeat.
- */
- void SAL_CALL setRemainingTime( const TTimeValue& Remaining, const TTimeValue& Repeat );
-
- /** Adds Time to the 'fire time'.
- */
- void SAL_CALL addTime( const TTimeValue& Time );
-
/** Returns the remaining time before timer expiration relative to now.
*/
TTimeValue SAL_CALL getRemainingTime() const;
diff --git a/salhelper/source/timer.cxx b/salhelper/source/timer.cxx
index aff006c..0e5399a 100644
--- a/salhelper/source/timer.cxx
+++ b/salhelper/source/timer.cxx
@@ -189,15 +189,6 @@ sal_Bool Timer::expiresBefore(const Timer* pTimer) const
}
}
-void Timer::setAbsoluteTime(const TTimeValue& Time)
-{
- m_aTimeOut = 0;
- m_aExpired = Time;
- m_aRepeatDelta = 0;
-
- m_aExpired.normalize();
-}
-
void Timer::setRemainingTime(const TTimeValue& Remaining)
{
osl_getSystemTime(&m_aExpired);
@@ -205,20 +196,6 @@ void Timer::setRemainingTime(const TTimeValue& Remaining)
m_aExpired.addTime(Remaining);
}
-void Timer::setRemainingTime(const TTimeValue& Remaining, const TTimeValue& Repeat)
-{
- osl_getSystemTime(&m_aExpired);
-
- m_aExpired.addTime(Remaining);
-
- m_aRepeatDelta = Repeat;
-}
-
-void Timer::addTime(const TTimeValue& Delta)
-{
- m_aExpired.addTime(Delta);
-}
-
TTimeValue Timer::getRemainingTime() const
{
TTimeValue Now;
diff --git a/sax/inc/sax/tools/converter.hxx b/sax/inc/sax/tools/converter.hxx
index 1fed19e..3f753ba 100644
--- a/sax/inc/sax/tools/converter.hxx
+++ b/sax/inc/sax/tools/converter.hxx
@@ -122,10 +122,6 @@ public:
sal_Int32 nMin = SAL_MIN_INT32,
sal_Int32 nMax = SAL_MAX_INT32 );
- /** convert number to string */
- static void convertNumber64(::rtl::OUStringBuffer& rBuffer,
- sal_Int64 nNumber);
-
/** convert string to number with optional min and max values */
static bool convertNumber64(sal_Int64& rValue,
const ::rtl::OUString& rString,
@@ -153,9 +149,6 @@ public:
/** convert string to double number (using ::rtl::math) without unit conversion */
static bool convertDouble(double& rValue, const ::rtl::OUString& rString);
- /** convert string to double number (using ::rtl::math) with unit conversion */
- static bool convertDouble(double& rValue, const ::rtl::OUString& rString, sal_Int16 nTargetUnit );
-
/** convert double to ISO "duration" string; negative durations allowed */
static void convertDuration(::rtl::OUStringBuffer& rBuffer,
const double fTime);
@@ -218,11 +211,6 @@ public:
::rtl::OUStringBuffer& rsType ,
const ::com::sun::star::uno::Any& rValue);
- /** convert a string to Any (typesafe) */
- static bool convertAny(::com::sun::star::uno::Any& rValue,
- const ::rtl::OUString& rsType,
- const ::rtl::OUString& rsValue);
-
};
}
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index f71ea62..eb8cc74 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -543,13 +543,6 @@ bool Converter::convertNumber( sal_Int32& rValue,
return bRet;
}
-/** convert 64-bit number to string */
-void Converter::convertNumber64( OUStringBuffer& rBuffer,
- sal_Int64 nNumber )
-{
- rBuffer.append( nNumber );
-}
-
/** convert string to 64-bit number with optional min and max values */
bool Converter::convertNumber64( sal_Int64& rValue,
const OUString& rString,
@@ -627,15 +620,6 @@ void Converter::convertDouble( ::rtl::OUStringBuffer& rBuffer, double fNumber)
/** convert string to double number (using ::rtl::math) */
bool Converter::convertDouble(double& rValue,
- const ::rtl::OUString& rString, sal_Int16 nTargetUnit)
-{
- sal_Int16 nSourceUnit = GetUnitFromString(rString, nTargetUnit);
-
- return convertDouble(rValue, rString, nSourceUnit, nTargetUnit );
-}
-
-/** convert string to double number (using ::rtl::math) */
-bool Converter::convertDouble(double& rValue,
const ::rtl::OUString& rString, sal_Int16 nSourceUnit, sal_Int16 nTargetUnit)
{
rtl_math_ConversionStatus eStatus;
@@ -2211,66 +2195,6 @@ bool Converter::convertAny(::rtl::OUStringBuffer& rsValue,
return bConverted;
}
-bool Converter::convertAny(com::sun::star::uno::Any& rValue,
- const ::rtl::OUString& rsType,
- const ::rtl::OUString& rsValue)
-{
- bool bConverted = false;
-
- if (rsType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("boolean")))
- {
- bool bTempValue = false;
- ::sax::Converter::convertBool(bTempValue, rsValue);
- rValue <<= bTempValue;
- bConverted = true;
- }
- else
- if (rsType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("integer")))
- {
- sal_Int32 nTempValue = 0;
- ::sax::Converter::convertNumber(nTempValue, rsValue);
- rValue <<= nTempValue;
- bConverted = true;
- }
- else
- if (rsType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("float")))
- {
- double fTempValue = 0.0;
- ::sax::Converter::convertDouble(fTempValue, rsValue);
- rValue <<= fTempValue;
- bConverted = true;
- }
- else
- if (rsType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("string")))
- {
- rValue <<= rsValue;
- bConverted = true;
- }
- else
- if (rsType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("date")))
- {
- com::sun::star::util::DateTime aTempValue;
- ::sax::Converter::convertDateTime(aTempValue, rsValue);
- rValue <<= aTempValue;
- bConverted = true;
- }
- else
- if (rsType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("time")))
- {
- com::sun::star::util::Duration aTempValue;
- com::sun::star::util::Time aConvValue;
- ::sax::Converter::convertDuration(aTempValue, rsValue);
- aConvValue.HundredthSeconds = aTempValue.MilliSeconds / 10;
- aConvValue.Seconds = aTempValue.Seconds;
- aConvValue.Minutes = aTempValue.Minutes;
- aConvValue.Hours = aTempValue.Hours;
- rValue <<= aConvValue;
- bConverted = true;
- }
-
- return bConverted;
-}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sdext/source/pdfimport/inc/pdfparse.hxx b/sdext/source/pdfimport/inc/pdfparse.hxx
index 1cfd82e..8f715e9 100644
--- a/sdext/source/pdfimport/inc/pdfparse.hxx
+++ b/sdext/source/pdfimport/inc/pdfparse.hxx
@@ -304,7 +304,6 @@ class PDFReader
~PDFReader() {}
PDFEntry* read( const char* pFileName );
- PDFEntry* read( const char* pBuffer, unsigned int nLen );
};
} // namespace
diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
index ccd33b4..e5cae10 100644
--- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
@@ -556,55 +556,6 @@ public:
}
};
-PDFEntry* PDFReader::read( const char* pBuffer, unsigned int nLen )
-{
- PDFGrammar<const char*> aGrammar( pBuffer );
-
- try
- {
- #if OSL_DEBUG_LEVEL > 1
- boost::spirit::parse_info<const char*> aInfo =
- #endif
- boost::spirit::parse( pBuffer,
- pBuffer+nLen,
- aGrammar,
- boost::spirit::space_p );
- #if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "parseinfo: stop = %p (buff=%p, offset = %d), hit = %s, full = %s, length = %d\n",
- aInfo.stop, pBuffer, aInfo.stop - pBuffer,
- aInfo.hit ? "true" : "false",
- aInfo.full ? "true" : "false",
- (int)aInfo.length );
- #endif
- }
- catch( const parser_error<const char*, const char*>& rError )
- {
- #if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "parse error: %s at buffer pos %u\nobject stack:\n",
- rError.descriptor, rError.where - pBuffer );
- unsigned int nElem = aGrammar.m_aObjectStack.size();
- for( unsigned int i = 0; i < nElem; i++ )
- {
- fprintf( stderr, " %s\n", typeid( *(aGrammar.m_aObjectStack[i]) ).name() );
- }
- #endif
- }
-
- PDFEntry* pRet = NULL;
- unsigned int nEntries = aGrammar.m_aObjectStack.size();
- if( nEntries == 1 )
- {
- pRet = aGrammar.m_aObjectStack.back();
- aGrammar.m_aObjectStack.pop_back();
- }
- #if OSL_DEBUG_LEVEL > 1
- else if( nEntries > 1 )
- fprintf( stderr, "error got %u stack objects in parse\n", nEntries );
- #endif
-
- return pRet;
-}
-
PDFEntry* PDFReader::read( const char* pFileName )
{
#ifdef WIN32
diff --git a/unusedcode.easy b/unusedcode.easy
index d6d3b58..d1d4421 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -1428,8 +1428,6 @@ oox::xls::Xf::hasAnyUsedFlags() const
pdfi::DrawXmlEmitter::GetBreakIterator()
pdfi::PDFIProcessor::sortDocument(bool)
pdfi::PDFIRawAdaptor::odfConvert(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::io::XOutputStream> const&, com::sun::star::uno::Reference<com::sun::star::task::XStatusIndicator> const&)
-pdfparse::PDFReader::read(char const*, unsigned int)
-pq_sdbc_driver::rollbackNoThrow(com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection> const&)
psp::GetCommandLineTokenCount(rtl::OString const&)
psp::PrinterGfx::DrawBitmap(Rectangle const&, Rectangle const&, psp::PrinterBmp const&, psp::PrinterBmp const&)
psp::PrinterGfx::DrawMask(Rectangle const&, Rectangle const&, psp::PrinterBmp const&, psp::PrinterColor&)
@@ -1438,20 +1436,12 @@ psp::PrinterGfx::GetGlyphOutline(unsigned short, unsigned short**, Point**, unsi
psp::PrinterGfx::GetResolution(int&, int&) const
psp::PrinterGfx::PSRMoveTo(int, int)
psp::PrinterGfx::SetFallbackFont(int)
-pyuno::Runtime::finalize()
-pyuno::importToGlobal(_object*, _object*, _object*)
rptui::OFieldExpressionControl::LinkStubAsynchActivate(void*, void*)
rptui::OFieldExpressionControl::LinkStubAsynchDeactivate(void*, void*)
salhelper::ORealDynamicLoader::acquire()
salhelper::ORealDynamicLoader::getApi() const
salhelper::ORealDynamicLoader::newInstance(salhelper::ORealDynamicLoader**, rtl::OUString const&, rtl::OUString const&)
salhelper::ORealDynamicLoader::release()
-salhelper::Timer::addTime(salhelper::TTimeValue const&)
-salhelper::Timer::setAbsoluteTime(salhelper::TTimeValue const&)
-salhelper::Timer::setRemainingTime(salhelper::TTimeValue const&, salhelper::TTimeValue const&)
-sax::Converter::convertAny(com::sun::star::uno::Any&, rtl::OUString const&, rtl::OUString const&)
-sax::Converter::convertDouble(double&, rtl::OUString const&, short)
-sax::Converter::convertNumber64(rtl::OUStringBuffer&, long)
sd::CopyDlg::LinkStubReset(void*, void*)
sd::LeftDrawPaneShell::RegisterInterface(SfxModule*)
sd::LeftImpressPaneShell::RegisterInterface(SfxModule*)
--
1.7.9
More information about the LibreOffice
mailing list