Index: sw/source/core/doc/docsort.cxx
===================================================================
RCS file: /cvs/sw/sw/source/core/doc/docsort.cxx,v
retrieving revision 1.13
diff -u -p -u -r1.13 docsort.cxx
--- sw/source/core/doc/docsort.cxx	9 Sep 2005 03:14:46 -0000	1.13
+++ sw/source/core/doc/docsort.cxx	18 Aug 2006 19:53:28 -0000
@@ -372,13 +384,19 @@ double SwSortBoxElement::GetValue( USHOR
 	else
 		pFndBox = pBox->GetBox(nRow, nCol);			// Spalten sortieren
 
-	double aVal;
+	double nVal;
 	if( pFndBox )
-		aVal = pFndBox->GetBox()->GetFrmFmt()->GetTblBoxValue().GetValue();
+	{
+		const SwFmt *pFmt = pFndBox->GetBox()->GetFrmFmt();
+		if (pFmt->GetTblBoxNumFmt().GetValue() & NUMBERFORMAT_TEXT)
+			nVal = SwSortElement::GetValue( nKey );
+		else
+			nVal = pFmt->GetTblBoxValue().GetValue();
+	}
 	else
-		aVal = 0;
+		nVal = 0;
 
-	return aVal;
+	return nVal;
 }
 
 /*--------------------------------------------------------------------
