[Libreoffice-commits] .: 5 commits - comphelper/inc comphelper/qa configure.in connectivity/source connectivity/workben Makefile pyuno/inc pyuno/source sax/inc sax/source sdext/source unusedcode.easy

Caolán McNamara caolan at kemper.freedesktop.org
Fri Feb 10 06:21:18 PST 2012


 Makefile                                            |    5 
 comphelper/inc/comphelper/string.hxx                |   60 ----
 comphelper/qa/string/test_string.cxx                |   75 -----
 configure.in                                        |   10 
 connectivity/source/drivers/postgresql/pq_tools.cxx |   14 
 connectivity/source/drivers/postgresql/pq_tools.hxx |    2 
 connectivity/workben/TT/StartTest.java              |  293 --------------------
 dev/null                                            |binary
 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 -------
 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                                     |   14 
 17 files changed, 13 insertions(+), 732 deletions(-)

New commits:
commit 99b2adf721fa424e0a02c4458774b8829cd33bf2
Author: Alexander Bergmann <myaddons at gmx.de>
Date:   Fri Feb 10 14:20:12 2012 +0000

    Removed unused code

diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx
index d54d6d3..00c5a0c 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..3b2a4b7 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/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 f2bb709..ba8767f 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*)
commit 740cf4a5903dd7aaad4e60ab71a43b062e1d50d8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Feb 10 13:02:08 2012 +0000

    bah, we don't need these after all

diff --git a/comphelper/inc/comphelper/string.hxx b/comphelper/inc/comphelper/string.hxx
index e3d11d9..2c63954 100644
--- a/comphelper/inc/comphelper/string.hxx
+++ b/comphelper/inc/comphelper/string.hxx
@@ -583,66 +583,6 @@ COMPHELPER_DLLPUBLIC bool isdigitAsciiString(const rtl::OString &rString);
  */
 COMPHELPER_DLLPUBLIC bool isdigitAsciiString(const rtl::OUString &rString);
 
-/** Determine if an OString contains solely ASCII alphanumeric chars/digits
-
-    @param rString  An OString
-
-    @return         false if string contains any characters outside
-                    the ASCII 'a'-'z', 'A'-'Z' and '0'-'9' ranges
-                    true otherwise, including for empty string
- */
-COMPHELPER_DLLPUBLIC bool isalnumAsciiString(const rtl::OString &rString);
-
-/** Determine if an OUString contains solely ASCII alphanumeric chars/digits
-
-    @param rString  An OUString
-
-    @return         false if string contains any characters outside
-                    the ASCII 'a'-'z', 'A'-'Z' and '0'-'9' ranges
-                    true otherwise, including for empty string
- */
-COMPHELPER_DLLPUBLIC bool isalnumAsciiString(const rtl::OUString &rString);
-
-/** Determine if an OString contains solely ASCII lower-case chars
-
-    @param rString  An OString
-
-    @return         false if string contains any characters outside
-                    the ASCII 'a'-'z' ranges
-                    true otherwise, including for empty string
- */
-COMPHELPER_DLLPUBLIC bool islowerAsciiString(const rtl::OString &rString);
-
-/** Determine if an OUString contains solely ASCII lower-case chars
-
-    @param rString  An OUString
-
-    @return         false if string contains any characters outside
-                    the ASCII 'a'-'z' ranges
-                    true otherwise, including for empty string
- */
-COMPHELPER_DLLPUBLIC bool islowerAsciiString(const rtl::OUString &rString);
-
-/** Determine if an OString contains solely ASCII upper-case chars
-
-    @param rString  An OString
-
-    @return         false if string contains any characters outside
-                    the ASCII 'A'-'Z' ranges
-                    true otherwise, including for empty string
- */
-COMPHELPER_DLLPUBLIC bool isupperAsciiString(const rtl::OString &rString);
-
-/** Determine if an OUString contains solely ASCII upper-case chars
-
-    @param rString  An OUString
-
-    @return         false if string contains any characters outside
-                    the ASCII 'A'-'Z' ranges
-                    true otherwise, including for empty string
- */
-COMPHELPER_DLLPUBLIC bool isupperAsciiString(const rtl::OUString &rString);
-
 COMPHELPER_DLLPUBLIC inline bool isdigitAscii(sal_Unicode c)
 {
     return ((c >= '0') && (c <= '9'));
diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx
index 82eaee0..e53ae90 100644
--- a/comphelper/qa/string/test_string.cxx
+++ b/comphelper/qa/string/test_string.cxx
@@ -55,9 +55,6 @@ public:
     void testTokenCount();
     void testDecimalStringToNumber();
     void testIsdigitAsciiString();
-    void testIsalnumAsciiString();
-    void testIsupperAsciiString();
-    void testIslowerAsciiString();
     void testIndexOfL();
     void testMatchIgnoreAsciiCaseL();
 
@@ -73,9 +70,6 @@ public:
     CPPUNIT_TEST(testTokenCount);
     CPPUNIT_TEST(testDecimalStringToNumber);
     CPPUNIT_TEST(testIsdigitAsciiString);
-    CPPUNIT_TEST(testIsalnumAsciiString);
-    CPPUNIT_TEST(testIsupperAsciiString);
-    CPPUNIT_TEST(testIslowerAsciiString);
     CPPUNIT_TEST(testIndexOfL);
     CPPUNIT_TEST(testMatchIgnoreAsciiCaseL);
     CPPUNIT_TEST_SUITE_END();
@@ -135,75 +129,6 @@ void TestString::testIsdigitAsciiString()
     CPPUNIT_ASSERT_EQUAL(comphelper::string::isdigitAsciiString(s3), true);
 }
 
