[Libreoffice-commits] .: 2 commits - cui/source vcl/source

2013-01-04 Thread Libreoffice Gerrit user
 cui/source/options/personalization.cxx |   28 +---
 vcl/source/window/dockingarea.cxx  |1 +
 2 files changed, 26 insertions(+), 3 deletions(-)

New commits:
commit 3f3d0c52ae29b6ab6b2c10a5557714361aa76a26
Author: Jan Holesovsky ke...@suse.cz
Date:   Fri Jan 4 23:43:42 2013 +0100

Personas: Broadcast the information that the Persona has changed.

Change-Id: Ic563204c1a1a64d315e3e73dff30b6a6d05cfd87

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index ae8f605..14e071f 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -16,6 +16,7 @@
 #include tools/urlobj.hxx
 #include vcl/edit.hxx
 #include vcl/msgbox.hxx
+#include vcl/svapp.hxx
 
 #include com/sun/star/lang/XMultiServiceFactory.hpp
 #include com/sun/star/system/SystemShellExecute.hpp
@@ -161,6 +162,13 @@ sal_Bool SvxPersonalizationTabPage::FillItemSet( 
SfxItemSet  )
 
 batch-commit();
 
+if ( bModified )
+{
+// broadcast the change
+DataChangedEvent aDataChanged( DATACHANGED_SETTINGS, NULL, 
SETTINGS_STYLE );
+Application::NotifyAllWindows( aDataChanged );
+}
+
 return bModified;
 }
 
diff --git a/vcl/source/window/dockingarea.cxx 
b/vcl/source/window/dockingarea.cxx
index 7d97dd9..8269c5e 100644
--- a/vcl/source/window/dockingarea.cxx
+++ b/vcl/source/window/dockingarea.cxx
@@ -103,6 +103,7 @@ void DockingAreaWindow::DataChanged( const 
DataChangedEvent rDCEvt )
 if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS)  (rDCEvt.GetFlags()  
SETTINGS_STYLE) )
 {
 ImplInitBackground( this );
+Invalidate();
 }
 }
 
commit c223e5ff859171adab1597025b30ec2501fc5771
Author: Jan Holesovsky ke...@suse.cz
Date:   Fri Jan 4 23:09:18 2013 +0100

Personas: More robust Persona URL handling.

Change-Id: I55fa2570decd52e978747e589887f2fe972812c8

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 7d31b0f..ae8f605 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -71,7 +71,14 @@ OUString SelectPersonaDialog::GetPersonaURL() const
 return OUString();
 }
 
-return aText;
+// canonicalize the URL
+OUString aPersona( persona/ );
+sal_Int32 nPersona = aText.lastIndexOf( aPersona );
+
+if ( nPersona  0 )
+return OUString();
+
+return http://www.getpersonas.com/persona/; + aText.copy( nPersona + 
aPersona.getLength() );
 }
 
 IMPL_LINK( SelectPersonaDialog, VisitPersonas, PushButton*, /*pButton*/ )
@@ -236,7 +243,7 @@ IMPL_LINK( SvxPersonalizationTabPage, SelectPersona, 
PushButton*, /*pButton*/ )
 while ( aDialog.Execute() == RET_OK )
 {
 OUString aURL( aDialog.GetPersonaURL() );
-if ( aURL !=  )
+if ( !aURL.isEmpty() )
 {
 if ( CopyPersonaToGallery( aURL ) )
 m_pOwnPersona-Check();
@@ -312,7 +319,14 @@ bool SvxPersonalizationTabPage::CopyPersonaToGallery( 
const OUString rURL )
 if ( !xFileAccess.is() )
 return false;
 
-uno::Reference io::XInputStream  xStream( xFileAccess-openFileRead( 
rURL ), uno::UNO_QUERY );
+uno::Reference io::XInputStream  xStream;
+try {
+xStream = xFileAccess-openFileRead( rURL );
+}
+catch (...)
+{
+return false;
+}
 if ( !xStream.is() )
 return false;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - cui/source vcl/source

2012-07-21 Thread Matteo Casalin
 cui/source/dialogs/cuigrfflt.cxx |1 -
 vcl/source/app/sound.cxx |   12 
 2 files changed, 4 insertions(+), 9 deletions(-)

New commits:
commit ad6b352bffdba5c45fa0915c7fdf8f5460409fc3
Author: Matteo Casalin matteo.casa...@gmx.com
Date:   Sat Jul 14 18:46:58 2012 +0200

Cleanup sound.cxx

Change-Id: I6aeb437a034c8c9e5ab7583d608d098912068f72

diff --git a/vcl/source/app/sound.cxx b/vcl/source/app/sound.cxx
index 2ffc190..498842c 100644
--- a/vcl/source/app/sound.cxx
+++ b/vcl/source/app/sound.cxx
@@ -24,7 +24,6 @@
 
 #include salframe.hxx
 #include svdata.hxx
-#include salinst.hxx
 
 void Sound::Beep( SoundType eType, Window* pWindow )
 {
@@ -32,13 +31,10 @@ void Sound::Beep( SoundType eType, Window* pWindow )
 if ( Application::IsHeadlessModeEnabled() )
 return;
 
-if( !pWindow )
-{
-Window* pDefWindow = ImplGetDefaultWindow();
-pDefWindow-ImplGetFrame()-Beep( eType );
-}
-else
-pWindow-ImplGetFrame()-Beep( eType );
+if ( !pWindow )
+pWindow = ImplGetDefaultWindow();
+
+pWindow-ImplGetFrame()-Beep( eType );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 72ee894e1ede17e0b3300b2da4b2f63bd20961a5
Author: Matteo Casalin matteo.casa...@gmx.com
Date:   Sat Jul 14 10:24:38 2012 +0200

Do not include the same header file in both .cxx and related .hxx

Change-Id: Ie1a9227189ec1f3c2de1b81bec99b4267a5fee1f

diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index 2dbe200..310c54a 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -27,7 +27,6 @@
  /
 
 #include tools/shl.hxx
-#include tools/helpers.hxx
 #include vcl/msgbox.hxx
 #include sfx2/viewfrm.hxx
 #include sfx2/viewsh.hxx
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits