diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-03 16:01:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-06 05:59:56 +0000 |
commit | aadf790bbceb1cde94c2a6fe8edfb9951edca0a0 (patch) | |
tree | f48bea8591e2def6579c5095989ea425211a0063 /sw/source | |
parent | 6b58caf0597fed21c78fd806e5f2cef6fc43c502 (diff) |
remove some unnecessary use of OUString constructor
found with
git grep -nP '<<= OUString\(\w*[A-Za-z]+'
Change-Id: I43354842f1e0418fb292f2e8e0cb30f1229d1c67
Reviewed-on: https://gerrit.libreoffice.org/34864
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/fields/expfld.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unoframe.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/html/htmlform.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmresultdialogs.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/index/cntex.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/config/fontcfg.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/dbui/mailmergehelper.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/drformsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/textdrw.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/uno/unoatxt.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 4 |
12 files changed, 26 insertions, 26 deletions
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 1beea37c2d6d..1f1e6888d758 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -1101,7 +1101,7 @@ bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const rAny <<= GetInputFlag(); break; case FIELD_PROP_PAR4: - rAny <<= OUString(GetExpStr()); + rAny <<= GetExpStr(); break; default: return SwField::QueryValue(rAny, nWhichId); diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 8ea12cb3889b..6ec8c97b48c2 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2134,7 +2134,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) } else if(FN_UNO_FRAME_STYLE_NAME == pEntry->nWID) { - aAny <<= OUString(SwStyleNameMapper::GetProgName(pFormat->DerivedFrom()->GetName(), SwGetPoolIdFromName::FrmFmt ) ); + aAny <<= SwStyleNameMapper::GetProgName(pFormat->DerivedFrom()->GetName(), SwGetPoolIdFromName::FrmFmt ); } // #i73249# else if( FN_UNO_TITLE == pEntry->nWID ) @@ -2142,7 +2142,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) SwFlyFrameFormat& rFlyFormat = dynamic_cast<SwFlyFrameFormat&>(*pFormat); // assure that <SdrObject> instance exists. GetOrCreateSdrObject(rFlyFormat); - aAny <<= OUString(rFlyFormat.GetObjTitle()); + aAny <<= rFlyFormat.GetObjTitle(); } // New attribute Description else if( FN_UNO_DESCRIPTION == pEntry->nWID ) @@ -2150,7 +2150,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) SwFlyFrameFormat& rFlyFormat = dynamic_cast<SwFlyFrameFormat&>(*pFormat); // assure that <SdrObject> instance exists. GetOrCreateSdrObject(rFlyFormat); - aAny <<= OUString(rFlyFormat.GetObjDescription()); + aAny <<= rFlyFormat.GetObjDescription(); } else if(eType == FLYCNTTYPE_GRF && (rPropertyName == UNO_NAME_ACTUAL_SIZE)) @@ -2223,7 +2223,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) aAny <<= aHexCLSID; else if(FN_UNO_STREAM_NAME == pEntry->nWID) { - aAny <<= OUString(pOleNode->GetOLEObj().GetCurrentPersistName()); + aAny <<= pOleNode->GetOLEObj().GetCurrentPersistName(); } else if(FN_EMBEDDED_OBJECT == pEntry->nWID) { diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 53e479bb6f33..4a09292df98f 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -1321,7 +1321,7 @@ void SwHTMLParser::NewForm( bool bAppend ) uno::Reference< beans::XPropertySet > xFormPropSet( xForm, UNO_QUERY ); Any aTmp; - aTmp <<= OUString(sName); + aTmp <<= sName; xFormPropSet->setPropertyValue("Name", aTmp ); if( !aAction.isEmpty() ) @@ -1334,7 +1334,7 @@ void SwHTMLParser::NewForm( bool bAppend ) INetURLObject aURLObj( m_aPathToFile ); aAction = aURLObj.GetPartBeforeLastName(); } - aTmp <<= OUString(aAction); + aTmp <<= aAction; xFormPropSet->setPropertyValue("TargetURL", aTmp ); @@ -1614,7 +1614,7 @@ void SwHTMLParser::InsertInput() uno::Reference< beans::XPropertySet > xPropSet( xFComp, UNO_QUERY ); Any aTmp; - aTmp <<= OUString(sName); + aTmp <<= sName; xPropSet->setPropertyValue("Name", aTmp ); if( HTML_IT_HIDDEN != eType ) @@ -2004,7 +2004,7 @@ void SwHTMLParser::NewTextArea() uno::Reference< beans::XPropertySet > xPropSet( xFComp, UNO_QUERY ); Any aTmp; - aTmp <<= OUString(sName); + aTmp <<= sName; xPropSet->setPropertyValue("Name", aTmp ); aTmp <<= true; @@ -2272,7 +2272,7 @@ void SwHTMLParser::NewSelect() uno::Reference< beans::XPropertySet > xPropSet( xFComp, UNO_QUERY ); Any aTmp; - aTmp <<= OUString(sName); + aTmp <<= sName; xPropSet->setPropertyValue("Name", aTmp ); if( nTabIndex >= TABINDEX_MIN && nTabIndex <= TABINDEX_MAX ) diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index a564ae7d9c91..8b9e4e25aad2 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4704,7 +4704,7 @@ void SwWW8ImplReader::ReadDocVars() { const OUString &rName = aDocVarStrings[i]; uno::Any aValue; - aValue <<= OUString(aDocValueStrings[i]); + aValue <<= rName; try { xUserDefinedProps->addProperty( rName, beans::PropertyAttribute::REMOVABLE, diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index 53fb96fc7339..a33cf9950900 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -648,7 +648,7 @@ IMPL_LINK(SwMMResultSaveDialog, SaveOutputHdl_Impl, Button*, pButton, void) uno::Sequence< beans::PropertyValue > aValues(1); beans::PropertyValue* pValues = aValues.getArray(); pValues[0].Name = "FilterName"; - pValues[0].Value <<= OUString(pSfxFlt->GetFilterName()); + pValues[0].Value <<= pSfxFlt->GetFilterName(); uno::Reference< frame::XStorable > xStore( pTargetView->GetDocShell()->GetModel(), uno::UNO_QUERY); sal_uInt32 nErrorCode = ERRCODE_NONE; @@ -1079,7 +1079,7 @@ IMPL_LINK(SwMMResultEmailDialog, SendDocumentsHdl_Impl, Button*, pButton, void) uno::Sequence< beans::PropertyValue > aValues(1); beans::PropertyValue* pValues = aValues.getArray(); pValues[0].Name = "FilterName"; - pValues[0].Value <<= OUString(pTargetSfxFlt->GetFilterName()); + pValues[0].Value <<= pTargetSfxFlt->GetFilterName(); uno::Reference< frame::XStorable > xStore( pTargetView->GetDocShell()->GetModel(), uno::UNO_QUERY); xStore->storeToURL( sTargetTempURL, aValues ); @@ -1130,7 +1130,7 @@ IMPL_LINK(SwMMResultEmailDialog, SendDocumentsHdl_Impl, Button*, pButton, void) uno::Sequence< beans::PropertyValue > aFilterValues(withFilterOptions ? 2 : 1); beans::PropertyValue* pFilterValues = aFilterValues.getArray(); pFilterValues[0].Name = "FilterName"; - pFilterValues[0].Value <<= OUString(pSfxFlt->GetFilterName()); + pFilterValues[0].Value <<= pSfxFlt->GetFilterName(); if(withFilterOptions) { pFilterValues[1].Name = "FilterOptions"; diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx index 394683bc8d82..b637fecd66b4 100644 --- a/sw/source/ui/index/cntex.cxx +++ b/sw/source/ui/index/cntex.cxx @@ -68,7 +68,7 @@ static void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo, if(xInfo->hasPropertyByName(aPropName)) { uno::Any aValue; - aValue <<= OUString(rValue); + aValue <<= rValue; xProps->setPropertyValue(aPropName, aValue); } } @@ -339,7 +339,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( pPropValArr[0].Name = "TokenType"; pPropValArr[0].Value <<= sTokenType; pPropValArr[1].Name = "CharacterStyleName"; - pPropValArr[1].Value <<= OUString(aToken.sCharStyleName); + pPropValArr[1].Value <<= aToken.sCharStyleName; if(TOKEN_TAB_STOP == aToken.eTokenType) { pPropValArr[2].Name = "TabStopRightAligned"; @@ -355,7 +355,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( else if(TOKEN_TEXT == aToken.eTokenType) { pPropValArr[2].Name = "Text"; - pPropValArr[2].Value <<= OUString(aToken.sText); + pPropValArr[2].Value <<= aToken.sText; } beans::PropertyValues* pValues = aSequPropVals.getArray(); pValues[nTokenIndex] = aPropVals; diff --git a/sw/source/uibase/config/fontcfg.cxx b/sw/source/uibase/config/fontcfg.cxx index 7ab1b56ad3e2..d6607b496eb9 100644 --- a/sw/source/uibase/config/fontcfg.cxx +++ b/sw/source/uibase/config/fontcfg.cxx @@ -152,7 +152,7 @@ void SwStdFontConfig::ImplCommit() if( nProp < DEF_FONT_COUNT ) { if(GetDefaultFor(nProp, lcl_LanguageOfType(nProp, eWestern, eCJK, eCTL)) != sDefaultFonts[nProp]) - pValues[nProp] <<= OUString(sDefaultFonts[nProp]); + pValues[nProp] <<= sDefaultFonts[nProp]; } else { diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx index 6a1b7181a82e..f6e01c2bf324 100644 --- a/sw/source/uibase/dbui/mailmergehelper.cxx +++ b/sw/source/uibase/dbui/mailmergehelper.cxx @@ -689,7 +689,7 @@ uno::Any SwMailTransferable::getTransferData( const datatransfer::DataFlavor& /* { uno::Any aRet; if( m_bIsBody ) - aRet <<= OUString(m_sBody); + aRet <<= m_sBody; else { Sequence<sal_Int8> aData; diff --git a/sw/source/uibase/shells/drformsh.cxx b/sw/source/uibase/shells/drformsh.cxx index 8b21b6338a83..af77738bb28d 100644 --- a/sw/source/uibase/shells/drformsh.cxx +++ b/sw/source/uibase/shells/drformsh.cxx @@ -125,7 +125,7 @@ void SwDrawFormShell::Execute(SfxRequest &rReq) OUString sLabel("Label"); if( xPropInfoSet->hasPropertyByName(sLabel) ) { - aTmp <<= OUString(rHLinkItem.GetName()); + aTmp <<= rHLinkItem.GetName(); xPropSet->setPropertyValue(sLabel, aTmp ); } diff --git a/sw/source/uibase/shells/textdrw.cxx b/sw/source/uibase/shells/textdrw.cxx index 5dc92e64013b..7e51c42168df 100644 --- a/sw/source/uibase/shells/textdrw.cxx +++ b/sw/source/uibase/shells/textdrw.cxx @@ -87,7 +87,7 @@ void SwBaseShell::InsertURLButton(const OUString& rURL, const OUString& rTarget, uno::Any aTmp; - aTmp <<= OUString(rText); + aTmp <<= rText; xPropSet->setPropertyValue( "Label", aTmp ); SfxMedium* pMedium = rSh.GetView().GetDocShell()->GetMedium(); @@ -95,7 +95,7 @@ void SwBaseShell::InsertURLButton(const OUString& rURL, const OUString& rTarget, if( pMedium ) aAbs = pMedium->GetURLObject(); - aTmp <<= OUString(URIHelper::SmartRel2Abs(aAbs, rURL)); + aTmp <<= URIHelper::SmartRel2Abs(aAbs, rURL); xPropSet->setPropertyValue( "TargetURL", aTmp ); if( !rTarget.isEmpty() ) diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx index 673f458006c5..1bdd9098431e 100644 --- a/sw/source/uibase/uno/unoatxt.cxx +++ b/sw/source/uibase/uno/unoatxt.cxx @@ -625,10 +625,10 @@ uno::Any SwXAutoTextGroup::getPropertyValue(const OUString& rPropertyName) switch(pEntry->nWID) { case WID_GROUP_PATH: - aAny <<= OUString(pGlosGroup->GetFileName()); + aAny <<= pGlosGroup->GetFileName(); break; case WID_GROUP_TITLE: - aAny <<= OUString(pGlosGroup->GetName()); + aAny <<= pGlosGroup->GetName(); break; } return aAny; diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index cea95ba2b755..d95b363c9902 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -4064,7 +4064,7 @@ Any SwXLinkNameAccessWrapper::getPropertyValue(const OUString& rPropertyName) Any aRet; if( rPropertyName == UNO_LINK_DISPLAY_NAME ) { - aRet <<= OUString(sLinkDisplayName); + aRet <<= sLinkDisplayName; } else if( rPropertyName == UNO_LINK_DISPLAY_BITMAP ) { @@ -4138,7 +4138,7 @@ Any SwXOutlineTarget::getPropertyValue(const OUString& rPropertyName) { Any aRet; if(rPropertyName == UNO_LINK_DISPLAY_NAME) - aRet <<= OUString(sOutlineText); + aRet <<= sOutlineText; else throw UnknownPropertyException(); return aRet; |