Index: sc/inc/dbcolect.hxx
===================================================================
RCS file: /cvs/sc/sc/inc/dbcolect.hxx,v
retrieving revision 1.8
diff -u -r1.8 dbcolect.hxx
--- sc/inc/dbcolect.hxx	14 Jan 2005 11:58:41 -0000	1.8
+++ sc/inc/dbcolect.hxx	13 Mar 2005 04:18:36 -0000
@@ -112,6 +112,7 @@
 	BOOL			bStripData;
 	// SortParam
 	BOOL			bSortCaseSens;
+	BOOL			bSortNaturalSort;
 	BOOL			bIncludePattern;
 	BOOL			bSortInplace;
 	BOOL			bSortUserDef;
Index: sc/inc/global.hxx
===================================================================
RCS file: /cvs/sc/sc/inc/global.hxx,v
retrieving revision 1.42
diff -u -r1.42 global.hxx
--- sc/inc/global.hxx	13 Jan 2005 17:21:00 -0000	1.42
+++ sc/inc/global.hxx	13 Mar 2005 04:18:36 -0000
@@ -918,6 +918,7 @@
 	BOOL			bByRow;
 	BOOL			bInplace;
 	BOOL			bCaseSens;
+	BOOL			bNaturalSort;
 	BOOL			bRegExp;
     BOOL            bMixedComparison;   // whether numbers are smaller than strings
 	BOOL			bDuplicate;
Index: sc/inc/sc.hrc
===================================================================
RCS file: /cvs/sc/sc/inc/sc.hrc,v
retrieving revision 1.48
diff -u -r1.48 sc.hrc
--- sc/inc/sc.hrc	17 Feb 2005 11:17:32 -0000	1.48
+++ sc/inc/sc.hrc	13 Mar 2005 04:18:37 -0000
@@ -1116,6 +1116,7 @@
 #define SID_SORT_CASESENS		(SC_PARAM_START+2)
 #define SID_SORT_ATTRIBS		(SC_PARAM_START+3)
 #define SID_SORT_USERDEF		(SC_PARAM_START+4)
+#define SID_SORT_NATURALSORT	(SC_PARAM_START+5)
 
 // Resourcen -------------------------------------------------------------
 
Index: sc/inc/sortparam.hxx
===================================================================
RCS file: /cvs/sc/sc/inc/sortparam.hxx,v
retrieving revision 1.3
diff -u -r1.3 sortparam.hxx
--- sc/inc/sortparam.hxx	23 Aug 2004 09:26:33 -0000	1.3
+++ sc/inc/sortparam.hxx	13 Mar 2005 04:18:37 -0000
@@ -94,6 +94,7 @@
 	BOOL		bHasHeader;
 	BOOL		bByRow;
 	BOOL		bCaseSens;
+	BOOL		bNaturalSort;
 	BOOL		bUserDef;
 	USHORT		nUserIndex;
 	BOOL		bIncludePattern;
Index: sc/sdi/scalc.sdi
===================================================================
RCS file: /cvs/sc/sc/sdi/scalc.sdi,v
retrieving revision 1.30
diff -u -r1.30 scalc.sdi
--- sc/sdi/scalc.sdi	2 Aug 2004 12:56:50 -0000	1.30
+++ sc/sdi/scalc.sdi	13 Mar 2005 04:18:38 -0000
@@ -1608,7 +1608,7 @@
 
 //--------------------------------------------------------------------------
 SfxVoidItem DataSort SID_SORT
