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

Caolán McNamara caolan at kemper.freedesktop.org
Thu Jun 23 01:09:28 PDT 2011


 sfx2/source/doc/docfile.cxx |    5 ++---
 sfx2/source/doc/objmisc.cxx |    5 ++---
 sfx2/source/view/viewsh.cxx |   33 ++++++++++++++++++---------------
 3 files changed, 22 insertions(+), 21 deletions(-)

New commits:
commit d855f8aa22ec2cd46fa2b772398acfc4e68ac894
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jun 23 00:04:29 2011 +0100

    remove parse ByteString variant

diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 3439a00..d5f3733 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -3483,11 +3483,10 @@ void SfxMedium::CreateTempFileNoCopy()
                 ::rtl::OUString aField;
                 aAny >>= aField;
 
-                ::rtl::OString sContent = ::rtl::OUStringToOString( aField, RTL_TEXTENCODING_ASCII_US );
-                ByteString sType, sSubType;
+                String sType, sSubType;
                 INetContentTypeParameterList aParameters;
 
-                if( INetContentTypes::parse( sContent, sType, sSubType, &aParameters ) )
+                if (INetContentTypes::parse(aField, sType, sSubType, &aParameters))
                 {
                     const INetContentTypeParameter * pCharset = aParameters.find("charset");
                     if (pCharset != 0)
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index c49b980..98ded9f 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1781,11 +1781,10 @@ void SfxHeaderAttributes_Impl::SetAttribute( const SvKeyValue& rKV )
     }
     else if( rKV.GetKey().CompareIgnoreCaseToAscii( "content-type" ) == COMPARE_EQUAL )
     {
-        ::rtl::OString sContent = ::rtl::OUStringToOString( aValue, RTL_TEXTENCODING_ASCII_US );
-        ByteString sType, sSubType;
+        String sType, sSubType;
         INetContentTypeParameterList aParameters;
 
-        if( INetContentTypes::parse( sContent, sType, sSubType, &aParameters ) )
+        if (INetContentTypes::parse(aValue, sType, sSubType, &aParameters))
         {
             const INetContentTypeParameter * pCharset = aParameters.find("charset");
             if (pCharset != 0)
commit 6272740a36e34642eb94cbf7e9fe14b4ff329c9e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jun 22 15:00:28 2011 +0100

    catch by const reference

diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 0ff6bf8..dcd484b 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -290,7 +290,7 @@ static ::rtl::OUString RetrieveLabelFromCommand(
             aLabel = aStr;
         }
     }
-    catch ( css::uno::Exception& )
+    catch (const css::uno::Exception&)
     {
     }
 
@@ -425,10 +425,13 @@ enum ETypeFamily
 
         return sType;
     }
-    catch(const css::uno::RuntimeException& exRun)
-        { throw exRun; }
-    catch(const css::uno::Exception&)
-        {}
+    catch (const css::uno::RuntimeException& exRun)
+    {
+        throw;
+    }
+    catch (const css::uno::Exception&)
+    {
+    }
 
     return ::rtl::OUString();
 }
@@ -528,7 +531,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
                         }
                     }
                 }
-                catch ( Exception& )
+                catch (const Exception&)
                 {
                 }
             }
@@ -635,11 +638,11 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
             {
                  aModule = xModuleManager->identify( xFrame );
             }
-            catch ( css::uno::RuntimeException& )
+            catch (const css::uno::RuntimeException&)
             {
                 throw;
             }
-            catch ( css::uno::Exception& )
+            catch (const css::uno::Exception&)
             {
             }
 
@@ -723,7 +726,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
                 {
                     xStorable->storeToURL( aFileURL, aArgs );
                 }
-                catch ( com::sun::star::io::IOException& )
+                catch (const com::sun::star::io::IOException&)
                 {
                     rReq.Done(sal_False);
                     return;
@@ -741,7 +744,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
                                 xSystemShellExecute->execute(
                                                     aFileURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
                     }
-                    catch ( uno::Exception& )
+                    catch (const uno::Exception&)
                     {
                         SolarMutexGuard aGuard;
                         Window *pParent = SFX_APP()->GetTopWindow();
@@ -1883,7 +1886,7 @@ void SfxViewShell::CheckIPClient_Impl( SfxInPlaceClient *pIPClient, const Rectan
             {
                 pIPClient->GetObject()->changeState( embed::EmbedStates::INPLACE_ACTIVE );
             }
-            catch ( uno::Exception& )
+            catch (const uno::Exception&)
             {
             }
         }
@@ -2147,7 +2150,7 @@ sal_Bool SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUStr
                     continue;
             }
         }
-        catch( uno::RuntimeException& )
+        catch (const uno::RuntimeException&)
         {
             aIt.remove();
         }
@@ -2196,7 +2199,7 @@ void SfxViewShell::CheckOwnerShip_Impl()
                 xModel->close( sal_True );
                 bSuccess = sal_True;
             }
-            catch ( util::CloseVetoException& )
+            catch (const util::CloseVetoException&)
             {
             }
         }
@@ -2213,7 +2216,7 @@ void SfxViewShell::CheckOwnerShip_Impl()
             {
                 xFrame->close( sal_True );
             }
-            catch ( util::CloseVetoException& )
+            catch (const util::CloseVetoException&)
             {
             }
         }
@@ -2291,7 +2294,7 @@ void SfxViewShell::AddRemoveClipboardListener( const uno::Reference < datatransf
             }
         }
     }
-    catch( const uno::Exception& )
+    catch (const uno::Exception&)
     {
     }
 }


More information about the Libreoffice-commits mailing list