summaryrefslogtreecommitdiffstats
path: root/padmin/source/pamain.cxx
diff options
context:
space:
mode:
authorPhilipp Lohmann <pl@openoffice.org>2001-09-04 15:24:50 +0000
committerPhilipp Lohmann <pl@openoffice.org>2001-09-04 15:24:50 +0000
commitcbbe10fec96963050fe7eefbe3820e21c4bf5edb (patch)
treed2f557a10b4188cacf91c90b43dd68b90b3912c1 /padmin/source/pamain.cxx
parent#88003# Don't overload add/removeEventListener (diff)
downloadcore-cbbe10fec96963050fe7eefbe3820e21c4bf5edb.tar.gz
core-cbbe10fec96963050fe7eefbe3820e21c4bf5edb.zip
#90314# replace ugly old svtools path dialogue with folder picker service
Diffstat (limited to 'padmin/source/pamain.cxx')
-rw-r--r--padmin/source/pamain.cxx30
1 files changed, 28 insertions, 2 deletions
diff --git a/padmin/source/pamain.cxx b/padmin/source/pamain.cxx
index fab4b692d209..8a9456e400a1 100644
--- a/padmin/source/pamain.cxx
+++ b/padmin/source/pamain.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: pamain.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: pl $ $Date: 2001-05-08 11:56:36 $
+ * last change: $Author: pl $ $Date: 2001-09-04 16:24:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -86,6 +86,14 @@
#include <comphelper/processfactory.hxx>
#endif
+#ifndef _UCBHELPER_CONTENTBROKER_HXX
+#include <ucbhelper/contentbroker.hxx>
+#endif
+
+#ifndef _UCBHELPER_CONFIGURATIONKEYS_HXX_
+#include <ucbhelper/configurationkeys.hxx>
+#endif
+
using namespace padmin;
using namespace rtl;
using namespace cppu;
@@ -150,11 +158,29 @@ void MyApp::Main()
fprintf( stderr, "could not create service factory\n" );
#endif
+ /*
+ * Create UCB.
+ */
+ Sequence< Any > aArgs( 2 );
+ aArgs[ 0 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL );
+ aArgs[ 1 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY2_OFFICE );
+ sal_Bool bSuccess = ::ucb::ContentBroker::initialize( xFactory, aArgs );
+
+#ifdef DEBUG
+ if ( !bSuccess )
+ fprintf( stderr, "Error creating UCB\n" );
+#endif
+
pPADialog = PADialog::Create( NULL , FALSE );
Application::SetDisplayName( pPADialog->GetText() );
pPADialog->Execute();
delete pPADialog;
+ /*
+ * clean up UCB
+ */
+ ::ucb::ContentBroker::deinitialize();
+
OString aTmp( OUStringToOString( aWriteRdbName, RTL_TEXTENCODING_ISO_8859_1 ) );
unlink( aTmp.getStr() );
}