summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-01-30 01:19:15 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-01-30 01:20:34 -0500
commit8a39c27633e75819e219bc5d179375fb4308a3ca (patch)
treeaf686f911cb9bf2637c7d969f942828323d67032 /sc
parentef6761fd95b52fc5f444dd076478300fa448ee0d (diff)
Let's stick with just one variant of ScDocument::GetString()...
Instead of having 3 of them. Change-Id: I2de9b63c33b7362162a56ea391f8b68a468163fa
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/document.hxx4
-rw-r--r--sc/qa/unit/filters-test.cxx5
-rw-r--r--sc/qa/unit/helper/csv_handler.hxx5
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx5
-rw-r--r--sc/qa/unit/ucalc.cxx55
-rw-r--r--sc/source/core/data/documen3.cxx2
-rw-r--r--sc/source/core/data/document.cxx20
-rw-r--r--sc/source/core/data/dptabres.cxx8
-rw-r--r--sc/source/core/tool/chartarr.cxx13
-rw-r--r--sc/source/core/tool/compiler.cxx3
-rw-r--r--sc/source/core/tool/consoli.cxx11
-rw-r--r--sc/source/filter/excel/xepivot.cxx5
-rw-r--r--sc/source/filter/excel/xicontent.cxx5
-rw-r--r--sc/source/filter/excel/xipivot.cxx3
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx2
-rw-r--r--sc/source/ui/app/transobj.cxx3
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx4
-rw-r--r--sc/source/ui/dbgui/tpsubt.cxx2
-rw-r--r--sc/source/ui/docshell/docfunc.cxx3
-rw-r--r--sc/source/ui/docshell/docsh8.cxx6
-rw-r--r--sc/source/ui/docshell/impex.cxx8
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx8
-rw-r--r--sc/source/ui/miscdlgs/datafdlg.cxx24
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx6
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx4
-rw-r--r--sc/source/ui/undo/undodat.cxx4
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx6
-rw-r--r--sc/source/ui/view/cellsh.cxx3
-rw-r--r--sc/source/ui/view/dbfunc3.cxx3
-rw-r--r--sc/source/ui/view/gridwin.cxx6
-rw-r--r--sc/source/ui/view/gridwin4.cxx3
-rw-r--r--sc/source/ui/view/spelleng.cxx29
-rw-r--r--sc/source/ui/view/viewfun4.cxx2
36 files changed, 111 insertions, 165 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 845672397e10..c3dd9900e333 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -762,9 +762,7 @@ public:
SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark);
- SC_DLLPUBLIC void GetString( SCCOL nCol, SCROW nRow, SCTAB nTab, String& rString );
- SC_DLLPUBLIC void GetString( SCCOL nCol, SCROW nRow, SCTAB nTab, rtl::OUString& rString );
- SC_DLLPUBLIC rtl::OUString GetString( SCCOL nCol, SCROW nRow, SCTAB nTab) { rtl::OUString aString; GetString(nCol, nRow, nTab, aString); return aString;}
+ SC_DLLPUBLIC OUString GetString( SCCOL nCol, SCROW nRow, SCTAB nTab );
SC_DLLPUBLIC void GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, String& rString );
SC_DLLPUBLIC void GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, rtl::OUString& rString );
sal_uInt16 GetStringForFormula( const ScAddress& rPos, rtl::OUString& rString );
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 755be75ef495..980bff211d7e 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -346,12 +346,11 @@ void testContentImpl(ScDocument* pDoc, sal_Int32 nFormat ) //same code for ods,
CPPUNIT_ASSERT_MESSAGE("value not imported correctly", fValue == 1);
pDoc->GetValue(0,1,0,fValue);
CPPUNIT_ASSERT_MESSAGE("value not imported correctly", fValue == 2);
- rtl::OUString aString;
- pDoc->GetString(1,0,0,aString);
+ OUString aString = pDoc->GetString(1, 0, 0);
//check string import
CPPUNIT_ASSERT_MESSAGE("string imported not correctly", aString == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("String1")));
- pDoc->GetString(1,1,0,aString);
+ aString = pDoc->GetString(1, 1, 0);
CPPUNIT_ASSERT_MESSAGE("string not imported correctly", aString == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("String2")));
//check basic formula import
diff --git a/sc/qa/unit/helper/csv_handler.hxx b/sc/qa/unit/helper/csv_handler.hxx
index b621baaf3140..7fe94ffcb8d1 100644
--- a/sc/qa/unit/helper/csv_handler.hxx
+++ b/sc/qa/unit/helper/csv_handler.hxx
@@ -132,8 +132,7 @@ public:
else if (meStringType == PureString)
{
rtl::OUString aCSVString(p, n, RTL_TEXTENCODING_UTF8);
- rtl::OUString aString;
- mpDoc->GetString(mnCol, mnRow, mnTab, aString);
+ rtl::OUString aString = mpDoc->GetString(mnCol, mnRow, mnTab);
#if DEBUG_CSV_HANDLER
std::cout << "String: " << rtl::OUStringToOString(aString, RTL_TEXTENCODING_UTF8).getStr() << std::endl;
@@ -154,7 +153,7 @@ public:
switch (meStringType)
{
case StringValue:
- mpDoc->GetString(mnCol, mnRow, mnTab, aString);
+ aString = mpDoc->GetString(mnCol, mnRow, mnTab);
break;
case FormulaValue:
mpDoc->GetFormula(mnCol, mnRow, mnTab, aString);
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index ca1d4e4414e5..1e823b168f68 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -656,12 +656,11 @@ void testFormats_Impl(ScFiltersTest* pFiltersTest, ScDocument* pDoc, sal_Int32 n
CPPUNIT_ASSERT_EQUAL( static_cast<sal_uInt16>(1280), pDoc->GetColWidth(5,1) ); //0.889in
CPPUNIT_ASSERT_EQUAL( static_cast<sal_uInt16>(4153), pDoc->GetColWidth(6,1) ); //2.8839in
//test case for i53253 where a cell has text with different styles and space between the text.
- rtl::OUString aTestStr;
- pDoc->GetString(3,0,1, aTestStr);
+ OUString aTestStr = pDoc->GetString(3,0,1);
rtl::OUString aKnownGoodStr("text14 space");
CPPUNIT_ASSERT_EQUAL( aKnownGoodStr, aTestStr );
//test case for cell text with line breaks.
- pDoc->GetString(3,5,1, aTestStr);
+ aTestStr = pDoc->GetString(3,5,1);
aKnownGoodStr = "Hello,\nCalc!";
CPPUNIT_ASSERT_EQUAL( aKnownGoodStr, aTestStr );
}
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index c6778a476219..5558ead68b1a 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -347,8 +347,7 @@ void printRange(ScDocument* pDoc, const ScRange& rRange, const char* pCaption)
{
for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
{
- rtl::OUString aVal;
- pDoc->GetString(nCol, nRow, rRange.aStart.Tab(), aVal);
+ rtl::OUString aVal = pDoc->GetString(nCol, nRow, rRange.aStart.Tab());
printer.set(nRow-nRow1, nCol-nCol1, aVal);
}
}
@@ -475,11 +474,11 @@ void Test::testInput()
OUString test;
m_pDoc->SetString(0, 0, 0, numstr);
- m_pDoc->GetString(0, 0, 0, test);
+ test = m_pDoc->GetString(0, 0, 0);
bool bTest = test == "10.5";
CPPUNIT_ASSERT_MESSAGE("String number should have the first apostrophe stripped.", bTest);
m_pDoc->SetString(0, 0, 0, str);
- m_pDoc->GetString(0, 0, 0, test);
+ test = m_pDoc->GetString(0, 0, 0);
bTest = test == "'apple'";
CPPUNIT_ASSERT_MESSAGE("Text content should have retained the first apostrophe.", bTest);
@@ -489,7 +488,7 @@ void Test::testInput()
aParam.meSetTextNumFormat = ScSetStringParam::Always;
aParam.mbHandleApostrophe = false;
m_pDoc->SetString(0, 0, 0, "000123", &aParam);
- m_pDoc->GetString(0, 0, 0, test);
+ test = m_pDoc->GetString(0, 0, 0);
CPPUNIT_ASSERT_MESSAGE("Text content should have been treated as string, not number.", test == "000123");
m_pDoc->DeleteTab(0);
@@ -744,9 +743,8 @@ void testFuncIFERROR(ScDocument* pDoc)
for (SCROW i = 0; i < nRows; ++i)
{
- rtl::OUString aResult;
SCROW nRow = 20 + i;
- pDoc->GetString(0, nRow, 0, aResult);
+ OUString aResult = pDoc->GetString(0, nRow, 0);
CPPUNIT_ASSERT_EQUAL_MESSAGE(
aChecks[i].pFormula, OUString::createFromAscii( aChecks[i].pResult), aResult);
}
@@ -827,8 +825,7 @@ void testFuncVLOOKUP(ScDocument* pDoc)
// Skip the header row.
continue;
- rtl::OUString aRes;
- pDoc->GetString(4, i, 0, aRes);
+ OUString aRes = pDoc->GetString(4, i, 0);
bool bGood = aRes.equalsAscii(aChecks[i].pRes);
if (!bGood)
{
@@ -878,8 +875,7 @@ void runTestMATCH(ScDocument* pDoc, const char* aData[_DataSize], StrStrCheck aC
// verify the results.
for (size_t i = 0; i < _FormulaSize; ++i)
{
- rtl::OUString aStr;
- pDoc->GetString(2, i, 0, aStr);
+ OUString aStr = pDoc->GetString(2, i, 0);
if (!aStr.equalsAscii(aChecks[i].pRes))
{
cerr << "row " << (i+1) << ": expected='" << aChecks[i].pRes << "' actual='" << aStr << "'"
@@ -1761,8 +1757,7 @@ bool checkDPTableOutput(ScDocument* pDoc, const ScRange& aOutRange, const char*
{
for (SCCOL nCol = 0; nCol < nOutColSize; ++nCol)
{
- OUString aVal;
- pDoc->GetString(nCol + s.Col(), nRow + s.Row(), s.Tab(), aVal);
+ OUString aVal = pDoc->GetString(nCol + s.Col(), nRow + s.Row(), s.Tab());
printer.set(nRow, nCol, aVal);
const char* p = aOutputCheck[nRow][nCol];
if (p)
@@ -3960,10 +3955,9 @@ void Test::testExternalRef()
// Test external refernces on the main document while the external
// document is still in memory.
- OUString test;
m_pDoc->InsertTab(0, OUString("Test Sheet"));
m_pDoc->SetString(0, 0, 0, OUString("='file:///extdata.fake'#Data1.A1"));
- m_pDoc->GetString(0, 0, 0, test);
+ OUString test = m_pDoc->GetString(0, 0, 0);
CPPUNIT_ASSERT_MESSAGE("Value is different from the original", test.equals(name));
// After the initial access to the external document, the external ref
@@ -3980,7 +3974,7 @@ void Test::testExternalRef()
CPPUNIT_ASSERT_MESSAGE("Unexpected sheet name.", aTabNames[2].equals(aExtSh3Name));
m_pDoc->SetString(1, 0, 0, OUString("='file:///extdata.fake'#Data1.B1"));
- m_pDoc->GetString(1, 0, 0, test);
+ test = m_pDoc->GetString(1, 0, 0);
CPPUNIT_ASSERT_MESSAGE("Value is different from the original", test.equals(value));
m_pDoc->SetString(0, 1, 0, OUString("='file:///extdata.fake'#Data1.A2"));
@@ -3994,7 +3988,7 @@ void Test::testExternalRef()
const char* pChecks[] = { "Andy", "Bruce", "Charlie", "David", "0" };
for (size_t i = 0; i < SAL_N_ELEMENTS(pChecks); ++i)
{
- m_pDoc->GetString(0, static_cast<SCROW>(i+1), 0, test);
+ test = m_pDoc->GetString(0, static_cast<SCROW>(i+1), 0);
CPPUNIT_ASSERT_MESSAGE("Unexpected cell value.", test.equalsAscii(pChecks[i]));
}
}
@@ -4020,7 +4014,7 @@ void Test::testExternalRef()
const char* pChecks[] = { "Name", "Edward", "Frank", "George" };
for (size_t i = 0; i < SAL_N_ELEMENTS(pChecks); ++i)
{
- m_pDoc->GetString(2, static_cast<SCROW>(i), 0, test);
+ test = m_pDoc->GetString(2, static_cast<SCROW>(i), 0);
CPPUNIT_ASSERT_MESSAGE("Unexpected cell value.", test.equalsAscii(pChecks[i]));
}
}
@@ -4033,7 +4027,7 @@ void Test::testExternalRef()
const char* pChecks[] = { "Value", "99", "98", "97" };
for (size_t i = 0; i < SAL_N_ELEMENTS(pChecks); ++i)
{
- m_pDoc->GetString(3, static_cast<SCROW>(i), 0, test);
+ test = m_pDoc->GetString(3, static_cast<SCROW>(i), 0);
CPPUNIT_ASSERT_MESSAGE("Unexpected cell value.", test.equalsAscii(pChecks[i]));
}
}
@@ -4202,9 +4196,9 @@ void Test::testStreamValid()
// Put values into Sheet1.
m_pDoc->SetString(0, 0, 0, a1);
m_pDoc->SetString(0, 1, 0, a2);
- m_pDoc->GetString(0, 0, 0, test);
+ test = m_pDoc->GetString(0, 0, 0);
CPPUNIT_ASSERT_MESSAGE("Unexpected value in Sheet1.A1", test.equals(a1));
- m_pDoc->GetString(0, 1, 0, test);
+ test = m_pDoc->GetString(0, 1, 0);
CPPUNIT_ASSERT_MESSAGE("Unexpected value in Sheet1.A2", test.equals(a2));
// Put formulas into Sheet2 to Sheet4 to reference values from Sheet1.
@@ -4213,13 +4207,13 @@ void Test::testStreamValid()
m_pDoc->SetString(0, 0, 2, OUString("=Sheet1.A1"));
m_pDoc->SetString(0, 0, 3, OUString("=Sheet1.A2"));
- m_pDoc->GetString(0, 0, 1, test);
+ test = m_pDoc->GetString(0, 0, 1);
CPPUNIT_ASSERT_MESSAGE("Unexpected value in Sheet2.A1", test.equals(a1));
- m_pDoc->GetString(0, 1, 1, test);
+ test = m_pDoc->GetString(0, 1, 1);
CPPUNIT_ASSERT_MESSAGE("Unexpected value in Sheet2.A2", test.equals(a2));
- m_pDoc->GetString(0, 0, 2, test);
+ test = m_pDoc->GetString(0, 0, 2);
CPPUNIT_ASSERT_MESSAGE("Unexpected value in Sheet3.A1", test.equals(a1));
- m_pDoc->GetString(0, 0, 3, test);
+ test = m_pDoc->GetString(0, 0, 3);
CPPUNIT_ASSERT_MESSAGE("Unexpected value in Sheet3.A1", test.equals(a2));
// Set all sheet streams valid after all the initial cell values are in
@@ -4237,9 +4231,9 @@ void Test::testStreamValid()
// Now, insert a new row at row 2 position on Sheet1. This will move cell
// A2 downward but cell A1 remains unmoved.
m_pDoc->InsertRow(0, 0, MAXCOL, 0, 1, 2);
- m_pDoc->GetString(0, 0, 0, test);
+ test = m_pDoc->GetString(0, 0, 0);
CPPUNIT_ASSERT_MESSAGE("Cell A1 should not have moved.", test.equals(a1));
- m_pDoc->GetString(0, 3, 0, test);
+ test = m_pDoc->GetString(0, 3, 0);
CPPUNIT_ASSERT_MESSAGE("the old cell A2 should now be at A4.", test.equals(a2));
const ScBaseCell* pCell = m_pDoc->GetCell(ScAddress(0, 1, 0));
CPPUNIT_ASSERT_MESSAGE("Cell A2 should be empty.", pCell == NULL);
@@ -5119,13 +5113,13 @@ void Test::testCopyPaste()
pUndo->Undo();
m_pDoc->GetValue(1,1,1, aValue);
ASSERT_DOUBLES_EQUAL_MESSAGE("after undo formula should return nothing", aValue, 0);
- m_pDoc->GetString(2,1,1, aString);
+ aString = m_pDoc->GetString(2, 1, 1);
CPPUNIT_ASSERT_MESSAGE("after undo string should be removed", aString.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("")));
pUndo->Redo();
m_pDoc->GetValue(1,1,1, aValue);
ASSERT_DOUBLES_EQUAL_MESSAGE("formula should return 2 after redo", aValue, 2);
- m_pDoc->GetString(2,1,1, aString);
+ aString = m_pDoc->GetString(2, 1, 1);
CPPUNIT_ASSERT_MESSAGE("Cell Sheet2.C2 should contain: test", aString.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("test")));
m_pDoc->GetFormula(1,1,1, aString);
CPPUNIT_ASSERT_MESSAGE("Formula should be correct again", aString == aFormulaString);
@@ -5745,8 +5739,7 @@ void Test::testSortWithFormulaRefs()
nEnd = SAL_N_ELEMENTS( aResults );
for ( SCROW i = nStart; i < nEnd; ++i )
{
- rtl::OUString sResult;
- pDoc->GetString( 0, i + 1, 0, sResult );
+ OUString sResult = pDoc->GetString( 0, i + 1, 0);
CPPUNIT_ASSERT_EQUAL( rtl::OUString::createFromAscii( aResults[ i ] ), sResult );
}
pDoc->DeleteTab(0);
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 3e6484710d06..dfe5fe826ab9 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -1940,7 +1940,7 @@ void ScDocument::DoMergeContents( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
for (nRow=nStartRow; nRow<=nEndRow; nRow++)
for (nCol=nStartCol; nCol<=nEndCol; nCol++)
{
- GetString(nCol,nRow,nTab,aCellStr);
+ aCellStr = GetString(nCol, nRow, nTab);
if (!aCellStr.isEmpty())
{
if (aTotal.getLength())
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 952b4012d9df..1b11231c0b43 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2948,20 +2948,16 @@ void ScDocument::SetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rVa
maTabs[nTab]->SetValue( nCol, nRow, rVal );
}
-
-void ScDocument::GetString( SCCOL nCol, SCROW nRow, SCTAB nTab, rtl::OUString& rString )
+OUString ScDocument::GetString( SCCOL nCol, SCROW nRow, SCTAB nTab )
{
- if ( VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
- maTabs[nTab]->GetString( nCol, nRow, rString );
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ {
+ OUString aStr;
+ maTabs[nTab]->GetString(nCol, nRow, aStr);
+ return aStr;
+ }
else
- rString = rtl::OUString();
-}
-
-void ScDocument::GetString( SCCOL nCol, SCROW nRow, SCTAB nTab, String& rString )
-{
- rtl::OUString aString;
- GetString( nCol, nRow, nTab, aString);
- rString = aString;
+ return EMPTY_OUSTRING;
}
void ScDocument::GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, rtl::OUString& rString )
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index fc096a8c6fa3..e5e3e9293a8c 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -258,13 +258,13 @@ static void lcl_Indent( ScDocument* pDoc, SCROW nStartRow, const ScAddress& rPos
SCCOL nCol = rPos.Col();
SCTAB nTab = rPos.Tab();
- String aString;
+ OUString aString;
for (SCROW nRow = nStartRow; nRow < rPos.Row(); nRow++)
{
- pDoc->GetString( nCol, nRow, nTab, aString );
- if ( aString.Len() )
+ aString = pDoc->GetString(nCol, nRow, nTab);
+ if (!aString.isEmpty())
{
- aString.InsertAscii( " ", 0 );
+ aString = " " + aString;
pDoc->SetString( nCol, nRow, nTab, aString );
}
}
diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx
index 677319b2f7aa..cd49af3cd75b 100644
--- a/sc/source/core/tool/chartarr.cxx
+++ b/sc/source/core/tool/chartarr.cxx
@@ -271,7 +271,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle()
{
OUString aString, aColStr;
if (HasColHeaders())
- pDocument->GetString( aCols[nCol], nStrRow, nTab1, aString );
+ aString = pDocument->GetString(aCols[nCol], nStrRow, nTab1);
if (aString.isEmpty())
{
OUStringBuffer aBuf;
@@ -297,7 +297,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle()
if (HasRowHeaders())
{
ScAddress aAddr( nStrCol, aRows[nRow], nTab1 );
- pDocument->GetString( nStrCol, aRows[nRow], nTab1, aString );
+ aString = pDocument->GetString(nStrCol, aRows[nRow], nTab1);
}
if (aString.isEmpty())
{
@@ -430,8 +430,7 @@ ScMemChart* ScChartArray::CreateMemChartMulti()
OUString aString, aColStr;
const ScAddress* pPos = GetPositionMap()->GetColHeaderPosition( static_cast<SCCOL>(nCol) );
if ( HasColHeaders() && pPos )
- pDocument->GetString(
- pPos->Col(), pPos->Row(), pPos->Tab(), aString );
+ aString = pDocument->GetString(pPos->Col(), pPos->Row(), pPos->Tab());
if (aString.isEmpty())
{
@@ -459,10 +458,8 @@ ScMemChart* ScChartArray::CreateMemChartMulti()
OUString aString;
const ScAddress* pPos = GetPositionMap()->GetRowHeaderPosition( nRow );
if ( HasRowHeaders() && pPos )
- {
- pDocument->GetString(
- pPos->Col(), pPos->Row(), pPos->Tab(), aString );
- }
+ aString = pDocument->GetString(pPos->Col(), pPos->Row(), pPos->Tab());
+
if (aString.isEmpty())
{
OUStringBuffer aBuf(ScGlobal::GetRscString(STR_ROW));
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index ca441c253ffa..0da95b49451d 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -5156,8 +5156,7 @@ void ScCompiler::CreateStringFromSingleRef(rtl::OUStringBuffer& rBuffer,FormulaT
rRef.CalcAbsIfRel( aPos );
if ( pDoc->HasStringData( rRef.nCol, rRef.nRow, rRef.nTab ) )
{
- String aStr;
- pDoc->GetString( rRef.nCol, rRef.nRow, rRef.nTab, aStr );
+ String aStr = pDoc->GetString(rRef.nCol, rRef.nRow, rRef.nTab);
EnQuote( aStr );
rBuffer.append(aStr);
}
diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx
index e0dc07499947..56cd5a723ec4 100644
--- a/sc/source/core/tool/consoli.cxx
+++ b/sc/source/core/tool/consoli.cxx
@@ -263,7 +263,7 @@ void ScConsData::AddFields( ScDocument* pSrcDoc, SCTAB nTab,
{
for (SCCOL nCol=nStartCol; nCol<=nCol2; nCol++)
{
- pSrcDoc->GetString( nCol, nRow1, nTab, aTitle );
+ aTitle = pSrcDoc->GetString(nCol, nRow1, nTab);
if (aTitle.Len())
{
sal_Bool bFound = false;
@@ -280,7 +280,7 @@ void ScConsData::AddFields( ScDocument* pSrcDoc, SCTAB nTab,
{
for (SCROW nRow=nStartRow; nRow<=nRow2; nRow++)
{
- pSrcDoc->GetString( nCol1, nRow, nTab, aTitle );
+ aTitle = pSrcDoc->GetString(nCol1, nRow, nTab);
if (aTitle.Len())
{
sal_Bool bFound = false;
@@ -507,8 +507,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
if ( bColByName && bRowByName )
{
- String aThisCorner;
- pSrcDoc->GetString(nCol1,nRow1,nTab,aThisCorner);
+ String aThisCorner = pSrcDoc->GetString(nCol1, nRow1, nTab);
if (bCornerUsed)
{
if (aCornerText != aThisCorner)
@@ -535,7 +534,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
pDestCols = new SCCOL[nCol2-nStartCol+1];
for (nCol=nStartCol; nCol<=nCol2; nCol++)
{
- pSrcDoc->GetString(nCol,nRow1,nTab,aTitle);
+ aTitle = pSrcDoc->GetString(nCol, nRow1, nTab);
SCCOL nPos = SC_CONS_NOTFOUND;
if (aTitle.Len())
{
@@ -556,7 +555,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
pDestRows = new SCROW[nRow2-nStartRow+1];
for (nRow=nStartRow; nRow<=nRow2; nRow++)
{
- pSrcDoc->GetString(nCol1,nRow,nTab,aTitle);
+ aTitle = pSrcDoc->GetString(nCol1, nRow, nTab);
SCROW nPos = SC_CONS_NOTFOUND;
if (aTitle.Len())
{
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 7db32451f825..3dc461373b1c 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -346,7 +346,7 @@ void XclExpPCField::InitStandardField( const ScRange& rRange )
// field name is in top cell of the range
ScAddress aPos( rRange.aStart );
- rDoc.GetString( aPos.Col(), aPos.Row(), aPos.Tab(), maFieldInfo.maName );
+ maFieldInfo.maName = rDoc.GetString(aPos.Col(), aPos.Row(), aPos.Tab());
// #i76047# maximum field name length in pivot cache is 255
if (maFieldInfo.maName.getLength() > EXC_PC_MAXSTRLEN)
maFieldInfo.maName = maFieldInfo.maName.copy(0, EXC_PC_MAXSTRLEN);
@@ -367,8 +367,7 @@ void XclExpPCField::InitStandardField( const ScRange& rRange )
}
else
{
- String aText;
- rDoc.GetString( aPos.Col(), aPos.Row(), aPos.Tab(), aText );
+ OUString aText = rDoc.GetString(aPos.Col(), aPos.Row(), aPos.Tab());
InsertOrigTextItem( aText );
}
}
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index 2a7b5ff43e7c..b4606ab51714 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -170,9 +170,8 @@ void lclInsertUrl( const XclImpRoot& rRoot, const String& rUrl, SCCOL nScCol, SC
case CELLTYPE_STRING:
case CELLTYPE_EDIT:
{
- String aDisplText;
- rDoc.GetString( nScCol, nScRow, nScTab, aDisplText );
- if( !aDisplText.Len() )
+ OUString aDisplText = rDoc.GetString(nScCol, nScRow, nScTab);
+ if (aDisplText.isEmpty())
aDisplText = rUrl;
ScEditEngineDefaulter& rEE = rRoot.GetEditEngine();
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index 7d0642614b80..73dc396246b6 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -1479,8 +1479,7 @@ void XclImpPivotTable::ApplyMergeFlags(const ScRange& rOutRange, const ScDPSaveD
rDoc.ApplyFlagsTab(itr->Col(), itr->Row(), itr->Col(), itr->Row(), itr->Tab(), SC_MF_BUTTON);
sal_uInt16 nMFlag = SC_MF_BUTTON_POPUP;
- rtl::OUString aName;
- rDoc.GetString(itr->Col(), itr->Row(), itr->Tab(), aName);
+ rtl::OUString aName = rDoc.GetString(itr->Col(), itr->Row(), itr->Tab());
if (rSaveData.HasInvisibleMember(aName))
nMFlag |= SC_MF_HIDDEN_MEMBER;
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index a7a042ebe03b..1fdfc2ad329d 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -1253,7 +1253,7 @@ ExcEScenario::ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab )
sal_True );
}
else
- rDoc.GetString( nCol, nRow, nTab, sText );
+ sText = rDoc.GetString(nCol, nRow, nTab);
bContLoop = Append( static_cast<sal_uInt16>(nCol),
static_cast<sal_uInt16>(nRow), sText );
}
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 85cd5bdbaba1..493a2054b87b 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -768,7 +768,7 @@ void ScAccessibleCellTextData::GetCellText(const ScAddress& rCellPos, String& rT
if (pDoc)
{
// #104893#; use the displayed string
- pDoc->GetString(rCellPos.Col(), rCellPos.Row(), rCellPos.Tab(), rText);
+ rText = pDoc->GetString(rCellPos.Col(), rCellPos.Row(), rCellPos.Tab());
if (mpViewShell)
{
const ScViewOptions& aOptions = mpViewShell->GetViewData()->GetOptions();
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index e8a96c51cf74..103f64f8f281 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -276,8 +276,7 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor )
}
else
{
- String aText;
- pDoc->GetString( nCol, nRow, nTab, aText );
+ OUString aText = pDoc->GetString(nCol, nRow, nTab);
aEngine.SetText(aText);
}
}
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 45e59ac8aa43..e3ae181dab91 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -487,7 +487,7 @@ void ScFilterDlg::FillFieldLists()
for ( col=nFirstCol; col<=nMaxCol; col++ )
{
- pDoc->GetString( col, nFirstRow, nTab, aFieldName );
+ aFieldName = pDoc->GetString(col, nFirstRow, nTab);
if (!aBtnHeader.IsChecked() || aFieldName.isEmpty())
{
rtl::OUStringBuffer aBuf;
diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index d23140d22198..6d6b50fa50b6 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -291,7 +291,7 @@ void ScPivotFilterDlg::FillFieldLists()
for ( col=nFirstCol; col<=nMaxCol; col++ )
{
- pDoc->GetString( col, nFirstRow, nTab, aFieldName );
+ aFieldName = pDoc->GetString(col, nFirstRow, nTab);
if ( aFieldName.isEmpty() )
{
rtl::OUStringBuffer aBuf;
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index d458597a3013..5eec3921540e 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -369,7 +369,7 @@ void ScTabPageSortFields::FillFieldLists( sal_uInt16 nStartField )
for ( col=nFirstSortCol; col<=nMaxCol && i<SC_MAXFIELDS; col++ )
{
- pDoc->GetString( col, nFirstSortRow, nTab, aFieldName );
+ aFieldName = pDoc->GetString(col, nFirstSortRow, nTab);
if ( !bHasHeader || aFieldName.isEmpty() )
{
rtl::OUStringBuffer aBuf;
@@ -392,7 +392,7 @@ void ScTabPageSortFields::FillFieldLists( sal_uInt16 nStartField )
for ( row=nFirstSortRow; row<=nMaxRow && i<SC_MAXFIELDS; row++ )
{
- pDoc->GetString( nFirstSortCol, row, nTab, aFieldName );
+ aFieldName = pDoc->GetString(nFirstSortCol, row, nTab);
if ( !bHasHeader || aFieldName.isEmpty() )
{
rtl::OUStringBuffer aBuf;
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index 384970fec757..4bb4475f4fd0 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -275,7 +275,7 @@ void ScTpSubTotalGroup::FillListBoxes()
sal_uInt16 i=0;
for ( col=nFirstCol; col<=nMaxCol && i<SC_MAXFIELDS; col++ )
{
- pDoc->GetString( col, nFirstRow, nTab, aFieldName );
+ aFieldName = pDoc->GetString(col, nFirstRow, nTab);
if ( aFieldName.isEmpty() )
{
rtl::OUStringBuffer aBuf;
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 770180d4e7fa..4115377c0d48 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -4854,8 +4854,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList,
ScDocument* pDoc = rDocShell.GetDocument();
if (!pDoc->HasValueData( nPosX, nPosY, nTab ))
{
- String aName;
- pDoc->GetString( nPosX, nPosY, nTab, aName );
+ String aName = pDoc->GetString(nPosX, nPosY, nTab);
ScRangeData::MakeValidName(aName);
if (aName.Len())
{
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index 2bfbcb061fc6..188588176676 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -528,7 +528,7 @@ void lcl_GetColumnTypes(
// Typ etc.: L; D; C[,W]; N[,W[,P]]
if ( bHasFieldNames )
{
- pDoc->GetString( nCol, nFirstRow, nTab, aString );
+ aString = pDoc->GetString(nCol, nFirstRow, nTab);
aString.ToUpperAscii();
xub_StrLen nToken = comphelper::string::getTokenCount(aString, ',');
if ( nToken > 1 )
@@ -997,7 +997,7 @@ sal_uLong ScDocShell::DBaseExport( const rtl::OUString& rFullFileName, CharSet e
break;
case sdbc::DataType::VARCHAR:
- aDocument.GetString( nDocCol, nDocRow, nTab, aString );
+ aString = aDocument.GetString(nDocCol, nDocRow, nTab);
xRowUpdate->updateString( nCol+1, aString );
if ( nErr == eERR_OK && pColLengths[nCol] < aString.getLength() )
nErr = SCWARN_EXPORT_DATALOST;
@@ -1107,7 +1107,7 @@ sal_uLong ScDocShell::DBaseExport( const rtl::OUString& rFullFileName, CharSet e
break;
case sdbc::DataType::VARCHAR:
- aDocument.GetString( nDocCol, nDocRow, nTab, aString);
+ aString = aDocument.GetString(nDocCol, nDocRow, nTab);
break;
// NOTE: length of DECIMAL fields doesn't need to be
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 12d04a136699..686d0d2202e1 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1604,7 +1604,7 @@ bool ScImportExport::Doc2Text( SvStream& rStrm )
}
else
{
- pDoc->GetString( nCol, nRow, nStartTab, aCell );
+ aCell = pDoc->GetString(nCol, nRow, nStartTab);
bool bMultiLineText = ( aCell.Search( _LF ) != STRING_NOTFOUND );
if( bMultiLineText )
@@ -1627,7 +1627,7 @@ bool ScImportExport::Doc2Text( SvStream& rStrm )
break;
case CELLTYPE_VALUE:
{
- pDoc->GetString( nCol, nRow, nStartTab, aCell );
+ aCell = pDoc->GetString(nCol, nRow, nStartTab);
lcl_WriteSimpleString( rStrm, aCell );
}
break;
@@ -1636,7 +1636,7 @@ bool ScImportExport::Doc2Text( SvStream& rStrm )
break;
default:
{
- pDoc->GetString( nCol, nRow, nStartTab, aCell );
+ aCell = pDoc->GetString(nCol, nRow, nStartTab);
bool bMultiLineText = ( aCell.Search( _LF ) != STRING_NOTFOUND );
if( bMultiLineText )
@@ -1982,7 +1982,7 @@ bool ScImportExport::Doc2Sylk( SvStream& rStrm )
case CELLTYPE_STRING:
case CELLTYPE_EDIT:
hasstring:
- pDoc->GetString( nCol, nRow, aRange.aStart.Tab(), aCellStr );
+ aCellStr = pDoc->GetString(nCol, nRow, aRange.aStart.Tab());
aCellStr.SearchAndReplaceAll( rtl::OUString(_LF), rtl::OUString(SYLK_LF) );
aBufStr.AssignAscii(RTL_CONSTASCII_STRINGPARAM( "C;X" ));
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index f0ff15580490..d8c2a6b99dd4 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -526,12 +526,12 @@ void ScColRowNameRangesDlg::UpdateNames()
strShow.AssignAscii(RTL_CONSTASCII_STRINGPARAM(" ["));
if(pDoc!=NULL)
{
- pDoc->GetString(nCol1, nRow1, nTab1,rString);
+ rString = pDoc->GetString(nCol1, nRow1, nTab1);
strShow +=rString;
for(SCCOL i=nCol1+1;i<=q;i++)
{
strShow.AppendAscii(RTL_CONSTASCII_STRINGPARAM(", "));
- pDoc->GetString(i, nRow1, nTab1,rString);
+ rString = pDoc->GetString(i, nRow1, nTab1);
strShow += rString;
}
}
@@ -572,12 +572,12 @@ void ScColRowNameRangesDlg::UpdateNames()
strShow.AssignAscii(RTL_CONSTASCII_STRINGPARAM(" ["));
if(pDoc!=NULL)
{
- pDoc->GetString(nCol1, nRow1, nTab1,rString);
+ rString = pDoc->GetString(nCol1, nRow1, nTab1);
strShow += rString;
for(SCROW i=nRow1+1;i<=q;i++)
{
strShow.AppendAscii(RTL_CONSTASCII_STRINGPARAM(", "));
- pDoc->GetString(nCol1, i, nTab1,rString);
+ rString = pDoc->GetString(nCol1, i, nTab1);
strShow += rString;
}
}
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
index 36fe4096c95d..f9850c668c10 100644
--- a/sc/source/ui/miscdlgs/datafdlg.cxx
+++ b/sc/source/ui/miscdlgs/datafdlg.cxx
@@ -86,11 +86,10 @@ ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShellOri
//find last not blank cell in row
for (int i=1;i<=MAX_DATAFORM_COLS;i++)
{
- String aColName;
nEndCol++;
- pDoc->GetString( nEndCol, nStartRow, nTab, aColName );
+ OUString aColName = pDoc->GetString(nEndCol, nStartRow, nTab);
int nColWidth = pDoc->GetColWidth( nEndCol, nTab );
- if ( aColName.Len() == 0 && nColWidth)
+ if (aColName.isEmpty() && nColWidth)
{
nEndCol--;
break;
@@ -100,14 +99,13 @@ ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShellOri
//find first not blank cell in row
for (int i=1;i<=MAX_DATAFORM_COLS;i++)
{
- String aColName;
if (nStartCol <= 0)
break;
nStartCol--;
- pDoc->GetString( nStartCol, nStartRow, nTab, aColName );
+ OUString aColName = pDoc->GetString(nStartCol, nStartRow, nTab);
int nColWidth = pDoc->GetColWidth( nEndCol, nTab );
- if ( aColName.Len() == 0 && nColWidth)
+ if (aColName.isEmpty() && nColWidth)
{
nStartCol++;
break;
@@ -129,10 +127,9 @@ ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShellOri
//find last not blank cell in row
for (int i=1;i<=MAX_DATAFORM_ROWS;i++)
{
- String aColName;
nEndRow++;
- pDoc->GetString( nStartCol, nEndRow, nTab, aColName );
- if ( aColName.Len() == 0 )
+ OUString aColName = pDoc->GetString(nStartCol, nEndRow, nTab);
+ if (aColName.isEmpty())
{
nEndRow--;
break;
@@ -142,13 +139,12 @@ ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShellOri
//find first not blank cell in row
for (int i=1;i<=MAX_DATAFORM_ROWS;i++)
{
- String aColName;
if (nStartRow <= 0)
break;
nStartRow--;
- pDoc->GetString( nStartCol, nStartRow, nTab, aColName );
- if ( aColName.Len() == 0 )
+ OUString aColName = pDoc->GetString(nStartCol, nStartRow, nTab);
+ if (aColName.isEmpty())
{
nStartRow++;
break;
@@ -181,7 +177,7 @@ ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShellOri
for(sal_uInt16 nIndex = 0; nIndex < aColLength; nIndex++)
{
- pDoc->GetString( nIndex + nStartCol, nStartRow, nTab, aFieldName );
+ aFieldName = pDoc->GetString(nIndex + nStartCol, nStartRow, nTab);
int nColWidth = pDoc->GetColWidth( nIndex + nStartCol, nTab );
if (nColWidth)
{
@@ -253,7 +249,7 @@ void ScDataFormDlg::FillCtrls(SCROW /*nCurrentRow*/)
{
if (nCurrentRow<=nEndRow)
{
- pDoc->GetString( i + nStartCol, nCurrentRow, nTab, aFieldName );
+ aFieldName = pDoc->GetString(i + nStartCol, nCurrentRow, nTab);
maEdits[i].SetText(aFieldName);
}
else
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index 06f540b1e0ea..8bcea3d805d4 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -1026,8 +1026,10 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal
//! else error?
// take formatted result from document (result value from component is ignored)
- String aResultStr;
- mpDoc->GetString( (SCCOL)aObjective.Column, (SCROW)aObjective.Row, (SCTAB)aObjective.Sheet, aResultStr );
+ OUString aResultStr = mpDoc->GetString(
+ static_cast<SCCOL>(aObjective.Column), static_cast<SCROW>(aObjective.Row),
+ static_cast<SCTAB>(aObjective.Sheet));
+
ScSolverSuccessDialog aDialog( this, aResultStr );
if ( aDialog.Execute() == RET_OK )
{
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index e6b01070b393..5b4f7630ea5c 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -398,7 +398,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos,
{
if ( pDoc->HasStringData( col, row, nTab ) )
{
- pDoc->GetString( col, row, nTab, aStrField );
+ aStrField = pDoc->GetString(col, row, nTab);
if ( aStrField.Len() > 0 )
{
@@ -422,7 +422,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos,
{
if ( pDoc->HasStringData( col, row, nTab ) )
{
- pDoc->GetString( col, row, nTab, aStrField );
+ aStrField = pDoc->GetString(col, row, nTab);
if ( aStrField.Len() > 0 )
{
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index ee8105255ee1..81106e5c0550 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -2050,8 +2050,8 @@ void ScUndoDataForm::DoChange( const sal_Bool bUndo )
for ( sal_uInt16 i=0; i <= ( aBlockRange.aEnd.Col() - aBlockRange.aStart.Col() ); i++ )
{
- String aOldString;
- pUndoDoc->GetString( aBlockRange.aStart.Col()+i , aBlockRange.aStart.Row() , aBlockRange.aStart.Tab() , aOldString );
+ OUString aOldString = pUndoDoc->GetString(
+ aBlockRange.aStart.Col()+i, aBlockRange.aStart.Row(), aBlockRange.aStart.Tab());
pDoc->SetString( aBlockRange.aStart.Col()+i , aBlockRange.aStart.Row() , aBlockRange.aStart.Tab() , aOldString );
}
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index cd94ab9474e1..3ace8574ccaa 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -2603,11 +2603,7 @@ void ScChart2DataSequence::BuildDataCache()
if (pCell->HasStringData())
rItem.maString = pCell->GetStringData();
else
- {
- String aStr;
- m_pDocument->GetString(nCol, nRow, nTab, aStr);
- rItem.maString = aStr;
- }
+ rItem.maString = m_pDocument->GetString(nCol, nRow, nTab);
switch (pCell->GetCellType())
{
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 790739e1d620..faecae8890c5 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -628,8 +628,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
case SID_RANGE_TEXTVALUE:
{
- String aString;
- pDoc->GetString( nPosX, nPosY, nTab, aString );
+ OUString aString = pDoc->GetString(nPosX, nPosY, nTab);
rSet.Put( SfxStringItem( nWhich, aString ) );
}
break;
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 714230a1c5c7..3a9dc0ad826c 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -1344,8 +1344,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const rtl::OUString& rStri
if (!pDPObj)
return;
- rtl::OUString aOldText;
- pDoc->GetString( rPos.Col(), rPos.Row(), rPos.Tab(), aOldText );
+ OUString aOldText = pDoc->GetString(rPos.Col(), rPos.Row(), rPos.Tab());
if ( aOldText == rString )
{
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 2a8d705aec1e..7bbbc1817ccf 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1101,8 +1101,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
else // AutoFilter
{
//! wird der Titel ueberhaupt ausgewertet ???
- String aString;
- pDoc->GetString( nCol, nRow, nTab, aString );
+ OUString aString = pDoc->GetString(nCol, nRow, nTab);
pFilterBox->SetText( aString );
long nMaxText = 0;
@@ -1238,8 +1237,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
if (pData)
{
ScTypedStrData* pNew = NULL;
- rtl::OUString aDocStr;
- pDoc->GetString( nCol, nRow, nTab, aDocStr );
+ OUString aDocStr = pDoc->GetString(nCol, nRow, nTab);
if ( pDoc->HasValueData( nCol, nRow, nTab ) )
{
double fVal = pDoc->GetValue(ScAddress(nCol, nRow, nTab));
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 64e4bbcff241..9c48dd2d9645 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1229,8 +1229,7 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCCOL nX2, ScTableInfo& rTabInfo, Out
long nPosY = aScrPos.Y();
// bLayoutRTL is handled in setBoundingBox
- String aStr;
- pDoc->GetString(nCol, nRow, nTab, aStr);
+ OUString aStr = pDoc->GetString(nCol, nRow, nTab);
aCellBtn.setText(aStr);
aCellBtn.setBoundingBox(Point(nPosX, nPosY), Size(nSizeX-1, nSizeY-1), bLayoutRTL);
aCellBtn.setPopupLeft(false); // DataPilot popup is always right-aligned for now
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index 783b5709c3d1..6cb0cc5a8081 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -44,21 +44,6 @@
using namespace ::com::sun::star;
-// ============================================================================
-
-namespace {
-
-bool lclHasString( ScDocument& rDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString )
-{
- String aCompStr;
- rDoc.GetString( nCol, nRow, nTab, aCompStr );
- return aCompStr == rString; //! case-insensitive?
-}
-
-} // namespace
-
-// ----------------------------------------------------------------------------
-
ScConversionEngineBase::ScConversionEngineBase(
SfxItemPool* pEnginePoolP, ScViewData& rViewData,
ScDocument* pUndoDoc, ScDocument* pRedoDoc ) :
@@ -105,19 +90,18 @@ bool ScConversionEngineBase::FindNextConversionCell()
String aNewStr = GetText();
- sal_Bool bMultiTab = (rMark.GetSelectCount() > 1);
- String aVisibleStr;
+ bool bMultiTab = (rMark.GetSelectCount() > 1);
+ OUString aVisibleStr;
if( bMultiTab )
- mrDoc.GetString( mnCurrCol, mnCurrRow, mnStartTab, aVisibleStr );
+ aVisibleStr = mrDoc.GetString(mnCurrCol, mnCurrRow, mnStartTab);
for( SCTAB nTab = 0, nTabCount = mrDoc.GetTableCount(); nTab < nTabCount; ++nTab )
{
// always change the cell on the visible tab,
// on the other selected tabs only if they contain the same text
- if( (nTab == mnStartTab) ||
- (bMultiTab && rMark.GetTableSelect( nTab ) &&
- lclHasString( mrDoc, mnCurrCol, mnCurrRow, nTab, aVisibleStr )) )
+ if ((nTab == mnStartTab) ||
+ (bMultiTab && rMark.GetTableSelect(nTab) && mrDoc.GetString(mnCurrCol, mnCurrRow, nTab) == aVisibleStr))
{
ScAddress aPos( mnCurrCol, mnCurrRow, nTab );
CellType eCellType = mrDoc.GetCellType( aPos );
@@ -281,8 +265,7 @@ void ScConversionEngineBase::FillFromCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
{
case CELLTYPE_STRING:
{
- String aText;
- mrDoc.GetString( nCol, nRow, nTab, aText );
+ OUString aText = mrDoc.GetString(nCol, nRow, nTab);
SetText( aText );
}
break;
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 2de541ad1bef..5698878afdc3 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -366,7 +366,7 @@ void ScViewFunc::DoThesaurus( sal_Bool bRecord )
if (eCellType == CELLTYPE_STRING)
{
- pDoc->GetString(nCol, nRow, nTab, sOldText);
+ sOldText = pDoc->GetString(nCol, nRow, nTab);
pThesaurusEngine->SetText(sOldText);
}
else if (eCellType == CELLTYPE_EDIT)