-(SfxBoolItem ByRows SID_SORT_BYROW,SfxBoolItem HasHeader SID_SORT_HASHEADER,SfxBoolItem CaseSensitive SID_SORT_CASESENS,SfxBoolItem IncludeAttribs SID_SORT_ATTRIBS,SfxUInt16Item UserDefIndex SID_SORT_USERDEF,SfxInt32Item Col1 FN_PARAM_1,SfxBoolItem Ascending1 FN_PARAM_2,SfxInt32Item Col2 FN_PARAM_3,SfxBoolItem Ascending2 FN_PARAM_4,SfxInt32Item Col3 FN_PARAM_5,SfxBoolItem Ascending3 FN_PARAM_6)
+(SfxBoolItem ByRows SID_SORT_BYROW,SfxBoolItem HasHeader SID_SORT_HASHEADER,SfxBoolItem CaseSensitive SID_SORT_CASESENS,SfxBoolItem NaturalSort SID_SORT_NATURALSORT,SfxBoolItem IncludeAttribs SID_SORT_ATTRIBS,SfxUInt16Item UserDefIndex SID_SORT_USERDEF,SfxInt32Item Col1 FN_PARAM_1,SfxBoolItem Ascending1 FN_PARAM_2,SfxInt32Item Col2 FN_PARAM_3,SfxBoolItem Ascending2 FN_PARAM_4,SfxInt32Item Col3 FN_PARAM_5,SfxBoolItem Ascending3 FN_PARAM_6)
 [
 	/* flags: */
 	AutoUpdate = FALSE,
Index: sc/source/core/data/sortparam.cxx
===================================================================
RCS file: /cvs/sc/sc/source/core/data/sortparam.cxx,v
retrieving revision 1.2
diff -u -r1.2 sortparam.cxx
--- sc/source/core/data/sortparam.cxx	4 Jun 2004 10:27:42 -0000	1.2
+++ sc/source/core/data/sortparam.cxx	13 Mar 2005 04:18:38 -0000
@@ -85,7 +85,7 @@
 
 ScSortParam::ScSortParam( const ScSortParam& r ) :
 		nCol1(r.nCol1),nRow1(r.nRow1),nCol2(r.nCol2),nRow2(r.nRow2),
-		bHasHeader(r.bHasHeader),bCaseSens(r.bCaseSens),
+		bHasHeader(r.bHasHeader),bCaseSens(r.bCaseSens),bNaturalSort(r.bNaturalSort),
 		bByRow(r.bByRow),bUserDef(r.bUserDef),nUserIndex(r.nUserIndex),bIncludePattern(r.bIncludePattern),
 		bInplace(r.bInplace),
 		nDestTab(r.nDestTab),nDestCol(r.nDestCol),nDestRow(r.nDestRow),
@@ -107,7 +107,7 @@
 	nRow1=nRow2=nDestRow = 0;
 	nDestTab = 0;
 	nUserIndex = 0;
-	bHasHeader=bCaseSens=bUserDef = FALSE;
+	bHasHeader=bCaseSens=bUserDef=bNaturalSort = FALSE;
 	bByRow=bIncludePattern=bInplace	= TRUE;
 	aCollatorLocale = ::com::sun::star::lang::Locale();
 	aCollatorAlgorithm.Erase();
@@ -130,6 +130,7 @@
 	nRow2			= r.nRow2;
 	bHasHeader		= r.bHasHeader;
 	bCaseSens		= r.bCaseSens;
+	bNaturalSort	= r.bNaturalSort;
 	bByRow			= r.bByRow;
 	bUserDef		= r.bUserDef;
 	nUserIndex		= r.nUserIndex;
@@ -171,6 +172,7 @@
 		&& (bHasHeader		== rOther.bHasHeader)
 		&& (bByRow			== rOther.bByRow)
 		&& (bCaseSens		== rOther.bCaseSens)
+		&& (bNaturalSort	== rOther.bNaturalSort)
 		&& (bUserDef		== rOther.bUserDef)
 		&& (nUserIndex		== rOther.nUserIndex)
 		&& (bIncludePattern == rOther.bIncludePattern)
Index: sc/source/core/data/table3.cxx
===================================================================
RCS file: /cvs/sc/sc/source/core/data/table3.cxx,v
retrieving revision 1.20
diff -u -r1.20 table3.cxx
--- sc/source/core/data/table3.cxx	15 Nov 2004 16:34:51 -0000	1.20
+++ sc/source/core/data/table3.cxx	13 Mar 2005 04:18:38 -0000
@@ -100,6 +100,143 @@
 
 #include <vector>
 
+using namespace ::com::sun::star;
+
+namespace naturalsort {
+
+using namespace ::com::sun::star::i18n;
+
+/** Splits a given string into three parts: the prefix, number string, and 
+	the suffix.
+
+	@param sWhole
+	Original string to be split into pieces
+
+	@param sPrefix
+	Prefix string that consists of the part before the first number token
+
+	@param sSuffix
+	String after the last number token.  This may still contain number strings.
+
+	@param fNum
+	Number converted from the middle number string
+
+	@return Returns TRUE if a numeral element is found in a given string, or 
+	FALSE if no numeral element is found.
+*/
+BOOL SplitString( const rtl::OUString &sWhole, 
+	rtl::OUString &sPrefix, rtl::OUString &sSuffix, double &fNum )
+{
+	i18n::LocaleDataItem aLocaleItem = ScGlobal::pLocaleData->getLocaleItem();
+
+	// Get prefix element
+	rtl::OUString sEmpty, sUser = rtl::OUString::createFromAscii( "-" );
+	ParseResult aPRPre = ScGlobal::pCharClass->parsePredefinedToken( 
+		KParseType::IDENTNAME, sWhole, 0, 
+		KParseTokens::ANY_LETTER, sUser, KParseTokens::ANY_LETTER, sUser );
+	sPrefix = sWhole.copy( 0, aPRPre.EndPos );
+	
+	// Return FALSE if no numeral element is found
+	if ( aPRPre.EndPos == sWhole.getLength() )
+		return FALSE;
+	
+	// Get numeral element
+	sUser = aLocaleItem.decimalSeparator;
+	ParseResult aPRNum = ScGlobal::pCharClass->parsePredefinedToken(
+		KParseType::ANY_NUMBER, sWhole, aPRPre.EndPos, 
+		KParseTokens::ANY_NUMBER, sEmpty, KParseTokens::ANY_NUMBER, sUser );
+	
+	if ( aPRNum.EndPos == aPRPre.EndPos )
+		return FALSE;
+	
+	fNum = aPRNum.Value;
+	sSuffix = sWhole.copy( aPRNum.EndPos );
+	
+	return TRUE;
+}
+
+/** Naturally compares two given strings.
+
+	This is the main function that should be called externally.  It returns 
+	either 1, 0, or -1 depending on the comparison result of given two strings.
+
+	@param sInput1
+	Input string 1
+
+	@param sInput2
+	Input string 2
+
+	@param bCaseSens
+	Boolean value for case sensitivity
+
+	@param pData
+	Pointer to user defined sort list
+
+	@param pCW
+	Pointer to collator wrapper for normal string comparison
+	
+	@return Returnes 1 if sInput1 is greater, 0 if sInput1 == sInput2, and -1 if 
+	sInput2 is greater.
+*/
+short Compare( const String &sInput1, const String &sInput2, 
+			   const BOOL bCaseSens, const ScUserListData* pData, const CollatorWrapper *pCW )
+{   
+	rtl::OUString sStr1( sInput1 ), sStr2( sInput2 ), sPre1, sSuf1, sPre2, sSuf2;
+
+	do
+	{
+		double nNum1, nNum2;
+		BOOL bNumFound1 = SplitString( sStr1, sPre1, sSuf1, nNum1 );
+		BOOL bNumFound2 = SplitString( sStr2, sPre2, sSuf2, nNum2 );
+
+		short nPreRes; // Prefix comparison result
+		if ( pData )
+		{
+			if ( bCaseSens )
+			{
+				if ( !bNumFound1 || !bNumFound2 )
+					return static_cast<short>(pData->Compare( sStr1, sStr2 ));
+				else
+					nPreRes = pData->Compare( sPre1, sPre2 );
+			}
+			else
+			{
+				if ( !bNumFound1 || !bNumFound2 )
+					return static_cast<short>(pData->ICompare( sStr1, sStr2 ));
+				else
+					nPreRes = pData->ICompare( sPre1, sPre2 );
+			}
+		} 
+		else
+		{
+			if ( !bNumFound1 || !bNumFound2 )
+				return static_cast<short>(pCW->compareString( sStr1, sStr2 ));
+			else
+				nPreRes = static_cast<short>(pCW->compareString( sPre1, sPre2 ));
+		}
+		
+		// Prefix strings differ.  Return immediately.
+		if ( nPreRes != 0 ) return nPreRes;
+			
+		if ( nNum1 != nNum2 )
+		{
+			if ( nNum1 < nNum2 ) return -1;
+			return static_cast<short>( nNum1 > nNum2 );
+		}
+
+		// The prefix and the first numerical elements are equal, but the suffix
+		// strings may still differ.  Stay in the loop.
+
+		sStr1 = sSuf1;
+		sStr2 = sSuf2;
+
+	} while ( true );
+
+	return 0;
+}
+
+}
+
 // STATIC DATA -----------------------------------------------------------
 
 const USHORT nMaxSorts = 3;		// maximale Anzahl Sortierkriterien in aSortParam
@@ -321,25 +458,40 @@
 					((ScStringCell*)pCell2)->GetString(aStr2);
 				else
 					GetString(nCell2Col, nCell2Row, aStr2);
-				BOOL bUserDef = aSortParam.bUserDef;
+
+				BOOL bUserDef     = aSortParam.bUserDef;		// custom sort order
+				BOOL bNaturalSort = aSortParam.bNaturalSort;	// natural sort
+				BOOL bCaseSens    = aSortParam.bCaseSens;		// case sensitivity
+				
 				if (bUserDef)
 				{
 					ScUserListData* pData =
-						(ScUserListData*)(ScGlobal::GetUserList()->At(
-						aSortParam.nUserIndex));
+						static_cast<ScUserListData*>( (ScGlobal::GetUserList()->At(
+						aSortParam.nUserIndex)) );
+						
 					if (pData)
 					{
-						if ( aSortParam.bCaseSens )
-							nRes = pData->Compare(aStr1, aStr2);
+						if ( bNaturalSort )
+							nRes = naturalsort::Compare( aStr1, aStr2, bCaseSens, pData, pSortCollator );
 						else
-							nRes = pData->ICompare(aStr1, aStr2);
+						{
+							if ( bCaseSens )
+								nRes = pData->Compare(aStr1, aStr2);
+							else
+								nRes = pData->ICompare(aStr1, aStr2);
+						}
 					}
 					else
 						bUserDef = FALSE;
 
 				}
 				if (!bUserDef)
-					nRes = (short) pSortCollator->compareString( aStr1, aStr2 );
+				{
+					if ( bNaturalSort )
+						nRes = naturalsort::Compare( aStr1, aStr2, bCaseSens, NULL, pSortCollator );
+					else
+						nRes = static_cast<short>( pSortCollator->compareString( aStr1, aStr2 ) );
+				}
 			}
 			else if ( bStr1 )				// String <-> Zahl
 				nRes = 1;					// Zahl vorne
