summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-15 11:05:19 +0200
committerNoel Grandin <noel@peralex.com>2013-11-19 10:29:31 +0200
commit610b2b94b33b0fc2d79cd515f9e293ca1c2610e8 (patch)
tree6eab2639cb8104ca54daa3f7a2ebd83ef1566cf0 /sfx2
parent2c35fff7eca3a143d28dc75e6a73fe1101d2af77 (diff)
remove unnecessary use of OUString constructor when assigning
change code like aStr = OUString("xxxx"); to aStr = "xxxx"; Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/imagemgr.cxx2
-rw-r--r--sfx2/source/appl/sfxhelp.cxx8
-rw-r--r--sfx2/source/dialog/dockwin.cxx4
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx8
-rw-r--r--sfx2/source/dialog/mailmodel.cxx20
-rw-r--r--sfx2/source/doc/doctemplateslocal.cxx2
-rw-r--r--sfx2/source/doc/objmisc.cxx6
-rw-r--r--sfx2/source/doc/objstor.cxx12
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx6
-rw-r--r--sfx2/source/view/frmload.cxx4
-rw-r--r--sfx2/source/view/viewsh.cxx22
11 files changed, 47 insertions, 47 deletions
diff --git a/sfx2/source/appl/imagemgr.cxx b/sfx2/source/appl/imagemgr.cxx
index d0c3f8c48d5d..7b59f9e95a6e 100644
--- a/sfx2/source/appl/imagemgr.cxx
+++ b/sfx2/source/appl/imagemgr.cxx
@@ -97,7 +97,7 @@ Image SAL_CALL GetImage(
if ( pSlot )
{
- aCommandURL = OUString( ".uno:" );
+ aCommandURL = ".uno:";
aCommandURL += OUString::createFromAscii( pSlot->GetUnoName() );
}
else
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 28c22a1042a4..a64d124d9831 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -325,13 +325,13 @@ OUString SfxHelp::GetHelpModuleName_Impl()
{
// Map some module identifiers to their "real" help module string.
if ( aFactoryShortName == "chart2" )
- aFactoryShortName = OUString( "schart" );
+ aFactoryShortName = "schart" ;
else if ( aFactoryShortName == "BasicIDE" )
- aFactoryShortName = OUString( "sbasic" );
+ aFactoryShortName = "sbasic";
else if ( aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("sweb"))
|| aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("sglobal"))
|| aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("swxform")) )
- aFactoryShortName = OUString( "swriter" );
+ aFactoryShortName = "swriter" ;
else if ( aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dbquery"))
|| aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dbbrowser"))
|| aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dbrelation"))
@@ -341,7 +341,7 @@ OUString SfxHelp::GetHelpModuleName_Impl()
|| aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("swreport"))
|| aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dbbrowser"))
|| aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("swform")) )
- aFactoryShortName = OUString( "sdatabase" );
+ aFactoryShortName = "sdatabase";
else if ( aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("sbibliography"))
|| aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("StartModule")) )
aFactoryShortName = sDefaultModule;
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 388d08864705..2eb6bed0e3d9 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -145,10 +145,10 @@ SfxDockingWrapper::SfxDockingWrapper( Window* pParentWnd ,
uno::Reference< frame::XFrame > xFrame( pDispatcher->GetFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY );
uno::Sequence< uno::Any > aArgs(2);
beans::PropertyValue aPropValue;
- aPropValue.Name = OUString( "Frame" );
+ aPropValue.Name = "Frame";
aPropValue.Value = uno::makeAny( xFrame );
aArgs[0] <<= aPropValue;
- aPropValue.Name = OUString( "ResourceURL" );
+ aPropValue.Name = "ResourceURL";
// create a resource URL from the nId provided by the sfx2
OUString aResourceURL( aDockWindowResourceURL );
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index bc1f0e1e951c..26a5345a3573 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1037,7 +1037,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
makeAny( nTemplateDescription )
);
- OUString sStandardDirTemp = OUString( sStandardDir );
+ OUString sStandardDirTemp = sStandardDir;
aInitArguments[1] <<= NamedValue(
OUString( "StandardDir" ),
@@ -2307,9 +2307,9 @@ FileDialogHelper::FileDialogHelper(
if ( aExtName.indexOf( (sal_Unicode)'*' ) != 0 )
{
if ( !aExtName.isEmpty() && aExtName.indexOf( (sal_Unicode)'.' ) != 0 )
- aWildcard = OUString( "*." );
+ aWildcard = "*.";
else
- aWildcard = OUString( "*" );
+ aWildcard = "*";
}
aWildcard += aExtName;
@@ -2472,7 +2472,7 @@ Sequence< OUString > FileDialogHelper::GetSelectedFiles() const
else
aPath.setName( lFiles[i] );
- aResultSeq[i-1] = OUString(aPath.GetMainURL( INetURLObject::NO_DECODE ));
+ aResultSeq[i-1] = aPath.GetMainURL( INetURLObject::NO_DECODE );
}
}
else
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 99b4c7240c7e..f457753f574b 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -206,11 +206,11 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog(
//string for the ok button
//used in filter/source/pdf/impdialog.cxx
uno::Sequence< beans::PropertyValue > aFilterDataValue(1);
- aFilterDataValue[0].Name = OUString( "_OkButtonString" );
+ aFilterDataValue[0].Name = "_OkButtonString";
aFilterDataValue[0].Value = css::uno::makeAny(SfxResId(STR_PDF_EXPORT_SEND ).toString());
//add to the filterdata property, the only one the PDF export filter dialog will care for
- aPropsForDialog[0].Name = OUString( "FilterData" );
+ aPropsForDialog[0].Name = "FilterData";
aPropsForDialog[0].Value = css::uno::makeAny( aFilterDataValue );
//when executing the dialog will merge the persistent FilterData properties
@@ -360,9 +360,9 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
{
// Retrieve filter from type
css::uno::Sequence< css::beans::NamedValue > aQuery( bSendAsPDF ? 3 : 2 );
- aQuery[0].Name = OUString( "Type" );
+ aQuery[0].Name = "Type";
aQuery[0].Value = css::uno::makeAny( aTypeName );
- aQuery[1].Name = OUString( "DocumentService" );
+ aQuery[1].Name = "DocumentService";
aQuery[1].Value = css::uno::makeAny( aModule );
if( bSendAsPDF )
{
@@ -371,7 +371,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
// exact flag value as detailed in the filter configuration to get it
// this seems to be a bug
// without flags we get an import filter here, which is also unwanted
- aQuery[2].Name = OUString( "Flags" );
+ aQuery[2].Name = "Flags";
aQuery[2].Value = css::uno::makeAny( sal_Int32(0x80042) ); // EXPORT ALIEN 3RDPARTY
}
@@ -451,7 +451,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
if ( bHasLocation && !bStoreTo )
{
INetURLObject aFileObj( xStorable->getLocation() );
- aExtension = (OUString)aFileObj.getExtension();
+ aExtension = aFileObj.getExtension();
}
else
{
@@ -518,7 +518,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
sal_Int32 nNumArgs(0);
const OUString aPasswordPropName( "Password" );
css::uno::Sequence< css::beans::PropertyValue > aArgs( ++nNumArgs );
- aArgs[nNumArgs-1].Name = OUString( "FilterName" );
+ aArgs[nNumArgs-1].Name = "FilterName";
aArgs[nNumArgs-1].Value = css::uno::makeAny( aFilterName );
::comphelper::SequenceAsHashMap aMediaDescrPropsHM( xModel->getArgs() );
@@ -543,7 +543,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
{
// check if the document needs to be prepared for sending as mail (embedding of links, removal of invisible content)
- aPrepareURL.Complete = OUString( ".uno:PrepareMailExport" );
+ aPrepareURL.Complete = ".uno:PrepareMailExport";
xURLTransformer->parseStrict( aPrepareURL );
if ( xDispatchProvider.is() )
@@ -612,7 +612,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
{
css::util::URL aURL;
// #i30432# notify that export is finished - the Writer may want to restore removed content
- aURL.Complete = OUString( ".uno:MailExportFinished" );
+ aURL.Complete = ".uno:MailExportFinished";
xURLTransformer->parseStrict( aURL );
if ( xDispatchProvider.is() )
@@ -659,7 +659,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
{
// We need 1:1 copy of the document to preserve an added signature.
aArgs.realloc( ++nNumArgs );
- aArgs[nNumArgs-1].Name = OUString( "CopyStreamIfPossible" );
+ aArgs[nNumArgs-1].Name = "CopyStreamIfPossible";
aArgs[nNumArgs-1].Value = css::uno::makeAny( (sal_Bool)sal_True );
try
diff --git a/sfx2/source/doc/doctemplateslocal.cxx b/sfx2/source/doc/doctemplateslocal.cxx
index f528701535cd..d895492cb972 100644
--- a/sfx2/source/doc/doctemplateslocal.cxx
+++ b/sfx2/source/doc/doctemplateslocal.cxx
@@ -36,7 +36,7 @@ using namespace ::com::sun::star;
uno::Sequence< beans::StringPair > DocTemplLocaleHelper::ReadGroupLocalizationSequence( const uno::Reference< io::XInputStream >& xInStream, const uno::Reference< uno::XComponentContext > xContext )
throw( uno::Exception )
{
- OUString aStringID = OUString( "groupuinames.xml" );
+ OUString aStringID = "groupuinames.xml";
return ReadLocalizationSequence_Impl( xInStream, aStringID, xContext );
}
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 8751f42fe57a..4285fafe8f2a 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -2061,17 +2061,17 @@ void SfxObjectShell::StoreLog()
if ( pImp->m_xLogRing.is() )
{
- OUString aFileURL = OUString( "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}" );
+ OUString aFileURL = ( "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}" );
::rtl::Bootstrap::expandMacros( aFileURL );
- OUString aBuildID = OUString( "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("setup") ":buildid}" );
+ OUString aBuildID = ( "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("setup") ":buildid}" );
::rtl::Bootstrap::expandMacros( aBuildID );
if ( !aFileURL.isEmpty() )
{
- aFileURL += OUString( "/user/temp/document_io_logring.txt" );
+ aFileURL += "/user/temp/document_io_logring.txt";
try
{
uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index df8fcd138aee..125edca36a7f 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -373,9 +373,9 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto
SvtSaveOptions::ODFDefaultVersion nDefVersion = aSaveOpt.GetODFDefaultVersion();
uno::Sequence< beans::NamedValue > aEncryptionAlgs( 3 );
- aEncryptionAlgs[0].Name = OUString( "StartKeyGenerationAlgorithm" );
- aEncryptionAlgs[1].Name = OUString( "EncryptionAlgorithm" );
- aEncryptionAlgs[2].Name = OUString( "ChecksumAlgorithm" );
+ aEncryptionAlgs[0].Name = "StartKeyGenerationAlgorithm";
+ aEncryptionAlgs[1].Name = "EncryptionAlgorithm";
+ aEncryptionAlgs[2].Name = "ChecksumAlgorithm";
// the default values, that should be used for ODF1.1 and older formats
aEncryptionAlgs[0].Value <<= xml::crypto::DigestID::SHA1;
aEncryptionAlgs[1].Value <<= xml::crypto::CipherID::BLOWFISH_CFB_8;
@@ -2238,13 +2238,13 @@ sal_Bool SfxObjectShell::ImportFrom( SfxMedium& rMedium, bool bInsert )
if ( !bHasBaseURL )
{
aArgs.realloc ( ++nEnd );
- aArgs[nEnd-1].Name = OUString( "DocumentBaseURL" );
+ aArgs[nEnd-1].Name = "DocumentBaseURL";
aArgs[nEnd-1].Value <<= rMedium.GetBaseURL();
}
if ( bInsert ) {
aArgs.realloc( ++nEnd );
- aArgs[nEnd-1].Name = OUString( "InsertMode" );
+ aArgs[nEnd-1].Name = "InsertMode";
aArgs[nEnd-1].Value <<= (sal_Bool) sal_True;
}
@@ -2382,7 +2382,7 @@ sal_Bool SfxObjectShell::ExportTo( SfxMedium& rMedium )
if ( !bHasBaseURL )
{
aArgs.realloc ( ++nEnd );
- aArgs[nEnd-1].Name = OUString( "DocumentBaseURL" );
+ aArgs[nEnd-1].Name = "DocumentBaseURL";
aArgs[nEnd-1].Value <<= rMedium.GetBaseURL( sal_True );
}
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 8f23e4ba3153..5694db17df18 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -802,11 +802,11 @@ void SfxToolBoxControl::createAndPositionSubToolBar( const OUString& rSubToolBar
}
Sequence< PropertyValue > aPropSeq( 3 );
- aPropSeq[0].Name = OUString( "Frame" );
+ aPropSeq[0].Name = "Frame";
aPropSeq[0].Value <<= xFrame;
- aPropSeq[1].Name = OUString( "Persistent" );
+ aPropSeq[1].Name = "Persistent";
aPropSeq[1].Value <<= sal_False;
- aPropSeq[2].Name = OUString( "PopupMode" );
+ aPropSeq[2].Name = "PopupMode";
aPropSeq[2].Value <<= sal_True;
try
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index ee8718098c22..25d6a958714f 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -672,8 +672,8 @@ Sequence< OUString > SAL_CALL SfxFrameLoader_Impl::getSupportedServiceNames() th
Sequence< OUString > SfxFrameLoader_Impl::impl_getStaticSupportedServiceNames()
{
Sequence< OUString > seqServiceNames( 2 );
- seqServiceNames.getArray() [0] = OUString( "com.sun.star.frame.SynchronousFrameLoader" );
- seqServiceNames.getArray() [1] = OUString( "com.sun.star.frame.OfficeFrameLoader" );
+ seqServiceNames.getArray() [0] = "com.sun.star.frame.SynchronousFrameLoader";
+ seqServiceNames.getArray() [1] = "com.sun.star.frame.OfficeFrameLoader";
return seqServiceNames ;
}
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index cd9672d6d383..c4d9eb47e1e7 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -311,9 +311,9 @@ static OUString impl_retrieveFilterNameFromTypeAndModule(
{
// Retrieve filter from type
css::uno::Sequence< css::beans::NamedValue > aQuery( 2 );
- aQuery[0].Name = OUString( "Type" );
+ aQuery[0].Name = "Type";
aQuery[0].Value = css::uno::makeAny( rType );
- aQuery[1].Name = OUString( "DocumentService" );
+ aQuery[1].Name = "DocumentService";
aQuery[1].Value = css::uno::makeAny( rModuleIdentifier );
css::uno::Reference< css::container::XEnumeration > xEnumeration =
@@ -367,32 +367,32 @@ OUString impl_searchFormatTypeForApp(const css::uno::Reference< css::frame::XFra
case E_MS_DOC:
{
if ( sModule == "com.sun.star.text.TextDocument" )
- sType = OUString( "writer_MS_Word_97" );
+ sType = "writer_MS_Word_97";
else
if ( sModule == "com.sun.star.sheet.SpreadsheetDocument" )
- sType = OUString( "calc_MS_Excel_97" );
+ sType = "calc_MS_Excel_97";
else
if ( sModule == "com.sun.star.drawing.DrawingDocument" )
- sType = OUString( "impress_MS_PowerPoint_97" );
+ sType = "impress_MS_PowerPoint_97";
else
if ( sModule == "com.sun.star.presentation.PresentationDocument" )
- sType = OUString( "impress_MS_PowerPoint_97" );
+ sType = "impress_MS_PowerPoint_97";
}
break;
case E_OOO_DOC:
{
if ( sModule == "com.sun.star.text.TextDocument" )
- sType = OUString( "writer8" );
+ sType = "writer8";
else
if ( sModule == "com.sun.star.sheet.SpreadsheetDocument" )
- sType = OUString( "calc8" );
+ sType = "calc8";
else
if ( sModule == "com.sun.star.drawing.DrawingDocument" )
- sType = OUString( "draw8" );
+ sType = "draw8";
else
if ( sModule == "com.sun.star.presentation.PresentationDocument" )
- sType = OUString( "impress8" );
+ sType = "impress8";
}
break;
}
@@ -688,7 +688,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
OUString aFileURL = aFilePathObj.GetMainURL( INetURLObject::NO_DECODE );
css::uno::Sequence< css::beans::PropertyValue > aArgs( 1 );
- aArgs[0].Name = OUString( "FilterName" );
+ aArgs[0].Name = "FilterName";
aArgs[0].Value = css::uno::makeAny( aFilterName );
// Store document in the html format