diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-05-03 13:37:34 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-05-03 17:00:25 +0200 |
commit | 87d368642c536880bd313a5993c30bfb9c250e9d (patch) | |
tree | 011acddd941394347de1bac4a393f2284d14d545 /toolkit | |
parent | 8bf380f7d33f39eaa4cb96b38a82ac18e589deef (diff) |
Just use Any ctor instead of makeAny in toolkit
Change-Id: I55115f115e98b00e199007da5c6d9ea44cf2bab0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133756
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/awt/vclxwindows.cxx | 9 | ||||
-rw-r--r-- | toolkit/source/controls/animatedimages.cxx | 16 | ||||
-rw-r--r-- | toolkit/source/controls/controlmodelcontainerbase.cxx | 16 | ||||
-rw-r--r-- | toolkit/source/controls/dialogcontrol.cxx | 34 | ||||
-rw-r--r-- | toolkit/source/controls/formattedcontrol.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/grid/gridcolumn.hxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/grid/gridcontrol.cxx | 18 | ||||
-rw-r--r-- | toolkit/source/controls/tabpagecontainer.cxx | 6 | ||||
-rw-r--r-- | toolkit/source/controls/tkscrollbar.cxx | 16 | ||||
-rw-r--r-- | toolkit/source/controls/tkspinbutton.cxx | 24 | ||||
-rw-r--r-- | toolkit/source/controls/tree/treecontrol.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrolcontainer.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrols.cxx | 36 | ||||
-rw-r--r-- | toolkit/source/hatchwindow/documentcloser.cxx | 2 |
14 files changed, 92 insertions, 93 deletions
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 761cd10c2674..03de455a3feb 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -68,7 +68,6 @@ using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Reference; -using ::com::sun::star::uno::makeAny; using ::com::sun::star::uno::RuntimeException; using ::com::sun::star::lang::EventObject; using ::com::sun::star::awt::ItemListEvent; @@ -157,7 +156,7 @@ namespace toolkit Any getButtonLikeFaceColor( const vcl::Window* _pWindow ) { Color nBackgroundColor = _pWindow->GetSettings().GetStyleSettings().GetFaceColor(); - return makeAny( sal_Int32(nBackgroundColor) ); + return Any( sal_Int32(nBackgroundColor) ); } static void adjustBooleanWindowStyle( const Any& _rValue, vcl::Window* _pWindow, WinBits _nBits, bool _bInverseSemantics ) @@ -2679,8 +2678,8 @@ uno::Sequence< beans::NamedValue > SAL_CALL VCLXMultiPage::getTabProps( sal_Int3 uno::Sequence< beans::NamedValue > props { - { "Title", css::uno::makeAny(pTabControl->GetPageText( sal::static_int_cast< sal_uInt16 >( ID ) )) }, - { "Position", css::uno::makeAny(pTabControl->GetPagePos( sal::static_int_cast< sal_uInt16 >( ID ) )) } + { "Title", css::uno::Any(pTabControl->GetPageText( sal::static_int_cast< sal_uInt16 >( ID ) )) }, + { "Position", css::uno::Any(pTabControl->GetPagePos( sal::static_int_cast< sal_uInt16 >( ID ) )) } }; return props; } @@ -6888,7 +6887,7 @@ void SVTXFormattedField::setProperty( const OUString& PropertyName, const css::u sal_Int32 nValue = 0; if (!(Value >>= nValue)) throw css::lang::IllegalArgumentException(); - SetValue(css::uno::makeAny(static_cast<double>(nValue))); + SetValue(css::uno::Any(static_cast<double>(nValue))); break; } diff --git a/toolkit/source/controls/animatedimages.cxx b/toolkit/source/controls/animatedimages.cxx index 8626bdd45156..99fd5df859ae 100644 --- a/toolkit/source/controls/animatedimages.cxx +++ b/toolkit/source/controls/animatedimages.cxx @@ -315,19 +315,19 @@ namespace toolkit { switch ( i_propertyId ) { case BASEPROPERTY_DEFAULTCONTROL: - return makeAny( OUString("com.sun.star.awt.AnimatedImagesControl") ); + return Any( OUString("com.sun.star.awt.AnimatedImagesControl") ); case BASEPROPERTY_BORDER: - return makeAny( css::awt::VisualEffect::NONE ); + return Any( css::awt::VisualEffect::NONE ); case BASEPROPERTY_STEP_TIME: - return makeAny( sal_Int32(100) ); + return Any( sal_Int32(100) ); case BASEPROPERTY_AUTO_REPEAT: - return makeAny( true ); + return Any( true ); case BASEPROPERTY_IMAGE_SCALE_MODE: - return makeAny( ImageScaleMode::NONE ); + return Any( ImageScaleMode::NONE ); default: return UnoControlModel::ImplGetDefaultValue( i_propertyId ); @@ -352,7 +352,7 @@ namespace toolkit { void SAL_CALL AnimatedImagesControlModel::setStepTime( ::sal_Int32 i_stepTime ) { - setPropertyValue( GetPropertyName( BASEPROPERTY_STEP_TIME ), makeAny( i_stepTime ) ); + setPropertyValue( GetPropertyName( BASEPROPERTY_STEP_TIME ), Any( i_stepTime ) ); } @@ -366,7 +366,7 @@ namespace toolkit { void SAL_CALL AnimatedImagesControlModel::setAutoRepeat( sal_Bool i_autoRepeat ) { - setPropertyValue( GetPropertyName( BASEPROPERTY_AUTO_REPEAT ), makeAny( i_autoRepeat ) ); + setPropertyValue( GetPropertyName( BASEPROPERTY_AUTO_REPEAT ), Any( i_autoRepeat ) ); } @@ -380,7 +380,7 @@ namespace toolkit { void SAL_CALL AnimatedImagesControlModel::setScaleMode( ::sal_Int16 i_scaleMode ) { - setPropertyValue( GetPropertyName( BASEPROPERTY_IMAGE_SCALE_MODE ), makeAny( i_scaleMode ) ); + setPropertyValue( GetPropertyName( BASEPROPERTY_IMAGE_SCALE_MODE ), Any( i_scaleMode ) ); } diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx index 6bc024cb6bfe..8cf401c1752b 100644 --- a/toolkit/source/controls/controlmodelcontainerbase.cxx +++ b/toolkit/source/controls/controlmodelcontainerbase.cxx @@ -481,7 +481,7 @@ Any ControlModelContainerBase::getByName( const OUString& aName ) if ( maModels.end() == aElementPos ) lcl_throwNoSuchElementException(); - return makeAny( aElementPos->first ); + return Any( aElementPos->first ); } Sequence< OUString > ControlModelContainerBase::getElementNames() @@ -598,7 +598,7 @@ void ControlModelContainerBase::removeByName( const OUString& aName ) { try { - xPS->setPropertyValue( PROPERTY_RESOURCERESOLVER, makeAny( Reference< resource::XStringResourceResolver >() ) ); + xPS->setPropertyValue( PROPERTY_RESOURCERESOLVER, Any( Reference< resource::XStringResourceResolver >() ) ); } catch (const Exception&) { @@ -648,7 +648,7 @@ void SAL_CALL ControlModelContainerBase::setControlModels( const Sequence< Refer if ( xProps.is() ) xPSI = xProps->getPropertySetInfo(); if ( xPSI.is() && xPSI->hasPropertyByName( getTabIndexPropertyName() ) ) - xProps->setPropertyValue( getTabIndexPropertyName(), makeAny( nTabIndex++ ) ); + xProps->setPropertyValue( getTabIndexPropertyName(), Any( nTabIndex++ ) ); } mbGroupsUpToDate = false; } @@ -744,7 +744,7 @@ void SAL_CALL ControlModelContainerBase::setEnabled( sal_Bool _enabled ) { SolarMutexGuard aGuard; Reference<XPropertySet> xThis(*this, UNO_QUERY); - xThis->setPropertyValue(GetPropertyName(BASEPROPERTY_ENABLED), makeAny(_enabled)); + xThis->setPropertyValue(GetPropertyName(BASEPROPERTY_ENABLED), Any(_enabled)); } OUString SAL_CALL ControlModelContainerBase::getTitle() { @@ -758,7 +758,7 @@ void SAL_CALL ControlModelContainerBase::setTitle( const OUString& _title ) { SolarMutexGuard aGuard; Reference<XPropertySet> xThis(*this,UNO_QUERY); - xThis->setPropertyValue(GetPropertyName(BASEPROPERTY_TITLE),makeAny(_title)); + xThis->setPropertyValue(GetPropertyName(BASEPROPERTY_TITLE),Any(_title)); } OUString SAL_CALL ControlModelContainerBase::getImageURL() { @@ -1788,7 +1788,7 @@ ControlModelContainerBase::updateUserFormChildren( const Reference< XNameContain // container control is being removed from this container, reset the // global list of containers if ( xProps.is() ) - xProps->setPropertyValue( GetPropertyName( BASEPROPERTY_USERFORMCONTAINEES ), uno::makeAny( uno::Reference< XNameContainer >() ) ); + xProps->setPropertyValue( GetPropertyName( BASEPROPERTY_USERFORMCONTAINEES ), uno::Any( uno::Reference< XNameContainer >() ) ); const Sequence< OUString > aChildNames = xChildContainer->getElementNames(); for ( const auto& rName : aChildNames ) updateUserFormChildren( xAllChildren, rName, Operation, Reference< XControlModel > () ); @@ -1796,7 +1796,7 @@ ControlModelContainerBase::updateUserFormChildren( const Reference< XNameContain } else if ( Operation == Insert ) { - xAllChildren->insertByName( aName, uno::makeAny( xTarget ) ); + xAllChildren->insertByName( aName, uno::Any( xTarget ) ); Reference< XNameContainer > xChildContainer( xTarget, UNO_QUERY ); if ( xChildContainer.is() ) { @@ -1804,7 +1804,7 @@ ControlModelContainerBase::updateUserFormChildren( const Reference< XNameContain // global list of containers to point to the correct global list Reference< XPropertySet > xProps( xChildContainer, UNO_QUERY ); if ( xProps.is() ) - xProps->setPropertyValue( GetPropertyName( BASEPROPERTY_USERFORMCONTAINEES ), uno::makeAny( xAllChildren ) ); + xProps->setPropertyValue( GetPropertyName( BASEPROPERTY_USERFORMCONTAINEES ), uno::Any( xAllChildren ) ); const Sequence< OUString > aChildNames = xChildContainer->getElementNames(); for ( const auto& rName : aChildNames ) { diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index 8c84ba6bb1ce..67ee3bcc6719 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -92,7 +92,7 @@ public: auto it = things.find( aName ); if ( it == things.end() ) throw NoSuchElementException(); - return uno::makeAny( it->second ); + return uno::Any( it->second ); } virtual Sequence< OUString > SAL_CALL getElementNames( ) override { @@ -197,7 +197,7 @@ UnoControlDialogModel::UnoControlDialogModel( const Reference< XComponentContext ImplRegisterProperty( BASEPROPERTY_CLOSEABLE, aBool ); // #TODO separate class for 'UserForm' ( instead of re-using Dialog ? ) uno::Reference< XNameContainer > xNameCont = new SimpleNamedThingContainer< XControlModel >; - ImplRegisterProperty( BASEPROPERTY_USERFORMCONTAINEES, uno::makeAny( xNameCont ) ); + ImplRegisterProperty( BASEPROPERTY_USERFORMCONTAINEES, uno::Any( xNameCont ) ); } UnoControlDialogModel::UnoControlDialogModel( const UnoControlDialogModel& rModel ) @@ -213,7 +213,7 @@ UnoControlDialogModel::UnoControlDialogModel( const UnoControlDialogModel& rMode if ( xSrcNameCont->hasByName( name ) ) xNameCont->insertByName( name, xSrcNameCont->getByName( name ) ); } - setFastPropertyValue_NoBroadcast( BASEPROPERTY_USERFORMCONTAINEES, makeAny( xNameCont ) ); + setFastPropertyValue_NoBroadcast( BASEPROPERTY_USERFORMCONTAINEES, Any( xNameCont ) ); } rtl::Reference<UnoControlModel> UnoControlDialogModel::Clone() const @@ -280,12 +280,12 @@ void SAL_CALL UnoControlDialogModel::setFastPropertyValue_NoBroadcast( sal_Int32 { setPropertyValue( GetPropertyName(BASEPROPERTY_GRAPHIC), - uno::makeAny(ImageHelper::getGraphicAndGraphicObjectFromURL_nothrow( + uno::Any(ImageHelper::getGraphicAndGraphicObjectFromURL_nothrow( mxGrfObj, sImageURL))); } else if (rValue >>= xGraphic) { - setPropertyValue("Graphic", uno::makeAny(xGraphic)); + setPropertyValue("Graphic", uno::Any(xGraphic)); } } } @@ -416,9 +416,9 @@ void UnoDialogControl::PrepareWindowDescriptor( css::awt::WindowDescriptor& rDes if (( ImplGetPropertyValue( PROPERTY_IMAGEURL ) >>= aImageURL ) && ( !aImageURL.isEmpty() )) { - OUString absoluteUrl = getPhysicalLocation(ImplGetPropertyValue(PROPERTY_DIALOGSOURCEURL), uno::makeAny(aImageURL)); + OUString absoluteUrl = getPhysicalLocation(ImplGetPropertyValue(PROPERTY_DIALOGSOURCEURL), uno::Any(aImageURL)); xGraphic = ImageHelper::getGraphicFromURL_nothrow( absoluteUrl ); - ImplSetPropertyValue( PROPERTY_GRAPHIC, uno::makeAny( xGraphic ), true ); + ImplSetPropertyValue( PROPERTY_GRAPHIC, uno::Any( xGraphic ), true ); } } @@ -631,10 +631,10 @@ void UnoDialogControl::ImplModelPropertiesChanged( const Sequence< PropertyChang if (( ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_IMAGEURL ) ) >>= aImageURL ) && ( !aImageURL.isEmpty() )) { - OUString absoluteUrl = getPhysicalLocation(ImplGetPropertyValue(GetPropertyName(BASEPROPERTY_DIALOGSOURCEURL)), uno::makeAny(aImageURL)); + OUString absoluteUrl = getPhysicalLocation(ImplGetPropertyValue(GetPropertyName(BASEPROPERTY_DIALOGSOURCEURL)), uno::Any(aImageURL)); xGraphic = ImageHelper::getGraphicFromURL_nothrow( absoluteUrl ); } - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_GRAPHIC), uno::makeAny( xGraphic ), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_GRAPHIC), uno::Any( xGraphic ), true ); break; } else if (bOwnModel && rEvt.PropertyName == "Graphic") @@ -642,7 +642,7 @@ void UnoDialogControl::ImplModelPropertiesChanged( const Sequence< PropertyChang uno::Reference<graphic::XGraphic> xGraphic; if (ImplGetPropertyValue("Graphic") >>= xGraphic) { - ImplSetPropertyValue("Graphic", uno::makeAny(xGraphic), true); + ImplSetPropertyValue("Graphic", uno::Any(xGraphic), true); } break; } @@ -675,7 +675,7 @@ void SAL_CALL UnoMultiPageControl::changed( SAL_UNUSED_PARAMETER ::sal_Int32, } void SAL_CALL UnoMultiPageControl::activated( ::sal_Int32 ID ) { - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_MULTIPAGEVALUE ), uno::makeAny( ID ), false ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_MULTIPAGEVALUE ), uno::Any( ID ), false ); } void SAL_CALL UnoMultiPageControl::deactivated( SAL_UNUSED_PARAMETER ::sal_Int32 ) @@ -722,7 +722,7 @@ void SAL_CALL UnoMultiPageControl::activateTab( ::sal_Int32 ID ) { Reference< XSimpleTabController > xMultiPage( getPeer(), UNO_QUERY_THROW ); xMultiPage->activateTab( ID ); - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_MULTIPAGEVALUE ), uno::makeAny( ID ), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_MULTIPAGEVALUE ), uno::Any( ID ), true ); } @@ -822,7 +822,7 @@ void UnoMultiPageControl::createPeer( const Reference< XToolkit > & rxToolkit, c if ( nActiveTab && aCtrls.hasElements() ) // Ensure peer is initialise with correct activated tab { xTabCntrl->activateTab( nActiveTab ); - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_MULTIPAGEVALUE ), uno::makeAny( nActiveTab ), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_MULTIPAGEVALUE ), uno::Any( nActiveTab ), true ); } } } @@ -870,7 +870,7 @@ UnoMultiPageModel::UnoMultiPageModel( const Reference< XComponentContext >& rxCo ImplRegisterProperty( BASEPROPERTY_TABSTOP, aBool ); uno::Reference< XNameContainer > xNameCont = new SimpleNamedThingContainer< XControlModel >; - ImplRegisterProperty( BASEPROPERTY_USERFORMCONTAINEES, uno::makeAny( xNameCont ) ); + ImplRegisterProperty( BASEPROPERTY_USERFORMCONTAINEES, uno::Any( xNameCont ) ); } UnoMultiPageModel::~UnoMultiPageModel() @@ -976,7 +976,7 @@ UnoPageModel::UnoPageModel( const Reference< XComponentContext >& rxContext ) : //ImplRegisterProperty( BASEPROPERTY_TABSTOP, aBool ); uno::Reference< XNameContainer > xNameCont = new SimpleNamedThingContainer< XControlModel >; - ImplRegisterProperty( BASEPROPERTY_USERFORMCONTAINEES, uno::makeAny( xNameCont ) ); + ImplRegisterProperty( BASEPROPERTY_USERFORMCONTAINEES, uno::Any( xNameCont ) ); } UnoPageModel::~UnoPageModel() @@ -1122,7 +1122,7 @@ UnoFrameModel::UnoFrameModel( const Reference< XComponentContext >& rxContext ) uno::Reference< XNameContainer > xNameCont = new SimpleNamedThingContainer< XControlModel >; - ImplRegisterProperty( BASEPROPERTY_USERFORMCONTAINEES, uno::makeAny( xNameCont ) ); + ImplRegisterProperty( BASEPROPERTY_USERFORMCONTAINEES, uno::Any( xNameCont ) ); } UnoFrameModel::~UnoFrameModel() @@ -1158,7 +1158,7 @@ uno::Any UnoFrameModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const case BASEPROPERTY_USERFORMCONTAINEES: { uno::Reference< XNameContainer > xNameCont = new SimpleNamedThingContainer< XControlModel >; - return makeAny( xNameCont ); + return Any( xNameCont ); } } return ControlModelContainerBase::ImplGetDefaultValue( nPropId ); diff --git a/toolkit/source/controls/formattedcontrol.cxx b/toolkit/source/controls/formattedcontrol.cxx index c4a8ad276d35..6bf71b5c59e3 100644 --- a/toolkit/source/controls/formattedcontrol.cxx +++ b/toolkit/source/controls/formattedcontrol.cxx @@ -200,7 +200,7 @@ namespace toolkit } Reference< XPropertySet > xThis( *this, UNO_QUERY ); - xThis->setPropertyValue( GetPropertyName( BASEPROPERTY_TEXT ), makeAny( sStringValue ) ); + xThis->setPropertyValue( GetPropertyName( BASEPROPERTY_TEXT ), Any( sStringValue ) ); } catch( const Exception& ) { diff --git a/toolkit/source/controls/grid/gridcolumn.hxx b/toolkit/source/controls/grid/gridcolumn.hxx index 3f082f63c9c5..8008c077d867 100644 --- a/toolkit/source/controls/grid/gridcolumn.hxx +++ b/toolkit/source/controls/grid/gridcolumn.hxx @@ -104,7 +104,7 @@ private: TYPE const aOldValue( io_attribute ); io_attribute = i_newValue; - broadcast_changed( i_attributeName, css::uno::makeAny( aOldValue ), css::uno::makeAny( io_attribute ), aGuard ); + broadcast_changed( i_attributeName, css::uno::Any( aOldValue ), css::uno::Any( io_attribute ), aGuard ); } css::uno::Any m_aIdentifier; diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 6dd25ef1f4bd..4bf996c8e7f4 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -90,8 +90,8 @@ UnoGridModel::UnoGridModel( const css::uno::Reference< css::uno::XComponentConte ImplRegisterProperty( BASEPROPERTY_GRID_SHOWCOLUMNHEADER ); ImplRegisterProperty( BASEPROPERTY_COLUMN_HEADER_HEIGHT ); ImplRegisterProperty( BASEPROPERTY_ROW_HEIGHT ); - ImplRegisterProperty( BASEPROPERTY_GRID_DATAMODEL, makeAny( lcl_getDefaultDataModel_throw( m_xContext ) ) ); - ImplRegisterProperty( BASEPROPERTY_GRID_COLUMNMODEL, makeAny( lcl_getDefaultColumnModel_throw( m_xContext ) ) ); + ImplRegisterProperty( BASEPROPERTY_GRID_DATAMODEL, Any( lcl_getDefaultDataModel_throw( m_xContext ) ) ); + ImplRegisterProperty( BASEPROPERTY_GRID_COLUMNMODEL, Any( lcl_getDefaultColumnModel_throw( m_xContext ) ) ); ImplRegisterProperty( BASEPROPERTY_GRID_SELECTIONMODE ); ImplRegisterProperty( BASEPROPERTY_FONTRELIEF ); ImplRegisterProperty( BASEPROPERTY_FONTEMPHASISMARK ); @@ -130,7 +130,7 @@ UnoGridModel::UnoGridModel( const UnoGridModel& rModel ) } if ( !xDataModel.is() ) xDataModel = lcl_getDefaultDataModel_throw( m_xContext ); - UnoControlModel::setFastPropertyValue_NoBroadcast( BASEPROPERTY_GRID_DATAMODEL, makeAny( xDataModel ) ); + UnoControlModel::setFastPropertyValue_NoBroadcast( BASEPROPERTY_GRID_DATAMODEL, Any( xDataModel ) ); // do *not* use setFastPropertyValue here: The UnoControlModel ctor made a simple copy of all property values, // so before this call here, we share our data model with the own of the clone source. setFastPropertyValue, // then, disposes the old data model - which means the data model which in fact belongs to the clone source. @@ -149,7 +149,7 @@ UnoGridModel::UnoGridModel( const UnoGridModel& rModel ) } if ( !xColumnModel.is() ) xColumnModel = lcl_getDefaultColumnModel_throw( m_xContext ); - UnoControlModel::setFastPropertyValue_NoBroadcast( BASEPROPERTY_GRID_COLUMNMODEL, makeAny( xColumnModel ) ); + UnoControlModel::setFastPropertyValue_NoBroadcast( BASEPROPERTY_GRID_COLUMNMODEL, Any( xColumnModel ) ); // same comment as above: do not use our own setPropertyValue here. } osl_atomic_decrement( &m_refCount ); @@ -220,16 +220,16 @@ Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const switch( nPropId ) { case BASEPROPERTY_DEFAULTCONTROL: - return uno::makeAny( OUString("com.sun.star.awt.grid.UnoControlGrid") ); + return uno::Any( OUString("com.sun.star.awt.grid.UnoControlGrid") ); case BASEPROPERTY_GRID_SELECTIONMODE: - return uno::makeAny( SelectionType(1) ); + return uno::Any( SelectionType(1) ); case BASEPROPERTY_GRID_SHOWROWHEADER: case BASEPROPERTY_USE_GRID_LINES: - return uno::makeAny( false ); + return uno::Any( false ); case BASEPROPERTY_ROW_HEADER_WIDTH: - return uno::makeAny( sal_Int32( 10 ) ); + return uno::Any( sal_Int32( 10 ) ); case BASEPROPERTY_GRID_SHOWCOLUMNHEADER: - return uno::makeAny( true ); + return uno::Any( true ); case BASEPROPERTY_COLUMN_HEADER_HEIGHT: case BASEPROPERTY_ROW_HEIGHT: case BASEPROPERTY_GRID_HEADER_BACKGROUND: diff --git a/toolkit/source/controls/tabpagecontainer.cxx b/toolkit/source/controls/tabpagecontainer.cxx index 33dcaffffa2d..b0f437139ea3 100644 --- a/toolkit/source/controls/tabpagecontainer.cxx +++ b/toolkit/source/controls/tabpagecontainer.cxx @@ -68,9 +68,9 @@ uno::Any UnoControlTabPageContainerModel::ImplGetDefaultValue( sal_uInt16 nPropI switch(nPropId) { case BASEPROPERTY_DEFAULTCONTROL: - return uno::makeAny( OUString("com.sun.star.awt.tab.UnoControlTabPageContainer") ); + return uno::Any( OUString("com.sun.star.awt.tab.UnoControlTabPageContainer") ); case BASEPROPERTY_BORDER: - return uno::makeAny(sal_Int16(0)); // No Border + return uno::Any(sal_Int16(0)); // No Border default: return UnoControlModel::ImplGetDefaultValue( nPropId ); } @@ -178,7 +178,7 @@ uno::Any SAL_CALL UnoControlTabPageContainerModel::getByIndex( ::sal_Int32 nInde ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( nIndex < 0 || nIndex > sal_Int32(m_aTabPageVector.size()) ) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(m_aTabPageVector[nIndex]); + return uno::Any(m_aTabPageVector[nIndex]); } // XElementAccess diff --git a/toolkit/source/controls/tkscrollbar.cxx b/toolkit/source/controls/tkscrollbar.cxx index 9fd764212997..48a2a560b5a6 100644 --- a/toolkit/source/controls/tkscrollbar.cxx +++ b/toolkit/source/controls/tkscrollbar.cxx @@ -70,9 +70,9 @@ namespace toolkit switch ( nPropId ) { case BASEPROPERTY_LIVE_SCROLL: - return uno::makeAny( false ); + return uno::Any( false ); case BASEPROPERTY_DEFAULTCONTROL: - return uno::makeAny( OUString( "stardiv.vcl.control.ScrollBar" ) ); + return uno::Any( OUString( "stardiv.vcl.control.ScrollBar" ) ); default: return UnoControlModel::ImplGetDefaultValue( nPropId ); @@ -186,7 +186,7 @@ namespace toolkit void UnoScrollBarControl::setValue( sal_Int32 n ) { - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SCROLLVALUE ), uno::makeAny( n ), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SCROLLVALUE ), uno::Any( n ), true ); } void UnoScrollBarControl::setValues( sal_Int32 nValue, sal_Int32 nVisible, sal_Int32 nMax ) @@ -209,7 +209,7 @@ namespace toolkit void UnoScrollBarControl::setMaximum( sal_Int32 n ) { - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SCROLLVALUE_MAX ), uno::makeAny( n ), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SCROLLVALUE_MAX ), uno::Any( n ), true ); } sal_Int32 UnoScrollBarControl::getMaximum() @@ -225,7 +225,7 @@ namespace toolkit void UnoScrollBarControl::setLineIncrement( sal_Int32 n ) { - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_LINEINCREMENT ), uno::makeAny( n ), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_LINEINCREMENT ), uno::Any( n ), true ); } sal_Int32 UnoScrollBarControl::getLineIncrement() @@ -241,7 +241,7 @@ namespace toolkit void UnoScrollBarControl::setBlockIncrement( sal_Int32 n ) { - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_BLOCKINCREMENT ), uno::makeAny( n ), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_BLOCKINCREMENT ), uno::Any( n ), true ); } sal_Int32 UnoScrollBarControl::getBlockIncrement() @@ -257,7 +257,7 @@ namespace toolkit void UnoScrollBarControl::setVisibleSize( sal_Int32 n ) { - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VISIBLESIZE ), uno::makeAny( n ), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VISIBLESIZE ), uno::Any( n ), true ); } sal_Int32 UnoScrollBarControl::getVisibleSize() @@ -273,7 +273,7 @@ namespace toolkit void UnoScrollBarControl::setOrientation( sal_Int32 n ) { - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_ORIENTATION ), uno::makeAny( n ), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_ORIENTATION ), uno::Any( n ), true ); } sal_Int32 UnoScrollBarControl::getOrientation() diff --git a/toolkit/source/controls/tkspinbutton.cxx b/toolkit/source/controls/tkspinbutton.cxx index 8c301f98a04e..2040f668859b 100644 --- a/toolkit/source/controls/tkspinbutton.cxx +++ b/toolkit/source/controls/tkspinbutton.cxx @@ -151,13 +151,13 @@ public: switch ( nPropId ) { case BASEPROPERTY_DEFAULTCONTROL: - return makeAny( OUString("com.sun.star.awt.UnoControlSpinButton") ); + return Any( OUString("com.sun.star.awt.UnoControlSpinButton") ); case BASEPROPERTY_BORDER: - return makeAny( sal_Int16(0) ); + return Any( sal_Int16(0) ); case BASEPROPERTY_REPEAT: - return makeAny( true ); + return Any( true ); default: return UnoControlModel::ImplGetDefaultValue( nPropId ); @@ -269,7 +269,7 @@ public: case AdjustmentType_ADJUST_LINE: case AdjustmentType_ADJUST_PAGE: case AdjustmentType_ADJUST_ABS: - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SPINVALUE ), makeAny( rEvent.Value ), false ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SPINVALUE ), Any( rEvent.Value ), false ); break; default: OSL_FAIL( "UnoSpinButtonControl::adjustmentValueChanged - unknown Type" ); @@ -300,15 +300,15 @@ public: void SAL_CALL UnoSpinButtonControl::setValue( sal_Int32 value ) { - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SPINVALUE ), makeAny( value ), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SPINVALUE ), Any( value ), true ); } void SAL_CALL UnoSpinButtonControl::setValues( sal_Int32 minValue, sal_Int32 maxValue, sal_Int32 currentValue ) { - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SPINVALUE_MIN ), makeAny( minValue ), true ); - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SPINVALUE_MAX ), makeAny( maxValue ), true ); - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SPINVALUE ), makeAny( currentValue ), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SPINVALUE_MIN ), Any( minValue ), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SPINVALUE_MAX ), Any( maxValue ), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SPINVALUE ), Any( currentValue ), true ); } @@ -327,13 +327,13 @@ public: void SAL_CALL UnoSpinButtonControl::setMinimum( sal_Int32 minValue ) { - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SPINVALUE_MIN ), makeAny( minValue ), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SPINVALUE_MIN ), Any( minValue ), true ); } void SAL_CALL UnoSpinButtonControl::setMaximum( sal_Int32 maxValue ) { - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SPINVALUE_MAX ), makeAny( maxValue ), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SPINVALUE_MAX ), Any( maxValue ), true ); } @@ -365,7 +365,7 @@ public: void SAL_CALL UnoSpinButtonControl::setSpinIncrement( sal_Int32 spinIncrement ) { - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SPININCREMENT ), makeAny( spinIncrement ), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SPININCREMENT ), Any( spinIncrement ), true ); } @@ -384,7 +384,7 @@ public: void SAL_CALL UnoSpinButtonControl::setOrientation( sal_Int32 orientation ) { - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_ORIENTATION ), makeAny( orientation ), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_ORIENTATION ), Any( orientation ), true ); } diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx index 8a0dd61f2b33..d4439a4ff1e3 100644 --- a/toolkit/source/controls/tree/treecontrol.cxx +++ b/toolkit/source/controls/tree/treecontrol.cxx @@ -97,7 +97,7 @@ Any UnoTreeModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const case BASEPROPERTY_TREE_SHOWSHANDLES: return Any( true ); case BASEPROPERTY_DEFAULTCONTROL: - return uno::makeAny( OUString( "com.sun.star.awt.tree.TreeControl" ) ); + return uno::Any( OUString( "com.sun.star.awt.tree.TreeControl" ) ); default: return UnoControlModel::ImplGetDefaultValue( nPropId ); } diff --git a/toolkit/source/controls/unocontrolcontainer.cxx b/toolkit/source/controls/unocontrolcontainer.cxx index e3c6df43571e..806ec486369b 100644 --- a/toolkit/source/controls/unocontrolcontainer.cxx +++ b/toolkit/source/controls/unocontrolcontainer.cxx @@ -521,7 +521,7 @@ uno::Any SAL_CALL UnoControlContainer::getByIdentifier( ::sal_Int32 _nIdentifier uno::Reference< awt::XControl > xControl; if ( !mpControls->getControlForIdentifier( _nIdentifier, xControl ) ) throw container::NoSuchElementException(); - return uno::makeAny( xControl ); + return uno::Any( xControl ); } uno::Sequence< ::sal_Int32 > SAL_CALL UnoControlContainer::getIdentifiers( ) diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index a62ac19a1487..2072a761cbdb 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -571,7 +571,7 @@ stardiv_Toolkit_UnoFileControl_get_implementation( uno::Any GraphicControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const { if ( nPropId == BASEPROPERTY_GRAPHIC ) - return uno::makeAny( uno::Reference< graphic::XGraphic >() ); + return uno::Any( uno::Reference< graphic::XGraphic >() ); return UnoControlModel::ImplGetDefaultValue( nPropId ); } @@ -592,7 +592,7 @@ void SAL_CALL GraphicControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 n mbAdjustingGraphic = true; OUString sImageURL; OSL_VERIFY( rValue >>= sImageURL ); - setDependentFastPropertyValue( BASEPROPERTY_GRAPHIC, uno::makeAny( ImageHelper::getGraphicFromURL_nothrow( sImageURL ) ) ); + setDependentFastPropertyValue( BASEPROPERTY_GRAPHIC, uno::Any( ImageHelper::getGraphicFromURL_nothrow( sImageURL ) ) ); mbAdjustingGraphic = false; } break; @@ -601,7 +601,7 @@ void SAL_CALL GraphicControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 n if ( !mbAdjustingGraphic && ImplHasProperty( BASEPROPERTY_IMAGEURL ) ) { mbAdjustingGraphic = true; - setDependentFastPropertyValue( BASEPROPERTY_IMAGEURL, uno::makeAny( OUString() ) ); + setDependentFastPropertyValue( BASEPROPERTY_IMAGEURL, uno::Any( OUString() ) ); mbAdjustingGraphic = false; } break; @@ -612,7 +612,7 @@ void SAL_CALL GraphicControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 n mbAdjustingImagePosition = true; sal_Int16 nUNOValue = 0; OSL_VERIFY( rValue >>= nUNOValue ); - setDependentFastPropertyValue( BASEPROPERTY_IMAGEPOSITION, uno::makeAny( getExtendedImagePosition( nUNOValue ) ) ); + setDependentFastPropertyValue( BASEPROPERTY_IMAGEPOSITION, uno::Any( getExtendedImagePosition( nUNOValue ) ) ); mbAdjustingImagePosition = false; } break; @@ -622,7 +622,7 @@ void SAL_CALL GraphicControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 n mbAdjustingImagePosition = true; sal_Int16 nUNOValue = 0; OSL_VERIFY( rValue >>= nUNOValue ); - setDependentFastPropertyValue( BASEPROPERTY_IMAGEALIGN, uno::makeAny( getCompatibleImageAlign( translateImagePosition( nUNOValue ) ) ) ); + setDependentFastPropertyValue( BASEPROPERTY_IMAGEALIGN, uno::Any( getCompatibleImageAlign( translateImagePosition( nUNOValue ) ) ) ); mbAdjustingImagePosition = false; } break; @@ -662,13 +662,13 @@ uno::Any UnoControlButtonModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const switch ( nPropId ) { case BASEPROPERTY_DEFAULTCONTROL: - return uno::makeAny( OUString( "stardiv.vcl.control.Button" ) ); + return uno::Any( OUString( "stardiv.vcl.control.Button" ) ); case BASEPROPERTY_TOGGLE: - return uno::makeAny( false ); + return uno::Any( false ); case BASEPROPERTY_ALIGN: - return uno::makeAny( sal_Int16(PROPERTY_ALIGN_CENTER) ); + return uno::Any( sal_Int16(PROPERTY_ALIGN_CENTER) ); case BASEPROPERTY_FOCUSONCLICK: - return uno::makeAny( true ); + return uno::Any( true ); } return GraphicControlModel::ImplGetDefaultValue( nPropId ); @@ -893,10 +893,10 @@ UnoControlImageControlModel::getSupportedServiceNames() uno::Any UnoControlImageControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const { if ( nPropId == BASEPROPERTY_DEFAULTCONTROL ) - return uno::makeAny( OUString( "stardiv.vcl.control.ImageControl" ) ); + return uno::Any( OUString( "stardiv.vcl.control.ImageControl" ) ); if ( nPropId == BASEPROPERTY_IMAGE_SCALE_MODE ) - return makeAny( awt::ImageScaleMode::ANISOTROPIC ); + return Any( awt::ImageScaleMode::ANISOTROPIC ); return GraphicControlModel::ImplGetDefaultValue( nPropId ); } @@ -929,7 +929,7 @@ void SAL_CALL UnoControlImageControlModel::setFastPropertyValue_NoBroadcast( sal mbAdjustingImageScaleMode = true; sal_Int16 nScaleMode( awt::ImageScaleMode::ANISOTROPIC ); OSL_VERIFY( _rValue >>= nScaleMode ); - setDependentFastPropertyValue( BASEPROPERTY_SCALEIMAGE, uno::makeAny( nScaleMode != awt::ImageScaleMode::NONE ) ); + setDependentFastPropertyValue( BASEPROPERTY_SCALEIMAGE, uno::Any( nScaleMode != awt::ImageScaleMode::NONE ) ); mbAdjustingImageScaleMode = false; } break; @@ -939,7 +939,7 @@ void SAL_CALL UnoControlImageControlModel::setFastPropertyValue_NoBroadcast( sal mbAdjustingImageScaleMode = true; bool bScale = true; OSL_VERIFY( _rValue >>= bScale ); - setDependentFastPropertyValue( BASEPROPERTY_IMAGE_SCALE_MODE, uno::makeAny( bScale ? awt::ImageScaleMode::ANISOTROPIC : awt::ImageScaleMode::NONE ) ); + setDependentFastPropertyValue( BASEPROPERTY_IMAGE_SCALE_MODE, uno::Any( bScale ? awt::ImageScaleMode::ANISOTROPIC : awt::ImageScaleMode::NONE ) ); mbAdjustingImageScaleMode = false; } break; @@ -1045,10 +1045,10 @@ uno::Any UnoControlRadioButtonModel::ImplGetDefaultValue( sal_uInt16 nPropId ) c switch ( nPropId ) { case BASEPROPERTY_DEFAULTCONTROL: - return uno::makeAny( OUString( "stardiv.vcl.control.RadioButton" ) ); + return uno::Any( OUString( "stardiv.vcl.control.RadioButton" ) ); case BASEPROPERTY_VISUALEFFECT: - return uno::makeAny( sal_Int16(awt::VisualEffect::LOOK3D) ); + return uno::Any( sal_Int16(awt::VisualEffect::LOOK3D) ); } return GraphicControlModel::ImplGetDefaultValue( nPropId ); @@ -1278,10 +1278,10 @@ uno::Any UnoControlCheckBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) cons switch ( nPropId ) { case BASEPROPERTY_DEFAULTCONTROL: - return uno::makeAny( OUString( "stardiv.vcl.control.CheckBox" ) ); + return uno::Any( OUString( "stardiv.vcl.control.CheckBox" ) ); case BASEPROPERTY_VISUALEFFECT: - return uno::makeAny( sal_Int16(awt::VisualEffect::LOOK3D) ); + return uno::Any( sal_Int16(awt::VisualEffect::LOOK3D) ); } return GraphicControlModel::ImplGetDefaultValue( nPropId ); @@ -2333,7 +2333,7 @@ void UnoControlListBoxModel::impl_setStringItemList_nolck( const ::std::vector< m_xData->m_bSettingLegacyProperty = true; try { - setFastPropertyValue( BASEPROPERTY_STRINGITEMLIST, uno::makeAny( aStringItems ) ); + setFastPropertyValue( BASEPROPERTY_STRINGITEMLIST, uno::Any( aStringItems ) ); } catch( const Exception& ) { diff --git a/toolkit/source/hatchwindow/documentcloser.cxx b/toolkit/source/hatchwindow/documentcloser.cxx index 42201691fac4..b83825cdfc08 100644 --- a/toolkit/source/hatchwindow/documentcloser.cxx +++ b/toolkit/source/hatchwindow/documentcloser.cxx @@ -112,7 +112,7 @@ IMPL_STATIC_LINK( MainThreadFrameCloserRequest, worker, void*, p, void ) xWindow->setVisible( false ); // reparent the window - xWinPeer->setProperty( "PluginParent", uno::makeAny( sal_Int64(0) ) ); + xWinPeer->setProperty( "PluginParent", uno::Any( sal_Int64(0) ) ); VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow ); if (pWindow) |