Index: sc/source/core/tool/dbcolect.cxx
===================================================================
RCS file: /cvs/sc/sc/source/core/tool/dbcolect.cxx,v
retrieving revision 1.12
diff -u -r1.12 dbcolect.cxx
--- sc/source/core/tool/dbcolect.cxx	14 Jan 2005 11:59:07 -0000	1.12
+++ sc/source/core/tool/dbcolect.cxx	13 Mar 2005 04:18:39 -0000
@@ -427,6 +427,7 @@
 	bKeepFmt			(rData.bKeepFmt),
 	bStripData			(rData.bStripData),
 	bSortCaseSens   	(rData.bSortCaseSens),
+	bSortNaturalSort	(rData.bSortNaturalSort),
 	bIncludePattern 	(rData.bIncludePattern),
 	bSortInplace		(rData.bSortInplace),
 	nSortDestTab		(rData.nSortDestTab),
@@ -520,6 +521,7 @@
 	bKeepFmt			= rData.bKeepFmt;
 	bStripData			= rData.bStripData;
 	bSortCaseSens   	= rData.bSortCaseSens;
+	bSortNaturalSort	= rData.bSortNaturalSort;
 	bIncludePattern 	= rData.bIncludePattern;
 	bSortInplace		= rData.bSortInplace;
 	nSortDestTab		= rData.nSortDestTab;