-void TestString::testIsalnumAsciiString()
-{
-    rtl::OString s1(RTL_CONSTASCII_STRINGPARAM("1234"));
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::isalnumAsciiString(s1), true);
-
-    rtl::OString s2(RTL_CONSTASCII_STRINGPARAM("1A34"));
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::isalnumAsciiString(s2), true);
-
-    rtl::OString s3;
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::isalnumAsciiString(s3), true);
-
-    rtl::OString s4(RTL_CONSTASCII_STRINGPARAM("1A[4"));
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::isalnumAsciiString(s4), false);
-
-    rtl::OUString s5(RTL_CONSTASCII_USTRINGPARAM("1234"));
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::isalnumAsciiString(s5), true);
-
-    rtl::OUString s6(RTL_CONSTASCII_USTRINGPARAM("1A34"));
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::isalnumAsciiString(s6), true);
-
-    rtl::OUString s7;
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::isalnumAsciiString(s7), true);
-
-    rtl::OUString s8(RTL_CONSTASCII_USTRINGPARAM("1A[4"));
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::isalnumAsciiString(s8), false);
-}
-
-void TestString::testIsupperAsciiString()
-{
-    rtl::OString s1(RTL_CONSTASCII_STRINGPARAM("1234"));
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::isupperAsciiString(s1), false);
-
-    rtl::OString s2(RTL_CONSTASCII_STRINGPARAM("aAbB"));
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::isupperAsciiString(s2), false);
-
-    rtl::OString s3(RTL_CONSTASCII_STRINGPARAM("AABB"));
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::isupperAsciiString(s3), true);
-
-    rtl::OUString s4(RTL_CONSTASCII_USTRINGPARAM("1234"));
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::isupperAsciiString(s4), false);
-
-    rtl::OUString s5(RTL_CONSTASCII_USTRINGPARAM("aAbB"));
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::isupperAsciiString(s5), false);
-
-    rtl::OUString s6(RTL_CONSTASCII_USTRINGPARAM("AABB"));
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::isupperAsciiString(s6), true);
-}
-
-void TestString::testIslowerAsciiString()
-{
-    rtl::OString s1(RTL_CONSTASCII_STRINGPARAM("1234"));
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::islowerAsciiString(s1), false);
-
-    rtl::OString s2(RTL_CONSTASCII_STRINGPARAM("aAbB"));
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::islowerAsciiString(s2), false);
-
-    rtl::OString s3(RTL_CONSTASCII_STRINGPARAM("aabb"));
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::islowerAsciiString(s3), true);
-
-    rtl::OUString s4(RTL_CONSTASCII_USTRINGPARAM("1234"));
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::islowerAsciiString(s4), false);
-
-    rtl::OUString s5(RTL_CONSTASCII_USTRINGPARAM("aAbB"));
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::islowerAsciiString(s5), false);
-
-    rtl::OUString s6(RTL_CONSTASCII_USTRINGPARAM("aabb"));
-    CPPUNIT_ASSERT_EQUAL(comphelper::string::islowerAsciiString(s6), true);
-}
-
 void TestString::testIndexOfL()
 {
     rtl::OString s1(RTL_CONSTASCII_STRINGPARAM("one two three"));
commit f484e0b07820d5772376aa75bc0f823f1e77e2f2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Feb 10 13:00:57 2012 +0000

    best to filter out salhelper:: from unused I think

diff --git a/Makefile b/Makefile
index 3f44039..40779dd 100644
--- a/Makefile
+++ b/Makefile
@@ -431,10 +431,11 @@ findunusedcode:
 		$(SRCDIR)/solenv/callcatcher/bin/dmake
 	@$(GNUMAKE) -f $(SOLARENV)/bin/callcatcher.Makefile
 	@grep ::.*\( unusedcode.all \
-              | grep -v ^cppu:: \
+              | grep -v ^Atom \
               | grep -v ^boost:: \
               | grep -v ^CIcc \
-              | grep -v ^Atom \
+              | grep -v ^cppu:: \
+              | grep -v ^salhelper:: \
               > unusedcode.easy
 
 check: subsequentcheck
diff --git a/unusedcode.easy b/unusedcode.easy
index b316e28..f2bb709 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -1439,13 +1439,6 @@ 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)
commit 21040f22886e842847f18e9e4a2721a1845ea74d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Feb 10 12:32:40 2012 +0000

    hack around sdk installer breakage

diff --git a/configure.in b/configure.in
index 7910b2b..edc3e99 100644
--- a/configure.in
+++ b/configure.in
@@ -7711,6 +7711,16 @@ if test "$_os" = "WINNT"; then
             if test -n "$WINDOWS_SDK_HOME"; then
                 WINDOWS_SDK_HOME=`cygpath -d "$WINDOWS_SDK_HOME"`
                 WINDOWS_SDK_HOME=`cygpath -u "$WINDOWS_SDK_HOME"`
+
+                #If this sdk is incomplete, lets see if the one
+                #recommended to be installed is available
+                if test ! -x "$WINDOWS_SDK_HOME/bin/msiinfo.exe"; then
+                    WINDOWS_SDK7_HOME=`cat "/proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v7.1/InstallationFolder" 2> /dev/null | tr '\000' '\n' | head -n 1`
+                    if test -n "$WINDOWS_SDK7_HOME"; then
+                        WINDOWS_SDK_HOME=`cygpath -d "$WINDOWS_SDK7_HOME"`
+                        WINDOWS_SDK_HOME=`cygpath -u "$WINDOWS_SDK_HOME"`
+                    fi
+                fi
             fi
         else
             WINDOWS_SDK_HOME=`cygpath -u "$with_windows_sdk_home"`
commit 0b584c9442922aa0c15fd56a68c2852ff8a24f82
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Feb 10 11:50:08 2012 +0000

    drop TT workben

diff --git a/connectivity/workben/TT/StartTest.class b/connectivity/workben/TT/StartTest.class
deleted file mode 100755
index 28791c4..0000000
Binary files a/connectivity/workben/TT/StartTest.class and /dev/null differ
diff --git a/connectivity/workben/TT/StartTest.java b/connectivity/workben/TT/StartTest.java
deleted file mode 100755
index 305f1fc..0000000
--- a/connectivity/workben/TT/StartTest.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-package workben.tt;
-
-import java.lang.Object;
-import java.io.*;
-import workben.odbc.*;
-
-import com.sun.star.comp.servicemanager.ServiceManager;
-//  import java.io.IOException;
-
-//import com.sun.star.beans.PropertyValue;
-//import com.sun.star.beans.PropertyState;
-import com.sun.star.connection.XConnector;
-import com.sun.star.connection.XConnection;
-import com.sun.star.bridge.XBridge;
-
-//  import com.sun.star.comp.bootstrap.Bootstrap;
-
-//  import com.sun.star.io.XInputStream;
-//  import com.sun.star.io.XOutputStream;
-
-//  import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XServiceInfo;
-
-import com.sun.star.uno.IBridge;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import com.sun.star.uno.XNamingService;
-
-import com.sun.star.sdbc.*;
-//  import com.sun.star.sdbc.XConnection;
-//  import com.sun.star.uno.Enum;
-
-//  import com.sun.star.lib.uno.typeinfo.ParameterTypeInfo;
-//  import com.sun.star.lib.uno.typeinfo.TypeInfo;
-
-public class StartTest
-{
-  //###########################################################
-  //#                   allgemeine Variablen                  #
-  //###########################################################
-  private static java.util.Hashtable ConfigItems = new java.util.Hashtable();
-  //###########################################################
-  //#                   ResultSetToStringBuffer               #
-  //###########################################################
-  static StringBuffer ResultSetToStringBuffer(com.sun.star.sdbc.XResultSet results)
-  {
-          com.sun.star.sdbc.XRow                           Row;
-          com.sun.star.sdbc.XResultSetMetaDataSupplier     rsmds;
-          com.sun.star.sdbc.XResultSetMetaData             rsmd;
-
-          StringBuffer buf = new StringBuffer();
-
-          try
-          {
-            rsmds = (com.sun.star.sdbc.XResultSetMetaDataSupplier)UnoRuntime.queryInterface(com.sun.star.sdbc.XResultSetMetaDataSupplier.class,results);
-            rsmd = rsmds.getMetaData();
-            int numCols = rsmd.getColumnCount();
-            int i;
-
-            // get column header info
-            for (i=1; i <= numCols; i++)
-            {
-                if (i == 1) buf.append("\"");
-                if (i > 1) buf.append("\"\t\"");
-                buf.append(rsmd.getColumnLabel(i));
-            }
-            buf.append("\"\r\n");
-
-
-
-            while (results.next())
-            {
-                Row = (com.sun.star.sdbc.XRow)UnoRuntime.queryInterface(com.sun.star.sdbc.XRow.class, results);
-                for (i=1; i <= numCols; i++)
-                {
-                    if (i == 1) buf.append("\"");
-                    if (i > 1) buf.append("\"\t\"");
-                    buf.append(Row.getString(i));
-                }
-                buf.append("\"\r\n");
-            }
-            return(buf);
-          }
-          catch (Exception e)
-          {
-            System.out.println("Exception at ResultSetToStringBuffer : " + e);
-            return(buf);
-          }
-  }
-
-  //###########################################################
-  //#                   printStringBuffer                     #
-  //###########################################################
-
-  static void printStringBuffer(StringBuffer buf)
-  {
-    FileWriter f1;
-    try
-    {
-      f1 = new FileWriter("d:\\data\\sdbc\\test.log",true);
-      int maxStrings = buf.length() - 1;
-      //System.out.println(maxStrings);
-      for(int i=0 ; i<=maxStrings ; i++)
-      {
-        f1.write(buf.charAt(i));
-      }
-      f1.close();
-    }
-    catch( IOException e )
-    {
-      System.out.println("Error: can't create logfile");
-    }
-  }
-
-  //###########################################################
-  //#                   neededServices                        #
-  //###########################################################
-  static String neededServices[] = new String[] {
-        "com.sun.star.comp.servicemanager.ServiceManager",
-        "com.sun.star.comp.loader.JavaLoader",
-        "com.sun.star.comp.connections.Connector",
-          "com.sun.star.comp.connections.Acceptor"
-    };
-
-  //###########################################################
-  //#                   readConfigFile                        #
-  //###########################################################
-  static void readConfigFile(String sFileName)
-  {
-    BufferedReader confFile;
-    try
-    {
-      confFile = new BufferedReader(new FileReader(sFileName));
-      ConfigItems.put("ConnectString",confFile.readLine());
-      ConfigItems.put("user",confFile.readLine());
-      ConfigItems.put("password",confFile.readLine());
-      ConfigItems.put("ToTest",confFile.readLine());
-      ConfigItems.put("LogFile",confFile.readLine());
-      confFile.close();
-    }
-    catch(Exception e)
-    {
-      System.out.println(e);
-    }
-  }
-
-  //###########################################################
-  //#                   MAIN                                  #
-  //###########################################################
-
-  public static void main(String argv[]) throws Exception
-    {
-
-    //Die Parameter auslesen
-
-//    if(argv.length == 0)
-//    {
-//      System.out.println("missing parameter");
-//      System.exit(0);
-//    }
-
-    //readConfigFile(argv[0]);
-
-    ////////////////////////
-
-    com.sun.star.comp.servicemanager.ServiceManager smgr = new com.sun.star.comp.servicemanager.ServiceManager();
-        smgr.addFactories(neededServices);
-
-        XConnector  xConnector  = (XConnector)smgr.createInstance("com.sun.star.connection.Connector");
-    if(xConnector == null) System.err.println("no connector!");
-
-        XConnection xConn       = xConnector.connect("socket,host=localhost,port=6001");
-    if(xConn == null) System.err.println("no XConnection!");
-
-        IBridge iBridge = UnoRuntime.getBridgeByName("java", null, "remote", null, new Object[]{"iiop", xConn, null});
-
-        Object rInitialObject = iBridge.mapInterfaceFrom("classic_uno", XInterface.class);
-
-        if(rInitialObject != null)
-        {
-            System.err.println("got the remote object");
-      System.out.println("before naming service !");
-      try
-      {
-        XNamingService rName = (XNamingService)UnoRuntime.queryInterface(XNamingService.class, rInitialObject );
-        try
-        {
-          if(rName != null)
-          {
-            System.err.println("got the remote naming service !");
-            Object rXsmgr = rName.getRegisteredObject("StarOffice.ServiceManager");
-            XMultiServiceFactory rSmgr = (XMultiServiceFactory)UnoRuntime.queryInterface(XMultiServiceFactory.class, rXsmgr);
-            if(rSmgr != null)
-            {
-              System.out.println("got the remote service manager !");
-              Object rDriver = rSmgr.createInstance("com.sun.star.sdbc.ADriver");
-              if(rDriver != null)
-              {
-                System.out.println("got a com.sun.star.sdbc.Driver !");
-                com.sun.star.sdbc.XDriver  xDriver  = (XDriver)UnoRuntime.queryInterface(com.sun.star.sdbc.XDriver.class,rDriver);
-                if(xDriver != null)
-                {
-                  com.sun.star.sdbc.XConnection xConnection = null;
-                  try
-                  {
-                    com.sun.star.beans.PropertyValue [] ConInfo = new com.sun.star.beans.PropertyValue[]
-                    {
-                      new com.sun.star.beans.PropertyValue("user",0,"qsuser",com.sun.star.beans.PropertyState.DIRECT_VALUE),
-                      new com.sun.star.beans.PropertyValue("password",0,"qsuser",com.sun.star.beans.PropertyState.DIRECT_VALUE)
-                    };
-                    xConnection = xDriver.connect("sdbc:ado:PROVIDER=SQLOLEDB;DATA SOURCE=sqllab2",ConInfo);
-
-                    if(xConnection != null)
-                    {
-                      System.out.println("got a connection!");
-                      com.sun.star.sdbc.XDatabaseMetaData dmd;
-                      com.sun.star.sdbc.XStatement    stmt;
-                      com.sun.star.sdbc.XResultSet   result;
-                      com.sun.star.sdbc.XRow         row;
-                      try
-                      {
-                        stmt = xConnection.createStatement();
-                        stmt.executeUpdate("insert into testtab values(4,'vier')");
-                        result = stmt.executeQuery("select * from testtab where int = 4");
-                        com.sun.star.sdbc.XResultSetMetaDataSupplier     rsmds;
-
-                        rsmds = (com.sun.star.sdbc.XResultSetMetaDataSupplier)UnoRuntime.queryInterface(com.sun.star.sdbc.XResultSetMetaDataSupplier.class,result);
-                        com.sun.star.sdbc.XResultSetMetaData  xMD = rsmds.getMetaData();
-                        System.out.println("Anzahl Spalten = " + xMD.getColumnCount());
-                        if(result.next())
-                        {
-                            row = (com.sun.star.sdbc.XRow)UnoRuntime.queryInterface(com.sun.star.sdbc.XRow.class,result);
-                            String xx = row.getString(1);
-                        }
-                      }
-                      catch (Exception e)
-                      {
-                      System.out.println("Exception beim Aufruf der Tests");
-                      }
-                    }
-                  }
-                  catch(Exception e)
-                  {
-                    System.out.println("exception while connecting!");
-                    e.printStackTrace();
-                  }
-                  xConnection.close();
-                }
-              }
-            }
-          }
-        }
-        catch(Exception t)
-        {
-        }
-      }
-      catch(Exception e1)
-      {
-        System.err.println("exception from getRegisteredObject!");
-      }
-    }
-    System.out.println("FERTIG");
-    System.exit(0);
-  }
-  }// die Klammer der ganzen Klasse
-


More information about the Libreoffice-commits mailing list