diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-07-11 13:25:13 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-07-11 13:25:13 +0000 |
commit | 3da9567ea9f6bb3d0191f50243aa0ca0caaaacbb (patch) | |
tree | 8c3e19caa9a8ac7fd1ea198cfa2bc665eaee00ff | |
parent | e149e8833666aadacd8d12ef48170dcf4c18f4a7 (diff) |
INTEGRATION: CWS jsc21 (1.4.92); FILE MERGED
2008/07/07 11:37:32 jsc 1.4.92.3: #i88797# adapted
2008/06/27 08:49:53 jsc 1.4.92.2: #i90032# adapt link flags and linking for MacOS
2008/05/21 14:57:30 jsc 1.4.92.1: #i88797# adapted to new structure
-rw-r--r-- | odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/SimpleBootstrap_cpp.cxx | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/SimpleBootstrap_cpp.cxx b/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/SimpleBootstrap_cpp.cxx index a5dc3152b5e2..f7c3a78a8dab 100644 --- a/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/SimpleBootstrap_cpp.cxx +++ b/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/SimpleBootstrap_cpp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: SimpleBootstrap_cpp.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: kz $ $Date: 2006-11-06 15:04:00 $ + * last change: $Author: rt $ $Date: 2008-07-11 14:25:13 $ * * The Contents of this file are made available subject to the terms of * the BSD license. @@ -38,12 +38,12 @@ * *************************************************************************/ -#include <iostream> +#include <stdio.h> #include <cppuhelper/bootstrap.hxx> #include <com/sun/star/bridge/XUnoUrlResolver.hpp> #include <com/sun/star/frame/XComponentLoader.hpp> +#include <com/sun/star/lang/XMultiComponentFactory.hpp> -using namespace std; using namespace rtl; using namespace com::sun::star::uno; using namespace com::sun::star::lang; @@ -58,7 +58,7 @@ int SAL_CALL main( int argc, char **argv ) Reference< XComponentContext > xContext( ::cppu::bootstrap() ); if ( !xContext.is() ) { - cerr << "no component context!\n"; + fprintf(stderr, "no component context!\n"); return 1; } @@ -67,7 +67,7 @@ int SAL_CALL main( int argc, char **argv ) xContext->getServiceManager() ); if ( !xServiceManager.is() ) { - cerr << "no service manager!\n"; + fprintf(stderr, "no service manager!\n"); return 1; } @@ -85,22 +85,20 @@ int SAL_CALL main( int argc, char **argv ) Sequence < ::com::sun::star::beans::PropertyValue >() ) ); if ( !xComponent.is() ) { - cerr << "opening spreadsheet document failed!\n"; + fprintf(stderr, "opening spreadsheet document failed!\n"); return 1; } } catch ( ::cppu::BootstrapException & e ) { - cerr << "caught BootstrapException: " - << OUStringToOString( e.getMessage(), RTL_TEXTENCODING_ASCII_US ).getStr() - << '\n'; + fprintf(stderr, "caught BootstrapException: %s\n", + OUStringToOString( e.getMessage(), RTL_TEXTENCODING_ASCII_US ).getStr()); return 1; } catch ( Exception & e ) { - cerr << "caught UNO exception: " - << OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() - << '\n'; + fprintf(stderr, "caught UNO exception: %s\n", + OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); return 1; } |