rpms/openoffice.org/F-9 workspace.os114.patch, NONE, 1.1 openoffice.org.spec, 1.1480, 1.1481

Caolan McNamara (caolanm) fedora-extras-commits at redhat.com
Mon May 12 08:44:25 UTC 2008


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21297

Modified Files:
	openoffice.org.spec 
Added Files:
	workspace.os114.patch 
Log Message:
add workspace.os114.patch

workspace.os114.patch:

--- NEW FILE workspace.os114.patch ---
Index: util/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
diff -u util/officecfg/registry/schema/org/openoffice/Office/Writer.xcs:1.48.28.1 util/officecfg/registry/schema/org/openoffice/Office/Writer.xcs:1.48.28.1.6.1
--- util/officecfg/registry/schema/org/openoffice/Office/Writer.xcs:1.48.28.1	Thu Jan 31 03:30:58 2008
+++ util/officecfg/registry/schema/org/openoffice/Office/Writer.xcs	Wed Apr 30 05:01:43 2008
@@ -6805,6 +6805,12 @@
 					</constraints>
 					<value>0</value>
 				</prop>
+                                <prop oor:name="RegardHindiDigits" oor:type="xs:long">
+                                        <info>
+                                                <desc>If true yields to digits marked as CTL script to be imported as Hindi digits.</desc>
+                                        </info>
+                                        <value>0</value>
+                                </prop>
 			</group>
 			<group oor:name="Writer">
 				<info>
Index: sw/sw/source/filter/ww8/ww8par.cxx
diff -u sw/sw/source/filter/ww8/ww8par.cxx:1.185 sw/sw/source/filter/ww8/ww8par.cxx:1.185.60.1
--- sw/sw/source/filter/ww8/ww8par.cxx:1.185	Mon Nov 26 09:30:58 2007
+++ sw/sw/source/filter/ww8/ww8par.cxx	Wed Apr 30 05:02:43 2008
@@ -2523,6 +2523,37 @@
         return cChar;
 }
 
