From kde-commits Fri Nov 26 06:42:56 2010 From: Carlos Licea Date: Fri, 26 Nov 2010 06:42:56 +0000 To: kde-commits Subject: branches/work/koffice-essen/libs/kotext/styles Message-Id: <20101126064256.560F8AC8A4 () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=129075380824302 SVN commit 1200890 by clicea: This problem strikes again. The element in which the different elements are to be saved is whether not defined in the standard, overlaps or I couldn't find it. In any case do try to read the attributes wherever theey appear. To see what I mean look OOo's behavior, in a odt file all the properties are saved in table-cell-properties while on a odp they are scattered in graphics, table-cell and paragraph properties M +8 -2 KoTableCellStyle.cpp --- branches/work/koffice-essen/libs/kotext/styles/KoTableCellStyle.cpp #1200889:1200890 @@ -1014,8 +1014,14 @@ QString family = element->attributeNS(KoXmlNS::style, "family", "table-cell"); context.addStyles(element, family.toLocal8Bit().constData()); // Load all parents - only because we don't support inheritance. - context.styleStack().setTypeProperties("table-cell"); // load all style attributes from "style:table-properties" - loadOdfProperties(context.styleStack()); // load the KoTableCellStyle from the stylestack + context.styleStack().setTypeProperties("table-cell"); + loadOdfProperties(context.styleStack()); + + context.styleStack().setTypeProperties("graphic"); + loadOdfProperties(context.styleStack()); + + context.styleStack().setTypeProperties("paragraph"); + loadOdfProperties(context.styleStack()); context.styleStack().restore(); }