Exemplo n.º 1
0
        public override int GetMatchParaNo(HCStyle AStyle, int ACurParaNo)
        {
            int Result = HCStyle.Null;

            if (AStyle.ParaStyles[ACurParaNo].BackColor == FBackColor)
            {
                Result = ACurParaNo;
                return(Result);
            }

            HCParaStyle vParaStyle = new HCParaStyle();

            try
            {
                vParaStyle.AssignEx(AStyle.ParaStyles[ACurParaNo]);
                vParaStyle.BackColor = FBackColor;
                Result = AStyle.GetParaNo(vParaStyle, true);  // 新段样式
            }
            finally
            {
                vParaStyle.Dispose();
            }

            return(Result);
        }
Exemplo n.º 2
0
        public virtual int GetMatchParaNo(HCStyle aStyle, int aCurParaNo)
        {
            if (DoMatchCurPara(aStyle.ParaStyles[aCurParaNo]))
            {
                return(aCurParaNo);
            }

            using (HCParaStyle vParaStyle = new HCParaStyle())
            {
                vParaStyle.AssignEx(aStyle.ParaStyles[aCurParaNo]);
                DoMatchNewPara(vParaStyle);
                return(aStyle.GetParaNo(vParaStyle, true));
            }
        }