Bug 127994 - Fails to open certain OASIS OpenDocument graphics (odg) file(s)
Summary: Fails to open certain OASIS OpenDocument graphics (odg) file(s)
Status: RESOLVED FIXED
Alias: None
Product: karbon
Classification: Applications
Component: opendocument (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Tim Beaulen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-25 04:10 UTC by Philippe Cloutier
Modified: 2006-08-26 03:13 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Cloutier 2006-05-25 04:10:56 UTC
Version:           1.5.1 (using KDE KDE 3.5.2)
Installed from:    Debian testing/unstable Packages
OS:                Linux

I am forwarding Debian #366679 about karbon's failure to open a specific odg file, which is available at http://bugs.debian.org/cgi-bin/bugreport.cgi/Diagrama%2520inst.%2520manual.odg?bug=366679;msg=5;att=1 , with karbon 1.5.0. I can reproduce this bug with karbon 1.5.1. Some other odg files open successfully. When trying to open that one, I get on console

ASSERT: "master" in /tmp/buildd/koffice-1.5.1/./karbon/karbon_part.cc
(315)

and in the interface the error

Could not open

/home/chealer/foo.odg

It's possible to preview the file in konqueror.
Comment 1 Jan Hambrecht 2006-05-25 17:55:37 UTC
SVN commit 544637 by jaham:

if neither a master page style with name "Standard" nor with name "Default" is found,
use the first one from the list

CCBUG:127994



 M  +6 -0      karbon_part.cc  


--- branches/koffice/1.5/koffice/karbon/karbon_part.cc #544636:544637
@@ -312,6 +312,12 @@
 	QDomElement *master = styles.masterPages()[ masterPageName ];
 	if ( !master ) //last test...
 		master = styles.masterPages()[ "Default" ];
+	// last resort, use the first found master page style
+	if ( ! master )
+	{
+		QDictIterator<QDomElement> it( styles.masterPages() );
+		master = it.current();
+	}
 	Q_ASSERT( master );
 	const QDomElement *style = master ? styles.findStyle( master->attributeNS( KoXmlNS::style, "page-layout-name", QString::null ) ) : 0;
 	if( style )
Comment 2 Jan Hambrecht 2006-05-27 11:21:38 UTC
At least it opens now. But odf support is still basic. So 3d content and text-boxes are not implemented yet.
Comment 3 Philippe Cloutier 2006-08-23 03:06:38 UTC
As this fix was sufficient for me to close the Debian bug report, I'm closing this too. Thank you.
Comment 4 Jan Hambrecht 2006-08-23 09:29:42 UTC
*** Bug has been marked as fixed ***.
Comment 5 Philippe Cloutier 2006-08-26 03:13:11 UTC
Uh...thanks also for backing up my brain, Jan :-P