summaryrefslogtreecommitdiff
path: root/padmin/source/pamain.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-03-05 15:54:15 +0000
committerKurt Zenker <kz@openoffice.org>2008-03-05 15:54:15 +0000
commita92af7b8c41b14e4e6f345f69528ca793baf892d (patch)
treebfb4824cb08325d8291adace8a577f1a2f8dbe0d /padmin/source/pamain.cxx
parent17f1dd8adf38ff86b699a2264997a4de8703619f (diff)
INTEGRATION: CWS vcl86_DEV300 (1.15.38); FILE MERGED
2008/02/20 16:24:30 pl 1.15.38.1: #i83676# change checkbox text
Diffstat (limited to 'padmin/source/pamain.cxx')
-rw-r--r--padmin/source/pamain.cxx72
1 files changed, 32 insertions, 40 deletions
diff --git a/padmin/source/pamain.cxx b/padmin/source/pamain.cxx
index 1bce3da37a6e..b25b32d6da98 100644
--- a/padmin/source/pamain.cxx
+++ b/padmin/source/pamain.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: pamain.cxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: ihi $ $Date: 2007-06-05 15:01:46 $
+ * last change: $Author: kz $ $Date: 2008-03-05 16:54:15 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -36,48 +36,23 @@
#include <stdio.h>
#include <unistd.h>
-#ifndef _TOOLS_TESTTOOLLOADER_HXX_
-#include <tools/testtoolloader.hxx>
-#endif
-#ifndef _SV_SVAPP_HXX
-#include <vcl/svapp.hxx>
-#endif
-#ifndef _SV_WRKWIN_HXX
-#include <vcl/wrkwin.hxx>
-#endif
-#ifndef _VCL_UNOWRAP_HXX
-#include <vcl/unowrap.hxx>
-#endif
-#ifndef _PAD_PADIALOG_HXX_
-#include <padialog.hxx>
-#endif
-#ifndef _PAD_HELPER_HXX_
-#include <helper.hxx>
-#endif
+#include "tools/testtoolloader.hxx"
-#ifndef _PADMIN_DESKTOPCONTEXT_HXX_
-#include <desktopcontext.hxx>
-#endif
+#include "vcl/svapp.hxx"
+#include "vcl/wrkwin.hxx"
+#include "vcl/unowrap.hxx"
-#ifndef _CPPUHELPER_BOOTSTRAP_HXX_
-#include <cppuhelper/bootstrap.hxx>
-#endif
+#include "padialog.hxx"
+#include "helper.hxx"
+#include "desktopcontext.hxx"
-#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
-#include <comphelper/processfactory.hxx>
-#endif
+#include "cppuhelper/bootstrap.hxx"
+#include "comphelper/processfactory.hxx"
+#include "ucbhelper/contentbroker.hxx"
+#include "ucbhelper/configurationkeys.hxx"
+#include "unotools/configmgr.hxx"
-#ifndef _UCBHELPER_CONTENTBROKER_HXX
-#include <ucbhelper/contentbroker.hxx>
-#endif
-
-#ifndef _UCBHELPER_CONFIGURATIONKEYS_HXX_
-#include <ucbhelper/configurationkeys.hxx>
-#endif
-
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
+#include "com/sun/star/lang/XMultiServiceFactory.hpp"
using namespace padmin;
using namespace rtl;
@@ -93,10 +68,25 @@ class MyApp : public Application
public:
void Main();
virtual USHORT Exception( USHORT nError );
+
+ static void ReadStringHook( String& );
};
MyApp aMyApp;
+void MyApp::ReadStringHook( String& rStr )
+{
+ static String maProduct;
+ if( ! maProduct.Len() )
+ {
+ Any aRet = utl::ConfigManager::GetDirectConfigProperty( utl::ConfigManager::PRODUCTNAME );
+ OUString aProd;
+ aRet >>= aProd;
+ maProduct = String( aProd );
+ }
+ rStr.SearchAndReplaceAllAscii( "%PRODUCTNAME", maProduct );
+};
+
// -----------------------------------------------------------------------
@@ -176,6 +166,8 @@ void MyApp::Main()
// initialize test-tool library (if available)
tools::InitTestToolLib();
+ ResMgr::SetReadStringHook( MyApp::ReadStringHook );
+
pPADialog = PADialog::Create( NULL , FALSE );
Application::SetDisplayName( pPADialog->GetText() );
pPADialog->SetIcon(501);