diff options
author | Povilas Kanapickas <povilas.kanapickas@gmail.com> | 2010-10-20 19:57:00 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2010-10-20 19:58:36 +0100 |
commit | 473e4d6c041392c2fa36f8d3b9184ce593cee90d (patch) | |
tree | 015b2086379ae70ddd87a3ee10657b63369b1b26 | |
parent | 1d6235cea5aaf30517ed0526dc63debfdfb308f0 (diff) |
remove non-compiled code
-rw-r--r-- | basic/inc/basic/sbx.hxx | 4 | ||||
-rw-r--r-- | basic/source/classes/propacc.cxx | 8 | ||||
-rw-r--r-- | basic/source/runtime/methods1.cxx | 9 | ||||
-rw-r--r-- | basic/source/sbx/sbxobj.cxx | 80 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbahelper.cxx | 152 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbashapes.cxx | 11 |
6 files changed, 0 insertions, 264 deletions
diff --git a/basic/inc/basic/sbx.hxx b/basic/inc/basic/sbx.hxx index 5f754159ba23..8f14e1aad846 100644 --- a/basic/inc/basic/sbx.hxx +++ b/basic/inc/basic/sbx.hxx @@ -77,11 +77,7 @@ struct SbxParamInfo ~SbxParamInfo() {} }; -//#if 0 // _SOLAR__PRIVATE SV_DECL_PTRARR_DEL(SbxParams,SbxParamInfo*,4,4) -//#else -//typedef SvPtrarr SbxParams; -//#endif #endif diff --git a/basic/source/classes/propacc.cxx b/basic/source/classes/propacc.cxx index 66b3f4984d7e..2c01c49f814c 100644 --- a/basic/source/classes/propacc.cxx +++ b/basic/source/classes/propacc.cxx @@ -392,15 +392,7 @@ void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite // Get class names of struct String aServiceName( RTL_CONSTASCII_USTRINGPARAM("stardiv.uno.beans.PropertySet") ); -#if 0 - // search service and instantiate - Reference< XMultiServiceFactory > xServiceManager = getProcessServiceFactory(); - Reference< XInterface > xInterface; - if( xProv.is() ) - xInterface = xProv->newInstance(); -#else Reference< XInterface > xInterface = (OWeakObject*) new SbPropertyValues(); -#endif SbxVariableRef refVar = rPar.Get(0); if( xInterface.is() ) diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 5fe4ffbaa2ec..73c40c0cbeb6 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -534,15 +534,6 @@ RTLFUNC(DoEvents) // don't undstand what upstream are up to // we already process application events etc. in between // basic runtime pcode ( on a timed basis ) -#if 0 - // Dummy implementation as the following code leads - // to performance problems for unknown reasons - //Timer aTimer; - //aTimer.SetTimeout( 1 ); - //aTimer.Start(); - //while ( aTimer.IsActive() ) - // Application::Reschedule(); -#endif // always return 0 rPar.Get(0)->PutInteger( 0 ); } diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index a611c7d9134f..afa2f9a8b931 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -1062,86 +1062,6 @@ void SbxObject::GarbageCollection( ULONG nObjects ) */ { - (void)nObjects; - - static BOOL bInGarbageCollection = FALSE; - if ( bInGarbageCollection ) - return; - bInGarbageCollection = TRUE; - -#if 0 - // erstes Object dieser Runde anspringen - BOOL bAll = !nObjects; - if ( bAll ) - rObjects.First(); - SbxObject *pObj = rObjects.GetCurObject(); - if ( !pObj ) - pObj = rObjects.First(); - - while ( pObj && 0 != nObjects-- ) - { - // hat der Parent nur noch 1 Ref-Count? - SbxObject *pParent = PTR_CAST( SbxObject, pObj->GetParent() ); - if ( pParent && 1 == pParent->GetRefCount() ) - { - // dann alle Properies des Objects durchsuchen - SbxArray *pProps = pObj->GetProperties(); - for ( USHORT n = 0; n < pProps->Count(); ++n ) - { - // verweist die Property auf den Parent des Object? - SbxVariable *pProp = pProps->Get(n); - const SbxValues &rValues = pProp->GetValues_Impl(); - if ( SbxOBJECT == rValues.eType && - pParent == rValues.pObj ) - { -#ifdef DBG_UTIL - DbgOutf( "SBX: %s.%s with Object %s was garbage", - pObj->GetName().GetStr(), - pProp->GetName().GetStr(), - pParent->GetName().GetStr() ); -#endif - // dann freigeben - pProp->SbxValue::Clear(); - Sound::Beep(); - break; - } - } - } - - // zum n"achsten - pObj = rObjects.Next(); - if ( !bAll && !pObj ) - pObj = rObjects.First(); - } -#endif - -// AB 28.10. Zur 507a vorerst raus, da SfxBroadcaster::Enable() wegfaellt -#if 0 -#ifdef DBG_UTIL - SbxVarList_Impl &rVars = GetSbxData_Impl()->aVars; - DbgOutf( "SBX: garbage collector done, %lu objects remainding", - rVars.Count() ); - if ( rVars.Count() > 200 && rVars.Count() < 210 ) - { - SvFileStream aStream( "d:\\tmp\\dump.sbx", STREAM_STD_WRITE ); - SfxBroadcaster::Enable(FALSE); - for ( ULONG n = 0; n < rVars.Count(); ++n ) - { - SbxVariable *pVar = rVars.GetObject(n); - SbxObject *pObj = PTR_CAST(SbxObject, pVar); - USHORT nFlags = pVar->GetFlags(); - pVar->SetFlag(SBX_NO_BROADCAST); - if ( pObj ) - pObj->Dump(aStream); - else if ( !pVar->GetParent() || !pVar->GetParent()->ISA(SbxObject) ) - pVar->Dump(aStream); - pVar->SetFlags(nFlags); - } - SfxBroadcaster::Enable(TRUE); - } -#endif -#endif - bInGarbageCollection = FALSE; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index acf07bec794a..a601d24eee02 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -119,158 +119,6 @@ nViewNo && !pView->GetObjectShell()->IsInPlaceActive() ) } return false; } -#if 0 -namespace excel // all in this namespace probably can be moved to sc -{ - - -const ::rtl::OUString REPLACE_CELLS_WARNING( RTL_CONSTASCII_USTRINGPARAM( "ReplaceCellsWarning")); -class PasteCellsWarningReseter -{ -private: - bool bInitialWarningState; - static uno::Reference< beans::XPropertySet > getGlobalSheetSettings() throw ( uno::RuntimeException ) - { - static uno::Reference< beans::XPropertySet > xTmpProps( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW ); - static uno::Reference<uno::XComponentContext > xContext( xTmpProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), uno::UNO_QUERY_THROW ); - static uno::Reference<lang::XMultiComponentFactory > xServiceManager( - xContext->getServiceManager(), uno::UNO_QUERY_THROW ); - static uno::Reference< beans::XPropertySet > xProps( xServiceManager->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sheet.GlobalSheetSettings" ) ) ,xContext ), uno::UNO_QUERY_THROW ); - return xProps; - } - - bool getReplaceCellsWarning() throw ( uno::RuntimeException ) - { - sal_Bool res = sal_False; - getGlobalSheetSettings()->getPropertyValue( REPLACE_CELLS_WARNING ) >>= res; - return ( res == sal_True ); - } - - void setReplaceCellsWarning( bool bState ) throw ( uno::RuntimeException ) - { - getGlobalSheetSettings()->setPropertyValue( REPLACE_CELLS_WARNING, uno::makeAny( bState ) ); - } -public: - PasteCellsWarningReseter() throw ( uno::RuntimeException ) - { - bInitialWarningState = getReplaceCellsWarning(); - if ( bInitialWarningState ) - setReplaceCellsWarning( false ); - } - ~PasteCellsWarningReseter() - { - if ( bInitialWarningState ) - { - // don't allow dtor to throw - try - { - setReplaceCellsWarning( true ); - } - catch ( uno::Exception& /*e*/ ){} - } - } -}; - -void -implnPaste() -{ - PasteCellsWarningReseter resetWarningBox; - ScTabViewShell* pViewShell = getCurrentBestViewShell(); - if ( pViewShell ) - { - pViewShell->PasteFromSystem(); - pViewShell->CellContentChanged(); - } -} - - -void -implnCopy() -{ - ScTabViewShell* pViewShell = getCurrentBestViewShell(); - if ( pViewShell ) - pViewShell->CopyToClip(NULL,false,false,true); -} - -void -implnCut() -{ - ScTabViewShell* pViewShell = getCurrentBestViewShell(); - if ( pViewShell ) - pViewShell->CutToClip( NULL, TRUE ); -} -void implnPasteSpecial(SfxViewShell* pViewShell, USHORT nFlags,USHORT nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose) -{ - PasteCellsWarningReseter resetWarningBox; - sal_Bool bAsLink(sal_False), bOtherDoc(sal_False); - InsCellCmd eMoveMode = INS_NONE; - - if ( !pTabViewShell ) - // none active, try next best - pTabViewShell = getCurrentBestViewShell(); - if ( pTabViewShell ) - { - ScViewData* pView = pTabViewShell->GetViewData(); - Window* pWin = ( pView != NULL ) ? pView->GetActiveWin() : NULL; - if ( pView && pWin ) - { - if ( bAsLink && bOtherDoc ) - pTabViewShell->PasteFromSystem(0);//SOT_FORMATSTR_ID_LINK - else - { - ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin ); - ScDocument* pDoc = NULL; - if ( pOwnClip ) - pDoc = pOwnClip->GetDocument(); - pTabViewShell->PasteFromClip( nFlags, pDoc, - nFunction, bSkipEmpty, bTranspose, bAsLink, - eMoveMode, IDF_NONE, TRUE ); - pTabViewShell->CellContentChanged(); - } - } - } - -} - -ScDocShell* -getDocShell( css::uno::Reference< css::frame::XModel>& xModel ) -{ - uno::Reference< uno::XInterface > xIf( xModel, uno::UNO_QUERY_THROW ); - ScModelObj* pModel = dynamic_cast< ScModelObj* >( xIf.get() ); - ScDocShell* pDocShell = NULL; - if ( pModel ) - pDocShell = (ScDocShell*)pModel->GetEmbeddedObject(); - return pDocShell; - -} - -ScTabViewShell* -getBestViewShell( css::uno::Reference< css::frame::XModel>& xModel ) -{ - ScDocShell* pDocShell = getDocShell( xModel ); - if ( pDocShell ) - return pDocShell->GetBestViewShell(); - return NULL; -} - -ScTabViewShell* -getCurrentBestViewShell() -{ - uno::Reference< frame::XModel > xModel = getCurrentDocument(); - return getBestViewShell( xModel ); -} - -SfxViewFrame* -getCurrentViewFrame() -{ - ScTabViewShell* pViewShell = getCurrentBestViewShell(); - if ( pViewShell ) - return pViewShell->GetViewFrame(); - return NULL; -} -}; - -#endif uno::Reference< beans::XIntrospectionAccess > getIntrospectionAccess( const uno::Any& aObject ) throw (uno::RuntimeException) diff --git a/vbahelper/source/vbahelper/vbashapes.cxx b/vbahelper/source/vbahelper/vbashapes.cxx index 94fea1c9e084..a748906d4b78 100644 --- a/vbahelper/source/vbahelper/vbashapes.cxx +++ b/vbahelper/source/vbahelper/vbashapes.cxx @@ -477,15 +477,4 @@ ScVbaShapes::createName( rtl::OUString sName ) return sName; } -#if 0 -//TODO helperapi using a writer document -awt::Point -calculateTopLeftMargin( uno::Reference< XHelperInterface > xDocument ) -{ - awt::Point aPoint( 0, 0 ); - uno::Reference< frame::XModel > xModel( xDocument, uno::UNO_QUERY_THROW ); - return awt::Point(); -} -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |