Index: sc/source/core/tool/interpr1.cxx
===================================================================
RCS file: /cvsroot/thaioo/OpenOffice_Test/sc/source/core/tool/interpr1.cxx,v
retrieving revision 1.1.1.1
diff -a -u -r1.1.1.1 interpr1.cxx
--- sc/source/core/tool/interpr1.cxx	15 Sep 2004 05:30:46 -0000	1.1.1.1
+++ sc/source/core/tool/interpr1.cxx	27 Sep 2004 06:17:41 -0000
@@ -1309,8 +1309,8 @@
 				ULONG	nFormat = pDok->GetNumberFormat( aCellPos );
 				BOOL	bAppendPrec = TRUE;
 				USHORT	nPrec, nLeading;
-				BOOL	bThousand, bIsRed;
-				pFormatter->GetFormatSpecialInfo( nFormat, bThousand, bIsRed, nPrec, nLeading );
+				BOOL	bThousand, bIsRed, bThaiNum;
+				pFormatter->GetFormatSpecialInfo( nFormat, bThousand, bIsRed, nPrec, nLeading, bThaiNum);
 
 				switch( pFormatter->GetType( nFormat ) )
 				{
Index: sc/source/ui/view/viewfunc.cxx
===================================================================
RCS file: /cvsroot/thaioo/OpenOffice_Test/sc/source/ui/view/viewfunc.cxx,v
retrieving revision 1.1.1.1
diff -a -u -r1.1.1.1 viewfunc.cxx
--- sc/source/ui/view/viewfunc.cxx	15 Sep 2004 05:30:56 -0000	1.1.1.1
+++ sc/source/ui/view/viewfunc.cxx	27 Sep 2004 06:17:41 -0000
@@ -2447,9 +2447,9 @@
 	BOOL bError = FALSE;
 
 	LanguageType eLanguage = pOldEntry->GetLanguage();
-	BOOL bThousand, bNegRed;
+	BOOL bThousand, bNegRed, bThaiNum;
 	USHORT nPrecision, nLeading;
-	pOldEntry->GetFormatSpecialInfo( bThousand, bNegRed, nPrecision, nLeading );
+	pOldEntry->GetFormatSpecialInfo( bThousand, bNegRed, nPrecision, nLeading, bThaiNum );
 
 	short nOldType = pOldEntry->GetType();
 	if ( 0 == ( nOldType & (
Index: svtools/inc/zforlist.hxx
===================================================================
RCS file: /cvsroot/thaioo/OpenOffice_Test/svtools/inc/zforlist.hxx,v
retrieving revision 1.1.1.1
diff -a -u -r1.1.1.1 zforlist.hxx
--- svtools/inc/zforlist.hxx	15 Sep 2004 05:32:21 -0000	1.1.1.1
+++ svtools/inc/zforlist.hxx	27 Sep 2004 06:17:51 -0000
@@ -476,7 +476,7 @@
 	void GenerateFormat( String& sString, ULONG nIndex,
 						LanguageType eLnge = LANGUAGE_DONTKNOW,
 						BOOL bThousand = FALSE, BOOL IsRed = FALSE,
-						USHORT nPrecision = 0, USHORT nAnzLeading = 1 );
+						USHORT nPrecision = 0, USHORT nAnzLeading = 1, BOOL bThaiNum = FALSE );
 
 	/** Analyze an input string
 		@return
@@ -541,7 +541,7 @@
 
 	/// Get additional info of a format index, e.g. for dialog box
 	void GetFormatSpecialInfo(ULONG nFormat, BOOL& bThousand, BOOL& IsRed,
-							  USHORT& nPrecision, USHORT& nAnzLeading);
+							  USHORT& nPrecision, USHORT& nAnzLeading, BOOL& bThaiNum);
 
 	/// Count of decimals
 	USHORT GetFormatPrecision( ULONG nFormat ) const;
@@ -555,7 +555,7 @@
 	 */
 	ULONG GetFormatSpecialInfo( const String&, BOOL& bThousand, BOOL& IsRed,
 							  USHORT& nPrecision, USHORT& nAnzLeading,
-							  LanguageType eLnge = LANGUAGE_DONTKNOW );
+							  LanguageType eLnge = LANGUAGE_DONTKNOW, BOOL& bThaiNum = FALSE );
 
 	/// Check if format code string may be deleted by user
 	BOOL IsUserDefined( const String& sStr, LanguageType eLnge = LANGUAGE_DONTKNOW );
Index: svtools/inc/zformat.hxx
===================================================================
RCS file: /cvsroot/thaioo/OpenOffice_Test/svtools/inc/zformat.hxx,v
retrieving revision 1.1.1.1
diff -a -u -r1.1.1.1 zformat.hxx
--- svtools/inc/zformat.hxx	15 Sep 2004 05:32:21 -0000	1.1.1.1
+++ svtools/inc/zformat.hxx	27 Sep 2004 06:17:51 -0000
@@ -300,7 +300,8 @@
     void GetFormatSpecialInfo(BOOL& bThousand,
                               BOOL& IsRed,
                               USHORT& nPrecision,
-                              USHORT& nAnzLeading) const;
+                              USHORT& nAnzLeading,
+			      BOOL& bThaiNum) const;
 
     /// Count of decimal precision
     USHORT GetFormatPrecision() const   { return NumFor[0].Info().nCntPost; }
Index: svtools/source/control/fmtfield.cxx
===================================================================
RCS file: /cvsroot/thaioo/OpenOffice_Test/svtools/source/control/fmtfield.cxx,v
retrieving revision 1.1.1.1
diff -a -u -r1.1.1.1 fmtfield.cxx
--- svtools/source/control/fmtfield.cxx	15 Sep 2004 05:32:23 -0000	1.1.1.1
+++ svtools/source/control/fmtfield.cxx	27 Sep 2004 06:17:51 -0000
@@ -754,9 +754,9 @@
 	DBG_ASSERT(!ImplGetFormatter()->IsTextFormat(m_nFormatKey),
 		"FormattedField::GetThousandsSep : your'e sure what your'e doing when setting the precision of a text format ?");
 
-	BOOL bThousand, IsRed;
+	BOOL bThousand, IsRed, bThaiNum;
 	USHORT nPrecision, nAnzLeading;
-	ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading);
+	ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading, bThaiNum);
 
 	return bThousand;
 }
