Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/text/qtexttable.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtGui module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5959    cell in a QTextTable.
    6060
    61     \ingroup text
     61    \ingroup richtext-processing
    6262
    6363    Table cells are pieces of document structure that belong to a table.
     
    433433}
    434434
     435/*!
     436    /fn void QTextTablePrivate::update() const
     437
     438    This function is usually called when the table is "dirty".
     439    It seems to update all kind of table information.
     440
     441*/
    435442void QTextTablePrivate::update() const
    436443{
     
    440447//     qDebug(">>>> QTextTablePrivate::update, nRows=%d, nCols=%d", nRows, nCols);
    441448
    442     grid = (int *)realloc(grid, nRows*nCols*sizeof(int));
     449    grid = q_check_ptr((int *)realloc(grid, nRows*nCols*sizeof(int)));
    443450    memset(grid, 0, nRows*nCols*sizeof(int));
    444451
     
    464471
    465472        if (r + rowspan > nRows) {
    466             grid = (int *)realloc(grid, sizeof(int)*(r + rowspan)*nCols);
     473            grid = q_check_ptr((int *)realloc(grid, sizeof(int)*(r + rowspan)*nCols));
    467474            memset(grid + (nRows*nCols), 0, sizeof(int)*(r+rowspan-nRows)*nCols);
    468475            nRows = r + rowspan;
     
    493500    \brief The QTextTable class represents a table in a QTextDocument.
    494501
    495     \ingroup text
     502    \ingroup richtext-processing
    496503
    497504    A table is a group of cells ordered into rows and columns. Each table
     
    526533    the mergeCells() and splitCell() functions. However, only cells that span multiple
    527534    rows or columns can be split. (Merging or splitting does not increase or decrease
    528     the number of rows and columns.)
     535    the number of rows and columns.)
     536
     537    Note that if you have merged multiple columns and rows into one cell, you will not
     538    be able to split the merged cell into new cells spanning over more than one row
     539    or column. To be able to split cells spanning over several rows and columns you
     540    need to do this over several iterations.
    529541
    530542    \table 80%
Note: See TracChangeset for help on using the changeset viewer.