#include "stdafx.h" #include "DrawSheet.h" #include #include "ktsetting.h" TelDrawSheet::TelDrawSheet() { m_pSheet = new AecDbSheet; } TelDrawSheet::~TelDrawSheet() { } void TelDrawSheet::SetLayer(LPCTSTR lpLayer) { if (lpLayer == NULL) return; KTSetting::InitLayer(LAY_EL_TEXT); if (m_pSheet != NULL) m_pSheet->setLayer(lpLayer); } void TelDrawSheet::SetGridStyle(const TGridStyle &style) { if (m_pSheet != NULL) m_pSheet->SetGridStyle(style); } void TelDrawSheet::SetRowHeight(double dHeight) { if (m_pSheet != NULL) m_pSheet->SetRowHeight(dHeight); } void TelDrawSheet::SetTitleHeight(double dHeight) { if (m_pSheet != NULL) m_pSheet->SetTitleHeight(dHeight); } void TelDrawSheet::SetTitleVisible(BOOL bShow) { if (m_pSheet != NULL) m_pSheet->GetTitle().SetVisible(bShow); } void TelDrawSheet::InitSheet(int nRow,int nCol,double dRowHeight,double dColHeight) { if (m_pSheet != NULL) m_pSheet->InitSheet(nRow,nCol,dRowHeight,dColHeight); } void TelDrawSheet::SetColumnText(int nCol,LPCTSTR lpText,double dWidth) { if (m_pSheet == NULL || lpText == NULL) return; TSheetColumn column; column.SetWidth(dWidth); m_pSheet->SetColumnAt(nCol, column); TGridCell &cell=*(*m_pSheet)(0, nCol); cell.SetText(lpText); } void TelDrawSheet::AddRowAt(int i) { if (m_pSheet != NULL) { m_pSheet->AddRowAt(i); } } void TelDrawSheet::SetText(int nRow,int nCol,LPCTSTR lpText) { if (m_pSheet == NULL || lpText == NULL) return; TGridCell &Cell=*(*m_pSheet)(nRow, nCol); Cell.SetText(lpText); } void TelDrawSheet::MergeCells(int nRowFrom,int nColFrom,int nRowTo,int nColTo) { if (m_pSheet == NULL) return; m_pSheet->MergeCells(nRowFrom,nColFrom,nRowTo,nColTo); } void TelDrawSheet::SetLocation(AcGePoint3d pt) { if (m_pSheet == NULL) return; m_pSheet->SetLocation(Ucs2Wcs(pt)); } void TelDrawSheet::AddToCSpace(BOOL bShow) { if (m_pSheet == NULL) return; m_pSheet->AddToCSpace(bShow); } //标题文字 void TelDrawSheet::SetTitleText(LPCTSTR lpText) { if (m_pSheet == NULL) return; m_pSheet->SetTitleText(lpText); } //设置标题风格 void TelDrawSheet::SetTitleTestStyle(const TGridStyle &gridStyle) { if (m_pSheet != NULL) m_pSheet->SetTitleGridStyle(gridStyle); } //删除列 void TelDrawSheet::RemoveColumn(int nCol) { if (m_pSheet != NULL) m_pSheet->RemoveColumn(nCol); } //删除行 void TelDrawSheet::RemoveRow(int nRow) { if (m_pSheet != NULL) m_pSheet->RemoveRow(nRow); } //角度 void TelDrawSheet::SetRotation(double dRotate) { if (m_pSheet != NULL) m_pSheet->SetRotation(dRotate); }