summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/appbas.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2007-07-17 12:39:56 +0000
committerOliver Bolte <obo@openoffice.org>2007-07-17 12:39:56 +0000
commitb73a1402d7f571751d4a141eaae1a5c506dcf5de (patch)
tree0094146f9f982724f683d6795abf845439fe4882 /sfx2/source/appl/appbas.cxx
parentc5ceb507af4e3fc1dbcd74d4c97614561e4a0808 (diff)
INTEGRATION: CWS basemodelrefactoring (1.46.102); FILE MERGED
2007/03/25 02:50:49 mba 1.46.102.2: RESYNC: (1.46-1.47); FILE MERGED 2007/03/23 14:28:30 mba 1.46.102.1: #i75677#: remove superfluous code
Diffstat (limited to 'sfx2/source/appl/appbas.cxx')
-rw-r--r--sfx2/source/appl/appbas.cxx248
1 files changed, 2 insertions, 246 deletions
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 5a5a0d8660..03b7c7caeb 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: appbas.cxx,v $
*
- * $Revision: 1.48 $
+ * $Revision: 1.49 $
*
- * last change: $Author: hr $ $Date: 2007-06-27 22:54:43 $
+ * last change: $Author: obo $ $Date: 2007-07-17 13:39:56 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -258,250 +258,6 @@ String lcl_GetVersionString(ResMgr* /*pAppData_ImplResMgr*/)
return aVersion;
}
-//------------------------------------------------------------------------
-/*(mba)
-SbxObject* SfxSbxObjectFactory_Impl::CreateObject( const String &rType )
-{
- if ( COMPARE_EQUAL == rType.CompareIgnoreCaseToAscii( "DocumentInfo" ) )
- return new SfxDocumentInfoObject_Impl;
- if ( COMPARE_EQUAL == rType.CompareIgnoreCaseToAscii( "Progress" ) )
- return SfxProgress::CreateObject_Impl();
- return 0;
-}*/
-
-//=========================================================================
-/*
-SfxSelectionObject::SfxSelectionObject
-(
- SfxViewFrame *pFrame // ein Frame als Parent
-)
-
-// [Beschreibung]
-
-// interner Ctor f"ur Default-Behandlung
-
-
-: SfxShellSubObject( pFrame, SFX_TYPELIB_INFO(Selection), "Selection" ),
- _pFrame( pFrame )
-{
- SetFlag( SBX_EXTSEARCH | SBX_DONTSTORE ); // unsichtbar
-}
-
-//-------------------------------------------------------------------------
-
-SfxSelectionObject::SfxSelectionObject
-(
- SfxViewFrame *pFrame, // ein Frame als Parent
- const String& rClassName,
- const SfxTypeLibImpl &rTypeLibInfo
-)
-
-: SfxShellSubObject( pFrame, rClassName, rTypeLibInfo, "Selection" ),
- _pFrame( pFrame )
-{
- SetFlag( SBX_EXTSEARCH | SBX_DONTSTORE ); // unsichtbar
-}
-
-//-------------------------------------------------------------------------
-
-SvDispatch* SfxSelectionObject::GetAggObject( sal_uInt16 nIdx )
-
-{
- // selbst?
- if ( 0 == nIdx )
- return SfxShellSubObject::GetAggObject( 0 );
-
- // die oberhalb der ::com::sun::star::sdbcx::View auf dem Dispatcher befindlichen Shells indizieren
- SfxDispatcher *pDispat = _pFrame->GetDispatcher();
- SfxShell *pSh = pDispat->GetShell( nIdx-1 );
- if ( !pSh || pSh->ISA(SfxObjectShell) )
- return 0;
- return (SvDispatch*) pSh->GetSbxObject();
-}
-
-//-------------------------------------------------------------------------
-
-SbxVariable* SfxSelectionObject::Find
-(
- const String& rName,
- SbxClassType t
-)
-{
- // einige Member selbst bedienen
- String aName( rName.ToLowerAscii() );
- if ( aName == "name" || aName == "classname" )
- return SfxShellSubObject::Find( rName, t );
-
- // nur die oberhalb der ::com::sun::star::sdbcx::View auf dem Dispatcher liegenden Shells durchsuchen
- SfxDispatcher *pDispat = _pFrame->GetDispatcher();
- pDispat->Flush();
- SfxShell *pSh;
- for ( sal_uInt16 n = 0;
- ( pSh = pDispat->GetShell( n ) ) && !pSh->ISA(SfxViewFrame);
- ++n )
- {
- SbxObject *pObj = pSh->GetSbxObject();
- if ( pObj )
- {
- if ( ( t == SbxCLASS_DONTCARE || t == SbxCLASS_OBJECT ) &&
- pObj->GetName() == rName )
- return pObj;
- else
- {
- SbxVariable *pRes = pObj->Find( rName, t );
- if ( pRes )
- return pRes;
- }
- }
- }
-
- return 0;
-}
-
-//-------------------------------------------------------------------------
-
-SbxVariable* SfxSelectionObject::FindUserData
-(
- sal_uInt32 nId
-)
-{
- // nur die oberhalb der ::com::sun::star::sdbcx::View auf dem Dispatcher liegenden Shells durchsuchen
- SfxDispatcher *pDispat = _pFrame->GetDispatcher();
- SfxShell *pSh;
- for ( sal_uInt16 n = 0;
- ( pSh = pDispat->GetShell( n ) ) && !pSh->ISA(SfxViewFrame);
- ++n )
- {
- SbxObject *pObj = pSh->GetSbxObject();
- if ( pObj )
- {
- SbxVariable *pRes = pObj->FindUserData( nId );
- if ( pRes )
- return pRes;
- }
- }
-
- return 0;
-}
-
-//=========================================================================
-
-class SfxConstants_Impl: public SbxObject
-{
- const char* _pPrefix;
- const SfxConstant* _pConsts;
- sal_uInt16 _nCount;
-
-public:
- SfxConstants_Impl( const char *pPrefix,
- const SfxConstant *pConsts,
- sal_uInt16 n );
- SbxVariable* Find( const String& rName, SbxClassType t );
-};
-
-//-------------------------------------------------------------------------
-
-SfxConstants_Impl::SfxConstants_Impl
-(
- const char* pPrefix,
- const SfxConstant* pConsts,
- sal_uInt16 nCount
-)
-: SbxObject( "Constants" ),
- _pPrefix( pPrefix ),
- _pConsts( pConsts ),
- _nCount( nCount )
-{
- SetFlag( SBX_EXTSEARCH | SBX_DONTSTORE ); // unsichtbar
- SetName( String( (long) this ) ); // random
-}
-
-//-------------------------------------------------------------------------
-
-SbxVariable* SfxConstants_Impl::Find
-(
- const String& rName,
- SbxClassType t
-)
-{
- // stimmt Typ und Prefix?
- String aPrefix;
- if ( _pPrefix )
- aPrefix += _pPrefix;
- if ( ( SbxCLASS_DONTCARE != t && SbxCLASS_PROPERTY != t ) ||
- ( aPrefix.Len() && aPrefix.Len() != rName.Match( _pPrefix ) ) )
- return 0;
-
- // schon drin?
- SbxVariable* pRes = SbxObject::Find( rName, t );
- if( pRes )
- return pRes;
-
- // sonst suchen
- String aSearched( rName );
- aSearched.ToLowerAscii();
- for ( sal_uInt16 n = 0; n < _nCount; ++n )
- {
- // gefunden?
- const SfxConstant &rConst = _pConsts[n];
- String aName( aPrefix );
- aName += rConst.pName;
- if ( aSearched == aName.ToLowerAscii() )
- {
- // on-demand erzeugen
- SbxVariable *pVar = Make( aName, SbxCLASS_PROPERTY, rConst.eType );
- switch ( rConst.eType )
- {
- case SbxUSHORT:
- pVar->PutUShort( (sal_uInt16)(int) rConst.pData );
- break;
-
- case SbxCHAR:
- pVar->PutChar( (char)(int) rConst.pData );
- break;
-
- case SbxBYTE:
- pVar->PutByte( (sal_Int8)(int) rConst.pData );
- break;
-
- case SbxBOOL:
- pVar->PutBool( (sal_Bool)(int) rConst.pData );
- break;
-
- case SbxINTEGER:
- pVar->PutInteger( (short)(int) rConst.pData );
- break;
-
- case SbxLONG:
- pVar->PutLong( (long) rConst.pData );
- break;
-
- case SbxUINT:
- pVar->PutUShort( (sal_uInt16)(int) rConst.pData );
- break;
-
- case SbxULONG:
- pVar->PutULong( (sal_uInt32) rConst.pData );
- break;
-
- case SbxLPSTR:
- pVar->PutString( (char*) rConst.pData );
- break;
-
- default:
- DBG_ERROR( "type of constant not supported" );
- }
-
- pVar->ResetFlag( SBX_WRITE );
- pVar->SetFlag( SBX_CONST );
- pVar->SetFlag( SBX_FIXED );
- return pVar;
- }
- }
-
- return 0;
-}
-*/
//=========================================================================
sal_uInt16 SfxApplication::SaveBasicManager() const
{