diff options
author | Pierre-André Jacquod <pjacquod@alumni.ethz.ch> | 2010-11-20 22:39:30 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2010-11-21 10:28:10 +0100 |
commit | 363eacd7aa50fd5011490a16d22185f218f538dc (patch) | |
tree | 2fa885a2e31b5554094ce82ea5297f644633f7a6 | |
parent | 371e995a70c203ef34b869ce703c3dd428177a11 (diff) |
remove dead code in calc ui vbremove dead code in calc ui vbaa
-rw-r--r-- | sc/source/ui/vba/service.cxx | 25 | ||||
-rw-r--r-- | sc/source/ui/vba/vbarange.cxx | 17 |
2 files changed, 1 insertions, 41 deletions
diff --git a/sc/source/ui/vba/service.cxx b/sc/source/ui/vba/service.cxx index 036f0d3cf639..05dc4ab91820 100644 --- a/sc/source/ui/vba/service.cxx +++ b/sc/source/ui/vba/service.cxx @@ -89,35 +89,10 @@ extern "C" lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) { OSL_TRACE("In component_writeInfo"); -#if 0 - // Component registration - if ( component_writeInfoHelper( pServiceManager, pRegistryKey, - range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl ) && component_writeInfoHelper( pServiceManager, pRegistryKey, vbaeventshelper::serviceDecl ) ) - { - // Singleton registration - try - { - registry::XRegistryKey * pKey = - reinterpret_cast< registry::XRegistryKey * >(pRegistryKey); - Reference< registry::XRegistryKey >xKey = pKey->createKey( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ("ooo.vba.Globals/UNO/SINGLETONS/ooo.vba.theGlobals") )) ); - xKey->setStringValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - ("ooo.vba.Globals") )) ); - return sal_True; - } - catch( uno::Exception& /*e*/ ) - { - //recomp & friends will detect false returned and fail - } - } - return sal_False; -#else // Component registration return component_writeInfoHelper( pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl ) && component_writeInfoHelper( pServiceManager, pRegistryKey, vbaeventshelper::serviceDecl, textframe::serviceDecl ); -#endif - } SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index a47069b26c93..da141c3f8074 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -3071,7 +3071,7 @@ ScVbaRange::Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replace } // sanity check required params - if ( !What.getLength() /*|| !Replacement.getLength()*/ ) + if ( !What.getLength() ) throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, missing params" )) , uno::Reference< uno::XInterface >() ); rtl::OUString sWhat = VBAToRegexp( What); // #TODO #FIXME SearchFormat & ReplacesFormat are not processed @@ -3425,15 +3425,6 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any& // 2) #TODO #FIXME need to refactor this ( below ) into a IsSingleCell() method uno::Reference< table::XColumnRowRange > xColumnRowRange(mxRange, uno::UNO_QUERY_THROW ); - // 'Fraid I don't remember what I was trying to achieve here ??? -/* - if ( isSingleCellRange() ) - { - uno::Reference< XRange > xCurrent = CurrentRegion(); - xCurrent->Sort( Key1, Order1, Key2, Type, Order2, Key3, Order3, Header, OrderCustom, MatchCase, Orientation, SortMethod, DataOption1, DataOption2, DataOption3 ); - return; - } -*/ // set up defaults sal_Int16 nOrder1 = aSortParam.bAscending[0] ? excel::XlSortOrder::xlAscending : excel::XlSortOrder::xlDescending; @@ -5205,12 +5196,6 @@ void ScVbaRange::setShowDetail(const uno::Any& aShowDetail) throw ( css::uno::Ru ::com::sun::star::uno::Reference< ::ooo::vba::excel::XQueryTable > SAL_CALL ScVbaRange::getQueryTable() throw (::com::sun::star::uno::RuntimeException) { - /* - if (m_pQueryTable == NULL) - { - m_pQueryTable = new ScVbaQueryTable(mxParent ,mxContext, getScDocument(), this); //add by limingl - } - //*/ if (!m_xQueryTable.is()) { m_xQueryTable = new ScVbaQueryTable(mxParent ,mxContext, getScDocument(), this); //add by limingl |