fontwrong.SetColor(255);
sel.MoveRight(COleVariant((short)1),COleVariant((short)(tempwrong)),COleVariant((short)1));
sel.MoveRight(COleVariant((short)1),COleVariant((short)1),COleVariant((short)0));    
    }
    else
    {tempwrong=-(tempwrong);
    sel.MoveRight(COleVariant((short)1),COleVariant((short)(tempwrong)),COleVariant((short)1));
    sel.MoveRight(COleVariant((short)1),COleVariant((short)1),COleVariant((short)0));
    sel.MoveRight(COleVariant((short)1),COleVariant((short)1),COleVariant((short)1));
    fontwrong.AttachDispatch(sel.GetFont());
    fontwrong.SetStrikeThrough(1);
     fontwrong.SetColor(255);
     sel.MoveLeft(COleVariant((short)1),COleVariant((short)(tempwrong)),COleVariant((short)1));
    sel.MoveLeft(COleVariant((short)1),COleVariant((short)1),COleVariant((short)0));
    }
    if (tempwrong==0)
    {fontwrong.AttachDispatch(sel.GetFont());
    fontwrong.SetStrikeThrough(1);
     fontwrong.SetColor(255);
    }
     fontwrong.ReleaseDispatch();
      wrongflag=0;
      }
      font.AttachDispatch (sel.GetFont());  
    
      sel.MoveLeft(COleVariant((short)1),COleVariant((short)1),COleVariant((short)0));
      
  }
   
  sel.MoveRight(COleVariant((short)1),COleVariant((short)m),COleVariant((short)1));
 sel.MoveRight(COleVariant((short)1),COleVariant((short)1),COleVariant((short)0));
   tempp=m;
  m=tempp+p;
  p=tempp;
  if (m>n) {m=3;p=1;}
      
}
if (1!=wrongflag)
{sel.MoveRight(COleVariant((short)1),COleVariant((short)m),COleVariant((short)1));
tempsum=int(fmod(double(tempsum),double(10)));
    
    switch (tempsum)
  { case 0: wf[0].line=55;break;
    case 1: wf[0].line=1;break;
    case 2: wf[0].line=3;break;
    case 3: wf[0].line=4;break;
    case 4: wf[0].line=6;break;
    case 5: wf[0].line=7;break;
    case 6: wf[0].line=9;break;
    case 7: wf[0].line=10;break;
    case 8: wf[0].line=11;break;
    case 9: wf[0].line=20;break;
  }
     
font.AttachDispatch (sel.GetFont());
font.GetUnderlineColor();
 font.GetUnderline();
 
if ((font.GetUnderline()!=wf[0].line))
    {
    
     sel.WholeStory();
    fontwrong.AttachDispatch(sel.GetFont());
     fontwrong.SetStrikeThrough(1);
     fontwrong.SetColor(255);
     fontwrong.ReleaseDispatch();
        wrongflag=0;
}
}
(4)如果检测到文档被篡改,软件会对文章内容画红线并且弹出提示框提示用户,如图3.5所示。
 
if (1!=wrongflag) {MessageBox("水印错误,文档已被篡改");}
fontwrong.ReleaseDispatch();
font.ReleaseDispatch();
sel.ReleaseDispatch();
图3.5 文档错误提示
4    系统性能测试
4.1    水印嵌入测试
用户打开要嵌入的WORD文档后可以输入任意1-99范围内的密钥,然后生成对应水印如图4.1所示。
		
- 上一篇:基于webform的在线考试系统+用例图+文献综述 
- 下一篇:Ford–Fulkerson算法铁路运输系统中车辆流问题的研究 
- 
- 
- 
- 
- 
- 
- 
- 中考体育项目与体育教学合理结合的研究
- 十二层带中心支撑钢结构...
- 酸性水汽提装置总汽提塔设计+CAD图纸
- 河岸冲刷和泥沙淤积的监测国内外研究现状
- java+mysql车辆管理系统的设计+源代码
- 乳业同业并购式全产业链...
- 大众媒体对公共政策制定的影响
- 当代大学生慈善意识研究+文献综述
- 电站锅炉暖风器设计任务书
- 杂拟谷盗体内共生菌沃尔...