<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>112243</bug_id>
          
          <creation_ts>2005-09-08 15:36:19 +0000</creation_ts>
          <short_desc>Quanta crashes sometimes directly after working with table-assistant. </short_desc>
          <delta_ts>2005-09-16 18:28:54 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>quanta</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>openSUSE</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter>franbe</reporter>
          <assigned_to name="András Manţia">amantia</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>371602</commentid>
    <comment_count>0</comment_count>
    <who name="">franbe</who>
    <bug_when>2005-09-08 15:36:19 +0000</bug_when>
    <thetext>Version:            (using KDE KDE 3.4.0)
Installed from:    SuSE RPMs
OS:                Linux

Problem with Table-Wizard.

Basically quanta crashes after clicking ok in Table-wizard sometimes.

I created a tablewith the wizard an melted/spanned (col/rowspan) some cells.
I click ok.
Everything as planned.
I start the wizard to edit the same table.
The wizard recognizes the table wrong.
Wrong row-/colspans sometimes the wizards shows too many columns or rows.
I change the table-width and cell-width.

Then I leave the wizard by clicking ok-button.

Sometimes it crashes sometimes it doesn&apos;t.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>372939</commentid>
    <comment_count>1</comment_count>
    <who name="András Manţia">amantia</who>
    <bug_when>2005-09-14 13:50:13 +0000</bug_when>
    <thetext>Can you at list give me an example how to create a table - or send a 
html file with such a table - which is not recognized by the wizard? 
Best if that example can be used to reproduce the crash. 
 
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>373488</commentid>
    <comment_count>2</comment_count>
    <who name="András Manţia">amantia</who>
    <bug_when>2005-09-16 18:28:54 +0000</bug_when>
    <thetext>SVN commit 461153 by amantia:

Fix the rest of merging related table bugs found by Jens.
Should fix also 112243. Please test it, if you have a chance.

BUG: 112243

 M  +19 -6     tableeditor.cpp  


--- branches/KDE/3.5/kdewebdev/quanta/components/tableeditor/tableeditor.cpp #461152:461153
@@ -404,7 +404,7 @@
       {
         maxCol = (nCol &gt; maxCol) ? nCol : maxCol;
         maxCol = (maxCol == 0) ? 1 : maxCol;
-        for (int col = 0; col &lt; maxCol - nCol; col++)
+        for (int col = nCol; col &lt; maxCol; col++)
         {
           if (mergeMatrix[nRow - 1][col].node != 0L) {
             if (m_colSpin-&gt;value() &lt; col)
@@ -415,19 +415,17 @@
             m_dataTable-&gt;item(nRow-1, col)-&gt;setEnabled(false);
             tableNode.node = new Node(0L);
             tableNode.node-&gt;tag = new Tag(*(n-&gt;tag));
-      configureCell(nRow-1,  col, tableNode.node);
+            configureCell(nRow-1,  col, tableNode.node);
             newNum++;
             tableNode.merged = true;
             tableNode.mergedRow = tableN.mergedRow;
             tableNode.mergedCol = tableN.mergedCol;
             tableRowTags.append(tableNode);
-           // col++;
-            nCol++;
             if ((uint)nCol &gt;= mergeMatrix[0].size())  // Check if there are enough cols
               for (uint i=0; i&lt;mergeMatrix.size(); i++)
                 mergeMatrix[i].resize(2 * mergeMatrix[i].size());
   
-          } 
+          } else
           {
             tableNode.node = new Node(0L);
             newNum++;
@@ -502,7 +500,7 @@
               m_dataTable-&gt;item(nRow-1, lastCol + i)-&gt;setEnabled(false);
               tableNode.node = new Node(0L);
               tableNode.node-&gt;tag = new Tag(*(n-&gt;tag));
-	      configureCell(nRow-1,  col, tableNode.node);
+              configureCell(nRow-1,  col, tableNode.node);
               newNum++;
               tableNode.merged = true;
               tableNode.mergedRow = nRow - 1;
@@ -899,6 +897,21 @@
 {
   if (m_row == -1)
     m_row = m_dataTable-&gt;numRows() - 1;
+  int i = 0;
+  int j = 0;
+  for (QValueList&lt;QValueList&lt;TableNode&gt; &gt;::Iterator it = m_tableTags-&gt;begin(); it != m_tableTags-&gt;end(); ++it) {
+      j = 0;
+      for (QValueList&lt;TableNode&gt;::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) {
+        if ((*it2).merged &amp;&amp; (*it2).mergedRow == m_row) {
+          (*it2).merged = false;
+          setCellText(m_dataTable, i, j, tagContent((*it2).node));
+          m_dataTable-&gt;item(i, j)-&gt;setEnabled(true);
+          (*it2).node-&gt;tag-&gt;deleteAttribute(&quot;colspan&quot;);
+        }
+        j++;
+      }
+      i++;
+  }
   QValueList&lt;QValueList&lt;TableNode&gt; &gt;::Iterator it2 = m_tableTags-&gt;at(m_row);
   for (QValueList&lt;TableNode&gt;::Iterator it3 = (*it2).begin(); it3 != (*it2).end(); ++it3) {
     if ((*it3).merged)
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>