? abi/src/WIN32_1.1.8_i386_DBG
Index: abi/src/text/fmt/xp/fp_Line.cpp
===================================================================
RCS file: /cvsroot/abi/src/text/fmt/xp/fp_Line.cpp,v
retrieving revision 1.85
diff -u -r1.85 fp_Line.cpp
--- abi/src/text/fmt/xp/fp_Line.cpp	2001/02/27 07:29:12	1.85
+++ abi/src/text/fmt/xp/fp_Line.cpp	2001/02/28 23:30:05
@@ -1511,6 +1511,7 @@
 
 UT_sint32 fp_Line::_createMapOfRuns()
 {
+	UT_uint32 i=0;
 	if(!m_iRunsRTLcount)
 	{
 		//UT_DEBUGMSG(("_createMapOfRuns: ltr line only\n"));
@@ -1564,7 +1565,7 @@
 		if(!m_iRunsLTRcount)
 		{
 			//UT_DEBUGMSG(("_createMapOfRuns: rtl line only\n"));			
-			for(UT_uint32 i = 0; i < count/2; i++)
+			for(i = 0; i < count/2; i++)
 			{
 				s_pMapOfRuns[i]= count - i - 1;
 				s_pMapOfRuns[count - i - 1] = i;
@@ -1581,7 +1582,7 @@
 			// neutral runs -1 and the rest 0
 			UT_sint32 RTLdominant = m_pBlock->getDominantDirection();
 			UT_sint32 iRunDirection;
-			for (UT_uint32 i=0; i < count; i++)
+			for (i=0; i < count; i++)
 			{
 				fp_TextRun* pRun = (fp_TextRun*) m_vecRuns.getNthItem(i);
 				iRunDirection = pRun->getDirection();
@@ -1613,7 +1614,7 @@
         	//UT_DEBUGMSG(("pre-map0 %d, %d, %d, %d, %d, %d\n", s_pMapOfRuns[0], s_pMapOfRuns[1], s_pMapOfRuns[2], s_pMapOfRuns[3], s_pMapOfRuns[4], s_pMapOfRuns[5]));
 
         	UT_uint32 j;
-        	for (UT_uint32 i=0; i < count; i++)
+        	for (i=0; i < count; i++)
         	{
             	if(s_pMapOfRuns[i] == -1) //directionally neutral, i.e., whitespace
 				{
@@ -1642,7 +1643,7 @@
 
         	//UT_DEBUGMSG(("pre-map1 %d, %d, %d, %d, %d, %d\n", s_pMapOfRuns[0], s_pMapOfRuns[1], s_pMapOfRuns[2], s_pMapOfRuns[3], s_pMapOfRuns[4], s_pMapOfRuns[5]));
         	//now we can do the reorganisation
-        	for (UT_uint32 i=0; i < count; i++)
+        	for (i=0; i < count; i++)
         	{
 				if(s_pMapOfRuns[i] != 0) //foreign direction of text
 				{
@@ -1670,7 +1671,7 @@
 
         if(RTLdominant) //we have to switch all the runs around the centre.
 		{
-            for (UT_uint32 i = 0; i < count/2; i++)
+            for (i = 0; i < count/2; i++)
 			{
                 UT_ASSERT((count - i - 1) < count);
                 temp = s_pMapOfRuns[i];
Index: abi/src/wp/ap/win/ap_Win32Dialog_Options.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Dialog_Options.cpp,v
retrieving revision 1.19
diff -u -r1.19 ap_Win32Dialog_Options.cpp
--- abi/src/wp/ap/win/ap_Win32Dialog_Options.cpp	2001/02/08 23:12:01	1.19
+++ abi/src/wp/ap/win/ap_Win32Dialog_Options.cpp	2001/02/28 23:30:25
@@ -423,6 +423,17 @@
 	
 	case AP_RID_DIALOG_OPT_OTHER:
 		{
+			// Hidi Bidi Controls
+			HWND hwndBidiBox = GetDlgItem(hWnd, AP_RID_DIALOG_OPTIONS_LBL_BidiOptions);
+			HWND hwndBidiChk = GetDlgItem(hWnd, AP_RID_DIALOG_OPTIONS_CHK_OtherDirectionRtl);
+			ShowWindow( hwndBidiBox, SW_HIDE);
+			ShowWindow( hwndBidiChk, SW_HIDE);
+#ifdef BIDI_ENABLED
+			ShowWindow( hwndBidiBox, SW_SHOW);
+			ShowWindow( hwndBidiChk, SW_SHOW);
+			_DS(OPTIONS_LBL_BidiOptions,			DLG_Options_Label_BiDiOptions);
+			_DS(OPTIONS_CHK_OtherDirectionRtl,		DLG_Options_Label_DirectionRtl);
+#endif					
 			_DS(OPTIONS_CHK_SmartQuotesEnable,		DLG_Options_Label_SmartQuotesEnable);
 		}
 		break;
@@ -492,6 +503,10 @@
 	case AP_RID_DIALOG_OPTIONS_COMBO_UNITS:
 		return 0;
 
+#ifdef BIDI_ENABLED
+	case AP_RID_DIALOG_OPTIONS_CHK_OtherDirectionRtl:	_enableDisableLogic(id_CHECK_OTHER_DEFAULT_DIRECTION_RTL);	return 0;
+#endif
+		
 	default:
 		UT_DEBUGMSG(("WM_Command for id %ld for sub-dialog\n",wId));
 		return 0;
@@ -614,6 +629,12 @@
 	case id_CHECK_SMART_QUOTES_ENABLE:
 		EnableWindow(GetDlgItem((HWND)m_vecSubDlgHWnd.getNthItem(OTHER_INDEX),id_CHECK_SMART_QUOTES_ENABLE),value);
 		return;
+
+#ifdef BIDI_ENABLED
+	case id_CHECK_OTHER_DEFAULT_DIRECTION_RTL:
+		EnableWindow(GetDlgItem((HWND)m_vecSubDlgHWnd.getNthItem(OTHER_INDEX),id_CHECK_OTHER_DEFAULT_DIRECTION_RTL),value);
+		return;
+#endif
 		
 	default:
 //		UT_ASSERT(UT_SHOULD_NOT_HAPPEN);
@@ -643,6 +664,9 @@
 DEFINE_GET_SET_BOOL(SPELL_INDEX,SpellInternet);
 
 DEFINE_GET_SET_BOOL(OTHER_INDEX,SmartQuotesEnable);
+#ifdef BIDI_ENABLED
+DEFINE_GET_SET_BOOL(OTHER_INDEX,OtherDirectionRtl);
+#endif
 
 DEFINE_GET_SET_BOOL(PREF_INDEX,PrefsAutoSave);
 
Index: abi/src/wp/ap/win/ap_Win32Dialog_Options.h
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Dialog_Options.h,v
retrieving revision 1.9
diff -u -r1.9 ap_Win32Dialog_Options.h
--- abi/src/wp/ap/win/ap_Win32Dialog_Options.h	2001/02/06 22:54:54	1.9
+++ abi/src/wp/ap/win/ap_Win32Dialog_Options.h	2001/02/28 23:30:28
@@ -69,7 +69,11 @@
  	SET_GATHER			(ViewAll,			bool );
  	SET_GATHER			(ViewHiddenText,	bool );
  	SET_GATHER			(ViewUnprintable,	bool );
-  
+
+#ifdef BIDI_ENABLED
+	SET_GATHER			(OtherDirectionRtl,	bool );
+#endif  
+
  	SET_GATHER			(NotebookPageNum,	int );
 #undef SET_GATHER
 	
Index: abi/src/wp/ap/win/ap_Win32Dialog_Paragraph.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Dialog_Paragraph.cpp,v
retrieving revision 1.14
diff -u -r1.14 ap_Win32Dialog_Paragraph.cpp
--- abi/src/wp/ap/win/ap_Win32Dialog_Paragraph.cpp	2001/02/06 22:54:54	1.14
+++ abi/src/wp/ap/win/ap_Win32Dialog_Paragraph.cpp	2001/02/28 23:30:37
@@ -310,6 +310,15 @@
 		{
 			m_hwndSpacing = hWnd;
 
+			// Hide Bidi Check Box unless required
+			{
+				HWND hwndBidi = GetDlgItem(hWnd, AP_RID_DIALOG_PARA_CHECK_BIDI);
+				ShowWindow(hwndBidi,SW_HIDE);
+#ifdef BIDI_ENABLED
+				ShowWindow(hwndBidi,SW_SHOW);
+#endif
+			}
+			
 			// localize controls
 			_DS(PARA_TEXT_ALIGN,		DLG_Para_LabelAlignment);
 			_DS(PARA_TEXT_INDENT,		DLG_Para_LabelIndentation);
@@ -322,6 +331,9 @@
 			_DS(PARA_TEXT_AFTER,		DLG_Para_LabelAfter);
 			_DS(PARA_TEXT_LEAD,			DLG_Para_LabelLineSpacing);
 			_DS(PARA_TEXT_AT,			DLG_Para_LabelAt);
+#ifdef BIDI_ENABLED
+			_DS(PARA_CHECK_BIDI,		DLG_Para_DomDirection);
+#endif
 
 			// populate fixed choices
 			{
@@ -355,6 +367,10 @@
 			_SST(PARA_EDIT_BEFORE,	id_SPIN_BEFORE_SPACING);
 			_SST(PARA_EDIT_AFTER,	id_SPIN_AFTER_SPACING);
 			_SST(PARA_EDIT_AT,		id_SPIN_SPECIAL_SPACING);
+#ifdef BIDI_ENABLED
+			_SST(PARA_CHECK_BIDI,	id_CHECK_DOMDIRECTION);
+#endif
+			
 		}
 		break;
 
@@ -505,6 +521,9 @@
 	_CHECK(PARA_CHECK_BREAK,	id_CHECK_PAGE_BREAK);
 	_CHECK(PARA_CHECK_SUPPRESS,	id_CHECK_SUPPRESS);
 	_CHECK(PARA_CHECK_NOHYPHEN,	id_CHECK_NO_HYPHENATE);
+#ifdef BIDI_ENABLED
+	_CHECK(PARA_CHECK_BIDI,		id_CHECK_DOMDIRECTION);
+#endif
 
 	case IDCANCEL:						// also AP_RID_DIALOG_PARA_BTN_CANCEL
 		m_answer = a_CANCEL;
Index: abi/src/wp/ap/win/ap_Win32Res_DlgOptions.rc2
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Res_DlgOptions.rc2,v
retrieving revision 1.9
diff -u -r1.9 ap_Win32Res_DlgOptions.rc2
--- abi/src/wp/ap/win/ap_Win32Res_DlgOptions.rc2	2000/08/11 15:20:33	1.9
+++ abi/src/wp/ap/win/ap_Win32Res_DlgOptions.rc2	2001/02/28 23:30:44
@@ -65,6 +65,8 @@
 #define AP_RID_DIALOG_OPTIONS_CHK_ViewShowFormatBar		1038
 #define AP_RID_DIALOG_OPTIONS_CHK_ViewShowExtraBar		1039
 #define AP_RID_DIALOG_OPTIONS_CHK_ViewShowStatusBar		1040
+#define AP_RID_DIALOG_OPTIONS_LBL_BidiOptions			1041
+#define AP_RID_DIALOG_OPTIONS_CHK_OtherDirectionRtl		1042
 
 #ifdef RC_INVOKED
 // NOTE -- these placeholder strings get overridden at runtime 
@@ -185,6 +187,11 @@
 BEGIN
 	AUTOCHECKBOX    "Enable smart quotes",
                     AP_RID_DIALOG_OPTIONS_CHK_SmartQuotesEnable, 7, 11, 300, 10
+	GROUPBOX		"Bi-Directional Options...", AP_RID_DIALOG_OPTIONS_LBL_BidiOptions,
+					7, 29, 305, 30
+	CONTROL			"Default to right-to-left direction of text:", AP_RID_DIALOG_OPTIONS_CHK_OtherDirectionRtl ,
+					"Button", BS_AUTOCHECKBOX | WS_TABSTOP,
+					15, 42, 291, 10
 END
 
 #endif /* RC_INVOKED */
Index: abi/src/wp/ap/win/ap_Win32Res_DlgParagraph.rc2
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Res_DlgParagraph.rc2,v
retrieving revision 1.4
diff -u -r1.4 ap_Win32Res_DlgParagraph.rc2
--- abi/src/wp/ap/win/ap_Win32Res_DlgParagraph.rc2	1999/10/18 03:32:51	1.4
+++ abi/src/wp/ap/win/ap_Win32Res_DlgParagraph.rc2	2001/02/28 23:30:50
@@ -67,6 +67,7 @@
 #define AP_RID_DIALOG_PARA_TEXT_AT				1035
 #define AP_RID_DIALOG_PARA_EDIT_AT				1036
 #define AP_RID_DIALOG_PARA_SPIN_AT				1037
+#define AP_RID_DIALOG_PARA_CHECK_BIDI			1038
 
 // second tab
 #define AP_RID_DIALOG_PARA_TEXT_PAGE			1050
@@ -104,6 +105,8 @@
     LTEXT           "Ali&gnment:",		AP_RID_DIALOG_PARA_TEXT_ALIGN,	2,6,43,8
     COMBOBOX							AP_RID_DIALOG_PARA_COMBO_ALIGN,	54,4,52,59,
 										CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+	CONTROL			"Bidi:",			AP_RID_DIALOG_PARA_CHECK_BIDI,	
+										"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 141,6,52,8,
     LTEXT           "&Outline level:",	AP_RID_DIALOG_PARA_TEXT_LEVEL,	141,6,43,8,NOT WS_VISIBLE
     COMBOBOX							AP_RID_DIALOG_PARA_COMBO_LEVEL,	198,4,52,97,
 										CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP