[Libreoffice-commits] .: 2 commits - sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Jul 26 04:39:41 PDT 2011


 sw/source/filter/ww8/ww8scan.hxx       |    7 +++++--
 sw/source/ui/config/mailconfigpage.cxx |   11 ++++++++---
 2 files changed, 13 insertions(+), 5 deletions(-)

New commits:
commit 64842a9788227a5a18241ddfb5f0f679f09a007c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jul 26 12:16:07 2011 +0100

    put exception message into mailmerge error dialog

diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index 4e9d2c5..544a25c 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -337,6 +337,8 @@ void SwTestAccountSettingsDialog::Test()
 {
     uno::Reference<XMultiServiceFactory> rMgr = ::comphelper::getProcessServiceFactory();
 
+    rtl::OUString sException;
+
     bool bIsLoggedIn = false;
     bool bIsServer = false;
     if (rMgr.is())
@@ -412,9 +414,9 @@ void SwTestAccountSettingsDialog::Test()
             if( xMailService->isConnected())
                 xMailService->disconnect();
         }
-        catch(uno::Exception&)
+        catch (const uno::Exception& e)
         {
-            OSL_FAIL("exception caught");
+            sException = e.Message;
         }
     }
 
@@ -437,7 +439,10 @@ void SwTestAccountSettingsDialog::Test()
 
     if(!bIsServer || !bIsLoggedIn )
     {
-        m_eErrorsED.SetText( m_sErrorServer );
+        rtl::OUStringBuffer aErrorMessage(m_sErrorServer);
+        if (!sException.isEmpty())
+            aErrorMessage.appendAscii(RTL_CONSTASCII_STRINGPARAM("\n--\n")).append(sException);
+        m_eErrorsED.SetText(aErrorMessage.makeStringAndClear());
     }
 }
 
commit e5a1858e05cce4bb1db495d5f9a2164a954ca371
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jul 25 22:48:52 2011 +0100

    enforce checking return value

diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 1811cb3..c3b77d4 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -1783,8 +1783,11 @@ std::vector<sal_uInt8> ChpxToSprms(const Word2CHPX &rChpx);
 
 sal_uLong SafeReadString(ByteString &rStr,sal_uInt16 nLen,SvStream &rStrm);
 
-bool checkSeek(SvStream &rSt, sal_uInt32 nOffset);
-bool checkRead(SvStream &rSt, void *pDest, sal_uInt32 nLength);
+bool checkSeek(SvStream &rSt, sal_uInt32 nOffset)
+    SAL_WARN_UNUSED_RESULT;
+
+bool checkRead(SvStream &rSt, void *pDest, sal_uInt32 nLength)
+    SAL_WARN_UNUSED_RESULT;
 
 //MS has a (slightly) inaccurate view of how many twips
 //are in the default letter size of a page


More information about the Libreoffice-commits mailing list