diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-10-17 17:17:27 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-10-31 12:03:29 +0100 |
commit | bb93b038a70ef7a810b6b9d447856ed77c590e40 (patch) | |
tree | d1750ad0c930e4813e66cffe51a55f4383bc36fe /sfx2/source | |
parent | 1008e9468d32dad8dbfd7f24e6af626d766fe308 (diff) |
CMIS: display errors when clicking checkout button
Change-Id: I38d5cb95e1c45e1c57b11ec81523d4cca7568d34
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/view/sfxbasecontroller.cxx | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 281239f88e3c..9c3786f532a1 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -2570,11 +2570,9 @@ void SAL_CALL SfxBaseModel::checkOut( ) throw ( uno::RuntimeException ) // Reload the CMIS properties loadCmisProperties( ); } - catch (const ucb::ContentCreationException &) - { - } - catch (const ucb::CommandAbortedException &) + catch ( const uno::Exception & e ) { + throw uno::RuntimeException( e.Message, e.Context ); } } } diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index 658d887db7fb..9fb52af07f6b 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -72,6 +72,7 @@ #include <toolkit/helper/convert.hxx> #include <framework/titlehelper.hxx> #include <comphelper/processfactory.hxx> +#include <vcl/msgbox.hxx> #include <boost/unordered_map.hpp> @@ -1483,9 +1484,11 @@ IMPL_LINK( SfxBaseController, CheckOutHandler, PushButton*, pBtn ) SfxViewFrame* pViewFrame = m_pData->m_pViewShell->GetFrame(); pViewFrame->RemoveInfoBar( pInfoBar ); } - catch ( const uno::RuntimeException& ) + catch ( const uno::RuntimeException& e ) { - // TODO Handle the problem in some way? + ErrorBox* pErrorBox = new ErrorBox( &m_pData->m_pViewShell->GetFrame()->GetWindow(), WB_OK, e.Message ); + pErrorBox->Execute( ); + delete pErrorBox; } } return 0; |