From 06ca3d89f4b9761f1bfea66a93f0fc7e0bab71a6 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Thu, 11 Nov 2021 18:19:21 +0300 Subject: Drop ScGlobal::GetEmptyOUString() and EMPTY_OUSTRING OUString default ctor already uses a static instance (through rtl_uString_new), no need to have another module-specific static. Commit d8037ae18a297229d1b79f8f76331abfd548350d had removed its sw counterpart some time ago. Change-Id: I140fe13bc1f6b0cbe188e83e602fdebe995e467a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125061 Tested-by: Mike Kaganski Reviewed-by: Mike Kaganski --- sc/source/ui/app/inputhdl.cxx | 12 ++++++------ sc/source/ui/app/scmod.cxx | 2 +- sc/source/ui/dbgui/consdlg.cxx | 2 +- sc/source/ui/dbgui/csvgrid.cxx | 12 ++++++------ sc/source/ui/dbgui/dbnamdlg.cxx | 10 +++++----- sc/source/ui/dbgui/filtdlg.cxx | 2 +- sc/source/ui/dbgui/foptmgr.cxx | 6 +++--- sc/source/ui/dbgui/pfiltdlg.cxx | 6 +++--- sc/source/ui/dbgui/sfiltdlg.cxx | 2 +- sc/source/ui/dbgui/tpsort.cxx | 4 ++-- sc/source/ui/dbgui/validate.cxx | 12 ++++++------ sc/source/ui/docshell/docfunc.cxx | 10 +++++----- sc/source/ui/docshell/docsh3.cxx | 2 +- sc/source/ui/docshell/externalrefmgr.cxx | 2 +- sc/source/ui/docshell/impex.cxx | 4 ++-- sc/source/ui/docshell/tablink.cxx | 4 ++-- sc/source/ui/drawfunc/drtxtob1.cxx | 6 +++--- sc/source/ui/formdlg/dwfunctr.cxx | 2 +- sc/source/ui/inc/csvgrid.hxx | 4 ++-- sc/source/ui/miscdlgs/crnrdlg.cxx | 18 +++++++++--------- sc/source/ui/miscdlgs/instbdlg.cxx | 2 +- sc/source/ui/miscdlgs/linkarea.cxx | 6 +++--- sc/source/ui/navipi/content.cxx | 4 ++-- sc/source/ui/navipi/scenwnd.cxx | 4 ++-- sc/source/ui/optdlg/tpusrlst.cxx | 6 +++--- sc/source/ui/pagedlg/areasdlg.cxx | 2 +- sc/source/ui/pagedlg/scuitphfedit.cxx | 24 ++++++++++++------------ sc/source/ui/unoobj/cellsuno.cxx | 8 ++++---- sc/source/ui/vba/vbarange.cxx | 2 +- sc/source/ui/view/editsh.cxx | 6 +++--- sc/source/ui/view/gridwin.cxx | 4 ++-- sc/source/ui/view/hdrcont.cxx | 2 +- sc/source/ui/view/output2.cxx | 2 +- sc/source/ui/view/scextopt.cxx | 4 ++-- sc/source/ui/view/spelldialog.cxx | 2 +- sc/source/ui/view/spelleng.cxx | 2 +- sc/source/ui/view/viewdata.cxx | 2 +- sc/source/ui/view/viewfun4.cxx | 6 +++--- sc/source/ui/view/viewfun5.cxx | 2 +- sc/source/ui/view/viewfunc.cxx | 2 +- 40 files changed, 107 insertions(+), 107 deletions(-) (limited to 'sc/source/ui') diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 01f2b9e9d1d6..8c06ebfcc111 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -623,7 +623,7 @@ static void lcl_Replace( EditView* pView, const OUString& rNewStr, const ESelect // Dummy InsertText for Update and Paint // To do that we need to cancel the selection from above (before QuickInsertText) - pView->InsertText( EMPTY_OUSTRING ); + pView->InsertText( OUString() ); sal_Int32 nLen = pEngine->GetTextLen(0); ESelection aSel( 0, nLen, 0, nLen ); @@ -2168,7 +2168,7 @@ void ScInputHandler::UpdateParenthesis() mpEditEngine->QuickSetAttribs( aSet, aSelOther ); // Dummy InsertText for Update and Paint (selection is empty) - pTableView->InsertText( EMPTY_OUSTRING ); + pTableView->InsertText( OUString() ); bFound = true; } @@ -4311,11 +4311,11 @@ IMPL_LINK_NOARG( ScInputHandler, DelayTimer, Timer*, void ) bInOwnChange = true; // disable ModifyHdl (reset below) pActiveViewSh = nullptr; - mpEditEngine->SetTextCurrentDefaults( EMPTY_OUSTRING ); + mpEditEngine->SetTextCurrentDefaults( OUString() ); if ( pInputWin ) { - pInputWin->SetPosString( EMPTY_OUSTRING ); - pInputWin->SetTextString( EMPTY_OUSTRING ); + pInputWin->SetPosString( OUString() ); + pInputWin->SetTextString( OUString() ); pInputWin->Disable(); } @@ -4442,7 +4442,7 @@ EditView* ScInputHandler::GetFuncEditView() SetMode( SC_INPUT_TABLE ); bCreatingFuncView = false; if ( pTableView ) - pTableView->GetEditEngine()->SetText( EMPTY_OUSTRING ); + pTableView->GetEditEngine()->SetText( OUString() ); } pView = pTableView; } diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 3c47445cf566..dee33b48a509 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -1454,7 +1454,7 @@ void ScModule::ActivateInputWindow( const OUString* pStrFormula, bool bMatrix ) // Cancel if ( pWin ) { - pWin->SetFuncString( EMPTY_OUSTRING, false ); + pWin->SetFuncString( OUString(), false ); // SetSumAssignMode due to sal_False no necessary } pHdl->CancelHandler(); diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index a4d02ac792b4..1dde53c1866e 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -465,7 +465,7 @@ IMPL_LINK( ScConsolidateDlg, SelectCBHdl, weld::ComboBox&, rLb, void ) } else { - pEd->SetText( EMPTY_OUSTRING ); + pEd->SetText( OUString() ); if ( pEd == m_xEdDataArea.get() ) m_xBtnAdd->set_sensitive(true); } diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index a18ce7f5e7b5..aa6acd6ba9b2 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -546,10 +546,10 @@ void ScCsvGrid::SetTypeNames( std::vector&& rTypeNames ) ::std::for_each( maColStates.begin(), maColStates.end(), Func_SetType( CSV_TYPE_DEFAULT ) ); } -const OUString& ScCsvGrid::GetColumnTypeName( sal_uInt32 nColIndex ) const +OUString ScCsvGrid::GetColumnTypeName( sal_uInt32 nColIndex ) const { sal_uInt32 nTypeIx = static_cast< sal_uInt32 >( GetColumnType( nColIndex ) ); - return (nTypeIx < maTypeNames.size()) ? maTypeNames[ nTypeIx ] : EMPTY_OUSTRING; + return (nTypeIx < maTypeNames.size()) ? maTypeNames[ nTypeIx ] : OUString(); } static sal_uInt8 lcl_GetExtColumnType( sal_Int32 nIntType ) @@ -849,15 +849,15 @@ void ScCsvGrid::ImplSetTextLineFix( sal_Int32 nLine, const OUString& rTextLine ) InvalidateGfx(); } -const OUString& ScCsvGrid::GetCellText( sal_uInt32 nColIndex, sal_Int32 nLine ) const +OUString ScCsvGrid::GetCellText( sal_uInt32 nColIndex, sal_Int32 nLine ) const { - if( nLine < GetFirstVisLine() ) return EMPTY_OUSTRING; + if( nLine < GetFirstVisLine() ) return OUString(); sal_uInt32 nLineIx = nLine - GetFirstVisLine(); - if( nLineIx >= maTexts.size() ) return EMPTY_OUSTRING; + if( nLineIx >= maTexts.size() ) return OUString(); const std::vector& rStrVec = maTexts[ nLineIx ]; - if( nColIndex >= rStrVec.size() ) return EMPTY_OUSTRING; + if( nColIndex >= rStrVec.size() ) return OUString(); return rStrVec[ nColIndex ]; } diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index 48f9d9b0a16f..a0f6f209347c 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -318,7 +318,7 @@ void ScDbNameDlg::UpdateNames() m_xEdName->freeze(); m_xEdName->clear(); - m_xEdAssign->SetText( EMPTY_OUSTRING ); + m_xEdAssign->SetText( OUString() ); if (!rDBs.empty()) { @@ -449,12 +449,12 @@ IMPL_LINK_NOARG(ScDbNameDlg, AddBtnHdl, weld::Button&, void) UpdateNames(); - m_xEdName->set_entry_text( EMPTY_OUSTRING ); + m_xEdName->set_entry_text( OUString() ); m_xEdName->grab_focus(); m_xBtnAdd->set_label( aStrAdd ); m_xBtnAdd->set_sensitive(false); m_xBtnRemove->set_sensitive(false); - m_xEdAssign->SetText( EMPTY_OUSTRING ); + m_xEdAssign->SetText( OUString() ); m_xBtnHeader->set_active(true); // Default: with column headers m_xBtnTotals->set_active( false ); // Default: without totals row m_xBtnDoSize->set_active( false ); @@ -528,12 +528,12 @@ IMPL_LINK_NOARG(ScDbNameDlg, RemoveBtnHdl, weld::Button&, void) UpdateNames(); - m_xEdName->set_entry_text( EMPTY_OUSTRING ); + m_xEdName->set_entry_text( OUString() ); m_xEdName->grab_focus(); m_xBtnAdd->set_label( aStrAdd ); m_xBtnAdd->set_sensitive(false); m_xBtnRemove->set_sensitive(false); - m_xEdAssign->SetText( EMPTY_OUSTRING ); + m_xEdAssign->SetText( OUString() ); theCurArea = ScRange(); m_xBtnHeader->set_active(true); // Default: with column headers m_xBtnTotals->set_active( false ); // Default: without totals row diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index 525e74c4a915..e5eb4a7b333c 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -622,7 +622,7 @@ void ScFilterDlg::ClearValueList( size_t nList ) pValList->clear(); pValList->append_text( aStrNotEmpty ); pValList->append_text( aStrEmpty ); - pValList->set_entry_text( EMPTY_OUSTRING ); + pValList->set_entry_text( OUString() ); } } diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx index ac06054ac9be..9ebcf5304fb7 100644 --- a/sc/source/ui/dbgui/foptmgr.cxx +++ b/sc/source/ui/dbgui/foptmgr.cxx @@ -116,7 +116,7 @@ void ScFilterOptionsMgr::Init() pBtnDestPers->set_active(true); // always on when called pLbCopyArea->set_active( 0 ); - pEdCopyArea->SetText( EMPTY_OUSTRING ); + pEdCopyArea->SetText( OUString() ); /* * Check whether the transferred area is a database area: @@ -173,7 +173,7 @@ void ScFilterOptionsMgr::Init() else { pBtnCopyResult->set_active( false ); - pEdCopyArea->SetText( EMPTY_OUSTRING ); + pEdCopyArea->SetText( OUString() ); pLbCopyArea->set_sensitive(false); pEdCopyArea->GetWidget()->set_sensitive(false); pRbCopyArea->GetWidget()->set_sensitive(false); @@ -181,7 +181,7 @@ void ScFilterOptionsMgr::Init() } } else - pEdCopyArea->SetText( EMPTY_OUSTRING ); + pEdCopyArea->SetText( OUString() ); } bool ScFilterOptionsMgr::VerifyPosStr( const OUString& rPosStr ) const diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx index 04abc907e7c4..5631ca1b72dc 100644 --- a/sc/source/ui/dbgui/pfiltdlg.cxx +++ b/sc/source/ui/dbgui/pfiltdlg.cxx @@ -131,7 +131,7 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet ) } else { - m_xFtDbArea->set_label(EMPTY_OUSTRING); + m_xFtDbArea->set_label(OUString()); } // Read the field lists and select the entries: @@ -164,7 +164,7 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet ) aFieldLbArr[i]->set_active( 0 ); // "none" selected aCondLbArr [i]->set_active( 0 ); // "=" selected UpdateValueList( static_cast(i) ); - aValueEdArr[i]->set_entry_text(EMPTY_OUSTRING); + aValueEdArr[i]->set_entry_text(OUString()); } aValueEdArr[i]->connect_changed( LINK( this, ScPivotFilterDlg, ValModifyHdl ) ); } @@ -289,7 +289,7 @@ void ScPivotFilterDlg::ClearValueList( sal_uInt16 nList ) pValList->clear(); pValList->append_text(aStrNotEmpty); pValList->append_text(aStrEmpty); - pValList->set_entry_text(EMPTY_OUSTRING); + pValList->set_entry_text(OUString()); } } diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index e01b8e0a9571..3aeb3192372e 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -123,7 +123,7 @@ void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet ) pViewData = rQueryItem.GetViewData(); pDoc = pViewData ? &pViewData->GetDocument() : nullptr; - m_xEdFilterArea->SetText( EMPTY_OUSTRING ); // may be overwritten below + m_xEdFilterArea->SetText( OUString() ); // may be overwritten below if ( pViewData && pDoc ) { diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index b9cc96bc598c..4a662e4fad56 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -552,7 +552,7 @@ void ScTabPageSortOptions::Init() } m_xLbOutPos->set_active(0); - m_xEdOutPos->set_text(EMPTY_OUSTRING); + m_xEdOutPos->set_text(OUString()); // Check whether the field that is passed on is a database field: @@ -649,7 +649,7 @@ void ScTabPageSortOptions::Reset( const SfxItemSet* /* rArgSet */ ) m_xBtnCopyResult->set_active( false ); m_xLbOutPos->set_sensitive(false); m_xEdOutPos->set_sensitive(false); - m_xEdOutPos->set_text( EMPTY_OUSTRING ); + m_xEdOutPos->set_text( OUString() ); } } diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index 5fa84ab3d5cb..237ec6c94f83 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -509,14 +509,14 @@ void ScTPValidationValue::SetFirstFormula( const OUString& rFmlaStr ) lclGetStringListFromFormula( aStringList, rFmlaStr, mcFmlaSep ) ) { m_xEdList->set_text( aStringList ); - m_xEdMin->SetText( EMPTY_OUSTRING ); + m_xEdMin->SetText( OUString() ); // change validation mode to string list m_xLbAllow->set_active( SC_VALIDDLG_ALLOW_LIST ); } else { m_xEdMin->SetText( rFmlaStr ); - m_xEdList->set_text( EMPTY_OUSTRING ); + m_xEdList->set_text( OUString() ); } } @@ -725,12 +725,12 @@ void ScTPValidationHelp::Reset( const SfxItemSet* rArgSet ) if ( rArgSet->GetItemState( FID_VALID_HELPTITLE, true, &pItem ) == SfxItemState::SET ) m_xEdtTitle->set_text( static_cast(pItem)->GetValue() ); else - m_xEdtTitle->set_text( EMPTY_OUSTRING ); + m_xEdtTitle->set_text( OUString() ); if ( rArgSet->GetItemState( FID_VALID_HELPTEXT, true, &pItem ) == SfxItemState::SET ) m_xEdInputHelp->set_text( static_cast(pItem)->GetValue() ); else - m_xEdInputHelp->set_text( EMPTY_OUSTRING ); + m_xEdInputHelp->set_text( OUString() ); } bool ScTPValidationHelp::FillItemSet( SfxItemSet* rArgSet ) @@ -799,12 +799,12 @@ void ScTPValidationError::Reset( const SfxItemSet* rArgSet ) if ( rArgSet->GetItemState( FID_VALID_ERRTITLE, true, &pItem ) == SfxItemState::SET ) m_xEdtTitle->set_text( static_cast(pItem)->GetValue() ); else - m_xEdtTitle->set_text( EMPTY_OUSTRING ); + m_xEdtTitle->set_text( OUString() ); if ( rArgSet->GetItemState( FID_VALID_ERRTEXT, true, &pItem ) == SfxItemState::SET ) m_xEdError->set_text( static_cast(pItem)->GetValue() ); else - m_xEdError->set_text( EMPTY_OUSTRING ); + m_xEdError->set_text( OUString() ); SelectActionHdl(*m_xLbAction); } diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index ff5773c74755..a126b0b9330b 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -4355,7 +4355,7 @@ bool ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark, if ( pTokenArray ) { rDoc.InsertMatrixFormula( nStartCol, nStartRow, nEndCol, nEndRow, - aMark, EMPTY_OUSTRING, pTokenArray, eGrammar); + aMark, OUString(), pTokenArray, eGrammar); } else if ( rDoc.IsImportingXML() ) { @@ -4363,7 +4363,7 @@ bool ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark, aCode.AssignXMLString( rString, ((eGrammar == formula::FormulaGrammar::GRAM_EXTERNAL) ? rFormulaNmsp : OUString())); rDoc.InsertMatrixFormula( nStartCol, nStartRow, nEndCol, nEndRow, - aMark, EMPTY_OUSTRING, &aCode, eGrammar); + aMark, OUString(), &aCode, eGrammar); rDoc.IncXMLImportedFormulaCount( rString.getLength() ); } else if (bEnglish) @@ -4371,7 +4371,7 @@ bool ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark, ScCompiler aComp( rDoc, rRange.aStart, eGrammar); std::unique_ptr pCode = aComp.CompileString( rString ); rDoc.InsertMatrixFormula( nStartCol, nStartRow, nEndCol, nEndRow, - aMark, EMPTY_OUSTRING, pCode.get(), eGrammar); + aMark, OUString(), pCode.get(), eGrammar); } else rDoc.InsertMatrixFormula( nStartCol, nStartRow, nEndCol, nEndRow, @@ -5494,10 +5494,10 @@ void ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd if ( DeleteContents( aMark, InsertDeleteFlags::CONTENTS, true, false/*bApi*/ ) ) { // GRAM_API for API compatibility. - if (!EnterMatrix( aNewRange, &aMark, nullptr, aFormula, false/*bApi*/, false, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_API )) + if (!EnterMatrix( aNewRange, &aMark, nullptr, aFormula, false/*bApi*/, false, OUString(), formula::FormulaGrammar::GRAM_API )) { // try to restore the previous state - EnterMatrix( rOldRange, &aMark, nullptr, aFormula, false/*bApi*/, false, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_API ); + EnterMatrix( rOldRange, &aMark, nullptr, aFormula, false/*bApi*/, false, OUString(), formula::FormulaGrammar::GRAM_API ); } } diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 8d9e604ad5cd..bc49bca0a165 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -1001,7 +1001,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck aValue = aValue.copy(1, aValue.getLength()-2); // remove the 1st and last characters. GetDocFunc().EnterMatrix( aSourceRange, nullptr, nullptr, aValue, false, false, - EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_DEFAULT ); + OUString(), formula::FormulaGrammar::GRAM_DEFAULT ); } break; case ScMatrixMode::Reference : // do nothing diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 79e65d92a02a..472872db7359 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -1035,7 +1035,7 @@ OUString ScExternalRefCache::getTableName(sal_uInt16 nFileId, size_t nCacheId) c if( DocItem* pDoc = getDocItem( nFileId ) ) if( nCacheId < pDoc->maTableNames.size() ) return pDoc->maTableNames[ nCacheId ].maRealName; - return EMPTY_OUSTRING; + return OUString(); } void ScExternalRefCache::getAllTableNames(sal_uInt16 nFileId, vector& rTabNames) const diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 13376639c0ba..72dad3cc6410 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -1480,7 +1480,7 @@ static OUString lcl_GetFixed( const OUString& rLine, sal_Int32 nStart, sal_Int32 if (nNext > nLen) nNext = nLen; if ( nNext <= nStart ) - return EMPTY_OUSTRING; + return OUString(); const sal_Unicode* pStr = rLine.getStr(); @@ -2178,7 +2178,7 @@ bool ScImportExport::Sylk2Doc( SvStream& rStrm ) ScMarkData aMark(rDoc.GetSheetLimits()); aMark.SelectTable( aPos.Tab(), true ); rDoc.InsertMatrixFormula( nCol, nRow, nRefCol, - nRefRow, aMark, EMPTY_OUSTRING, xCode.get() ); + nRefRow, aMark, OUString(), xCode.get() ); } else { diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index f9d2c3207e39..6d9589861412 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -426,7 +426,7 @@ OUString ScDocumentLoader::GetOptions( const SfxMedium& rMedium ) if ( pSet && SfxItemState::SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) ) return static_cast(pItem)->GetValue(); - return EMPTY_OUSTRING; + return OUString(); } bool ScDocumentLoader::GetFilterName( const OUString& rFileName, @@ -588,7 +588,7 @@ OUString ScDocumentLoader::GetTitle() const if ( pDocShell ) return pDocShell->GetTitle(); else - return EMPTY_OUSTRING; + return OUString(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx index 4bef23933ed7..63dc62daeb60 100644 --- a/sc/source/ui/drawfunc/drtxtob1.cxx +++ b/sc/source/ui/drawfunc/drtxtob1.cxx @@ -102,9 +102,9 @@ void ScDrawTextObjectBar::ExecutePasteContents( SfxRequest & /* rReq */ ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); ScopedVclPtr pDlg(pFact->CreatePasteDialog(mrViewData.GetDialogParent())); - pDlg->Insert( SotClipboardFormatId::STRING, EMPTY_OUSTRING ); - pDlg->Insert( SotClipboardFormatId::RTF, EMPTY_OUSTRING ); - pDlg->Insert( SotClipboardFormatId::RICHTEXT, EMPTY_OUSTRING ); + pDlg->Insert( SotClipboardFormatId::STRING, OUString() ); + pDlg->Insert( SotClipboardFormatId::RTF, OUString() ); + pDlg->Insert( SotClipboardFormatId::RICHTEXT, OUString() ); TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( mrViewData.GetActiveWin() ) ); diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx index 687578c251e5..d42e99371fb3 100644 --- a/sc/source/ui/formdlg/dwfunctr.cxx +++ b/sc/source/ui/formdlg/dwfunctr.cxx @@ -162,7 +162,7 @@ void ScFunctionWin::UpdateLRUList() void ScFunctionWin::SetDescription() { - xFiFuncDesc->set_label(EMPTY_OUSTRING); + xFiFuncDesc->set_label(OUString()); const ScFuncDesc* pDesc = reinterpret_cast(xFuncList->get_selected_id().toInt64()); if (pDesc) diff --git a/sc/source/ui/inc/csvgrid.hxx b/sc/source/ui/inc/csvgrid.hxx index a186df02c0bb..c729d9815fa7 100644 --- a/sc/source/ui/inc/csvgrid.hxx +++ b/sc/source/ui/inc/csvgrid.hxx @@ -180,7 +180,7 @@ public: /** Sets new UI data type names. */ void SetTypeNames( std::vector&& rTypeNames ); /** Returns the UI type name of the specified column. */ - const OUString& GetColumnTypeName( sal_uInt32 nColIndex ) const; + OUString GetColumnTypeName( sal_uInt32 nColIndex ) const; /** Fills the options object with column data for separators mode. */ void FillColumnDataSep( ScAsciiOptions& rOptions ) const; @@ -240,7 +240,7 @@ public: void ImplSetTextLineFix( sal_Int32 nLine, const OUString& rTextLine ); /** Returns the text of the specified cell. */ - const OUString& GetCellText( sal_uInt32 nColIndex, sal_Int32 nLine ) const; + OUString GetCellText( sal_uInt32 nColIndex, sal_Int32 nLine ) const; // event handling --------------------------------------------------------- protected: diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx index 15d12d42b69a..d62e57f2e00a 100644 --- a/sc/source/ui/miscdlgs/crnrdlg.cxx +++ b/sc/source/ui/miscdlgs/crnrdlg.cxx @@ -213,13 +213,13 @@ void ScColRowNameRangesDlg::SetColRowData( const ScRange& rLabelRange, bool bRef if(bRef) { - m_xEdAssign->SetRefString( EMPTY_OUSTRING ); - m_xEdAssign2->SetRefString( EMPTY_OUSTRING ); + m_xEdAssign->SetRefString( OUString() ); + m_xEdAssign2->SetRefString( OUString() ); } else { - m_xEdAssign->SetText( EMPTY_OUSTRING ); - m_xEdAssign2->SetText( EMPTY_OUSTRING ); + m_xEdAssign->SetText( OUString() ); + m_xEdAssign2->SetText( OUString() ); } m_xBtnColHead->set_sensitive(false); @@ -339,7 +339,7 @@ void ScColRowNameRangesDlg::UpdateNames() m_xLbRange->clear(); aRangeMap.clear(); - m_xEdAssign->SetText( EMPTY_OUSTRING ); + m_xEdAssign->SetText( OUString() ); size_t nCount, j; @@ -532,10 +532,10 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, AddBtnHdl, weld::Button&, void) m_xEdAssign->GrabFocus(); m_xBtnAdd->set_sensitive(false); m_xBtnRemove->set_sensitive(false); - m_xEdAssign->SetText( EMPTY_OUSTRING ); + m_xEdAssign->SetText( OUString() ); m_xBtnColHead->set_active(true); m_xBtnRowHead->set_active(false); - m_xEdAssign2->SetText( EMPTY_OUSTRING ); + m_xEdAssign2->SetText( OUString() ); theCurArea = ScRange(); theCurData = theCurArea; Range1SelectHdl( *m_xLbRange ); @@ -598,11 +598,11 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, RemoveBtnHdl, weld::Button&, void) m_xLbRange->grab_focus(); m_xBtnAdd->set_sensitive(false); m_xBtnRemove->set_sensitive(false); - m_xEdAssign->SetText( EMPTY_OUSTRING ); + m_xEdAssign->SetText( OUString() ); theCurArea = theCurData = ScRange(); m_xBtnColHead->set_active(true); m_xBtnRowHead->set_active(false); - m_xEdAssign2->SetText( EMPTY_OUSTRING ); + m_xEdAssign2->SetText( OUString() ); Range1SelectHdl( *m_xLbRange ); } diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx index 1a7c6d804576..25dbd47d13e9 100644 --- a/sc/source/ui/miscdlgs/instbdlg.cxx +++ b/sc/source/ui/miscdlgs/instbdlg.cxx @@ -343,7 +343,7 @@ IMPL_LINK( ScInsertTableDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg pDocShTables = nullptr; FillTables_Impl( nullptr ); - m_xFtPath->set_label(EMPTY_OUSTRING); + m_xFtPath->set_label(OUString()); } } diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx index 603f4d24b078..0bff9bc0b50e 100644 --- a/sc/source/ui/miscdlgs/linkarea.cxx +++ b/sc/source/ui/miscdlgs/linkarea.cxx @@ -146,7 +146,7 @@ void ScLinkedAreaDlg::InitFromOldLink( const OUString& rFile, const OUString& rF m_xCbUrl->set_entry_text(pMed->GetName()); } else - m_xCbUrl->set_entry_text(EMPTY_OUSTRING); + m_xCbUrl->set_entry_text(OUString()); UpdateSourceRanges(); @@ -224,7 +224,7 @@ IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, m_pSourceShell = nullptr; aSourceRef.clear(); - m_xCbUrl->set_entry_text(EMPTY_OUSTRING); + m_xCbUrl->set_entry_text(OUString()); } pMed.release(); // DoLoad takes ownership } @@ -289,7 +289,7 @@ OUString ScLinkedAreaDlg::GetURL() const SfxMedium* pMed = m_pSourceShell->GetMedium(); return pMed->GetName(); } - return EMPTY_OUSTRING; + return OUString(); } OUString ScLinkedAreaDlg::GetFilter() const diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index d8b1ece7b257..7d8e4c61ff98 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -1274,12 +1274,12 @@ IMPL_LINK(ScContentTree, DragBeginHdl, bool&, rUnsetDragIcon, bool) switch ( nType ) { case ScContentId::TABLE: - pScMod->SetDragLink( aDocName, aText, EMPTY_OUSTRING ); + pScMod->SetDragLink( aDocName, aText, OUString() ); bDoLinkTrans = true; break; case ScContentId::RANGENAME: case ScContentId::DBAREA: - pScMod->SetDragLink( aDocName, EMPTY_OUSTRING, aText ); + pScMod->SetDragLink( aDocName, OUString(), aText ); bDoLinkTrans = true; break; diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx index 0b317ea0acdd..341fd764fe3d 100644 --- a/sc/source/ui/navipi/scenwnd.cxx +++ b/sc/source/ui/navipi/scenwnd.cxx @@ -44,7 +44,7 @@ void ScScenarioWindow::UpdateEntries( const std::vector &rNewEntryList { case 0: // no scenarios in current sheet - SetComment( EMPTY_OUSTRING ); + SetComment( OUString() ); break; case 1: @@ -79,7 +79,7 @@ void ScScenarioWindow::UpdateEntries( const std::vector &rNewEntryList } m_xLbScenario->thaw(); m_xLbScenario->unselect_all(); - SetComment(EMPTY_OUSTRING); + SetComment(OUString()); } } } diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index c7bcf1c8b893..8c3cf35c9038 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -469,7 +469,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, weld::Button&, rBtn, void ) mxLbLists->set_sensitive(false); mxFtEntries->set_sensitive(true); mxEdEntries->set_sensitive(true); - mxEdEntries->set_text( EMPTY_OUSTRING ); + mxEdEntries->set_text( OUString() ); mxEdEntries->grab_focus(); mxBtnAdd->set_sensitive(false); mxBtnModify->set_sensitive(false); @@ -498,7 +498,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, weld::Button&, rBtn, void ) { mxFtEntries->set_sensitive(false); mxEdEntries->set_sensitive(false); - mxEdEntries->set_text( EMPTY_OUSTRING ); + mxEdEntries->set_text( OUString() ); mxBtnRemove->set_sensitive(false); } mxBtnAdd->set_sensitive(false); @@ -620,7 +620,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, weld::Button&, rBtn, void ) mxLbLists->set_sensitive(false); mxFtEntries->set_sensitive(false); mxEdEntries->set_sensitive(false); - mxEdEntries->set_text( EMPTY_OUSTRING ); + mxEdEntries->set_text( OUString() ); mxBtnRemove->set_sensitive(false); } } diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx index 67ee2af9241d..10d82641c157 100644 --- a/sc/source/ui/pagedlg/areasdlg.cxx +++ b/sc/source/ui/pagedlg/areasdlg.cxx @@ -529,7 +529,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_SelectHdl, weld::ComboBox&, rLb, void ) // fill edit field according to list box selection if( (nSelPos == 0) || (nSelPos == nAllSheetPos) ) - pEd->SetText( EMPTY_OUSTRING ); + pEd->SetText( OUString() ); else if( nSelPos >= nFirstCustomPos ) pEd->SetText(rLb.get_id(nSelPos)); } diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx index 38d5fae13e83..11f430e63ad9 100644 --- a/sc/source/ui/pagedlg/scuitphfedit.cxx +++ b/sc/source/ui/pagedlg/scuitphfedit.cxx @@ -279,8 +279,8 @@ void ScHFEditPage::SetSelectDefinedList() aLeftEntry = pLeftObj->GetText(0); aCenterEntry = pCenterObj->GetText(0); aRightEntry = pRightObj->GetText(0); - if(aLeftEntry == EMPTY_OUSTRING && aCenterEntry == EMPTY_OUSTRING - && aRightEntry == EMPTY_OUSTRING) + if(aLeftEntry.isEmpty() && aCenterEntry.isEmpty() + && aRightEntry.isEmpty()) { eSelectEntry = eNoneEntry; bFound = true; @@ -292,7 +292,7 @@ void ScHFEditPage::SetSelectDefinedList() { aLeftEntry = pLeftObj->GetText(0); aRightEntry = pRightObj->GetText(0); - if(aLeftEntry == EMPTY_OUSTRING && aRightEntry == EMPTY_OUSTRING) + if(aLeftEntry.isEmpty() && aRightEntry.isEmpty()) { if(IsPageEntry(m_xWndCenter->GetEditEngine(), pCenterObj.get())) { @@ -313,7 +313,7 @@ void ScHFEditPage::SetSelectDefinedList() { aLeftEntry = pLeftObj->GetText(0); aRightEntry = pRightObj->GetText(0); - if(aLeftEntry == EMPTY_OUSTRING && aRightEntry == EMPTY_OUSTRING) + if(aLeftEntry.isEmpty() && aRightEntry.isEmpty()) { if(pCenterObj->IsFieldObject()) { @@ -356,8 +356,8 @@ void ScHFEditPage::SetSelectDefinedList() { aLeftEntry = pLeftObj->GetText(0); aRightEntry = pRightObj->GetText(0); - if(IsExtFileNameEntry(pCenterObj.get()) && aLeftEntry == EMPTY_OUSTRING - && aRightEntry == EMPTY_OUSTRING) + if(IsExtFileNameEntry(pCenterObj.get()) && aLeftEntry.isEmpty() + && aRightEntry.isEmpty()) { eSelectEntry = eExtFileNameEntry; bFound = true; @@ -381,7 +381,7 @@ void ScHFEditPage::SetSelectDefinedList() { aLeftEntry = pLeftObj->GetText(0); if(IsPageEntry(m_xWndCenter->GetEditEngine(), pCenterObj.get()) && - IsExtFileNameEntry(pRightObj.get()) && aLeftEntry == EMPTY_OUSTRING) + IsExtFileNameEntry(pRightObj.get()) && aLeftEntry.isEmpty()) { eSelectEntry = ePageExtFileNameEntry; bFound = true; @@ -594,7 +594,7 @@ void ScHFEditPage::ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling) case eExtFileNameEntry: ClearTextAreas(); m_xWndCenter->InsertField( SvxFieldItem( SvxExtFileField( - EMPTY_OUSTRING, SvxFileType::Var, SvxFileFormat::PathFull ), EE_FEATURE_FIELD ) ); + OUString(), SvxFileType::Var, SvxFileFormat::PathFull ), EE_FEATURE_FIELD ) ); if(!bTravelling) m_xWndCenter->GrabFocus(); break; @@ -647,7 +647,7 @@ void ScHFEditPage::ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling) m_xWndCenter->GetEditEngine()->SetTextCurrentDefaults(aPageEntry); m_xWndCenter->InsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD) ); m_xWndRight->InsertField( SvxFieldItem( SvxExtFileField( - EMPTY_OUSTRING, SvxFileType::Var, SvxFileFormat::PathFull ), EE_FEATURE_FIELD ) ); + OUString(), SvxFileType::Var, SvxFileFormat::PathFull ), EE_FEATURE_FIELD ) ); if(!bTravelling) m_xWndRight->GrabFocus(); } @@ -689,11 +689,11 @@ void ScHFEditPage::ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling) void ScHFEditPage::ClearTextAreas() { - m_xWndLeft->GetEditEngine()->SetTextCurrentDefaults(EMPTY_OUSTRING); + m_xWndLeft->GetEditEngine()->SetTextCurrentDefaults(OUString()); m_xWndLeft->Invalidate(); - m_xWndCenter->GetEditEngine()->SetTextCurrentDefaults(EMPTY_OUSTRING); + m_xWndCenter->GetEditEngine()->SetTextCurrentDefaults(OUString()); m_xWndCenter->Invalidate(); - m_xWndRight->GetEditEngine()->SetTextCurrentDefaults(EMPTY_OUSTRING); + m_xWndRight->GetEditEngine()->SetTextCurrentDefaults(OUString()); m_xWndRight->Invalidate(); } diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index b7f51d6e0ac7..9364a93139e1 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -1313,7 +1313,7 @@ static OUString lcl_GetInputString( ScDocument& rDoc, const ScAddress& rPos, boo { ScRefCellValue aCell(rDoc, rPos); if (aCell.isEmpty()) - return EMPTY_OUSTRING; + return OUString(); OUString aVal; @@ -4790,7 +4790,7 @@ OUString SAL_CALL ScCellRangeObj::getArrayFormula() ScDocShell* pDocSh = GetDocShell(); if (!pDocSh) - return EMPTY_OUSTRING; + return OUString(); ScDocument& rDoc = pDocSh->GetDocument(); ScRefCellValue aCell1(rDoc, aRange.aStart); @@ -4807,7 +4807,7 @@ OUString SAL_CALL ScCellRangeObj::getArrayFormula() return pFCell1->GetFormula(); // it doesn't matter from which cell } } - return EMPTY_OUSTRING; + return OUString(); } void ScCellRangeObj::SetArrayFormula_Impl(const OUString& rFormula, @@ -4900,7 +4900,7 @@ void SAL_CALL ScCellRangeObj::setArrayTokens( const uno::SequenceGetDocFunc().EnterMatrix( aRange, nullptr, &aTokenArray, EMPTY_OUSTRING, true, true, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_API ); + pDocSh->GetDocFunc().EnterMatrix( aRange, nullptr, &aTokenArray, OUString(), true, true, OUString(), formula::FormulaGrammar::GRAM_API ); } else { diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 693e63c2bcd4..1cb307133cf7 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -2029,7 +2029,7 @@ ScVbaRange::setFormulaArray(const uno::Any& rFormula) ScTokenArray aTokenArray(getScDocument()); (void)ScTokenConversion::ConvertToTokenArray( getScDocument(), aTokenArray, aTokens ); - getScDocShell()->GetDocFunc().EnterMatrix( getScRangeList()[0], nullptr, &aTokenArray, OUString(), true, true, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_API ); + getScDocShell()->GetDocFunc().EnterMatrix( getScRangeList()[0], nullptr, &aTokenArray, OUString(), true, true, OUString(), formula::FormulaGrammar::GRAM_API ); } OUString diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 6a93ec79be9a..c7e7dabd1ee5 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -267,9 +267,9 @@ void ScEditShell::Execute( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); ScopedVclPtr pDlg(pFact->CreatePasteDialog(rViewData.GetDialogParent())); SotClipboardFormatId nFormat = SotClipboardFormatId::NONE; - pDlg->Insert( SotClipboardFormatId::STRING, EMPTY_OUSTRING ); - pDlg->Insert( SotClipboardFormatId::RTF, EMPTY_OUSTRING ); - pDlg->Insert( SotClipboardFormatId::RICHTEXT, EMPTY_OUSTRING ); + pDlg->Insert( SotClipboardFormatId::STRING, OUString() ); + pDlg->Insert( SotClipboardFormatId::RTF, OUString() ); + pDlg->Insert( SotClipboardFormatId::RICHTEXT, OUString() ); // Do not offer SotClipboardFormatId::STRING_TSVC for // in-cell paste. diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 8913437e46df..5d5e2a3a6667 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -4531,7 +4531,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt ) { ScViewFunc* pView = mrViewData.GetView(); if ( !rData.aLinkTable.isEmpty() ) - pView->InsertTableLink( rData.aLinkDoc, EMPTY_OUSTRING, EMPTY_OUSTRING, + pView->InsertTableLink( rData.aLinkDoc, OUString(), OUString(), rData.aLinkTable ); else if ( !rData.aLinkArea.isEmpty() ) { @@ -4540,7 +4540,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt ) mrViewData.GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY ); pView->MoveCursorAbs( nPosX, nPosY, SC_FOLLOW_NONE, false, false ); - pView->InsertAreaLink( rData.aLinkDoc, EMPTY_OUSTRING, EMPTY_OUSTRING, + pView->InsertAreaLink( rData.aLinkDoc, OUString(), OUString(), rData.aLinkArea ); } else diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx index c1fe53b96485..d594693813ad 100644 --- a/sc/source/ui/view/hdrcont.cxx +++ b/sc/source/ui/view/hdrcont.cxx @@ -1107,7 +1107,7 @@ void ScHeaderControl::DrawInvert( tools::Long /* nDragPos */ ) OUString ScHeaderControl::GetDragHelp( tools::Long /* nVal */ ) { - return EMPTY_OUSTRING; + return OUString(); } void ScHeaderControl::SetMarking( bool /* bSet */ ) diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 6b4eec86584d..8da5ec78118a 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -2209,7 +2209,7 @@ static void lcl_ClearEdit( EditEngine& rEngine ) // text and attributes { rEngine.SetUpdateLayout( false ); - rEngine.SetText(EMPTY_OUSTRING); + rEngine.SetText(OUString()); // do not keep any para-attributes const SfxItemSet& rPara = rEngine.GetParaAttribs(0); if (rPara.Count()) diff --git a/sc/source/ui/view/scextopt.cxx b/sc/source/ui/view/scextopt.cxx index 7e5a7fb2268a..206b7cdc8d52 100644 --- a/sc/source/ui/view/scextopt.cxx +++ b/sc/source/ui/view/scextopt.cxx @@ -197,10 +197,10 @@ SCTAB ScExtDocOptions::GetCodeNameCount() const return static_cast< SCTAB >( mxImpl->maCodeNames.size() ); } -const OUString& ScExtDocOptions::GetCodeName( SCTAB nTab ) const +OUString ScExtDocOptions::GetCodeName( SCTAB nTab ) const { OSL_ENSURE( (0 <= nTab) && (nTab < GetCodeNameCount()), "ScExtDocOptions::GetCodeName - invalid sheet index" ); - return ((0 <= nTab) && (nTab < GetCodeNameCount())) ? mxImpl->maCodeNames[ static_cast< size_t >( nTab ) ] : EMPTY_OUSTRING; + return ((0 <= nTab) && (nTab < GetCodeNameCount())) ? mxImpl->maCodeNames[ static_cast< size_t >( nTab ) ] : OUString(); } void ScExtDocOptions::SetCodeName( SCTAB nTab, const OUString& rCodeName ) diff --git a/sc/source/ui/view/spelldialog.cxx b/sc/source/ui/view/spelldialog.cxx index c3644c2a26b4..da1e90698b38 100644 --- a/sc/source/ui/view/spelldialog.cxx +++ b/sc/source/ui/view/spelldialog.cxx @@ -256,7 +256,7 @@ void ScSpellDialogChildWindow::Init() mxEngine->SetControlWord( EEControlBits::USECHARATTRIBS ); mxEngine->EnableUndo( false ); mxEngine->SetPaperSize( aRect.GetSize() ); - mxEngine->SetTextCurrentDefaults( EMPTY_OUSTRING ); + mxEngine->SetTextCurrentDefaults( OUString() ); mxEngine->ClearModifyFlag(); mbNeedNextObj = true; diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx index 07300272c39c..1f6f649f0464 100644 --- a/sc/source/ui/view/spelleng.cxx +++ b/sc/source/ui/view/spelleng.cxx @@ -269,7 +269,7 @@ void ScConversionEngineBase::FillFromCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) } break; default: - SetTextCurrentDefaults(EMPTY_OUSTRING); + SetTextCurrentDefaults(OUString()); } } diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 60cd39fd03fd..d4b4092291a1 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -3645,7 +3645,7 @@ void ScViewData::ReadExtOptions( const ScExtDocOptions& rDocOpt ) Color aGridColor(rTabSett.maGridColor); if (aGridColor == COL_AUTO) aGridColor = SC_STD_GRIDCOLOR; - maOptions.SetGridColor(aGridColor, EMPTY_OUSTRING); + maOptions.SetGridColor(aGridColor, OUString()); // view mode and default zoom (for new sheets) from current sheet if( rTabSett.mnNormalZoom ) diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx index c4fbf527dbca..d3679b13c0d2 100644 --- a/sc/source/ui/view/viewfun4.cxx +++ b/sc/source/ui/view/viewfun4.cxx @@ -530,7 +530,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam ) pEngine->SetControlWord( EEControlBits::USECHARATTRIBS ); pEngine->EnableUndo( false ); pEngine->SetPaperSize( aRect.GetSize() ); - pEngine->SetTextCurrentDefaults( EMPTY_OUSTRING ); + pEngine->SetTextCurrentDefaults( OUString() ); // *** do the conversion *** ---------------------------------------------- @@ -639,7 +639,7 @@ bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, bool bLink else { // #i76709# if bLink isn't set, pass empty URL/filter, so a non-linked image is inserted - return PasteGraphic( rPos, aGraphic, EMPTY_OUSTRING ); + return PasteGraphic( rPos, aGraphic, OUString() ); } } @@ -673,7 +673,7 @@ bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, bool bLink // If an OLE object can't be created, insert a URL button - GetViewData().GetViewShell()->InsertURLButton( aStrURL, aStrURL, EMPTY_OUSTRING, &rPos ); + GetViewData().GetViewShell()->InsertURLButton( aStrURL, aStrURL, OUString(), &rPos ); return true; } } diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index ef92193ad3e4..ac61b30f593b 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -553,7 +553,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId, Graphic aGraphic; TypeSerializer aSerializer(*xStm); aSerializer.readGraphic(aGraphic); - bRet = PasteGraphic( aPos, aGraphic, EMPTY_OUSTRING ); + bRet = PasteGraphic( aPos, aGraphic, OUString() ); } } else if ( nFormatId == SotClipboardFormatId::DRAWING ) diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index fffb90e643c0..339c70d30aac 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -790,7 +790,7 @@ void ScViewFunc::EnterMatrix( const OUString& rString, ::formula::FormulaGrammar { ScDocShell* pDocSh = rData.GetDocShell(); bool bSuccess = pDocSh->GetDocFunc().EnterMatrix( - aRange, &rMark, nullptr, rString, false, false, EMPTY_OUSTRING, eGram ); + aRange, &rMark, nullptr, rString, false, false, OUString(), eGram ); if (bSuccess) pDocSh->UpdateOle(GetViewData()); else -- cgit