@@ -768,9 +768,9 @@
 		"FormattedField::SetThousandsSep : your'e sure what your'e doing when setting the precision of a text format ?");
 
 	// get the current settings
-	BOOL bThousand, IsRed;
+	BOOL bThousand, IsRed, bThaiNum;
 	USHORT nPrecision, nAnzLeading;
-	ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading);
+	ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading, bThaiNum);
 	if (bThousand == _bUseSeparator)
 		return;
 
@@ -780,7 +780,7 @@
 	GetFormat(sFmtDescription, eLang);
 
 	// generate a new format ...
-	ImplGetFormatter()->GenerateFormat(sFmtDescription, m_nFormatKey, eLang, _bUseSeparator, IsRed, nPrecision, nAnzLeading);
+	ImplGetFormatter()->GenerateFormat(sFmtDescription, m_nFormatKey, eLang, _bUseSeparator, IsRed, nPrecision, nAnzLeading, bThaiNum);
 	// ... and introduce it to the formatter
 	USHORT nCheckPos;
 	ULONG  nNewKey;
@@ -798,9 +798,9 @@
 	DBG_ASSERT(!ImplGetFormatter()->IsTextFormat(m_nFormatKey),
 		"FormattedField::GetDecimalDigits : your'e sure what your'e doing when setting the precision of a text format ?");
 
-	BOOL bThousand, IsRed;
+	BOOL bThousand, IsRed, bThaiNum;
 	USHORT nPrecision, nAnzLeading;
-	ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading);
+	ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading, bThaiNum);
 
 	return nPrecision;
 }
@@ -812,9 +812,9 @@
 		"FormattedField::SetDecimalDigits : your'e sure what your'e doing when setting the precision of a text format ?");
 
 	// get the current settings
-	BOOL bThousand, IsRed;
+	BOOL bThousand, IsRed, bThaiNum;
 	USHORT nPrecision, nAnzLeading;
-	ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading);
+	ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading, bThaiNum);
 	if (nPrecision == _nPrecision)
 		return;
 
Index: svtools/source/numbers/numfmuno.cxx
===================================================================
RCS file: /cvsroot/thaioo/OpenOffice_Test/svtools/source/numbers/numfmuno.cxx,v
retrieving revision 1.1.1.1
diff -a -u -r1.1.1.1 numfmuno.cxx
--- svtools/source/numbers/numfmuno.cxx	15 Sep 2004 05:32:27 -0000	1.1.1.1
+++ svtools/source/numbers/numfmuno.cxx	27 Sep 2004 06:17:51 -0000
@@ -102,6 +102,8 @@
 #define PROPERTYNAME_THOUS		"ThousandsSeparator"
 #define PROPERTYNAME_USERDEF	"UserDefined"
 
