summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-04-15 11:13:05 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-04-15 11:15:48 -0400
commit7963e79361278c14ddf98ac4d9ab3b6cab338129 (patch)
tree2ba70fb899961ce80f88c11e59131715d1d41d33 /sc
parentfec4ab14c0f5e0223559e9fd98d7c8d90e58cd18 (diff)
Remove this duplicate, and use the one in ScCellFormat.
Change-Id: I2410c8805ef5be950d5ce1e24f845ed910615442
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/cellsuno.hxx2
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx45
2 files changed, 7 insertions, 40 deletions
diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index 27eb29599c8d..c85bf55f1325 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -1010,8 +1010,6 @@ public:
virtual void SAL_CALL setActionLocks( sal_Int16 nLock )
throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int16 SAL_CALL resetActionLocks() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-
- static OUString GetOutputString_Impl(ScDocument* pDoc, const ScAddress& aPos);
};
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index fbde9f90475d..1e2a1dcd2d84 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -6149,49 +6149,18 @@ OUString ScCellObj::GetInputString_Impl(bool bEnglish) const // fuer getFor
return OUString();
}
-OUString ScCellObj::GetOutputString_Impl(ScDocument* pDoc, const ScAddress& aCellPos)
-{
- if (!pDoc)
- return EMPTY_OUSTRING;
-
- ScRefCellValue aCell;
- aCell.assign(*pDoc, aCellPos);
-
- if (aCell.isEmpty())
- return EMPTY_OUSTRING;
-
- OUString aVal;
-
- if (aCell.meType == CELLTYPE_EDIT)
- {
- // GetString an der EditCell macht Leerzeichen aus Umbruechen,
- // hier werden die Umbrueche aber gebraucht
- const EditTextObject* pData = aCell.mpEditText;
- if (pData)
- {
- EditEngine& rEngine = pDoc->GetEditEngine();
- rEngine.SetText(*pData);
- aVal = rEngine.GetText(LINEEND_LF);
- }
- // Edit-Zellen auch nicht per NumberFormatter formatieren
- // (passend zur Ausgabe)
- }
- else
- {
- // wie in GetString am Dokument (column)
- Color* pColor;
- sal_uLong nNumFmt = pDoc->GetNumberFormat( aCellPos );
- aVal = ScCellFormat::GetString(*pDoc, aCellPos, nNumFmt, &pColor, *pDoc->GetFormatTable());
- }
- return aVal;
-}
-
OUString ScCellObj::GetOutputString_Impl() const
{
ScDocShell* pDocSh = GetDocShell();
OUString aVal;
if ( pDocSh )
- aVal = GetOutputString_Impl(pDocSh->GetDocument(), aCellPos);
+ {
+ ScDocument* pDoc = pDocSh->GetDocument();
+ ScRefCellValue aCell;
+ aCell.assign(*pDoc, aCellPos);
+
+ aVal = ScCellFormat::GetOutputString(*pDoc, aCellPos, aCell);
+ }
return aVal;
}