[Libreoffice-commits] .: 3 commits - basctl/source sfx2/source sw/source vbahelper/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Sep 6 08:28:51 PDT 2011


 basctl/source/basicide/basides1.cxx      |    6 +-----
 sfx2/source/control/unoctitm.cxx         |    6 +++---
 sw/source/ui/app/docsh.cxx               |    2 ++
 vbahelper/source/msforms/vbacontrols.cxx |   12 ++++++------
 4 files changed, 12 insertions(+), 14 deletions(-)

New commits:
commit fa9ff01fe4731a5d91da60ec3f5c2cafa7b3f382
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 6 16:26:15 2011 +0100

    SID_DOC_MODIFIED should (probably) be a SfxBoolItem

diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 2601812..6a5cd13 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -929,7 +929,6 @@ void BasicIDEShell::GetState(SfxItemSet &rSet)
             break;
             case SID_DOC_MODIFIED:
             {
-                String aModifiedMarker;
                 sal_Bool bModified = sal_False;
 
                 if ( pCurWin )
@@ -943,10 +942,7 @@ void BasicIDEShell::GetState(SfxItemSet &rSet)
                     }
                 }
 
-                if ( bModified )
-                    aModifiedMarker = '*';
-
-                SfxStringItem aItem( SID_DOC_MODIFIED, aModifiedMarker );
+                SfxBoolItem aItem(SID_DOC_MODIFIED, bModified);
                 rSet.Put( aItem );
             }
             break;
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index 793b912..ba82104 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -379,6 +379,8 @@ sal_Bool SwDocShell::Save()
     SfxViewFrame* pFrm = pWrtShell ? pWrtShell->GetView().GetViewFrame() : 0;
     if( pFrm )
     {
+        //TODO: this is probably wrong: we should have a SfxBoolItem here, is
+        //this intended to set the state to modified ? or not modified ?
         pFrm->GetBindings().SetState( SfxStringItem( SID_DOC_MODIFIED, ' ' ));
     }
     return !IsError( nErr );
commit 81c5bd4bd2a6104c3d1dd1c3b61206aad26d29cd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 6 15:13:15 2011 +0100

    WaE: unused variable

diff --git a/vbahelper/source/msforms/vbacontrols.cxx b/vbahelper/source/msforms/vbacontrols.cxx
index 543a4bf..53706cf 100644
--- a/vbahelper/source/msforms/vbacontrols.cxx
+++ b/vbahelper/source/msforms/vbacontrols.cxx
@@ -101,7 +101,7 @@ public:
             for ( sal_Int32 i = 0; i < sXControls.getLength(); ++i )
                 SetArrayElementTo( sXControls[ i ], i );
         }
-        catch( uno::Exception& )
+        catch (const uno::Exception&)
         {
             // accept the case when the dialog already does not exist
             // in this case the wrapper should work in dummy mode
@@ -415,7 +415,7 @@ uno::Any SAL_CALL ScVbaControls::Add( const uno::Any& Object, const uno::Any& St
                 uno::Sequence< uno::Any > aOutDummy;
                 xControlInvoke->invoke( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SOAddAXControl" ) ), aArgs, aOutIDDummy, aOutDummy );
             }
-            catch( uno::Exception& )
+            catch (const uno::Exception&)
             {
                 xDialogContainer->removeByName( aNewName );
                 throw;
@@ -436,11 +436,11 @@ uno::Any SAL_CALL ScVbaControls::Add( const uno::Any& Object, const uno::Any& St
         else
             throw uno::RuntimeException();
     }
-    catch( uno::RuntimeException& )
+    catch (const uno::RuntimeException&)
     {
         throw;
     }
-    catch( uno::Exception& e )
+    catch (const uno::Exception& e)
     {
         throw lang::WrappedTargetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can not create AXControl!" ) ),
                 uno::Reference< uno::XInterface >(),
@@ -488,14 +488,14 @@ void SAL_CALL ScVbaControls::Remove( const uno::Any& StringKeyOrIndex )
         xDialogContainer->removeByName( aControlName );
         xControl->dispose();
     }
-    catch( uno::RuntimeException& )
+    catch (const uno::RuntimeException&)
     {
         // the exceptions are not rethrown, impossibility to find or remove the control is currently not reported
         // since in most cases it means just that the controls is already not there, the VBA seems to do it in the same way
 
         // throw;
     }
-    catch( uno::Exception& e )
+    catch (const uno::Exception&)
     {
         // throw lang::WrappedTargetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can not create AXControl!" ) ),
         //         uno::Reference< uno::XInterface >(),
commit a388bf33049f4792b3170883715456aa00ea61ec
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 6 15:11:07 2011 +0100

    ByteString->rtl::OStringBuffer

diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 0218246..40c27c2 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -462,9 +462,9 @@ SfxDispatchController_Impl::SfxDispatchController_Impl(
 {
     if ( aDispatchURL.Protocol.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("slot:")) && pUnoName )
     {
-        ByteString aTmp(".uno:");
-        aTmp += pUnoName;
-        aDispatchURL.Complete = ::rtl::OUString::createFromAscii( aTmp.GetBuffer() );
+        rtl::OStringBuffer aTmp(RTL_CONSTASCII_STRINGPARAM(".uno:"));
+        aTmp.append(pUnoName);
+        aDispatchURL.Complete = ::rtl::OStringToOUString(aTmp.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US);
         Reference < ::com::sun::star::util::XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.URLTransformer"))), UNO_QUERY );
         xTrans->parseStrict( aDispatchURL );
     }


More information about the Libreoffice-commits mailing list