summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/appserv.cxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2006-05-02 15:17:45 +0000
committerRüdiger Timm <rt@openoffice.org>2006-05-02 15:17:45 +0000
commit999f29a696586cfee56d3dd5657d8849901a441a (patch)
tree529bf21b457b366e0b8427bc6d7504ae338a7deb /sfx2/source/appl/appserv.cxx
parent11e75558e8bd2e700595b3c9573daa5aeb065226 (diff)
INTEGRATION: CWS sfxcleanup (1.59.30); FILE MERGED
2006/05/02 13:33:10 mba 1.59.30.5: RESYNC: (1.59-1.60); FILE MERGED 2006/03/04 13:02:51 mba 1.59.30.4: #132394#: remove superfluous code 2006/03/02 09:24:02 mba 1.59.30.3: #132394#: remove superfluous code 2006/02/26 17:09:52 mba 1.59.30.2: #132394#: remove superfluous code 2006/02/24 23:08:55 mba 1.59.30.1: #132394#: remove obviously superfluous members and methods from SfxApplication
Diffstat (limited to 'sfx2/source/appl/appserv.cxx')
-rw-r--r--sfx2/source/appl/appserv.cxx98
1 files changed, 30 insertions, 68 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 9530d69b659a..65c67b7d39da 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: appserv.cxx,v $
*
- * $Revision: 1.60 $
+ * $Revision: 1.61 $
*
- * last change: $Author: vg $ $Date: 2006-04-07 14:59:27 $
+ * last change: $Author: rt $ $Date: 2006-05-02 16:17:45 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -158,6 +158,7 @@
#include <svtools/regoptions.hxx>
#include <svtools/helpopt.hxx>
#include <tools/shl.hxx>
+#include <unotools/bootstrap.hxx>
#include <vos/process.hxx>
#include <rtl/bootstrap.hxx>
@@ -169,7 +170,7 @@
#pragma hdrstop
#endif
-#include "appimp.hxx"
+#include "about.hxx"
#include "referers.hxx"
#include "app.hxx"
#include "request.hxx"
@@ -203,8 +204,6 @@
#include "macrconf.hxx"
#include "minfitem.hxx"
#include "event.hxx"
-#include "intfrm.hxx"
-#include "urlframe.hxx"
#include "module.hxx"
#include "topfrm.hxx"
#include "sfxpicklist.hxx"
@@ -279,7 +278,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
String aName = String::CreateFromAscii("vnd.sun.star.cmd:logout");
SfxStringItem aNameItem( SID_FILE_NAME, aName );
SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE( "private/user" ) );
- pAppDispat->Execute( SID_OPENDOC, SFX_CALLMODE_SLOT, &aNameItem, &aReferer, 0L );
+ pAppData_Impl->pAppDispat->Execute( SID_OPENDOC, SFX_CALLMODE_SLOT, &aNameItem, &aReferer, 0L );
return;
}
@@ -313,44 +312,6 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
return;
}
- case SID_PICK1:
- case SID_PICK2:
- case SID_PICK3:
- case SID_PICK4:
- case SID_PICK5:
- case SID_PICK6:
- case SID_PICK7:
- case SID_PICK8:
- case SID_PICK9:
- {
- SfxPickList::Get()->ExecuteEntry( rReq.GetSlot() - SID_PICK1 );
-/*
- USHORT nPickNo = rReq.GetSlot()-SID_PICK1;
- if ( nPickNo >= SfxPickList_Impl::Get()->GetAllowedMenuSize() )
- break;
-
- rReq.SetSlot( SID_OPENDOC );
- SfxPickEntry_Impl *pPick = SfxPickList_Impl::Get()->GetMenuPickEntry( nPickNo );
- rReq.AppendItem(SfxStringItem(SID_FILE_NAME, pPick->aName ));
- rReq.AppendItem( SfxStringItem( SID_REFERER, DEFINE_CONST_UNICODE(SFX_REFERER_USER) ) );
- rReq.AppendItem( SfxStringItem( SID_TARGETNAME, DEFINE_CONST_UNICODE("_blank") ) );
- rReq.AppendItem( SfxBoolItem( SID_DOC_READONLY, FALSE ) );
- String aFilter(pPick->aFilter);
- USHORT nPos=aFilter.Search('|');
- if( nPos != STRING_NOTFOUND )
- {
- String aOptions(aFilter.Copy( nPos ).GetBuffer()+1);
- aFilter.Erase( nPos );
- rReq.AppendItem(
- SfxStringItem(SID_FILE_FILTEROPTIONS, aOptions));
- }
-
- rReq.AppendItem(SfxStringItem(SID_FILTER_NAME, aFilter));
- ExecuteSlot( rReq );
-*/
- return;
- }
-
case SID_CONFIG:
case SID_TOOLBOXOPTIONS:
case SID_CONFIGSTATUSBAR:
@@ -551,7 +512,27 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_ABOUT:
{
- ModalDialog *pDlg = CreateAboutDialog();
+ ::rtl::OUString aDefault;
+ String aVerId( utl::Bootstrap::getBuildIdData( aDefault ));
+
+ if ( aVerId.Len() == 0 )
+ DBG_ERROR( "No BUILDID in bootstrap file" );
+
+ String aVersion( '[' );
+ ( aVersion += aVerId ) += ']';
+
+ // About-Dialog suchen
+ ResId aDialogResId( RID_DEFAULTABOUT, pAppData_Impl->pLabelResMgr );
+ ResMgr* pResMgr = pAppData_Impl->pLabelResMgr->IsAvailable(
+ aDialogResId.SetRT( RSC_MODALDIALOG ) )
+ ? pAppData_Impl->pLabelResMgr
+ : 0;
+ aDialogResId.SetResMgr( pResMgr );
+ if ( !Resource::GetResManager()->IsAvailable( aDialogResId ) )
+ DBG_ERROR( "No RID_DEFAULTABOUT in label-resource-dll" );
+
+ // About-Dialog anzeigen
+ AboutDialog* pDlg = new AboutDialog( 0, aDialogResId, aVersion );
pDlg->Execute();
delete pDlg;
bDone = TRUE;
@@ -704,25 +685,6 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
rSet.DisableItem(nWhich);
break;
- case SID_PICK1:
- case SID_PICK2:
- case SID_PICK3:
- case SID_PICK4:
- case SID_PICK5:
- case SID_PICK6:
- case SID_PICK7:
- case SID_PICK8:
- case SID_PICK9:
- {
- SfxPickList* pPickList = SfxPickList::Get();
- if (( nWhich - SID_PICK1 ) < (USHORT)pPickList->GetAllowedMenuSize() )
- {
- String aTitle = pPickList->GetMenuEntryTitle( nWhich - SID_PICK1 );
- rSet.Put( SfxStringItem( nWhich, aTitle ));
- }
- break;
- }
-
case SID_CURRENTTIME:
{
rSet.Put( SfxStringItem( nWhich, aLocaleWrapper.getTime( Time(), FALSE ) ) );
@@ -858,9 +820,9 @@ void MacroOrganizer( INT16 nTabId )
ResMgr* SfxApplication::GetOffResManager_Impl()
{
- if ( !pImp->pOfaResMgr )
- pImp->pOfaResMgr = CreateResManager( "ofa");
- return pImp->pOfaResMgr;
+ if ( !pAppData_Impl->pOfaResMgr )
+ pAppData_Impl->pOfaResMgr = CreateResManager( "ofa");
+ return pAppData_Impl->pOfaResMgr;
}
void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
@@ -929,7 +891,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
SfxObjectShell* pDocShell = SfxObjectShell::CreateObject( aBasicName );
pDocShell->DoInitNew( 0 );
pDocShell->SetModified( FALSE );
- pView = SFX_APP()->CreateViewFrame( *pDocShell, 0 );
+ pView = SfxViewFrame::CreateViewFrame( *pDocShell, 0 );
pView->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "BASIC:1" ) ) );
}