+#define PROPERTYNAME_THAINUM		"ThaiNumber"
+
 #define PROPERTYNAME_NOZERO		"NoZero"
 #define PROPERTYNAME_NULLDATE	"NullDate"
 #define PROPERTYNAME_STDDEC		"StandardDecimals"
@@ -126,6 +128,7 @@
 		{MAP_CHAR_LEN(PROPERTYNAME_NEGRED),	  0, &getBooleanCppuType(),			beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY},
 		{MAP_CHAR_LEN(PROPERTYNAME_STDFORM),  0, &getBooleanCppuType(),			beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY},
 		{MAP_CHAR_LEN(PROPERTYNAME_THOUS),	  0, &getBooleanCppuType(),			beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY},
+		{MAP_CHAR_LEN(PROPERTYNAME_THAINUM),	  0, &getBooleanCppuType(),			beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY},
 		{MAP_CHAR_LEN(PROPERTYNAME_USERDEF),  0, &getBooleanCppuType(),			beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY},
 		{MAP_CHAR_LEN(PROPERTYNAME_CURRABB),  0, &getCppuType((rtl::OUString*)0),beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY},
 		{0,0,0,0}
@@ -637,7 +640,7 @@
 	if (pFormatter)
 	{
 		LanguageType eLang = lcl_GetLanguage( nLocale );
-		pFormatter->GenerateFormat( aRet, nBaseKey, eLang, bThousands, bRed, nDecimals, nLeading );
+		pFormatter->GenerateFormat( aRet, nBaseKey, eLang, bThousands, bRed, nDecimals, nLeading);
 	}
 	else
 		throw uno::RuntimeException();
@@ -807,7 +810,7 @@
 	const SvNumberformat* pFormat = pFormatter ? pFormatter->GetEntry(nKey) : NULL;
 	if (pFormat)
 	{
-		BOOL bThousand, bRed;
+		BOOL bThousand, bRed, bThaiNum;
 		USHORT nDecimals, nLeading;
 
 		String aString = aPropertyName;
@@ -842,24 +845,29 @@
 		}
 		else if (aString.EqualsAscii( PROPERTYNAME_DECIMALS ))
 		{
-			pFormat->GetFormatSpecialInfo( bThousand, bRed, nDecimals, nLeading );
+			pFormat->GetFormatSpecialInfo( bThousand, bRed, nDecimals, nLeading, bThaiNum );
 			aRet <<= (sal_Int16)( nDecimals );
 		}
 		else if (aString.EqualsAscii( PROPERTYNAME_LEADING ))
 		{
-			pFormat->GetFormatSpecialInfo( bThousand, bRed, nDecimals, nLeading );
+			pFormat->GetFormatSpecialInfo( bThousand, bRed, nDecimals, nLeading, bThaiNum );
 			aRet <<= (sal_Int16)( nLeading );
 		}
 		else if (aString.EqualsAscii( PROPERTYNAME_NEGRED ))
 		{
-			pFormat->GetFormatSpecialInfo( bThousand, bRed, nDecimals, nLeading );
+			pFormat->GetFormatSpecialInfo( bThousand, bRed, nDecimals, nLeading, bThaiNum );
 			aRet.setValue( &bRed, getBooleanCppuType() );
 		}
 		else if (aString.EqualsAscii( PROPERTYNAME_THOUS ))
 		{
-			pFormat->GetFormatSpecialInfo( bThousand, bRed, nDecimals, nLeading );
+			pFormat->GetFormatSpecialInfo( bThousand, bRed, nDecimals, nLeading, bThaiNum );
 			aRet.setValue( &bThousand, getBooleanCppuType() );
 		}
