summaryrefslogtreecommitdiff
path: root/unodevtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-04-11 15:39:38 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-04-11 16:11:19 +0200
commit7b3bef772d65f064393a764e1a6ef468dbf1b18d (patch)
treeb76895c7d109e07d08d550e61f27b6cb4cbba2ba /unodevtools
parent6e3e6ef7257e93743a72719581ef6fe0016e58e9 (diff)
No need to have uno-skeletonmaker depend on udkapi
...just for RuntimeException, which can be replaced with CannotDumpException. Change-Id: I258f5fe534d589b33e988f7e585168c1bc6990f8
Diffstat (limited to 'unodevtools')
-rw-r--r--unodevtools/Executable_skeletonmaker.mk6
-rw-r--r--unodevtools/inc/unodevtools/options.hxx5
-rw-r--r--unodevtools/source/skeletonmaker/skeletonmaker.cxx17
-rw-r--r--unodevtools/source/unodevtools/options.cxx13
4 files changed, 6 insertions, 35 deletions
diff --git a/unodevtools/Executable_skeletonmaker.mk b/unodevtools/Executable_skeletonmaker.mk
index f021485ae73d..1cb142e48887 100644
--- a/unodevtools/Executable_skeletonmaker.mk
+++ b/unodevtools/Executable_skeletonmaker.mk
@@ -28,10 +28,6 @@ $(eval $(call gb_Executable_Executable,uno-skeletonmaker))
$(eval $(call gb_Executable_use_external,uno-skeletonmaker,boost_headers))
-$(eval $(call gb_Executable_use_api,uno-skeletonmaker,\
- udkapi \
-))
-
$(eval $(call gb_Executable_set_include,uno-skeletonmaker,\
-I$(SRCDIR)/unodevtools/inc \
$$(INCLUDE) \
@@ -41,8 +37,6 @@ $(eval $(call gb_Executable_use_libraries,uno-skeletonmaker,\
reg \
sal \
salhelper \
- cppu \
- cppuhelper \
unoidl \
))
diff --git a/unodevtools/inc/unodevtools/options.hxx b/unodevtools/inc/unodevtools/options.hxx
index e1347829be7d..8c981922d4fa 100644
--- a/unodevtools/inc/unodevtools/options.hxx
+++ b/unodevtools/inc/unodevtools/options.hxx
@@ -22,15 +22,14 @@
#include "sal/config.h"
-#include <com/sun/star/uno/RuntimeException.hpp>
#include <rtl/ustrbuf.hxx>
namespace unodevtools {
//-------------------------------------------------------------------------------
sal_Bool readOption( OUString * pValue, const sal_Char * pOpt,
- sal_uInt32 * pnIndex, const OUString & aArg)
- throw (com::sun::star::uno::RuntimeException);
+ sal_uInt32 * pnIndex, const OUString & aArg);
+ // throws CannotDumpException
//-------------------------------------------------------------------------------
sal_Bool readOption( sal_Bool * pbOpt, const sal_Char * pOpt,
diff --git a/unodevtools/source/skeletonmaker/skeletonmaker.cxx b/unodevtools/source/skeletonmaker/skeletonmaker.cxx
index 8dd5d638325c..0ef5d2471597 100644
--- a/unodevtools/source/skeletonmaker/skeletonmaker.cxx
+++ b/unodevtools/source/skeletonmaker/skeletonmaker.cxx
@@ -21,17 +21,13 @@
#include "codemaker/typemanager.hxx"
#include "sal/main.h"
#include "rtl/process.h"
-#include "rtl/ustrbuf.hxx"
#include "unodevtools/options.hxx"
#include "skeletonjava.hxx"
#include "skeletoncpp.hxx"
-#include "com/sun/star/uno/Reference.hxx"
-
using namespace ::rtl;
using namespace ::skeletonmaker;
using namespace ::unodevtools;
-using namespace ::com::sun::star::uno;
namespace {
@@ -269,12 +265,7 @@ SAL_IMPLEMENT_MAIN()
// else illegal argument
- OUStringBuffer buf( 64 );
- buf.append("unexpected parameter \"");
- buf.append(arg);
- buf.append("\"!");
- throw RuntimeException(buf.makeStringAndClear(),
- css::uno::Reference< XInterface >());
+ throw CannotDumpException("unexpected parameter \"" + arg + "\"!");
}
if ( types.empty() && options.componenttype != 3) {
@@ -331,12 +322,6 @@ SAL_IMPLEMENT_MAIN()
} catch (const CannotDumpException & e) {
std::cout.flush();
std::cerr << "\nError: " << e.getMessage() << std::endl;
- } catch(const Exception& e) {
- std::cout.flush();
- std::cerr
- << "\nError: "
- << OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr()
- << std::endl;
}
return 0;
diff --git a/unodevtools/source/unodevtools/options.cxx b/unodevtools/source/unodevtools/options.cxx
index 534e87eeae2b..ec0264635a2b 100644
--- a/unodevtools/source/unodevtools/options.cxx
+++ b/unodevtools/source/unodevtools/options.cxx
@@ -19,14 +19,11 @@
#include <stdio.h>
+#include "codemaker/global.hxx"
#include "rtl/ustring.hxx"
-#include "rtl/ustrbuf.hxx"
#include "rtl/process.h"
-#include "com/sun/star/uno/RuntimeException.hpp"
-
using namespace ::rtl;
-using namespace ::com::sun::star::uno;
namespace unodevtools {
@@ -41,7 +38,6 @@ static void out( const sal_Char * pText )
//-------------------------------------------------------------------------------
sal_Bool readOption( OUString * pValue, const sal_Char * pOpt,
sal_uInt32 * pnIndex, const OUString & aArg)
- throw (RuntimeException)
{
const OUString dash = OUString("-");
if(aArg.indexOf(dash) != 0)
@@ -60,11 +56,8 @@ sal_Bool readOption( OUString * pValue, const sal_Char * pOpt,
if (*pnIndex >= rtl_getAppCommandArgCount() ||
pValue->copy(1).equals(dash))
{
- OUStringBuffer buf( 32 );
- buf.append( "incomplete option \"-" );
- buf.appendAscii( pOpt );
- buf.append( "\" given!" );
- throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface >() );
+ throw CannotDumpException(
+ "incomplete option \"-" + aOpt + "\" given!");
} else {
#if OSL_DEBUG_LEVEL > 1
out( "\n> identified option -" );