From kde-commits Sun Jul 31 23:56:07 2011 From: Pierre Ducroquet Date: Sun, 31 Jul 2011 23:56:07 +0000 To: kde-commits Subject: [calligra/words-table-cell-borders] /: Merge remote-tracking branch Message-Id: <20110731235607.09609A60A6 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=131215660724028 Git commit 0f536280a0964d80216b198c09f318dbce4ae065 by Pierre Ducroquet. Committed on 21/07/2011 at 23:12. Pushed by ducroquet into branch 'words-table-cell-borders'. Merge remote-tracking branch 'origin/master' into words-table-cell-borders M +13 -4 libs/kotext/styles/KoTableCellStyle.cpp M +12 -14 libs/kotext/KoTextEditor.cpp M +2 -2 libs/kotext/KoTextBlockBorderData.cpp M +1 -1 libs/kotext/styles/KoTableCellStyle.h M +4 -1 filters/words/docx/DocxXmlDocumentReader.cpp http://commits.kde.org/calligra/0f536280a0964d80216b198c09f318dbce4ae065 diff --cc libs/kotext/styles/KoTableCellStyle.cpp index 6882228,f68cd03..938f066 --- a/libs/kotext/styles/KoTableCellStyle.cpp +++ b/libs/kotext/styles/KoTableCellStyle.cpp @@@ -549,31 -580,14 +550,31 @@@ void KoTableCellStyle::loadOdf(const Ko charstyle->loadOdf(scontext); // load the KoCharacterStyle from the stylestack context.styleStack().setTypeProperties("graphic"); - loadOdfProperties(context.styleStack()); + loadOdfProperties(scontext, context.styleStack()); context.styleStack().setTypeProperties("paragraph"); - loadOdfProperties(context.styleStack()); + loadOdfProperties(scontext, context.styleStack()); context.styleStack().restore(); + + // Borders - ugly mode enabled + KoBorder styleBorders; + KoXmlElement elem; + KoXmlNode node = element->firstChild(); + do { + if (node.nodeName() == "style:table-cell-properties") { + elem = node.toElement(); + break; + } + } while (!(node = node.nextSibling()).isNull()); + if (styleBorders.loadOdf(elem)) { + setBorders(styleBorders); + kWarning(32500) << "Loaded borders successfully"; + KoBorder testBorders = borders(); + kWarning(32500) << (testBorders != KoBorder()); + } } - void KoTableCellStyle::loadOdfProperties(KoStyleStack &styleStack) + void KoTableCellStyle::loadOdfProperties(KoShapeLoadingContext &context, KoStyleStack &styleStack) { // Padding if (styleStack.hasProperty(KoXmlNS::fo, "padding-left"))