+		else if (aString.EqualsAscii( PROPERTYNAME_THAINUM ))
+		{
+			pFormat->GetFormatSpecialInfo( bThousand, bRed, nDecimals, nLeading, bThaiNum );
+			aRet.setValue( &bThaiNum, getBooleanCppuType() );
+		}		
 		else if (aString.EqualsAscii( PROPERTYNAME_CURRSYM ))
 		{
 			String aSymbol, aExt;
@@ -949,13 +957,13 @@
 		BOOL bStandard = ( ( nKey % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 );
 		//!	SvNumberformat Member bStandard rausreichen?
 		BOOL bUserDef = ( ( pFormat->GetType() & NUMBERFORMAT_DEFINED ) != 0 );
-		BOOL bThousand, bRed;
+		BOOL bThousand, bRed, bThaiNum;
 		USHORT nDecimals, nLeading;
-		pFormat->GetFormatSpecialInfo( bThousand, bRed, nDecimals, nLeading );
+		pFormat->GetFormatSpecialInfo( bThousand, bRed, nDecimals, nLeading, bThaiNum );
 		lang::Locale aLocale;
 		lcl_FillLocale( aLocale, pFormat->GetLanguage() );
 
-		uno::Sequence<beans::PropertyValue> aSeq(13);
+		uno::Sequence<beans::PropertyValue> aSeq(14);
 		beans::PropertyValue* pArray = aSeq.getArray();
 
 		pArray[0].Name = rtl::OUString::createFromAscii( PROPERTYNAME_FMTSTR );
@@ -984,6 +992,8 @@
 		pArray[11].Value <<= rtl::OUString( aExt );
 		pArray[12].Name = rtl::OUString::createFromAscii( PROPERTYNAME_CURRABB );
 		pArray[12].Value <<= rtl::OUString( aAbb );
+		pArray[13].Name = rtl::OUString::createFromAscii( PROPERTYNAME_THAINUM );
+		pArray[13].Value <<= rtl::OUString( aAbb );		
 
 		return aSeq;
 	}
Index: svtools/source/numbers/zforlist.cxx
===================================================================
RCS file: /cvsroot/thaioo/OpenOffice_Test/svtools/source/numbers/zforlist.cxx,v
retrieving revision 1.1.1.1
diff -a -u -r1.1.1.1 zforlist.cxx
--- svtools/source/numbers/zforlist.cxx	15 Sep 2004 05:32:27 -0000	1.1.1.1
+++ svtools/source/numbers/zforlist.cxx	27 Sep 2004 06:17:51 -0000
@@ -1863,17 +1863,21 @@
 											 BOOL& bThousand,
 											 BOOL& IsRed,
 											 USHORT& nPrecision,
-											 USHORT& nAnzLeading)
+											 USHORT& nAnzLeading,
+											 BOOL& bThaiNum)
 
 {
 	const SvNumberformat* pFormat = aFTable.Get(nFormat);
 	if (pFormat)
+	{
 		pFormat->GetFormatSpecialInfo(bThousand, IsRed,
-									  nPrecision, nAnzLeading);
+									  nPrecision, nAnzLeading, bThaiNum);
+	}
 	else
 	{
 		bThousand = FALSE;
 		IsRed = FALSE;
+		bThaiNum = FALSE;
 		nPrecision = pFormatScanner->GetStandardPrec();
 		nAnzLeading = 0;
 	}
@@ -1913,7 +1917,7 @@
 
 ULONG SvNumberFormatter::GetFormatSpecialInfo( const String& rFormatString,
 			BOOL& bThousand, BOOL& IsRed, USHORT& nPrecision,
-			USHORT& nAnzLeading, LanguageType eLnge )
+			USHORT& nAnzLeading, LanguageType eLnge, BOOL& bThaiNum )
 
 {
 	xub_StrLen nCheckPos = 0;
@@ -1925,11 +1929,12 @@
 	SvNumberformat* pFormat = new SvNumberformat( aTmpStr,
 		pFormatScanner, pStringScanner, nCheckPos, eLnge );
 	if ( nCheckPos == 0 )
-		pFormat->GetFormatSpecialInfo( bThousand, IsRed, nPrecision, nAnzLeading );
+		pFormat->GetFormatSpecialInfo( bThousand, IsRed, nPrecision, nAnzLeading, bThaiNum );
 	else
 	{
 		bThousand = FALSE;
 		IsRed = FALSE;
+		bThaiNum = FALSE;
 		nPrecision = pFormatScanner->GetStandardPrec();
 		nAnzLeading = 0;
 	}
@@ -2645,7 +2650,8 @@
 									   BOOL bThousand,
 									   BOOL IsRed,
 									   USHORT nPrecision,
-									   USHORT nAnzLeading)
+									   USHORT nAnzLeading,
+									   BOOL bThaiNum)
 {
 	if (eLnge == LANGUAGE_DONTKNOW)
         eLnge = IniLnge;
@@ -2734,21 +2740,30 @@
             ImpGetPosCurrFormat( sString, aSymbol );
             ImpGetNegCurrFormat( sNegStr, aSymbol );
 		}
+		sString += ';';
+		// ******************************************
+		// Insert Native Number 1 to Negative section
+		// in currency
+		if (bThaiNum)
+			sString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "[NatNum1]" ));
+		// ******************************************		
 		if (IsRed)
 		{
-			sString += ';';
 			sString += '[';
 			sString += pFormatScanner->GetRedString();
 			sString += ']';
 		}
