summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-05-19 17:17:18 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-05-19 17:17:18 +0200
commite2bb12f8888af0b6dad58ad0acfd071df01f6655 (patch)
treeee6d1048acd0b47005dd7a7f65a8d7edc797313b /sfx2
parentc8b19bdd2a2f3658e158bae44d4b472497591f85 (diff)
loplugin:stringcopy: sfx2
Change-Id: I9aa713a0839993fae202fc81431eb937d0604cb7
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appopen.cxx2
-rw-r--r--sfx2/source/appl/appuno.cxx4
-rw-r--r--sfx2/source/appl/newhelp.cxx10
-rw-r--r--sfx2/source/appl/sfxpicklist.cxx2
-rw-r--r--sfx2/source/appl/shutdownicon.cxx2
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx4
-rw-r--r--sfx2/source/control/emojicontrol.cxx2
-rw-r--r--sfx2/source/control/unoctitm.cxx2
-rw-r--r--sfx2/source/doc/printhelper.cxx6
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx2
-rw-r--r--sfx2/source/view/frmload.cxx6
-rw-r--r--sfx2/source/view/viewprn.cxx4
12 files changed, 23 insertions, 23 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index ca6901737e27..6d9f275f80bc 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -390,7 +390,7 @@ sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUStri
sal_Int32 nLength = aArgs.getLength();
aArgs.realloc( nLength + 1 );
aArgs[nLength].Name = "Title";
- aArgs[nLength].Value <<= OUString( xDoc->GetTitle( SFX_TITLE_DETECT ) );
+ aArgs[nLength].Value <<= xDoc->GetTitle( SFX_TITLE_DETECT );
xModel->attachResource( OUString(), aArgs );
delete pNew;
}
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index d7bc5ff8d7b9..b290eb764122 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -1527,7 +1527,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
if ( rSet.GetItemState( SID_STANDARD_DIR, false, &pItem ) == SfxItemState::SET )
{
pValue[nActProp].Name = sStandardDir;
- pValue[nActProp++].Value <<= OUString( static_cast<const SfxStringItem*>(pItem)->GetValue());
+ pValue[nActProp++].Value <<= static_cast<const SfxStringItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_BLACK_LIST, false, &pItem ) == SfxItemState::SET )
{
@@ -1540,7 +1540,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
if ( rSet.GetItemState( SID_TARGETNAME, false, &pItem ) == SfxItemState::SET )
{
pValue[nActProp].Name = sFrameName;
- pValue[nActProp++].Value <<= OUString( static_cast<const SfxStringItem*>(pItem)->GetValue() );
+ pValue[nActProp++].Value <<= static_cast<const SfxStringItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_DOC_SALVAGE, false, &pItem ) == SfxItemState::SET )
{
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 1315b2a5bf13..8754f1697a8b 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -977,7 +977,7 @@ void SearchTabPage_Impl::dispose()
}
aUserData = comphelper::string::stripEnd(aUserData, ';');
- Any aUserItem = makeAny( OUString( aUserData ) );
+ Any aUserItem = makeAny( aUserData );
aViewOpt.SetUserItem( USERITEM_NAME, aUserItem );
m_pSearchED.clear();
@@ -1579,7 +1579,7 @@ IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, SelectFactoryHdl, Timer *, void)
OUString* pFactory = static_cast<OUString*>(m_pActiveLB->GetSelectEntryData());
if ( pFactory )
{
- SetFactory( OUString( *pFactory ).toAsciiLowerCase(), false );
+ SetFactory( pFactory->toAsciiLowerCase(), false );
aSelectFactoryLink.Call( this );
}
}
@@ -2785,7 +2785,7 @@ void SfxHelpWindow_Impl::SaveConfig()
aUserData += ";";
aUserData += OUString::number( aWinPos.Y() );
- aViewOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( aUserData ) ) );
+ aViewOpt.SetUserItem( USERITEM_NAME, makeAny( aUserData ) );
}
@@ -2818,10 +2818,10 @@ IMPL_LINK_NOARG(SfxHelpWindow_Impl, OpenHdl, Control*, bool)
OUString sHelpURL;
- bool bComplete = OUString(aEntry).toAsciiLowerCase().match("vnd.sun.star.help");
+ bool bComplete = aEntry.toAsciiLowerCase().match("vnd.sun.star.help");
if (bComplete)
- sHelpURL = OUString(aEntry);
+ sHelpURL = aEntry;
else
{
OUString aId;
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 3a22edca1f90..d0890d89f8fd 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -114,7 +114,7 @@ void SfxPickListImpl::AddDocumentToPickList( SfxObjectShell* pDocSh )
return;
// Help not in History
- INetURLObject aURL( pDocSh->IsDocShared() ? pDocSh->GetSharedFileURL() : OUString( pMed->GetOrigURL() ) );
+ INetURLObject aURL( pDocSh->IsDocShared() ? pDocSh->GetSharedFileURL() : pMed->GetOrigURL() );
if ( aURL.GetProtocol() == INetProtocol::VndSunStarHelp )
return;
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 9f5f3e917c11..09bb40aa1a9b 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -323,7 +323,7 @@ OUString ShutdownIcon::GetUrlDescription( const OUString& aUrl )
{
::SolarMutexGuard aGuard;
- return OUString( SvFileInformationManager::GetDescription( INetURLObject( aUrl ) ) );
+ return SvFileInformationManager::GetDescription( INetURLObject( aUrl ) );
}
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index b6fd389d0136..74cfe3f5a1ec 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -443,8 +443,8 @@ sal_uInt32 SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, s
if ( pOldFilter )
{
- aDescriptor[utl::MediaDescriptor::PROP_TYPENAME() ] <<= OUString( pOldFilter->GetTypeName() );
- aDescriptor[utl::MediaDescriptor::PROP_FILTERNAME()] <<= OUString( pOldFilter->GetFilterName() );
+ aDescriptor[utl::MediaDescriptor::PROP_TYPENAME() ] <<= pOldFilter->GetTypeName();
+ aDescriptor[utl::MediaDescriptor::PROP_FILTERNAME()] <<= pOldFilter->GetFilterName();
}
uno::Sequence< beans::PropertyValue > lDescriptor = aDescriptor.getAsConstPropertyValueList();
diff --git a/sfx2/source/control/emojicontrol.cxx b/sfx2/source/control/emojicontrol.cxx
index 316a37f869f9..e71a30ff60d4 100644
--- a/sfx2/source/control/emojicontrol.cxx
+++ b/sfx2/source/control/emojicontrol.cxx
@@ -161,7 +161,7 @@ IMPL_LINK_NOARG(SfxEmojiControl, ActivatePageHdl, TabControl*, void)
IMPL_STATIC_LINK(SfxEmojiControl, InsertHdl, ThumbnailViewItem*, pItem, void)
{
OUStringBuffer sHexText = "";
- sHexText.appendUtf32(OUString(pItem->getTitle()).toUInt32(16));
+ sHexText.appendUtf32(pItem->getTitle().toUInt32(16));
uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
OUString sFontName(officecfg::Office::Common::Misc::EmojiFont::get(xContext));
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index a4c8ba30d1a7..30399c2c3cbe 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -434,7 +434,7 @@ void SfxDispatchController_Impl::addParametersToArgs( const css::util::URL& aURL
else if ( aParamType.equalsAsciiL( URLTypeNames[URLType_STRING], 6 ))
{
// STRING support
- rArgs[nLen].Value <<= OUString( INetURLObject::decode( aValue, INetURLObject::DecodeMechanism::WithCharset ));
+ rArgs[nLen].Value <<= INetURLObject::decode( aValue, INetURLObject::DecodeMechanism::WithCharset );
}
else if ( aParamType.equalsAsciiL( URLTypeNames[URLType_DOUBLE], 6))
{
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index 5e14dc699f69..2072bd949e3e 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -539,12 +539,12 @@ class ImplUCBPrintWatcher : public ::osl::Thread
if (aSplitter.removeSegment() && !sFileName.isEmpty())
{
::ucbhelper::Content aSource(
- OUString((*ppTempFile)->GetURL()),
+ (*ppTempFile)->GetURL(),
css::uno::Reference< css::ucb::XCommandEnvironment >(),
comphelper::getProcessComponentContext());
::ucbhelper::Content aTarget(
- OUString(aSplitter.GetMainURL(INetURLObject::DecodeMechanism::NONE)),
+ aSplitter.GetMainURL(INetURLObject::DecodeMechanism::NONE),
css::uno::Reference< css::ucb::XCommandEnvironment >(),
comphelper::getProcessComponentContext());
@@ -687,7 +687,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
//FIXME: does it work?
aCheckedArgs[nProps].Name = "LocalFileName";
- aCheckedArgs[nProps++].Value <<= OUString( pUCBPrintTempFile->GetFileName() );
+ aCheckedArgs[nProps++].Value <<= pUCBPrintTempFile->GetFileName();
sUcbUrl = sURL;
}
}
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 7430b1a02b9d..39743b8b83b5 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1444,7 +1444,7 @@ OUString SAL_CALL SfxBaseModel::getLocation()
if ( m_pData->m_pObjectShell->IsDocShared() )
return m_pData->m_pObjectShell->GetSharedFileURL();
else
- return OUString(m_pData->m_pObjectShell->GetMedium()->GetName());
+ return m_pData->m_pObjectShell->GetMedium()->GetName();
}
return m_pData->m_sURL;
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index b68b8ab61189..ff2b3eb77f2c 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -375,7 +375,7 @@ void SfxFrameLoader_Impl::impl_determineFilter( ::comphelper::NamedValueCollecti
if ( pFilter )
{
- io_rDescriptor.put( "FilterName", OUString( pFilter->GetFilterName() ) );
+ io_rDescriptor.put( "FilterName", pFilter->GetFilterName() );
// If detected filter indicates using of an own template format
// add property "AsTemplate" to descriptor. But suppress this step
@@ -385,7 +385,7 @@ void SfxFrameLoader_Impl::impl_determineFilter( ::comphelper::NamedValueCollecti
// The DocumentService property will finally be used to determine the document type to create, so
// override it with the service name as indicated by the found filter.
- io_rDescriptor.put( "DocumentService", OUString( pFilter->GetServiceName() ) );
+ io_rDescriptor.put( "DocumentService", pFilter->GetServiceName() );
}
}
@@ -445,7 +445,7 @@ bool SfxFrameLoader_Impl::impl_determineTemplateDocument( ::comphelper::NamedVal
// #i21583#
// the DocumentService property will finally be used to create the document. Thus, override any possibly
// present value with the document service of the template.
- io_rDescriptor.put( "DocumentService", OUString( pTemplateFilter->GetServiceName() ) );
+ io_rDescriptor.put( "DocumentService", pTemplateFilter->GetServiceName() );
return true;
}
}
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 23fdacc17565..ade45a9623df 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -302,7 +302,7 @@ void SfxPrinterController::jobStarted()
m_aLastPrinted = xDocProps->getPrintDate();
xDocProps->setPrintedBy( mpObjectShell->IsUseUserData()
- ? OUString( SvtUserOptions().GetFullName() )
+ ? SvtUserOptions().GetFullName()
: OUString() );
::DateTime now( ::DateTime::SYSTEM );
@@ -597,7 +597,7 @@ void SfxViewShell::StartPrint( const uno::Sequence < beans::PropertyValue >& rPr
SfxObjectShell *pObjShell = GetObjectShell();
xNewController->setValue( "JobName",
- makeAny( OUString( pObjShell->GetTitle(1) ) ) );
+ makeAny( pObjShell->GetTitle(1) ) );
xNewController->setPrinterModified( mbPrinterSettingsModified );
}