Files
Slnkdwf/SlnkDWFCom/myEPlotSection.cpp
Jos Groot Lipman 699121d407 - Geen afrondfouten/oveflow bij Centroid berekening als zowel x en y rond INT_MAX
- vectordpi functie toegevoegd
- SaveAs tweede parameter ascii toegevoegd
- Meer commentaren in ascii versie tempdwf
- Labels van contouren die niet herkend waren maar vanuit ASP label hebben gekregen wel tekenen

svn path=/Slnkdwf/trunk/; revision=43706
2019-08-11 15:20:23 +00:00

134 lines
2.8 KiB
C++

// EPlotSection.cpp : Implementation of CEPlotSection
#include "stdafx.h"
#include "myEPlotSection.h"
// CEPlotSection
STDMETHODIMP CEPlotSection::InterfaceSupportsErrorInfo(REFIID riid)
{
static const IID* arr[] =
{
&IID_IEPlotSection
};
for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
{
if (InlineIsEqualGUID(*arr[i],riid))
return S_OK;
}
return S_FALSE;
}
void CEPlotSection::InitImpl(CEPlotSectionImpl *epl)
{
m_pSectionImpl = epl;
}
void CEPlotSection::FinalRelease()
{
}
STDMETHODIMP CEPlotSection::get_Parent(IEPlotSections **ppParent)
{
return m_pParent->QueryInterface(IID_IEPlotSections, (void**)ppParent);
}
void CEPlotSection::SetParent(IEPlotSections *pParent)
{
m_pParent = pParent;
}
STDMETHODIMP CEPlotSection::get_Name(BSTR* pVal)
{
CComBSTR bstrString(m_pSectionImpl->get_Name());
return bstrString.CopyTo(pVal);
}
STDMETHODIMP CEPlotSection::get_Title(BSTR* pVal)
{
CComBSTR bstrString(m_pSectionImpl->get_Title());
return bstrString.CopyTo(pVal);
}
STDMETHODIMP CEPlotSection::AddProperty(BSTR pCategory, BSTR pName, BSTR pVal)
{
m_pSectionImpl->addProperty(pCategory, pName, pVal);
return S_OK;
}
STDMETHODIMP CEPlotSection::get_PaperColor(ULONG* pVal)
{
(*pVal) = m_pSectionImpl->get_PaperColor();
return S_OK;
}
// Always inches
STDMETHODIMP CEPlotSection::get_PaperClipWidth(DOUBLE* pVal)
{
(*pVal) = m_pSectionImpl->get_PaperClipWidth();
return S_OK;
}
STDMETHODIMP CEPlotSection::get_PaperClipHeight(DOUBLE* pVal)
{
(*pVal) = m_pSectionImpl->get_PaperClipHeight();
return S_OK;
}
STDMETHODIMP CEPlotSection::Open(BOOL bForWrite)
{
try
{
m_pSectionImpl->Open( bForWrite);
return S_OK;
}
catch (CString &err)
{
return myAtlReportError (GetObjectCLSID(), err);
}
}
HRESULT CEPlotSection::Read( void *pv, ULONG cb, ULONG *pcbRead)
{
return m_pSectionImpl->Read( pv, cb, pcbRead);
};
HRESULT CEPlotSection::Write( const void *pv, ULONG cb, ULONG *pcbWritten)
{
return m_pSectionImpl->Write( pv, cb, pcbWritten) ;
};
STDMETHODIMP CEPlotSection::Close(void)
{
return m_pSectionImpl->Close();
}
STDMETHODIMP CEPlotSection::get_SourceDescription(BSTR* pVal)
{
CString s;
HRESULT res = m_pSectionImpl->get_SourceDescription(s);
(*pVal) = s.AllocSysString();
return res;
}
STDMETHODIMP CEPlotSection::get_PropertiesXML(BSTR* pVal)
{
CString s;
HRESULT res = m_pSectionImpl->get_PropertiesXML(s);
(*pVal) = s.AllocSysString();
return res;
}
STDMETHODIMP CEPlotSection::get_EPlotSectionImpl(/* CEPlotSectionImpl ** */ BYTE ** pVal)
{
(*pVal) = (BYTE *)m_pSectionImpl;
return S_OK;
}
STDMETHODIMP CEPlotSection::put_EPlotSectionImpl(/* CEPlotSectionImpl * */ BYTE * newVal)
{
return E_FAIL;
return S_OK;
}