[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra] sheets/odf: ensure that this can't get out of sync
From: Tomas Mecir <mecirt () gmail ! com>
Date: 2016-04-09 19:43:32
Message-ID: E1aoyn6-0005X7-2J () scm ! kde ! org
[Download RAW message or body]
Git commit 9bef40bfba26b8bcc3ac332c7f3c8a839b57d8a0 by Tomas Mecir.
Committed on 09/04/2016 at 12:50.
Pushed by mecir into branch 'master'.
ensure that this can't get out of sync
M +3 -2 sheets/odf/SheetsOdfStyle.cpp
http://commits.kde.org/calligra/9bef40bfba26b8bcc3ac332c7f3c8a839b57d8a0
diff --git a/sheets/odf/SheetsOdfStyle.cpp b/sheets/odf/SheetsOdfStyle.cpp
index e04f23d..fecc84a 100644
--- a/sheets/odf/SheetsOdfStyle.cpp
+++ b/sheets/odf/SheetsOdfStyle.cpp
@@ -324,7 +324,8 @@ void Odf::loadDataStyle(Style *style, KoOdfStylesReader \
&stylesReader, const QSt
const KoOdfNumberStyles::NumericStyleFormat& dataStyle = dataStylePair.first;
const QList<QPair<QString,QString> > styleMaps = dataStyle.styleMaps;
- if(styleMaps.count() > 0) {
+ bool useNewStyle = (styleMaps.count() > 0);
+ if (useNewStyle) {
style = new Style();
for (QList<QPair<QString,QString> >::const_iterator it = styleMaps.begin(); \
it != styleMaps.end(); ++it) {
const Conditional c = loadCondition(&conditions, it->first, it->second, \
QString(), parser); @@ -418,7 +419,7 @@ void Odf::loadDataStyle(Style *style, \
KoOdfStylesReader &stylesReader, const QSt
style->setCustomFormat(dataStyle.formatStr);
- if(styleMaps.count() > 0) {
+ if (useNewStyle) {
conditions.setDefaultStyle(*style);
delete style;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic