summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/filter/oox/worksheethelper.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx
index 96c84f912fdd..771f32f745ce 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -1564,7 +1564,14 @@ void WorksheetHelper::putString( const CellAddress& rAddress, const OUString& rT
{
ScAddress aAddress;
ScUnoConversion::FillScAddress( aAddress, rAddress );
- getScDocument().SetString( aAddress.Col(), aAddress.Row(), aAddress.Tab(), rText );
+ ScBaseCell* pNewCell = NULL;
+ ScDocument& rDoc = getScDocument();
+ if ( !rText.isEmpty() )
+ pNewCell = ScBaseCell::CreateTextCell( rText, &rDoc );
+ if ( pNewCell )
+ rDoc.PutCell( aAddress, pNewCell );
+ else
+ rDoc.SetString( aAddress.Col(), aAddress.Row(), aAddress.Tab(), rText );
}
void WorksheetHelper::putRichString( const CellAddress& rAddress, const RichString& rString, const Font* pFirstPortionFont ) const