@@ -771,6 +773,7 @@
 	rSortParam.bByRow = bByRow;
 	rSortParam.bHasHeader = bHasHeader;
 	rSortParam.bCaseSens = bSortCaseSens;
+	rSortParam.bNaturalSort = bSortNaturalSort;
 	rSortParam.bInplace = bSortInplace;
 	rSortParam.nDestTab = nSortDestTab;
 	rSortParam.nDestCol = nSortDestCol;
@@ -791,6 +794,7 @@
 void ScDBData::SetSortParam( const ScSortParam& rSortParam )
 {
 	bSortCaseSens = rSortParam.bCaseSens;
+	bSortNaturalSort = rSortParam.bNaturalSort;
 	bIncludePattern = rSortParam.bIncludePattern;
 	bSortInplace = rSortParam.bInplace;
 	nSortDestTab = rSortParam.nDestTab;
Index: sc/source/ui/dbgui/tpsort.cxx
===================================================================
RCS file: /cvs/sc/sc/source/ui/dbgui/tpsort.cxx,v
retrieving revision 1.8
diff -u -r1.8 tpsort.cxx
--- sc/source/ui/dbgui/tpsort.cxx	23 Aug 2004 09:32:01 -0000	1.8
+++ sc/source/ui/dbgui/tpsort.cxx	13 Mar 2005 04:18:39 -0000
@@ -579,6 +579,7 @@
 		aBtnHeader		( this, ScResId( BTN_LABEL ) ),
 		aBtnFormats 	( this, ScResId( BTN_FORMATS ) ),
 		aBtnCopyResult	( this, ScResId( BTN_COPYRESULT ) ),
+		aBtnNaturalSort	( this, ScResId( BTN_NATURALSORT ) ),
 		aLbOutPos		( this, ScResId( LB_OUTAREA ) ),
 		aEdOutPos		( this, ScResId( ED_OUTAREA ) ),
 		aBtnSortUser	( this, ScResId( BTN_SORT_USER ) ),
@@ -590,7 +591,7 @@
 		aLineDirection	( this, ScResId( FL_DIRECTION ) ),
 		aBtnTopDown 	( this, ScResId( BTN_TOP_DOWN ) ),
 		aBtnLeftRight	( this, ScResId( BTN_LEFT_RIGHT ) ),
-		aFtAreaLabel	( this, ScResId( FT_AREA_LABEL ) ),
+// 		aFtAreaLabel	( this, ScResId( FT_AREA_LABEL ) ),
 //		aFtArea 		( this, ScResId( FT_AREA ) ),
 		//
 		aStrColLabel	( ScResId( STR_COL_LABEL ) ),
@@ -629,8 +630,8 @@
 
 void ScTabPageSortOptions::Init()
 {
-	aStrAreaLabel = aFtAreaLabel.GetText();
-	aStrAreaLabel.Append( (sal_Unicode) ' ' );
+// 	aStrAreaLabel = aFtAreaLabel.GetText();
+// 	aStrAreaLabel.Append( (sal_Unicode) ' ' );
 
 	//	CollatorRessource has user-visible names for sort algorithms
 	pColRes = new CollatorRessource();
@@ -708,8 +709,8 @@
 		theArea += ')';
 
 		//aFtArea.SetText( theArea );
-		theArea.Insert( aStrAreaLabel, 0 );
-		aFtAreaLabel.SetText( theArea );
+		//theArea.Insert( aStrAreaLabel, 0 );
+		//aFtAreaLabel.SetText( theArea );
 
 		aBtnHeader.SetText( aStrColLabel );
 	}
@@ -755,9 +756,10 @@
 		aLbSortUser.SelectEntryPos( 0 );
 	}
 
