[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: koffice/filters/kspread/excel
From:       Marijn Kruisselbrink <marijn.kruisselbrink () kogmbh ! com>
Date:       2010-11-03 21:37:57
Message-ID: 201011031437.58329.marijn.kruisselbrink () kogmbh ! com
[Download RAW message or body]

On Wednesday, November 03, 2010 08:20:17 am Björn Breitmeyer wrote:
> SVN commit 1192624 by breitmeyer:
> 
> fixed an invalid write on caused by deleting stuff after aquiring the
> iterator and use him after deleting.
> 
> fixed the Excelimport sheetreplacement function
Can you please try to not mix unrelated changes in one commit?
Also I'm not sure what the moving of the "delete writer" line accomplishes. 
Nothing is accessing writer between the old location of that line and the 
place where you moved it to. What made you think otherwise?

Marijn

> 
> 
>  M  +3 -1      import/ExcelImport.cpp
>  M  +1 -1      sidewinder/chartsubstreamhandler.cpp
> 
> 
> --- trunk/koffice/filters/kspread/excel/import/ExcelImport.cpp
> #1192623:1192624 @@ -975,6 +975,7 @@
>          }
> 
>          ChartExport *c = new ChartExport(chart->m_chart);
> +        c->setSheetReplacement( false );
>          c->m_href = QString("Chart%1").arg(this->charts.count()+1);
>          c->m_endCellAddress = encodeAddress(sheet->name(), chart->m_colR,
> chart->m_rwB); c->m_notifyOnUpdateOfRanges = "Sheet1.D2:Sheet1.F2";
> @@ -1337,8 +1338,8 @@
>      writer->endElement();
>      writer->endDocument();
>      QBuffer* b = static_cast<QBuffer*>(writer->device());
> -    delete writer;
> 
> +
>      b->seek(0);
>      KoXmlDocument doc;
>      QString errorMsg; int errorLine, errorColumn;
> @@ -1346,6 +1347,7 @@
>          kDebug() << errorMsg << errorLine << errorColumn;
>      }
>      delete b;
> +    delete writer;
>      return doc;
>  }
> 
> ---
> trunk/koffice/filters/kspread/excel/sidewinder/chartsubstreamhandler.cpp
> #1192623:1192624 @@ -114,8 +114,8 @@
>              std::cerr << "Got a chart substream without having a chart in
> the worksheet"; return;
>          }
> +        m_chartObject = dynamic_cast<ChartObject*>(it->second);
>          worksheetHandler->sharedObjects().erase(id); // remove from the
> sharedObjects and take over ownership -        m_chartObject =
> dynamic_cast<ChartObject*>(it->second);
>          Q_ASSERT(m_chartObject);
>          m_chart = m_chartObject->m_chart;
>          Q_ASSERT(m_chart);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic