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/inc | |
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/inc')
-rw-r--r-- | sc/inc/addincol.hxx | 2 | ||||
-rw-r--r-- | sc/inc/conditio.hxx | 6 | ||||
-rw-r--r-- | sc/inc/dbdata.hxx | 2 | ||||
-rw-r--r-- | sc/inc/formulacell.hxx | 2 | ||||
-rw-r--r-- | sc/inc/formularesult.hxx | 2 | ||||
-rw-r--r-- | sc/inc/global.hxx | 4 | ||||
-rw-r--r-- | sc/inc/scextopt.hxx | 2 | ||||
-rw-r--r-- | sc/inc/validat.hxx | 2 |
8 files changed, 9 insertions, 13 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, |