diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-11 18:19:21 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-11 20:12:31 +0100 |
commit | 06ca3d89f4b9761f1bfea66a93f0fc7e0bab71a6 (patch) | |
tree | 1c977402e7b76e9662b9e44b4881f517a4b18018 /sc | |
parent | be73c64d11fd330f76b08fc75354164aba3ecc88 (diff) |
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 <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc')
92 files changed, 278 insertions, 289 deletions
diff --git a/sc/inc/addincol.hxx b/sc/inc/addincol.hxx index b2797fd9c01d..9366e31b68ff 100644 --- a/sc/inc/addincol.hxx +++ b/sc/inc/addincol.hxx @@ -154,7 +154,7 @@ public: ~ScUnoAddInCollection(); /// User entered name. rUpperName MUST already be upper case! - const OUString & FindFunction( const OUString& rUpperName, bool bLocalFirst ); + OUString FindFunction( const OUString& rUpperName, bool bLocalFirst ); /** Only if bComplete is set, the function reference and argument types are initialized (component may have to be loaded). diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx index a2441d22c3c2..5a131e5f6a10 100644 --- a/sc/inc/conditio.hxx +++ b/sc/inc/conditio.hxx @@ -455,8 +455,8 @@ public: const OUString& rExpr1, const OUString& rExpr2, ScDocument& rDocument, const ScAddress& rPos, const OUString& rStyle, - const OUString& rExprNmsp1 = EMPTY_OUSTRING, - const OUString& rExprNmsp2 = EMPTY_OUSTRING, + const OUString& rExprNmsp1 = OUString(), + const OUString& rExprNmsp2 = OUString(), formula::FormulaGrammar::Grammar eGrammar1 = formula::FormulaGrammar::GRAM_DEFAULT, formula::FormulaGrammar::Grammar eGrammar2 = formula::FormulaGrammar::GRAM_DEFAULT, Type eType = Type::Condition); @@ -580,7 +580,7 @@ public: const ScFormatEntry* GetEntry( sal_uInt16 nPos ) const; - const OUString& GetCellStyle( ScRefCellValue& rCell, const ScAddress& rPos ) const; + OUString GetCellStyle( ScRefCellValue& rCell, const ScAddress& rPos ) const; ScCondFormatData GetData( ScRefCellValue& rCell, const ScAddress& rPos ) const; diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx index 3a0b0b2a8bb0..3eda3e00898b 100644 --- a/sc/inc/dbdata.hxx +++ b/sc/inc/dbdata.hxx @@ -167,7 +167,7 @@ public: /** Returns table column name if nCol is within column range and name is stored, else empty string. */ - const OUString& GetTableColumnName( SCCOL nCol ) const; + OUString GetTableColumnName( SCCOL nCol ) const; OUString GetSourceString() const; OUString GetOperations() const; diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx index e3939e18974e..09e71a1385ca 100644 --- a/sc/inc/formulacell.hxx +++ b/sc/inc/formulacell.hxx @@ -403,7 +403,7 @@ public: void SetHybridFormula( const OUString& r, const formula::FormulaGrammar::Grammar eGrammar ); - const OUString& GetHybridFormula() const; + OUString GetHybridFormula() const; void SetResultMatrix( SCCOL nCols, SCROW nRows, const ScConstMatrixRef& pMat, const formula::FormulaToken* pUL ); diff --git a/sc/inc/formularesult.hxx b/sc/inc/formularesult.hxx index 0f11493b9841..c2f00c3da422 100644 --- a/sc/inc/formularesult.hxx +++ b/sc/inc/formularesult.hxx @@ -190,7 +190,7 @@ public: ScConstMatrixRef GetMatrix() const; /** Return formula string if type formula::svHybridCell, else empty string. */ - const OUString& GetHybridFormula() const; + OUString GetHybridFormula() const; /** Should only be used by import filters, best in the order SetHybridDouble(), SetHybridString(), or only SetHybridFormula() for diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index 2baabb533382..7881395d802e 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -211,8 +211,6 @@ namespace o3tl { } -#define EMPTY_OUSTRING ScGlobal::GetEmptyOUString() - // Layer id's for drawing. // These are both id's and positions. constexpr SdrLayerID SC_LAYER_FRONT (0); @@ -508,7 +506,6 @@ class ScGlobal static std::atomic<LegacyFuncCollection*> pLegacyFuncCollection; static std::atomic<ScUnoAddInCollection*> pAddInCollection; static std::unique_ptr<ScUserList> xUserList; - static SC_DLLPUBLIC const OUString aEmptyOUString; static OUString aStrClipDocName; static OUString aStrErrorStringNoRef; static std::unique_ptr<SvxBrushItem> xEmptyBrushItem; @@ -598,7 +595,6 @@ public: static void InitTextHeight(const SfxItemPool* pPool); static SvxBrushItem* GetEmptyBrushItem() { return xEmptyBrushItem.get(); } static SvxBrushItem* GetButtonBrushItem(); - static const OUString& GetEmptyOUString() { return aEmptyOUString; } static bool HasStarCalcFunctionList(); static ScFunctionList* GetStarCalcFunctionList(); diff --git a/sc/inc/scextopt.hxx b/sc/inc/scextopt.hxx index 3d77c1ed4122..843dfa6ebab0 100644 --- a/sc/inc/scextopt.hxx +++ b/sc/inc/scextopt.hxx @@ -107,7 +107,7 @@ public: /** @return the number of sheet codenames. */ SCTAB GetCodeNameCount() const; /** @return the specified codename (empty string = no codename). */ - const OUString& GetCodeName( SCTAB nTab ) const; + OUString GetCodeName( SCTAB nTab ) const; /** Appends a codename for a sheet. */ void SetCodeName( SCTAB nTab, const OUString& rCodeName ); diff --git a/sc/inc/validat.hxx b/sc/inc/validat.hxx index 44b41dd065df..b0709dc0da14 100644 --- a/sc/inc/validat.hxx +++ b/sc/inc/validat.hxx @@ -84,7 +84,7 @@ public: ScValidationData( ScValidationMode eMode, ScConditionMode eOper, const OUString& rExpr1, const OUString& rExpr2, ScDocument& rDocument, const ScAddress& rPos, - const OUString& rExprNmsp1 = EMPTY_OUSTRING, const OUString& rExprNmsp2 = EMPTY_OUSTRING, + const OUString& rExprNmsp1 = OUString(), const OUString& rExprNmsp2 = OUString(), formula::FormulaGrammar::Grammar eGrammar1 = formula::FormulaGrammar::GRAM_DEFAULT, formula::FormulaGrammar::Grammar eGrammar2 = formula::FormulaGrammar::GRAM_DEFAULT ); ScValidationData( ScValidationMode eMode, ScConditionMode eOper, diff --git a/sc/qa/unit/subsequent_filters_test.cxx b/sc/qa/unit/subsequent_filters_test.cxx index d19d35c23607..4e261b536ede 100644 --- a/sc/qa/unit/subsequent_filters_test.cxx +++ b/sc/qa/unit/subsequent_filters_test.cxx @@ -1505,14 +1505,14 @@ void checkValiditationEntries( const ValDataTestParams& rVDTParams ) //create expected data validation entry ScValidationData aValData( rVDTParams.eValMode, rVDTParams.eCondOp, rVDTParams.aStrVal1, - rVDTParams.aStrVal2, rDoc, rVDTParams.aPosition, EMPTY_OUSTRING, - EMPTY_OUSTRING, rDoc.GetStorageGrammar(), rDoc.GetStorageGrammar() + rVDTParams.aStrVal2, rDoc, rVDTParams.aPosition, OUString(), + OUString(), rDoc.GetStorageGrammar(), rDoc.GetStorageGrammar() ); aValData.SetIgnoreBlank( true ); aValData.SetListType( 1 ); aValData.ResetInput(); aValData.SetError( rVDTParams.aErrorTitle, rVDTParams.aErrorMessage, rVDTParams.eErrorStyle ); - aValData.SetSrcString( EMPTY_OUSTRING ); + aValData.SetSrcString( OUString() ); //get actual data validation entry from document const ScValidationData* pValDataTest = rDoc.GetValidationEntry( rVDTParams.nExpectedIndex ); @@ -1587,7 +1587,7 @@ void ScFiltersTest::testDataValidityODS() //sheet1's expected Data Validation Entry values ValDataTestParams aVDTParams1( - SC_VALID_DECIMAL, ScConditionMode::Greater, "3.14", EMPTY_OUSTRING, rDoc, + SC_VALID_DECIMAL, ScConditionMode::Greater, "3.14", OUString(), rDoc, aValBaseAddr1, "Too small", "The number you are trying to enter is not greater than 3.14! Are you sure you want to enter it anyway?", SC_VALERR_WARNING, 1 @@ -1601,7 +1601,7 @@ void ScFiltersTest::testDataValidityODS() ); //sheet3's expected Data Validation Entry values ValDataTestParams aVDTParams3( - SC_VALID_CUSTOM, ScConditionMode::Direct, "ISTEXT(C3)", EMPTY_OUSTRING, rDoc, + SC_VALID_CUSTOM, ScConditionMode::Direct, "ISTEXT(C3)", OUString(), rDoc, aValBaseAddr3, "Error sheet 3", "Must not be a numerical value.", SC_VALERR_STOP, 3 diff --git a/sc/qa/unit/ucalc_copypaste.cxx b/sc/qa/unit/ucalc_copypaste.cxx index 4909bc3fbe6d..dc3a74f2ec8f 100644 --- a/sc/qa/unit/ucalc_copypaste.cxx +++ b/sc/qa/unit/ucalc_copypaste.cxx @@ -2613,15 +2613,15 @@ void TestCopyPaste::checkCopyPasteSpecialInitial(const SCTAB srcSheet) // col 5, formulas CPPUNIT_ASSERT_EQUAL(OUString("=B3+B5+60"), getFormula(5, 2, srcSheet)); CPPUNIT_ASSERT_EQUAL(64.0, m_pDoc->GetValue(5, 2, srcSheet)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(5, 3, srcSheet)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(5, 4, srcSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(5, 3, srcSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(5, 4, srcSheet)); CPPUNIT_ASSERT_EQUAL(OUString("=B3+B5+70"), getFormula(5, 5, srcSheet)); CPPUNIT_ASSERT_EQUAL(74.0, m_pDoc->GetValue(5, 5, srcSheet)); // col 6, formulas CPPUNIT_ASSERT_EQUAL(OUString("=SUMIF(B3:B6;\"<4\")"), getFormula(6, 2, srcSheet)); CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(6, 2, srcSheet)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(6, 3, srcSheet)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(6, 4, srcSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(6, 3, srcSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(6, 4, srcSheet)); CPPUNIT_ASSERT_EQUAL(OUString("=C$3+$B$5+80"), getFormula(6, 5, srcSheet)); CPPUNIT_ASSERT_EQUAL(94.0, m_pDoc->GetValue(6, 5, srcSheet)); @@ -2902,8 +2902,8 @@ void TestCopyPaste::checkCopyPasteSpecial(bool bSkipEmpty, bool bCut) CPPUNIT_ASSERT_EQUAL(64.0, m_pDoc->GetValue(7, 1, destSheet)); if (!bSkipEmpty) { - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(7, 2, destSheet)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(7, 3, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(7, 2, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(7, 3, destSheet)); } else { @@ -2921,8 +2921,8 @@ void TestCopyPaste::checkCopyPasteSpecial(bool bSkipEmpty, bool bCut) CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(8, 1, destSheet)); if (!bSkipEmpty) { - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(8, 2, destSheet)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(8, 3, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(8, 2, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(8, 3, destSheet)); } else { @@ -3255,7 +3255,7 @@ void TestCopyPaste::checkCopyPasteSpecialFiltered(bool bSkipEmpty) CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(3, 5, destSheet)); // col 4, formulas CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(4, 0, destSheet)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, getFormula(4, 0, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), getFormula(4, 0, destSheet)); CPPUNIT_ASSERT_EQUAL(11.0, m_pDoc->GetValue(4, 1, destSheet)); CPPUNIT_ASSERT_EQUAL(OUString("=D2+10"), getFormula(4, 1, destSheet)); CPPUNIT_ASSERT_EQUAL(OUString("=G3+30"), getFormula(4, 2, destSheet)); @@ -3273,7 +3273,7 @@ void TestCopyPaste::checkCopyPasteSpecialFiltered(bool bSkipEmpty) CPPUNIT_ASSERT_EQUAL(OUString("d"), m_pDoc->GetString(5, 3, destSheet)); CPPUNIT_ASSERT_EQUAL(OUString("a"), m_pDoc->GetString(5, 4, destSheet)); // repeated row 1 CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(5, 5, destSheet)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, getFormula(4, 5, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), getFormula(4, 5, destSheet)); // col 6, rich text CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(6, 0, destSheet)); pEditObj = m_pDoc->GetEditText(ScAddress(6, 0, destSheet)); @@ -3298,7 +3298,7 @@ void TestCopyPaste::checkCopyPasteSpecialFiltered(bool bSkipEmpty) // formula is not adjusted due to filter row CPPUNIT_ASSERT_EQUAL(65.0, m_pDoc->GetValue(7, 1, destSheet)); if (!bSkipEmpty) - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(7, 2, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(7, 2, destSheet)); else CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(7, 2, destSheet)); CPPUNIT_ASSERT_EQUAL(OUString("=D1+D3+70"), getFormula(7, 3, destSheet)); @@ -3314,7 +3314,7 @@ void TestCopyPaste::checkCopyPasteSpecialFiltered(bool bSkipEmpty) CPPUNIT_ASSERT_EQUAL(OUString("=SUMIF(D2:D5;\"<4\")"), getFormula(8, 1, destSheet)); CPPUNIT_ASSERT_EQUAL(5.0, m_pDoc->GetValue(8, 1, destSheet)); if (!bSkipEmpty) - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(8, 2, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(8, 2, destSheet)); else CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(8, 2, destSheet)); CPPUNIT_ASSERT_EQUAL(1115.0, m_pDoc->GetValue(8, 3, destSheet)); @@ -3530,8 +3530,8 @@ void TestCopyPaste::checkCopyPasteSpecialTranspose(bool bSkipEmpty, bool bCut) CPPUNIT_ASSERT_EQUAL_MESSAGE("transposed D6", 64.0, m_pDoc->GetValue(3, 5, destSheet)); if (!bSkipEmpty) { - CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", EMPTY_OUSTRING, m_pDoc->GetString(4, 5, destSheet)); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", EMPTY_OUSTRING, m_pDoc->GetString(5, 5, destSheet)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", OUString(), m_pDoc->GetString(4, 5, destSheet)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", OUString(), m_pDoc->GetString(5, 5, destSheet)); } else { @@ -3551,8 +3551,8 @@ void TestCopyPaste::checkCopyPasteSpecialTranspose(bool bSkipEmpty, bool bCut) CPPUNIT_ASSERT_EQUAL_MESSAGE("transposed D7", 6.0, m_pDoc->GetValue(3, 6, destSheet)); if (!bSkipEmpty) { - CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", EMPTY_OUSTRING, m_pDoc->GetString(4, 6, destSheet)); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", EMPTY_OUSTRING, m_pDoc->GetString(5, 6, destSheet)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", OUString(), m_pDoc->GetString(4, 6, destSheet)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", OUString(), m_pDoc->GetString(5, 6, destSheet)); } else { @@ -4024,7 +4024,7 @@ void TestCopyPaste::checkCopyPasteSpecialFilteredTranspose(bool bSkipEmpty) CPPUNIT_ASSERT_EQUAL_MESSAGE("transposed D6", 65.0, m_pDoc->GetValue(ScAddress(3, 5, destSheet))); if (!bSkipEmpty) - CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", EMPTY_OUSTRING, m_pDoc->GetString(4, 5, destSheet)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", OUString(), m_pDoc->GetString(4, 5, destSheet)); else CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(4, 5, destSheet)); CPPUNIT_ASSERT_EQUAL_MESSAGE("transposed F6", OUString("=C2+E2+70"), @@ -4045,7 +4045,7 @@ void TestCopyPaste::checkCopyPasteSpecialFilteredTranspose(bool bSkipEmpty) getFormula(3, 6, destSheet)); CPPUNIT_ASSERT_EQUAL_MESSAGE("transposed D7", 5.0, m_pDoc->GetValue(3, 6, destSheet)); if (!bSkipEmpty) - CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", EMPTY_OUSTRING, m_pDoc->GetString(4, 6, destSheet)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", OUString(), m_pDoc->GetString(4, 6, destSheet)); else CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(4, 6, destSheet)); CPPUNIT_ASSERT_EQUAL_MESSAGE("transposed F7", OUString("=B$3+$B$5+80"), @@ -4387,8 +4387,8 @@ void TestCopyPaste::checkCopyPasteSpecialMultiRangeCol(bool bSkipEmpty) CPPUNIT_ASSERT_EQUAL(2060.0, m_pDoc->GetValue(6, 1, destSheet)); // It was 64 if (!bSkipEmpty) { - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(6, 2, destSheet)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(6, 3, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(6, 2, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(6, 3, destSheet)); } else { @@ -4406,8 +4406,8 @@ void TestCopyPaste::checkCopyPasteSpecialMultiRangeCol(bool bSkipEmpty) CPPUNIT_ASSERT_EQUAL(0.0, m_pDoc->GetValue(7, 1, destSheet)); // It was 6 if (!bSkipEmpty) { - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(7, 2, destSheet)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(7, 3, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(7, 2, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(7, 3, destSheet)); } else { @@ -4680,7 +4680,7 @@ void TestCopyPaste::checkCopyPasteSpecialMultiRangeColFiltered(bool bSkipEmpty) CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(3, 4, destSheet)); // col 4, formulas CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(4, 0, destSheet)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, getFormula(4, 0, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), getFormula(4, 0, destSheet)); CPPUNIT_ASSERT_EQUAL(11.0, m_pDoc->GetValue(4, 1, destSheet)); CPPUNIT_ASSERT_EQUAL(OUString("=D2+10"), getFormula(4, 1, destSheet)); // references over selection gaps are not adjusted @@ -4691,7 +4691,7 @@ void TestCopyPaste::checkCopyPasteSpecialMultiRangeColFiltered(bool bSkipEmpty) // was originally 42, not adjusted by filtering CPPUNIT_ASSERT_EQUAL(41.0, m_pDoc->GetValue(4, 3, destSheet)); CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(4, 4, destSheet)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, getFormula(4, 4, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), getFormula(4, 4, destSheet)); // col 5, strings are not selected // col 5, rich text CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(5, 0, destSheet)); @@ -4709,30 +4709,30 @@ void TestCopyPaste::checkCopyPasteSpecialMultiRangeColFiltered(bool bSkipEmpty) CPPUNIT_ASSERT(pEditObj == nullptr); // col 6, formulas CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(6, 0, destSheet)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, getFormula(6, 0, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), getFormula(6, 0, destSheet)); CPPUNIT_ASSERT_EQUAL(OUString("=C2+C4+60"), getFormula(6, 1, destSheet)); CPPUNIT_ASSERT_EQUAL(2060.0, m_pDoc->GetValue(6, 1, destSheet)); // It was 64 if (!bSkipEmpty) - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(6, 2, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(6, 2, destSheet)); else CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(6, 2, destSheet)); CPPUNIT_ASSERT_EQUAL(OUString("=C1+C3+70"), getFormula(6, 3, destSheet)); CPPUNIT_ASSERT_EQUAL(2070.0, m_pDoc->GetValue(6, 3, destSheet)); // It was 74 CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(6, 4, destSheet)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, getFormula(6, 4, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), getFormula(6, 4, destSheet)); // col 7, formulas CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(7, 0, destSheet)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, getFormula(7, 0, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), getFormula(7, 0, destSheet)); CPPUNIT_ASSERT_EQUAL(OUString("=SUMIF(C2:C5;\"<4\")"), getFormula(7, 1, destSheet)); CPPUNIT_ASSERT_EQUAL(0.0, m_pDoc->GetValue(7, 1, destSheet)); // It was 6 if (!bSkipEmpty) - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(7, 2, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(7, 2, destSheet)); else CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(7, 2, destSheet)); CPPUNIT_ASSERT_EQUAL(1083.0, m_pDoc->GetValue(7, 3, destSheet)); CPPUNIT_ASSERT_EQUAL(OUString("=D$3+$B$5+80"), getFormula(7, 3, destSheet)); CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(7, 4, destSheet)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, getFormula(7, 4, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), getFormula(7, 4, destSheet)); // col 8, numbers CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(8, 0, destSheet)); CPPUNIT_ASSERT_EQUAL(121.0, m_pDoc->GetValue(8, 1, destSheet)); @@ -5014,8 +5014,8 @@ void TestCopyPaste::checkCopyPasteSpecialMultiRangeColTranspose(bool bSkipEmpty) CPPUNIT_ASSERT_EQUAL(2060.0, m_pDoc->GetValue(3, 4, destSheet)); // It was 64 if (!bSkipEmpty) { - CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E5", EMPTY_OUSTRING, m_pDoc->GetString(4, 4, destSheet)); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E5", EMPTY_OUSTRING, m_pDoc->GetString(5, 4, destSheet)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E5", OUString(), m_pDoc->GetString(4, 4, destSheet)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E5", OUString(), m_pDoc->GetString(5, 4, destSheet)); } else { @@ -5033,8 +5033,8 @@ void TestCopyPaste::checkCopyPasteSpecialMultiRangeColTranspose(bool bSkipEmpty) CPPUNIT_ASSERT_EQUAL(0.0, m_pDoc->GetValue(3, 5, destSheet)); // It was 6 if (!bSkipEmpty) { - CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", EMPTY_OUSTRING, m_pDoc->GetString(4, 5, destSheet)); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", EMPTY_OUSTRING, m_pDoc->GetString(5, 5, destSheet)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", OUString(), m_pDoc->GetString(4, 5, destSheet)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", OUString(), m_pDoc->GetString(5, 5, destSheet)); } else { @@ -5352,7 +5352,7 @@ void TestCopyPaste::checkCopyPasteSpecialMultiRangeColFilteredTranspose(bool bSk CPPUNIT_ASSERT_EQUAL(OUString("=D1+F1+60"), getFormula(3, 4, destSheet)); CPPUNIT_ASSERT_EQUAL(2060.0, m_pDoc->GetValue(3, 4, destSheet)); // It was 64 if (!bSkipEmpty) - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(4, 4, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(4, 4, destSheet)); else CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(4, 4, destSheet)); CPPUNIT_ASSERT_EQUAL(OUString("=C1+E1+70"), getFormula(5, 4, destSheet)); @@ -5366,7 +5366,7 @@ void TestCopyPaste::checkCopyPasteSpecialMultiRangeColFilteredTranspose(bool bSk CPPUNIT_ASSERT_EQUAL(OUString("=SUMIF(D1:G1;\"<4\")"), getFormula(3, 5, destSheet)); CPPUNIT_ASSERT_EQUAL(0.0, m_pDoc->GetValue(3, 5, destSheet)); // It was 6 if (!bSkipEmpty) - CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", EMPTY_OUSTRING, m_pDoc->GetString(4, 5, destSheet)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", OUString(), m_pDoc->GetString(4, 5, destSheet)); else CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(4, 5, destSheet)); CPPUNIT_ASSERT_EQUAL(OUString("=B$3+$B$5+80"), getFormula(5, 5, destSheet)); @@ -5672,8 +5672,8 @@ void TestCopyPaste::checkCopyPasteSpecialMultiRangeRow(bool bSkipEmpty) CPPUNIT_ASSERT_EQUAL(64.0, m_pDoc->GetValue(7, 1, destSheet)); if (!bSkipEmpty) { - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(7, 2, destSheet)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(7, 3, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(7, 2, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(7, 3, destSheet)); } else { @@ -5691,8 +5691,8 @@ void TestCopyPaste::checkCopyPasteSpecialMultiRangeRow(bool bSkipEmpty) CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(8, 1, destSheet)); if (!bSkipEmpty) { - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(8, 2, destSheet)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(8, 3, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(8, 2, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(8, 3, destSheet)); } else { @@ -6043,7 +6043,7 @@ void TestCopyPaste::checkCopyPasteSpecialMultiRangeRowFiltered(bool bSkipEmpty) CPPUNIT_ASSERT_EQUAL(OUString("=D2+D4+60"), getFormula(7, 1, destSheet)); CPPUNIT_ASSERT_EQUAL(67.0, m_pDoc->GetValue(7, 1, destSheet)); if (!bSkipEmpty) - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(7, 2, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(7, 2, destSheet)); else CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(7, 2, destSheet)); CPPUNIT_ASSERT_EQUAL(OUString("t"), m_pDoc->GetString(7, 3, destSheet)); @@ -6056,7 +6056,7 @@ void TestCopyPaste::checkCopyPasteSpecialMultiRangeRowFiltered(bool bSkipEmpty) CPPUNIT_ASSERT_EQUAL(OUString("=SUMIF(D2:D5;\"<4\")"), getFormula(8, 1, destSheet)); CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(8, 1, destSheet)); if (!bSkipEmpty) - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, m_pDoc->GetString(8, 2, destSheet)); + CPPUNIT_ASSERT_EQUAL(OUString(), m_pDoc->GetString(8, 2, destSheet)); else CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(8, 2, destSheet)); CPPUNIT_ASSERT_EQUAL(OUString("u"), m_pDoc->GetString(8, 3, destSheet)); @@ -6395,8 +6395,8 @@ void TestCopyPaste::checkCopyPasteSpecialMultiRangeRowTranspose(bool bSkipEmpty) CPPUNIT_ASSERT_EQUAL_MESSAGE("transposed D6", 64.0, m_pDoc->GetValue(3, 5, destSheet)); if (!bSkipEmpty) { - CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", EMPTY_OUSTRING, m_pDoc->GetString(4, 5, destSheet)); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", EMPTY_OUSTRING, m_pDoc->GetString(5, 5, destSheet)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", OUString(), m_pDoc->GetString(4, 5, destSheet)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", OUString(), m_pDoc->GetString(5, 5, destSheet)); } else { @@ -6415,8 +6415,8 @@ void TestCopyPaste::checkCopyPasteSpecialMultiRangeRowTranspose(bool bSkipEmpty) CPPUNIT_ASSERT_EQUAL_MESSAGE("transposed D7", 6.0, m_pDoc->GetValue(3, 6, destSheet)); if (!bSkipEmpty) { - CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", EMPTY_OUSTRING, m_pDoc->GetString(4, 6, destSheet)); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", EMPTY_OUSTRING, m_pDoc->GetString(5, 6, destSheet)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", OUString(), m_pDoc->GetString(4, 6, destSheet)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", OUString(), m_pDoc->GetString(5, 6, destSheet)); } else { @@ -6762,7 +6762,7 @@ void TestCopyPaste::checkCopyPasteSpecialMultiRangeRowFilteredTranspose(bool bSk CPPUNIT_ASSERT_EQUAL_MESSAGE("transposed D6", 67.0, m_pDoc->GetValue(3, 5, destSheet)); if (!bSkipEmpty) { - CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", EMPTY_OUSTRING, m_pDoc->GetString(4, 5, destSheet)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E6", OUString(), m_pDoc->GetString(4, 5, destSheet)); } else CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(4, 5, destSheet)); @@ -6777,7 +6777,7 @@ void TestCopyPaste::checkCopyPasteSpecialMultiRangeRowFilteredTranspose(bool bSk getFormula(3, 6, destSheet)); CPPUNIT_ASSERT_EQUAL_MESSAGE("transposed D7", -7.0, m_pDoc->GetValue(3, 6, destSheet)); if (!bSkipEmpty) - CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E7", EMPTY_OUSTRING, m_pDoc->GetString(4, 6, destSheet)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell E7", OUString(), m_pDoc->GetString(4, 6, destSheet)); else CPPUNIT_ASSERT_EQUAL(1000.0, m_pDoc->GetValue(4, 6, destSheet)); CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell F7", OUString("u"), m_pDoc->GetString(5, 6, destSheet)); @@ -7316,7 +7316,7 @@ void TestCopyPaste::checkReferencedCutRangesRowIntitial(const SCTAB nSrcTab, con for (int j = 0; j < 10; ++j) { CPPUNIT_ASSERT_EQUAL(0.0, m_pDoc->GetValue(j, i, nSrcTab)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, getFormula(j, i, nSrcTab)); + CPPUNIT_ASSERT_EQUAL(OUString(), getFormula(j, i, nSrcTab)); } lcl_printValuesAndFormulasInRange(m_pDoc, ScRange(0, 20, nSrcTab, 2, 21, nSrcTab), @@ -8230,7 +8230,7 @@ void TestCopyPaste::checkReferencedCutRangesColIntitial(const SCTAB nSrcTab, con for (int j = 0; j < 10; ++j) { CPPUNIT_ASSERT_EQUAL(0.0, m_pDoc->GetValue(j, i, nSrcTab)); - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, getFormula(j, i, nSrcTab)); + CPPUNIT_ASSERT_EQUAL(OUString(), getFormula(j, i, nSrcTab)); } lcl_printValuesAndFormulasInRange(m_pDoc, ScRange(0, 20, nSrcTab, 1, 22, nSrcTab), @@ -10637,7 +10637,7 @@ void TestCopyPaste::testMixDataWithFormulaTdf116413() // Test precondition CPPUNIT_ASSERT_EQUAL(1100.0, m_pDoc->GetValue(0, 2, nTab)); // A3 - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, getFormula(0, 2, nTab)); + CPPUNIT_ASSERT_EQUAL(OUString(), getFormula(0, 2, nTab)); CPPUNIT_ASSERT_EQUAL(101.0, m_pDoc->GetValue(1, 2, nTab)); // B3 CPPUNIT_ASSERT_EQUAL(OUString("=(B2)+100"), getFormula(1, 2, nTab)); @@ -10646,7 +10646,7 @@ void TestCopyPaste::testMixDataWithFormulaTdf116413() CPPUNIT_ASSERT_EQUAL(OUString("=(C2)+100"), getFormula(2, 2, nTab)); CPPUNIT_ASSERT_EQUAL(1100.0, m_pDoc->GetValue(3, 2, nTab)); // D3 - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, getFormula(3, 2, nTab)); + CPPUNIT_ASSERT_EQUAL(OUString(), getFormula(3, 2, nTab)); // Change A2:D2 from 1.0 to 2.0 (auto calculation is triggered) m_pDoc->SetValue(0, 1, nTab, 2.0); // A2 @@ -10655,7 +10655,7 @@ void TestCopyPaste::testMixDataWithFormulaTdf116413() m_pDoc->SetValue(3, 1, nTab, 2.0); // D2 CPPUNIT_ASSERT_EQUAL(1100.0, m_pDoc->GetValue(0, 2, nTab)); // A3 - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, getFormula(0, 2, nTab)); + CPPUNIT_ASSERT_EQUAL(OUString(), getFormula(0, 2, nTab)); // Without the fix in place, this would have failed with // - Expected: =102 @@ -10667,7 +10667,7 @@ void TestCopyPaste::testMixDataWithFormulaTdf116413() CPPUNIT_ASSERT_EQUAL(OUString("=(C2)+100"), getFormula(2, 2, nTab)); CPPUNIT_ASSERT_EQUAL(1100.0, m_pDoc->GetValue(3, 2, nTab)); // D3 - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, getFormula(3, 2, nTab)); + CPPUNIT_ASSERT_EQUAL(OUString(), getFormula(3, 2, nTab)); // Scenario 3: Similar to scenario 2, but transposed m_pDoc->InsertTab(nTab, "Test"); @@ -10701,7 +10701,7 @@ void TestCopyPaste::testMixDataWithFormulaTdf116413() // Test precondition CPPUNIT_ASSERT_EQUAL(1100.0, m_pDoc->GetValue(2, 0, nTab)); // C1 - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, getFormula(2, 0, nTab)); + CPPUNIT_ASSERT_EQUAL(OUString(), getFormula(2, 0, nTab)); CPPUNIT_ASSERT_EQUAL(101.0, m_pDoc->GetValue(2, 1, nTab)); // C2 CPPUNIT_ASSERT_EQUAL(OUString("=(B2)+100"), getFormula(2, 1, nTab)); @@ -10710,7 +10710,7 @@ void TestCopyPaste::testMixDataWithFormulaTdf116413() CPPUNIT_ASSERT_EQUAL(OUString("=(B3)+100"), getFormula(2, 2, nTab)); CPPUNIT_ASSERT_EQUAL(1100.0, m_pDoc->GetValue(2, 3, nTab)); // C4 - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, getFormula(2, 3, nTab)); + CPPUNIT_ASSERT_EQUAL(OUString(), getFormula(2, 3, nTab)); // Change B1:B4 from 1.0 to 2.0 (auto calculation is triggered) m_pDoc->SetValue(1, 0, nTab, 2.0); // B1 @@ -10719,7 +10719,7 @@ void TestCopyPaste::testMixDataWithFormulaTdf116413() m_pDoc->SetValue(1, 3, nTab, 2.0); // B4 CPPUNIT_ASSERT_EQUAL(1100.0, m_pDoc->GetValue(2, 0, nTab)); // C1 - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, getFormula(2, 0, nTab)); + CPPUNIT_ASSERT_EQUAL(OUString(), getFormula(2, 0, nTab)); // Without the fix in place, this would have failed with // - Expected: =102 @@ -10731,7 +10731,7 @@ void TestCopyPaste::testMixDataWithFormulaTdf116413() CPPUNIT_ASSERT_EQUAL(OUString("=(B3)+100"), getFormula(2, 2, nTab)); CPPUNIT_ASSERT_EQUAL(1100.0, m_pDoc->GetValue(2, 3, nTab)); // C4 - CPPUNIT_ASSERT_EQUAL(EMPTY_OUSTRING, getFormula(2, 3, nTab)); + CPPUNIT_ASSERT_EQUAL(OUString(), getFormula(2, 3, nTab)); m_pDoc->DeleteTab(nTab); } diff --git a/sc/source/core/data/cellvalue.cxx b/sc/source/core/data/cellvalue.cxx index 419123ef7622..64cd34e3215f 100644 --- a/sc/source/core/data/cellvalue.cxx +++ b/sc/source/core/data/cellvalue.cxx @@ -53,7 +53,7 @@ OUString getString( const T& rVal ) return aRet.makeStringAndClear(); } - return EMPTY_OUSTRING; + return OUString(); } bool equalsFormulaCells( const ScFormulaCell* p1, const ScFormulaCell* p2 ) @@ -176,7 +176,7 @@ OUString getStringImpl( const CellT& rCell, const ScDocument* pDoc ) default: ; } - return EMPTY_OUSTRING; + return OUString(); } template<typename CellT> @@ -197,7 +197,7 @@ OUString getRawStringImpl( const CellT& rCell, const ScDocument& rDoc ) default: ; } - return EMPTY_OUSTRING; + return OUString(); } } diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index 8707e7eb4c67..dc41b0ba28d3 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -1791,7 +1791,7 @@ const ScFormatEntry* ScConditionalFormat::GetEntry( sal_uInt16 nPos ) const return nullptr; } -const OUString& ScConditionalFormat::GetCellStyle( ScRefCellValue& rCell, const ScAddress& rPos ) const +OUString ScConditionalFormat::GetCellStyle( ScRefCellValue& rCell, const ScAddress& rPos ) const { for (const auto& rxEntry : maEntries) { @@ -1810,7 +1810,7 @@ const OUString& ScConditionalFormat::GetCellStyle( ScRefCellValue& rCell, const } } - return EMPTY_OUSTRING; + return OUString(); } ScCondFormatData ScConditionalFormat::GetData( ScRefCellValue& rCell, const ScAddress& rPos ) const diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index 2bc12286e210..ecaeeb3f940a 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -1480,7 +1480,7 @@ OUString ScDocument::GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab) if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) return maTabs[nTab]->GetUpperCellString( nCol, nRow ); else - return EMPTY_OUSTRING; + return OUString(); } bool ScDocument::CreateQueryParam( const ScRange& rRange, ScQueryParam& rQueryParam ) diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index a16c82bf33ff..681d77e45c7c 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -3518,13 +3518,13 @@ OUString ScDocument::GetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScInte { if (TableExists(nTab)) return maTabs[nTab]->GetString(nCol, nRow, pContext); - return EMPTY_OUSTRING; + return OUString(); } OUString ScDocument::GetString( const ScAddress& rPos, const ScInterpreterContext* pContext ) const { if (!TableExists(rPos.Tab())) - return EMPTY_OUSTRING; + return OUString(); return maTabs[rPos.Tab()]->GetString(rPos.Col(), rPos.Row(), pContext); } @@ -3578,7 +3578,7 @@ FormulaError ScDocument::GetStringForFormula( const ScAddress& rPos, OUString& r ScRefCellValue aCell(*this, rPos); if (aCell.isEmpty()) { - rString = EMPTY_OUSTRING; + rString.clear(); return FormulaError::NONE; } @@ -3732,7 +3732,7 @@ OUString ScDocument::GetFormula( SCCOL nCol, SCROW nRow, SCTAB nTab ) const if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) return maTabs[nTab]->GetFormula( nCol, nRow ); - return EMPTY_OUSTRING; + return OUString(); } const ScFormulaCell* ScDocument::GetFormulaCell( const ScAddress& rPos ) const diff --git a/sc/source/core/data/dpresfilter.cxx b/sc/source/core/data/dpresfilter.cxx index fb13707e83b3..4cef11b7695f 100644 --- a/sc/source/core/data/dpresfilter.cxx +++ b/sc/source/core/data/dpresfilter.cxx @@ -186,7 +186,7 @@ bool ScDPResultTree::empty() const void ScDPResultTree::clear() { - maPrimaryDimName = EMPTY_OUSTRING; + maPrimaryDimName.clear(); mpRoot.reset( new MemberNode ); } diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx index 4c8f38c8e558..e49fbd365b44 100644 --- a/sc/source/core/data/dptabres.cxx +++ b/sc/source/core/data/dptabres.cxx @@ -1850,7 +1850,7 @@ OUString ScDPDataMember::GetName() const if (pResultMember) return pResultMember->GetName(); else - return EMPTY_OUSTRING; + return OUString(); } bool ScDPDataMember::IsVisible() const diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx index 60dfde3a03bf..1b882a22672f 100644 --- a/sc/source/core/data/dptabsrc.cxx +++ b/sc/source/core/data/dptabsrc.cxx @@ -1883,7 +1883,7 @@ ScDPLevel::ScDPLevel( ScDPSource* pSrc, sal_Int32 nD, sal_Int32 nH, sal_Int32 nL nDim( nD ), nHier( nH ), nLev( nL ), - aSortInfo( EMPTY_OUSTRING, true, sheet::DataPilotFieldSortMode::NAME ), // default: sort by name + aSortInfo( OUString(), true, sheet::DataPilotFieldSortMode::NAME ), // default: sort by name nSortMeasure( 0 ), nAutoMeasure( 0 ), bShowEmpty( false ), diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 409b14767a82..7299ba705ab6 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -2674,7 +2674,7 @@ void ScFormulaCell::SetHybridFormula( const OUString& r, aResult.SetHybridFormula( r); eTempGrammar = eGrammar; } -const OUString& ScFormulaCell::GetHybridFormula() const +OUString ScFormulaCell::GetHybridFormula() const { return aResult.GetHybridFormula(); } diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 8706a0017c1b..60c0afb1ecf2 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -87,7 +87,6 @@ std::atomic<CollatorWrapper*> ScGlobal::pCaseCollator(nullptr); std::atomic<::utl::TransliterationWrapper*> ScGlobal::pTransliteration(nullptr); std::atomic<::utl::TransliterationWrapper*> ScGlobal::pCaseTransliteration(nullptr); css::uno::Reference< css::i18n::XOrdinalSuffix> ScGlobal::xOrdinalSuffix; -const OUString ScGlobal::aEmptyOUString; OUString ScGlobal::aStrClipDocName; OUString ScGlobal::aStrErrorStringNoRef; diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index 44d97f98d8e7..a03cc61180ec 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -282,7 +282,7 @@ void ScStyleSheetPool::CreateStandardStyles() // Header: // [empty][\sheet\][empty] - aEdEngine.SetTextCurrentDefaults(EMPTY_OUSTRING); + aEdEngine.SetTextCurrentDefaults(OUString()); aEdEngine.QuickInsertField( SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD), ESelection() ); pTxtObj = aEdEngine.CreateTextObject(); aHeaderItem.SetLeftArea ( *pEmptyTxtObj ); diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index b234825546a1..8eacc29f65df 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -1792,7 +1792,7 @@ OUString ScTable::GetFormula( SCCOL nCol, SCROW nRow ) const if (ValidColRow(nCol, nRow) && nCol < GetAllocatedColumnsCount()) return aCol[nCol].GetFormula( nRow ); else - return EMPTY_OUSTRING; + return OUString(); } const ScFormulaCell* ScTable::GetFormulaCell( SCCOL nCol, SCROW nRow ) const diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx index d9bba2c2cac8..c126424a26ec 100644 --- a/sc/source/core/data/table6.cxx +++ b/sc/source/core/data/table6.cxx @@ -1101,7 +1101,7 @@ bool ScTable::SearchRangeForAllEmptyCells( // TODO: I'm using a string cell with empty content to // trigger deletion of cell instance on undo. Maybe I // should create a new cell type for this? - pUndoDoc->SetString(ScAddress(nCol, i, nTab), EMPTY_OUSTRING); + pUndoDoc->SetString(ScAddress(nCol, i, nTab), OUString()); } } rUndoStr.clear(); @@ -1136,7 +1136,7 @@ bool ScTable::SearchRangeForAllEmptyCells( // TODO: I'm using a string cell with empty content to // trigger deletion of cell instance on undo. Maybe I // should create a new cell type for this? - pUndoDoc->SetString(ScAddress(nCol, nRow, nTab), EMPTY_OUSTRING); + pUndoDoc->SetString(ScAddress(nCol, nRow, nTab), OUString()); } } } diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx index 6b8830fcbe3b..ade4908df44a 100644 --- a/sc/source/core/data/validat.cxx +++ b/sc/source/core/data/validat.cxx @@ -364,7 +364,7 @@ bool ScValidationData::DoMacro( const ScAddress& rPos, const OUString& rInput, void ScValidationData::DoCalcError( ScFormulaCell* pCell ) const { if ( eErrorStyle == SC_VALERR_MACRO ) - DoMacro( pCell->aPos, EMPTY_OUSTRING, pCell, nullptr ); + DoMacro( pCell->aPos, OUString(), pCell, nullptr ); } // true -> abort diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx index 1598e1b69d0d..126a0f915c7a 100644 --- a/sc/source/core/tool/addincol.cxx +++ b/sc/source/core/tool/addincol.cxx @@ -1065,13 +1065,13 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface } } -const OUString & ScUnoAddInCollection::FindFunction( const OUString& rUpperName, bool bLocalFirst ) +OUString ScUnoAddInCollection::FindFunction( const OUString& rUpperName, bool bLocalFirst ) { if (!bInitialized) Initialize(); if (nFuncCount == 0) - return EMPTY_OUSTRING; + return OUString(); if ( bLocalFirst ) { @@ -1097,7 +1097,7 @@ const OUString & ScUnoAddInCollection::FindFunction( const OUString& rUpperName, return iLook->second->GetOriginalName(); } - return EMPTY_OUSTRING; + return OUString(); } const ScUnoAddInFuncData* ScUnoAddInCollection::GetFuncData( const OUString& rName, bool bComplete ) @@ -1588,7 +1588,7 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes ) for (sal_Int32 nCol=nColCount; nCol<nMaxColCount; nCol++) { xMatrix->PutString( - svl::SharedString(EMPTY_OUSTRING), + svl::SharedString(OUString()), static_cast<SCSIZE>(nCol), static_cast<SCSIZE>(nRow)); } } diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx index 699f7d88cecb..9c77246e2286 100644 --- a/sc/source/core/tool/cellform.cxx +++ b/sc/source/core/tool/cellform.cxx @@ -180,7 +180,7 @@ OUString ScCellFormat::GetInputString( OUString ScCellFormat::GetOutputString( ScDocument& rDoc, const ScAddress& rPos, const ScRefCellValue& rCell ) { if (rCell.isEmpty()) - return EMPTY_OUSTRING; + return OUString(); if (rCell.meType == CELLTYPE_EDIT) { @@ -195,7 +195,7 @@ OUString ScCellFormat::GetOutputString( ScDocument& rDoc, const ScAddress& rPos, } // also do not format EditCells as numbers // (fitting to output) - return EMPTY_OUSTRING; + return OUString(); } else { diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx index c6e0e1e76523..ba34b66f908a 100644 --- a/sc/source/core/tool/chgtrack.cxx +++ b/sc/source/core/tool/chgtrack.cxx @@ -1365,7 +1365,7 @@ void ScChangeActionContent::SetValueString( rCell.clear(); if ( rStr.getLength() > 1 && rStr[0] == '=' ) { - rValue = EMPTY_OUSTRING; + rValue.clear(); rCell.meType = CELLTYPE_FORMULA; rCell.mpFormula = new ScFormulaCell( *pDoc, aBigRange.aStart.MakeAddress(), rStr, @@ -1555,7 +1555,7 @@ OUString ScChangeActionContent::GetStringOfCell( const ScCellValue& rCell, const ScDocument* pDoc, sal_uLong nFormat ) { if (!GetContentCellType(rCell)) - return EMPTY_OUSTRING; + return OUString(); switch (rCell.meType) { @@ -1570,11 +1570,11 @@ OUString ScChangeActionContent::GetStringOfCell( case CELLTYPE_EDIT: if (rCell.mpEditText) return ScEditUtil::GetString(*rCell.mpEditText, pDoc); - return EMPTY_OUSTRING; + return OUString(); case CELLTYPE_FORMULA: return rCell.mpFormula->GetFormula(); default: - return EMPTY_OUSTRING; + return OUString(); } } @@ -1794,7 +1794,7 @@ void ScChangeActionContent::PutValueToDoc( aDestMark.SetMarkArea( aRange ); pDoc->InsertMatrixFormula( aPos.Col(), aPos.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), - aDestMark, EMPTY_OUSTRING, rCell.mpFormula->GetCode()); + aDestMark, OUString(), rCell.mpFormula->GetCode()); } break; case SC_CACCT_MATREF : diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 691eab13bbed..952a53423b3f 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -1934,7 +1934,7 @@ void ScCompiler::CheckTabQuotes( OUString& rString, sal_Int32 nStartFlags = KParseTokens::ANY_LETTER_OR_NUMBER | KParseTokens::ASC_UNDERSCORE; sal_Int32 nContFlags = nStartFlags; ParseResult aRes = ScGlobal::getCharClass().parsePredefinedToken( - KParseType::IDENTNAME, rString, 0, nStartFlags, EMPTY_OUSTRING, nContFlags, EMPTY_OUSTRING); + KParseType::IDENTNAME, rString, 0, nStartFlags, OUString(), nContFlags, OUString()); bool bNeedsQuote = !((aRes.TokenType & KParseType::IDENTNAME) && aRes.EndPos == rString.getLength()); switch ( eConv ) diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx index e47a97c084e0..b4e52cebb108 100644 --- a/sc/source/core/tool/dbdata.cxx +++ b/sc/source/core/tool/dbdata.cxx @@ -903,14 +903,14 @@ sal_Int32 ScDBData::GetColumnNameOffset( const OUString& rName ) const return -1; } -const OUString& ScDBData::GetTableColumnName( SCCOL nCol ) const +OUString ScDBData::GetTableColumnName( SCCOL nCol ) const { if (maTableColumnNames.empty()) - return EMPTY_OUSTRING; + return OUString(); SCCOL nOffset = nCol - nStartCol; if (nOffset < 0 || maTableColumnNames.size() <= o3tl::make_unsigned(nOffset)) - return EMPTY_OUSTRING; + return OUString(); return maTableColumnNames[nOffset]; } diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx index cbd53ca5c870..d120b4e35ff0 100644 --- a/sc/source/core/tool/detfunc.cxx +++ b/sc/source/core/tool/detfunc.cxx @@ -73,10 +73,6 @@ using ::std::vector; using namespace com::sun::star; -// line ends are now created with an empty name. -// The checkForUniqueItem method then finds a unique name for the item's value. -#define SC_LINEEND_NAME EMPTY_OUSTRING - namespace { enum DetInsertResult { // return-values for inserting in one level @@ -147,7 +143,7 @@ ScDetectiveData::ScDetectiveData( SdrModel* pModel ) : nMaxLevel(0) { - aBoxSet.Put( XLineColorItem( EMPTY_OUSTRING, ScDetectiveFunc::GetArrowColor() ) ); + aBoxSet.Put( XLineColorItem( OUString(), ScDetectiveFunc::GetArrowColor() ) ); aBoxSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); // create default line endings (like XLineEndList::Create) @@ -169,7 +165,7 @@ ScDetectiveData::ScDetectiveData( SdrModel* pModel ) : basegfx::B2DPolygon aCircle(basegfx::utils::createPolygonFromEllipse(basegfx::B2DPoint(0.0, 0.0), 100.0, 100.0)); aCircle.setClosed(true); - OUString aName = SC_LINEEND_NAME; + const OUString aName; aArrowSet.Put( XLineStartItem( aName, basegfx::B2DPolyPolygon(aCircle) ) ); aArrowSet.Put( XLineStartWidthItem( 200 ) ); @@ -206,9 +202,7 @@ ScCommentData::ScCommentData( ScDocument& rDoc, SdrModel* pModel ) : aTriangle.append(basegfx::B2DPoint(20.0, 30.0)); aTriangle.setClosed(true); - OUString aName = SC_LINEEND_NAME; - - aCaptionSet.Put( XLineStartItem( aName, basegfx::B2DPolyPolygon(aTriangle) ) ); + aCaptionSet.Put( XLineStartItem( OUString(), basegfx::B2DPolyPolygon(aTriangle))); aCaptionSet.Put( XLineStartWidthItem( 200 ) ); aCaptionSet.Put( XLineStartCenterItem( false ) ); aCaptionSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx index 03458d9f734f..3e302192b17a 100644 --- a/sc/source/core/tool/editutil.cxx +++ b/sc/source/core/tool/editutil.cxx @@ -139,7 +139,7 @@ std::unique_ptr<EditTextObject> ScEditUtil::CreateURLObjectFromURL( ScDocument& { SvxURLField aUrlField( rURL, rText, SvxURLFormat::AppDefault); EditEngine& rEE = rDoc.GetEditEngine(); - rEE.SetText( EMPTY_OUSTRING ); + rEE.SetText( OUString() ); rEE.QuickInsertField( SvxFieldItem( aUrlField, EE_FEATURE_FIELD ), ESelection( EE_PARA_MAX_COUNT, EE_TEXTPOS_MAX_COUNT ) ); diff --git a/sc/source/core/tool/formularesult.cxx b/sc/source/core/tool/formularesult.cxx index 396f0408c27b..b41c77f1f3ee 100644 --- a/sc/source/core/tool/formularesult.cxx +++ b/sc/source/core/tool/formularesult.cxx @@ -541,14 +541,14 @@ ScConstMatrixRef ScFormulaResult::GetMatrix() const return nullptr; } -const OUString& ScFormulaResult::GetHybridFormula() const +OUString ScFormulaResult::GetHybridFormula() const { if (GetType() == formula::svHybridCell) { const ScHybridCellToken* p = static_cast<const ScHybridCellToken*>(mpToken); return p->GetFormula(); } - return EMPTY_OUSTRING; + return OUString(); } void ScFormulaResult::SetHybridDouble( double f ) diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 116e3b8c3708..e4e9b1bd5360 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -2506,7 +2506,7 @@ void ScInterpreter::ScCellExternal() PushString(ScGlobal::GetErrorString(pToken->GetError())); break; default: - PushString(ScGlobal::GetEmptyOUString()); + PushString(OUString()); } } else if ( aInfoType == "TYPE" ) @@ -3223,7 +3223,7 @@ void ScInterpreter::ScT() } } if ( bValue ) - PushString(EMPTY_OUSTRING); + PushString(OUString()); else { // like GetString() @@ -3249,7 +3249,7 @@ void ScInterpreter::ScT() case svDouble : { PopError(); - PushString( EMPTY_OUSTRING ); + PushString( OUString() ); } break; case svString : @@ -9732,7 +9732,7 @@ void ScInterpreter::ScRept() PushError( FormulaError::StringOverflow ); } else if (nCnt == 0) - PushString( EMPTY_OUSTRING ); + PushString( OUString() ); else { const sal_Int32 nLen = aStr.getLength(); diff --git a/sc/source/core/tool/rangeseq.cxx b/sc/source/core/tool/rangeseq.cxx index 141802e076b8..2a7075132a63 100644 --- a/sc/source/core/tool/rangeseq.cxx +++ b/sc/source/core/tool/rangeseq.cxx @@ -263,7 +263,7 @@ bool ScRangeToSequence::FillMixedArray( uno::Any& rAny, ScDocument& rDoc, const if (aCell.isEmpty()) { - rElement <<= EMPTY_OUSTRING; + rElement <<= OUString(); continue; } diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx index 186db99d8ce8..30e5e14c9b1b 100644 --- a/sc/source/core/tool/viewopti.cxx +++ b/sc/source/core/tool/viewopti.cxx @@ -300,7 +300,7 @@ ScViewCfg::ScViewCfg() : { Color aColor; if ( pValues[nProp] >>= aColor ) - SetGridColor( aColor, EMPTY_OUSTRING ); + SetGridColor( aColor, OUString() ); break; } case SCLAYOUTOPT_GRIDLINES: diff --git a/sc/source/filter/excel/fontbuff.cxx b/sc/source/filter/excel/fontbuff.cxx index 5f5a0f099ae6..2a23cee21f61 100644 --- a/sc/source/filter/excel/fontbuff.cxx +++ b/sc/source/filter/excel/fontbuff.cxx @@ -124,7 +124,7 @@ void LotusFontBuffer::MakeFont( ENTRY* pEntry ) break; } - pEntry->pFont.reset( new SvxFontItem( eFamily, *pEntry->xTmpName, EMPTY_OUSTRING, ePitch, eCharSet, ATTR_FONT ) ); + pEntry->pFont.reset( new SvxFontItem( eFamily, *pEntry->xTmpName, OUString(), ePitch, eCharSet, ATTR_FONT ) ); pEntry->xTmpName.reset(); } diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index 658d8ea837ca..bd60fd355cd5 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -356,7 +356,7 @@ XclExpStringRef lclCreateFormattedString( { /* Create an empty Excel string object with correctly initialized BIFF mode, because this function only uses Append() functions that require this. */ - XclExpStringRef xString = XclExpStringHelper::CreateString( rRoot, EMPTY_OUSTRING, nFlags, nMaxLen ); + XclExpStringRef xString = XclExpStringHelper::CreateString( rRoot, OUString(), nFlags, nMaxLen ); // script type handling Reference< XBreakIterator > xBreakIt = rRoot.GetDoc().GetBreakIterator(); @@ -424,7 +424,7 @@ XclExpStringRef lclCreateFormattedString( { /* Create an empty Excel string object with correctly initialized BIFF mode, because this function only uses Append() functions that require this. */ - XclExpStringRef xString = XclExpStringHelper::CreateString( rRoot, EMPTY_OUSTRING, nFlags, nMaxLen ); + XclExpStringRef xString = XclExpStringHelper::CreateString( rRoot, OUString(), nFlags, nMaxLen ); // font buffer and helper item set for edit engine -> Calc item conversion XclExpFontBuffer& rFontBuffer = rRoot.GetFontBuffer(); @@ -537,7 +537,7 @@ XclExpStringRef XclExpStringHelper::CreateString( XclExpStringRef XclExpStringHelper::CreateString( const XclExpRoot& rRoot, sal_Unicode cChar, XclStrFlags nFlags, sal_uInt16 nMaxLen ) { - XclExpStringRef xString = CreateString( rRoot, EMPTY_OUSTRING, nFlags, nMaxLen ); + XclExpStringRef xString = CreateString( rRoot, OUString(), nFlags, nMaxLen ); AppendChar( *xString, rRoot, cChar ); return xString; } @@ -613,7 +613,7 @@ XclExpStringRef XclExpStringHelper::CreateString( { OSL_FAIL( "XclExpStringHelper::CreateString - textbox without para object" ); // create BIFF dependent empty Excel string - xString = CreateString( rRoot, EMPTY_OUSTRING, nFlags ); + xString = CreateString( rRoot, OUString(), nFlags ); } return xString; } diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx index 10c43850d757..513daf2795f0 100644 --- a/sc/source/filter/excel/xename.cxx +++ b/sc/source/filter/excel/xename.cxx @@ -837,10 +837,10 @@ sal_uInt16 XclExpNameManager::InsertMacroCall( const OUString& rMacroName, bool return mxImpl->InsertMacroCall( rMacroName, bVBasic, bFunc, bHidden ); } -const OUString& XclExpNameManager::GetOrigName( sal_uInt16 nNameIdx ) const +OUString XclExpNameManager::GetOrigName( sal_uInt16 nNameIdx ) const { const XclExpName* pName = mxImpl->GetName( nNameIdx ); - return pName ? pName->GetOrigName() : EMPTY_OUSTRING; + return pName ? pName->GetOrigName() : OUString(); } SCTAB XclExpNameManager::GetScTab( sal_uInt16 nNameIdx ) const diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx index 179999836511..3c0656703be2 100644 --- a/sc/source/filter/excel/xepivot.cxx +++ b/sc/source/filter/excel/xepivot.cxx @@ -789,7 +789,7 @@ void XclExpPivotCache::AddGroupFields( const ScDPObject& rDPObj ) void XclExpPivotCache::WriteDconref( XclExpStream& rStrm ) const { - XclExpString aRef( XclExpUrlHelper::EncodeUrl( GetRoot(), EMPTY_OUSTRING, &maTabName ) ); + XclExpString aRef( XclExpUrlHelper::EncodeUrl( GetRoot(), OUString(), &maTabName ) ); rStrm.StartRecord( EXC_ID_DCONREF, 7 + aRef.GetSize() ); rStrm << static_cast< sal_uInt16 >( maExpSrcRange.aStart.Row() ) << static_cast< sal_uInt16 >( maExpSrcRange.aEnd.Row() ) diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx index 64d86665f882..9bbd2c779eff 100644 --- a/sc/source/filter/excel/xetable.cxx +++ b/sc/source/filter/excel/xetable.cxx @@ -715,7 +715,7 @@ XclExpLabelCell::XclExpLabelCell( rRoot, *pEditText, pPattern, rLinkHelper, XclStrFlags::NONE, nMaxLen); else xText = XclExpStringHelper::CreateCellString( - rRoot, EMPTY_OUSTRING, pPattern, XclStrFlags::NONE, nMaxLen); + rRoot, OUString(), pPattern, XclStrFlags::NONE, nMaxLen); Init( rRoot, pPattern, xText ); } diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index 87f68be4fcb5..c12d39376d56 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -183,7 +183,7 @@ void lclInsertUrl( XclImpRoot& rRoot, const OUString& rUrl, SCCOL nScCol, SCROW } else { - rEE.SetTextCurrentDefaults( EMPTY_OUSTRING ); + rEE.SetTextCurrentDefaults( OUString() ); rEE.QuickInsertField( SvxFieldItem( aUrlField, EE_FEATURE_FIELD ), ESelection() ); if( const ScPatternAttr* pPattern = rDoc.getDoc().GetPattern( aScPos.Col(), aScPos.Row(), nScTab ) ) { @@ -1027,7 +1027,7 @@ void XclImpWebQuery::Apply( ScDocument& rDoc, const OUString& rFilterName ) if( !maURL.isEmpty() && (meMode != xlWQUnknown) && rDoc.GetDocumentShell() ) { ScAreaLink* pLink = new ScAreaLink( rDoc.GetDocumentShell(), - maURL, rFilterName, EMPTY_OUSTRING, maTables, maDestRange, mnRefresh * 60UL ); + maURL, rFilterName, OUString(), maTables, maDestRange, mnRefresh * 60UL ); rDoc.GetLinkManager()->InsertFileLink( *pLink, sfx2::SvBaseLinkObjectType::ClientFile, maURL, &rFilterName, &maTables ); } diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 01ee80649778..02300da7e1fb 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -642,7 +642,7 @@ void XclImpDrawObjBase::ConvertLineStyle( SdrObject& rSdrObj, const XclObjLineDa { tools::Long nLineWidth = 35 * ::std::min( rLineData.mnWidth, EXC_OBJ_LINE_THICK ); rSdrObj.SetMergedItem( XLineWidthItem( nLineWidth ) ); - rSdrObj.SetMergedItem( XLineColorItem( EMPTY_OUSTRING, GetPalette().GetColor( rLineData.mnColorIdx ) ) ); + rSdrObj.SetMergedItem( XLineColorItem( OUString(), GetPalette().GetColor( rLineData.mnColorIdx ) ) ); rSdrObj.SetMergedItem( XLineJointItem( css::drawing::LineJoint_MITER ) ); sal_uLong nDotLen = ::std::max< sal_uLong >( 70 * rLineData.mnWidth, 35 ); @@ -657,19 +657,19 @@ void XclImpDrawObjBase::ConvertLineStyle( SdrObject& rSdrObj, const XclObjLineDa break; case EXC_OBJ_LINE_DASH: rSdrObj.SetMergedItem( XLineStyleItem( drawing::LineStyle_DASH ) ); - rSdrObj.SetMergedItem( XLineDashItem( EMPTY_OUSTRING, XDash( css::drawing::DashStyle_RECT, 0, nDotLen, 1, nDashLen, nDist ) ) ); + rSdrObj.SetMergedItem( XLineDashItem( OUString(), XDash( css::drawing::DashStyle_RECT, 0, nDotLen, 1, nDashLen, nDist ) ) ); break; case EXC_OBJ_LINE_DOT: rSdrObj.SetMergedItem( XLineStyleItem( drawing::LineStyle_DASH ) ); - rSdrObj.SetMergedItem( XLineDashItem( EMPTY_OUSTRING, XDash( css::drawing::DashStyle_RECT, 1, nDotLen, 0, nDashLen, nDist ) ) ); + rSdrObj.SetMergedItem( XLineDashItem( OUString(), XDash( css::drawing::DashStyle_RECT, 1, nDotLen, 0, nDashLen, nDist ) ) ); break; case EXC_OBJ_LINE_DASHDOT: rSdrObj.SetMergedItem( XLineStyleItem( drawing::LineStyle_DASH ) ); - rSdrObj.SetMergedItem( XLineDashItem( EMPTY_OUSTRING, XDash( css::drawing::DashStyle_RECT, 1, nDotLen, 1, nDashLen, nDist ) ) ); + rSdrObj.SetMergedItem( XLineDashItem( OUString(), XDash( css::drawing::DashStyle_RECT, 1, nDotLen, 1, nDashLen, nDist ) ) ); break; case EXC_OBJ_LINE_DASHDOTDOT: rSdrObj.SetMergedItem( XLineStyleItem( drawing::LineStyle_DASH ) ); - rSdrObj.SetMergedItem( XLineDashItem( EMPTY_OUSTRING, XDash( css::drawing::DashStyle_RECT, 2, nDotLen, 1, nDashLen, nDist ) ) ); + rSdrObj.SetMergedItem( XLineDashItem( OUString(), XDash( css::drawing::DashStyle_RECT, 2, nDotLen, 1, nDashLen, nDist ) ) ); break; case EXC_OBJ_LINE_MEDTRANS: rSdrObj.SetMergedItem( XLineStyleItem( drawing::LineStyle_SOLID ) ); @@ -709,7 +709,7 @@ void XclImpDrawObjBase::ConvertFillStyle( SdrObject& rSdrObj, const XclObjFillDa if( (rFillData.mnPattern == EXC_PATT_SOLID) || (aPattColor == aBackColor) ) { rSdrObj.SetMergedItem( XFillStyleItem( drawing::FillStyle_SOLID ) ); - rSdrObj.SetMergedItem( XFillColorItem( EMPTY_OUSTRING, aPattColor ) ); + rSdrObj.SetMergedItem( XFillColorItem( OUString(), aPattColor ) ); } else { @@ -755,7 +755,7 @@ void XclImpDrawObjBase::ConvertFillStyle( SdrObject& rSdrObj, const XclObjFillDa aBitmap = aXOBitmap.GetBitmap().GetBitmap(); rSdrObj.SetMergedItem(XFillStyleItem(drawing::FillStyle_BITMAP)); - rSdrObj.SetMergedItem(XFillBitmapItem(EMPTY_OUSTRING, Graphic(BitmapEx(aBitmap)))); + rSdrObj.SetMergedItem(XFillBitmapItem(OUString(), Graphic(BitmapEx(aBitmap)))); } } } @@ -1182,13 +1182,13 @@ SdrObjectUniquePtr XclImpLineObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, tools::Long nWidth = static_cast< tools::Long >( 125 * fArrowWidth ); if( bLineStart ) { - xSdrObj->SetMergedItem( XLineStartItem( EMPTY_OUSTRING, aArrowPolyPoly ) ); + xSdrObj->SetMergedItem( XLineStartItem( OUString(), aArrowPolyPoly ) ); xSdrObj->SetMergedItem( XLineStartWidthItem( nWidth ) ); xSdrObj->SetMergedItem( XLineStartCenterItem( false ) ); } if( bLineEnd ) { - xSdrObj->SetMergedItem( XLineEndItem( EMPTY_OUSTRING, aArrowPolyPoly ) ); + xSdrObj->SetMergedItem( XLineEndItem( OUString(), aArrowPolyPoly ) ); xSdrObj->SetMergedItem( XLineEndWidthItem( nWidth ) ); xSdrObj->SetMergedItem( XLineEndCenterItem( false ) ); } @@ -3669,7 +3669,7 @@ SdrObject* XclImpDffConverter::ProcessObj( SvStream& rDffStrm, DffObjData& rDffO { // filled without color -> set system window color if( GetPropertyBool( DFF_Prop_fFilled ) && !IsProperty( DFF_Prop_fillColor ) ) - xSdrObj->SetMergedItem( XFillColorItem( EMPTY_OUSTRING, GetPalette().GetColor( EXC_COLOR_WINDOWBACK ) ) ); + xSdrObj->SetMergedItem( XFillColorItem( OUString(), GetPalette().GetColor( EXC_COLOR_WINDOWBACK ) ) ); // additional processing on the SdrObject xDrawObj->PreProcessSdrObject( *this, *xSdrObj ); diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx index 29bc604c7e25..ef38c5b65089 100644 --- a/sc/source/filter/excel/xihelper.cxx +++ b/sc/source/filter/excel/xihelper.cxx @@ -276,7 +276,7 @@ XclImpHFConverter::~XclImpHFConverter() void XclImpHFConverter::ParseString( const OUString& rHFString ) { // edit engine objects - mrEE.SetText( EMPTY_OUSTRING ); + mrEE.SetText( OUString() ); maInfos.clear(); maInfos.resize( EXC_HF_PORTION_COUNT ); meCurrObj = EXC_HF_CENTER; @@ -353,7 +353,7 @@ void XclImpHFConverter::ParseString( const OUString& rHFString ) } break; case 'F': // file name - InsertField( SvxFieldItem( SvxExtFileField( EMPTY_OUSTRING, SvxFileType::Var, SvxFileFormat::NameAndExt ), EE_FEATURE_FIELD ) ); + InsertField( SvxFieldItem( SvxExtFileField( OUString(), SvxFileType::Var, SvxFileFormat::NameAndExt ), EE_FEATURE_FIELD ) ); break; case 'U': // underline @@ -578,7 +578,7 @@ void XclImpHFConverter::SetNewPortion( XclImpHFPortion eNew ) if( GetCurrObj() ) mrEE.SetText( *GetCurrObj() ); else - mrEE.SetText( EMPTY_OUSTRING ); + mrEE.SetText( OUString() ); ResetFontData(); } } diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx index d71d07ea0099..e9fea951e94e 100644 --- a/sc/source/filter/excel/xilink.cxx +++ b/sc/source/filter/excel/xilink.cxx @@ -114,9 +114,9 @@ public: @return true = decoding was successful, returned strings are valid (not empty). */ bool GetLinkData( OUString& rApplic, OUString& rDoc ) const; /** Returns the specified macro name (1-based) or an empty string on error. */ - const OUString& GetMacroName( sal_uInt16 nXclNameIdx ) const; + OUString GetMacroName( sal_uInt16 nXclNameIdx ) const; - const OUString& GetTabName( sal_uInt16 nXtiTab ) const; + OUString GetTabName( sal_uInt16 nXtiTab ) const; sal_uInt16 GetTabCount() const; @@ -191,7 +191,7 @@ public: the index. */ const OUString* GetSupbookUrl( sal_uInt16 nXtiIndex ) const; - const OUString& GetSupbookTabName( sal_uInt16 nXti, sal_uInt16 nXtiTab ) const; + OUString GetSupbookTabName( sal_uInt16 nXti, sal_uInt16 nXtiTab ) const; /** Tries to decode the URL of the specified XTI entry to OLE or DDE link components. @descr For DDE links: Decodes to application name and topic. @@ -199,7 +199,7 @@ public: @return true = decoding was successful, returned strings are valid (not empty). */ bool GetLinkData( OUString& rApplic, OUString& rTopic, sal_uInt16 nXtiIndex ) const; /** Returns the specified macro name or an empty string on error. */ - const OUString& GetMacroName( sal_uInt16 nExtSheet, sal_uInt16 nExtName ) const; + OUString GetMacroName( sal_uInt16 nExtSheet, sal_uInt16 nExtName ) const; private: /** Returns the specified XTI (link entry from BIFF8 EXTERNSHEET record). */ @@ -716,17 +716,17 @@ bool XclImpSupbook::GetLinkData( OUString& rApplic, OUString& rTopic ) const return (meType == XclSupbookType::Special) && XclImpUrlHelper::DecodeLink( rApplic, rTopic, maXclUrl ); } -const OUString& XclImpSupbook::GetMacroName( sal_uInt16 nXclNameIdx ) const +OUString XclImpSupbook::GetMacroName( sal_uInt16 nXclNameIdx ) const { OSL_ENSURE( nXclNameIdx > 0, "XclImpSupbook::GetMacroName - index must be >0" ); const XclImpName* pName = (meType == XclSupbookType::Self) ? GetNameManager().GetName( nXclNameIdx ) : nullptr; - return (pName && pName->IsVBName()) ? pName->GetScName() : EMPTY_OUSTRING; + return (pName && pName->IsVBName()) ? pName->GetScName() : OUString(); } -const OUString& XclImpSupbook::GetTabName( sal_uInt16 nXtiTab ) const +OUString XclImpSupbook::GetTabName( sal_uInt16 nXtiTab ) const { if (nXtiTab >= maSupbTabList.size()) - return EMPTY_OUSTRING; + return OUString(); return maSupbTabList[nXtiTab]->GetTabName(); } @@ -847,10 +847,10 @@ const OUString* XclImpLinkManagerImpl::GetSupbookUrl( sal_uInt16 nXtiIndex ) con return &p->GetXclUrl(); } -const OUString& XclImpLinkManagerImpl::GetSupbookTabName( sal_uInt16 nXti, sal_uInt16 nXtiTab ) const +OUString XclImpLinkManagerImpl::GetSupbookTabName( sal_uInt16 nXti, sal_uInt16 nXtiTab ) const { const XclImpSupbook* p = GetSupbook(nXti); - return p ? p->GetTabName(nXtiTab) : EMPTY_OUSTRING; + return p ? p->GetTabName(nXtiTab) : OUString(); } bool XclImpLinkManagerImpl::GetLinkData( OUString& rApplic, OUString& rTopic, sal_uInt16 nXtiIndex ) const @@ -859,10 +859,10 @@ bool XclImpLinkManagerImpl::GetLinkData( OUString& rApplic, OUString& rTopic, sa return pSupbook && pSupbook->GetLinkData( rApplic, rTopic ); } -const OUString& XclImpLinkManagerImpl::GetMacroName( sal_uInt16 nExtSheet, sal_uInt16 nExtName ) const +OUString XclImpLinkManagerImpl::GetMacroName( sal_uInt16 nExtSheet, sal_uInt16 nExtName ) const { const XclImpSupbook* pSupbook = GetSupbook( nExtSheet ); - return pSupbook ? pSupbook->GetMacroName( nExtName ) : EMPTY_OUSTRING; + return pSupbook ? pSupbook->GetMacroName( nExtName ) : OUString(); } const XclImpXti* XclImpLinkManagerImpl::GetXti( sal_uInt16 nXtiIndex ) const @@ -944,7 +944,7 @@ const OUString* XclImpLinkManager::GetSupbookUrl( sal_uInt16 nXtiIndex ) const return mxImpl->GetSupbookUrl(nXtiIndex); } -const OUString& XclImpLinkManager::GetSupbookTabName( sal_uInt16 nXti, sal_uInt16 nXtiTab ) const +OUString XclImpLinkManager::GetSupbookTabName( sal_uInt16 nXti, sal_uInt16 nXtiTab ) const { return mxImpl->GetSupbookTabName(nXti, nXtiTab); } @@ -954,7 +954,7 @@ bool XclImpLinkManager::GetLinkData( OUString& rApplic, OUString& rTopic, sal_uI return mxImpl->GetLinkData( rApplic, rTopic, nXtiIndex ); } -const OUString& XclImpLinkManager::GetMacroName( sal_uInt16 nExtSheet, sal_uInt16 nExtName ) const +OUString XclImpLinkManager::GetMacroName( sal_uInt16 nExtSheet, sal_uInt16 nExtName ) const { return mxImpl->GetMacroName( nExtSheet, nExtName ); } diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 078429ed440e..808ddbcbdd64 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -341,7 +341,7 @@ void XclImpFont::FillToItemSet( SfxItemSet& rItemSet, XclFontItemType eType, boo case FAMILY_MODERN: ePitch = PITCH_FIXED; break; default: break; } - SvxFontItem aFontItem( eFtFamily , maData.maName, EMPTY_OUSTRING, ePitch, eTempTextEnc, ATTR_FONT ); + SvxFontItem aFontItem( eFtFamily , maData.maName, OUString(), ePitch, eTempTextEnc, ATTR_FONT ); // set only for valid script types if( mbHasWstrn ) diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx index 246d1b844e0f..b5de24df06a4 100644 --- a/sc/source/filter/excel/xlstyle.cxx +++ b/sc/source/filter/excel/xlstyle.cxx @@ -1516,7 +1516,7 @@ void XclNumFmtBuffer::InsertBuiltinFormats() if( pBuiltIn->mpFormat ) rNumFmt.maFormat = OUString( pBuiltIn->mpFormat, strlen(pBuiltIn->mpFormat), RTL_TEXTENCODING_UTF8 ); else - rNumFmt.maFormat = EMPTY_OUSTRING; + rNumFmt.maFormat.clear(); if( pBuiltIn->meOffset == PRV_NF_INDEX_REUSE ) aReuseMap[ pBuiltIn->mnXclNumFmt ] = pBuiltIn->mnXclReuseFmt; diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 13546336f270..2dabd09d10b4 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -1425,7 +1425,7 @@ void ScHTMLLayoutParser::FontOn( HtmlImportInfo* pInfo ) } if ( !aFontName.isEmpty() ) mxActEntry->aItemSet.Put( SvxFontItem( FAMILY_DONTKNOW, - aFontName.makeStringAndClear(), EMPTY_OUSTRING, PITCH_DONTKNOW, + aFontName.makeStringAndClear(), OUString(), PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, ATTR_FONT ) ); } break; @@ -2925,7 +2925,7 @@ void ScHTMLQueryParser::FontOn( const HtmlImportInfo& rInfo ) } if ( !aFontName.isEmpty() ) mpCurrTable->PutItem( SvxFontItem( FAMILY_DONTKNOW, - aFontName, EMPTY_OUSTRING, PITCH_DONTKNOW, + aFontName, OUString(), PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, ATTR_FONT ) ); } break; diff --git a/sc/source/filter/inc/xename.hxx b/sc/source/filter/inc/xename.hxx index 989dff3d4e00..a81a12804b95 100644 --- a/sc/source/filter/inc/xename.hxx +++ b/sc/source/filter/inc/xename.hxx @@ -55,7 +55,7 @@ public: sal_uInt16 InsertMacroCall( const OUString& rMacroName, bool bVBasic, bool bFunc, bool bHidden = false ); /** Returns the Calc sheet of a local defined name, or SCTAB_GLOBAL for global defined names. */ - const OUString& GetOrigName( sal_uInt16 nNameIdx ) const; + OUString GetOrigName( sal_uInt16 nNameIdx ) const; /** Returns the Calc sheet of a local defined name, or SCTAB_GLOBAL for global defined names. */ SCTAB GetScTab( sal_uInt16 nNameIdx ) const; /** Returns true, if the specified defined name is volatile. */ diff --git a/sc/source/filter/inc/xilink.hxx b/sc/source/filter/inc/xilink.hxx index 91321f3bcef9..cdfef4c82397 100644 --- a/sc/source/filter/inc/xilink.hxx +++ b/sc/source/filter/inc/xilink.hxx @@ -209,7 +209,7 @@ public: const OUString* GetSupbookUrl( sal_uInt16 nXtiIndex ) const; - const OUString& GetSupbookTabName( sal_uInt16 nXti, sal_uInt16 nXtiTab ) const; + OUString GetSupbookTabName( sal_uInt16 nXti, sal_uInt16 nXtiTab ) const; /** Tries to decode the URL of the specified XTI entry to OLE or DDE link components. @descr For DDE links: Decodes to application name and topic. @@ -217,7 +217,7 @@ public: @return true = decoding was successful, returned strings are valid (not empty). */ bool GetLinkData( OUString& rApplic, OUString& rTopic, sal_uInt16 nXtiIndex ) const; /** Returns the specified macro name or an empty string on error. */ - const OUString& GetMacroName( sal_uInt16 nExtSheet, sal_uInt16 nExtName ) const; + OUString GetMacroName( sal_uInt16 nExtSheet, sal_uInt16 nExtName ) const; private: typedef ::std::unique_ptr< XclImpLinkManagerImpl > XclImpLinkMgrImplPtr; diff --git a/sc/source/filter/qpro/qprostyle.cxx b/sc/source/filter/qpro/qprostyle.cxx index 00938af0b757..899d7ff498b5 100644 --- a/sc/source/filter/qpro/qprostyle.cxx +++ b/sc/source/filter/qpro/qprostyle.cxx @@ -132,7 +132,7 @@ void ScQProStyle::SetFormat( ScDocument *pDoc, sal_uInt8 nCol, sal_uInt16 nRow, rItemSet.Put( SvxFontHeightItem( static_cast<sal_uLong>(20 * maFontHeight[ maFont[ nStyle ] ] ), 100, ATTR_FONT_HEIGHT ) ); OUString fntName = maFontType[ maFont[ nStyle ] ]; - rItemSet.Put( SvxFontItem( FAMILY_SYSTEM, fntName, EMPTY_OUSTRING, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, ATTR_FONT ) ); + rItemSet.Put( SvxFontItem( FAMILY_SYSTEM, fntName, OUString(), PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, ATTR_FONT ) ); pDoc->ApplyPattern( nCol, nRow, nTab, aPattern ); } diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx index 73480dc7c6dd..16b53737be82 100644 --- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx +++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx @@ -892,7 +892,7 @@ void XclExpChTrCellContent::GetCellData( else { rpData->mpFormattedString = XclExpStringHelper::CreateCellString( - rRoot, EMPTY_OUSTRING, nullptr); + rRoot, OUString(), nullptr); } } rpData->pString.reset( new XclExpString( sCellStr, XclStrFlags::NONE, 32766 ) ); diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx index 0b50c38c7b47..8268f4a5ddcb 100644 --- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx +++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx @@ -587,7 +587,7 @@ void ScXMLChangeTrackingImportHelper::SetContentDependencies(const ScMyContentAc if (rOldCell.isEmpty()) return; - pPrevActContent->SetNewCell(rOldCell, &rDoc, EMPTY_OUSTRING); + pPrevActContent->SetNewCell(rOldCell, &rDoc, OUString()); } void ScXMLChangeTrackingImportHelper::SetDependencies(ScMyBaseAction* pAction, ScDocument& rDoc) @@ -667,7 +667,7 @@ void ScXMLChangeTrackingImportHelper::SetNewCell(const ScMyContentAction* pActio if (aCell.meType != CELLTYPE_FORMULA) { aNewCell = aCell; - pChangeActionContent->SetNewCell(aNewCell, &rDoc, EMPTY_OUSTRING); + pChangeActionContent->SetNewCell(aNewCell, &rDoc, OUString()); pChangeActionContent->SetNewValue(aCell, &rDoc); } else @@ -702,7 +702,7 @@ void ScXMLChangeTrackingImportHelper::SetNewCell(const ScMyContentAction* pActio aNewCell.mpFormula->SetMatColsRows(nCols, nRows); } aNewCell.mpFormula->SetInChangeTrack(true); - pChangeActionContent->SetNewCell(aNewCell, &rDoc, EMPTY_OUSTRING); + pChangeActionContent->SetNewCell(aNewCell, &rDoc, OUString()); // #i40704# don't overwrite the formula string via SetNewValue() } } diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 779baa28814f..bdae3a1f94d0 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -214,7 +214,7 @@ OUString lcl_GetFormattedString(ScDocument* pDoc, const ScRefCellValue& rCell, c // return text/edit cell string content, with line feeds in edit cells if (!pDoc) - return EMPTY_OUSTRING; + return OUString(); switch (rCell.meType) { @@ -230,7 +230,7 @@ OUString lcl_GetFormattedString(ScDocument* pDoc, const ScRefCellValue& rCell, c { const EditTextObject* pData = rCell.mpEditText; if (!pData) - return EMPTY_OUSTRING; + return OUString(); EditEngine& rEngine = pDoc->GetEditEngine(); rEngine.SetText(*pData); @@ -241,7 +241,7 @@ OUString lcl_GetFormattedString(ScDocument* pDoc, const ScRefCellValue& rCell, c ; } - return EMPTY_OUSTRING; + return OUString(); } } // anonymous namespace 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<OUString>&& 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<OUString>& 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<sal_uInt16>(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<const SfxStringItem*>(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<const SfxStringItem*>(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<const SfxStringItem*>(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<const SfxStringItem*>(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<ScTokenArray> 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<OUString>& 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<const SfxStringItem*>(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<SfxAbstractPasteDialog> 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<const ScFuncDesc*>(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<OUString>&& 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<OUString> &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<OUString> &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::Sequence<sheet::Formula // Actually GRAM_API is a don't-care here because of the token // array being set, it fits with other API compatibility grammars // though. - pDocSh->GetDocFunc().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<SfxAbstractPasteDialog> 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 |