diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-25 17:17:50 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-04 10:11:07 +0200 |
commit | aeb41c9b9b7559c6d87bf92807acdc0df9e104cc (patch) | |
tree | 5a36bcd5af873c2b597fcda5fbd7e2f76f997669 /sw/source | |
parent | 57c2de08ddf14c0da80de06736d99382ad036539 (diff) |
remove redundant calls to OUString constructor
Change code like this:
aStr = OUString("xxxx");
into this:
aStr = "xxxx";
Change-Id: I31cb92e21658d57bb9e14b65c179536eae8096f6
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/ui/dbui/mmoutputpage.cxx | 15 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewport.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbaview.cxx | 4 |
4 files changed, 12 insertions, 13 deletions
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 13f687a99c9c..3f4ae03b8ce5 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -835,7 +835,7 @@ IMPL_LINK_NOARG(SwMailMergeOutputPage, PrintHdl_Impl) SwDocMergeInfo& rEndInfo = rConfigItem.GetDocumentMergeInfo(nEnd - 1); OUString sPages(OUString::number( rStartInfo.nStartPageInTarget )); - sPages += OUString(" - "); + sPages += " - "; sPages += OUString::number( rEndInfo.nEndPageInTarget ); SwWrtShell& rSh = pTargetView->GetWrtShell(); @@ -896,7 +896,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendTypeHdl_Impl, ListBox*, pBox) sal_Int32 nTokenCount = comphelper::string::getTokenCount(sAttach, '.'); if( 2 > nTokenCount) { - sAttach += OUString('.'); + sAttach += "."; ++nTokenCount; } sAttach = comphelper::string::setToken(sAttach, nTokenCount - 1, '.', lcl_GetExtensionForDocType( nDocType )); @@ -1051,7 +1051,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) sal_Int32 nTokenCount = comphelper::string::getTokenCount(sAttach, '.'); if (2 > nTokenCount) { - sAttach += OUString('.'); + sAttach += "."; ++nTokenCount; } sAttach = comphelper::string::setToken(sAttach, nTokenCount - 1, '.', lcl_GetExtensionForDocType( @@ -1176,7 +1176,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) while ( bDone ) { sBody += OStringToOUString(sLine, eEncoding); - sBody += OUString('\n'); + sBody += "\n"; bDone = pInStream->ReadLine( sLine ); } } @@ -1191,7 +1191,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) sal_Int32 nTokenCount = comphelper::string::getTokenCount(sAttachment, '.'); if (2 > nTokenCount) { - sAttachment += OUString('.'); + sAttachment += "."; sAttachment = comphelper::string::setToken(sAttachment, nTokenCount, '.', sExtension); } else if (sAttachment.getToken( nTokenCount - 1, '.') != sExtension) @@ -1232,9 +1232,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) aDesc.sBodyContent = sBody; if(MM_DOCTYPE_HTML == nDocType) { - aDesc.sBodyMimeType = OUString("text/html; charset="); - aDesc.sBodyMimeType += OUString::createFromAscii( - rtl_getBestMimeCharsetFromTextEncoding( eEncoding )); + aDesc.sBodyMimeType = "text/html; charset=" + + OUString::createFromAscii(rtl_getBestMimeCharsetFromTextEncoding( eEncoding )); } else aDesc.sBodyMimeType = diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 61d9f2d86f4c..d38c8ee103ea 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -3129,9 +3129,9 @@ IMPL_LINK(SwTokenWindow, ScrollHdl, ImageButton*, pBtn ) long nDebugWidth = pDebugCtrl->GetSizePixel().Width(); sMessage += OUString::number( nDebugXPos ); - sMessage += OUString(" "); + sMessage += " "; sMessage += OUString::number(nDebugXPos + nDebugWidth); - sMessage += OUString(" | "); + sMessage += " | "; } #endif diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx index 09aabece5384..1d4acb347873 100644 --- a/sw/source/ui/uiview/viewport.cxx +++ b/sw/source/ui/uiview/viewport.cxx @@ -704,7 +704,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar ) m_pWrtShell->GetContentAtPos( aPos, aCnt ); if( !aCnt.sStr.isEmpty() ) { - sPageStr += OUString(" - "); + sPageStr += " - "; sal_Int32 nChunkLen = std::min<sal_Int32>(aCnt.sStr.getLength(), 80); OUString sChunk = aCnt.sStr.copy(0, nChunkLen); sPageStr = sChunk + sPageStr; diff --git a/sw/source/ui/vba/vbaview.cxx b/sw/source/ui/vba/vbaview.cxx index 8a3fa43f7a13..6bc0569f4241 100644 --- a/sw/source/ui/vba/vbaview.cxx +++ b/sw/source/ui/vba/vbaview.cxx @@ -343,11 +343,11 @@ uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType ) if( nType == word::WdSeekView::wdSeekEvenPagesFooter || nType == word::WdSeekView::wdSeekEvenPagesHeader ) { - aTempPropText += OUString("Left"); + aTempPropText += "Left"; } else { - aTempPropText += OUString("Right"); + aTempPropText += "Right"; } xText.set( xPageProps->getPropertyValue( aTempPropText), uno::UNO_QUERY_THROW ); } |