From 83e191e25da8a508a2dafad339c0ee58e97c5c8b Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 12 Dec 2013 11:09:57 +0100 Subject: Do not use C++-UNO internal static_type functions in client code ...use cppu::UnoType instead. Change-Id: I507914b30ef8acda910ee4ecc0589fd328eb6f31 --- sc/source/ui/vba/vbaaxes.cxx | 4 ++-- sc/source/ui/vba/vbaborders.cxx | 4 ++-- sc/source/ui/vba/vbachartobjects.cxx | 2 +- sc/source/ui/vba/vbacomments.cxx | 2 +- sc/source/ui/vba/vbaformatconditions.cxx | 2 +- sc/source/ui/vba/vbahyperlinks.cxx | 4 ++-- sc/source/ui/vba/vbamenubars.cxx | 2 +- sc/source/ui/vba/vbamenuitems.cxx | 2 +- sc/source/ui/vba/vbamenus.cxx | 2 +- sc/source/ui/vba/vbanames.cxx | 2 +- sc/source/ui/vba/vbaoleobjects.cxx | 4 ++-- sc/source/ui/vba/vbapagebreaks.cxx | 8 ++++---- sc/source/ui/vba/vbapivottables.cxx | 2 +- sc/source/ui/vba/vbarange.cxx | 6 +++--- sc/source/ui/vba/vbarange.hxx | 2 +- sc/source/ui/vba/vbasheetobjects.cxx | 4 ++-- sc/source/ui/vba/vbastyles.cxx | 2 +- sc/source/ui/vba/vbawindow.cxx | 2 +- sc/source/ui/vba/vbawindows.cxx | 4 ++-- sc/source/ui/vba/vbaworkbooks.cxx | 2 +- sc/source/ui/vba/vbaworksheets.cxx | 4 ++-- 21 files changed, 33 insertions(+), 33 deletions(-) (limited to 'sc/source/ui/vba') diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx index f04b6885826e..c9205c69aecb 100644 --- a/sc/source/ui/vba/vbaaxes.cxx +++ b/sc/source/ui/vba/vbaaxes.cxx @@ -121,7 +121,7 @@ public: // XElementAccess virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException) { - return excel::XAxis::static_type(0); + return cppu::UnoType::get(); } virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) { @@ -142,7 +142,7 @@ ScVbaAxes::ScVbaAxes( const uno::Reference< XHelperInterface >& xParent,const un uno::Type SAL_CALL ScVbaAxes::getElementType() throw (css::uno::RuntimeException) { - return excel::XAxes::static_type(0); + return cppu::UnoType::get(); } uno::Reference< container::XEnumeration > SAL_CALL diff --git a/sc/source/ui/vba/vbaborders.cxx b/sc/source/ui/vba/vbaborders.cxx index 15e695a99dd0..0786ee61bfff 100644 --- a/sc/source/ui/vba/vbaborders.cxx +++ b/sc/source/ui/vba/vbaborders.cxx @@ -339,7 +339,7 @@ public: } virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { - return excel::XBorder::static_type(0); + return cppu::UnoType::get(); } virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) { @@ -395,7 +395,7 @@ ScVbaBorders::createCollectionObject( const css::uno::Any& aSource ) uno::Type ScVbaBorders::getElementType() throw (uno::RuntimeException) { - return excel::XBorders::static_type(0); + return cppu::UnoType::get(); } uno::Any diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx index 2494edbb9bbc..c9c22ca5090a 100644 --- a/sc/source/ui/vba/vbachartobjects.cxx +++ b/sc/source/ui/vba/vbachartobjects.cxx @@ -153,7 +153,7 @@ ScVbaChartObjects::createEnumeration() throw (uno::RuntimeException) uno::Type ScVbaChartObjects::getElementType() throw (uno::RuntimeException) { - return excel::XChartObject::static_type(0); + return cppu::UnoType::get(); } // ScVbaCollectionBaseImpl diff --git a/sc/source/ui/vba/vbacomments.cxx b/sc/source/ui/vba/vbacomments.cxx index 8495298e8103..0d9399ba19e1 100644 --- a/sc/source/ui/vba/vbacomments.cxx +++ b/sc/source/ui/vba/vbacomments.cxx @@ -85,7 +85,7 @@ ScVbaComments::createCollectionObject( const css::uno::Any& aSource ) uno::Type ScVbaComments::getElementType() throw (uno::RuntimeException) { - return excel::XComment::static_type(0); + return cppu::UnoType::get(); } OUString diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx index eb61eed6dc98..9c5f75b4eb38 100644 --- a/sc/source/ui/vba/vbaformatconditions.cxx +++ b/sc/source/ui/vba/vbaformatconditions.cxx @@ -63,7 +63,7 @@ ScVbaFormatConditions::Delete( ) throw (script::BasicErrorException, uno::Runti uno::Type SAL_CALL ScVbaFormatConditions::getElementType() throw (css::uno::RuntimeException) { - return excel::XFormatCondition::static_type(0); + return cppu::UnoType::get(); } diff --git a/sc/source/ui/vba/vbahyperlinks.cxx b/sc/source/ui/vba/vbahyperlinks.cxx index dc93fc3357db..52f27ffce710 100644 --- a/sc/source/ui/vba/vbahyperlinks.cxx +++ b/sc/source/ui/vba/vbahyperlinks.cxx @@ -177,7 +177,7 @@ uno::Any SAL_CALL ScVbaHlinkContainer::getByIndex( sal_Int32 nIndex ) uno::Type SAL_CALL ScVbaHlinkContainer::getElementType() throw (uno::RuntimeException) { - return excel::XHyperlink::static_type( 0 ); + return cppu::UnoType::get(); } sal_Bool SAL_CALL ScVbaHlinkContainer::hasElements() throw (uno::RuntimeException) @@ -266,7 +266,7 @@ uno::Reference< container::XEnumeration > SAL_CALL ScVbaHyperlinks::createEnumer uno::Type SAL_CALL ScVbaHyperlinks::getElementType() throw (uno::RuntimeException) { - return excel::XHyperlink::static_type( 0 ); + return cppu::UnoType::get(); } // ScVbaCollectionBase -------------------------------------------------------- diff --git a/sc/source/ui/vba/vbamenubars.cxx b/sc/source/ui/vba/vbamenubars.cxx index fff62a12cae0..7e0415bd0576 100644 --- a/sc/source/ui/vba/vbamenubars.cxx +++ b/sc/source/ui/vba/vbamenubars.cxx @@ -55,7 +55,7 @@ ScVbaMenuBars::~ScVbaMenuBars() uno::Type SAL_CALL ScVbaMenuBars::getElementType() throw ( uno::RuntimeException ) { - return excel::XMenuBar::static_type( 0 ); + return cppu::UnoType::get(); } uno::Reference< container::XEnumeration > diff --git a/sc/source/ui/vba/vbamenuitems.cxx b/sc/source/ui/vba/vbamenuitems.cxx index 5cb13ea5074a..80e580c8569c 100644 --- a/sc/source/ui/vba/vbamenuitems.cxx +++ b/sc/source/ui/vba/vbamenuitems.cxx @@ -62,7 +62,7 @@ ScVbaMenuItems::ScVbaMenuItems( const uno::Reference< XHelperInterface >& xParen uno::Type SAL_CALL ScVbaMenuItems::getElementType() throw ( uno::RuntimeException ) { - return excel::XMenuItem::static_type( 0 ); + return cppu::UnoType::get(); } uno::Reference< container::XEnumeration > diff --git a/sc/source/ui/vba/vbamenus.cxx b/sc/source/ui/vba/vbamenus.cxx index 6fbe213ec82d..39ee2c39219e 100644 --- a/sc/source/ui/vba/vbamenus.cxx +++ b/sc/source/ui/vba/vbamenus.cxx @@ -56,7 +56,7 @@ ScVbaMenus::ScVbaMenus( const uno::Reference< XHelperInterface >& xParent, const uno::Type SAL_CALL ScVbaMenus::getElementType() throw ( uno::RuntimeException ) { - return excel::XMenu::static_type( 0 ); + return cppu::UnoType::get(); } uno::Reference< container::XEnumeration > diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx index c3001c4b7789..d274fb04d5cb 100644 --- a/sc/source/ui/vba/vbanames.cxx +++ b/sc/source/ui/vba/vbanames.cxx @@ -235,7 +235,7 @@ ScVbaNames::Add( const css::uno::Any& Name , css::uno::Type ScVbaNames::getElementType() throw( css::uno::RuntimeException ) { - return ov::excel::XName::static_type(0); + return cppu::UnoType::get(); } uno::Reference< container::XEnumeration > diff --git a/sc/source/ui/vba/vbaoleobjects.cxx b/sc/source/ui/vba/vbaoleobjects.cxx index e1264c31c2f7..d4c5215358fc 100644 --- a/sc/source/ui/vba/vbaoleobjects.cxx +++ b/sc/source/ui/vba/vbaoleobjects.cxx @@ -61,7 +61,7 @@ public: // Methods XElementAcess virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException) { - return drawing::XControlShape::static_type(0); + return cppu::UnoType::get(); } virtual ::sal_Bool SAL_CALL hasElements() throw (uno::RuntimeException) @@ -155,7 +155,7 @@ ScVbaOLEObjects::getItemByStringIndex( const OUString& sIndex ) throw (uno::Runt uno::Type ScVbaOLEObjects::getElementType() throw (uno::RuntimeException) { - return ooo::vba::excel::XOLEObject::static_type(0); + return cppu::UnoType::get(); } OUString diff --git a/sc/source/ui/vba/vbapagebreaks.cxx b/sc/source/ui/vba/vbapagebreaks.cxx index 6a7a522c87e3..285a8f1d3962 100644 --- a/sc/source/ui/vba/vbapagebreaks.cxx +++ b/sc/source/ui/vba/vbapagebreaks.cxx @@ -80,8 +80,8 @@ public: virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { if( m_bColumn ) - return excel::XVPageBreak::static_type(0); - return excel::XHPageBreak::static_type(0); + return cppu::UnoType::get(); + return cppu::UnoType::get(); } virtual sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) { @@ -232,7 +232,7 @@ ScVbaHPageBreaks::createCollectionObject( const css::uno::Any& aSource ) uno::Type ScVbaHPageBreaks::getElementType() throw (uno::RuntimeException) { - return excel::XHPageBreak::static_type(0); + return cppu::UnoType::get(); } OUString @@ -292,7 +292,7 @@ ScVbaVPageBreaks::createCollectionObject( const css::uno::Any& aSource ) uno::Type ScVbaVPageBreaks::getElementType() throw ( uno::RuntimeException ) { - return excel::XVPageBreak::static_type( 0 ); + return cppu::UnoType::get(); } OUString diff --git a/sc/source/ui/vba/vbapivottables.cxx b/sc/source/ui/vba/vbapivottables.cxx index 511786e8028d..6ad471f13814 100644 --- a/sc/source/ui/vba/vbapivottables.cxx +++ b/sc/source/ui/vba/vbapivottables.cxx @@ -63,7 +63,7 @@ ScVbaPivotTables::createCollectionObject( const css::uno::Any& aSource ) uno::Type ScVbaPivotTables::getElementType() throw (uno::RuntimeException) { - return excel::XPivotTable::static_type(0); + return cppu::UnoType::get(); } OUString diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 1b9f6e8b8b4f..e5b8e81e2435 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -330,7 +330,7 @@ public: return uno::makeAny( m_xRange ); } // XElementAccess - virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException){ return table::XCellRange::static_type(0); } + virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException){ return cppu::UnoType::get(); } virtual ::sal_Bool SAL_CALL hasElements() throw (uno::RuntimeException) { return sal_True; } // XEnumerationAccess @@ -365,7 +365,7 @@ public: virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration() throw (uno::RuntimeException); // XElementAccess - virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException){ return excel::XRange::static_type(0); } + virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException){ return cppu::UnoType::get(); } virtual uno::Any createCollectionObject( const uno::Any& aSource ); @@ -3321,7 +3321,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L uno::Reference< table::XCellRange > processKey( const uno::Any& Key, uno::Reference< uno::XComponentContext >& xContext, ScDocShell* pDocSh ) { uno::Reference< excel::XRange > xKeyRange; - if ( Key.getValueType() == excel::XRange::static_type() ) + if ( Key.getValueType() == cppu::UnoType::get() ) { xKeyRange.set( Key, uno::UNO_QUERY_THROW ); } diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx index 9f1166a4cb9f..25074be48989 100644 --- a/sc/source/ui/vba/vbarange.hxx +++ b/sc/source/ui/vba/vbarange.hxx @@ -268,7 +268,7 @@ public: // XElementAccess virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException) { - return ov::excel::XRange::static_type(0); + return cppu::UnoType::get(); } virtual sal_Bool SAL_CALL hasElements() throw (css::uno::RuntimeException); diff --git a/sc/source/ui/vba/vbasheetobjects.cxx b/sc/source/ui/vba/vbasheetobjects.cxx index b542a666b1c9..c2244873e84b 100644 --- a/sc/source/ui/vba/vbasheetobjects.cxx +++ b/sc/source/ui/vba/vbasheetobjects.cxx @@ -219,7 +219,7 @@ uno::Any SAL_CALL ScVbaObjectContainer::getByIndex( sal_Int32 nIndex ) uno::Type SAL_CALL ScVbaObjectContainer::getElementType() throw (uno::RuntimeException) { - return drawing::XShape::static_type( 0 ); + return cppu::UnoType::get(); } sal_Bool SAL_CALL ScVbaObjectContainer::hasElements() throw (uno::RuntimeException) @@ -482,7 +482,7 @@ ScVbaButtonContainer::ScVbaButtonContainer( const uno::Reference< sheet::XSpreadsheet >& rxSheet ) throw (uno::RuntimeException) : ScVbaControlContainer( rxParent, rxContext, rxModel, rxSheet, - excel::XButton::static_type( 0 ), + cppu::UnoType::get(), "com.sun.star.form.component.CommandButton", form::FormComponentType::COMMANDBUTTON ) { diff --git a/sc/source/ui/vba/vbastyles.cxx b/sc/source/ui/vba/vbastyles.cxx index ffd1891c5196..cdb60d9ddf4d 100644 --- a/sc/source/ui/vba/vbastyles.cxx +++ b/sc/source/ui/vba/vbastyles.cxx @@ -62,7 +62,7 @@ ScVbaStyles::createCollectionObject(const uno::Any& aObject) uno::Type SAL_CALL ScVbaStyles::getElementType() throw (uno::RuntimeException) { - return excel::XStyle::static_type(0); + return cppu::UnoType::get(); } class EnumWrapper : public EnumerationHelper_BASE diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index 9aa8f2311b1a..67b5c3aebb27 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -150,7 +150,7 @@ public: //XElementAccess virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { - return excel::XWorksheet::static_type(0); + return cppu::UnoType::get(); } virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx index f50c0104f36d..f812d11b15db 100644 --- a/sc/source/ui/vba/vbawindows.cxx +++ b/sc/source/ui/vba/vbawindows.cxx @@ -159,7 +159,7 @@ public: //XElementAccess virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { - return sheet::XSpreadsheetDocument::static_type(0); + return cppu::UnoType::get(); } virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) @@ -214,7 +214,7 @@ ScVbaWindows::createCollectionObject( const css::uno::Any& aSource ) uno::Type ScVbaWindows::getElementType() throw (uno::RuntimeException) { - return excel::XWindows::static_type(0); + return cppu::UnoType::get(); } diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx index 7625b11b71ef..8dc38770a507 100644 --- a/sc/source/ui/vba/vbaworkbooks.cxx +++ b/sc/source/ui/vba/vbaworkbooks.cxx @@ -169,7 +169,7 @@ ScVbaWorkbooks::ScVbaWorkbooks( const uno::Reference< XHelperInterface >& xParen uno::Type ScVbaWorkbooks::getElementType() throw (uno::RuntimeException) { - return excel::XWorkbook::static_type(0); + return cppu::UnoType::get(); } uno::Reference< container::XEnumeration > ScVbaWorkbooks::createEnumeration() throw (uno::RuntimeException) diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx index b8332af98a44..0eb7c4af24b4 100644 --- a/sc/source/ui/vba/vbaworksheets.cxx +++ b/sc/source/ui/vba/vbaworksheets.cxx @@ -89,7 +89,7 @@ class SheetCollectionHelper : public SheetCollectionHelper_BASE public: SheetCollectionHelper( const SheetMap& sMap ) : mSheetMap( sMap ), cachePos(mSheetMap.begin()) {} // XElementAccess - virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { return sheet::XSpreadsheet::static_type(0); } + virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { return cppu::UnoType::get(); } virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) { return ( !mSheetMap.empty() ); } // XNameAcess virtual uno::Any SAL_CALL getByName( const OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) @@ -179,7 +179,7 @@ ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< XHelperInterface >& xPar uno::Type ScVbaWorksheets::getElementType() throw (uno::RuntimeException) { - return excel::XWorksheet::static_type(0); + return cppu::UnoType::get(); } uno::Reference< container::XEnumeration > -- cgit