-	aBtnCase.Check		( rSortData.bCaseSens );
-	aBtnFormats.Check	( rSortData.bIncludePattern );
-	aBtnHeader.Check	( rSortData.bHasHeader );
+	aBtnCase.Check			( rSortData.bCaseSens );
+	aBtnFormats.Check		( rSortData.bIncludePattern );
+	aBtnHeader.Check		( rSortData.bHasHeader );
+	aBtnNaturalSort.Check	( rSortData.bNaturalSort );
 
 	if ( rSortData.bByRow )
 	{
@@ -825,6 +827,7 @@
 	theSortData.bByRow			= aBtnTopDown.IsChecked();
 	theSortData.bHasHeader		= aBtnHeader.IsChecked();
 	theSortData.bCaseSens		= aBtnCase.IsChecked();
+	theSortData.bNaturalSort	= aBtnNaturalSort.IsChecked();
 	theSortData.bIncludePattern = aBtnFormats.IsChecked();
 	theSortData.bInplace		= !aBtnCopyResult.IsChecked();
 	theSortData.nDestCol		= theOutPos.Col();
Index: sc/source/ui/inc/sortdlg.hrc
===================================================================
RCS file: /cvs/sc/sc/source/ui/inc/sortdlg.hrc,v
retrieving revision 1.3
diff -u -r1.3 sortdlg.hrc
--- sc/source/ui/inc/sortdlg.hrc	18 May 2001 09:16:28 -0000	1.3
+++ sc/source/ui/inc/sortdlg.hrc	13 Mar 2005 04:18:39 -0000
@@ -95,7 +95,7 @@
 #define LB_SORT_USER		2
 #define LB_OUTAREA			3
 #define ED_OUTAREA          4
-#define FT_AREA_LABEL       5
+//#define FT_AREA_LABEL       5
 //#define FT_AREA             6
 #define BTN_SORT_USER       7
 #define BTN_CASESENSITIVE   8
@@ -110,6 +110,7 @@
 #define LB_LANGUAGE         17
 #define FT_ALGORITHM        18
 #define LB_ALGORITHM        19
+#define	BTN_NATURALSORT		20
 
 
 
Index: sc/source/ui/inc/tpsort.hxx
===================================================================
RCS file: /cvs/sc/sc/source/ui/inc/tpsort.hxx,v
retrieving revision 1.5
diff -u -r1.5 tpsort.hxx
--- sc/source/ui/inc/tpsort.hxx	4 Jun 2004 11:42:38 -0000	1.5
+++ sc/source/ui/inc/tpsort.hxx	13 Mar 2005 04:18:39 -0000
@@ -105,7 +105,7 @@
 struct ScSortParam;
 
 //========================================================================
-// Kriterien
+// Kriterien (Sort Criteria)
 
 class ScTabPageSortFields : public SfxTabPage
 {
@@ -175,7 +175,7 @@
 };
 
 //========================================================================
-// Sortieroptionen:
+// Sortieroptionen (Sort Options)
 
 class ScDocument;
 class ScRangeData;
@@ -206,6 +206,7 @@
     CheckBox            aBtnCase;
     CheckBox            aBtnHeader;
     CheckBox            aBtnFormats;
+	CheckBox			aBtnNaturalSort;
 
     CheckBox            aBtnCopyResult;
     ListBox             aLbOutPos;
@@ -223,7 +224,7 @@
     RadioButton         aBtnTopDown;
     RadioButton         aBtnLeftRight;
 
-    FixedText           aFtAreaLabel;
+//     FixedText           aFtAreaLabel;
 //  FixedInfo           aFtArea;
     String              aStrRowLabel;
     String              aStrColLabel;
Index: sc/source/ui/src/sortdlg.src
===================================================================
RCS file: /cvs/sc/sc/source/ui/src/sortdlg.src,v
retrieving revision 1.37
diff -u -r1.37 sortdlg.src
--- sc/source/ui/src/sortdlg.src	26 Jun 2004 20:10:37 -0000	1.37
+++ sc/source/ui/src/sortdlg.src	13 Mar 2005 04:18:40 -0000
@@ -209,9 +209,20 @@
 		TabStop = TRUE ;
 		Text [ x-comment ] = " ";
 	};