+bool SwWW8ImplReader::LangUsesHindiNumbers(USHORT nLang)
+{
+	bool bResult = false;
+	
+	switch (nLang)
+	{
+		case 0x1401: // Arabic(Algeria)
+		case 0x3c01: // Arabic(Bahrain)
+		case 0xc01: // Arabic(Egypt)
+		case 0x801: // Arabic(Iraq)
+		case 0x2c01: // Arabic (Jordan)
+		case 0x3401: // Arabic(Kuwait)
+		case 0x3001: // Arabic(Lebanon)
+		case 0x1001: // Arabic(Libya)
+		case 0x1801: // Arabic(Morocco)
+		case 0x2001: // Arabic(Oman)
+		case 0x4001: // Arabic(Qatar)
+		case 0x401: // Arabic(Saudi Arabia)
+		case 0x2801: // Arabic(Syria)
+		case 0x1c01: // Arabic(Tunisia)
+		case 0x3801: // Arabic(U.A.E)
+		case 0x2401: // Arabic(Yemen)
+			bResult = true;
+			break;
+		default:
+			break;
+	}
+	
+	return bResult;
+}
+
 sal_Unicode SwWW8ImplReader::TranslateToHindiNumbers(sal_Unicode nChar)
 {
     if (nChar >= 0x0030 && nChar <= 0x0039)
@@ -2566,6 +2597,11 @@
     UINT16 nUCode;
     xub_StrLen nL2;
 
+	USHORT nCTLLang = 0;
+	const SfxPoolItem * pItem = GetFmtAttr(RES_CHRATR_CTL_LANGUAGE);
+	if (pItem != NULL)
+		nCTLLang = dynamic_cast<const SvxLanguageItem *>(pItem)->GetLanguage();
+	
     for( nL2 = 0; nL2 < nLen; ++nL2, ++pWork )
     {
         if (bIsUnicode)
@@ -2614,7 +2650,7 @@
         else
             *pWork = Custom8BitToUnicode(hConverter, nBCode);
 
-        if (nIdctHint == 2)
+        if (m_bRegardHindiDigits && bBidi && LangUsesHindiNumbers(nCTLLang))
         {
             *pWork = TranslateToHindiNumbers(*pWork);
         }
@@ -3300,9 +3336,11 @@
 	mpAtnNames(0),
 	pAuthorInfos(0),
 	sBaseURL(rBaseURL),
+    m_bRegardHindiDigits( false ),
     mbNewDoc(bNewDoc),
 	nDropCap(0),
-    nIdctHint(0)
+    nIdctHint(0),
+	bBidi(false)
 {
     pStrm->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
     nWantedVersion = nVersionPara;
@@ -4721,15 +4759,17 @@
     ULONG nErrRet = 0;
 
     {
-        static const sal_Char* aNames[ 12 ] = {
+        static const sal_Char* aNames[ 13 ] = {
             "WinWord/WW", "WinWord/WW8", "WinWord/WWFT",
             "WinWord/WWFLX", "WinWord/WWFLY",
             "WinWord/WWF",
             "WinWord/WWFA0", "WinWord/WWFA1", "WinWord/WWFA2",
-            "WinWord/WWFB0", "WinWord/WWFB1", "WinWord/WWFB2"
+            "WinWord/WWFB0", "WinWord/WWFB1", "WinWord/WWFB2",
+            "WinWord/RegardHindiDigits"
         };
-        sal_uInt32 aVal[ 12 ];
-        SwFilterOptions aOpt( 12, aNames, aVal );
+        sal_uInt32 aVal[ 13 ];
+ 
+        SwFilterOptions aOpt( 13, aNames, aVal );
 
         nIniFlags = aVal[ 0 ];
         nIniFlags1= aVal[ 1 ];
@@ -4744,6 +4784,7 @@
         nFieldTagBad[0] = aVal[ 9 ];
         nFieldTagBad[1] = aVal[ 10 ];
         nFieldTagBad[2] = aVal[ 11 ];
+        m_bRegardHindiDigits = aVal[ 12 ] > 0;
     }
 
     UINT16 nMagic;
Index: sw/sw/source/filter/ww8/ww8par.hxx
diff -u sw/sw/source/filter/ww8/ww8par.hxx:1.153 sw/sw/source/filter/ww8/ww8par.hxx:1.153.54.1
--- sw/sw/source/filter/ww8/ww8par.hxx:1.153	Mon Nov 26 09:31:19 2007
+++ sw/sw/source/filter/ww8/ww8par.hxx	Wed Apr 30 05:02:44 2008
@@ -995,6 +995,7 @@
     ULONG nFieldFlags;          // dito fuer Feldern
     ULONG nFieldTagAlways[3];   // dito fuers Taggen von Feldern
     ULONG nFieldTagBad[3];      // dito fuers Taggen von nicht importierbaren F.
+    bool m_bRegardHindiDigits;  // import digits in CTL scripts as Hindi numbers
 
     WW8_CP nDrawCpO;            // Anfang der Txbx-SubDocs
 
@@ -1089,6 +1090,7 @@
     int nDropCap;
 
     int nIdctHint;
+	bool bBidi;
 
 //---------------------------------------------
 
@@ -1126,6 +1128,7 @@
     bool ReadChar(long nPosCp, long nCpOfs);
     bool ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs);
     bool ReadChars(WW8_CP& rPos, WW8_CP nNextAttr, long nTextEnd, long nCpOfs);
+	bool LangUsesHindiNumbers(USHORT nLang);
     sal_Unicode TranslateToHindiNumbers(sal_Unicode);
 
     void SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection);
@@ -1420,6 +1423,7 @@
     void Read_Obj(USHORT, const BYTE*, short nLen);
     void Read_PicLoc(USHORT, const BYTE* pData, short nLen );
     void Read_BoldUsw(USHORT nId, const BYTE*, short nLen);
+    void Read_Bidi(USHORT nId, const BYTE*, short nLen);
     void Read_BoldBiDiUsw(USHORT nId, const BYTE*, short nLen);
     void Read_SubSuper(         USHORT, const BYTE*, short nLen );
     bool ConvertSubToGraphicPlacement();
Index: sw/sw/source/filter/ww8/ww8par6.cxx
diff -u sw/sw/source/filter/ww8/ww8par6.cxx:1.177 sw/sw/source/filter/ww8/ww8par6.cxx:1.177.52.2
--- sw/sw/source/filter/ww8/ww8par6.cxx:1.177	Mon Nov 26 09:31:48 2007
+++ sw/sw/source/filter/ww8/ww8par6.cxx	Wed Apr 30 05:23:20 2008
@@ -3049,6 +3049,14 @@
     SetToggleAttr( nI, bOn );
 }
 
+void SwWW8ImplReader::Read_Bidi(USHORT /*nId*/, const BYTE* /*pData*/, short nLen)
+{
+	if (nLen > 0)
+		bBidi = true;
+	else
+		bBidi = false;
+}
+
 // Read_BoldUsw for BiDi Italic, Bold
 void SwWW8ImplReader::Read_BoldBiDiUsw(USHORT nId, const BYTE* pData,
     short nLen)
@@ -3718,7 +3726,7 @@
         case 99:
         case 0x4a43:
             nId = RES_CHRATR_FONTSIZE;
-            break;
+			break;
         case 85:
         case 116:
         case 0x4a61:
@@ -3793,7 +3801,7 @@
         case 114:
         case 0x485F:
             nId = RES_CHRATR_CTL_LANGUAGE;
-            break;
+			break;
         default:
             return;
     }
