diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-24 11:22:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-28 10:17:47 +0000 |
commit | 198c41c4fe8be4ce8a6ddab43ae0c5f17a4889ac (patch) | |
tree | 041d55126e9770b81f68fadfaaa69e82313786b3 /sc | |
parent | d3981b3e8c021ee03a2ca7103a73e56cca18df81 (diff) |
new loplugin unoany
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89
Reviewed-on: https://gerrit.libreoffice.org/34714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
22 files changed, 106 insertions, 106 deletions
diff --git a/sc/qa/extras/sccellrangeobj.cxx b/sc/qa/extras/sccellrangeobj.cxx index 95f94d52b81e..40a3ebc638c1 100644 --- a/sc/qa/extras/sccellrangeobj.cxx +++ b/sc/qa/extras/sccellrangeobj.cxx @@ -127,7 +127,7 @@ void ScCellRangeObj::testSortOOB() aSort[0].SortAscending = true; aProps[0].Name = "SortFields"; - aProps[0].Value = uno::makeAny(aSort); + aProps[0].Value <<= aSort; xSortable->sort(aProps); } diff --git a/sc/qa/extras/sccondformats.cxx b/sc/qa/extras/sccondformats.cxx index 0f8119995929..8fc4eaca3916 100644 --- a/sc/qa/extras/sccondformats.cxx +++ b/sc/qa/extras/sccondformats.cxx @@ -81,15 +81,15 @@ void ScConditionalFormatTest::testCondFormat() uno::Sequence< beans::PropertyValue > aPropertyValueList(5); aPropertyValueList[0].Name = SC_UNONAME_STYLENAME; - aPropertyValueList[0].Value = uno::makeAny<OUString>("Result2"); + aPropertyValueList[0].Value <<= OUString("Result2"); aPropertyValueList[1].Name = SC_UNONAME_FORMULA1; - aPropertyValueList[1].Value = uno::makeAny<OUString>("$Sheet1.$B$2"); + aPropertyValueList[1].Value <<= OUString("$Sheet1.$B$2"); aPropertyValueList[2].Name = SC_UNONAME_FORMULA2; - aPropertyValueList[2].Value = uno::makeAny<OUString>("$Sheet1.$A$2"); + aPropertyValueList[2].Value <<= OUString("$Sheet1.$A$2"); aPropertyValueList[3].Name = SC_UNONAME_OPERATOR; aPropertyValueList[3].Value <<= sheet::ConditionOperator_EQUAL; aPropertyValueList[4].Name = SC_UNONAME_SOURCEPOS; - aPropertyValueList[4].Value = uno::makeAny(table::CellAddress(0, 0, 16)); + aPropertyValueList[4].Value <<= table::CellAddress(0, 0, 16); xSheetConditionalEntries->addNew(aPropertyValueList); CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xSheetConditionalEntries->getCount()); xProps->setPropertyValue(SC_UNONAME_CONDFMT, uno::makeAny(xSheetConditionalEntries)); diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index 93701696d49d..09904856fd65 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -1346,7 +1346,7 @@ void ScDPOutput::GetPositionData(const ScAddress& rPos, DataPilotTablePositionDa aData[nRow-nDataStartRow].getLength() > nCol-nDataStartCol) aResData.Result = aData[nRow-nDataStartRow][nCol-nDataStartCol]; - rPosData.PositionData = makeAny(aResData); + rPosData.PositionData <<= aResData; return; } case DataPilotTablePositionType::COLUMN_HEADER: @@ -1375,7 +1375,7 @@ void ScDPOutput::GetPositionData(const ScAddress& rPos, DataPilotTablePositionDa aHeaderData.Hierarchy = static_cast<sal_Int32>(pColFields[nField].mnHier); aHeaderData.Level = static_cast<sal_Int32>(pColFields[nField].mnLevel); - rPosData.PositionData = makeAny(aHeaderData); + rPosData.PositionData <<= aHeaderData; return; } case DataPilotTablePositionType::ROW_HEADER: @@ -1404,7 +1404,7 @@ void ScDPOutput::GetPositionData(const ScAddress& rPos, DataPilotTablePositionDa aHeaderData.Hierarchy = static_cast<sal_Int32>(pRowFields[nField].mnHier); aHeaderData.Level = static_cast<sal_Int32>(pRowFields[nField].mnLevel); - rPosData.PositionData = makeAny(aHeaderData); + rPosData.PositionData <<= aHeaderData; return; } } diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx index 3821afb28a05..08d2d6bcd1a6 100644 --- a/sc/source/core/data/validat.cxx +++ b/sc/source/core/data/validat.cxx @@ -206,13 +206,13 @@ bool ScValidationData::DoScript( const ScAddress& rPos, const OUString& rInput, aValStr = pCell->GetString().getString(); } if ( bIsValue ) - aParams[0] = css::uno::makeAny( nValue ); + aParams[0] <<= nValue; else - aParams[0] = css::uno::makeAny( OUString( aValStr ) ); + aParams[0] <<= aValStr; // 2) Position of the cell OUString aPosStr(rPos.Format(ScRefFlags::VALID | ScRefFlags::TAB_3D, pDocument, pDocument->GetAddressConvention())); - aParams[1] = css::uno::makeAny(aPosStr); + aParams[1] <<= aPosStr; // use link-update flag to prevent closing the document // while the macro is running diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index b6e069e3451b..1a0e433057bb 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -3107,7 +3107,7 @@ static bool lcl_setVBARange( ScRange& aRange, ScDocument* pDok, SbxVariable* pPa uno::Reference<table::XCellRange> xCellRange = ScCellRangeObj::CreateRangeFromDoc( pDok, aRange ); uno::Sequence< uno::Any > aArgs(2); aArgs[0] = lcl_getSheetModule( xCellRange, pDok ); - aArgs[1] = uno::Any( xCellRange ); + aArgs[1] <<= xCellRange; xVBARange = ooo::vba::createVBAUnoAPIServiceWithArgs( pDok->GetDocumentShell(), "ooo.vba.excel.Range", aArgs ); if ( xVBARange.is() ) { diff --git a/sc/source/filter/excel/xltoolbar.cxx b/sc/source/filter/excel/xltoolbar.cxx index 8e7d88a5092f..f84fdf29208b 100644 --- a/sc/source/filter/excel/xltoolbar.cxx +++ b/sc/source/filter/excel/xltoolbar.cxx @@ -298,7 +298,7 @@ bool ScTBC::ImportToolBarControl( ScCTBWrapper& rWrapper, const css::uno::Refere // insert spacer uno::Sequence< beans::PropertyValue > sProps( 1 ); sProps[ 0 ].Name = "Type"; - sProps[ 0 ].Value = uno::makeAny( ui::ItemType::SEPARATOR_LINE ); + sProps[ 0 ].Value <<= ui::ItemType::SEPARATOR_LINE; toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::makeAny( sProps ) ); } toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::makeAny( comphelper::containerToSequence(props) ) ); diff --git a/sc/source/filter/xml/xmlsorti.cxx b/sc/source/filter/xml/xmlsorti.cxx index 537a43c8baf4..36705555e8a3 100644 --- a/sc/source/filter/xml/xmlsorti.cxx +++ b/sc/source/filter/xml/xmlsorti.cxx @@ -136,13 +136,13 @@ void ScXMLSortContext::EndElement() ++i; uno::Sequence <beans::PropertyValue> aSortDescriptor(7 + i); aSortDescriptor[0].Name = SC_UNONAME_BINDFMT; - aSortDescriptor[0].Value = css::uno::makeAny(bBindFormatsToContent); + aSortDescriptor[0].Value <<= bBindFormatsToContent; aSortDescriptor[1].Name = SC_UNONAME_COPYOUT; - aSortDescriptor[1].Value = css::uno::makeAny(bCopyOutputData); + aSortDescriptor[1].Value <<= bCopyOutputData; aSortDescriptor[2].Name = SC_UNONAME_ISCASE; - aSortDescriptor[2].Value = css::uno::makeAny(bIsCaseSensitive); + aSortDescriptor[2].Value <<= bIsCaseSensitive; aSortDescriptor[3].Name = SC_UNONAME_ISULIST; - aSortDescriptor[3].Value = css::uno::makeAny(bEnabledUserList); + aSortDescriptor[3].Value <<= bEnabledUserList; aSortDescriptor[4].Name = SC_UNONAME_OUTPOS; aSortDescriptor[4].Value <<= aOutputPosition; aSortDescriptor[5].Name = SC_UNONAME_UINDEX; diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx index ab273e3202e6..d566abfe8d19 100644 --- a/sc/source/ui/Accessibility/AccessibleCell.cxx +++ b/sc/source/ui/Accessibility/AccessibleCell.cxx @@ -544,7 +544,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScAccessibleCell::getCharacterAtt { if (sLeftMarginName == pAttribs[i].Name) { - pAttribs[i].Value = uno::makeAny( nParaIndent ); + pAttribs[i].Value <<= nParaIndent; break; } } diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index ceee7ec0e45c..f4d219044b2a 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -485,7 +485,7 @@ bool ScChildrenShapes::ReplaceChild (::accessibility::AccessibleShape* pCurrentC AccessibleEventObject aEvent; aEvent.EventId = AccessibleEventId::CHILD; aEvent.Source = uno::Reference< XAccessibleContext >(mpAccessibleDocument); - aEvent.OldValue = uno::makeAny(uno::Reference<XAccessible>(pCurrentChild)); + aEvent.OldValue <<= uno::Reference<XAccessible>(pCurrentChild); mpAccessibleDocument->CommitChange(aEvent); // child is gone - event @@ -495,7 +495,7 @@ bool ScChildrenShapes::ReplaceChild (::accessibility::AccessibleShape* pCurrentC AccessibleEventObject aEvent; aEvent.EventId = AccessibleEventId::CHILD; aEvent.Source = uno::Reference< XAccessibleContext >(mpAccessibleDocument); - aEvent.NewValue = uno::makeAny(uno::Reference<XAccessible>(pReplacement.get())); + aEvent.NewValue <<= uno::Reference<XAccessible>(pReplacement.get()); mpAccessibleDocument->CommitChange(aEvent); // child is new - event bResult = true; @@ -1304,7 +1304,7 @@ void ScChildrenShapes::RemoveShape(const uno::Reference<drawing::XShape>& xShape AccessibleEventObject aEvent; aEvent.EventId = AccessibleEventId::CHILD; aEvent.Source = uno::Reference< XAccessibleContext >(mpAccessibleDocument); - aEvent.OldValue = uno::makeAny(xOldAccessible); + aEvent.OldValue <<= xOldAccessible; mpAccessibleDocument->CommitChange(aEvent); // child is gone - event } @@ -2335,7 +2335,7 @@ css::uno::Sequence< css::uno::Any > ScAccessibleDocument::GetScAccFlowToSequence { if ( xSelContext->getAccessibleRole() == AccessibleRole::TABLE_CELL ) { - aSequence[nParaCount] = uno::makeAny( xSel ); + aSequence[nParaCount] <<= xSel; nParaCount++; } } @@ -2381,7 +2381,7 @@ css::uno::Sequence< css::uno::Any > if ( xSelContext->getAccessibleRole() == AccessibleRole::PARAGRAPH ) { uno::Sequence<uno::Any> aRet( 1 ); - aRet[0] = uno::makeAny( xSel ); + aRet[0] <<= xSel; return aRet; } } @@ -2412,7 +2412,7 @@ css::uno::Sequence< css::uno::Any > xChildSelContext->getAccessibleRole() == css::accessibility::AccessibleRole::PARAGRAPH ) { uno::Sequence<uno::Any> aRet( 1 ); - aRet[0] = uno::makeAny( xChildSel ); + aRet[0] <<= xChildSel; return aRet; } } @@ -2439,7 +2439,7 @@ css::uno::Sequence< css::uno::Any > uno::Reference < XAccessible > xFindCellAcc = mpAccessibleSpreadsheet->GetActiveCell(); // add xFindCellAcc to the return the Sequence uno::Sequence< uno::Any> aSeq2(1); - aSeq2[0] = uno::makeAny( xFindCellAcc ); + aSeq2[0] <<= xFindCellAcc; return aSeq2; } } diff --git a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx index f3fc65b0bed8..85bc9c31da63 100644 --- a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx +++ b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx @@ -113,7 +113,7 @@ void ScAccessiblePageHeader::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) AccessibleEventObject aEvent; aEvent.EventId = AccessibleEventId::CHILD; aEvent.Source = uno::Reference< XAccessibleContext >(this); - aEvent.OldValue = uno::makeAny(uno::Reference<XAccessible>(aOldAreas[i].get())); + aEvent.OldValue <<= uno::Reference<XAccessible>(aOldAreas[i].get()); CommitChange(aEvent); // child gone - event aOldAreas[i]->dispose(); @@ -123,7 +123,7 @@ void ScAccessiblePageHeader::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) AccessibleEventObject aEvent; aEvent.EventId = AccessibleEventId::CHILD; aEvent.Source = uno::Reference< XAccessibleContext >(this); - aEvent.NewValue = uno::makeAny(uno::Reference<XAccessible>(maAreas[i].get())); + aEvent.NewValue <<= uno::Reference<XAccessible>(maAreas[i].get()); CommitChange(aEvent); // new child - event } diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index f8ea191ae938..ee9f22a3d5e4 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -338,9 +338,9 @@ void ScAccessibleSpreadsheet::CompleteSelectionChanged(bool bNewState) AccessibleEventObject aEvent; aEvent.EventId = AccessibleEventId::STATE_CHANGED; if (bNewState) - aEvent.NewValue = uno::makeAny(AccessibleStateType::SELECTED); + aEvent.NewValue <<= AccessibleStateType::SELECTED; else - aEvent.OldValue = uno::makeAny(AccessibleStateType::SELECTED); + aEvent.OldValue <<= AccessibleStateType::SELECTED; aEvent.Source = uno::Reference< XAccessibleContext >(this); CommitChange(aEvent); diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index d2d23823b8c9..dfee80e32e7d 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -632,12 +632,12 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV uno::Any* pArray = aSeq.getArray(); beans::PropertyValue aParam1; aParam1.Name = "ParentWindow"; - aParam1.Value = uno::makeAny(xDialogParentWindow); + aParam1.Value <<= xDialogParentWindow; beans::PropertyValue aParam2; aParam2.Name = "ChartModel"; - aParam2.Value = uno::makeAny(xChartModel); - pArray[0] = uno::makeAny(aParam1); - pArray[1] = uno::makeAny(aParam2); + aParam2.Value <<= xChartModel; + pArray[0] <<= aParam1; + pArray[1] <<= aParam2; xInit->initialize( aSeq ); // try to set the dialog's position so it doesn't hide the chart diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 353ddec0180c..b5d460dba5ec 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -1651,7 +1651,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32 pArray[0].Value <<= aPageSize; // #i111158# all positions are relative to the whole page, including non-printable area pArray[1].Name = SC_UNONAME_INC_NP_AREA; - pArray[1].Value = uno::makeAny( true ); + pArray[1].Value <<= true; if ( bWasCellRange ) { table::CellRangeAddress aRangeAddress( nTab, diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx index 0f15c36fdf64..6b2fac6b79e8 100644 --- a/sc/source/ui/unoobj/servuno.cxx +++ b/sc/source/ui/unoobj/servuno.cxx @@ -87,8 +87,8 @@ public: { uno::Sequence< uno::Any > aArgs(2); // access the application object ( parent for workbook ) - aArgs[0] = uno::Any( ooo::vba::createVBAUnoAPIServiceWithArgs( mpDocShell, "ooo.vba.Application", uno::Sequence< uno::Any >() ) ); - aArgs[1] = uno::Any( mpDocShell->GetModel() ); + aArgs[0] <<= ooo::vba::createVBAUnoAPIServiceWithArgs( mpDocShell, "ooo.vba.Application", uno::Sequence< uno::Any >() ); + aArgs[1] <<= mpDocShell->GetModel(); maWorkbook <<= ooo::vba::createVBAUnoAPIServiceWithArgs( mpDocShell, "ooo.vba.excel.Workbook", aArgs ); } @@ -123,8 +123,8 @@ public: uno::Reference< sheet::XSpreadsheet > xSheet( xIndexAccess->getByIndex( i ), uno::UNO_QUERY_THROW ); uno::Sequence< uno::Any > aArgs(3); aArgs[0] = maWorkbook; - aArgs[1] = uno::Any( xModel ); - aArgs[2] = uno::Any( OUString( sSheetName ) ); + aArgs[1] <<= xModel; + aArgs[2] <<= sSheetName; // use the convience function maCachedObject <<= ooo::vba::createVBAUnoAPIServiceWithArgs( mpDocShell, "ooo.vba.excel.Worksheet", aArgs ); break; diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index 11bd37d775c8..f43a0723d8e4 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -887,7 +887,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getPropertyValue( const OUString& sPropertyN if ( nResId > 0 ) { OUString sDisplayName( ScGlobal::GetRscString( static_cast< sal_uInt16 >( nResId ) ) ); - aRet = uno::makeAny( sDisplayName ); + aRet <<= sDisplayName; } } else @@ -1294,9 +1294,9 @@ uno::Any ScStyleObj::getPropertyDefault_Impl( const OUString& aPropertyName ) { const ScPageScaleToItem aItem(static_cast<const ScPageScaleToItem&>(pItemSet->Get(nWhich))); if ( aPropertyName == SC_UNO_PAGE_SCALETOX ) - aAny = uno::makeAny(static_cast<sal_Int16>(aItem.GetWidth())); + aAny <<= static_cast<sal_Int16>(aItem.GetWidth()); else - aAny = uno::makeAny(static_cast<sal_Int16>(aItem.GetHeight())); + aAny <<= static_cast<sal_Int16>(aItem.GetHeight()); } break; default: @@ -1873,15 +1873,15 @@ uno::Any ScStyleObj::getPropertyValue_Impl( const OUString& aPropertyName ) { ScPageScaleToItem aItem(static_cast<const ScPageScaleToItem&>(pItemSet->Get(ATTR_PAGE_SCALETO))); if ( aPropertyName == SC_UNO_PAGE_SCALETOX ) - aAny = uno::makeAny(static_cast<sal_Int16>(aItem.GetWidth())); + aAny <<= static_cast<sal_Int16>(aItem.GetWidth()); else - aAny = uno::makeAny(static_cast<sal_Int16>(aItem.GetHeight())); + aAny <<= static_cast<sal_Int16>(aItem.GetHeight()); } break; case ATTR_HIDDEN: { bool bHidden = pStyle && pStyle->IsHidden(); - aAny = uno::makeAny( bHidden ); + aAny <<= bHidden; } break; default: diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx index 9e5f5c025714..185e597e257a 100644 --- a/sc/source/ui/vba/vbachartobjects.cxx +++ b/sc/source/ui/vba/vbachartobjects.cxx @@ -50,7 +50,7 @@ public: { uno::Reference< table::XTableChart > xTableChart( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); // parent Object is sheet - ret = uno::makeAny( uno::Reference< excel::XChartObject > ( new ScVbaChartObject( m_xParent, m_xContext, xTableChart, xDrawPageSupplier ) ) ); + ret <<= uno::Reference< excel::XChartObject > ( new ScVbaChartObject( m_xParent, m_xContext, xTableChart, xDrawPageSupplier ) ); } catch (const lang::WrappedTargetException&) { diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx index f9161b979335..cbd390032938 100644 --- a/sc/source/ui/vba/vbaformat.cxx +++ b/sc/source/ui/vba/vbaformat.cxx @@ -89,21 +89,21 @@ ScVbaFormat< Ifc... >::setVerticalAlignment( const uno::Any& _oAlignment) switch (nAlignment) { case excel::XlVAlign::xlVAlignBottom : - aVal = uno::makeAny( table::CellVertJustify2::BOTTOM ); + aVal <<= table::CellVertJustify2::BOTTOM; break; case excel::XlVAlign::xlVAlignCenter : - aVal = uno::makeAny( table::CellVertJustify2::CENTER ); + aVal <<= table::CellVertJustify2::CENTER; break; case excel::XlVAlign::xlVAlignDistributed: case excel::XlVAlign::xlVAlignJustify: - aVal = uno::makeAny( table::CellVertJustify2::STANDARD ); + aVal <<= table::CellVertJustify2::STANDARD; break; case excel::XlVAlign::xlVAlignTop: - aVal = uno::makeAny( table::CellVertJustify2::TOP); + aVal <<= table::CellVertJustify2::TOP; break; default: - aVal = uno::makeAny( table::CellVertJustify2::STANDARD ); + aVal <<= table::CellVertJustify2::STANDARD; break; } mxPropertySet->setPropertyValue( SC_UNONAME_CELLVJUS, aVal ); @@ -128,16 +128,16 @@ ScVbaFormat< Ifc... >::getVerticalAlignment( ) switch( aAPIAlignment ) { case table::CellVertJustify2::BOTTOM: - aResult = uno::makeAny( excel::XlVAlign::xlVAlignBottom ); + aResult <<= excel::XlVAlign::xlVAlignBottom; break; case table::CellVertJustify2::CENTER: - aResult = uno::makeAny( excel::XlVAlign::xlVAlignCenter ); + aResult <<= excel::XlVAlign::xlVAlignCenter; break; case table::CellVertJustify2::STANDARD: - aResult = uno::makeAny( excel::XlVAlign::xlVAlignBottom ); + aResult <<= excel::XlVAlign::xlVAlignBottom; break; case table::CellVertJustify2::TOP: - aResult = uno::makeAny( excel::XlVAlign::xlVAlignTop ); + aResult <<= excel::XlVAlign::xlVAlignTop; break; default: break; @@ -164,19 +164,19 @@ ScVbaFormat< Ifc... >::setHorizontalAlignment( const uno::Any& HorizontalAlignme switch ( nAlignment ) { case excel::XlHAlign::xlHAlignJustify: - aVal = uno::makeAny( table::CellHoriJustify_BLOCK); + aVal <<= table::CellHoriJustify_BLOCK; break; case excel::XlHAlign::xlHAlignCenter: - aVal = uno::makeAny( table::CellHoriJustify_CENTER ); + aVal <<= table::CellHoriJustify_CENTER; break; case excel::XlHAlign::xlHAlignDistributed: - aVal = uno::makeAny( table::CellHoriJustify_BLOCK); + aVal <<= table::CellHoriJustify_BLOCK; break; case excel::XlHAlign::xlHAlignLeft: - aVal = uno::makeAny( table::CellHoriJustify_LEFT); + aVal <<= table::CellHoriJustify_LEFT; break; case excel::XlHAlign::xlHAlignRight: - aVal = uno::makeAny( table::CellHoriJustify_RIGHT); + aVal <<= table::CellHoriJustify_RIGHT; break; } // #FIXME what about the default case above? @@ -208,16 +208,16 @@ ScVbaFormat< Ifc... >::getHorizontalAlignment( ) switch( aAPIAlignment ) { case table::CellHoriJustify_BLOCK: - NRetAlignment = uno::makeAny( excel::XlHAlign::xlHAlignJustify ); + NRetAlignment <<= excel::XlHAlign::xlHAlignJustify; break; case table::CellHoriJustify_CENTER: - NRetAlignment = uno::makeAny( excel::XlHAlign::xlHAlignCenter ); + NRetAlignment <<= excel::XlHAlign::xlHAlignCenter; break; case table::CellHoriJustify_LEFT: - NRetAlignment = uno::makeAny( excel::XlHAlign::xlHAlignLeft ); + NRetAlignment <<= excel::XlHAlign::xlHAlignLeft; break; case table::CellHoriJustify_RIGHT: - NRetAlignment = uno::makeAny( excel::XlHAlign::xlHAlignRight ); + NRetAlignment <<= excel::XlHAlign::xlHAlignRight; break; default: // handle those other cases with a NULL return break; @@ -245,17 +245,17 @@ ScVbaFormat< Ifc... >::setOrientation( const uno::Any& _aOrientation ) switch( nOrientation ) { case excel::XlOrientation::xlDownward: - aVal = uno::makeAny( table::CellOrientation_TOPBOTTOM); + aVal <<= table::CellOrientation_TOPBOTTOM; break; case excel::XlOrientation::xlHorizontal: - aVal = uno::makeAny( table::CellOrientation_STANDARD ); + aVal <<= table::CellOrientation_STANDARD; mxPropertySet->setPropertyValue( SC_UNONAME_ROTANG, uno::makeAny( sal_Int32(0) ) ); break; case excel::XlOrientation::xlUpward: - aVal = uno::makeAny( table::CellOrientation_BOTTOMTOP); + aVal <<= table::CellOrientation_BOTTOMTOP; break; case excel::XlOrientation::xlVertical: - aVal = uno::makeAny( table::CellOrientation_STACKED); + aVal <<= table::CellOrientation_STACKED; break; } // #FIXME what about the default case above? @@ -285,19 +285,19 @@ ScVbaFormat< Ifc... >::getOrientation( ) switch(aOrientation) { case table::CellOrientation_STANDARD: - NRetOrientation = uno::makeAny( excel::XlOrientation::xlHorizontal ); + NRetOrientation <<= excel::XlOrientation::xlHorizontal; break; case table::CellOrientation_BOTTOMTOP: - NRetOrientation = uno::makeAny( excel::XlOrientation::xlUpward ); + NRetOrientation <<= excel::XlOrientation::xlUpward; break; case table::CellOrientation_TOPBOTTOM: - NRetOrientation = uno::makeAny( excel::XlOrientation::xlDownward ); + NRetOrientation <<= excel::XlOrientation::xlDownward; break; case table::CellOrientation_STACKED: - NRetOrientation = uno::makeAny( excel::XlOrientation::xlVertical ); + NRetOrientation <<= excel::XlOrientation::xlVertical; break; default: - NRetOrientation = uno::makeAny( excel::XlOrientation::xlHorizontal ); + NRetOrientation <<= excel::XlOrientation::xlHorizontal; } } } @@ -390,7 +390,7 @@ ScVbaFormat< Ifc... >::getNumberFormatLocal( ) OUString sFormat; xNumberFormats->getByKey(nFormat)->getPropertyValue( FORMATSTRING ) >>= sFormat; - aRet = uno::makeAny( sFormat.toAsciiLowerCase() ); + aRet <<= sFormat.toAsciiLowerCase(); } } @@ -498,9 +498,9 @@ ScVbaFormat< Ifc... >::getIndentLevel( ) { sal_Int16 IndentLevel = 0; if ( ( mxPropertySet->getPropertyValue(sParaIndent) >>= IndentLevel ) ) - NRetIndentLevel = uno::makeAny( sal_Int32( rtl::math::round(static_cast<double>( IndentLevel ) / 352.8)) ); + NRetIndentLevel <<= sal_Int32( rtl::math::round(static_cast<double>( IndentLevel ) / 352.8)); else - NRetIndentLevel = uno::makeAny( sal_Int32(0) ); + NRetIndentLevel <<= sal_Int32(0); } } catch (const uno::Exception&) @@ -568,13 +568,13 @@ ScVbaFormat< Ifc... >::getLocked( ) const ScProtectionAttr& rProtAttr = static_cast<const ScProtectionAttr &>( pDataSet->Get(ATTR_PROTECTION) ); SfxItemState eState = pDataSet->GetItemState(ATTR_PROTECTION); if(eState != SfxItemState::DONTCARE) - aCellProtection = uno::makeAny(rProtAttr.GetProtection()); + aCellProtection <<= rProtAttr.GetProtection(); } else // fallback to propertyset { util::CellProtection cellProtection; mxPropertySet->getPropertyValue(sCellProt) >>= cellProtection; - aCellProtection = uno::makeAny( cellProtection.IsLocked ); + aCellProtection <<= cellProtection.IsLocked; } } } @@ -601,13 +601,13 @@ ScVbaFormat< Ifc... >::getFormulaHidden( ) const ScProtectionAttr& rProtAttr = static_cast<const ScProtectionAttr &>( pDataSet->Get(ATTR_PROTECTION) ); SfxItemState eState = pDataSet->GetItemState(ATTR_PROTECTION); if(eState != SfxItemState::DONTCARE) - aBoolRet = uno::makeAny(rProtAttr.GetHideFormula()); + aBoolRet <<= rProtAttr.GetHideFormula(); } else { util::CellProtection aCellProtection; mxPropertySet->getPropertyValue(sCellProt) >>= aCellProtection; - aBoolRet = uno::makeAny( aCellProtection.IsFormulaHidden ); + aBoolRet <<= aCellProtection.IsFormulaHidden; } } } @@ -664,10 +664,10 @@ ScVbaFormat< Ifc... >::setReadingOrder( const uno::Any& ReadingOrder ) switch(nReadingOrder) { case excel::Constants::xlLTR: - aVal = uno::makeAny( text::WritingMode_LR_TB ); + aVal <<= text::WritingMode_LR_TB; break; case excel::Constants::xlRTL: - aVal = uno::makeAny( text::WritingMode_RL_TB ); + aVal <<= text::WritingMode_RL_TB; break; case excel::Constants::xlContext: DebugHelper::basicexception(ERRCODE_BASIC_NOT_IMPLEMENTED, OUString()); @@ -698,13 +698,13 @@ ScVbaFormat< Ifc... >::getReadingOrder( ) if ( ( mxPropertySet->getPropertyValue(sWritingMode) ) >>= aWritingMode ) switch (aWritingMode){ case text::WritingMode_LR_TB: - NRetReadingOrder = uno::makeAny(excel::Constants::xlLTR); + NRetReadingOrder <<= excel::Constants::xlLTR; break; case text::WritingMode_RL_TB: - NRetReadingOrder = uno::makeAny(excel::Constants::xlRTL); + NRetReadingOrder <<= excel::Constants::xlRTL; break; default: - NRetReadingOrder = uno::makeAny(excel::Constants::xlRTL); + NRetReadingOrder <<= excel::Constants::xlRTL; } } } @@ -733,7 +733,7 @@ ScVbaFormat< Ifc... >::getNumberFormat( ) sal_Int32 nNewFormat = xNumberFormatTypes->getFormatForLocale(nFormat, m_aDefaultLocale ); OUString sFormat; xNumberFormats->getByKey(nNewFormat)->getPropertyValue( FORMATSTRING ) >>= sFormat; - aFormat = uno::makeAny( sFormat ); + aFormat <<= sFormat; } } catch (const uno::Exception& ) diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx index 7514695a553e..3e326f087c1c 100644 --- a/sc/source/ui/vba/vbaformatconditions.cxx +++ b/sc/source/ui/vba/vbaformatconditions.cxx @@ -166,9 +166,9 @@ ScVbaFormatConditions::Add( ::sal_Int32 _nType, const uno::Any& _aOperator, cons uno::Any aValue; if ( aType == sheet::ConditionOperator_FORMULA) - aValue = uno::makeAny( sheet::ConditionOperator_FORMULA ); + aValue <<= sheet::ConditionOperator_FORMULA; else - aValue = uno::makeAny( ScVbaFormatCondition::retrieveAPIOperator(_aOperator) ); + aValue <<= ScVbaFormatCondition::retrieveAPIOperator(_aOperator); beans::PropertyValue aProperty( "Operator", 0, aValue, beans::PropertyState_DIRECT_VALUE ); aPropertyValueVector.push_back( aProperty ); @@ -184,7 +184,7 @@ ScVbaFormatConditions::Add( ::sal_Int32 _nType, const uno::Any& _aOperator, cons aPropertyValueVector.push_back( aProp ); } aProperty.Name = "StyleName"; - aProperty.Value = uno::makeAny( sStyleName ); + aProperty.Value <<= sStyleName; mxSheetConditionalEntries->addNew(comphelper::containerToSequence(aPropertyValueVector)); for (sal_Int32 i = mxSheetConditionalEntries->getCount()-1; i >= 0; i--) diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx index 9799067e26e1..2898cbbd9d4d 100644 --- a/sc/source/ui/vba/vbaglobals.cxx +++ b/sc/source/ui/vba/vbaglobals.cxx @@ -42,9 +42,9 @@ ScVbaGlobals::ScVbaGlobals( uno::Sequence< uno::Any > const& aArgs, uno::Referen { uno::Sequence< beans::PropertyValue > aInitArgs( 2 ); aInitArgs[ 0 ].Name = "Application"; - aInitArgs[ 0 ].Value = uno::makeAny( getApplication() ); + aInitArgs[ 0 ].Value <<= getApplication(); aInitArgs[ 1 ].Name = "ExcelDocumentContext"; - aInitArgs[ 1 ].Value = uno::makeAny( getXSomethingFromArgs< frame::XModel >( aArgs, 0 ) ); + aInitArgs[ 1 ].Value <<= getXSomethingFromArgs< frame::XModel >( aArgs, 0 ); init( aInitArgs ); } diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index e11234142647..2eb8a4588c88 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -849,9 +849,9 @@ void CellValueGetter::visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< uno::Reference< table::XCellRange > xRange( xCell, uno::UNO_QUERY_THROW ); NumFormatHelper cellFormat( xRange ); if ( cellFormat.isBooleanType() ) - aValue = uno::makeAny( ( xCell->getValue() != 0.0 ) ); + aValue <<= ( xCell->getValue() != 0.0 ); else if ( cellFormat.isDateType() ) - aValue = uno::makeAny( bridge::oleautomation::Date( xCell->getValue() ) ); + aValue <<= bridge::oleautomation::Date( xCell->getValue() ); else aValue <<= xCell->getValue(); } @@ -2064,7 +2064,7 @@ ScVbaRange::Address( const uno::Any& RowAbsolute, const uno::Any& ColumnAbsolut // force external to be false // only first address should have the // document and sheet specifications - aExternalCopy = uno::makeAny(false); + aExternalCopy <<= false; } sAddress += xRange->Address( RowAbsolute, ColumnAbsolute, ReferenceStyle, aExternalCopy, RelativeTo ); } @@ -5601,7 +5601,7 @@ ScVbaRange::hasError() uno::Sequence< uno::Any > Params(1); uno::Reference< excel::XRange > aRange( this ); - Params[0] = uno::makeAny( aRange ); + Params[0] <<= aRange; uno::Sequence< sal_Int16 > OutParamIndex; uno::Sequence< uno::Any > OutParam; xInvoc->invoke( "IsError", Params, OutParamIndex, OutParam ) >>= dResult; diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx index 3c2bdda52ccd..fdecac1f9071 100644 --- a/sc/source/ui/vba/vbaworkbook.cxx +++ b/sc/source/ui/vba/vbaworkbook.cxx @@ -87,10 +87,10 @@ ScVbaWorkbook::Colors( const ::uno::Any& Index ) { sal_Int32 nIndex = 0; Index >>= nIndex; - aRet = uno::makeAny( XLRGBToOORGB( ColorData[ --nIndex ] ) ); + aRet <<= XLRGBToOORGB( ColorData[ --nIndex ] ); } else - aRet = uno::makeAny( ColorData ); + aRet <<= ColorData; return aRet; } @@ -104,29 +104,29 @@ bool ScVbaWorkbook::setFilterPropsFromFormat( sal_Int32 nFormat, uno::Sequence< switch( nFormat ) { case excel::XlFileFormat::xlCSV: - rProps[ index ].Value = uno::Any( OUString("Text - txt - csv (StarCalc)") ); + rProps[ index ].Value <<= OUString("Text - txt - csv (StarCalc)"); break; case excel::XlFileFormat::xlDBF4: - rProps[ index ].Value = uno::Any( OUString("DBF") ); + rProps[ index ].Value <<= OUString("DBF"); break; case excel::XlFileFormat::xlDIF: - rProps[ index ].Value = uno::Any( OUString("DIF") ); + rProps[ index ].Value <<= OUString("DIF"); break; case excel::XlFileFormat::xlWK3: - rProps[ index ].Value = uno::Any( OUString("Lotus") ); + rProps[ index ].Value <<= OUString("Lotus"); break; case excel::XlFileFormat::xlExcel4Workbook: - rProps[ index ].Value = uno::Any( OUString("MS Excel 4.0") ); + rProps[ index ].Value <<= OUString("MS Excel 4.0"); break; case excel::XlFileFormat::xlExcel5: - rProps[ index ].Value = uno::Any( OUString("MS Excel 5.0/95") ); + rProps[ index ].Value <<= OUString("MS Excel 5.0/95"); break; case excel::XlFileFormat::xlHtml: - rProps[ index ].Value = uno::Any( OUString("HTML (StarCalc)") ); + rProps[ index ].Value <<= OUString("HTML (StarCalc)"); break; case excel::XlFileFormat::xlExcel9795: default: - rProps[ index ].Value = uno::Any( OUString("MS Excel 97") ); + rProps[ index ].Value <<= OUString("MS Excel 97"); break; } bRes = true; diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 953a7ed7f0d3..88c6fbc49db9 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -1757,8 +1757,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) Any* pArray = aSeq.getArray(); PropertyValue aParam; aParam.Name = "ParentWindow"; - aParam.Value = makeAny(xDialogParentWindow); - pArray[0] = makeAny(aParam); + aParam.Value <<= xDialogParentWindow; + pArray[0] <<= aParam; xInit->initialize( aSeq ); //execute dialog |