summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-11-08 15:31:51 +0100
committerLuboš Luňák <l.lunak@collabora.com>2021-11-08 20:34:09 +0100
commit1a588c71a0b60d200077138eaff54fced14c4fe2 (patch)
tree5a54419c44bec4082c8254fbf55716403b9be187 /sc/source/ui
parent4d66721962f60a9c8b4653dc724f163c45e6ddd9 (diff)
make a number of Calc functions return value by actually returning it
All these returned their value using a reference argument, for apprently no good reason. Change-Id: I6a33417e7df2aac67427c16e5003dfaaa1a814d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124872 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/app/transobj.cxx3
-rw-r--r--sc/source/ui/dataprovider/datatransformation.cxx129
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx3
-rw-r--r--sc/source/ui/docshell/docfunc.cxx6
-rw-r--r--sc/source/ui/docshell/docsh.cxx17
-rw-r--r--sc/source/ui/docshell/docsh3.cxx11
-rw-r--r--sc/source/ui/docshell/docsh4.cxx2
-rw-r--r--sc/source/ui/docshell/docsh8.cxx12
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx3
-rw-r--r--sc/source/ui/docshell/impex.cxx16
-rw-r--r--sc/source/ui/formdlg/formula.cxx3
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx29
-rw-r--r--sc/source/ui/miscdlgs/conflictsdlg.cxx3
-rw-r--r--sc/source/ui/miscdlgs/redcom.cxx3
-rw-r--r--sc/source/ui/miscdlgs/solvrdlg.cxx8
-rw-r--r--sc/source/ui/namedlg/namemgrtable.cxx3
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx3
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx11
-rw-r--r--sc/source/ui/unoobj/nameuno.cxx6
-rw-r--r--sc/source/ui/unoobj/textuno.cxx3
-rw-r--r--sc/source/ui/vba/vbaname.cxx2
-rw-r--r--sc/source/ui/view/cellsh.cxx5
-rw-r--r--sc/source/ui/view/cellsh1.cxx18
-rw-r--r--sc/source/ui/view/formatsh.cxx13
-rw-r--r--sc/source/ui/view/gridwin5.cxx3
-rw-r--r--sc/source/ui/view/output2.cxx17
-rw-r--r--sc/source/ui/view/spelleng.cxx3
-rw-r--r--sc/source/ui/view/tabvwsh.cxx5
-rw-r--r--sc/source/ui/view/tabvwsha.cxx6
-rw-r--r--sc/source/ui/view/viewfun2.cxx10
-rw-r--r--sc/source/ui/view/viewfun4.cxx6
-rw-r--r--sc/source/ui/view/viewfunc.cxx19
-rw-r--r--sc/source/ui/view/viewutil.cxx3
33 files changed, 148 insertions, 236 deletions
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 0af2328f24c3..7783264d8801 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -318,9 +318,8 @@ bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor, const OUSt
{
SvNumberFormatter* pFormatter = m_pDoc->GetFormatTable();
sal_uInt32 nNumFmt = pPattern->GetNumberFormat(pFormatter);
- OUString aText;
const Color* pColor;
- ScCellFormat::GetString(aCell, nNumFmt, aText, &pColor, *pFormatter, *m_pDoc);
+ OUString aText = ScCellFormat::GetString(aCell, nNumFmt, &pColor, *pFormatter, *m_pDoc);
if (!aText.isEmpty())
aEngine.SetTextCurrentDefaults(aText);
}
diff --git a/sc/source/ui/dataprovider/datatransformation.cxx b/sc/source/ui/dataprovider/datatransformation.cxx
index 0c4d2dc300c6..393521dfc417 100644
--- a/sc/source/ui/dataprovider/datatransformation.cxx
+++ b/sc/source/ui/dataprovider/datatransformation.cxx
@@ -78,8 +78,7 @@ void SplitColumnTransformation::Transform(ScDocument& rDoc) const
SCROW nEndRow = getLastRow(rDoc, mnCol);
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(mnCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(mnCol, nRow, 0);
if (eType == CELLTYPE_STRING)
{
OUString aStr = rDoc.GetString(mnCol, nRow, 0);
@@ -209,8 +208,7 @@ void TextTransformation::Transform(ScDocument& rDoc) const
{
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_STRING)
{
OUString aStr = rDoc.GetString(rCol, nRow, 0);
@@ -223,8 +221,7 @@ void TextTransformation::Transform(ScDocument& rDoc) const
{
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_STRING)
{
OUString aStr = rDoc.GetString(rCol, nRow, 0);
@@ -237,8 +234,7 @@ void TextTransformation::Transform(ScDocument& rDoc) const
{
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_STRING)
{
OUString aStr = rDoc.GetString(rCol, nRow, 0);
@@ -267,8 +263,7 @@ void TextTransformation::Transform(ScDocument& rDoc) const
{
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_STRING)
{
OUString aStr = rDoc.GetString(rCol, nRow, 0);
@@ -322,8 +317,7 @@ void AggregateFunction::Transform(ScDocument& rDoc) const
double nSum = 0;
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -338,8 +332,7 @@ void AggregateFunction::Transform(ScDocument& rDoc) const
double nSum = 0;
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -356,8 +349,7 @@ void AggregateFunction::Transform(ScDocument& rDoc) const
double nMin = std::numeric_limits<double>::max();
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -373,8 +365,7 @@ void AggregateFunction::Transform(ScDocument& rDoc) const
double nMax = std::numeric_limits<double>::lowest();
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -441,8 +432,7 @@ void NumberTransformation::Transform(ScDocument& rDoc) const
{
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -456,8 +446,7 @@ void NumberTransformation::Transform(ScDocument& rDoc) const
{
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -470,8 +459,7 @@ void NumberTransformation::Transform(ScDocument& rDoc) const
{
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -484,8 +472,7 @@ void NumberTransformation::Transform(ScDocument& rDoc) const
{
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -499,8 +486,7 @@ void NumberTransformation::Transform(ScDocument& rDoc) const
{
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -520,8 +506,7 @@ void NumberTransformation::Transform(ScDocument& rDoc) const
{
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -541,8 +526,7 @@ void NumberTransformation::Transform(ScDocument& rDoc) const
{
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -555,8 +539,7 @@ void NumberTransformation::Transform(ScDocument& rDoc) const
{
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -569,8 +552,7 @@ void NumberTransformation::Transform(ScDocument& rDoc) const
{
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -590,8 +572,7 @@ void NumberTransformation::Transform(ScDocument& rDoc) const
{
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -607,8 +588,7 @@ void NumberTransformation::Transform(ScDocument& rDoc) const
{
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -624,8 +604,7 @@ void NumberTransformation::Transform(ScDocument& rDoc) const
{
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -682,8 +661,7 @@ void ReplaceNullTransformation::Transform(ScDocument& rDoc) const
SCROW nEndRow = getLastRow(rDoc, rCol);
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_NONE)
{
// OUString aStr = rDoc.GetString(rCol, nRow, 0);
@@ -737,8 +715,7 @@ void DateTimeTransformation::Transform(ScDocument& rDoc) const
sal_uInt32 nFormat = pFormatter->GetStandardFormat( SvNumFormatType::DATE, eLanguage );
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
ScAddress aAddress(rCol, nRow, 0);
@@ -752,8 +729,7 @@ void DateTimeTransformation::Transform(ScDocument& rDoc) const
SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -770,8 +746,7 @@ void DateTimeTransformation::Transform(ScDocument& rDoc) const
sal_uInt32 nFormat = pFormatter->GetStandardFormat( SvNumFormatType::DATE, eLanguage );
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -794,8 +769,7 @@ void DateTimeTransformation::Transform(ScDocument& rDoc) const
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -815,8 +789,7 @@ void DateTimeTransformation::Transform(ScDocument& rDoc) const
SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -832,8 +805,7 @@ void DateTimeTransformation::Transform(ScDocument& rDoc) const
LanguageType eLanguage = ScGlobal::eLnge;
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -852,8 +824,7 @@ void DateTimeTransformation::Transform(ScDocument& rDoc) const
sal_uInt32 nFormat = pFormatter->GetStandardFormat( SvNumFormatType::DATE, eLanguage );
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -874,8 +845,7 @@ void DateTimeTransformation::Transform(ScDocument& rDoc) const
sal_uInt32 nFormat = pFormatter->GetStandardFormat( SvNumFormatType::DATE, eLanguage );
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -894,8 +864,7 @@ void DateTimeTransformation::Transform(ScDocument& rDoc) const
SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -910,8 +879,7 @@ void DateTimeTransformation::Transform(ScDocument& rDoc) const
SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -926,8 +894,7 @@ void DateTimeTransformation::Transform(ScDocument& rDoc) const
SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -942,8 +909,7 @@ void DateTimeTransformation::Transform(ScDocument& rDoc) const
SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -976,8 +942,7 @@ void DateTimeTransformation::Transform(ScDocument& rDoc) const
sal_uInt32 nFormat = pFormatter->GetStandardFormat( SvNumFormatType::DATE, eLanguage );
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -1032,8 +997,7 @@ void DateTimeTransformation::Transform(ScDocument& rDoc) const
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
ScAddress aAddress(rCol, nRow, 0);
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -1090,8 +1054,7 @@ void DateTimeTransformation::Transform(ScDocument& rDoc) const
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
ScAddress aAddress(rCol, nRow, 0);
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
rDoc.SetNumberFormat(aAddress, nFormat);
@@ -1103,8 +1066,7 @@ void DateTimeTransformation::Transform(ScDocument& rDoc) const
{
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -1120,8 +1082,7 @@ void DateTimeTransformation::Transform(ScDocument& rDoc) const
{
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -1137,8 +1098,7 @@ void DateTimeTransformation::Transform(ScDocument& rDoc) const
{
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(rCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(rCol, nRow, 0);
if (eType == CELLTYPE_VALUE)
{
double nVal = rDoc.GetValue(rCol, nRow, 0);
@@ -1186,8 +1146,7 @@ void FindReplaceTransformation::Transform(ScDocument& rDoc) const
SCROW nEndRow = getLastRow(rDoc, mnCol);
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(mnCol, nRow, 0, eType);
+ CellType eType = rDoc.GetCellType(mnCol, nRow, 0);
if (eType != CELLTYPE_NONE)
{
OUString aStr = rDoc.GetString(mnCol, nRow, 0);
@@ -1232,8 +1191,7 @@ void DeleteRowTransformation::Transform(ScDocument& rDoc) const
SCROW nEndRow = getLastRow(rDoc, mnCol);
for (SCROW nRow = 0; nRow <= nEndRow; ++nRow)
{
- CellType eType;
- rDoc.GetCellType(mnCol, nRow - nIncrementIndex, 0, eType);
+ CellType eType = rDoc.GetCellType(mnCol, nRow - nIncrementIndex, 0);
if (eType != CELLTYPE_NONE)
{
OUString aStr = rDoc.GetString(mnCol, nRow - nIncrementIndex, 0);
@@ -1274,8 +1232,7 @@ void SwapRowsTransformation::Transform(ScDocument& rDoc) const
for (SCCOL nCol = 0; nCol <= rDoc.MaxCol(); ++nCol)
{
- CellType aType;
- rDoc.GetCellType(nCol, mxRow, 0, aType);
+ CellType aType = rDoc.GetCellType(nCol, mxRow, 0);
if (aType == CELLTYPE_STRING)
{
OUString aStr = rDoc.GetString(nCol, mxRow, 0);
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index 030741e3e2bc..e01b8e0a9571 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -138,8 +138,7 @@ void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet )
if (!rEntry.second->HasType(ScRangeData::Type::Criteria))
continue;
- OUString aSymbol;
- rEntry.second->GetSymbol(aSymbol);
+ OUString aSymbol = rEntry.second->GetSymbol();
m_xLbFilterArea->append(aSymbol, rEntry.second->GetName());
}
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 123a4c211338..ff5773c74755 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -5224,8 +5224,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList,
ScRangeData* pOld = rList.findByUpperName(ScGlobal::getCharClass().uppercase(aName));
if (pOld)
{
- OUString aOldStr;
- pOld->GetSymbol( aOldStr );
+ OUString aOldStr = pOld->GetSymbol();
if (aOldStr != aContent)
{
if (bApi)
@@ -5471,8 +5470,7 @@ void ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd
SCROW nStartRow = rOldRange.aStart.Row();
SCTAB nTab = rOldRange.aStart.Tab();
- OUString aFormula;
- rDoc.GetFormula( nStartCol, nStartRow, nTab, aFormula );
+ OUString aFormula = rDoc.GetFormula( nStartCol, nStartRow, nTab );
if ( !(aFormula.startsWith("{") && aFormula.endsWith("}")) )
return;
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index f0f82517a844..4a13484c82cf 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -2104,7 +2104,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt,
FormulaError nErrCode;
if ( bShowFormulas )
{
- pCell->mpFormula->GetFormula(aString);
+ aString = pCell->mpFormula->GetFormula();
bString = true;
}
else if ((nErrCode = pCell->mpFormula->GetErrCode()) != FormulaError::NONE)
@@ -2118,12 +2118,12 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt,
if ( bFixedWidth || bSaveAsShown )
{
const Color* pDummy;
- ScCellFormat::GetString(*pCell, nFormat, aString, &pDummy, rFormatter, m_aDocument);
+ aString = ScCellFormat::GetString(*pCell, nFormat, &pDummy, rFormatter, m_aDocument);
bString = bSaveAsShown && rFormatter.IsTextFormat( nFormat);
}
else
{
- ScCellFormat::GetInputString(*pCell, nFormat, aString, rFormatter, m_aDocument);
+ aString = ScCellFormat::GetInputString(*pCell, nFormat, rFormatter, m_aDocument);
bString = bForceQuotes = !bSaveNumberAsSuch;
}
}
@@ -2133,7 +2133,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt,
{
sal_uInt32 nFormat = m_aDocument.GetNumberFormat(aPos);
const Color* pDummy;
- ScCellFormat::GetString(*pCell, nFormat, aString, &pDummy, rFormatter, m_aDocument);
+ aString = ScCellFormat::GetString(*pCell, nFormat, &pDummy, rFormatter, m_aDocument);
}
else
aString = pCell->mpFormula->GetString().getString();
@@ -2146,7 +2146,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt,
{
sal_uInt32 nFormat = m_aDocument.GetNumberFormat(aPos);
const Color* pDummy;
- ScCellFormat::GetString(*pCell, nFormat, aString, &pDummy, rFormatter, m_aDocument);
+ aString = ScCellFormat::GetString(*pCell, nFormat, &pDummy, rFormatter, m_aDocument);
}
else
aString = pCell->mpString->getString();
@@ -2163,17 +2163,16 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt,
break;
case CELLTYPE_VALUE :
{
- sal_uInt32 nFormat;
- m_aDocument.GetNumberFormat( nCol, nRow, nTab, nFormat );
+ sal_uInt32 nFormat = m_aDocument.GetNumberFormat( nCol, nRow, nTab );
if ( bFixedWidth || bSaveAsShown )
{
const Color* pDummy;
- ScCellFormat::GetString(*pCell, nFormat, aString, &pDummy, rFormatter, m_aDocument);
+ aString = ScCellFormat::GetString(*pCell, nFormat, &pDummy, rFormatter, m_aDocument);
bString = bSaveAsShown && rFormatter.IsTextFormat( nFormat);
}
else
{
- ScCellFormat::GetInputString(*pCell, nFormat, aString, rFormatter, m_aDocument);
+ aString = ScCellFormat::GetInputString(*pCell, nFormat, rFormatter, m_aDocument);
bString = bForceQuotes = !bSaveNumberAsSuch;
}
}
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index cc8f3b912de2..8d9e604ad5cd 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -750,10 +750,8 @@ static bool lcl_FindAction( ScDocument& rDoc, const ScChangeAction* pAction, ScD
pAction->GetDateTimeUTC() == pA->GetDateTimeUTC() ) &&
pAction->GetBigRange() == pA->GetBigRange() )
{
- OUString aActionDesc;
- pAction->GetDescription(aActionDesc, rDoc, true);
- OUString aADesc;
- pA->GetDescription(aADesc, rSearchDoc, true);
+ OUString aActionDesc = pAction->GetDescription(rDoc, true);
+ OUString aADesc = pA->GetDescription(rSearchDoc, true);
if (aActionDesc == aADesc)
{
OSL_FAIL( "lcl_FindAction(): found equal action!" );
@@ -922,7 +920,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
#if OSL_DEBUG_LEVEL > 0
OUString aValue;
if ( eSourceType == SC_CAT_CONTENT )
- static_cast<const ScChangeActionContent*>(pSourceAction)->GetNewString( aValue, &m_aDocument );
+ aValue = static_cast<const ScChangeActionContent*>(pSourceAction)->GetNewString( &m_aDocument );
SAL_WARN( "sc", aValue << " omitted");
#endif
}
@@ -983,8 +981,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
OSL_ENSURE( aSourceRange.aStart == aSourceRange.aEnd, "huch?" );
ScAddress aPos = aSourceRange.aStart;
- OUString aValue;
- static_cast<const ScChangeActionContent*>(pSourceAction)->GetNewString( aValue, &m_aDocument );
+ OUString aValue = static_cast<const ScChangeActionContent*>(pSourceAction)->GetNewString( &m_aDocument );
ScMatrixMode eMatrix = ScMatrixMode::NONE;
const ScCellValue& rCell = static_cast<const ScChangeActionContent*>(pSourceAction)->GetNewCell();
if (rCell.meType == CELLTYPE_FORMULA)
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index e4fb0ee54627..1c32a670baf1 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -2487,7 +2487,7 @@ bool ScDocShell::DdeSetData( const OUString& rItem,
if( pData->HasType( ScRangeData::Type::RefArea )
|| pData->HasType( ScRangeData::Type::AbsArea )
|| pData->HasType( ScRangeData::Type::AbsPos ) )
- pData->GetSymbol( aPos ); // continue with the name's contents
+ aPos = pData->GetSymbol(); // continue with the name's contents
}
}
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index d7a9ffe397ba..35fd94055f8e 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -234,8 +234,7 @@ static void lcl_setScalesToColumns(ScDocument& rDoc, const vector<tools::Long>&
if (rScales[i] < 0)
continue;
- sal_uInt32 nOldFormat;
- rDoc.GetNumberFormat(i, 0, 0, nOldFormat);
+ sal_uInt32 nOldFormat = rDoc.GetNumberFormat(i, 0, 0);
const SvNumberformat* pOldEntry = pFormatter->GetEntry(nOldFormat);
if (!pOldEntry)
continue;
@@ -573,8 +572,7 @@ void lcl_GetColumnTypes(
nDbType = sdbc::DataType::VARCHAR;
else
{
- sal_uInt32 nFormat;
- rDoc.GetNumberFormat( nCol, nFirstDataRow, nTab, nFormat );
+ sal_uInt32 nFormat = rDoc.GetNumberFormat( nCol, nFirstDataRow, nTab );
switch ( pNumFmt->GetType( nFormat ) )
{
case SvNumFormatType::LOGICAL :
@@ -929,7 +927,7 @@ ErrCode ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncoding
case sdbc::DataType::DATE:
{
- m_aDocument.GetValue( nDocCol, nDocRow, nTab, fVal );
+ fVal = m_aDocument.GetValue( nDocCol, nDocRow, nTab );
// differentiate between 0 with value and 0 no-value
bool bIsNull = (fVal == 0.0);
if ( bIsNull )
@@ -952,7 +950,7 @@ ErrCode ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncoding
case sdbc::DataType::DECIMAL:
case sdbc::DataType::BIT:
- m_aDocument.GetValue( nDocCol, nDocRow, nTab, fVal );
+ fVal = m_aDocument.GetValue( nDocCol, nDocRow, nTab );
if ( fVal == 0.0 && nErr == ERRCODE_NONE &&
m_aDocument.HasStringData( nDocCol, nDocRow, nTab ) )
nErr = SCWARN_EXPORT_DATALOST;
@@ -966,7 +964,7 @@ ErrCode ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncoding
OSL_FAIL( "ScDocShell::DBaseExport: unknown FieldType" );
if ( nErr == ERRCODE_NONE )
nErr = SCWARN_EXPORT_DATALOST;
- m_aDocument.GetValue( nDocCol, nDocRow, nTab, fVal );
+ fVal = m_aDocument.GetValue( nDocCol, nDocRow, nTab );
xRowUpdate->updateDouble( nCol+1, fVal );
}
}
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index b8d254f2b8be..79e65d92a02a 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2279,8 +2279,7 @@ ScExternalRefCache::TokenRef ScExternalRefManager::getSingleRefTokenFromSrcDoc(
}
// Get number format information.
- sal_uInt32 nFmtIndex = 0;
- rSrcDoc.GetNumberFormat(rPos.Col(), rPos.Row(), rPos.Tab(), nFmtIndex);
+ sal_uInt32 nFmtIndex = rSrcDoc.GetNumberFormat(rPos.Col(), rPos.Row(), rPos.Tab());
nFmtIndex = getMappedNumberFormat(nFileId, nFmtIndex, rSrcDoc);
fillCellFormat(nFmtIndex, pFmt);
return pToken;
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 382b3f64b19a..13376639c0ba 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -179,7 +179,7 @@ ScImportExport::ScImportExport( ScDocument& r, const OUString& rPos )
|| pData->HasType( ScRangeData::Type::AbsArea )
|| pData->HasType( ScRangeData::Type::AbsPos ) )
{
- pData->GetSymbol(aPos);
+ aPos = pData->GetSymbol();
}
}
}
@@ -1914,7 +1914,7 @@ bool ScImportExport::Doc2Text( SvStream& rStrm )
{
if (bFormulas)
{
- aCell.mpFormula->GetFormula( aCellStr );
+ aCellStr = aCell.mpFormula->GetFormula();
if( aCellStr.indexOf( cSep ) != -1 )
lcl_WriteString( rStrm, aCellStr, cStr, cStr );
else
@@ -1923,7 +1923,7 @@ bool ScImportExport::Doc2Text( SvStream& rStrm )
else
{
const Color* pColor;
- ScCellFormat::GetString(aCell, nNumFmt, aCellStr, &pColor, *pFormatter, rDoc);
+ aCellStr = ScCellFormat::GetString(aCell, nNumFmt, &pColor, *pFormatter, rDoc);
bool bMultiLineText = ( aCellStr.indexOf( '\n' ) != -1 );
if( bMultiLineText )
@@ -1947,7 +1947,7 @@ bool ScImportExport::Doc2Text( SvStream& rStrm )
case CELLTYPE_VALUE:
{
const Color* pColor;
- ScCellFormat::GetString(aCell, nNumFmt, aCellStr, &pColor, *pFormatter, rDoc);
+ aCellStr = ScCellFormat::GetString(aCell, nNumFmt, &pColor, *pFormatter, rDoc);
lcl_WriteSimpleString( rStrm, aCellStr );
}
break;
@@ -1956,7 +1956,7 @@ bool ScImportExport::Doc2Text( SvStream& rStrm )
default:
{
const Color* pColor;
- ScCellFormat::GetString(aCell, nNumFmt, aCellStr, &pColor, *pFormatter, rDoc);
+ aCellStr = ScCellFormat::GetString(aCell, nNumFmt, &pColor, *pFormatter, rDoc);
bool bMultiLineText = ( aCellStr.indexOf( '\n' ) != -1 );
if( bMultiLineText )
@@ -2356,7 +2356,7 @@ bool ScImportExport::Doc2Sylk( SvStream& rStrm )
case CELLTYPE_VALUE:
hasvalue:
- rDoc.GetValue( nCol, nRow, aRange.aStart.Tab(), nVal );
+ nVal = rDoc.GetValue( nCol, nRow, aRange.aStart.Tab() );
aValStr = ::rtl::math::doubleToUString( nVal,
rtl_math_StringFormat_Automatic,
@@ -2395,9 +2395,7 @@ bool ScImportExport::Doc2Sylk( SvStream& rStrm )
aCellStr.clear();
break;
default:
- OUString aOUCellStr;
- pFCell->GetFormula( aOUCellStr,formula::FormulaGrammar::GRAM_PODF_A1);
- aCellStr = aOUCellStr;
+ aCellStr = pFCell->GetFormula( formula::FormulaGrammar::GRAM_PODF_A1);
/* FIXME: do we want GRAM_ODFF_A1 instead? At
* the end it probably should be
* GRAM_ODFF_R1C1, since R1C1 is what Excel
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index 8d9ea4b89689..883b6a063baf 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -132,8 +132,7 @@ ScFormulaDlg::ScFormulaDlg(SfxBindings* pB, SfxChildWindow* pCW,
// edit if formula exists
- OUString aFormula;
- m_pDoc->GetFormula( nCol, nRow, nTab, aFormula );
+ OUString aFormula = m_pDoc->GetFormula( nCol, nRow, nTab );
bool bEdit = ( aFormula.getLength() > 1 );
bool bMatrix = false;
if ( bEdit )
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index ece0eeb58739..554bf801d1de 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -327,10 +327,10 @@ bool ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction)
if(eType==SC_CAT_CONTENT)
{
if(!pScChangeAction->IsDialogParent())
- pScChangeAction->GetDescription(aDesc, *pDoc, true);
+ aDesc = pScChangeAction->GetDescription(*pDoc, true);
}
else
- pScChangeAction->GetDescription(aDesc, *pDoc, !pScChangeAction->IsMasterDelete());
+ aDesc = pScChangeAction->GetDescription(*pDoc, !pScChangeAction->IsMasterDelete());
if (!aDesc.isEmpty())
{
@@ -399,7 +399,7 @@ std::unique_ptr<weld::TreeIter> ScAcceptChgDlg::AppendChangeAction(
else
{
aBuf.append(*MakeTypeString(eType));
- pScChangeAction->GetDescription( aDesc, *pDoc, true);
+ aDesc = pScChangeAction->GetDescription(*pDoc, true);
}
}
else
@@ -408,16 +408,16 @@ std::unique_ptr<weld::TreeIter> ScAcceptChgDlg::AppendChangeAction(
if(bDelMaster)
{
- pScChangeAction->GetDescription( aDesc, *pDoc,true);
+ aDesc = pScChangeAction->GetDescription(*pDoc,true);
pNewData->bDisabled=true;
pNewData->bIsRejectable=false;
}
else
- pScChangeAction->GetDescription( aDesc, *pDoc, !pScChangeAction->IsMasterDelete());
+ aDesc = pScChangeAction->GetDescription(*pDoc, !pScChangeAction->IsMasterDelete());
}
- pScChangeAction->GetRefString(aRefStr, *pDoc, true);
+ aRefStr = pScChangeAction->GetRefString(*pDoc, true);
aBuf.append('\t');
aBuf.append(aRefStr);
@@ -570,7 +570,7 @@ std::unique_ptr<weld::TreeIter> ScAcceptChgDlg::AppendFilteredAction(
else
{
aActionString=*MakeTypeString(eType);
- pScChangeAction->GetDescription( aDesc, *pDoc, true);
+ aDesc = pScChangeAction->GetDescription(*pDoc, true);
}
}
else
@@ -579,12 +579,12 @@ std::unique_ptr<weld::TreeIter> ScAcceptChgDlg::AppendFilteredAction(
if(bDelMaster)
{
- pScChangeAction->GetDescription( aDesc, *pDoc,true);
+ aDesc = pScChangeAction->GetDescription(*pDoc,true);
pNewData->bDisabled=true;
pNewData->bIsRejectable=false;
}
else
- pScChangeAction->GetDescription( aDesc, *pDoc,!pScChangeAction->IsMasterDelete());
+ aDesc = pScChangeAction->GetDescription(*pDoc,!pScChangeAction->IsMasterDelete());
}
@@ -601,8 +601,7 @@ std::unique_ptr<weld::TreeIter> ScAcceptChgDlg::AppendFilteredAction(
OUString sId(OUString::number(reinterpret_cast<sal_Int64>(pNewData.release())));
rTreeView.insert(pParent, -1, &aActionString, &sId, nullptr, nullptr, bCreateOnDemand, xEntry.get());
- OUString aRefStr;
- pScChangeAction->GetRefString(aRefStr, *pDoc, true);
+ OUString aRefStr = pScChangeAction->GetRefString(*pDoc, true);
rTreeView.set_text(*xEntry, aRefStr, 1);
if (!bIsGenerated)
@@ -658,8 +657,7 @@ std::unique_ptr<weld::TreeIter> ScAcceptChgDlg::InsertChangeActionContent(const
if(nSpecial==RD_SPECIAL_CONTENT)
{
- OUString aTmp;
- pScChangeAction->GetOldString(aTmp, pDoc);
+ OUString aTmp = pScChangeAction->GetOldString(pDoc);
a2String = aTmp;
if(a2String.isEmpty()) a2String=aStrEmpty;
@@ -671,8 +669,7 @@ std::unique_ptr<weld::TreeIter> ScAcceptChgDlg::InsertChangeActionContent(const
}
else
{
- OUString aTmp;
- pScChangeAction->GetNewString(aTmp, pDoc);
+ OUString aTmp = pScChangeAction->GetNewString(pDoc);
a2String = aTmp;
if(a2String.isEmpty())
{
@@ -690,7 +687,7 @@ std::unique_ptr<weld::TreeIter> ScAcceptChgDlg::InsertChangeActionContent(const
aDesc += a2String;
aString += "\t";
- pScChangeAction->GetRefString(aRefStr, *pDoc, true);
+ aRefStr = pScChangeAction->GetRefString(*pDoc, true);
aString += aRefStr + "\t";
if(!bIsGenerated)
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index d3a79455698a..6e97d262c82b 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -409,8 +409,7 @@ void ScConflictsDlg::SetActionString(const ScChangeAction* pAction, ScDocument*
return;
weld::TreeView& rTreeView = m_xLbConflicts->GetWidget();
- OUString aDesc;
- pAction->GetDescription(aDesc, *pDoc, true, false);
+ OUString aDesc = pAction->GetDescription(*pDoc, true, false);
rTreeView.set_text(rEntry, aDesc, 0);
OUString aUser = comphelper::string::strip(pAction->GetUser(), ' ');
diff --git a/sc/source/ui/miscdlgs/redcom.cxx b/sc/source/ui/miscdlgs/redcom.cxx
index 6eeb00fb0739..6e744fac58de 100644
--- a/sc/source/ui/miscdlgs/redcom.cxx
+++ b/sc/source/ui/miscdlgs/redcom.cxx
@@ -98,8 +98,7 @@ void ScRedComDialog::ReInit(ScChangeAction *pAction)
if(pChangeAction==nullptr || pDocShell ==nullptr)
return;
- OUString aTitle;
- pChangeAction->GetDescription(aTitle, pDocShell->GetDocument());
+ OUString aTitle = pChangeAction->GetDescription(pDocShell->GetDocument());
pDlg->SetText(aTitle);
aComment=pChangeAction->GetComment();
diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx
index b4ffef9a067c..c55e81e86856 100644
--- a/sc/source/ui/miscdlgs/solvrdlg.cxx
+++ b/sc/source/ui/miscdlgs/solvrdlg.cxx
@@ -208,11 +208,9 @@ IMPL_LINK(ScSolverDlg, BtnHdl, weld::Button&, rBtn, void)
{
if ( CheckTargetValue( theTargetValStr ) )
{
- CellType eType;
- pDoc->GetCellType( theFormulaCell.Col(),
- theFormulaCell.Row(),
- theFormulaCell.Tab(),
- eType );
+ CellType eType = pDoc->GetCellType( theFormulaCell.Col(),
+ theFormulaCell.Row(),
+ theFormulaCell.Tab());
if ( CELLTYPE_FORMULA == eType )
{
diff --git a/sc/source/ui/namedlg/namemgrtable.cxx b/sc/source/ui/namedlg/namemgrtable.cxx
index a48352a26083..0e5d98856e7c 100644
--- a/sc/source/ui/namedlg/namemgrtable.cxx
+++ b/sc/source/ui/namedlg/namemgrtable.cxx
@@ -103,8 +103,7 @@ void ScRangeManagerTable::CheckForFormulaString()
ScRangeNameLine aLine;
GetLine(aLine, rEntry);
const ScRangeData* pData = findRangeData(aLine);
- OUString aFormulaString;
- pData->GetSymbol(aFormulaString, maPos);
+ OUString aFormulaString = pData->GetSymbol(maPos);
m_xTreeView->set_text(rEntry, aFormulaString, 1);
maCalculatedFormulaEntries.insert(std::pair<OUString, bool>(sId, true));
}
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 2c52fcdd868d..67ee2af9241d 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -416,8 +416,7 @@ void ScPrintAreasDlg::Impl_FillLists()
continue;
OUString aName = rEntry.second->GetName();
- OUString aSymbol;
- rEntry.second->GetSymbol(aSymbol);
+ OUString aSymbol = rEntry.second->GetSymbol();
if (aRange.ParseAny(aSymbol, *pDoc, eConv) & ScRefFlags::VALID)
{
if (rEntry.second->HasType(ScRangeData::Type::PrintArea))
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 6720b9823929..d599e8ea38ba 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -1322,8 +1322,7 @@ static OUString lcl_GetInputString( ScDocument& rDoc, const ScAddress& rPos, boo
if (eType == CELLTYPE_FORMULA)
{
ScFormulaCell* pForm = aCell.mpFormula;
- pForm->GetFormula( aVal, formula::FormulaGrammar::mapAPItoGrammar( bEnglish, false));
- return aVal;
+ return pForm->GetFormula( formula::FormulaGrammar::mapAPItoGrammar( bEnglish, false));
}
SvNumberFormatter* pFormatter = bEnglish ? ScGlobal::GetEnglishFormatter() :
@@ -1346,7 +1345,7 @@ static OUString lcl_GetInputString( ScDocument& rDoc, const ScAddress& rPos, boo
}
}
else
- ScCellFormat::GetInputString(aCell, nNumFmt, aVal, *pFormatter, rDoc);
+ aVal = ScCellFormat::GetInputString(aCell, nNumFmt, *pFormatter, rDoc);
// if applicable, prepend ' like in ScTabViewShell::UpdateInputHandler
if ( eType == CELLTYPE_STRING || eType == CELLTYPE_EDIT )
@@ -4794,8 +4793,6 @@ OUString SAL_CALL ScCellRangeObj::getArrayFormula()
if (!pDocSh)
return EMPTY_OUSTRING;
- OUString aFormula;
-
ScDocument& rDoc = pDocSh->GetDocument();
ScRefCellValue aCell1(rDoc, aRange.aStart);
ScRefCellValue aCell2(rDoc, aRange.aEnd);
@@ -4808,10 +4805,10 @@ OUString SAL_CALL ScCellRangeObj::getArrayFormula()
if (pFCell1->GetMatrixOrigin(rDoc, aStart1) && pFCell2->GetMatrixOrigin(rDoc, aStart2))
{
if (aStart1 == aStart2) // both the same matrix
- pFCell1->GetFormula(aFormula); // it doesn't matter from which cell
+ return pFCell1->GetFormula(); // it doesn't matter from which cell
}
}
- return aFormula;
+ return EMPTY_OUSTRING;
}
void ScCellRangeObj::SetArrayFormula_Impl(const OUString& rFormula,
diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx
index 6d2bd3cff5ae..69ad7abdae87 100644
--- a/sc/source/ui/unoobj/nameuno.cxx
+++ b/sc/source/ui/unoobj/nameuno.cxx
@@ -176,8 +176,8 @@ void ScNamedRangeObj::Modify_Impl( const OUString* pNewName, const ScTokenArray*
if (pNewName)
aInsName = *pNewName;
- OUString aContent; // Content string based =>
- pOld->GetSymbol( aContent, eGrammar); // no problems with changed positions and such.
+ // Content string based => no problems with changed positions and such.
+ OUString aContent = pOld->GetSymbol(eGrammar);
if (pNewContent)
aContent = *pNewContent;
@@ -236,7 +236,7 @@ OUString SAL_CALL ScNamedRangeObj::getContent()
ScRangeData* pData = GetRangeData_Impl();
if (pData)
// GRAM_API for API compatibility.
- pData->GetSymbol( aContent,formula::FormulaGrammar::GRAM_API);
+ aContent = pData->GetSymbol(formula::FormulaGrammar::GRAM_API);
return aContent;
}
diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx
index b590d73d8b92..46ec6dbf2fbd 100644
--- a/sc/source/ui/unoobj/textuno.cxx
+++ b/sc/source/ui/unoobj/textuno.cxx
@@ -823,8 +823,7 @@ SvxTextForwarder* ScCellTextData::GetTextForwarder()
else
{
sal_uInt32 nFormat = rDoc.GetNumberFormat(aCellPos);
- OUString aText;
- ScCellFormat::GetInputString(aCell, nFormat, aText, *rDoc.GetFormatTable(), rDoc);
+ OUString aText = ScCellFormat::GetInputString(aCell, nFormat, *rDoc.GetFormatTable(), rDoc);
if (!aText.isEmpty())
pEditEngine->SetTextNewDefaults(aText, aDefaults);
else
diff --git a/sc/source/ui/vba/vbaname.cxx b/sc/source/ui/vba/vbaname.cxx
index 5f923da844dd..7ef8fe1293f5 100644
--- a/sc/source/ui/vba/vbaname.cxx
+++ b/sc/source/ui/vba/vbaname.cxx
@@ -90,7 +90,7 @@ OUString ScVbaName::getContent( const formula::FormulaGrammar::Grammar eGrammar
{
ScRangeData* pData = pNamedRange->GetRangeData_Impl();
if (pData)
- pData->GetSymbol( aContent, eGrammar );
+ aContent = pData->GetSymbol( eGrammar );
}
if (aContent.indexOf('=') != 0)
aContent = "=" + aContent;
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 233e59b32ec5..a1ee1bbb3289 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -716,11 +716,10 @@ void ScCellShell::GetState(SfxItemSet &rSet)
case SID_RANGE_FORMULA:
{
- OUString aString;
- rDoc.GetFormula( nPosX, nPosY, nTab, aString );
+ OUString aString = rDoc.GetFormula( nPosX, nPosY, nTab );
if( aString.isEmpty() )
{
- rDoc.GetInputString( nPosX, nPosY, nTab, aString );
+ aString = rDoc.GetInputString( nPosX, nPosY, nTab );
}
rSet.Put( SfxStringItem( nWhich, aString ) );
}
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 94d2816604c4..c1eb2ed66583 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -624,10 +624,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
else // (pReqArgs == nullptr) => raise Dialog
{
- sal_uInt32 nPrivFormat;
- CellType eCellType;
- rDoc.GetNumberFormat( nStartCol, nStartRow, nStartTab, nPrivFormat );
- rDoc.GetCellType( nStartCol, nStartRow, nStartTab,eCellType );
+ sal_uInt32 nPrivFormat = rDoc.GetNumberFormat( nStartCol, nStartRow, nStartTab );
+ CellType eCellType = rDoc.GetCellType( nStartCol, nStartRow, nStartTab );
const SvNumberformat* pPrivEntry = pFormatter->GetEntry( nPrivFormat );
const SCSIZE nSelectHeight = nEndRow - nStartRow + 1;
const SCSIZE nSelectWidth = nEndCol - nStartCol + 1;
@@ -657,15 +655,15 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
double fInputEndVal = 0.0;
OUString aEndStr;
- rDoc.GetInputString( nStartCol, nStartRow, nStartTab, aStartStr);
- rDoc.GetValue( nStartCol, nStartRow, nStartTab, fStartVal );
+ aStartStr = rDoc.GetInputString( nStartCol, nStartRow, nStartTab );
+ fStartVal = rDoc.GetValue( nStartCol, nStartRow, nStartTab );
if(eFillDir==FILL_TO_BOTTOM && nStartRow < nEndRow )
{
- rDoc.GetInputString( nStartCol, nStartRow+1, nStartTab, aEndStr);
+ aEndStr = rDoc.GetInputString( nStartCol, nStartRow+1, nStartTab );
if(!aEndStr.isEmpty())
{
- rDoc.GetValue( nStartCol, nStartRow+1, nStartTab, fInputEndVal);
+ fInputEndVal = rDoc.GetValue( nStartCol, nStartRow+1, nStartTab );
fIncVal=fInputEndVal-fStartVal;
}
}
@@ -673,10 +671,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
if(nStartCol < nEndCol)
{
- rDoc.GetInputString( nStartCol+1, nStartRow, nStartTab, aEndStr);
+ aEndStr = rDoc.GetInputString( nStartCol+1, nStartRow, nStartTab );
if(!aEndStr.isEmpty())
{
- rDoc.GetValue( nStartCol+1, nStartRow, nStartTab, fInputEndVal);
+ fInputEndVal = rDoc.GetValue( nStartCol+1, nStartRow, nStartTab );
fIncVal=fInputEndVal-fStartVal;
}
}
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index afba26065fa3..a4f9fc4738d8 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1121,14 +1121,14 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
{
ScDocument& rDoc = rViewData.GetDocument();
SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
- sal_uInt32 nCurrentNumberFormat;
bool bThousand(false);
bool bNegRed(false);
sal_uInt16 nPrecision(0);
sal_uInt16 nLeadZeroes(0);
LanguageType eLanguage = ScGlobal::eLnge;
- rDoc.GetNumberFormat(rViewData.GetCurX(), rViewData.GetCurY(), rViewData.GetTabNo(), nCurrentNumberFormat);
+ sal_uInt32 nCurrentNumberFormat = rDoc.GetNumberFormat(
+ rViewData.GetCurX(), rViewData.GetCurY(), rViewData.GetTabNo());
const SvNumberformat* pEntry = pFormatter->GetEntry(nCurrentNumberFormat);
if (pEntry)
@@ -1156,9 +1156,9 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
const SfxPoolItem* pItem;
ScDocument& rDoc = rViewData.GetDocument();
SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
- sal_uInt32 nCurrentNumberFormat;
- rDoc.GetNumberFormat(rViewData.GetCurX(), rViewData.GetCurY(), rViewData.GetTabNo(), nCurrentNumberFormat);
+ sal_uInt32 nCurrentNumberFormat = rDoc.GetNumberFormat(
+ rViewData.GetCurX(), rViewData.GetCurY(), rViewData.GetTabNo());
const SvNumberformat* pEntry = pFormatter->GetEntry(nCurrentNumberFormat);
if(!pEntry)
@@ -2872,9 +2872,8 @@ SvNumFormatType ScFormatShell::GetCurrentNumberFormatType()
}
else
{
- sal_uInt32 nNumFmt;
- rDoc.GetNumberFormat( rViewData.GetCurX(), rViewData.GetCurY(),
- rViewData.GetTabNo(), nNumFmt );
+ sal_uInt32 nNumFmt = rDoc.GetNumberFormat( rViewData.GetCurX(), rViewData.GetCurY(),
+ rViewData.GetTabNo());
nType = pFormatter->GetType( nNumFmt );
}
return nType;
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index 333c15197d91..a77ece6d81be 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -138,8 +138,7 @@ bool ScGridWindow::ShowNoteMarker( SCCOL nPosX, SCROW nPosY, bool bKeyboard )
{
aTrackText += aComStr + "\n( ";
}
- OUString aTmp;
- pFound->GetDescription(aTmp, rDoc);
+ OUString aTmp = pFound->GetDescription(rDoc);
aTrackText += aTmp;
if(!aComStr.isEmpty())
{
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index b3e9d76d0fca..6b4eec86584d 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -302,8 +302,7 @@ bool lcl_GetBoolValue(const ScPatternAttr& rPattern, sal_uInt16 nWhich, const Sf
static bool lcl_isNumberFormatText(const ScDocument* pDoc, SCCOL nCellX, SCROW nCellY, SCTAB nTab )
{
- sal_uInt32 nCurrentNumberFormat;
- pDoc->GetNumberFormat( nCellX, nCellY, nTab, nCurrentNumberFormat);
+ sal_uInt32 nCurrentNumberFormat = pDoc->GetNumberFormat( nCellX, nCellY, nTab );
SvNumberFormatter* pNumberFormatter = pDoc->GetFormatTable();
return pNumberFormatter->GetType( nCurrentNumberFormat ) == SvNumFormatType::TEXT;
}
@@ -518,8 +517,8 @@ bool ScDrawStringsVars::SetText( const ScRefCellValue& rCell )
const Color* pColor;
sal_uLong nFormat = nValueFormat;
- ScCellFormat::GetString( rCell,
- nFormat, aString, &pColor,
+ aString = ScCellFormat::GetString( rCell,
+ nFormat, &pColor,
*pOutput->mpDoc->GetFormatTable(),
*pOutput->mpDoc,
pOutput->mbShowNullValues,
@@ -2437,10 +2436,9 @@ bool ScOutputData::DrawEditParam::readCellContent(
{
sal_uInt32 nFormat = mpPattern->GetNumberFormat(
pDoc->GetFormatTable(), mpCondSet );
- OUString aString;
const Color* pColor;
- ScCellFormat::GetString( maCell,
- nFormat,aString, &pColor,
+ OUString aString = ScCellFormat::GetString( maCell,
+ nFormat, &pColor,
*pDoc->GetFormatTable(),
*pDoc,
bShowNullValues,
@@ -4771,10 +4769,9 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
{
sal_uInt32 nFormat = pPattern->GetNumberFormat(
mpDoc->GetFormatTable(), pCondSet );
- OUString aString;
const Color* pColor;
- ScCellFormat::GetString( aCell,
- nFormat,aString, &pColor,
+ OUString aString = ScCellFormat::GetString( aCell,
+ nFormat, &pColor,
*mpDoc->GetFormatTable(),
*mpDoc,
mbShowNullValues,
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index 39107879287c..07300272c39c 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -256,9 +256,8 @@ void ScConversionEngineBase::FillFromCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
{
SvNumberFormatter* pFormatter = mrDoc.GetFormatTable();
sal_uInt32 nNumFmt = mrDoc.GetNumberFormat(aPos);
- OUString aText;
const Color* pColor;
- ScCellFormat::GetString(aCell, nNumFmt, aText, &pColor, *pFormatter, mrDoc);
+ OUString aText = ScCellFormat::GetString(aCell, nNumFmt, &pColor, *pFormatter, mrDoc);
SetTextCurrentDefaults(aText);
}
diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx
index fdad3b66af33..d8e48596f3f6 100644
--- a/sc/source/ui/view/tabvwsh.cxx
+++ b/sc/source/ui/view/tabvwsh.cxx
@@ -106,14 +106,13 @@ SFX_IMPL_NAMED_VIEWFACTORY( ScTabViewShell, "Default" )
OUString ScTabViewShell::GetFormula(const ScAddress& rAddress)
{
- OUString sFormula;
ScDocument& rDoc = GetViewData().GetDocument();
ScRefCellValue aCell(rDoc, rAddress);
if (!aCell.isEmpty() && aCell.meType == CELLTYPE_FORMULA)
{
- aCell.mpFormula->GetFormula( sFormula);
+ return aCell.mpFormula->GetFormula();
}
- return sFormula;
+ return OUString();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 31c087e00d41..414a293d854d 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -126,7 +126,7 @@ bool ScTabViewShell::GetFunction( OUString& rFuncStr, FormulaError nErrCode )
if ( eFunc != SUBTOTAL_FUNC_CNT && eFunc != SUBTOTAL_FUNC_CNT2 && eFunc != SUBTOTAL_FUNC_SELECTION_COUNT)
{
// number format from attributes or formula
- rDoc.GetNumberFormat( nPosX, nPosY, nTab, nNumFmt );
+ nNumFmt = rDoc.GetNumberFormat( nPosX, nPosY, nTab );
}
OUString aValStr;
@@ -695,7 +695,7 @@ void ScTabViewShell::UpdateInputHandler( bool bForce /* = sal_False */, bool bSt
if (rCell.meType == CELLTYPE_FORMULA)
{
if (!bHideFormula)
- rCell.mpFormula->GetFormula(aString);
+ aString = rCell.mpFormula->GetFormula();
}
else if (rCell.meType == CELLTYPE_EDIT)
{
@@ -706,7 +706,7 @@ void ScTabViewShell::UpdateInputHandler( bool bForce /* = sal_False */, bool bSt
SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
sal_uInt32 nNumFmt = rDoc.GetNumberFormat( aPos );
- ScCellFormat::GetInputString( rCell, nNumFmt, aString, *pFormatter, rDoc );
+ aString = ScCellFormat::GetInputString( rCell, nNumFmt, *pFormatter, rDoc );
if (rCell.meType == CELLTYPE_STRING)
{
// Put a ' in front if necessary, so that the string is not
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index d4675b98c4c5..f5c79f583efb 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1491,7 +1491,7 @@ void ScViewFunc::CopyAutoSpellData( FillDir eDir, SCCOL nStartCol, SCROW nStartR
case FILL_TO_BOTTOM:
for ( SCCOL nColItr = nStartCol; nColItr <= nEndCol; ++nColItr )
{
- pDoc->GetCellType(nColItr, nStartRow, nTab, eCellType); // We need this optimization only for EditTextObject source cells
+ eCellType = pDoc->GetCellType(nColItr, nStartRow, nTab); // We need this optimization only for EditTextObject source cells
if (eCellType != CELLTYPE_EDIT)
continue;
@@ -1505,7 +1505,7 @@ void ScViewFunc::CopyAutoSpellData( FillDir eDir, SCCOL nStartCol, SCROW nStartR
case FILL_TO_TOP:
for ( SCCOL nColItr = nStartCol; nColItr <= nEndCol; ++nColItr )
{
- pDoc->GetCellType(nColItr, nEndRow, nTab, eCellType); // We need this optimization only for EditTextObject source cells
+ eCellType = pDoc->GetCellType(nColItr, nEndRow, nTab); // We need this optimization only for EditTextObject source cells
if (eCellType != CELLTYPE_EDIT)
continue;
@@ -1519,7 +1519,7 @@ void ScViewFunc::CopyAutoSpellData( FillDir eDir, SCCOL nStartCol, SCROW nStartR
case FILL_TO_RIGHT:
for ( SCROW nRowItr = nStartRow; nRowItr <= nEndRow; ++nRowItr )
{
- pDoc->GetCellType(nStartCol, nRowItr, nTab, eCellType); // We need this optimization only for EditTextObject source cells
+ eCellType = pDoc->GetCellType(nStartCol, nRowItr, nTab); // We need this optimization only for EditTextObject source cells
if (eCellType != CELLTYPE_EDIT)
continue;
@@ -1533,7 +1533,7 @@ void ScViewFunc::CopyAutoSpellData( FillDir eDir, SCCOL nStartCol, SCROW nStartR
case FILL_TO_LEFT:
for ( SCROW nRowItr = nStartRow; nRowItr <= nEndRow; ++nRowItr )
{
- pDoc->GetCellType(nEndCol, nRowItr, nTab, eCellType); // We need this optimization only for EditTextObject source cells
+ eCellType = pDoc->GetCellType(nEndCol, nRowItr, nTab); // We need this optimization only for EditTextObject source cells
if (eCellType != CELLTYPE_EDIT)
continue;
@@ -1559,7 +1559,7 @@ void ScViewFunc::CopyAutoSpellData( FillDir eDir, SCCOL nStartCol, SCROW nStartR
{
for ( SCCOL nColIdx = 0; nColIdx < nColRepeatSize; ++nColIdx )
{
- pDoc->GetCellType(nStartCol + nColIdx, nStartRow + nRowIdx, nTab, eCellType); // We need this optimization only for EditTextObject source cells
+ eCellType = pDoc->GetCellType(nStartCol + nColIdx, nStartRow + nRowIdx, nTab); // We need this optimization only for EditTextObject source cells
if (eCellType != CELLTYPE_EDIT)
continue;
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 14d4fc8d43aa..c4fbf527dbca 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -250,8 +250,7 @@ void ScViewFunc::DoRefConversion()
if (eMatrixMode == ScMatrixMode::Reference)
continue;
- OUString aOld;
- pCell->GetFormula(aOld);
+ OUString aOld = pCell->GetFormula();
sal_Int32 nLen = aOld.getLength();
if (eMatrixMode == ScMatrixMode::Formula)
{
@@ -722,8 +721,7 @@ void ScViewFunc::InsertBookmark( const OUString& rDescription, const OUString& r
aEngine.SetText(*pOld);
else
{
- OUString aOld;
- rDoc.GetInputString(nPosX, nPosY, nTab, aOld);
+ OUString aOld = rDoc.GetInputString(nPosX, nPosY, nTab);
if (!aOld.isEmpty())
aEngine.SetText(aOld);
}
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 4c1f8fb78313..fffb90e643c0 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -389,8 +389,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
// is non-empty and not a number, handle as formula
if ( aString.getLength() > 1 )
{
- sal_uInt32 nFormat = 0;
- rDoc.GetNumberFormat( nCol, nRow, nTab, nFormat );
+ sal_uInt32 nFormat = rDoc.GetNumberFormat( nCol, nRow, nTab );
SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
double fNumber = 0;
if ( !pFormatter->IsNumberFormat( aString, nFormat, fNumber ) )
@@ -2618,11 +2617,9 @@ void ScViewFunc::SetNumberFormat( SvNumFormatType nFormatType, sal_uLong nAdd )
// always take language from cursor position, even if there is a selection
- sal_uInt32 nCurrentNumberFormat;
- rDoc.GetNumberFormat( rViewData.GetCurX(),
- rViewData.GetCurY(),
- rViewData.GetTabNo(),
- nCurrentNumberFormat );
+ sal_uInt32 nCurrentNumberFormat = rDoc.GetNumberFormat( rViewData.GetCurX(),
+ rViewData.GetCurY(),
+ rViewData.GetTabNo());
const SvNumberformat* pEntry = pNumberFormatter->GetEntry( nCurrentNumberFormat );
if (pEntry)
eLanguage = pEntry->GetLanguage(); // else keep ScGlobal::eLnge
@@ -2651,9 +2648,8 @@ void ScViewFunc::SetNumFmtByStr( const OUString& rCode )
// language always from cursor position
- sal_uInt32 nCurrentNumberFormat;
- rDoc.GetNumberFormat( rViewData.GetCurX(), rViewData.GetCurY(),
- rViewData.GetTabNo(), nCurrentNumberFormat );
+ sal_uInt32 nCurrentNumberFormat = rDoc.GetNumberFormat( rViewData.GetCurX(), rViewData.GetCurY(),
+ rViewData.GetTabNo());
const SvNumberformat* pEntry = pFormatter->GetEntry( nCurrentNumberFormat );
LanguageType eLanguage = pEntry ? pEntry->GetLanguage() : ScGlobal::eLnge;
@@ -2700,8 +2696,7 @@ void ScViewFunc::ChangeNumFmtDecimals( bool bIncrement )
SCROW nRow = GetViewData().GetCurY();
SCTAB nTab = GetViewData().GetTabNo();
- sal_uInt32 nOldFormat;
- rDoc.GetNumberFormat( nCol, nRow, nTab, nOldFormat );
+ sal_uInt32 nOldFormat = rDoc.GetNumberFormat( nCol, nRow, nTab );
const SvNumberformat* pOldEntry = pFormatter->GetEntry( nOldFormat );
if (!pOldEntry)
{
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index cb4d8190ef7e..2d6751c0606e 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -149,8 +149,7 @@ bool ScViewUtil::IsActionShown( const ScChangeAction& rAction,
if ( rSettings.HasComment() )
{
- OUString aTmp;
- rAction.GetDescription(aTmp, rDocument);
+ OUString aTmp = rAction.GetDescription(rDocument);
OUString aComStr = rAction.GetComment() + " (" + aTmp + ")";
if(!rSettings.IsValidComment(&aComStr))