+	CheckBox BTN_NATURALSORT
+	{
+		Pos = MAP_APPFONT ( 12 , 48 ) ;
+		Size = MAP_APPFONT ( 242 , 10 ) ;
+		Text [ de ] = "Enable ~natural sort" ;
+		Text [ en-US ] = "Enable ~natural sort" ;
+		Text [ cs ] = "Aktivovat přirozené třídění" ;
+       Text [ sk ] = "Aktivovať prirodzené triedenie" ;
+		TabStop = TRUE ;
+		Text [ x-comment ] = " " ;
+	};
 	CheckBox BTN_COPYRESULT
 	{
-        Pos = MAP_APPFONT ( 12 , 48 ) ;
+        Pos = MAP_APPFONT ( 12 , 62 ) ;
         Size = MAP_APPFONT ( 242 , 10 ) ;
 		Text [ de ] = "Sortierergebnis ~ausgeben nach" ;
 		Text [ en-US ] = "~Copy sort results to:" ;
@@ -221,7 +230,7 @@
 	ListBox LB_OUTAREA
 	{
 		Border = TRUE ;
-        Pos = MAP_APPFONT ( 20 , 59 ) ;
+        Pos = MAP_APPFONT ( 20 , 73 ) ;
         Size = MAP_APPFONT ( 93 , 90 ) ;
 		TabStop = TRUE ;
 		DropDown = TRUE ;
@@ -230,13 +239,13 @@
 	{
 		Disable = TRUE ;
 		Border = TRUE ;
-        Pos = MAP_APPFONT ( 119 , 59 ) ;
+        Pos = MAP_APPFONT ( 119 , 73 ) ;
         Size = MAP_APPFONT ( 132 , 12 ) ;
 		TabStop = TRUE ;
 	};
 	CheckBox BTN_SORT_USER
 	{
-        Pos = MAP_APPFONT ( 12 , 75 ) ;
+        Pos = MAP_APPFONT ( 12 , 89 ) ;
         Size = MAP_APPFONT ( 242 , 10 ) ;
 		Text [ de ] = "~Benutzerdefinierte Sortierreihenfolge" ;
 		Text [ en-US ] = "Custom sort ~order" ;
@@ -247,14 +256,14 @@
 	{
 		Disable = TRUE ;
 		Border = TRUE ;
-        Pos = MAP_APPFONT ( 20 , 86 ) ;
+        Pos = MAP_APPFONT ( 20 , 100 ) ;
         Size = MAP_APPFONT ( 231 , 90 ) ;
 		TabStop = TRUE ;
 		DropDown = TRUE ;
 	};
     FixedText FT_LANGUAGE
 	{
-        Pos = MAP_APPFONT ( 12 , 104 ) ;
+        Pos = MAP_APPFONT ( 12 , 118 ) ;
         Size = MAP_APPFONT ( 101 , 8 ) ;
 		Text [ de ] = "S~prache" ;
 		Text [ en-US ] = "~Language";
@@ -262,7 +271,7 @@
 	ListBox LB_LANGUAGE
 	{
 		Border = TRUE ;
-        Pos = MAP_APPFONT ( 12 , 115 ) ;
+        Pos = MAP_APPFONT ( 12 , 129 ) ;
         Size = MAP_APPFONT ( 101 , 90 ) ;
 		TabStop = TRUE ;
 		DropDown = TRUE ;
@@ -270,7 +279,7 @@
 	};
     FixedText FT_ALGORITHM
 	{
-        Pos = MAP_APPFONT ( 119 , 104 ) ;
+        Pos = MAP_APPFONT ( 119 , 118 ) ;
         Size = MAP_APPFONT ( 132 , 8 ) ;
         Text [ de ] = "Op~tionen" ;
 		Text [ en-US ] = "O~ptions";
@@ -278,14 +287,14 @@
 	ListBox LB_ALGORITHM
 	{
 		Border = TRUE ;
-        Pos = MAP_APPFONT ( 119 , 115 ) ;
+        Pos = MAP_APPFONT ( 119 , 129 ) ;
         Size = MAP_APPFONT ( 132 , 90 ) ;
 		TabStop = TRUE ;
 		DropDown = TRUE ;
 	};
 	FixedLine FL_DIRECTION
 	{
-        Pos = MAP_APPFONT ( 6 , 133 ) ;
+        Pos = MAP_APPFONT ( 6 , 147 ) ;
         Size = MAP_APPFONT ( 248 , 8 ) ;
 		Text [ de ] = "Richtung" ;
 		Text [ en-US ] = "Direction" ;
@@ -293,7 +302,7 @@
 	};
 	RadioButton BTN_TOP_DOWN
 	{
-        Pos = MAP_APPFONT ( 12 , 144 ) ;
+        Pos = MAP_APPFONT ( 12 , 158 ) ;
         Size = MAP_APPFONT ( 242 , 10 ) ;
 		Text [ de ] = "Von ~oben nach unten (Zeilen sortieren)" ;
 		Text [ en-US ] = "~Top to bottom (sort rows)" ;
@@ -302,13 +311,14 @@
 	};
 	RadioButton BTN_LEFT_RIGHT
 	{
-        Pos = MAP_APPFONT ( 12 , 158 ) ;
+        Pos = MAP_APPFONT ( 12 , 172 ) ;
         Size = MAP_APPFONT ( 242 , 10 ) ;
         Text [ de ] = "Von ~links nach rechts (Spalten sortieren)" ;
 		Text [ en-US ] = "L~eft to right (sort columns)" ;
 		TabStop = TRUE ;
 		Text [ x-comment ] = " ";
 	};
+/*
 	FixedText FT_AREA_LABEL
 	{
         Pos = MAP_APPFONT ( 6 , 171 ) ;
@@ -317,6 +327,7 @@
 		Text [ en-US ] = "Data area:" ;
 		Text [ x-comment ] = " ";
 	};
+*/
 };
 TabDialog RID_SCDLG_SORT
 {
Index: sc/source/ui/view/cellsh2.cxx
===================================================================
RCS file: /cvs/sc/sc/source/ui/view/cellsh2.cxx,v
retrieving revision 1.22
diff -u -r1.22 cellsh2.cxx
--- sc/source/ui/view/cellsh2.cxx	4 Oct 2004 20:22:08 -0000	1.22
+++ sc/source/ui/view/cellsh2.cxx	13 Mar 2005 04:18:40 -0000
@@ -329,6 +329,7 @@
 				aSortParam.bHasHeader		= FALSE;
 				aSortParam.bByRow			= TRUE;
 				aSortParam.bCaseSens		= FALSE;
+				aSortParam.bNaturalSort		= FALSE;
 				aSortParam.bIncludePattern	= FALSE;
 				aSortParam.bInplace 		= TRUE;
 				aSortParam.bDoSort[0]		= TRUE;
@@ -364,6 +365,8 @@
 						aSortParam.bHasHeader = ((const SfxBoolItem*)pItem)->GetValue();
 					if ( pArgs->GetItemState( SID_SORT_CASESENS, TRUE, &pItem ) == SFX_ITEM_SET )
 						aSortParam.bCaseSens = ((const SfxBoolItem*)pItem)->GetValue();
+					if ( pArgs->GetItemState( SID_SORT_NATURALSORT, TRUE, &pItem ) == SFX_ITEM_SET )
+						aSortParam.bNaturalSort = ((const SfxBoolItem*)pItem)->GetValue();
 					if ( pArgs->GetItemState( SID_SORT_ATTRIBS, TRUE, &pItem ) == SFX_ITEM_SET )
 						aSortParam.bIncludePattern = ((const SfxBoolItem*)pItem)->GetValue();
 					if ( pArgs->GetItemState( SID_SORT_USERDEF, TRUE, &pItem ) == SFX_ITEM_SET )
@@ -417,7 +420,7 @@
 
 					pDlg = pFact->CreateScSortDlg( pTabViewShell->GetDialogParent(),  &aArgSet, ResId(RID_SCDLG_SORT) );
 					DBG_ASSERT(pDlg, "Dialog create fail!");//CHINA001
-					pDlg->SetCurPageId(1);
+					pDlg->SetCurPageId(1);	// 1=sort field tab  2=sort options tab
 
 					if ( pDlg->Execute() == RET_OK )
 					{
@@ -436,6 +439,8 @@
 												rOutParam.bHasHeader ) );
 							rReq.AppendItem( SfxBoolItem( SID_SORT_CASESENS,
 												rOutParam.bCaseSens ) );
+							rReq.AppendItem( SfxBoolItem( SID_SORT_NATURALSORT,
+												rOutParam.bNaturalSort ) );
 							rReq.AppendItem( SfxBoolItem( SID_SORT_ATTRIBS,
 												rOutParam.bIncludePattern ) );
 							USHORT nUser = rOutParam.bUserDef ? ( rOutParam.nUserIndex + 1 ) : 0;
