diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-03 08:39:03 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-05-04 12:39:40 +0200 |
commit | 58a32075ca4f457f570af75aef368dd6c389aca7 (patch) | |
tree | e437dcbdeb248b4316cb8a9281d1543419853f6d /writerfilter/source/dmapper/FormControlHelper.cxx | |
parent | 7d47700972d267fe7c5270c5dadd45a523a2baec (diff) |
use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'writerfilter/source/dmapper/FormControlHelper.cxx')
-rw-r--r-- | writerfilter/source/dmapper/FormControlHelper.cxx | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/writerfilter/source/dmapper/FormControlHelper.cxx b/writerfilter/source/dmapper/FormControlHelper.cxx index 58c67b12d9c9..9eabcea5ed0c 100644 --- a/writerfilter/source/dmapper/FormControlHelper.cxx +++ b/writerfilter/source/dmapper/FormControlHelper.cxx @@ -183,25 +183,19 @@ bool FormControlHelper::createCheckbox(uno::Reference<text::XTextRange> const& x m_pImpl->aSize.Width = nCheckBoxHeight; m_pImpl->aSize.Height = m_pImpl->aSize.Width; - uno::Any aAny; if (!m_pFFData->getStatusText().isEmpty()) { - aAny <<= m_pFFData->getStatusText(); - - xPropSet->setPropertyValue("HelpText", aAny); + xPropSet->setPropertyValue("HelpText", uno::Any(m_pFFData->getStatusText())); } - aAny <<= m_pFFData->getCheckboxChecked(); - xPropSet->setPropertyValue("DefaultState", aAny); + xPropSet->setPropertyValue("DefaultState", uno::Any(m_pFFData->getCheckboxChecked())); if (!m_pFFData->getHelpText().isEmpty()) { - aAny <<= m_pFFData->getHelpText(); - xPropSet->setPropertyValue("HelpF1Text", aAny); + xPropSet->setPropertyValue("HelpF1Text", uno::Any(m_pFFData->getHelpText())); } - aAny <<= rControlName; - xPropSet->setPropertyValue("Name", aAny); + xPropSet->setPropertyValue("Name", uno::Any(rControlName)); return true; } @@ -317,17 +311,12 @@ void FormControlHelper::insertControl(uno::Reference<text::XTextRange> const& xT uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); sal_uInt16 nTmp = text::TextContentAnchorType_AS_CHARACTER; - aAny <<= nTmp; - - xShapeProps->setPropertyValue("AnchorType", aAny); + xShapeProps->setPropertyValue("AnchorType", uno::makeAny<sal_uInt16>(nTmp)); nTmp = text::VertOrientation::CENTER; - aAny <<= nTmp; - xShapeProps->setPropertyValue("VertOrient", aAny); - - aAny <<= xTextRange; + xShapeProps->setPropertyValue("VertOrient", uno::makeAny<sal_uInt16>(nTmp)); - xShapeProps->setPropertyValue("TextRange", aAny); + xShapeProps->setPropertyValue("TextRange", uno::Any(xTextRange)); uno::Reference<drawing::XControlShape> xControlShape(xShape, uno::UNO_QUERY); uno::Reference<awt::XControlModel> xControlModel(m_pImpl->rFormComponent, uno::UNO_QUERY); |