Files
envi-code/SourceCode/Code2026/tg_shs/shs_annotate/RowDividerPage.cpp
T
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

82 lines
2.0 KiB
C++

// RowDividerPage.cpp : implementation file
//
#include "stdafx.h"
#include "resource.h"
#include "RowDividerPage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CRowDividerPage property page
IMPLEMENT_DYNCREATE(CRowDividerPage, CDividerPage)
CRowDividerPage::CRowDividerPage() : CDividerPage(CRowDividerPage::IDD)
{
//{{AFX_DATA_INIT(CRowDividerPage)
m_csRowHeight = _T("");
m_bApplyDescend = FALSE;
m_nRowHeightStyle=0;
//}}AFX_DATA_INIT
}
CRowDividerPage::~CRowDividerPage()
{
}
void CRowDividerPage::Obj2Dlg(const TDbSheet *pSheet)
{
const TDividerStyle &style=pSheet->GetRowDivider();
CDividerPage::Obj2Dlg(style);
m_csRowHeight.Format(_T("%.1f"), pSheet->GetRowHeight(TRUE));
m_nRowHeightStyle=(int)pSheet->GetRowHeightStyle();
if(m_nRowHeightStyle<0 || m_nRowHeightStyle>3)
m_nRowHeightStyle=0;
}
void CRowDividerPage::Dlg2Obj(TDbSheet *pSheet) const
{
pSheet->assertWriteEnabled();
TDividerStyle &style=pSheet->GetRowDivider();
CDividerPage::Dlg2Obj(style);
double nRowHeight=_tstof(m_csRowHeight);
if(nRowHeight>1.0E-3)
pSheet->SetRowHeight(nRowHeight, TRUE);
pSheet->SetRowHeightStyle((TSheetRow::TRowHeightStyle)m_nRowHeightStyle);
}
void CRowDividerPage::DoDataExchange(CDataExchange* pDX)
{
CDividerPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CRowDividerPage)
DDX_CBString(pDX, IDC_ROWHEIGHT, m_csRowHeight);
DDX_Check(pDX, IDC_APPLY_DESCEND, m_bApplyDescend);
DDX_CBIndex(pDX, IDC_ROWFLAG, m_nRowHeightStyle);
//}}AFX_DATA_MAP
if(pDX->m_bSaveAndValidate) {
if(_tstof(m_csRowHeight)<1.0E-3)
pDX->Fail();
}
}
BEGIN_MESSAGE_MAP(CRowDividerPage, CDividerPage)
//{{AFX_MSG_MAP(CRowDividerPage)
ON_WM_CLOSE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CRowDividerPage message handlers
void CRowDividerPage::OnClose()
{
CDividerPage::OnClose();
}