summaryrefslogtreecommitdiff
path: root/sfx2/source/doc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-06 09:37:06 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-06 09:37:06 +0100
commit4ae8cd2fa3d38b0d3cf86e9c4f6734120cd42e72 (patch)
treefbd9f00427eed2f266cea423dbf8b08a66b271ea /sfx2/source/doc
parentdd4c24081865751dee1a74fbee8d4612096a0b2c (diff)
loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: Ibb9e09fb39d9e3a2191a2e7028d5ec42a83bfa55
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r--sfx2/source/doc/DocumentMetadataAccess.cxx2
-rw-r--r--sfx2/source/doc/SfxDocumentMetaData.cxx2
-rw-r--r--sfx2/source/doc/docfile.cxx30
-rw-r--r--sfx2/source/doc/docfilt.cxx12
-rw-r--r--sfx2/source/doc/docinf.cxx12
-rw-r--r--sfx2/source/doc/doctemplates.cxx18
-rw-r--r--sfx2/source/doc/doctemplateslocal.cxx4
-rw-r--r--sfx2/source/doc/guisaveas.cxx26
-rw-r--r--sfx2/source/doc/objmisc.cxx4
-rw-r--r--sfx2/source/doc/objstor.cxx110
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx24
-rw-r--r--sfx2/source/doc/templatedlg.cxx2
12 files changed, 123 insertions, 123 deletions
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index 9b0256b64de4..6be319040305 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -1088,7 +1088,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
std::set< OUString > StgFiles;
collectFilesFromStorage(i_xStorage,
- OUString(""), StgFiles);
+ "", StgFiles);
std::vector< OUString > MfstMetadataFiles;
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index f12384119e04..a51996f89e66 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -1831,7 +1831,7 @@ SfxDocumentMetaData::resetUserData(const OUString & the_value)
dateTimeToText(css::util::DateTime()));
bModified |= setMetaText("meta:editing-duration", durationToText(0));
bModified |= setMetaText("meta:editing-cycles",
- OUString("1"));
+ "1");
if (bModified) {
g.clear();
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 10243019863e..8aeda012a4af 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -375,7 +375,7 @@ void SfxMedium::CheckFileDate( const util::DateTime& aInitDate )
::rtl::Reference< ::ucbhelper::InteractionContinuation > xSelected = xInteractionRequestImpl->getSelection();
if ( uno::Reference< task::XInteractionAbort >( xSelected.get(), uno::UNO_QUERY ).is() )
{
- SetError( ERRCODE_ABORT, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_ABORT, OSL_LOG_PREFIX );
}
}
catch ( const uno::Exception& )
@@ -746,7 +746,7 @@ void SfxMedium::StorageBackup_Impl()
{
DoInternalBackup_Impl( aOriginalContent );
if( pImp->m_aBackupURL.isEmpty() )
- SetError( ERRCODE_SFX_CANTCREATEBACKUP, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_SFX_CANTCREATEBACKUP, OSL_LOG_PREFIX );
}
}
@@ -878,7 +878,7 @@ sal_Int8 SfxMedium::ShowLockedDocumentDialog( const LockFileEntry& aData, bool b
::rtl::Reference< ::ucbhelper::InteractionContinuation > xSelected = xInteractionRequestImpl->getSelection();
if ( uno::Reference< task::XInteractionAbort >( xSelected.get(), uno::UNO_QUERY ).is() )
{
- SetError( ERRCODE_ABORT, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_ABORT, OSL_LOG_PREFIX );
}
else if ( uno::Reference< task::XInteractionDisapprove >( xSelected.get(), uno::UNO_QUERY ).is() )
{
@@ -917,7 +917,7 @@ sal_Int8 SfxMedium::ShowLockedDocumentDialog( const LockFileEntry& aData, bool b
GetItemSet()->Put( SfxBoolItem( SID_DOC_READONLY, true ) );
}
else
- SetError( ERRCODE_IO_ACCESSDENIED, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_ACCESSDENIED, OSL_LOG_PREFIX );
}
@@ -1038,7 +1038,7 @@ void SfxMedium::LockOrigFileOnDemand( bool bLoading, bool bNoUI )
const SfxBoolItem* pReadOnlyItem = SfxItemSet::GetItem<SfxBoolItem>(pImp->m_pSet, SID_DOC_READONLY, false);
if ( !bLoading || (pReadOnlyItem && !pReadOnlyItem->GetValue()) )
- SetError( ERRCODE_IO_ACCESSDENIED, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_ACCESSDENIED, OSL_LOG_PREFIX );
else
GetItemSet()->Put( SfxBoolItem( SID_DOC_READONLY, true ) );
}
@@ -1272,7 +1272,7 @@ void SfxMedium::LockOrigFileOnDemand( bool bLoading, bool bNoUI )
const SfxBoolItem* pReadOnlyItem = SfxItemSet::GetItem<SfxBoolItem>(pImp->m_pSet, SID_DOC_READONLY, false);
if ( !bLoading || (pReadOnlyItem && !pReadOnlyItem->GetValue()) )
- SetError( ERRCODE_IO_ACCESSDENIED, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_ACCESSDENIED, OSL_LOG_PREFIX );
else
GetItemSet()->Put( SfxBoolItem( SID_DOC_READONLY, true ) );
}
@@ -1623,13 +1623,13 @@ bool SfxMedium::StorageCommit_Impl()
}
if ( !GetError() )
- SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
}
catch ( const uno::Exception& )
{
//TODO/LATER: improve error handling
- SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
}
}
@@ -1815,7 +1815,7 @@ bool SfxMedium::TryDirectTransfer( const OUString& aURL, SfxItemSet& aTargetSet
Any aCmdArg;
aCmdArg <<= aInsertArg;
- aTargetContent.executeCommand( OUString( "insert" ),
+ aTargetContent.executeCommand( "insert",
aCmdArg );
if ( xSeek.is() )
@@ -1906,7 +1906,7 @@ void SfxMedium::Transfer_Impl()
else
{
SAL_WARN( "sfx.doc", "Illegal Output stream parameter!" );
- SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
// free the reference
@@ -2019,7 +2019,7 @@ void SfxMedium::Transfer_Impl()
OUString aFileName;
Any aAny = aDestContent.getPropertyValue("Title");
aAny >>= aFileName;
- aAny = aDestContent.getPropertyValue( OUString("ObjectId" ) );
+ aAny = aDestContent.getPropertyValue( "ObjectId" );
OUString sObjectId;
aAny >>= sObjectId;
if ( aFileName.isEmpty() )
@@ -2449,7 +2449,7 @@ void SfxMedium::GetMedium_Impl()
//TODO/MBA: ErrorHandling - how to transport error from MediaDescriptor
if ( !GetError() && !pImp->xStream.is() && !pImp->xInputStream.is() )
- SetError( ERRCODE_IO_ACCESSDENIED, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_ACCESSDENIED, OSL_LOG_PREFIX );
if ( !GetError() )
{
@@ -3398,7 +3398,7 @@ void SfxMedium::CreateTempFile( bool bReplace )
OUString aTmpURL = pImp->pTempFile->GetURL();
if ( pImp->m_aName.isEmpty() || aTmpURL.isEmpty() )
{
- SetError( ERRCODE_IO_CANTWRITE, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_CANTWRITE, OSL_LOG_PREFIX );
return;
}
@@ -3476,7 +3476,7 @@ void SfxMedium::CreateTempFile( bool bReplace )
if ( !bTransferSuccess )
{
- SetError( ERRCODE_IO_CANTWRITE, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_CANTWRITE, OSL_LOG_PREFIX );
return;
}
}
@@ -3496,7 +3496,7 @@ void SfxMedium::CreateTempFileNoCopy()
pImp->m_aName = pImp->pTempFile->GetFileName();
if ( pImp->m_aName.isEmpty() )
{
- SetError( ERRCODE_IO_CANTWRITE, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_CANTWRITE, OSL_LOG_PREFIX );
return;
}
diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx
index 4af1663eb2b2..916efc78a98f 100644
--- a/sfx2/source/doc/docfilt.cxx
+++ b/sfx2/source/doc/docfilt.cxx
@@ -141,26 +141,26 @@ const SfxFilter* SfxFilter::GetFilterByName( const OUString& rName )
OUString SfxFilter::GetTypeFromStorage( const SotStorage& rStg )
{
const char* pType=0;
- if ( rStg.IsStream( OUString("WordDocument") ) )
+ if ( rStg.IsStream( "WordDocument" ) )
{
- if ( rStg.IsStream( OUString("0Table") ) || rStg.IsStream( OUString("1Table") ) )
+ if ( rStg.IsStream( "0Table" ) || rStg.IsStream( "1Table" ) )
pType = "writer_MS_Word_97";
else
pType = "writer_MS_Word_95";
}
- else if ( rStg.IsStream( OUString("Book") ) )
+ else if ( rStg.IsStream( "Book" ) )
{
pType = "calc_MS_Excel_95";
}
- else if ( rStg.IsStream( OUString("Workbook" ) ) )
+ else if ( rStg.IsStream( "Workbook" ) )
{
pType = "calc_MS_Excel_97";
}
- else if ( rStg.IsStream( OUString("PowerPoint Document") ) )
+ else if ( rStg.IsStream( "PowerPoint Document" ) )
{
pType = "impress_MS_PowerPoint_97";
}
- else if ( rStg.IsStream( OUString("Equation Native") ) )
+ else if ( rStg.IsStream( "Equation Native" ) )
{
pType = "math_MathType_3x";
}
diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx
index 3a5d8b96c231..75a4dc673840 100644
--- a/sfx2/source/doc/docinf.cxx
+++ b/sfx2/source/doc/docinf.cxx
@@ -53,7 +53,7 @@ sal_uInt32 LoadOlePropertySet(
// load the property set
SfxOlePropertySet aGlobSet;
ErrCode nGlobError = aGlobSet.LoadPropertySet(i_pStorage,
- OUString( STREAM_SUMMARYINFO ) );
+ STREAM_SUMMARYINFO );
// global section
SfxOleSectionRef xGlobSect = aGlobSet.GetSection( SECTION_GLOBAL );
@@ -138,7 +138,7 @@ sal_uInt32 LoadOlePropertySet(
// load the property set
SfxOlePropertySet aDocSet;
ErrCode nDocError = aDocSet.LoadPropertySet(i_pStorage,
- OUString( STREAM_DOCSUMMARYINFO ) );
+ STREAM_DOCSUMMARYINFO );
// custom properties
SfxOleSectionRef xCustomSect = aDocSet.GetSection( SECTION_CUSTOM );
@@ -240,7 +240,7 @@ bool SaveOlePropertySet(
// save the property set
ErrCode nGlobError = aGlobSet.SavePropertySet(i_pStorage,
- OUString(STREAM_SUMMARYINFO));
+ STREAM_SUMMARYINFO);
// *** custom properties into stream "005DocumentSummaryInformation" ***
@@ -257,7 +257,7 @@ bool SaveOlePropertySet(
const sal_Int32 nPropId = rCustomSect.GetFreePropertyId();
rCustomSect.SetBlobValue( nPropId, *i_pGuid );
rCustomSect.SetPropertyName( nPropId,
- OUString("_PID_GUID") );
+ "_PID_GUID" );
}
// write hyperlinks
@@ -265,7 +265,7 @@ bool SaveOlePropertySet(
const sal_Int32 nPropId = rCustomSect.GetFreePropertyId();
rCustomSect.SetBlobValue( nPropId, *i_pHyperlinks );
rCustomSect.SetPropertyName( nPropId,
- OUString("_PID_HLINKS") );
+ "_PID_HLINKS" );
}
uno::Reference<beans::XPropertySet> xUserDefinedProps(
@@ -299,7 +299,7 @@ bool SaveOlePropertySet(
// save the property set
ErrCode nDocError = aDocSet.SavePropertySet(i_pStorage,
- OUString( STREAM_DOCSUMMARYINFO ) );
+ STREAM_DOCSUMMARYINFO );
// return code
return (nGlobError == ERRCODE_NONE) && (nDocError == ERRCODE_NONE);
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 8e831101957c..3d8b29098cd0 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -681,7 +681,7 @@ bool SfxDocTplService_Impl::getTitleFromURL( const OUString& rURL, OUString& aTi
uno::Reference< container::XNameAccess > xTypeDetection( mxType, uno::UNO_QUERY_THROW );
SequenceAsHashMap aTypeProps( xTypeDetection->getByName( aDocType ) );
aType = aTypeProps.getUnpackedValueOrDefault(
- OUString("MediaType"),
+ "MediaType",
OUString() );
}
catch( uno::Exception& )
@@ -1212,7 +1212,7 @@ void SfxDocTplService_Impl::doUpdate()
Content aGroup;
if ( Content::create( pGroup->getHierarchyURL(), maCmdEnv, comphelper::getProcessComponentContext(), aGroup ) )
setProperty( aGroup,
- OUString( TARGET_DIR_URL ),
+ TARGET_DIR_URL,
makeAny( pGroup->getTargetURL() ) );
size_t nCount = pGroup->count();
@@ -1253,7 +1253,7 @@ void SfxDocTplService_Impl::doUpdate()
uno::Sequence< beans::StringPair > SfxDocTplService_Impl::ReadUINamesForTemplateDir_Impl( const OUString& aUserPath )
{
INetURLObject aLocObj( aUserPath );
- aLocObj.insertName( OUString( "groupuinames.xml" ), false,
+ aLocObj.insertName( "groupuinames.xml", false,
INetURLObject::LAST_SEGMENT, true,
INetURLObject::ENCODE_ALL );
Content aLocContent;
@@ -1377,9 +1377,9 @@ bool SfxDocTplService_Impl::WriteUINamesForTemplateDir_Impl( const OUString& aUs
Content aSourceContent( aTempURL, maCmdEnv, comphelper::getProcessComponentContext() );
aTargetContent.transferContent( aSourceContent,
InsertOperation_COPY,
- OUString( "groupuinames.xml" ),
+ "groupuinames.xml",
ucb::NameClash::OVERWRITE,
- OUString( "text/xml" ) );
+ "text/xml" );
bResult = true;
}
catch ( uno::Exception& )
@@ -1409,7 +1409,7 @@ OUString SfxDocTplService_Impl::CreateNewGroupFsys( const OUString& rGroupName,
aResultURL,
aNewFolder )
&& !CreateNewUniqueFolderWithPrefix( aTargetPath,
- OUString( "UserGroup" ),
+ "UserGroup",
aNewFolderName,
aResultURL,
aNewFolder ) )
@@ -1487,7 +1487,7 @@ bool SfxDocTplService_Impl::addGroup( const OUString& rGroupName )
aNewFolderURL,
aNewFolder )
&& !CreateNewUniqueFolderWithPrefix( aUserPath,
- OUString( "UserGroup" ),
+ "UserGroup",
aNewFolderName,
aNewFolderURL,
aNewFolder ) )
@@ -1871,7 +1871,7 @@ bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName,
OUString aNewTemplateTargetURL = CreateNewUniqueFileWithPrefix( aGroupTargetURL, rTemplateName, aExt );
if ( aNewTemplateTargetURL.isEmpty() )
{
- aNewTemplateTargetURL = CreateNewUniqueFileWithPrefix( aGroupTargetURL, OUString( "UserTemplate" ), aExt );
+ aNewTemplateTargetURL = CreateNewUniqueFileWithPrefix( aGroupTargetURL, "UserTemplate", aExt );
if ( aNewTemplateTargetURL.isEmpty() )
throw uno::RuntimeException();
@@ -2628,7 +2628,7 @@ void SfxDocTplService_Impl::createFromContent( GroupList_Impl& rList,
// when scanning the file system, we have to add the 'standard' group, too
if ( ! bHierarchy )
{
- OUString aUIStdTitle = getLongName( OUString( STANDARD_FOLDER ) );
+ OUString aUIStdTitle = getLongName( STANDARD_FOLDER );
addFsysGroup( rList, OUString(), aUIStdTitle, aTargetURL, bWriteableContent );
}
diff --git a/sfx2/source/doc/doctemplateslocal.cxx b/sfx2/source/doc/doctemplateslocal.cxx
index ce1e7e16ae34..e83c93102435 100644
--- a/sfx2/source/doc/doctemplateslocal.cxx
+++ b/sfx2/source/doc/doctemplateslocal.cxx
@@ -63,9 +63,9 @@ void SAL_CALL DocTemplLocaleHelper::WriteGroupLocalizationSequence( const uno::R
::comphelper::AttributeList* pRootAttrList = new ::comphelper::AttributeList;
uno::Reference< xml::sax::XAttributeList > xRootAttrList( pRootAttrList );
pRootAttrList->AddAttribute(
- OUString( "xmlns" ),
+ "xmlns",
aCDATAString,
- OUString( "http://openoffice.org/2006/groupuinames" ) );
+ "http://openoffice.org/2006/groupuinames" );
xWriterHandler->startDocument();
xWriterHandler->startElement( aGroupListElement, xRootAttrList );
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 1ba7ba072f94..f2545a08f6d2 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -503,7 +503,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetDocServiceDefaultFilter
uno::Sequence< beans::PropertyValue > aProps;
OUString aFilterName = GetModuleProps().getUnpackedValueOrDefault(
- OUString("ooSetupFactoryDefaultFilter"),
+ "ooSetupFactoryDefaultFilter",
OUString() );
m_pOwner->GetFilterConfiguration()->getByName( aFilterName ) >>= aProps;
@@ -729,7 +729,7 @@ sal_Int8 ModelData_Impl::CheckStateForSave()
// check that the old filter is acceptable
OUString aOldFilterName = GetDocProps().getUnpackedValueOrDefault(
- OUString(aFilterNameString),
+ aFilterNameString,
OUString() );
sal_Int8 nResult = CheckFilter( aOldFilterName );
@@ -779,7 +779,7 @@ sal_Int8 ModelData_Impl::CheckFilter( const OUString& aFilterName )
OUString aDefUIName = aDefFiltPropsHM.getUnpackedValueOrDefault("UIName",
OUString() );
OUString aPreusedFilterName = GetDocProps().getUnpackedValueOrDefault(
- OUString("PreusedFilterName"),
+ "PreusedFilterName",
OUString() );
OUString aDefType = aDefFiltPropsHM.getUnpackedValueOrDefault( "Type", OUString() );
@@ -811,7 +811,7 @@ bool ModelData_Impl::CheckFilterOptionsDialogExistence()
{
::comphelper::SequenceAsHashMap aPropsHM( pProps );
OUString aUIServName = aPropsHM.getUnpackedValueOrDefault(
- OUString("UIComponent"),
+ "UIComponent",
OUString() );
if ( !aUIServName.isEmpty() )
return true;
@@ -898,7 +898,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
// this is a PDF export
// the filter options has been shown already
OUString aFilterUIName = aPreselectedFilterPropsHM.getUnpackedValueOrDefault(
- OUString("UIName"),
+ "UIName",
OUString() );
pFileDlg.reset(new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aFilterUIName, OUString( "pdf" ), rStandardDir, rBlackList ));
@@ -950,11 +950,11 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
{
// it is export, set the preselected filter
OUString aFilterUIName = aPreselectedFilterPropsHM.getUnpackedValueOrDefault(
- OUString("UIName"),
+ "UIName",
OUString() );
pFileDlg->SetCurrentFilter( aFilterUIName );
aAdjustToType = aPreselectedFilterPropsHM.getUnpackedValueOrDefault(
- OUString("Type"),
+ "Type",
OUString() );
}
// it is no export, bSetStandardName == true means that user agreed to store document in the default (default default ;-)) format
@@ -975,18 +975,18 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
{
// the suggested type will be changed, the extension should be adjusted
aAdjustToType = aPreselectedFilterPropsHM.getUnpackedValueOrDefault(
- OUString("Type"),
+ "Type",
OUString() );
OUString aFilterUIName = aPreselectedFilterPropsHM.getUnpackedValueOrDefault(
- OUString("UIName"),
+ "UIName",
OUString() );
pFileDlg->SetCurrentFilter( aFilterUIName );
}
else
{
pFileDlg->SetCurrentFilter( aOldFiltPropsHM.getUnpackedValueOrDefault(
- OUString("UIName"),
+ "UIName",
OUString() ) );
}
}
@@ -1191,7 +1191,7 @@ OUString ModelData_Impl::GetRecommendedExtension( const OUString& aTypeName )
{
::comphelper::SequenceAsHashMap aTypeNamePropsHM( aTypeNameProps );
uno::Sequence< OUString > aExtensions = aTypeNamePropsHM.getUnpackedValueOrDefault(
- OUString("Extensions"),
+ "Extensions",
::uno::Sequence< OUString >() );
if ( aExtensions.getLength() )
return aExtensions[0];
@@ -1473,7 +1473,7 @@ bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel,
::comphelper::SequenceAsHashMap aFilterPropsHM( aFilterProps );
OUString aFilterName = aFilterPropsHM.getUnpackedValueOrDefault(
- OUString("Name"),
+ "Name",
OUString() );
const OUString sFilterNameString(aFilterNameString);
@@ -1744,7 +1744,7 @@ bool SfxStoringHelper::CheckFilterOptionsAppearence(
{
::comphelper::SequenceAsHashMap aPropsHM( aProps );
OUString aServiceName = aPropsHM.getUnpackedValueOrDefault(
- OUString("UIComponent"),
+ "UIComponent",
OUString() );
if( !aServiceName.isEmpty() )
bUseFilterOptions = true;
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 709775c01613..e707ef7ab945 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -257,7 +257,7 @@ sal_uInt32 SfxObjectShell::GetErrorCode() const
void SfxObjectShell::ResetError()
{
if( pImp->lErr != ERRCODE_NONE )
- AddLog( OUString( OSL_LOG_PREFIX "Resetting Error." ) );
+ AddLog( OSL_LOG_PREFIX "Resetting Error." );
pImp->lErr=0;
SfxMedium * pMed = GetMedium();
@@ -1356,7 +1356,7 @@ void SfxObjectShell::TemplateDisconnectionAfterLoad()
}
else
{
- SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
}
else
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 2c5850e3300a..e9bb92a45352 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -260,7 +260,7 @@ bool SfxObjectShell::PutURLContentsToVersionStream_Impl(
catch( uno::Exception& )
{
// TODO/LATER: handle the error depending on exception
- SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
return bResult;
@@ -292,7 +292,7 @@ OUString SfxObjectShell::CreateTempCopyOfStorage_Impl( const uno::Reference< emb
aTempURL.clear();
// TODO/LATER: may need error code setting based on exception
- SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
}
@@ -366,7 +366,7 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto
}
catch( uno::Exception& )
{
- const_cast<SfxObjectShell*>( this )->SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ const_cast<SfxObjectShell*>( this )->SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
SvtSaveOptions::ODFDefaultVersion nDefVersion = SvtSaveOptions::ODFVER_012;
@@ -419,7 +419,7 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto
}
catch( uno::Exception& )
{
- const_cast<SfxObjectShell*>( this )->SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ const_cast<SfxObjectShell*>( this )->SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
}
@@ -457,7 +457,7 @@ bool SfxObjectShell::GeneralInit_Impl( const uno::Reference< embed::XStorage >&
{
if ( bTypeMustBeSetAlready )
{
- SetError( ERRCODE_IO_BROKENPACKAGE, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_BROKENPACKAGE, OSL_LOG_PREFIX );
return false;
}
@@ -671,7 +671,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
{
sal_uInt32 nError = HandleFilter( pMedium, this );
if ( nError != ERRCODE_NONE )
- SetError( nError, OUString( OSL_LOG_PREFIX ) );
+ SetError( nError, OSL_LOG_PREFIX );
if (pMedium->GetFilter()->GetFilterFlags() & SfxFilterFlags::STARTPRESENTATION)
pSet->Put( SfxBoolItem( SID_DOC_STARTPRESENTATION, true) );
@@ -711,12 +711,12 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
}
if ( bWarnMediaTypeFallback || !xStorage->getElementNames().getLength() )
- SetError( ERRCODE_IO_BROKENPACKAGE, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_BROKENPACKAGE, OSL_LOG_PREFIX );
}
catch( uno::Exception& )
{
// TODO/LATER: may need error code setting based on exception
- SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
// Load
@@ -733,11 +733,11 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
bHasName = true;
}
else
- SetError( ERRCODE_ABORT, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_ABORT, OSL_LOG_PREFIX );
}
}
else
- SetError( pMed->GetLastStorageCreationState(), OUString( OSL_LOG_PREFIX ) );
+ SetError( pMed->GetLastStorageCreationState(), OSL_LOG_PREFIX );
}
else if ( GetError() == ERRCODE_NONE && InitNew(0) )
{
@@ -1022,7 +1022,7 @@ bool SfxObjectShell::DoSave()
}
catch( uno::Exception& )
{
- SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
DBG_ASSERT( bOk, "The root storage must allow to set common password!\n" );
@@ -1062,7 +1062,7 @@ bool SfxObjectShell::DoSave()
}
catch( uno::Exception& )
{
- SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
bOk = false;
}
}
@@ -1113,7 +1113,7 @@ bool SfxObjectShell::SaveTo_Impl
UpdateDocInfoForSave();
- AddLog( OUString( OSL_LOG_PREFIX "Begin" ) );
+ AddLog( OSL_LOG_PREFIX "Begin" );
ModifyBlocker_Impl aMod(this);
@@ -1136,7 +1136,7 @@ bool SfxObjectShell::SaveTo_Impl
// protected libraries exceed the size we can handler
if ( bOwnTarget && !QuerySaveSizeExceededModules_Impl( rMedium.GetInteractionHandler() ) )
{
- SetError( ERRCODE_IO_ABORT, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_ABORT, OSL_LOG_PREFIX );
return false;
}
@@ -1153,7 +1153,7 @@ bool SfxObjectShell::SaveTo_Impl
|| pImp->nScriptingSignatureState == SignatureState::NOTVALIDATED
|| pImp->nScriptingSignatureState == SignatureState::INVALID ) )
{
- AddLog( OUString( OSL_LOG_PREFIX "MacroSignaturePreserving" ) );
+ AddLog( OSL_LOG_PREFIX "MacroSignaturePreserving" );
// the checking of the library modified state iterates over the libraries, should be done only when required
// currently the check is commented out since it is broken, we have to check the signature every time we save
@@ -1199,7 +1199,7 @@ bool SfxObjectShell::SaveTo_Impl
&& ::utl::UCBContentHelper::EqualURLs( pMedium->GetName(), rMedium.GetName() ) )
{
bStoreToSameLocation = true;
- AddLog( OUString( OSL_LOG_PREFIX "Save" ) );
+ AddLog( OSL_LOG_PREFIX "Save" );
if ( pMedium->DocNeedsFileDateCheck() )
rMedium.CheckFileDate( pMedium->GetInitFileDate( false ) );
@@ -1207,7 +1207,7 @@ bool SfxObjectShell::SaveTo_Impl
if ( bCopyTo && GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
{
// export to the same location is forbidden
- SetError( ERRCODE_IO_CANTWRITE, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_CANTWRITE, OSL_LOG_PREFIX );
}
else
{
@@ -1216,11 +1216,11 @@ bool SfxObjectShell::SaveTo_Impl
const bool bDoBackup = SvtSaveOptions().IsBackup();
if ( bDoBackup )
{
- AddLog( OUString( OSL_LOG_PREFIX "DoBackup" ) );
+ AddLog( OSL_LOG_PREFIX "DoBackup" );
rMedium.DoBackup_Impl();
if ( rMedium.GetError() )
{
- SetError( rMedium.GetErrorCode(), OUString( OSL_LOG_PREFIX ) );
+ SetError( rMedium.GetErrorCode(), OSL_LOG_PREFIX );
rMedium.ResetError();
}
}
@@ -1244,7 +1244,7 @@ bool SfxObjectShell::SaveTo_Impl
// if the last step is failed the stream should stay to be transacted and should be committed on any flush
// so we can forget the stream in any way and the next storage commit will flush it
- AddLog( OUString( OSL_LOG_PREFIX "Save: Own to Own" ) );
+ AddLog( OSL_LOG_PREFIX "Save: Own to Own" );
bNeedsDisconnectionOnFail = DisconnectStorage_Impl(
*pMedium, rMedium );
@@ -1267,7 +1267,7 @@ bool SfxObjectShell::SaveTo_Impl
// just disconnect the stream from the source format
// so that the target medium can use it
- AddLog( OUString( OSL_LOG_PREFIX "Save: Alien to Alien" ) );
+ AddLog( OSL_LOG_PREFIX "Save: Alien to Alien" );
pMedium->CloseAndRelease();
rMedium.CloseAndRelease();
@@ -1280,7 +1280,7 @@ bool SfxObjectShell::SaveTo_Impl
// format is an own one so just disconnect the source
// medium
- AddLog( OUString( OSL_LOG_PREFIX "Save: Alien to Own" ) );
+ AddLog( OSL_LOG_PREFIX "Save: Alien to Own" );
pMedium->CloseAndRelease();
rMedium.CloseAndRelease();
@@ -1292,7 +1292,7 @@ bool SfxObjectShell::SaveTo_Impl
// an alien format, just connect the source to temporary
// storage
- AddLog( OUString( OSL_LOG_PREFIX "Save: Own to Alien" ) );
+ AddLog( OSL_LOG_PREFIX "Save: Own to Alien" );
bNeedsDisconnectionOnFail = DisconnectStorage_Impl(
*pMedium, rMedium );
@@ -1314,7 +1314,7 @@ bool SfxObjectShell::SaveTo_Impl
// but for now the framework has to be ready for it
// TODO/LATER: let the medium be prepared for alien formats as well
- AddLog( OUString( OSL_LOG_PREFIX "SaveAs/Export" ) );
+ AddLog( OSL_LOG_PREFIX "SaveAs/Export" );
rMedium.CloseAndRelease();
if ( bStorageBasedTarget )
@@ -1327,7 +1327,7 @@ bool SfxObjectShell::SaveTo_Impl
if( rMedium.GetErrorCode() || pMedium->GetErrorCode() || GetErrorCode() )
return false;
- AddLog( OUString( OSL_LOG_PREFIX "Locking" ) );
+ AddLog( OSL_LOG_PREFIX "Locking" );
rMedium.LockOrigFileOnDemand( false, false );
@@ -1380,14 +1380,14 @@ bool SfxObjectShell::SaveTo_Impl
// TODO/LATER: get rid of bOk
if (bOwnTarget && pFilter && !(pFilter->GetFilterFlags() & SfxFilterFlags::STARONEFILTER))
{
- AddLog( OUString( OSL_LOG_PREFIX "Storing in own format." ) );
+ AddLog( OSL_LOG_PREFIX "Storing in own format." );
uno::Reference< embed::XStorage > xMedStorage = rMedium.GetStorage();
if ( !xMedStorage.is() )
{
// no saving without storage, unlock UI and return
Lock_Impl( this, false );
pImp->bForbidReload = bOldStat;
- AddLog( OUString( OSL_LOG_PREFIX "Storing failed, still no error set." ) );
+ AddLog( OSL_LOG_PREFIX "Storing failed, still no error set." );
return false;
}
@@ -1404,7 +1404,7 @@ bool SfxObjectShell::SaveTo_Impl
catch( uno::Exception& )
{
SAL_WARN( "sfx.doc", "Setting of common encryption key failed!" );
- SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
}
else
@@ -1422,18 +1422,18 @@ bool SfxObjectShell::SaveTo_Impl
if ( xMedStorage == GetStorage() )
{
OSL_ENSURE( !pVersionItem, "This scenario is impossible currently!\n" );
- AddLog( OUString( OSL_LOG_PREFIX "Should be impossible." ) );
+ AddLog( OSL_LOG_PREFIX "Should be impossible." );
// usual save procedure
bOk = Save();
}
else
{
// save to target
- AddLog( OUString( OSL_LOG_PREFIX "Save as own format." ) );
+ AddLog( OSL_LOG_PREFIX "Save as own format." );
bOk = SaveAsOwnFormat( rMedium );
if ( bOk && pVersionItem )
{
- AddLog( OUString( OSL_LOG_PREFIX "pVersionItem != NULL" ) );
+ AddLog( OSL_LOG_PREFIX "pVersionItem != NULL" );
aTmpVersionURL = CreateTempCopyOfStorage_Impl( xMedStorage );
bOk = !aTmpVersionURL.isEmpty();
}
@@ -1446,7 +1446,7 @@ bool SfxObjectShell::SaveTo_Impl
{
// store the thumbnail representation image
// the thumbnail is not stored in case of encrypted document
- AddLog( OUString( OSL_LOG_PREFIX "Thumbnail creation." ) );
+ AddLog( OSL_LOG_PREFIX "Thumbnail creation." );
if ( !GenerateAndStoreThumbnail( bPasswdProvided,
pFilter->IsOwnTemplateFormat(),
xMedStorage ) )
@@ -1460,7 +1460,7 @@ bool SfxObjectShell::SaveTo_Impl
{
if ( pImp->bIsSaving || pImp->bPreserveVersions )
{
- AddLog( OUString( OSL_LOG_PREFIX "Preserve versions." ) );
+ AddLog( OSL_LOG_PREFIX "Preserve versions." );
try
{
Sequence < util::RevisionTag > aVersions = rMedium.GetVersionList();
@@ -1490,7 +1490,7 @@ bool SfxObjectShell::SaveTo_Impl
}
catch( uno::Exception& )
{
- AddLog( OUString( OSL_LOG_PREFIX "Preserve versions has failed." ) );
+ AddLog( OSL_LOG_PREFIX "Preserve versions has failed." );
SAL_WARN( "sfx.doc", "Couldn't copy versions!" );
bOk = false;
// TODO/LATER: a specific error could be set
@@ -1541,7 +1541,7 @@ bool SfxObjectShell::SaveTo_Impl
}
else
{
- AddLog( OUString( OSL_LOG_PREFIX "Storing in alien format." ) );
+ AddLog( OSL_LOG_PREFIX "Storing in alien format." );
// it's a "SaveAs" in an alien format
if ( rMedium.GetFilter() && ( rMedium.GetFilter()->GetFilterFlags() & SfxFilterFlags::STARONEFILTER ) )
bOk = ExportTo( rMedium );
@@ -1570,7 +1570,7 @@ bool SfxObjectShell::SaveTo_Impl
uno::Reference< security::XDocumentDigitalSignatures > xDDSigns;
if ( bOk && bTryToPreserveScriptSignature )
{
- AddLog( OUString( OSL_LOG_PREFIX "Copying scripting signature." ) );
+ AddLog( OSL_LOG_PREFIX "Copying scripting signature." );
// if the scripting code was not changed and it is signed the signature should be preserved
// unfortunately at this point we have only information whether the basic code has changed or not
@@ -1657,7 +1657,7 @@ bool SfxObjectShell::SaveTo_Impl
rMedium.CloseZipStorage_Impl();
}
- AddLog( OUString( OSL_LOG_PREFIX "Medium commit." ) );
+ AddLog( OSL_LOG_PREFIX "Medium commit." );
OUString sName( rMedium.GetName( ) );
bOk = rMedium.Commit();
@@ -1668,7 +1668,7 @@ bool SfxObjectShell::SaveTo_Impl
if ( bOk )
{
- AddLog( OUString( OSL_LOG_PREFIX "Storing is successful." ) );
+ AddLog( OSL_LOG_PREFIX "Storing is successful." );
// if the target medium is an alien format and the "old" medium was an own format and the "old" medium
// has a name, the object storage must be exchanged, because now we need a new temporary storage
@@ -1689,7 +1689,7 @@ bool SfxObjectShell::SaveTo_Impl
// copy storage of old medium to new temporary storage and take this over
if( !ConnectTmpStorage_Impl( pMedium->GetStorage(), pMedium ) )
{
- AddLog( OUString( OSL_LOG_PREFIX "Process after storing has failed." ) );
+ AddLog( OSL_LOG_PREFIX "Process after storing has failed." );
bOk = false;
}
}
@@ -1697,7 +1697,7 @@ bool SfxObjectShell::SaveTo_Impl
}
else
{
- AddLog( OUString( OSL_LOG_PREFIX "Storing has failed." ) );
+ AddLog( OSL_LOG_PREFIX "Storing has failed." );
// in case the document storage was connected to backup temporarely it must be disconnected now
if ( bNeedsDisconnectionOnFail )
@@ -1881,7 +1881,7 @@ bool SfxObjectShell::ConnectTmpStorage_Impl(
if ( !bResult )
{
// TODO/LATER: may need error code setting based on exception
- SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
}
@@ -1936,7 +1936,7 @@ bool SfxObjectShell::DoSaveAs( SfxMedium& rMedium )
{
// here only root storages are included, which are stored via temp file
rMedium.CreateTempFileNoCopy();
- SetError(rMedium.GetErrorCode(), OUString( OSL_LOG_PREFIX ) );
+ SetError(rMedium.GetErrorCode(), OSL_LOG_PREFIX );
if ( GetError() )
return false;
@@ -1946,7 +1946,7 @@ bool SfxObjectShell::DoSaveAs( SfxMedium& rMedium )
bool bRet = SaveTo_Impl( rMedium, NULL );
if ( !bRet )
- SetError(rMedium.GetErrorCode(), OUString( OSL_LOG_PREFIX ) );
+ SetError(rMedium.GetErrorCode(), OSL_LOG_PREFIX );
return bRet;
}
@@ -2514,7 +2514,7 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs )
pMediumTmp->SetLongName( pRetrMedium->GetLongName() );
if ( pMediumTmp->GetErrorCode() != ERRCODE_NONE )
{
- SetError( pMediumTmp->GetError(), OUString( OSL_LOG_PREFIX ) );
+ SetError( pMediumTmp->GetError(), OSL_LOG_PREFIX );
delete pMediumTmp;
return false;
}
@@ -2540,7 +2540,7 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs )
pMediumTmp->GetItemSet()->ClearItem( SID_PROGRESS_STATUSBAR_CONTROL );
}
- SetError(pMediumTmp->GetErrorCode(), OUString( OSL_LOG_PREFIX ) );
+ SetError(pMediumTmp->GetErrorCode(), OSL_LOG_PREFIX );
bool bOpen( false );
bOpen = DoSaveCompleted( pMediumTmp );
@@ -2551,7 +2551,7 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs )
else
{
// transfer error code from medium to objectshell
- SetError( pMediumTmp->GetError(), OUString( OSL_LOG_PREFIX ) );
+ SetError( pMediumTmp->GetError(), OSL_LOG_PREFIX );
// reconnect to object storage
DoSaveCompleted();
@@ -2575,7 +2575,7 @@ bool SfxObjectShell::Save_Impl( const SfxItemSet* pSet )
{
if ( IsReadOnly() )
{
- SetError( ERRCODE_SFX_DOCUMENTREADONLY, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_SFX_DOCUMENTREADONLY, OSL_LOG_PREFIX );
return false;
}
@@ -2613,7 +2613,7 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString
{
if( aURL.HasError() )
{
- SetError( ERRCODE_IO_INVALIDPARAMETER, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_INVALIDPARAMETER, OSL_LOG_PREFIX );
return false;
}
@@ -2635,7 +2635,7 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString
if ( pDoc )
{
// Then error message: "already opened"
- SetError(ERRCODE_SFX_ALREADYOPEN, OUString( OSL_LOG_PREFIX ));
+ SetError(ERRCODE_SFX_ALREADYOPEN, OSL_LOG_PREFIX);
return false;
}
}
@@ -2651,7 +2651,7 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString
|| !pFilter->CanExport()
|| (!bSaveTo && !pFilter->CanImport()) )
{
- SetError( ERRCODE_IO_INVALIDPARAMETER, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_INVALIDPARAMETER, OSL_LOG_PREFIX );
return false;
}
@@ -2673,7 +2673,7 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString
if ( aURL == aActName && aURL != INetURLObject( OUString("private:stream") )
&& IsReadOnly() )
{
- SetError(ERRCODE_SFX_DOCUMENTREADONLY, OUString( OSL_LOG_PREFIX ));
+ SetError(ERRCODE_SFX_DOCUMENTREADONLY, OSL_LOG_PREFIX);
return false;
}
@@ -2796,7 +2796,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString&
if ( pNewFile->GetErrorCode() != ERRCODE_NONE )
{
// creating temporary file failed ( f.e. floppy disk not inserted! )
- SetError( pNewFile->GetError(), OUString( OSL_LOG_PREFIX ) );
+ SetError( pNewFile->GetError(), OSL_LOG_PREFIX );
delete pNewFile;
return false;
}
@@ -2817,7 +2817,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString&
if ( !pNewFile->GetErrorCode() && SaveTo_Impl( *pNewFile, NULL ) )
{
// transfer a possible error from the medium to the document
- SetError( pNewFile->GetErrorCode(), OUString( OSL_LOG_PREFIX ) );
+ SetError( pNewFile->GetErrorCode(), OSL_LOG_PREFIX );
// notify the document that saving was done successfully
if ( !bCopyTo )
@@ -2838,7 +2838,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString&
// and the DoSaveCompleted call should not be able to fail in general
DBG_ASSERT( !bCopyTo, "Error while reconnecting to medium, can't be handled!");
- SetError( pNewFile->GetErrorCode(), OUString( OSL_LOG_PREFIX ) );
+ SetError( pNewFile->GetErrorCode(), OSL_LOG_PREFIX );
if ( !bCopyTo )
{
@@ -2857,7 +2857,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString&
}
else
{
- SetError( pNewFile->GetErrorCode(), OUString( OSL_LOG_PREFIX ) );
+ SetError( pNewFile->GetErrorCode(), OSL_LOG_PREFIX );
// reconnect to the old storage
DoSaveCompleted();
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index ee9f02a3ab86..f6a1cd24a624 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1527,7 +1527,7 @@ void SAL_CALL SfxBaseModel::storeSelf( const Sequence< beans::PropertyValue >
if ( m_pData->m_pObjectShell.Is() )
{
- m_pData->m_pObjectShell->AddLog( OUString( OSL_LOG_PREFIX "storeSelf" ) );
+ m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "storeSelf" );
SfxSaveGuard aSaveGuard(this, m_pData, false);
bool bCheckIn = false;
@@ -1540,7 +1540,7 @@ void SAL_CALL SfxBaseModel::storeSelf( const Sequence< beans::PropertyValue >
&& aSeqArgs[nInd].Name != "FailOnWarning"
&& aSeqArgs[nInd].Name != "CheckIn" )
{
- m_pData->m_pObjectShell->AddLog( OUString( OSL_LOG_PREFIX "unexpected parameter for storeSelf, might be no problem if SaveAs is executed." ) );
+ m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "unexpected parameter for storeSelf, might be no problem if SaveAs is executed." );
m_pData->m_pObjectShell->StoreLog();
OUString aMessage( "Unexpected MediaDescriptor parameter: " );
@@ -1614,14 +1614,14 @@ void SAL_CALL SfxBaseModel::storeSelf( const Sequence< beans::PropertyValue >
if ( bRet )
{
- m_pData->m_pObjectShell->AddLog( OUString( OSL_LOG_PREFIX "successful saving." ) );
+ m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "successful saving." );
m_pData->m_aPreusedFilterName = GetMediumFilterName_Impl();
SfxGetpApp()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEDOCDONE, GlobalEventConfig::GetEventName(GlobalEventId::SAVEDOCDONE), m_pData->m_pObjectShell ) );
}
else
{
- m_pData->m_pObjectShell->AddLog( OUString( OSL_LOG_PREFIX "Storing failed!" ) );
+ m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "Storing failed!" );
m_pData->m_pObjectShell->StoreLog();
// write the contents of the logger to the file
@@ -1656,7 +1656,7 @@ void SAL_CALL SfxBaseModel::storeAsURL( const OUString& rURL
if ( m_pData->m_pObjectShell.Is() )
{
- m_pData->m_pObjectShell->AddLog( OUString( OSL_LOG_PREFIX "storeAsURL" ) );
+ m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "storeAsURL" );
SfxSaveGuard aSaveGuard(this, m_pData, false);
impl_store( rURL, rArgs, false );
@@ -1697,7 +1697,7 @@ void SAL_CALL SfxBaseModel::storeToURL( const OUString& rURL
if ( m_pData->m_pObjectShell.Is() )
{
- m_pData->m_pObjectShell->AddLog( OUString( OSL_LOG_PREFIX "storeToURL" ) );
+ m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "storeToURL" );
SfxSaveGuard aSaveGuard(this, m_pData, false);
impl_store( rURL, rArgs, true );
}
@@ -2977,7 +2977,7 @@ void SfxBaseModel::impl_store( const OUString& sURL
// TODO/LATER: need a new interaction for this case
if ( m_pData->m_pObjectShell->IsDocShared() )
{
- m_pData->m_pObjectShell->AddLog( OUString( OSL_LOG_PREFIX "Can't store shared document!" ) );
+ m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "Can't store shared document!" );
m_pData->m_pObjectShell->StoreLog();
uno::Sequence< beans::NamedValue > aNewEncryptionData = aArgHash.getUnpackedValueOrDefault("EncryptionData", uno::Sequence< beans::NamedValue >() );
@@ -3022,7 +3022,7 @@ void SfxBaseModel::impl_store( const OUString& sURL
if ( pCopyStreamItem && pCopyStreamItem->GetValue() && !bSaveTo )
{
- m_pData->m_pObjectShell->AddLog( OUString( OSL_LOG_PREFIX "Misuse of CopyStreamIfPossible!" ) );
+ m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "Misuse of CopyStreamIfPossible!" );
m_pData->m_pObjectShell->StoreLog();
throw frame::IllegalArgumentIOException(
@@ -3081,7 +3081,7 @@ void SfxBaseModel::impl_store( const OUString& sURL
sal_uInt32 nErrCode = m_pData->m_pObjectShell->GetErrorCode();
if ( !bRet && !nErrCode )
{
- m_pData->m_pObjectShell->AddLog( OUString( OSL_LOG_PREFIX "Storing has failed, no error is set!" ) );
+ m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "Storing has failed, no error is set!" );
nErrCode = ERRCODE_IO_CANTWRITE;
}
m_pData->m_pObjectShell->ResetError();
@@ -3102,7 +3102,7 @@ void SfxBaseModel::impl_store( const OUString& sURL
}
}
- m_pData->m_pObjectShell->AddLog( OUString( OSL_LOG_PREFIX "Storing succeeded!" ) );
+ m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "Storing succeeded!" );
if ( !bSaveTo )
{
m_pData->m_aPreusedFilterName = GetMediumFilterName_Impl();
@@ -3121,7 +3121,7 @@ void SfxBaseModel::impl_store( const OUString& sURL
else
{
// let the logring be stored to the related file
- m_pData->m_pObjectShell->AddLog( OUString( OSL_LOG_PREFIX "Storing failed!" ) );
+ m_pData->m_pObjectShell->AddLog( OSL_LOG_PREFIX "Storing failed!" );
m_pData->m_pObjectShell->StoreLog();
m_pData->m_pObjectShell->SetModifyPasswordHash( nOldModifyPasswordHash );
@@ -3953,7 +3953,7 @@ Reference< frame::XUntitledNumbers > SfxBaseModel::impl_getUntitledHelper ()
m_pData->m_xNumberedControllers.set(static_cast< ::cppu::OWeakObject* >(pHelper), UNO_QUERY_THROW);
pHelper->setOwner (xThis);
- pHelper->setUntitledPrefix (OUString(" : "));
+ pHelper->setUntitledPrefix (" : ");
}
return m_pData->m_xNumberedControllers;
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index aef48ecfe082..5b133a61bcbe 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -851,7 +851,7 @@ void SfxTemplateManagerDlg::OnTemplateImport ()
// add "All" filter
aFileDlg.AddFilter( SfxResId(STR_SFX_FILTERNAME_ALL).toString(),
- OUString(FILEDIALOG_FILTER_ALL) );
+ FILEDIALOG_FILTER_ALL );
// add template filter
OUString sFilterExt;