[Libreoffice-commits] .: 2 commits - dbaccess/source reportdesign/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Jul 18 04:25:39 PDT 2011


 dbaccess/source/ui/control/FieldDescControl.cxx |   13 -------
 reportdesign/source/filter/xml/xmlfilter.cxx    |   40 +++++++++++-------------
 2 files changed, 19 insertions(+), 34 deletions(-)

New commits:
commit 8bcda4b58a531824a839d03db51c706347ca044b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Jul 17 22:57:17 2011 +0100

    ditch ByteString

diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index f489fd3..f63b812 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -182,37 +182,35 @@ sal_Int32 ReadThroughComponent(
     {
         xParser->parseStream( aParserInput );
     }
-    catch( SAXParseException& 
-
-#if OSL_DEBUG_LEVEL > 1
-r 
-#endif
-)
+    catch (const SAXParseException& r)
     {
 #if OSL_DEBUG_LEVEL > 1
-        ByteString aError( "SAX parse exception catched while importing:\n" );
-        aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US );
-        aError += ByteString::CreateFromInt32( r.LineNumber );
-        aError += ',';
-        aError += ByteString::CreateFromInt32( r.ColumnNumber );
-
-        OSL_FAIL( aError.GetBuffer() );
+        rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM(
+            "SAX parse exception caught while importing:\n"));
+        aError.append(rtl::OUStringToOString(r.Message,
+            RTL_TEXTENCODING_ASCII_US));
+        aError.append(r.LineNumber);
+        aError.append(',');
+        aError.append(r.ColumnNumber);
+        OSL_FAIL(aError.getStr());
+#else
+        (void)r;
 #endif
         return 1;
     }
-    catch( SAXException& )
+    catch (const SAXException&)
     {
         return 1;
     }
-    catch( packages::zip::ZipIOException& )
+    catch (const packages::zip::ZipIOException&)
     {
         return ERRCODE_IO_BROKENPACKAGE;
     }
-    catch( IOException& )
+    catch (const IOException&)
     {
         return 1;
     }
-    catch( Exception& )
+    catch (const Exception&)
     {
         return 1;
     }
@@ -266,11 +264,11 @@ sal_Int32 ReadThroughComponent(
             uno::Reference< beans::XPropertySet > xProps( xDocStream, uno::UNO_QUERY_THROW );
             xProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Encrypted") ) ) >>= bEncrypted;
         }
-        catch( packages::WrongPasswordException& )
+        catch (const packages::WrongPasswordException&)
         {
             return ERRCODE_SFX_WRONGPASSWORD;
         }
-        catch ( uno::Exception& )
+        catch (const uno::Exception&)
         {
             return 1; // TODO/LATER: error handling
         }
@@ -517,7 +515,7 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
             {
                 xStorage = pMedium->GetStorage();
             }
-            catch(const Exception&)
+            catch (const Exception&)
             {
             }
         }
@@ -594,7 +592,7 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
         {
             xProp->setPropertyValue(s_sOld,uno::makeAny(!(xStorage->hasByName(s_sMeta) || xStorage->isStreamElement( s_sMeta ))));
         }
-        catch(uno::Exception&)
+        catch (const uno::Exception&)
         {
             xProp->setPropertyValue(s_sOld,uno::makeAny(sal_True));
         }
commit 38b843f876cb321bafb6c86609b3075c95a3773a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jul 14 22:05:39 2011 +0100

    callcatcher: remove unused methods

diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index 671f909..30d22b9 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -100,20 +100,7 @@ using namespace ::com::sun::star::util;
 
 namespace
 {
-    // -----------------------------------------------------------------------------
-    double checkDoubleForDateFormat(double _nValue,sal_Int32 _nFormatKey,const Reference< ::com::sun::star::util::XNumberFormatter>& _xNumberFormatter)
-    {
-        double nValue = _nValue;
-        sal_Int32 nNumberFormat = ::comphelper::getNumberFormatType(_xNumberFormatter,_nFormatKey);
-        if(		(nNumberFormat & ::com::sun::star::util::NumberFormat::DATE)	== ::com::sun::star::util::NumberFormat::DATE
-            || (nNumberFormat & ::com::sun::star::util::NumberFormat::DATETIME) == ::com::sun::star::util::NumberFormat::DATETIME )
-        {
-            nValue = DBTypeConversion::toStandardDbDate(DBTypeConversion::getNULLDate(_xNumberFormatter->getNumberFormatsSupplier()),nValue);
-        }
 
-        return nValue;
-    }
-    // -----------------------------------------------------------------------------
     template< typename T1, typename T2> void lcl_HideAndDeleteControl(short& _nPos,T1** _pControl,T2** _pControlText)
     {
         if ( *_pControl )


More information about the Libreoffice-commits mailing list