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 "CommandModifiString.h"
|
|
|
|
|
#include "ObjTxt.h"
|
|
|
|
|
|
|
|
|
|
CCommandModifiString::CCommandModifiString()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
CCommandModifiString::~CCommandModifiString(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
//b Ϊtrue ʱ<><CAB1><EFBFBD>þɲ<C3BE><C9B2><EFBFBD>
|
|
|
|
|
void CCommandModifiString::SetStringPar(SStringPar &par,bool b)
|
|
|
|
|
{
|
|
|
|
|
if(b)
|
|
|
|
|
{
|
|
|
|
|
m_OldStringPar.Copy(par);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
m_NewStringPar.Copy(par);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void CCommandModifiString::ExcuteExt()
|
|
|
|
|
{
|
|
|
|
|
ReCreatObj(true);
|
|
|
|
|
}
|
|
|
|
|
void CCommandModifiString::UndoExt()
|
|
|
|
|
{
|
|
|
|
|
ReCreatObj(false);
|
|
|
|
|
}
|
|
|
|
|
void CCommandModifiString::ReCreatObj(bool bExcute)
|
|
|
|
|
{
|
|
|
|
|
CObjBase *pBase = m_ObjContainer.GetCurOpObj();
|
|
|
|
|
if(pBase)
|
|
|
|
|
{
|
|
|
|
|
CObjString *p = dynamic_cast<CObjString*>(pBase);
|
|
|
|
|
if(bExcute)
|
|
|
|
|
{
|
|
|
|
|
//<2F>ɱ<EFBFBD><C9B1>ı<EFBFBD>
|
|
|
|
|
p->SetValStr(m_NewStringPar.m_ValString);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
p->SetFontTypeName(m_NewStringPar.m_FontTypeName);
|
|
|
|
|
p->SetFontName(m_NewStringPar.m_FontName);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
//<2F>ɱ<EFBFBD><C9B1>ı<EFBFBD>
|
|
|
|
|
p->SetValStr(m_OldStringPar.m_ValString);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
p->SetFontTypeName(m_OldStringPar.m_FontTypeName);
|
|
|
|
|
p->SetFontName(m_OldStringPar.m_FontName);
|
|
|
|
|
}
|
|
|
|
|
p->Creat();
|
|
|
|
|
}
|
|
|
|
|
}
|