-		else
-			sString += ';';
 		sString += sNegStr;
 	}
 	if (IsRed && eType != NUMBERFORMAT_CURRENCY)
 	{
 		String sTmpStr = sString;
 		sTmpStr += ';';
+		// ******************************************
+		// Insert Native Number 1 to Negative section
+		if (bThaiNum)
+			sTmpStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "[NatNum1]" ));
+		// ******************************************
 		sTmpStr += '[';
 		sTmpStr += pFormatScanner->GetRedString();
 		sTmpStr += ']';
@@ -2756,6 +2771,16 @@
 		sTmpStr +=sString;
 		sString = sTmpStr;
 	}
+	// ******************************************
+	// Insert Native Number 1 to Positive section
+	if (bThaiNum)
+	{
+		String sTmpStr;
+		sTmpStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "[NatNum1]" ));
+		sTmpStr += sString;
+		sString = sTmpStr;
+	}
+	// ******************************************
 }
 
 BOOL SvNumberFormatter::IsUserDefined(const String& sStr,
Index: svtools/source/numbers/zformat.cxx
===================================================================
RCS file: /cvsroot/thaioo/OpenOffice_Test/svtools/source/numbers/zformat.cxx,v
retrieving revision 1.1.1.1
diff -a -u -r1.1.1.1 zformat.cxx
--- svtools/source/numbers/zformat.cxx	15 Sep 2004 05:32:27 -0000	1.1.1.1
+++ svtools/source/numbers/zformat.cxx	27 Sep 2004 06:17:52 -0000
@@ -3690,7 +3690,8 @@
 void SvNumberformat::GetFormatSpecialInfo(BOOL& bThousand,
                                           BOOL& IsRed,
                                           USHORT& nPrecision,
-                                          USHORT& nAnzLeading) const
+                                          USHORT& nAnzLeading,
+					  BOOL& bThaiNum) const
 {
     // as before: take info from nNumFor=0 for whole format (for dialog etc.)
 
@@ -3705,6 +3706,20 @@
         IsRed = TRUE;
     else
         IsRed = FALSE;
+
+    // Get native number
+    BYTE n, natnum;
+    bThaiNum = FALSE;
+    for (n=0; n<4; n++)
+    {
+	natnum = NumFor[n].GetNatNum().GetNatNum();
+	// native number type 1
+	if (natnum == 1)
+	{
+	    bThaiNum = TRUE;
+	    break;
+	}
+    }
 }
 
 void SvNumberformat::GetNumForInfo( USHORT nNumFor, short& rScannedType,
Index: svx/inc/numfmt.hxx
===================================================================
RCS file: /cvsroot/thaioo/OpenOffice_Test/svx/inc/numfmt.hxx,v
retrieving revision 1.1.1.1
diff -a -u -r1.1.1.1 numfmt.hxx
--- svx/inc/numfmt.hxx	15 Sep 2004 05:29:07 -0000	1.1.1.1
+++ svx/inc/numfmt.hxx	27 Sep 2004 06:17:53 -0000
@@ -194,6 +194,7 @@
 	NumericField			aEdLeadZeroes;
 	CheckBox				aBtnNegRed;
 	CheckBox				aBtnThousand;
+	CheckBox				aBtnThaiNum;
     FixedLine               aFlOptions;
 
 	FixedText				aFtEdFormat;
Index: svx/inc/numfmtsh.hxx
===================================================================
RCS file: /cvsroot/thaioo/OpenOffice_Test/svx/inc/numfmtsh.hxx,v
retrieving revision 1.1.1.1
diff -a -u -r1.1.1.1 numfmtsh.hxx
--- svx/inc/numfmtsh.hxx	15 Sep 2004 05:29:07 -0000	1.1.1.1
+++ svx/inc/numfmtsh.hxx	27 Sep 2004 06:17:53 -0000
@@ -195,14 +195,16 @@
 									BOOL    bNegRed,
 									USHORT  nPrecision,
 									USHORT  nLeadingZeroes,
-									USHORT  nCurrencyEntryPos);
+									USHORT  nCurrencyEntryPos,
+									BOOL    bThaiNum);
 
 	void				GetOptions( const String& rFormat,
 									BOOL&         rThousand,
 									BOOL&         rNegRed,
 									USHORT&       rPrecision,
 									USHORT&       rLeadingZeroes,
-									USHORT&       rCatLbPos );
+									USHORT&       rCatLbPos,
+									BOOL&         rThaiNum );
 
 	void				MakePreviewString( const String& rFormatStr,
 										   String&       rPreviewStr,
Index: svx/source/dialog/numfmt.cxx
===================================================================
RCS file: /cvsroot/thaioo/OpenOffice_Test/svx/source/dialog/numfmt.cxx,v
retrieving revision 1.1.1.1
diff -a -u -r1.1.1.1 numfmt.cxx
--- svx/source/dialog/numfmt.cxx	15 Sep 2004 05:29:11 -0000	1.1.1.1
+++ svx/source/dialog/numfmt.cxx	27 Sep 2004 06:17:53 -0000
@@ -308,6 +308,7 @@
 		aIbInfo			( this, ResId( IB_INFO		) ),
 		aBtnNegRed		( this, ResId( BTN_NEGRED ) ),
 		aBtnThousand	( this, ResId( BTN_THOUSAND ) ),
+		aBtnThaiNum		( this, ResId( BTN_THAINUM ) ),
 		aFtLeadZeroes	( this, ResId( FT_LEADZEROES ) ),
 		aFtDecimals		( this, ResId( FT_DECIMALS ) ),
 		aEdLeadZeroes	( this, ResId( ED_LEADZEROES ) ),
@@ -419,7 +420,8 @@
 	aEdDecimals		.SetModifyHdl( aLink );
 	aEdLeadZeroes	.SetModifyHdl( aLink );
 	aBtnNegRed		.SetClickHdl( aLink );
-	aBtnThousand	.SetClickHdl( aLink );
+	aBtnThousand		.SetClickHdl( aLink );
+	aBtnThaiNum		.SetClickHdl( aLink );
 	aLbFormat		.SetDoubleClickHdl( HDL( DoubleClickHdl_Impl ) );
 	aEdFormat		.SetModifyHdl( HDL( EditHdl_Impl ) );
 	aIbAdd.SetClickHdl( HDL( ClickHdl_Impl ) );
@@ -734,6 +736,7 @@
 
 	aBtnNegRed		.Disable();
 	aBtnThousand	.Disable();
+	aBtnThaiNum		.Disable();
 	aFtLeadZeroes	.Disable();
 	aFtDecimals		.Disable();
 	aEdLeadZeroes	.Disable();
@@ -743,6 +746,7 @@
 	aEdLeadZeroes	.SetText( String() );
 	aBtnNegRed		.Check( FALSE );
 	aBtnThousand	.Check( FALSE );
+	aBtnThaiNum		.Check( FALSE );
     aWndPreview     .NotifyChange( String() );
 
 	aLbCategory		.SelectEntryPos( 0 );
@@ -775,6 +779,7 @@
     aEdLeadZeroes   .Enable( bEnable );
     aBtnNegRed      .Enable( bEnable );
     aBtnThousand    .Enable( bEnable );
+    aBtnThaiNum     .Enable( bEnable );
     aFlOptions      .Enable( bEnable );
     aFtEdFormat     .Enable( bEnable );
     aEdFormat       .Enable( bEnable );
@@ -1083,6 +1088,7 @@
 	USHORT	nZeroes				= 0;
 	BOOL	bNegRed				= FALSE;
 	BOOL	bThousand			= FALSE;
+	BOOL	bThaiNum			= FALSE;
 	short	nTmpCatPos;
 	USHORT	nCurrencyPos		=aLbCurrency.GetSelectEntryPos();
 
@@ -1100,7 +1106,7 @@
 	pNumFmtShell->GetOptions( theFormat,
 							  bThousand, bNegRed,
 							  nDecimals, nZeroes,
-							  nCategory );
+							  nCategory, bThaiNum );
 	BOOL bDoIt=FALSE;
 	if(nCategory==CAT_CURRENCY)
 	{
@@ -1152,6 +1158,7 @@
 			aEdLeadZeroes.Enable();
 			aBtnNegRed.Enable();
 			aBtnThousand.Enable();
+			aBtnThaiNum.Enable();
 			/*
 			aEdDecimals	 .SetValue( nDecimals );
 			aEdLeadZeroes.SetValue( nZeroes );
@@ -1160,6 +1167,7 @@
 			aEdLeadZeroes.SetText( UniString::CreateFromInt32( nZeroes ) );
 			aBtnNegRed	 .Check( bNegRed );
 			aBtnThousand .Check( bThousand );
+			aBtnThaiNum 	.Check( bThaiNum );
 			break;
 
 		case CAT_ALL:
@@ -1178,10 +1186,12 @@
 			aEdLeadZeroes	.Disable();
 			aBtnNegRed		.Disable();
 			aBtnThousand	.Disable();
+			aBtnThaiNum		.Disable();
 			aEdDecimals		.SetText( UniString::CreateFromInt32( 0 ) );
 			aEdLeadZeroes	.SetText( UniString::CreateFromInt32( 0 ) );
 			aBtnNegRed		.Check( FALSE );
 			aBtnThousand	.Check( FALSE );
+			aBtnThaiNum		.Check( FALSE );
 	}
 }
 
@@ -1737,11 +1747,14 @@
 	if (   ((NumericField*)pOptCtrl == &aEdLeadZeroes)
 		|| ((NumericField*)pOptCtrl == &aEdDecimals)
 		|| ((CheckBox*)    pOptCtrl == &aBtnNegRed)
-		|| ((CheckBox*)    pOptCtrl == &aBtnThousand) )
+		|| ((CheckBox*)    pOptCtrl == &aBtnThousand)
+		|| ((CheckBox*)    pOptCtrl == &aBtnThaiNum) )
 	{
 		String		  aFormat;
 		BOOL		  bThousand 	=    aBtnThousand.IsEnabled()
 									  && aBtnThousand.IsChecked();
+		BOOL		  bThaiNum 	=    aBtnThaiNum.IsEnabled()
+									  && aBtnThaiNum.IsChecked();
 		BOOL		  bNegRed		=    aBtnNegRed.IsEnabled()
 									  && aBtnNegRed.IsChecked();
 		USHORT		  nPrecision	= (aEdDecimals.IsEnabled())
@@ -1754,7 +1767,7 @@
 		pNumFmtShell->MakeFormat( aFormat,
 								  bThousand, bNegRed,
 								  nPrecision, nLeadZeroes,
-								  (USHORT)aLbFormat.GetSelectEntryPos() );
+								  (USHORT)aLbFormat.GetSelectEntryPos(), bThaiNum );
 
 		aEdFormat.SetText( aFormat );
 		//aFtComment.SetText(String());
Index: svx/source/dialog/numfmt.hrc
===================================================================
RCS file: /cvsroot/thaioo/OpenOffice_Test/svx/source/dialog/numfmt.hrc,v
retrieving revision 1.1.1.1
diff -a -u -r1.1.1.1 numfmt.hrc
--- svx/source/dialog/numfmt.hrc	15 Sep 2004 05:29:11 -0000	1.1.1.1
+++ svx/source/dialog/numfmt.hrc	27 Sep 2004 06:17:53 -0000
@@ -100,6 +100,8 @@
 #define IL_ICON_HC				36
 #define STR_AUTO_ENTRY          37
 
+#define BTN_THAINUM				50
+
 #define TBX_ADDREMOVE			1
 #define IID_ADD					1
 #define IID_REMOVE				2
Index: svx/source/dialog/numfmt.src
===================================================================
RCS file: /cvsroot/thaioo/OpenOffice_Test/svx/source/dialog/numfmt.src,v
retrieving revision 1.1.1.1
diff -a -u -r1.1.1.1 numfmt.src
--- svx/source/dialog/numfmt.src	15 Sep 2004 05:29:11 -0000	1.1.1.1
+++ svx/source/dialog/numfmt.src	27 Sep 2004 06:17:53 -0000
@@ -1150,7 +1150,7 @@
 	};
 	CheckBox BTN_NEGRED
 	{
-        Pos = MAP_APPFONT ( 133 , 104 ) ;
+        Pos = MAP_APPFONT ( 133 , 102 ) ;
 		Size = MAP_APPFONT ( 100 , 10 ) ;
 		Text = "Negativ in ~Rot" ;
 		Text [ ENGLISH ] = "~Mark negative red" ;
@@ -1197,7 +1197,7 @@
 	};
 	CheckBox BTN_THOUSAND
 	{
-        Pos = MAP_APPFONT ( 133 , 120 ) ;
+        Pos = MAP_APPFONT ( 133 , 112 ) ;
 		Size = MAP_APPFONT ( 100 , 10 ) ;
 		Text = "~Tausenderpunkt" ;
 		Text [ ENGLISH ] = "~Thousands point" ;
@@ -1242,7 +1240,15 @@
 		Text[ kannada ] = "ಸಾವಿರ�?ಳ ವಿಭಾ�?�?";
 		Text[ galician ] = "~Separador de miles";
 	};
-    FixedLine FL_OPTIONS
+	CheckBox BTN_THAINUM
+	{
+        Pos = MAP_APPFONT ( 133 , 122 ) ;
+		Size = MAP_APPFONT ( 100 , 10 ) ;
+		Text = "T~hai number" ;
+		Text [ ENGLISH ] = "T~hai number" ;
+		Text [ thai ] = "T~hai number" ;
+	};
+    	FixedLine FL_OPTIONS
 	{
         Pos = MAP_APPFONT ( 6 , 91 ) ;
         Size = MAP_APPFONT ( 248 , 8 ) ;
Index: svx/source/fmcomp/gridcell.cxx
===================================================================
RCS file: /cvsroot/thaioo/OpenOffice_Test/svx/source/fmcomp/gridcell.cxx,v
retrieving revision 1.1.1.1
diff -a -u -r1.1.1.1 gridcell.cxx
--- svx/source/fmcomp/gridcell.cxx	15 Sep 2004 05:29:12 -0000	1.1.1.1
+++ svx/source/fmcomp/gridcell.cxx	27 Sep 2004 06:17:53 -0000
@@ -1686,7 +1686,8 @@
         // und dann ein Format generieren, dass die gewuenschten Nachkommastellen usw. hat
         String sFormatString;
         LanguageType aAppLanguage = Application::GetSettings().GetUILanguage();
-        pFormatterUsed->GenerateFormat( sFormatString, 0, aAppLanguage, bThousand, sal_False, nScale );
+	pFormatterUsed->GenerateFormat( sFormatString, 0, aAppLanguage, bThousand, sal_False, nScale );
+        //pFormatterUsed->GenerateFormat( sFormatString, 0, aAppLanguage, bThousand, sal_False, nScale, bThaiNum );
 
         static_cast< DoubleNumericField* >( m_pWindow )->SetFormat( sFormatString, aAppLanguage );
         static_cast< DoubleNumericField* >( m_pPainter )->SetFormat( sFormatString, aAppLanguage );
Index: svx/source/items/numfmtsh.cxx
===================================================================
RCS file: /cvsroot/thaioo/OpenOffice_Test/svx/source/items/numfmtsh.cxx,v
retrieving revision 1.1.1.1
diff -a -u -r1.1.1.1 numfmtsh.cxx
--- svx/source/items/numfmtsh.cxx	15 Sep 2004 05:29:13 -0000	1.1.1.1
+++ svx/source/items/numfmtsh.cxx	27 Sep 2004 06:17:53 -0000
@@ -409,7 +409,7 @@
 void SvxNumberFormatShell::MakeFormat( String& rFormat,
 									   sal_Bool bThousand, sal_Bool bNegRed,
 									   sal_uInt16 nPrecision, sal_uInt16 nLeadingZeroes,
-									   sal_uInt16 nCurrencyPos)
+									   sal_uInt16 nCurrencyPos, sal_Bool bThaiNum)
 {
 	if(aCurrencyFormatList.Count()>nCurrencyPos)
 	{
@@ -431,7 +431,8 @@
 			pFormatter->GenerateFormat( rFormat, nCurFormatKey,
 										eCurLanguage,
 										bThousand, bNegRed,
-										nPrecision, nLeadingZeroes );
+										nPrecision, nLeadingZeroes,
+										bThaiNum );
 		}
 		aFmtEList.DeleteAndDestroy(0,aFmtEList.Count());
 	}
@@ -440,7 +441,8 @@
 		pFormatter->GenerateFormat( rFormat, nCurFormatKey,
 									eCurLanguage,
 									bThousand, bNegRed,
-									nPrecision, nLeadingZeroes );
+									nPrecision, nLeadingZeroes,
+									bThaiNum );
 	}
 }
 
@@ -451,9 +453,9 @@
 									   sal_Bool&			rNegRed,
 									   sal_uInt16&			rPrecision,
 									   sal_uInt16&			rLeadingZeroes,
-									   sal_uInt16&			rCatLbPos )
+									   sal_uInt16&			rCatLbPos,
+									   sal_Bool&			rThaiNum )
 {
-
 	sal_uInt32 nFmtKey = pFormatter->GetEntryKey( rFormat, eCurLanguage );
 
 	if(nFmtKey != NUMBERFORMAT_ENTRY_NOT_FOUND)
@@ -462,7 +464,7 @@
 		{
 			pFormatter->GetFormatSpecialInfo( nFmtKey,
 											  rThousand, rNegRed,
-											  rPrecision, rLeadingZeroes );
+											  rPrecision, rLeadingZeroes, rThaiNum );
 
 			CategoryToPos_Impl( pFormatter->GetType( nFmtKey ), rCatLbPos );
 		}
@@ -476,7 +478,7 @@
 
 		if(IsInTable(nPos,bTestBanking,rFormat) &&
 			pFormatter->GetFormatSpecialInfo( rFormat,rThousand, rNegRed,
-								  rPrecision, rLeadingZeroes,eCurLanguage)==0)
+								  rPrecision, rLeadingZeroes,eCurLanguage, rThaiNum)==0)
 		{
 			rCatLbPos = CAT_CURRENCY;
 		}
