Logo Search packages:      
Sourcecode: libpodofo version File versions  Download package

PoDoFo::PdfSimpleTableModel::PdfSimpleTableModel ( int  nCols,
int  nRows 
)

Creates an empty PdfSimpleTableModel that does not contain any data.

Using this model will result in drawing an empty table!

Parameters:
nColsnumber of columns of the data in this table model (must match the PdfTable object)
nRowsnumber of rows of the data in this table model (must match the PdfTable object)

You can set the tables data using SetText.

See also:
SetText

Definition at line 47 of file PdfTable.cpp.

References PoDoFo::ePdfError_OutOfMemory.

    : m_pFont( NULL ), m_eAlignment( ePdfAlignment_Left ),
      m_eVerticalAlignment( ePdfVerticalAlignment_Center ),
      m_bWordWrap( false ), m_clForeground( 1.0 ),
      m_bBackground( false ), m_clBackground( 0.0 ),
      m_nCols( nCols ), m_nRows( nRows ),
        m_bBorder( true ), m_dBorder( 1.0 )
{
    m_ppData = static_cast<PdfString**>(malloc( sizeof(PdfString*) * nRows ));
    if( !m_ppData )
    {
        PODOFO_RAISE_ERROR( ePdfError_OutOfMemory );
    }

    for( int i=0;i<nRows;i++ ) 
        m_ppData[i] = new PdfString[nCols];
}

Generated by  Doxygen 1.6.0   Back to index