Kaydet (Commit) d4c36b6c authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Remove direct use of ScBaseCell.

Change-Id: I6b36e2f16ab76c146572f36393aaa0e3df951d7a
üst 6cc6f688
......@@ -836,6 +836,7 @@ public:
SC_DLLPUBLIC bool HasData( SCCOL nCol, SCROW nRow, SCTAB nTab );
SC_DLLPUBLIC bool HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
SC_DLLPUBLIC bool HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
SC_DLLPUBLIC bool HasValueData( const ScAddress& rPos ) const;
bool HasStringCells( const ScRange& rRange ) const;
/** Returns true, if there is any data to create a selection list for rPos. */
......
......@@ -3344,6 +3344,10 @@ bool ScDocument::HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const
return false;
}
bool ScDocument::HasValueData( const ScAddress& rPos ) const
{
return HasValueData(rPos.Col(), rPos.Row(), rPos.Tab());
}
bool ScDocument::HasStringCells( const ScRange& rRange ) const
{
......
......@@ -37,7 +37,6 @@
#include "document.hxx"
#include "patattr.hxx"
#include "attrib.hxx"
#include "cell.hxx"
#include "cellform.hxx"
#include "editutil.hxx"
#include "stlpool.hxx"
......@@ -173,40 +172,35 @@ void ScRTFExport::WriteCell( SCTAB nTab, SCROW nRow, SCCOL nCol )
return ;
}
ScBaseCell* pCell;
pDoc->GetCell( nCol, nRow, nTab, pCell );
sal_Bool bValueData;
rtl::OUString aContent;
if ( pCell )
bool bValueData = false;
OUString aContent;
ScAddress aPos(nCol, nRow, nTab);
switch (pDoc->GetCellType(aPos))
{
switch ( pCell->GetCellType() )
case CELLTYPE_NOTE:
case CELLTYPE_NONE:
bValueData = false;
break;
case CELLTYPE_EDIT:
{
case CELLTYPE_NOTE :
bValueData = false;
break; // nix
case CELLTYPE_EDIT :
bValueData = false;
const EditTextObject* pObj = pDoc->GetEditText(aPos);
if (pObj)
{
bValueData = false;
EditEngine& rEngine = GetEditEngine();
const EditTextObject* pObj = static_cast<const ScEditCell*>(pCell)->GetData();
if ( pObj )
{
rEngine.SetText( *pObj );
aContent = rEngine.GetText( LINEEND_LF ); // LineFeed zwischen Absaetzen!
}
}
break;
default:
{
bValueData = pCell->HasValueData();
sal_uLong nFormat = pAttr->GetNumberFormat( pFormatter );
Color* pColor;
ScCellFormat::GetString( pCell, nFormat, aContent, &pColor, *pFormatter );
rEngine.SetText(*pObj);
aContent = rEngine.GetText(LINEEND_LF); // LineFeed zwischen Absaetzen!
}
}
break;
default:
{
bValueData = pDoc->HasValueData(aPos);
sal_uLong nFormat = pAttr->GetNumberFormat(pFormatter);
Color* pColor;
aContent = ScCellFormat::GetString(*pDoc, aPos, nFormat, &pColor, *pFormatter);
}
}
else
bValueData = false;
sal_Bool bResetPar, bResetAttr;
bResetPar = bResetAttr = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment