summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-05-30 15:14:03 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-05-30 15:14:03 +0200
commit8fec9e7e4ca97e14551a737583226f89b0c6eecd (patch)
tree97b0c9e68fd2c3ad75f9b7d52a76a134522b8350 /sw
parente630df7853a62225cd77fc4262689ef5607d2907 (diff)
Some clean up of uses of css::uno::Any::setValue
Change-Id: I04e8aef35a6083b61d775c8eb3f96757da2b31bd
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docbasic.cxx2
-rw-r--r--sw/source/core/fields/docufld.cxx7
-rw-r--r--sw/source/core/layout/atrfrm.cxx4
-rw-r--r--sw/source/core/para/paratr.cxx2
-rw-r--r--sw/source/core/unocore/unocoll.cxx14
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx10
-rw-r--r--sw/source/core/unocore/unodraw.cxx9
-rw-r--r--sw/source/core/unocore/unofield.cxx2
-rw-r--r--sw/source/core/unocore/unoframe.cxx4
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx2
-rw-r--r--sw/source/core/unocore/unosett.cxx4
-rw-r--r--sw/source/core/unocore/unostyle.cxx4
-rw-r--r--sw/source/core/unocore/unotbl.cxx2
-rw-r--r--sw/source/filter/html/htmlform.cxx22
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx2
-rw-r--r--sw/source/uibase/shells/drformsh.cxx3
-rw-r--r--sw/source/uibase/shells/textdrw.cxx3
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx26
-rw-r--r--sw/source/uibase/uno/unotxvw.cxx18
-rw-r--r--sw/source/uibase/utlui/uiitems.cxx2
-rw-r--r--sw/source/uibase/utlui/unotools.cxx5
21 files changed, 63 insertions, 84 deletions
diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx
index 43275185f056..b189e573224e 100644
--- a/sw/source/core/doc/docbasic.cxx
+++ b/sw/source/core/doc/docbasic.cxx
@@ -63,7 +63,7 @@ static Sequence<Any> *lcl_docbasic_convertArgs( SbxArray& rArgs )
pUnoArgs[i] <<= (sal_Int32)pVar->GetLong();
break;
default:
- pUnoArgs[i].setValue(nullptr, cppu::UnoType<void>::get());
+ pUnoArgs[i].clear();
break;
}
}
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index f20e418784b7..578fa595acdb 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -258,7 +258,7 @@ bool SwPageNumberField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
eType = text::PageNumberType_PREV;
else if(nSubType == PG_NEXT)
eType = text::PageNumberType_NEXT;
- rAny.setValue(&eType, cppu::UnoType<text::PageNumberType>::get());
+ rAny <<= eType;
}
break;
case FIELD_PROP_PAR1:
@@ -1192,7 +1192,7 @@ bool SwDocInfoField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
case FIELD_PROP_DOUBLE:
{
double fVal = GetValue();
- rAny.setValue(&fVal, cppu::UnoType<decltype(fVal)>::get());
+ rAny <<= fVal;
}
break;
case FIELD_PROP_PAR3:
@@ -1771,8 +1771,7 @@ bool SwPostItField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
}
case FIELD_PROP_DATE:
{
- css::util::Date aSetDate = aDateTime.GetUNODate();
- rAny.setValue(&aSetDate, ::cppu::UnoType<util::Date>::get());
+ rAny <<= aDateTime.GetUNODate();
}
break;
case FIELD_PROP_DATE_TIME:
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 849af3b88ed0..72b0181d3826 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -218,7 +218,7 @@ bool SwFormatFrameSize::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
awt::Size aTmp;
aTmp.Height = convertTwipToMm100(m_aSize.Height());
aTmp.Width = convertTwipToMm100(m_aSize.Width());
- rVal.setValue(&aTmp, ::cppu::UnoType<awt::Size>::get());
+ rVal <<= aTmp;
}
break;
case MID_FRMSIZE_REL_HEIGHT:
@@ -1050,7 +1050,7 @@ bool SwFormatCol::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
else
{
uno::Reference< text::XTextColumns > xCols = new SwXTextColumns(*this);
- rVal.setValue(&xCols, cppu::UnoType<text::XTextColumns>::get());
+ rVal <<= xCols;
}
return true;
}
diff --git a/sw/source/core/para/paratr.cxx b/sw/source/core/para/paratr.cxx
index e017364d4cc3..44abc86f09f1 100644
--- a/sw/source/core/para/paratr.cxx
+++ b/sw/source/core/para/paratr.cxx
@@ -136,7 +136,7 @@ bool SwFormatDrop::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
aDrop.Lines = nLines ;
aDrop.Count = nChars ;
aDrop.Distance = convertTwipToMm100(nDistance);
- rVal.setValue(&aDrop, ::cppu::UnoType<style::DropCapFormat>::get());
+ rVal <<= aDrop;
}
break;
case MID_DROPCAP_WHOLE_WORD:
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 09ee314ace34..4a6adb3a45b2 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -856,8 +856,7 @@ uno::Any SAL_CALL SwXTextTables::getByIndex(sal_Int32 nIndex)
{
SwFrameFormat& rFormat = GetDoc()->GetTableFrameFormat(nIndex, true);
uno::Reference< XTextTable > xTable = SwXTextTables::GetObject(rFormat);
- aRet.setValue( &xTable,
- cppu::UnoType<XTextTable>::get());
+ aRet <<= xTable;
}
else
throw IndexOutOfBoundsException();
@@ -882,8 +881,7 @@ uno::Any SwXTextTables::getByName(const OUString& rItemName)
if (rItemName == rFormat.GetName())
{
xTable = SwXTextTables::GetObject(rFormat);
- aRet.setValue(&xTable,
- cppu::UnoType<XTextTable>::get());
+ aRet <<= xTable;
break;
}
}
@@ -1447,7 +1445,7 @@ uno::Any SwXTextSections::getByName(const OUString& rName)
&& (rName == pFormat->GetSection()->GetSectionName()))
{
xSect = GetObject(*pFormat);
- aRet.setValue(&xSect, cppu::UnoType<XTextSection>::get());
+ aRet <<= xSect;
break;
}
}
@@ -1727,7 +1725,7 @@ uno::Any SwXNumberingRulesCollection::getByIndex(sal_Int32 nIndex)
if ( static_cast<size_t>(nIndex) < GetDoc()->GetNumRuleTable().size() )
{
xRef = new SwXNumberingRules( *GetDoc()->GetNumRuleTable()[ nIndex ], GetDoc());
- aRet.setValue(&xRef, cppu::UnoType<XIndexReplace>::get());
+ aRet <<= xRef;
}
if(!xRef.is())
@@ -1897,7 +1895,7 @@ uno::Any SwXReferenceMarks::getByIndex(sal_Int32 nIndex)
if(pMark)
{
xRef = SwXReferenceMark::CreateXReferenceMark(*GetDoc(), pMark);
- aRet.setValue(&xRef, cppu::UnoType<XTextContent>::get());
+ aRet <<= xRef;
}
}
if(!xRef.is())
@@ -1918,7 +1916,7 @@ uno::Any SwXReferenceMarks::getByName(const OUString& rName)
{
uno::Reference<XTextContent> const xRef =
SwXReferenceMark::CreateXReferenceMark(*GetDoc(), pMark);
- aRet.setValue(&xRef, cppu::UnoType<XTextContent>::get());
+ aRet <<= xRef;
}
else
throw NoSuchElementException();
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 22b41fed67fc..f3a725a53885 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -544,13 +544,13 @@ bool getCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry
if(FN_UNO_TEXT_TABLE == rEntry.nWID)
{
uno::Reference< XTextTable > xTable = SwXTextTables::GetObject(*pTableFormat);
- pAny->setValue(&xTable, cppu::UnoType<XTextTable>::get());
+ *pAny <<= xTable;
}
else
{
SwTableBox* pBox = pSttNode->GetTableBox();
uno::Reference< XCell > xCell = SwXCell::CreateXCell(pTableFormat, pBox);
- pAny->setValue(&xCell, cppu::UnoType<XCell>::get());
+ *pAny <<= xCell;
}
}
}
@@ -585,7 +585,7 @@ bool getCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry
if( pAny )
{
uno::Reference< XTextSection > xSect = SwXTextSections::GetObject( *pSect->GetFormat() );
- pAny->setValue(&xSect, cppu::UnoType<XTextSection>::get());
+ *pAny <<= xSect;
}
}
else
@@ -635,7 +635,7 @@ bool getCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry
uno::Reference<XTextContent> const xRef =
SwXReferenceMark::CreateXReferenceMark(*rPam.GetDoc(),
const_cast<SwFormatRefMark*>(&rRef));
- pAny->setValue(&xRef, cppu::UnoType<XTextContent>::get());
+ *pAny <<= xRef;
}
}
else
@@ -885,7 +885,7 @@ void getNumberingProperty(SwPaM& rPam, PropertyState& eState, Any * pAny )
{
uno::Reference< XIndexReplace > xNum = new SwXNumberingRules(*pNumRule);
if ( pAny )
- pAny->setValue(&xNum, cppu::UnoType<XIndexReplace>::get());
+ *pAny <<= xNum;
eState = PropertyState_DIRECT_VALUE;
}
else
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 10024027c658..a12fa5dd1089 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1529,7 +1529,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
Point aPt = pObj->GetAnchorPos();
awt::Point aPoint( convertTwipToMm100( aPt.X() ),
convertTwipToMm100( aPt.Y() ) );
- aRet.setValue(&aPoint, cppu::UnoType<awt::Point>::get());
+ aRet <<= aPoint;
}
}
// #i26791# - special handling for FN_TEXT_RANGE
@@ -1552,7 +1552,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
*pFormat->GetDoc(),
*aAnchor.GetContentAnchor(),
nullptr );
- aRet.setValue(&xTextRange, cppu::UnoType<text::XTextRange>::get());
+ aRet <<= xTextRange;
}
else
{
@@ -1664,15 +1664,14 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
pItem = pImpl->GetSurround();
break;
case FN_TEXT_RANGE :
- aRet.setValue(&pImpl->GetTextRange(), cppu::UnoType<text::XTextRange>::get());
+ aRet <<= pImpl->GetTextRange();
break;
case RES_OPAQUE :
aRet <<= pImpl->GetOpaque();
break;
case FN_ANCHOR_POSITION :
{
- awt::Point aPoint;
- aRet.setValue(&aPoint, cppu::UnoType<awt::Point>::get());
+ aRet <<= awt::Point();
}
break;
// #i26791#
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 89e5f1780cd7..b0a084f78322 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -2334,7 +2334,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::Sequence<text::TextContentAnchorType> aTypes(1);
text::TextContentAnchorType* pArray = aTypes.getArray();
pArray[0] = text::TextContentAnchorType_AS_CHARACTER;
- aRet.setValue(&aTypes, cppu::UnoType<uno::Sequence<text::TextContentAnchorType>>::get());
+ aRet <<= aTypes;
}
break;
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 2bb4a87ce860..6cbff2e618a0 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -2021,7 +2021,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
pArray[2] = text::TextContentAnchorType_AT_PAGE;
pArray[3] = text::TextContentAnchorType_AT_FRAME;
pArray[4] = text::TextContentAnchorType_AT_CHARACTER;
- aAny.setValue(&aTypes, cppu::UnoType<uno::Sequence<text::TextContentAnchorType>>::get());
+ aAny <<= aTypes;
}
else if(pFormat)
{
@@ -2169,7 +2169,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
awt::Size aTmp;
aTmp.Width = convertTwipToMm100(aActSize.Width());
aTmp.Height = convertTwipToMm100(aActSize.Height());
- aAny.setValue(&aTmp, ::cppu::UnoType<awt::Size>::get());
+ aAny <<= aTmp;
}
}
else if(FN_PARAM_LINK_DISPLAY_NAME == pEntry->nWID)
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index 39417de5c410..7f7573261310 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -894,7 +894,7 @@ bool ::sw::GetDefaultTextContentValue(
{ uno::Sequence<text::TextContentAnchorType> aTypes(1);
text::TextContentAnchorType* pArray = aTypes.getArray();
pArray[0] = text::TextContentAnchorType_AT_PARAGRAPH;
- rAny.setValue(&aTypes, cppu::UnoType<uno::Sequence<text::TextContentAnchorType>>::get());
+ rAny <<= aTypes;
}
break;
default:
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index cd84531a3558..9f9991aaed89 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1265,14 +1265,14 @@ uno::Any SwXNumberingRules::getByIndex(sal_Int32 nIndex)
{
uno::Sequence<beans::PropertyValue> aRet = GetNumberingRuleByIndex(
*pRule, nIndex);
- aVal.setValue(&aRet, cppu::UnoType<uno::Sequence<beans::PropertyValue>>::get());
+ aVal <<= aRet;
}
else if(pDocShell)
{
uno::Sequence<beans::PropertyValue> aRet = GetNumberingRuleByIndex(
*pDocShell->GetDoc()->GetOutlineNumRule(), nIndex);
- aVal.setValue(&aRet, cppu::UnoType<uno::Sequence<beans::PropertyValue>>::get());
+ aVal <<= aRet;
}
else
throw uno::RuntimeException();
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 0c60416f6ee1..ae6d428c18fe 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -3326,7 +3326,7 @@ uno::Any SwXAutoStyles::getByIndex(sal_Int32 nIndex)
default:
;
}
- aRet.setValue(&aRef, cppu::UnoType<style::XAutoStyleFamily>::get());
+ aRet <<= aRef;
}
else
throw uno::RuntimeException();
@@ -3724,7 +3724,7 @@ uno::Any SwXAutoStylesEnumerator::nextElement( )
SfxItemSet_Pointer_t pNextSet = m_pImpl->nextElement();
uno::Reference< style::XAutoStyle > xAutoStyle = new SwXAutoStyle(m_pImpl->getDoc(),
pNextSet, m_pImpl->getFamily());
- aRet.setValue(&xAutoStyle, cppu::UnoType<style::XAutoStyle>::get());
+ aRet <<= xAutoStyle;
}
return aRet;
}
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index aa4057441de4..ba58c94ca6de 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -657,7 +657,7 @@ static void lcl_GetTableSeparators(uno::Any& rRet, SwTable* pTable, SwTableBox*
}
}
if(!bError)
- rRet.setValue(&aColSeq, cppu::UnoType<uno::Sequence< text::TableColumnSeparator>>::get());
+ rRet <<= aColSeq;
}
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 5fb9e1ade649..aeb520d418f6 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -630,7 +630,7 @@ static void lcl_html_setFixedFontProperty(
rPropSet->setPropertyValue("FontPitch", aTmp );
float fVal(10.);
- aTmp.setValue( &fVal, cppu::UnoType<decltype(fVal)>::get());
+ aTmp <<= fVal;
rPropSet->setPropertyValue("FontHeight", aTmp );
}
@@ -1000,7 +1000,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
{
float fVal = static_cast< float >(
(static_cast<const SvxFontHeightItem *>(pItem)->GetHeight()) / 20.0 );
- aTmp.setValue( &fVal, cppu::UnoType<decltype(fVal)>::get());
+ aTmp <<= fVal;
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
@@ -1047,7 +1047,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
{
float fVal = VCLUnoHelper::ConvertFontWeight(
static_cast<const SvxWeightItem *>(pItem)->GetWeight() );
- aTmp.setValue( &fVal, cppu::UnoType<decltype(fVal)>::get());
+ aTmp <<= fVal;
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
@@ -1176,8 +1176,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
xTextRg = new SwXTextRange( *m_pPam, xDummyTextRef );
}
- aTmp.setValue( &xTextRg,
- cppu::UnoType<text::XTextRange>::get());
+ aTmp <<= xTextRg;
xShapePropSet->setPropertyValue("TextRange", aTmp );
}
@@ -1354,13 +1353,11 @@ void SwHTMLParser::NewForm( bool bAppend )
xFormPropSet->setPropertyValue("TargetURL",
aTmp );
- FormSubmitMethod eMethod = (FormSubmitMethod)nMethod;
- aTmp.setValue( &eMethod, cppu::UnoType<FormSubmitMethod>::get());
+ aTmp <<= FormSubmitMethod(nMethod);
xFormPropSet->setPropertyValue("SubmitMethod",
aTmp );
- FormSubmitEncoding eEncType = (FormSubmitEncoding)nEncType;
- aTmp.setValue( &eEncType, cppu::UnoType<FormSubmitEncoding>::get());
+ aTmp <<= FormSubmitEncoding(nEncType);
xFormPropSet->setPropertyValue("SubmitEncoding", aTmp );
if( !sTarget.isEmpty() )
@@ -1700,9 +1697,7 @@ void SwHTMLParser::InsertInput()
aSz = Application::GetDefaultDevice()
->PixelToLogic( aSz, MapMode( MAP_100TH_MM ) );
}
- FormButtonType eButtonType = FormButtonType_SUBMIT;
- aTmp.setValue( &eButtonType,
- cppu::UnoType<FormButtonType>::get());
+ aTmp <<= FormButtonType_SUBMIT;
xPropSet->setPropertyValue("ButtonType", aTmp );
aTmp <<= (sal_Int16) 0 ;
@@ -1738,8 +1733,7 @@ void SwHTMLParser::InsertInput()
xPropSet->setPropertyValue("Label",
aTmp );
- aTmp.setValue( &eButtonType,
- cppu::UnoType<FormButtonType>::get());
+ aTmp <<= eButtonType;
xPropSet->setPropertyValue("ButtonType", aTmp );
bMinWidth = bMinHeight = true;
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 7b0d024df430..4882660c1f68 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -2596,7 +2596,7 @@ bool SwMSConvertControls::InsertControl(
uno::Reference< text::XTextRange > xTextRg =
new SwXTextRange( *pPaM, xDummyTextRef );
- aTmp.setValue(&xTextRg, cppu::UnoType<text::XTextRange>::get());
+ aTmp <<= xTextRg;
xShapePropSet->setPropertyValue("TextRange", aTmp );
// Das Control-Model am Control-Shape setzen
diff --git a/sw/source/uibase/shells/drformsh.cxx b/sw/source/uibase/shells/drformsh.cxx
index 50058a1b65f3..360d99bc0d8e 100644
--- a/sw/source/uibase/shells/drformsh.cxx
+++ b/sw/source/uibase/shells/drformsh.cxx
@@ -142,8 +142,7 @@ void SwDrawFormShell::Execute(SfxRequest &rReq)
xPropSet->setPropertyValue( "TargetFrame", aTmp );
}
- form::FormButtonType eButtonType = form::FormButtonType_URL;
- aTmp.setValue( &eButtonType, ::cppu::UnoType<form::FormButtonType>::get());
+ aTmp <<= form::FormButtonType_URL;
xPropSet->setPropertyValue( "ButtonType", aTmp );
}
}
diff --git a/sw/source/uibase/shells/textdrw.cxx b/sw/source/uibase/shells/textdrw.cxx
index 64d527e685a7..256cbe3722ca 100644
--- a/sw/source/uibase/shells/textdrw.cxx
+++ b/sw/source/uibase/shells/textdrw.cxx
@@ -104,8 +104,7 @@ void SwBaseShell::InsertURLButton(const OUString& rURL, const OUString& rTarget,
xPropSet->setPropertyValue( "TargetFrame", aTmp );
}
- form::FormButtonType eButtonType = form::FormButtonType_URL;
- aTmp.setValue( &eButtonType, ::cppu::UnoType<form::FormButtonType>::get());
+ aTmp <<= form::FormButtonType_URL;
xPropSet->setPropertyValue( "ButtonType", aTmp );
#if HAVE_FEATURE_AVMEDIA
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 3a8a7ada5119..28ecfb6ab4fe 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3736,56 +3736,49 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName)
Reference< XNameAccess > xTables = new SwXLinkNameAccessWrapper(
pxDoc->getTextTables(), rName, sSuffix );
- Reference< XPropertySet > xRet(xTables, UNO_QUERY);
- aRet.setValue(&xRet, cppu::UnoType<XPropertySet>::get());
+ aRet <<= Reference< XPropertySet >(xTables, UNO_QUERY);
}
else if(rName == sFrames)
{
sSuffix += "frame";
Reference< XNameAccess > xTables = new SwXLinkNameAccessWrapper(
pxDoc->getTextFrames(), rName, sSuffix );
- Reference< XPropertySet > xRet(xTables, UNO_QUERY);
- aRet.setValue(&xRet, cppu::UnoType<XPropertySet>::get());
+ aRet <<= Reference< XPropertySet >(xTables, UNO_QUERY);
}
else if(rName == sSections)
{
sSuffix += "region";
Reference< XNameAccess > xTables = new SwXLinkNameAccessWrapper(
pxDoc->getTextSections(), rName, sSuffix );
- Reference< XPropertySet > xRet(xTables, UNO_QUERY);
- aRet.setValue(&xRet, cppu::UnoType<XPropertySet>::get());
+ aRet <<= Reference< XPropertySet >(xTables, UNO_QUERY);
}
else if(rName == sGraphics)
{
sSuffix += "graphic";
Reference< XNameAccess > xTables = new SwXLinkNameAccessWrapper(
pxDoc->getGraphicObjects(), rName, sSuffix );
- Reference< XPropertySet > xRet(xTables, UNO_QUERY);
- aRet.setValue(&xRet, cppu::UnoType<XPropertySet>::get());
+ aRet <<= Reference< XPropertySet >(xTables, UNO_QUERY);
}
else if(rName == sOLEs)
{
sSuffix += "ole";
Reference< XNameAccess > xTables = new SwXLinkNameAccessWrapper(
pxDoc->getEmbeddedObjects(), rName, sSuffix );
- Reference< XPropertySet > xRet(xTables, UNO_QUERY);
- aRet.setValue(&xRet, cppu::UnoType<XPropertySet>::get());
+ aRet <<= Reference< XPropertySet >(xTables, UNO_QUERY);
}
else if(rName == sOutlines)
{
sSuffix += "outline";
Reference< XNameAccess > xTables = new SwXLinkNameAccessWrapper(
*pxDoc, rName, sSuffix );
- Reference< XPropertySet > xRet(xTables, UNO_QUERY);
- aRet.setValue(&xRet, cppu::UnoType<XPropertySet>::get());
+ aRet <<= Reference< XPropertySet >(xTables, UNO_QUERY);
}
else if(rName == sBookmarks)
{
sSuffix.clear();
Reference< XNameAccess > xBkms = new SwXLinkNameAccessWrapper(
pxDoc->getBookmarks(), rName, sSuffix );
- Reference< XPropertySet > xRet(xBkms, UNO_QUERY);
- aRet.setValue(&xRet, cppu::UnoType<XPropertySet>::get());
+ aRet <<= Reference< XPropertySet >(xBkms, UNO_QUERY);
}
else
throw NoSuchElementException();
@@ -3903,7 +3896,7 @@ Any SwXLinkNameAccessWrapper::getByName(const OUString& rName)
if(sParam == lcl_CreateOutlineString(i, rOutlineNodes, pOutlRule))
{
Reference< XPropertySet > xOutline = new SwXOutlineTarget(sParam);
- aRet.setValue(&xOutline, cppu::UnoType<XPropertySet>::get());
+ aRet <<= xOutline;
bFound = true;
}
}
@@ -4069,8 +4062,7 @@ static Any lcl_GetDisplayBitmap(const OUString& _sLinkSuffix)
ImageList aEntryImages( SW_RES(IMG_NAVI_ENTRYBMP) );
const Image& rImage = aEntryImages.GetImage( (int)nImgId + 2000 );
Bitmap aBitmap( rImage.GetBitmapEx().GetBitmap() );
- Reference<awt::XBitmap> xBmp = VCLUnoHelper::CreateBitmap( aBitmap );
- aRet.setValue( &xBmp, cppu::UnoType<awt::XBitmap>::get());
+ aRet <<= VCLUnoHelper::CreateBitmap( aBitmap );
}
return aRet;
}
diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx
index ecbb9df8a620..22a2648547b4 100644
--- a/sw/source/uibase/uno/unotxvw.cxx
+++ b/sw/source/uibase/uno/unotxvw.cxx
@@ -172,47 +172,47 @@ uno::Any SAL_CALL SwXTextView::queryInterface( const uno::Type& aType )
if(aType == cppu::UnoType<view::XSelectionSupplier>::get())
{
uno::Reference<view::XSelectionSupplier> xRet = this;
- aRet.setValue(&xRet, aType);
+ aRet <<= xRet;
}
else if(aType == cppu::UnoType<lang::XServiceInfo>::get())
{
uno::Reference<lang::XServiceInfo> xRet = this;
- aRet.setValue(&xRet, aType);
+ aRet <<= xRet;
}
else if(aType == cppu::UnoType<view::XControlAccess>::get())
{
uno::Reference<view::XControlAccess> xRet = this;
- aRet.setValue(&xRet, aType);
+ aRet <<= xRet;
}
else if(aType == cppu::UnoType<view::XFormLayerAccess>::get())
{
uno::Reference<view::XFormLayerAccess> xRet = this;
- aRet.setValue(&xRet, aType);
+ aRet <<= xRet;
}
else if(aType == cppu::UnoType<text::XTextViewCursorSupplier>::get())
{
uno::Reference<text::XTextViewCursorSupplier> xRet = this;
- aRet.setValue(&xRet, aType);
+ aRet <<= xRet;
}
else if(aType == cppu::UnoType<view::XViewSettingsSupplier>::get())
{
uno::Reference<view::XViewSettingsSupplier> xRet = this;
- aRet.setValue(&xRet, aType);
+ aRet <<= xRet;
}
else if(aType == cppu::UnoType<XRubySelection>::get())
{
uno::Reference<XRubySelection> xRet = this;
- aRet.setValue(&xRet, aType);
+ aRet <<= xRet;
}
else if(aType == cppu::UnoType<XPropertySet>::get())
{
uno::Reference<XPropertySet> xRet = this;
- aRet.setValue(&xRet, aType);
+ aRet <<= xRet;
}
else if(aType == cppu::UnoType<datatransfer::XTransferableSupplier>::get())
{
uno::Reference<datatransfer::XTransferableSupplier> xRet = this;
- aRet.setValue(&xRet, aType);
+ aRet <<= xRet;
}
else
aRet = SfxBaseController::queryInterface(aType);
diff --git a/sw/source/uibase/utlui/uiitems.cxx b/sw/source/uibase/utlui/uiitems.cxx
index 42fc1d2b6e34..7c20a88e157e 100644
--- a/sw/source/uibase/utlui/uiitems.cxx
+++ b/sw/source/uibase/utlui/uiitems.cxx
@@ -251,7 +251,7 @@ bool SwUINumRuleItem::operator==( const SfxPoolItem& rAttr ) const
bool SwUINumRuleItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
uno::Reference< container::XIndexReplace >xRules = new SwXNumberingRules(*pRule);
- rVal.setValue(&xRules, cppu::UnoType<container::XIndexReplace>::get());
+ rVal <<= xRules;
return true;
}
bool SwUINumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx
index da7512c57687..f83991a8e35b 100644
--- a/sw/source/uibase/utlui/unotools.cxx
+++ b/sw/source/uibase/utlui/unotools.cxx
@@ -145,8 +145,7 @@ void SwOneExampleFrame::CreateControl()
pValues[1].Value <<= OUString("-RB");
pValues[2].Name = "Referer";
pValues[2].Value <<= OUString("private:user");
- uno::Any aArgs;
- aArgs.setValue(&aSeq, cppu::UnoType<uno::Sequence<beans::PropertyValue>>::get());
+ uno::Any aArgs(aSeq);
xPrSet->setPropertyValue( "LoaderArguments", aArgs );
//save and set readonly???
@@ -356,7 +355,7 @@ IMPL_LINK_TYPED( SwOneExampleFrame, TimeoutHdl, Idle*, pTimer, void )
aSize >>= aPSize;
//TODO: set page width to card width
aPSize.Width = 10000;
- aSize.setValue(&aPSize, ::cppu::UnoType<awt::Size>::get());
+ aSize <<= aPSize;
xPProp->setPropertyValue(UNO_NAME_SIZE, aSize);
uno::Any aZero; aZero <<= (sal_Int32)0;