From e53db9461e1cc7ad25ecf5e96021a2f4e70857b1 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 6 Nov 2015 09:36:49 +0100 Subject: loplugin:stringconstant: elide explicit ctor usage (automatic rewrite) Change-Id: Ief66447f04245b8ab0a4acbf097eb7283529d45d --- .../ui/Accessibility/AccessibleEditObject.cxx | 4 +- .../StatisticsDialogs/AnalysisOfVarianceDialog.cxx | 2 +- sc/source/ui/app/inputwin.cxx | 2 +- sc/source/ui/app/scdll.cxx | 2 +- sc/source/ui/app/scmod.cxx | 2 +- sc/source/ui/cctrl/checklistmenu.cxx | 2 +- sc/source/ui/cctrl/tbzoomsliderctrl.cxx | 4 +- sc/source/ui/condformat/condformatdlg.cxx | 14 ++--- sc/source/ui/condformat/condformatdlgentry.cxx | 2 +- sc/source/ui/docshell/docsh.cxx | 60 +++++++++++----------- sc/source/ui/docshell/docsh8.cxx | 2 +- sc/source/ui/docshell/externalrefmgr.cxx | 4 +- sc/source/ui/docshell/impex.cxx | 2 +- sc/source/ui/drawfunc/chartsh.cxx | 2 +- sc/source/ui/drawfunc/drawsh2.cxx | 2 +- sc/source/ui/drawfunc/drformsh.cxx | 2 +- sc/source/ui/drawfunc/drtxtob.cxx | 2 +- sc/source/ui/drawfunc/graphsh.cxx | 2 +- sc/source/ui/drawfunc/oleobjsh.cxx | 2 +- sc/source/ui/sidebar/AlignmentPropertyPanel.cxx | 4 +- sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx | 6 +-- sc/source/ui/unoobj/celllistsource.cxx | 2 +- sc/source/ui/unoobj/cellsuno.cxx | 2 +- sc/source/ui/unoobj/cellvaluebinding.cxx | 2 +- sc/source/ui/unoobj/chartuno.cxx | 2 +- sc/source/ui/unoobj/dapiuno.cxx | 4 +- sc/source/ui/vba/vbaapplication.cxx | 12 ++--- sc/source/ui/vba/vbachart.cxx | 16 +++--- sc/source/ui/vba/vbachartobjects.cxx | 2 +- sc/source/ui/vba/vbacondition.cxx | 2 +- sc/source/ui/vba/vbaformat.cxx | 6 +-- sc/source/ui/vba/vbaformatconditions.cxx | 2 +- sc/source/ui/vba/vbarange.cxx | 4 +- sc/source/ui/vba/vbastyle.cxx | 2 +- sc/source/ui/view/auditsh.cxx | 2 +- sc/source/ui/view/cellsh.cxx | 2 +- sc/source/ui/view/editsh.cxx | 2 +- sc/source/ui/view/formatsh.cxx | 2 +- sc/source/ui/view/hdrcont.cxx | 4 +- sc/source/ui/view/output2.cxx | 2 +- sc/source/ui/view/pgbrksh.cxx | 2 +- sc/source/ui/view/pivotsh.cxx | 2 +- sc/source/ui/view/prevwsh.cxx | 2 +- sc/source/ui/view/printfun.cxx | 2 +- sc/source/ui/view/tabvwsh4.cxx | 2 +- sc/source/ui/view/viewfun2.cxx | 2 +- sc/source/ui/view/viewfun3.cxx | 8 +-- sc/source/ui/view/viewfunc.cxx | 2 +- 48 files changed, 109 insertions(+), 109 deletions(-) (limited to 'sc/source/ui') diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx index ce2b9cc1e135..58ce83085854 100644 --- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx +++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx @@ -399,13 +399,13 @@ void ScAccessibleEditObject::CreateTextHelper() sal_Int32 SAL_CALL ScAccessibleEditObject::getForeground( ) throw (css::uno::RuntimeException, std::exception) { - return GetFgBgColor(OUString(SC_UNONAME_CCOLOR)); + return GetFgBgColor(SC_UNONAME_CCOLOR); } sal_Int32 SAL_CALL ScAccessibleEditObject::getBackground( ) throw (css::uno::RuntimeException, std::exception) { - return GetFgBgColor(OUString(SC_UNONAME_CELLBACK)); + return GetFgBgColor(SC_UNONAME_CELLBACK); } sal_Int32 ScAccessibleEditObject::GetFgBgColor( const OUString &strPropColor) diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx index a5e9520e5d36..0416a688c66a 100644 --- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx @@ -307,7 +307,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output, output.nextColumn(); // Sum of Squares - OUString aSSPart = lclCreateMultiParameterFormula(aRangeList, OUString("DEVSQ(%RANGE%)"), strWildcardRange, mDocument, mAddressDetails); + OUString aSSPart = lclCreateMultiParameterFormula(aRangeList, "DEVSQ(%RANGE%)", strWildcardRange, mDocument, mAddressDetails); aTemplate.setTemplate("=SUM(%RANGE%)"); aTemplate.applyString(strWildcardRange, aSSPart); aTemplate.autoReplaceAddress("%WITHIN_SS%", output.current()); diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index f50615cbd6df..b2621a3e07ad 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -2071,7 +2071,7 @@ ScPosWnd::ScPosWnd( vcl::Window* pParent ) : nTipVisible ( 0 ), bFormulaMode( false ) { - Size aSize( GetTextWidth( OUString("GW99999:GW99999") ), + Size aSize( GetTextWidth( "GW99999:GW99999" ), GetTextHeight() ); aSize.Width() += 25; // FIXME: ?? aSize.Height() = CalcWindowSizePixel(11); // Functions: 10 MRU + "others..." diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index 37ac39c0f8fd..c9761f5c9527 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -119,7 +119,7 @@ void ScDLL::Init() ScModule* pMod = new ScModule( &ScDocShell::Factory() ); (*ppShlPtr) = pMod; - ScDocShell::Factory().SetDocumentServiceName( OUString( "com.sun.star.sheet.SpreadsheetDocument" ) ); + ScDocShell::Factory().SetDocumentServiceName( "com.sun.star.sheet.SpreadsheetDocument" ); // Not until the ResManager is initialized // The AppOptions must be initialized not until after ScGlobal::Init diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 72982730cc0b..9c9315362145 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -159,7 +159,7 @@ ScModule::ScModule( SfxObjectFactory* pFact ) : mbIsInSharedDocSaving( false ) { // The ResManager (DLL data) is not yet initalized in the ctor! - SetName(OUString("StarCalc")); // for Basic + SetName("StarCalc"); // for Basic ResetDragObject(); SetClipObject( NULL, NULL ); diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 594cf11fd1dd..8f7a3a9ec771 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -82,7 +82,7 @@ ScMenuFloatingWindow::ScMenuFloatingWindow(vcl::Window* pParent, ScDocument* pDo mpParentMenu(dynamic_cast(pParent)) { SetMenuStackLevel(nMenuStackLevel); - SetText(OUString("ScMenuFloatingWindow")); + SetText("ScMenuFloatingWindow"); const StyleSettings& rStyle = GetSettings().GetStyleSettings(); diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx index cb428a2843d7..79d1ccb9142a 100644 --- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx +++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx @@ -295,7 +295,7 @@ void ScZoomSliderWnd::MouseButtonDown( const MouseEvent& rMEvt ) aArgs[0].Name = "ScalingFactor"; aArgs[0].Value = a; - SfxToolBoxControl::Dispatch( m_xDispatchProvider, OUString(".uno:ScalingFactor"), aArgs ); + SfxToolBoxControl::Dispatch( m_xDispatchProvider, ".uno:ScalingFactor", aArgs ); mpImpl->mbOmitPaint = false; } @@ -333,7 +333,7 @@ void ScZoomSliderWnd::MouseMove( const MouseEvent& rMEvt ) aArgs[0].Name = "ScalingFactor"; aArgs[0].Value = a; - SfxToolBoxControl::Dispatch( m_xDispatchProvider, OUString(".uno:ScalingFactor"), aArgs ); + SfxToolBoxControl::Dispatch( m_xDispatchProvider, ".uno:ScalingFactor", aArgs ); mpImpl->mbOmitPaint = false; } diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 3ec832926404..aa0c6f75c938 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -657,7 +657,7 @@ bool ScCondFormatDlg::ParseXmlString(const OUString& sXMLString, while (pXmlNode != NULL && bRetVal) { - sTagName = OUStringToOString(OUString("Index"), RTL_TEXTENCODING_UTF8); + sTagName = OUStringToOString("Index", RTL_TEXTENCODING_UTF8); if (xmlStrcmp(pXmlNode->name, reinterpret_cast(sTagName.getStr())) == 0) { if (pXmlNode->children != NULL && pXmlNode->children->type == XML_TEXT_NODE) @@ -671,7 +671,7 @@ bool ScCondFormatDlg::ParseXmlString(const OUString& sXMLString, } } - sTagName = OUStringToOString(OUString("Type"), RTL_TEXTENCODING_UTF8); + sTagName = OUStringToOString("Type", RTL_TEXTENCODING_UTF8); if (xmlStrcmp(pXmlNode->name, reinterpret_cast(sTagName.getStr())) == 0) { if (pXmlNode->children != NULL && pXmlNode->children->type == XML_TEXT_NODE) @@ -685,7 +685,7 @@ bool ScCondFormatDlg::ParseXmlString(const OUString& sXMLString, } } - sTagName = OUStringToOString(OUString("Managed"), RTL_TEXTENCODING_UTF8); + sTagName = OUStringToOString("Managed", RTL_TEXTENCODING_UTF8); if (xmlStrcmp(pXmlNode->name, reinterpret_cast(sTagName.getStr())) == 0) { if (pXmlNode->children != NULL && pXmlNode->children->type == XML_TEXT_NODE) @@ -726,13 +726,13 @@ OUString ScCondFormatDlg::GenerateXmlString(sal_uInt32 nIndex, sal_uInt8 nType, xmlDocPtr pXmlDoc = xmlNewDoc(reinterpret_cast("1.0")); - sTagName = OUStringToOString(OUString("ScCondFormatDlg"), RTL_TEXTENCODING_UTF8); + sTagName = OUStringToOString("ScCondFormatDlg", RTL_TEXTENCODING_UTF8); pTagName = reinterpret_cast(sTagName.getStr()); pXmlRoot = xmlNewDocNode(pXmlDoc, NULL, pTagName, NULL); xmlDocSetRootElement(pXmlDoc, pXmlRoot); - sTagName = OUStringToOString(OUString("Index"), RTL_TEXTENCODING_UTF8); + sTagName = OUStringToOString("Index", RTL_TEXTENCODING_UTF8); sTagValue = OUStringToOString(OUString::number(nIndex), RTL_TEXTENCODING_UTF8); pTagName = reinterpret_cast(sTagName.getStr()); pTagValue = reinterpret_cast(sTagValue.getStr()); @@ -740,7 +740,7 @@ OUString ScCondFormatDlg::GenerateXmlString(sal_uInt32 nIndex, sal_uInt8 nType, xmlAddChild(pXmlRoot, pXmlNode); - sTagName = OUStringToOString(OUString("Type"), RTL_TEXTENCODING_UTF8); + sTagName = OUStringToOString("Type", RTL_TEXTENCODING_UTF8); sTagValue = OUStringToOString(OUString::number(nType), RTL_TEXTENCODING_UTF8); pTagName = reinterpret_cast(sTagName.getStr()); pTagValue = reinterpret_cast(sTagValue.getStr()); @@ -748,7 +748,7 @@ OUString ScCondFormatDlg::GenerateXmlString(sal_uInt32 nIndex, sal_uInt8 nType, xmlAddChild(pXmlRoot, pXmlNode); - sTagName = OUStringToOString(OUString("Managed"), RTL_TEXTENCODING_UTF8); + sTagName = OUStringToOString("Managed", RTL_TEXTENCODING_UTF8); sTagValue = OUStringToOString(OUString::boolean(bManaged), RTL_TEXTENCODING_UTF8); pTagName = reinterpret_cast(sTagName.getStr()); pTagValue = reinterpret_cast(sTagValue.getStr()); diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 55deff8753ba..4c995bf905f6 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -1503,7 +1503,7 @@ void ScIconSetFrmtDataEntry::SetFirstEntry() maEdEntry->Hide(); maLbEntryType->Hide(); maFtEntry->Hide(); - maEdEntry->SetText(OUString("0")); + maEdEntry->SetText("0"); maLbEntryType->SelectEntryPos(1); } diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 9124f0769909..4f8dd2b39c20 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -452,7 +452,7 @@ bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const css::uno::Reference< css bRet = aImport.Import(ScXMLImportWrapper::ALL, nError); if ( nError ) - pLoadMedium->SetError( nError, OUString( OSL_LOG_PREFIX ) ); + pLoadMedium->SetError( nError, OSL_LOG_PREFIX ); processDataStream(*this, aImport.GetImportPostProcessData()); @@ -584,10 +584,10 @@ bool ScDocShell::Load( SfxMedium& rMedium ) } if (!bRet && !rMedium.GetError()) - rMedium.SetError( SVSTREAM_FILEFORMAT_ERROR, OUString( OSL_LOG_PREFIX ) ); + rMedium.SetError( SVSTREAM_FILEFORMAT_ERROR, OSL_LOG_PREFIX ); if (rMedium.GetError()) - SetError( rMedium.GetError(), OUString( OSL_LOG_PREFIX ) ); + SetError( rMedium.GetError(), OSL_LOG_PREFIX ); InitItems(); CalcOutputFactor(); @@ -922,7 +922,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) } if ( !bSuccess ) - SetError( ERRCODE_IO_ABORT, OUString( OSL_LOG_PREFIX ) ); // this error code will produce no error message, but will break the further saving process + SetError( ERRCODE_IO_ABORT, OSL_LOG_PREFIX ); // this error code will produce no error message, but will break the further saving process } #endif @@ -939,7 +939,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) if( RET_NO == aBox->Execute()) { - SetError( ERRCODE_IO_ABORT, OUString( OSL_LOG_PREFIX ) ); // this error code will produce no error message, but will break the further saving process + SetError( ERRCODE_IO_ABORT, OSL_LOG_PREFIX ); // this error code will produce no error message, but will break the further saving process } } } // fall through @@ -1074,7 +1074,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != eERR_OK) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); } else bRet = true; @@ -1103,7 +1103,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != eERR_OK) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) bRet = true; @@ -1140,13 +1140,13 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError == SCWARN_IMPORT_RANGE_OVERFLOW) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); bRet = true; } else if (eError != eERR_OK) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); } else bRet = true; @@ -1217,7 +1217,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != eERR_OK) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); } else if (!GetError() && (bOverflowRow || bOverflowCol || bOverflowCell)) { @@ -1225,7 +1225,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) FltError nWarn = (bOverflowRow ? SCWARN_IMPORT_ROW_OVERFLOW : (bOverflowCol ? SCWARN_IMPORT_COLUMN_OVERFLOW : SCWARN_IMPORT_CELL_OVERFLOW)); - SetError( nWarn, OUString( OSL_LOG_PREFIX )); + SetError( nWarn, OSL_LOG_PREFIX); } bSetColWidths = true; bSetSimpleTextColWidths = true; @@ -1257,7 +1257,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != eERR_OK) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); bRet = ( eError == SCWARN_IMPORT_RANGE_OVERFLOW ); } else @@ -1295,7 +1295,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != eERR_OK) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) bRet = true; @@ -1331,7 +1331,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) } if ( eError != eERR_OK && !GetError() ) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); bSetColWidths = true; bSetSimpleTextColWidths = true; bSetRowHeights = true; @@ -1342,7 +1342,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != eERR_OK) { if (!GetError()) - SetError( eError, OUString( OSL_LOG_PREFIX ) ); + SetError( eError, OSL_LOG_PREFIX ); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) bRet = true; } @@ -1368,7 +1368,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != eERR_OK) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) bRet = true; @@ -1388,7 +1388,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) } if ( eError != eERR_OK && !GetError() ) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); } else if (aFltName == pFilterHtml || aFltName == pFilterHtmlWebQ) { @@ -1420,7 +1420,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (eError != eERR_OK) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) bRet = true; @@ -1439,12 +1439,12 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) } if ( eError != eERR_OK && !GetError() ) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); } else { if (!GetError()) - SetError(SCERR_IMPORT_NI, OUString( OSL_LOG_PREFIX )); + SetError(SCERR_IMPORT_NI, OSL_LOG_PREFIX); } if (!bCalc3) @@ -2256,7 +2256,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) FltError eError = ScFormatFilter::Get().ScExportExcel5( rMed, &aDocument, eFormat, RTL_TEXTENCODING_MS_1252 ); if( eError && !GetError() ) - SetError( eError, OUString( OSL_LOG_PREFIX ) ); + SetError( eError, OSL_LOG_PREFIX ); // don't return false for warnings bRet = ((eError & ERRCODE_WARNING_MASK) == ERRCODE_WARNING_MASK) || (eError == eERR_OK); @@ -2264,7 +2264,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) else { // export aborted, i.e. "Save without password" warning - SetError( ERRCODE_ABORT, OUString( OSL_LOG_PREFIX ) ); + SetError( ERRCODE_ABORT, OSL_LOG_PREFIX ); } } else if (aFltName == pFilterAscii) @@ -2297,7 +2297,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) if (aDocument.GetTableCount() > 1) if (!rMed.GetError()) - rMed.SetError(SCWARN_EXPORT_ASCII, OUString( OSL_LOG_PREFIX )); + rMed.SetError(SCWARN_EXPORT_ASCII, OSL_LOG_PREFIX); } } else if (aFltName == pFilterDBase) @@ -2334,11 +2334,11 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) INetURLObject aTmpFile( rMed.GetPhysicalName(), INetProtocol::File ); if ( bHasMemo ) - aTmpFile.setExtension(OUString("dbt")); + aTmpFile.setExtension("dbt"); if ( eError != eERR_OK ) { if (!GetError()) - SetError(eError, OUString( OSL_LOG_PREFIX )); + SetError(eError, OSL_LOG_PREFIX); if ( bHasMemo && IsDocument( aTmpFile ) ) KillFile( aTmpFile ); } @@ -2350,7 +2350,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) const SfxStringItem* pNameItem = static_cast( rMed.GetItemSet()->GetItem( SID_FILE_NAME ) ); INetURLObject aDbtFile( pNameItem->GetValue(), INetProtocol::File ); - aDbtFile.setExtension(OUString("dbt")); + aDbtFile.setExtension("dbt"); if ( IsDocument( aDbtFile ) && !KillFile( aDbtFile ) ) bRet = false; if ( bRet && !MoveFile( aTmpFile, aDbtFile ) ) @@ -2359,7 +2359,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) { KillFile( aTmpFile ); if ( !GetError() ) - SetError( SCERR_EXPORT_DATA, OUString( OSL_LOG_PREFIX ) ); + SetError( SCERR_EXPORT_DATA, OSL_LOG_PREFIX ); } } } @@ -2393,7 +2393,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) if (aDocument.GetTableCount() > 1) if (!rMed.GetError()) - rMed.SetError(SCWARN_EXPORT_ASCII, OUString( OSL_LOG_PREFIX )); + rMed.SetError(SCWARN_EXPORT_ASCII, OSL_LOG_PREFIX); } } else if (aFltName == pFilterSylk) @@ -2435,14 +2435,14 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) SetError(*new StringErrorInfo( SCWARN_EXPORT_NONCONVERTIBLE_CHARS, aImExport.GetNonConvertibleChars(), - ERRCODE_BUTTON_OK | ERRCODE_MSG_INFO), OUString(OSL_LOG_PREFIX)); + ERRCODE_BUTTON_OK | ERRCODE_MSG_INFO), OSL_LOG_PREFIX); } } } else { if (GetError()) - SetError(SCERR_IMPORT_NI, OUString(OSL_LOG_PREFIX)); + SetError(SCERR_IMPORT_NI, OSL_LOG_PREFIX); } return bRet; } diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index c708bdcc4ce5..46468de4cfd7 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -205,7 +205,7 @@ bool ScDocShell::KillFile( const INetURLObject& rURL ) ::ucbhelper::Content aCnt( rURL.GetMainURL(INetURLObject::NO_DECODE), uno::Reference< css::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); - aCnt.executeCommand( OUString( "delete" ), + aCnt.executeCommand( "delete", comphelper::makeBoolAny( true ) ); } catch( uno::Exception& ) diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index d24b9aed94dd..c442f1b84818 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -2396,7 +2396,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt { // Generate a relative file path. INetURLObject aBaseURL(getOwnDocumentName()); - aBaseURL.insertName(OUString("content.xml")); + aBaseURL.insertName("content.xml"); OUString aStr = URIHelper::simpleNormalizedMakeRelative( aBaseURL.GetMainURL(INetURLObject::NO_DECODE), aFile); @@ -2557,7 +2557,7 @@ void ScExternalRefManager::SrcFileData::maybeCreateRealFileName(const OUString& // Formulate the absolute file path from the relative path. const OUString& rRelPath = maRelativeName; INetURLObject aBaseURL(rOwnDocName); - aBaseURL.insertName(OUString("content.xml")); + aBaseURL.insertName("content.xml"); bool bWasAbs = false; maRealFileName = aBaseURL.smartRel2Abs(rRelPath, bWasAbs).GetMainURL(INetURLObject::NO_DECODE); } diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index bf3fe8f68916..55bbaede553f 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -1957,7 +1957,7 @@ bool ScImportExport::Doc2Sylk( SvStream& rStrm ) SCROW nEndRow = aRange.aEnd.Row(); OUString aCellStr; OUString aValStr; - lcl_WriteSimpleString( rStrm, OUString("ID;PCALCOOO32") ); + lcl_WriteSimpleString( rStrm, "ID;PCALCOOO32" ); WriteUnicodeOrByteEndl( rStrm ); for (nRow = nStartRow; nRow <= nEndRow; nRow++) diff --git a/sc/source/ui/drawfunc/chartsh.cxx b/sc/source/ui/drawfunc/chartsh.cxx index 9e08c74498c1..5b9bd95d1716 100644 --- a/sc/source/ui/drawfunc/chartsh.cxx +++ b/sc/source/ui/drawfunc/chartsh.cxx @@ -61,7 +61,7 @@ ScChartShell::ScChartShell(ScViewData* pData) : ScDrawShell(pData) { SetHelpId( HID_SCSHELL_CHARTSH ); - SetName( OUString("ChartObject") ); + SetName( "ChartObject" ); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Chart)); } diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index 24d69a1907bb..67382ca32c01 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -68,7 +68,7 @@ ScDrawShell::ScDrawShell( ScViewData* pData ) : pMgr->SetMaxUndoActionCount( 0 ); } SetHelpId( HID_SCSHELL_DRAWSH ); - SetName(OUString("Drawing")); + SetName("Drawing"); mpSelectionChangeHandler->Connect(); } diff --git a/sc/source/ui/drawfunc/drformsh.cxx b/sc/source/ui/drawfunc/drformsh.cxx index 5ecefc4a9a8a..231a69873f43 100644 --- a/sc/source/ui/drawfunc/drformsh.cxx +++ b/sc/source/ui/drawfunc/drformsh.cxx @@ -56,7 +56,7 @@ ScDrawFormShell::ScDrawFormShell(ScViewData* pData) : ScDrawShell(pData) { SetHelpId(HID_SCSHELL_DRAWFORMSH); - SetName(OUString("DrawForm")); + SetName("DrawForm"); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Form)); } diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 1b07ca88bd57..80462cddc245 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -128,7 +128,7 @@ ScDrawTextObjectBar::ScDrawTextObjectBar(ScViewData* pData) : } SetHelpId( HID_SCSHELL_DRTXTOB ); - SetName(OUString("DrawText")); + SetName("DrawText"); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_DrawText)); } diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx index b3145732e6e6..48bde978398b 100644 --- a/sc/source/ui/drawfunc/graphsh.cxx +++ b/sc/source/ui/drawfunc/graphsh.cxx @@ -57,7 +57,7 @@ ScGraphicShell::ScGraphicShell(ScViewData* pData) : ScDrawShell(pData) { SetHelpId(HID_SCSHELL_GRAPHIC); - SetName(OUString("GraphicObject")); + SetName("GraphicObject"); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Graphic)); } diff --git a/sc/source/ui/drawfunc/oleobjsh.cxx b/sc/source/ui/drawfunc/oleobjsh.cxx index 779129964a95..900eb417a3fb 100644 --- a/sc/source/ui/drawfunc/oleobjsh.cxx +++ b/sc/source/ui/drawfunc/oleobjsh.cxx @@ -56,7 +56,7 @@ ScOleObjectShell::ScOleObjectShell(ScViewData* pData) : ScDrawShell(pData) { SetHelpId(HID_SCSHELL_OLEOBEJCTSH); - SetName(OUString("OleObject")); + SetName("OleObject"); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_OLE)); } diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx index a317ccfda475..6f8a5e6a4e94 100644 --- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx +++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx @@ -106,7 +106,7 @@ void AlignmentPropertyPanel::Initialize() { mpFTLeftIndent->Disable(); mpMFLeftIndent->Disable(); - mpMFLeftIndent->SetAccessibleName(OUString( "Left Indent")); //wj acc + mpMFLeftIndent->SetAccessibleName("Left Indent"); //wj acc Link aLink = LINK(this, AlignmentPropertyPanel, MFLeftIndentMdyHdl); mpMFLeftIndent->SetModifyHdl ( aLink ); @@ -115,7 +115,7 @@ void AlignmentPropertyPanel::Initialize() mpCBXWrapText->SetClickHdl ( LINK(this, AlignmentPropertyPanel, CBOXWrapTextClkHdl) ); //rotation - mpMtrAngle->SetAccessibleName(OUString( "Text Orientation")); //wj acc + mpMtrAngle->SetAccessibleName("Text Orientation"); //wj acc mpMtrAngle->SetModifyHdl(LINK( this, AlignmentPropertyPanel, AngleModifiedHdl)); mpMtrAngle->EnableAutocomplete( false ); mpCBStacked->SetClickHdl(LINK(this, AlignmentPropertyPanel, ClickStackHdl)); diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index 747a0b2138f5..e3e7569eb0af 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -89,15 +89,15 @@ void NumberFormatPropertyPanel::Initialize() { mpLbCategory->SetSelectHdl ( LINK(this, NumberFormatPropertyPanel, NumFormatSelectHdl) ); mpLbCategory->SelectEntryPos(0); - mpLbCategory->SetAccessibleName(OUString( "Category")); + mpLbCategory->SetAccessibleName("Category"); mpLbCategory->SetDropDownLineCount(mpLbCategory->GetEntryCount()); Link aLink = LINK(this, NumberFormatPropertyPanel, NumFormatValueHdl); mpEdDecimals->SetModifyHdl( aLink ); mpEdLeadZeroes->SetModifyHdl( aLink ); - mpEdDecimals->SetAccessibleName(OUString( "Decimal Places")); - mpEdLeadZeroes->SetAccessibleName(OUString( "Leading Zeroes")); + mpEdDecimals->SetAccessibleName("Decimal Places"); + mpEdLeadZeroes->SetAccessibleName("Leading Zeroes"); mpBtnNegRed->SetClickHdl( LINK(this, NumberFormatPropertyPanel, NumFormatValueClickHdl) ); mpBtnThousand->SetClickHdl( LINK(this, NumberFormatPropertyPanel, NumFormatValueClickHdl) ); diff --git a/sc/source/ui/unoobj/celllistsource.cxx b/sc/source/ui/unoobj/celllistsource.cxx index 44f9cd5bf540..ae58c527aced 100644 --- a/sc/source/ui/unoobj/celllistsource.cxx +++ b/sc/source/ui/unoobj/celllistsource.cxx @@ -54,7 +54,7 @@ namespace calc // register our property at the base class CellRangeAddress aInitialPropValue; registerPropertyNoMember( - OUString( "CellRange" ), + "CellRange", PROP_HANDLE_RANGE_ADDRESS, PropertyAttribute::BOUND | PropertyAttribute::READONLY, cppu::UnoType::get(), diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 7033bc576fb9..eb9ed61085c2 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -3363,7 +3363,7 @@ void SAL_CALL ScCellRangesBase::addChartDataChangeEventListener( const uno::Refe ScDocument& rDoc = pDocShell->GetDocument(); ScRangeListRef aRangesRef( new ScRangeList(aRanges) ); ScChartListenerCollection* pColl = rDoc.GetChartListenerCollection(); - OUString aName = pColl->getUniqueName(OUString("__Uno")); + OUString aName = pColl->getUniqueName("__Uno"); if (aName.isEmpty()) // failed to create unique name. return; diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx index 1d4ce4849024..c34fb023ee87 100644 --- a/sc/source/ui/unoobj/cellvaluebinding.cxx +++ b/sc/source/ui/unoobj/cellvaluebinding.cxx @@ -58,7 +58,7 @@ namespace calc // register our property at the base class CellAddress aInitialPropValue; registerPropertyNoMember( - OUString( "BoundCell" ), + "BoundCell", PROP_HANDLE_BOUND_CELL, PropertyAttribute::BOUND | PropertyAttribute::READONLY, cppu::UnoType::get(), diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx index aef5ea31a7f8..58fc2584e4c6 100644 --- a/sc/source/ui/unoobj/chartuno.cxx +++ b/sc/source/ui/unoobj/chartuno.cxx @@ -450,7 +450,7 @@ ScChartObj::ScChartObj(ScDocShell* pDocSh, SCTAB nT, const OUString& rN) pDocShell->GetDocument().AddUnoObject(*this); uno::Sequence< table::CellRangeAddress > aInitialPropValue; - registerPropertyNoMember( OUString( "RelatedCellRanges" ), + registerPropertyNoMember( "RelatedCellRanges", PROP_HANDLE_RELATED_CELLRANGES, beans::PropertyAttribute::MAYBEVOID, cppu::UnoType::get(), &aInitialPropValue ); } diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index d054d8227862..04cdd8822f59 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -1644,7 +1644,7 @@ static bool lcl_GetFieldDataByIndex( const Reference& rSour OUString sOriginalName( lcl_GetOriginalName( xDimName ) ); rFieldId.maFieldName = sOriginalName; rFieldId.mbDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDim, - OUString(SC_UNO_DP_ISDATALAYOUT) ); + SC_UNO_DP_ISDATALAYOUT ); sal_Int32 nRepeat = 0; if ( rOrient.hasValue() && lcl_IsDuplicated( xDim ) ) @@ -2621,7 +2621,7 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons OUString aGroupDimName = pGroupDimension->GetGroupDimName(); //! localized prefix string - OUString aGroupName = pGroupDimension->CreateGroupName( OUString( "Group" ) ); + OUString aGroupName = pGroupDimension->CreateGroupName( "Group" ); ScDPSaveGroupItem aGroup( aGroupName ); Reference< XNameAccess > xMembers = GetMembers(); if (!xMembers.is()) diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index 54cfc9defbc8..09d834533225 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -461,7 +461,7 @@ ScVbaApplication::wait( double time ) throw (uno::RuntimeException, std::excepti SbxVariableRef aRef = new SbxVariable; aRef->PutDouble( time ); aArgs->Put( aRef, 1 ); - SbMethod* pMeth = static_cast(pBasic->GetRtl()->Find( OUString("WaitUntil"), SbxCLASS_METHOD )); + SbMethod* pMeth = static_cast(pBasic->GetRtl()->Find( "WaitUntil", SbxCLASS_METHOD )); if ( pMeth ) { @@ -752,7 +752,7 @@ ScVbaApplication::setDisplayFullScreen( sal_Bool bSet ) throw (uno::RuntimeExce // #FIXME calling ScViewUtil::SetFullScreen( *pShell, bSet ); // directly results in a strange crash, using dispatch instead if ( bSet != getDisplayFullScreen() ) - dispatchRequests( getCurrentDocument(), OUString(".uno:FullScreen") ); + dispatchRequests( getCurrentDocument(), ".uno:FullScreen" ); } sal_Bool SAL_CALL @@ -894,19 +894,19 @@ ScVbaApplication::setDefaultFilePath( const OUString& DefaultFilePath ) throw (u OUString SAL_CALL ScVbaApplication::getDefaultFilePath() throw (uno::RuntimeException, std::exception) { - return getOfficePath( OUString("Work")); + return getOfficePath( "Work"); } OUString SAL_CALL ScVbaApplication::getLibraryPath() throw (uno::RuntimeException, std::exception) { - return getOfficePath( OUString("Basic")); + return getOfficePath( "Basic"); } OUString SAL_CALL ScVbaApplication::getTemplatesPath() throw (uno::RuntimeException, std::exception) { - return getOfficePath( OUString("Template")); + return getOfficePath( "Template"); } OUString SAL_CALL @@ -1260,7 +1260,7 @@ uno::Any SAL_CALL ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeException, std::exception ) { StarBASIC* pBasic = SfxApplication::GetBasic(); - SbMethod* pMeth = static_cast(pBasic->GetRtl()->Find( OUString("FuncCaller"), SbxCLASS_METHOD )); + SbMethod* pMeth = static_cast(pBasic->GetRtl()->Find( "FuncCaller", SbxCLASS_METHOD )); uno::Any aRet; if ( pMeth ) { diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx index a5506b11ade0..d90af26d212a 100644 --- a/sc/source/ui/vba/vbachart.cxx +++ b/sc/source/ui/vba/vbachart.cxx @@ -262,7 +262,7 @@ try case xlSurfaceWireframe: case xlSurfaceTopView: case xlSurfaceTopViewWireframe: - setDiagram( OUString("com.sun.star.chart.BarDiagram")); + setDiagram( "com.sun.star.chart.BarDiagram"); break; case xlLine: case xl3DLine: @@ -271,7 +271,7 @@ try case xlLineMarkers: case xlLineMarkersStacked: case xlLineMarkersStacked100: - setDiagram( OUString("com.sun.star.chart.LineDiagram")); + setDiagram( "com.sun.star.chart.LineDiagram"); break; case xl3DArea: case xlArea: @@ -279,17 +279,17 @@ try case xlAreaStacked100: case xl3DAreaStacked: case xl3DAreaStacked100: - setDiagram( OUString("com.sun.star.chart.AreaDiagram") ); + setDiagram( "com.sun.star.chart.AreaDiagram" ); break; case xlDoughnut: case xlDoughnutExploded: - setDiagram( OUString("com.sun.star.chart.DonutDiagram") ); + setDiagram( "com.sun.star.chart.DonutDiagram" ); break; case xlStockHLC: case xlStockOHLC: case xlStockVHLC: case xlStockVOHLC: - setDiagram( OUString("com.sun.star.chart.StockDiagram")); + setDiagram( "com.sun.star.chart.StockDiagram"); mxDiagramPropertySet->setPropertyValue( UPDOWN, uno::makeAny((_nChartType == xlStockOHLC) || (_nChartType == xlStockVOHLC))); mxDiagramPropertySet->setPropertyValue( VOLUME, uno::makeAny((_nChartType == xlStockVHLC) || (_nChartType == xlStockVOHLC))); break; @@ -300,13 +300,13 @@ try case xl3DPie: case xlPie: case xlBarOfPie: // not possible (Zoom pie) - setDiagram( OUString("com.sun.star.chart.PieDiagram")); + setDiagram( "com.sun.star.chart.PieDiagram"); break; case xlRadar: case xlRadarMarkers: case xlRadarFilled: - setDiagram( OUString("com.sun.star.chart.NetDiagram")); + setDiagram( "com.sun.star.chart.NetDiagram"); break; case xlXYScatter: case xlBubble: // not possible @@ -315,7 +315,7 @@ try case xlXYScatterLinesNoMarkers: case xlXYScatterSmooth: case xlXYScatterSmoothNoMarkers: - setDiagram( OUString("com.sun.star.chart.XYDiagram")); + setDiagram( "com.sun.star.chart.XYDiagram"); switch(_nChartType) { case xlXYScatter: diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx index 3d64cf9f2077..812ff0363fef 100644 --- a/sc/source/ui/vba/vbachartobjects.cxx +++ b/sc/source/ui/vba/vbachartobjects.cxx @@ -141,7 +141,7 @@ ScVbaChartObjects::Add( double _nX, double _nY, double _nWidth, double _nHeight aRectangle.Width = Millimeter::getInHundredthsOfOneMillimeter(_nWidth); aRectangle.Height = Millimeter::getInHundredthsOfOneMillimeter(_nHeight); // Note the space at the end of the stem ("Chart "). In ChartSheets only "Chart" is the stem - OUString sPersistChartName = ContainerUtilities::getUniqueName( getChartObjectNames(), OUString( "Chart " ) , OUString(), 1); + OUString sPersistChartName = ContainerUtilities::getUniqueName( getChartObjectNames(), "Chart " , OUString(), 1); xTableCharts->addNewByName(sPersistChartName, aRectangle, aCellRangeAddress, true, false ); uno::Reference< excel::XChartObject > xChartObject( getItemByStringIndex( sPersistChartName ), uno::UNO_QUERY_THROW ); xChartObject->getChart()->setChartType(excel::XlChartType::xlColumnClustered); diff --git a/sc/source/ui/vba/vbacondition.cxx b/sc/source/ui/vba/vbacondition.cxx index 7d73d2702d04..c3a10695262b 100644 --- a/sc/source/ui/vba/vbacondition.cxx +++ b/sc/source/ui/vba/vbacondition.cxx @@ -146,7 +146,7 @@ ScVbaCondition< Ifc... >::Operator(bool _bIncludeFormulaValue) throw ( script::B } case sheet::ConditionOperator_NONE: default: - DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, OUString("Operator not supported")); + DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, "Operator not supported"); break; } return retvalue; diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx index 5f0a6f50c7d1..8c14d4087631 100644 --- a/sc/source/ui/vba/vbaformat.cxx +++ b/sc/source/ui/vba/vbaformat.cxx @@ -65,7 +65,7 @@ ScVbaFormat< Ifc... >::ScVbaFormat( const uno::Reference< XHelperInterface >& xP try { if ( !mxModel.is() ) - DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, OUString( "XModel Interface could not be retrieved") ); + DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, "XModel Interface could not be retrieved" ); // mxServiceInfo is unused, // mxNumberFormatsSupplier is initialized when needed in initializeNumberFormats. } @@ -120,7 +120,7 @@ ScVbaFormat< Ifc... >::getVerticalAlignment( ) throw (script::BasicErrorExcepti uno::Any aResult = aNULL(); try { - if (!isAmbiguous( OUString( SC_UNONAME_CELLVJUS ) ) ) + if (!isAmbiguous( SC_UNONAME_CELLVJUS ) ) { sal_Int32 aAPIAlignment = table::CellVertJustify2::STANDARD; mxPropertySet->getPropertyValue( SC_UNONAME_CELLVJUS ) >>= aAPIAlignment; @@ -275,7 +275,7 @@ ScVbaFormat< Ifc... >::getOrientation( ) throw (script::BasicErrorException, un uno::Any NRetOrientation = aNULL(); try { - if (!isAmbiguous(OUString( SC_UNONAME_CELLORI ))) + if (!isAmbiguous(SC_UNONAME_CELLORI)) { table::CellOrientation aOrientation = table::CellOrientation_STANDARD; if ( !( mxPropertySet->getPropertyValue( SC_UNONAME_CELLORI ) >>= aOrientation ) ) diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx index 557cd51ef45d..dc9a9adbee1c 100644 --- a/sc/source/ui/vba/vbaformatconditions.cxx +++ b/sc/source/ui/vba/vbaformatconditions.cxx @@ -253,7 +253,7 @@ ScVbaFormatConditions::getStyleName() if ( !pStyles ) DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, OUString() ); uno::Sequence< OUString > sCellStyleNames = pStyles->getStyleNames(); - return ContainerUtilities::getUniqueName(sCellStyleNames, sStyleNamePrefix, OUString("_")); + return ContainerUtilities::getUniqueName(sCellStyleNames, sStyleNamePrefix, "_"); } void diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index a50929c52a88..28e8d132ff39 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -3510,7 +3510,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any& uno::Reference< util::XSortable > xSort( mxRange, uno::UNO_QUERY_THROW ); uno::Sequence< beans::PropertyValue > sortDescriptor = xSort->createSortDescriptor(); - sal_Int32 nTableSortFieldIndex = findSortPropertyIndex( sortDescriptor, OUString( "SortFields" ) ); + sal_Int32 nTableSortFieldIndex = findSortPropertyIndex( sortDescriptor, "SortFields" ); uno::Sequence< table::TableSortField > sTableFields(1); sal_Int32 nTableIndex = 0; @@ -3528,7 +3528,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any& } sortDescriptor[ nTableSortFieldIndex ].Value <<= sTableFields; - sal_Int32 nIndex = findSortPropertyIndex( sortDescriptor, OUString("IsSortColumns") ); + sal_Int32 nIndex = findSortPropertyIndex( sortDescriptor, "IsSortColumns" ); sortDescriptor[ nIndex ].Value <<= bIsSortColumns; nIndex = findSortPropertyIndex( sortDescriptor, CONTS_HEADER ); diff --git a/sc/source/ui/vba/vbastyle.cxx b/sc/source/ui/vba/vbastyle.cxx index 6c960839d6f6..0f651b4b0f94 100644 --- a/sc/source/ui/vba/vbastyle.cxx +++ b/sc/source/ui/vba/vbastyle.cxx @@ -44,7 +44,7 @@ lcl_getStyleProps( const OUString& sStyleName, const uno::Reference< frame::XMod void ScVbaStyle::initialise() throw ( uno::RuntimeException, script::BasicErrorException ) { if (!mxModel.is() ) - DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, OUString( "XModel Interface could not be retrieved") ); + DebugHelper::basicexception(ERRCODE_BASIC_METHOD_FAILED, "XModel Interface could not be retrieved" ); uno::Reference< lang::XServiceInfo > xServiceInfo( mxPropertySet, uno::UNO_QUERY_THROW ); if ( !xServiceInfo->supportsService("com.sun.star.style.CellStyle") ) { diff --git a/sc/source/ui/view/auditsh.cxx b/sc/source/ui/view/auditsh.cxx index 57a95438498f..124351873d12 100644 --- a/sc/source/ui/view/auditsh.cxx +++ b/sc/source/ui/view/auditsh.cxx @@ -56,7 +56,7 @@ ScAuditingShell::ScAuditingShell(ScViewData* pData) : pMgr->SetMaxUndoActionCount( 0 ); } SetHelpId( HID_SCSHELL_AUDIT ); - SetName(OUString("Auditing")); + SetName("Auditing"); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Auditing)); } diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index ca925e4c6e4b..735e2c7e8527 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -80,7 +80,7 @@ ScCellShell::ScCellShell(ScViewData* pData) : bPastePossible(false) { SetHelpId(HID_SCSHELL_CELLSH); - SetName(OUString("Cell")); + SetName("Cell"); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Cell)); } diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index dca465866afb..79a1f1092175 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -100,7 +100,7 @@ ScEditShell::ScEditShell(EditView* pView, ScViewData* pData) : { SetPool( pEditView->GetEditEngine()->GetEmptyItemSet().GetPool() ); SetUndoManager( &pEditView->GetEditEngine()->GetUndoManager() ); - SetName(OUString("EditCell")); + SetName("EditCell"); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_EditCell)); } diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 4d2f2504d281..f10a078d1789 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -143,7 +143,7 @@ ScFormatShell::ScFormatShell(ScViewData* pData) : pMgr->SetMaxUndoActionCount( 0 ); } SetHelpId(HID_SCSHELL_FORMATSH); - SetName(OUString("Format")); + SetName("Format"); } ScFormatShell::~ScFormatShell() diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx index ece03625ac4d..2018821d0bcc 100644 --- a/sc/source/ui/view/hdrcont.cxx +++ b/sc/source/ui/view/hdrcont.cxx @@ -76,14 +76,14 @@ ScHeaderControl::ScHeaderControl( vcl::Window* pParent, SelectionEngine* pSelect bBoldSet = true; Size aSize = LogicToPixel( Size( - GetTextWidth(OUString("8888")), + GetTextWidth("8888"), GetTextHeight() ) ); aSize.Width() += 4; // place for highlight border aSize.Height() += 3; SetSizePixel( aSize ); nWidth = nSmallWidth = aSize.Width(); - nBigWidth = LogicToPixel( Size( GetTextWidth(OUString("8888888")), 0 ) ).Width() + 5; + nBigWidth = LogicToPixel( Size( GetTextWidth("8888888"), 0 ) ).Width() + 5; SetBackground(); } diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index f610daaee0ff..d40483a16624 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -551,7 +551,7 @@ bool ScDrawStringsVars::SetText( ScRefCellValue& rCell ) void ScDrawStringsVars::SetHashText() { - SetAutoText(OUString("###")); + SetAutoText("###"); } void ScDrawStringsVars::RepeatToFill( long nColWidth ) diff --git a/sc/source/ui/view/pgbrksh.cxx b/sc/source/ui/view/pgbrksh.cxx index 89b3222c9906..d4c8df0dde1a 100644 --- a/sc/source/ui/view/pgbrksh.cxx +++ b/sc/source/ui/view/pgbrksh.cxx @@ -55,7 +55,7 @@ ScPageBreakShell::ScPageBreakShell( ScTabViewShell* pViewSh ) : pMgr->SetMaxUndoActionCount( 0 ); } SetHelpId( HID_SCSHELL_PAGEBREAK ); - SetName(OUString("PageBreak")); + SetName("PageBreak"); } ScPageBreakShell::~ScPageBreakShell() diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx index 55ade8b614ab..3e83de30cf47 100644 --- a/sc/source/ui/view/pivotsh.cxx +++ b/sc/source/ui/view/pivotsh.cxx @@ -65,7 +65,7 @@ ScPivotShell::ScPivotShell( ScTabViewShell* pViewSh ) : pMgr->SetMaxUndoActionCount( 0 ); } SetHelpId( HID_SCSHELL_PIVOTSH ); - SetName(OUString("Pivot")); + SetName("Pivot"); SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Pivot)); } diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 2b9f1234e65c..b31044a42176 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -144,7 +144,7 @@ void ScPreviewShell::Construct( vcl::Window* pParent ) pVerScroll->Show( false ); pCorner->Show(); SetHelpId( HID_SCSHELL_PREVWSH ); - SetName(OUString("Preview")); + SetName("Preview"); } ScPreviewShell::ScPreviewShell( SfxViewFrame* pViewFrame, diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index 4e9f6c4c9af1..8512061f164e 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -1849,7 +1849,7 @@ long ScPrintFunc::DoNotes( long nNoteStart, bool bDoPrint, ScPreviewLocationData ScAutoFontColorMode eColorMode = bUseStyleColor ? SC_AUTOCOL_DISPLAY : SC_AUTOCOL_PRINT; static_cast(pDoc->GetPool()->GetDefaultItem(ATTR_PATTERN)).GetFont( aMarkFont, eColorMode ); pDev->SetFont( aMarkFont ); - long nMarkLen = pDev->GetTextWidth(OUString("GW99999:")); + long nMarkLen = pDev->GetTextWidth("GW99999:"); // without Space-Char, because it rarely arrives there Size aDataSize = aPageRect.GetSize(); diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 0ef1f40881a7..15c4194706b8 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -1438,7 +1438,7 @@ void ScTabViewShell::Construct( TriState nForceDesignMode ) EnableAutoSpell(rDoc.GetDocOptions().IsAutoSpell()); - SetName(OUString("View")); // for SBX + SetName("View"); // for SBX Color aColBlack( COL_BLACK ); SetPool( &SC_MOD()->GetPool() ); SetWindow( GetActiveWin() ); diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index d04433b7ea27..24dd690c9b41 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -2598,7 +2598,7 @@ void ScViewFunc::MoveTable( { while (pDestDoc->GetTableCount() > 1) pDestDoc->DeleteTab(0); - pDestDoc->RenameTab( 0, OUString("______42_____"), + pDestDoc->RenameTab( 0, "______42_____", false ); } diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index d84f3e078a31..95ae35f073f7 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -473,8 +473,8 @@ void ScViewFunc::PasteFromSystem() TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) ); { - SotClipboardFormatId nBiff8 = SotExchange::RegisterFormatName(OUString("Biff8")); - SotClipboardFormatId nBiff5 = SotExchange::RegisterFormatName(OUString("Biff5")); + SotClipboardFormatId nBiff8 = SotExchange::RegisterFormatName("Biff8"); + SotClipboardFormatId nBiff5 = SotExchange::RegisterFormatName("Biff5"); SotExchangeDest nDestination = SotExchangeDest::SCDOC_FREE_AREA; sal_uInt16 nSourceOptions = EXCHG_IN_ACTION_COPY; @@ -623,8 +623,8 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference= '1' && sExponentialStandardFormat[i] <= '9' ) - sExponentialStandardFormat = sExponentialStandardFormat.replaceAt( i, 1, OUString( "0" ) ); + sExponentialStandardFormat = sExponentialStandardFormat.replaceAt( i, 1, "0" ); } aOut = aOut.copy( 0, nIndexE ); // remove exponential part } -- cgit