summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Bergmann <myaddons@gmx.de>2012-02-10 14:20:12 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-02-10 14:20:52 +0000
commit99b2adf721fa424e0a02c4458774b8829cd33bf2 (patch)
treeeb577fbc332ce9767c4688a3cca639e456a287ed
parentbah, we don't need these after all (diff)
downloadcore-99b2adf721fa424e0a02c4458774b8829cd33bf2.tar.gz
core-99b2adf721fa424e0a02c4458774b8829cd33bf2.zip
Removed unused code
-rw-r--r--connectivity/source/drivers/postgresql/pq_tools.cxx14
-rw-r--r--connectivity/source/drivers/postgresql/pq_tools.hxx2
-rw-r--r--pyuno/inc/pyuno/pyuno.hxx11
-rw-r--r--pyuno/source/module/pyuno_impl.hxx2
-rw-r--r--pyuno/source/module/pyuno_runtime.cxx17
-rw-r--r--pyuno/source/module/pyuno_type.cxx104
-rw-r--r--sax/inc/sax/tools/converter.hxx12
-rw-r--r--sax/source/tools/converter.cxx76
-rw-r--r--sdext/source/pdfimport/inc/pdfparse.hxx1
-rw-r--r--sdext/source/pdfimport/pdfparse/pdfparse.cxx49
-rwxr-xr-xunusedcode.easy7
11 files changed, 0 insertions, 295 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx
index d54d6d33803f..00c5a0c8cc48 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 2f6880297ebc..152d0055054a 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 e3db6acc2e97..3b2a4b785818 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 944b87985486..bf785a7b39e6 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 f38dccd227c1..459e8875ded2 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 c1897640d441..4e97e3f938e4 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/sax/inc/sax/tools/converter.hxx b/sax/inc/sax/tools/converter.hxx
index 1fed19eb3bb3..3f753babcba2 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 f71ea6253a88..eb8cc7435de0 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 1cfd82e9c4cd..8f715e97e290 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 ccd33b430d77..e5cae107695c 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 f2bb7094eca4..ba8767febb92 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -1425,8 +1425,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&)
@@ -1435,13 +1433,8 @@ 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*)
-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*)