View | Details | Raw Unified | Return to issue 120158
Collapse All | Expand All

(-)sw/source/filter/inc/msfilter.hxx (+5 lines)
Lines 117-123 Link Here
117
                <a href="mailto:mmaher@openoffice.org">Martin Maher</a
117
                <a href="mailto:mmaher@openoffice.org">Martin Maher</a
118
        */
118
        */
119
        sal_uLong MSDateTimeFormatToSwFormat(String& rParams, SvNumberFormatter *pFormatter, sal_uInt16 &rLang, bool bHijri);
119
        sal_uLong MSDateTimeFormatToSwFormat(String& rParams, SvNumberFormatter *pFormatter, sal_uInt16 &rLang, bool bHijri);
120
		/*Used to identify if the previous is AM time field*/
121
		sal_Bool IsPreviousAM(String& rParams, xub_StrLen nPos);
120
122
123
		/*Used to identify if the next is PM time field*/
124
		sal_Bool IsNextPM(String& rParams, xub_StrLen nPos);
125
121
        /** Used by MSDateTimeFormatToSwFormat to identify AM time fields
126
        /** Used by MSDateTimeFormatToSwFormat to identify AM time fields
122
127
123
            @author
128
            @author
(-)sw/source/filter/ww8/writerwordglue.cxx (-2 / +31 lines)
Lines 875-882 Link Here
875
                    }
875
                    }
876
                    else if (nChar == '/')
876
                    else if (nChar == '/')
877
                    {
877
                    {
878
                        // MM We have to escape '/' in case it's used as a char
878
						if(!(IsPreviousAM(rParams, nI) && IsNextPM(rParams, nI)))
879
                        rParams.Replace(nI, 1, CREATE_CONST_ASC("\\/"));
879
                            // MM We have to escape '/' in case it's used as a char
880
                            rParams.Replace(nI, 1, CREATE_CONST_ASC("\\/"));
880
                        // rParams.Insert( nI, '\\' );
881
                        // rParams.Insert( nI, '\\' );
881
                        nI++;
882
                        nI++;
882
                        nLen++;
883
                        nLen++;
Lines 1015-1020 Link Here
1015
            return nKey;
1016
            return nKey;
1016
        }
1017
        }
1017
1018
1019
		sal_Bool IsPreviousAM(String& rParams, xub_StrLen nPos){
1020
			xub_StrLen nPos1 = nPos - 1;
1021
			xub_StrLen nPos2 = nPos - 2;
1022
1023
			if(nPos1 > nPos || nPos2 > nPos){
1024
				return sal_False;
1025
			}else{
1026
				return (
1027
					(rParams.GetChar(nPos1) == 'M'||rParams.GetChar(nPos1) == 'm')&&
1028
					(rParams.GetChar(nPos2) == 'A'||rParams.GetChar(nPos2) == 'a')
1029
					);
1030
			}
1031
		}
1032
		sal_Bool IsNextPM(String& rParams, xub_StrLen nPos){
1033
			xub_StrLen nPos1 = nPos + 1;
1034
			xub_StrLen nPos2 = nPos + 2;
1035
1036
1037
			if(nPos1 >= rParams.Len() - 1 || nPos2 > rParams.Len() - 1){
1038
				return sal_False;
1039
			}else{
1040
				return (
1041
					(rParams.GetChar(nPos1) == 'P'||rParams.GetChar(nPos1) == 'p')&&
1042
					(rParams.GetChar(nPos2) == 'M'||rParams.GetChar(nPos2) == 'm')
1043
					);
1044
			}
1045
1046
		}
1018
        bool IsNotAM(String& rParams, xub_StrLen nPos)
1047
        bool IsNotAM(String& rParams, xub_StrLen nPos)
1019
        {
1048
        {
1020
            return (
1049
            return (

Return to issue 120158