You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
#include "StdAfx.h"
|
|
|
|
|
#include "CommandModifiFont.h"
|
|
|
|
|
#include "ObjTxt.h"
|
|
|
|
|
|
|
|
|
|
CCommandModifiFont::CCommandModifiFont(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CCommandModifiFont::~CCommandModifiFont(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
//b Ϊtrue ʱ<><CAB1><EFBFBD>þɲ<C3BE><C9B2><EFBFBD>
|
|
|
|
|
void CCommandModifiFont::SetStringPar(SFontPar &par,bool b)
|
|
|
|
|
{
|
|
|
|
|
if(b)
|
|
|
|
|
{
|
|
|
|
|
m_OldFontPar = par;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
m_NewFontPar = par;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void CCommandModifiFont::ExcuteExt()
|
|
|
|
|
{
|
|
|
|
|
ReCreatObj(true);
|
|
|
|
|
}
|
|
|
|
|
void CCommandModifiFont::UndoExt()
|
|
|
|
|
{
|
|
|
|
|
ReCreatObj(false);
|
|
|
|
|
}
|
|
|
|
|
void CCommandModifiFont::ReCreatObj(bool bExcute)
|
|
|
|
|
{
|
|
|
|
|
CObjBase *pBase = m_ObjContainer.GetCurOpObj();
|
|
|
|
|
if(pBase)
|
|
|
|
|
{
|
|
|
|
|
CObjTxt *p = dynamic_cast<CObjTxt*>(pBase);
|
|
|
|
|
if(bExcute)
|
|
|
|
|
{
|
|
|
|
|
p->SetFontPar(m_NewFontPar);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
p->SetFontPar(m_OldFontPar);
|
|
|
|
|
}
|
|
|
|
|
p->Creat();
|
|
|
|
|
}
|
|
|
|
|
}
|