@@ -5872,7 +5880,7 @@
                                                      //1 or 0;bit;
         {0x2859, &SwWW8ImplReader::Read_TxtAnim},    //"sprmCSfxText" chp.sfxtText;
                                                      //text animation;byte;
-        {0x085A, 0},                                 //"sprmCFBiDi"
+        {0x085A, &SwWW8ImplReader::Read_Bidi},                                 //"sprmCFBiDi"
         {0x085B, 0},                                 //"sprmCFDiacColor"
         {0x085C, &SwWW8ImplReader::Read_BoldBiDiUsw},//"sprmCFBoldBi"
         {0x085D, &SwWW8ImplReader::Read_BoldBiDiUsw},//"sprmCFItalicBi"


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/F-9/openoffice.org.spec,v
retrieving revision 1.1480
retrieving revision 1.1481
diff -u -r1.1480 -r1.1481
--- openoffice.org.spec	7 May 2008 07:29:41 -0000	1.1480
+++ openoffice.org.spec	12 May 2008 08:43:46 -0000	1.1481
@@ -154,6 +154,7 @@
 Patch81: openoffice.org-2.4.0.ooo87071.sd.backgroundfix.patch
 Patch82: openoffice.org-3.0.0.ooo88090.chart2.negativecount.patch
 Patch83: openoffice.org-3.0.0.ooo89002.vcl.symbolfonts.patch
+Patch84: workspace.os114.patch
 
 %define instdir %{_libdir}/openoffice.org
 
@@ -1122,6 +1123,7 @@
 %patch81 -p1 -b .ooo87071.sd.backgroundfix.patch
 %patch82 -p1 -b .ooo88090.chart2.negativecount.patch
 %patch83 -p1 -b .ooo89002.vcl.symbolfonts.patch
+%patch84 -p1 -b .workspace.os114.patch
 
 %build
 echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -2911,6 +2913,7 @@
 * Wed May 07 2008 Caolan McNamara <caolanm at redhat.com> - 1:2.4.0-12.9-UNRELEASED
 - Resolves: rhbz#444571 add openoffice.org-3.0.0.ooo88090.chart2.negativecount.patch
 - Resolves: rhbz#445318 fix notes related crash
+- Resolves: rhbz#445953 backport 2.4.1 ww8 bidi digit fixes
 - add openoffice.org-3.0.0.ooo89002.vcl.symbolfonts.patch
 
 * Sat Apr 26 2008 Caolan McNamara <caolanm at redhat.com> - 1:2.4.0-12.8




More information about the fedora-extras-commits mailing list