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

List:       kde-commits
Subject:    koffice/plugins/chartshape
From:       Björn Breitmeyer <bjoern.breitmeyer () kdab ! com>
Date:       2010-10-20 15:34:47
Message-ID: 20101020153447.EEF49AC89A () svn ! kde ! org
[Download RAW message or body]

SVN commit 1187868 by breitmeyer:

Fixed loading of cell regions that contain lists of regions


 M  +5 -2      CellRegion.cpp  
 M  +1 -1      CellRegion.h  
 M  +1 -1      ChartProxyModel.cpp  


--- trunk/koffice/plugins/chartshape/CellRegion.cpp #1187867:1187868
@@ -125,7 +125,7 @@
     *this = region;
 }
 
-CellRegion::CellRegion( TableSource *source, const QString& region )
+CellRegion::CellRegion( TableSource *source, const QString& regions )
     : d( new Private() )
 {
     // A dollar sign before a part of the address means that this part
@@ -133,11 +133,13 @@
     // all occurences of '$', and handle relative and absolute addresses in
     // the same way.
     // See ODF specs $8.3.1 "Referencing Table Cells"
+    QStringList regionsList = regions.split( " ", QString::SkipEmptyParts );
+    Q_FOREACH( const QString& region, regionsList ) {
     QString searchStr = QString( region ).remove( "$" );
     QRegExp regEx;
 
     QStringList regionList = searchStr.split( ";" );
-    foreach( QString region, regionList ) {
+      Q_FOREACH( QString region, regionList ) {
         const bool isPoint = !region.contains( ':' );
         if ( isPoint )
             regEx = QRegExp( "(|.*\\.)([A-Z]+)([0-9]+)" );
@@ -167,6 +169,7 @@
         }
     }
 }
+}
 
 CellRegion::CellRegion( Table *table, const QPoint &point )
     : d( new Private() )
--- trunk/koffice/plugins/chartshape/CellRegion.h #1187867:1187868
@@ -76,7 +76,7 @@
 public:
     CellRegion();
     CellRegion( const CellRegion& region );
-    CellRegion( TableSource *source, const QString& region );
+    CellRegion( TableSource *source, const QString& regions );
     CellRegion( Table *table, const QPoint &point );
     CellRegion( Table *table, const QRect &rect );
     CellRegion( Table *table, const QVector<QRect> &rects );
--- trunk/koffice/plugins/chartshape/ChartProxyModel.cpp #1187867:1187868
@@ -390,7 +390,7 @@
     Q_ASSERT( d->isLoading );
 
     OdfLoadingHelper *helper = (OdfLoadingHelper*)context.sharedData( OdfLoadingHelperId );
-    bool ignoreCellRanges = false;
+    bool ignoreCellRanges = helper->chartUsesInternalModelOnly;
 // Some OOo documents save incorrect cell ranges. For those this fix was intended.
 // Find out which documents exactly and only use fix for as few cases as possible.
 #if 0
[prev in list] [next in list] [prev in thread] [next in thread] 

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