void extendToWholeWords() throws Exception
    {
        String[] mergedCells = getMergedCells();
        for ( int i=0;i<rows.size();i++ )
        {
            Row r = rows.get(i);
            for ( int j=0;j<r.cells.size();j++ )
            {
                FragList fl = r.cells.get(j);
                if ( !fl.merged )
                {
                    // try to extend left
                    if ( j>0&&r.cells.get(j-1).merged )
                    {
                        FragList fl2 = r.cells.get(j-1);
                        fl.extendLeft( fl2, mergedCells[j-1], base );
                    }
                    // try to extend right
                    if ( j<r.cells.size()-1 && mergedCells[j+1] != null )
                    {
                        FragList fl2 = r.cells.get(j+1);
                        fl.extendRight( fl2, mergedCells[j+1], base );
                    }
                }
            }
        }
    }