<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>katzching!</title>
	<atom:link href="http://estan.dose.se/feed" rel="self" type="application/rss+xml" />
	<link>http://estan.dose.se</link>
	<description>Random stuff on my mind, or reports from my trips</description>
	<pubDate>Sat, 10 Oct 2009 16:17:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Spotify Links in Chrome on Linux/KDE</title>
		<link>http://estan.dose.se/2009/10/spotify-links-in-chrome-on-linuxkde</link>
		<comments>http://estan.dose.se/2009/10/spotify-links-in-chrome-on-linuxkde#comments</comments>
		<pubDate>Sat, 10 Oct 2009 16:17:48 +0000</pubDate>
		<dc:creator>estan</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[chrome]]></category>

		<category><![CDATA[planetkde]]></category>

		<category><![CDATA[spotify]]></category>

		<category><![CDATA[xdg-open]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=163</guid>
		<description><![CDATA[Short tip on how to get this to work:
Create a script /path/to/spotify_open.sh with the following in it:

#!/bin/bash
wine "$HOME/.wine/drive_c/Program Files/Spotify/spotify.exe" /uri "$1"

Create $HOME/.kde4/share/kde4/services/spotify.protocol with the following in it:

[Protocol]
exec=/path/to/spotify_open.sh "%u"
protocol=spotify
input=none
output=none
helper=true
listing=false
reading=false
writing=false
makedir=false
deleting=false

That&#8217;s it, spotify:blah style URLs will now open in Spotify launched through Wine. Chrome just uses xdg-open for launching external apps.
]]></description>
			<content:encoded><![CDATA[<p>Short tip on how to get this to work:</p>
<p>Create a script /path/to/spotify_open.sh with the following in it:</p>
<pre>
#!/bin/bash
wine "$HOME/.wine/drive_c/Program Files/Spotify/spotify.exe" /uri "$1"
</pre>
<p>Create $HOME/.kde4/share/kde4/services/spotify.protocol with the following in it:</p>
<pre>
[Protocol]
exec=/path/to/spotify_open.sh "%u"
protocol=spotify
input=none
output=none
helper=true
listing=false
reading=false
writing=false
makedir=false
deleting=false
</pre>
<p>That&#8217;s it, spotify:blah style URLs will now open in Spotify launched through Wine. Chrome just uses xdg-open for launching external apps.</p>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2009/10/spotify-links-in-chrome-on-linuxkde/feed</wfw:commentRss>
		</item>
		<item>
		<title>HDD fail :/</title>
		<link>http://estan.dose.se/2009/08/hdd-fail</link>
		<comments>http://estan.dose.se/2009/08/hdd-fail#comments</comments>
		<pubDate>Mon, 10 Aug 2009 22:21:00 +0000</pubDate>
		<dc:creator>estan</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[planetkde]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=160</guid>
		<description><![CDATA[*From the annoying-like-h**ll department*
After a nice weekend at my parents and hanging out with some old friends, one of which recently came back from a stay in Kunshan, China, I was greeted this morning when coming back home by a crashed hard drive on my laptop :/
It started out with things beginning to act irregular, [...]]]></description>
			<content:encoded><![CDATA[<p>*From the annoying-like-h**ll department*</p>
<p>After a nice weekend at my parents and hanging out with some old friends, one of which recently came back from a stay in Kunshan, China, I was greeted this morning when coming back home by a crashed hard drive on my laptop :/</p>
<p>It started out with things beginning to act irregular, and then after a reboot I was told the computer had been uncleanly shut down and was dropped into an fsck run that failed in flames with I/O errors and whatnot. I ran a manual fsck and actually got it to a state where I could boot it again, the kernel kept spewing I/O error messages and failing ioctl commands though. I managed to get some of the more important files off the drive and onto my USB stick. They were actually surprisingly few compared to last time I had a hard drive crash, which is a small consolation.</p>
<p>Having been through several hard drive crashes in the past, what pisses me off most about this one is not the loss of data but the fact that it&#8217;s just a 1 year old drive that is now failing, which I really think is crappy. But more importantly the annoyance of loosing time having to go hunt for a new drive and set up the system again; I really don&#8217;t have time for this right now. What&#8217;s also annoying is that for many many years I always had at least two computers at home, but since just a few months ago, the laptop has been all I have. And of course the Kubuntu CD I had laying around was scratched so I had to go to a friend to burn a new one.</p>
<p>Anyway, the machine is back to normal now and sounding like a cat from the make -j4 getting a dev env up again. Lessons learned; as always, keep a backup; make sure you have a working installation media for your OS of choice around, and consider having at least two computers in your home.</p>
<p>At the store, getting the replacement drive, I didn&#8217;t really care that much what I was getting and just picked something. On the way back I realize that it&#8217;s a 320 GB Wester Digital&#8230; I think it might actually be the exact same model that I had.. Stupid? <img src='http://estan.dose.se/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2009/08/hdd-fail/feed</wfw:commentRss>
		</item>
		<item>
		<title>Tables GSoC Update</title>
		<link>http://estan.dose.se/2009/08/tables-gsoc-update</link>
		<comments>http://estan.dose.se/2009/08/tables-gsoc-update#comments</comments>
		<pubDate>Wed, 05 Aug 2009 18:50:26 +0000</pubDate>
		<dc:creator>estan</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[gsoc]]></category>

		<category><![CDATA[koffice]]></category>

		<category><![CDATA[planetkde]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=156</guid>
		<description><![CDATA[Here&#8217;s a little update on my GSoC progress. Time really flies and we have less than two weeks left until pencils down!
Some of the things that has happened in KOffice tables land since last time is:

Fixed a bug in relative table width loading.
Further improved KoTextDebug to work with the new styles for tables, rows, columns [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a little update on my GSoC progress. Time really flies and we have less than two weeks left until pencils down!</p>
<p>Some of the things that has happened in KOffice tables land since last time is:</p>
<ul>
<li>Fixed a bug in relative table width loading.</li>
<li>Further improved KoTextDebug to work with the new styles for tables, rows, columns and cells.</li>
<li>Added support for column width and relative column width. Up until now all columns were hard coded to equal widths.</li>
<li>A KoTableAndRowStyleManager has been added for managing column and row styles.</li>
<li>Fixed a bug where two subsequent tables were painted on top of each other.</li>
<li>Added support for minimum row height.</li>
<li>I began to re-factor the table layout to use a list of rectangles that describes the table instead of a simple rectangle, and started thinking about table breaking. Pretty soon though I realized that I was probably in over my head, and passed the torch to Casper, who has been hard at work trying to get the first pieces in the breaking puzzle, hard row breaks, to work. I just got word on IRC that he may just have it working (!).</li>
<li>Finally fixed the issue with an empty line above tables. This text block is there by necessity; it&#8217;s mandated by Qt Scribe. Me, Thomas and Casper discussed a bit on how to best handle this. And at least for now, we&#8217;ve chosen to solve it like Qt does in its own layout engine, which is putting the empty block to the left of the table. We might do some improvements to the user interaction here though.</li>
<li>Added three new classes; KoTableFormat and its subclasses KoTableColumnFormat and KoTableRowFormat. These are very much like the QTextFormat classes in Qt in that they&#8217;re simple implicitly shared classes that hold a set of properties. They are not used yet, but will be soon.</li>
<li>Fixed bug in justify aligned tables when an explicit width is also specified.</li>
<li>Fixed up the table layout code to handle nested tables, as it was totally oblivious to them up until now.</li>
</ul>
<p>In addition to these things there were some other small fixes, and I&#8217;ve also worked a bit on the tests, which all needed fixing after Casper&#8217;s re-factor. More work to be done on testing though and right now I&#8217;m looking at adding some loading tests to the test suite that Girish created.</p>
<p>On Tuesday last week I fell terribly ill, with high fever, and was mostly in bed or on the couch for a good two days. I&#8217;m back to full health now though. I think it might have been food poisoning.</p>
<p>The future of the column and row style manager I mentioned above is unsure though. At the moment it&#8217;s just a container for pointers to the styles, and the loading code tosses them in there and decorates the QTextTable with a property containing a pointer to the manager. Not really the prettiest of setups, and we need to find a better solution. The format classes I added are a part of this puzzle, but the question is; where do we store these formats?</p>
<p>I&#8217;m sure we&#8217;ll work it out though, and now I need to get back to coding. Sorry if this post was a little duller than my previous ones, but to cheer you up, here&#8217;s a screencast in which I save a set of nested tables in OpenOffice.org Writer and open them in KWord to edit them a bit <img src='http://estan.dose.se/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><div id="attachment_157" class="wp-caption aligncenter" style="width: 510px"><a href="http://nya-doxa.se/elvis/gsoc-tables-nested.ogv"><img src="http://estan.dose.se/wp-content/uploads/2009/08/nested-screencast-intro.png" alt="Nested Tables from OO.o to KWord" title="Nested Tables from OO.o to KWord" width="500" height="385" class="size-full wp-image-157" /></a><p class="wp-caption-text">Nested Tables from OO.o to KWord</p></div><br />
<a href="http://nya-doxa.se/elvis/gsoc-tables-nested.ogv">Direct link</a> (15 MB, Ogg/Theora)</p>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2009/08/tables-gsoc-update/feed</wfw:commentRss>
<enclosure url="http://nya-doxa.se/elvis/gsoc-tables-nested.ogv" length="15038305" type="video/ogg" />
		</item>
		<item>
		<title>Tables Sprint in Copenhagen</title>
		<link>http://estan.dose.se/2009/07/tables-sprint-in-copenhagen</link>
		<comments>http://estan.dose.se/2009/07/tables-sprint-in-copenhagen#comments</comments>
		<pubDate>Tue, 21 Jul 2009 11:03:18 +0000</pubDate>
		<dc:creator>estan</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[gsoc]]></category>

		<category><![CDATA[koffice]]></category>

		<category><![CDATA[planetkde]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=133</guid>
		<description><![CDATA[Hello again everybody.
Lots of stuff has happened since my last blog. It&#8217;s Monday afternoon when I&#8217;m writing this and I&#8217;m on the train back from the sprint that Casper Boemann and I had at his place outside Copenhagen this weekend.
Since Casper is now working on tables support as part of his employment with KO GmbH, [...]]]></description>
			<content:encoded><![CDATA[<p>Hello again everybody.</p>
<p>Lots of stuff has happened since my last blog. It&#8217;s Monday afternoon when I&#8217;m writing this and I&#8217;m on the train back from the sprint that Casper Boemann and I had at his place outside Copenhagen this weekend.</p>
<p>Since Casper is now working on tables support as part of his employment with KO GmbH, we both agreed that it would be a good idea to have a meeting to make plans for our cooperation during the rest of my GSoC, but also do get some hacking done.</p>
<p>The weekend has been intense to say the least, and we&#8217;ve added support for several essential features of tables, such as:</p>
<ul style="list-style: none; margin-left: 0;">
<li style="overflow: auto;"><a href="http://estan.dose.se/wp-content/uploads/2009/07/spanning-big.png"><img src="http://estan.dose.se/wp-content/uploads/2009/07/spanning.png" style="float: left; padding-right: 1em;" alt="Row and Column Spanning" title="Row and Column Spanning" width="210" height="210" /></a><br />
<h4>Row and Column Spanning</h4>
<p>Cells can span multiple rows or columns. The row height calculations have been updated to handle the case where a cell that spans multiple rows grows vertically from a text insertion; the last row that is spanned into will grow in height along with the spanned cell.</p>
</li>
<li style="overflow: auto;">
<h4>Table and Cell Styles</h4>
<p>Thanks to hard work from Casper, we now have KoTableStyle and KoTableCellStyle, which are proper styles for tables and cells, respectively. Work is underway for row and column styles.</p>
</li>
<li style="overflow: auto;"><img src="http://estan.dose.se/wp-content/uploads/2009/07/document-open.png" style="float: left; padding-right: 1.5em;" alt="Loading" title="Loading" width="150" height="150" /><br />
<h4>Loading</h4>
<p>Casper also took the plunge on loading and quite quickly got stuff up and working, and with the commit he did right before I left his apartment, most of the features here should now be loading correctly from ODF.</p>
</li>
<li style="overflow: auto;"><a href="http://estan.dose.se/wp-content/uploads/2009/07/alignment-big.png"><img src="http://estan.dose.se/wp-content/uploads/2009/07/alignment.png" style="float: right; padding-left: 1em;" alt="Table Alignment and Margins" title="Table Alignment and Margins" width="210" height="210" /></a><br />
<h4>Table Alignment and Margins</h4>
<p>Tables should now support all the alignment options in ODF; right, left, center and margins (justified), and they can have a left, right, top and bottom margin.</p>
</li>
<li style="overflow: auto;"><a href="http://estan.dose.se/wp-content/uploads/2009/07/table-background-big.png"><img src="http://estan.dose.se/wp-content/uploads/2009/07/table-background.png" style="float: left; padding-right: 1em;" alt="Table Background" title="Table Background" width="210" height="210" /></a><br />
<h4>Table Background</h4>
<p>Tables can have a global background color set.</p>
</li>
<li style="overflow: auto;"><a href="http://estan.dose.se/wp-content/uploads/2009/07/relative-width-big.png"><img src="http://estan.dose.se/wp-content/uploads/2009/07/relative-width.png" style="float: right; padding-left: 1em;" alt="Relative Table Width" title="Relative table width" width="210" height="210" /></a><br />
<h4>Relative Table Width</h4>
<p>Tables can now have a percentual width that is relative to the page width.</p>
</li>
<li style="overflow: auto;"><a href="http://estan.dose.se/wp-content/uploads/2009/07/cell-background-big.png"><img src="http://estan.dose.se/wp-content/uploads/2009/07/cell-background.png" style="float: right; padding-left: 1em;" alt="Cell Background" title="Cell Background" width="210" height="210" /></a><br />
<h4>Cell Background</h4>
<p>Individual cells can have a background color set.</p>
</li>
<li style="overflow: auto;"><a href="http://estan.dose.se/wp-content/uploads/2009/07/cell-borders-big.png"><img src="http://estan.dose.se/wp-content/uploads/2009/07/cell-borders.png" style="float: left; padding-right: 1em;" alt="Cell Borders" title="Cell Borders" width="210" height="210" /></a><br />
<h4>Cell Borders</h4>
<p>Cells can have borders, including double borders with a spacing between them.</p>
</li>
<li style="overflow: auto;"><a href="http://estan.dose.se/wp-content/uploads/2009/07/padding-big.png"><img src="http://estan.dose.se/wp-content/uploads/2009/07/padding.png" style="float: right; padding-left: 1em;" alt="Cell Padding" title="Cell padding" width="210" height="210" /></a><br />
<h4>Cell Padding</h4>
<p>Individual cells can have a left, right, top and bottom padding.</p>
</li>
</ul>
<p>During our sprint, Casper focused on loading, styles and drawing, and also sat with me for some pair programming when we implemented spanning, while I worked mostly on the layout part and unit testing of the features.</p>
<p>All in all it&#8217;s been a great weekend. Of course there are bugs to be worked out, but the basics of these features are all there and working. Casper is a very friendly host and a great programmer. I have a lot to learn <img src='http://estan.dose.se/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> He also did all the cooking and made me feel right at home. Thanks Casper!</p>
<p>The weekend ended with a couple of hours of planning, and we made a detailed list of ODF table features that we want for 2.1.</p>
<p>It&#8217;s quite pleasing to see that the approach to tables in KOffice that we&#8217;ve chosen seems to be holding up, and I&#8217;m pretty sure it will work out for all the remaining features that we need to implement, of which proper table breaking across pages is perhaps the most tricky one, from a layout point of view. But that&#8217;s for later; right now I&#8217;m going home for some resting up, and I think Casper is doing the same back at his place.</p>
<p>Anyway, kids are screaming like crazy here on the train, so I think I&#8217;ll end this blog with a little screencast showing off some of the new features, and then put on my headphones and doze off.</p>
<p>So long!</p>
<div id="attachment_140" class="wp-caption aligncenter" style="width: 510px"><a href="http://nya-doxa.se/elvis/tables-sprint-features.ogv"><img src="http://estan.dose.se/wp-content/uploads/2009/07/sprint-screencast-intro.png" alt="Copenhagen Sprint Features Screencast" title="Copenhagen Sprint Features Screencast" width="500" height="400" class="size-full wp-image-140" /></a><p class="wp-caption-text">Copenhagen Sprint Features Screencast</p></div>
<p><a href="http://nya-doxa.se/elvis/tables-sprint-features.ogv">Direct link</a> (2:40 min, 15.2 MB Ogg/Theora)</p>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2009/07/tables-sprint-in-copenhagen/feed</wfw:commentRss>
<enclosure url="http://nya-doxa.se/elvis/tables-sprint-features.ogv" length="15967016" type="video/ogg" />
		</item>
		<item>
		<title>On the train to Copenhagen</title>
		<link>http://estan.dose.se/2009/07/on-the-train-to-copenhagen</link>
		<comments>http://estan.dose.se/2009/07/on-the-train-to-copenhagen#comments</comments>
		<pubDate>Fri, 17 Jul 2009 07:02:34 +0000</pubDate>
		<dc:creator>estan</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[gsoc]]></category>

		<category><![CDATA[koffice]]></category>

		<category><![CDATA[planetkde]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=130</guid>
		<description><![CDATA[Hi again,
Right now I&#8217;m on the train down to Copenhagen for a little sprint/coordination meeting with Casper. As it turns out, he&#8217;ll be working on tables too and therefore we thought it would be good to get together and coordinate a little. And code like crazy of course.
I&#8217;ll be going home Monday afternoon, and hopefully [...]]]></description>
			<content:encoded><![CDATA[<p>Hi again,</p>
<p>Right now I&#8217;m on the train down to Copenhagen for a little sprint/coordination meeting with Casper. As it turns out, he&#8217;ll be working on tables too and therefore we thought it would be good to get together and coordinate a little. And code like crazy of course.</p>
<p>I&#8217;ll be going home Monday afternoon, and hopefully there will be something blog worthy coming out of this. *yAwn*. Got up at 5 AM, so a little tired, but no rest for the wicked right? <img src='http://estan.dose.se/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Later, Elvis.</p>
<p><img src="http://estan.dose.se/wp-content/uploads/2009/07/copenhagen.jpg" alt="" title="Copenhagen" width="336" height="167" class="aligncenter size-full wp-image-131" /></p>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2009/07/on-the-train-to-copenhagen/feed</wfw:commentRss>
		</item>
		<item>
		<title>Tables Update - Heights</title>
		<link>http://estan.dose.se/2009/07/tables-update-heights</link>
		<comments>http://estan.dose.se/2009/07/tables-update-heights#comments</comments>
		<pubDate>Wed, 15 Jul 2009 13:50:13 +0000</pubDate>
		<dc:creator>estan</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[gsoc]]></category>

		<category><![CDATA[koffice]]></category>

		<category><![CDATA[planetkde]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=117</guid>
		<description><![CDATA[Hello again,
As you may remember from my last post, I was cheating in my screencast; the table height was hard-coded and the cell heights were not adjusted to content height. What I needed to do was to handle the following case:
I have just commited the beginnings of this in r997173. TableLayout now has an updateCellContentHeight(QTextTableCell&#038;) [...]]]></description>
			<content:encoded><![CDATA[<p>Hello again,</p>
<p>As you may remember from my last post, I was cheating in my screencast; the table height was hard-coded and the cell heights were not adjusted to content height. What I needed to do was to handle the following case:</p>
<div id="attachment_118" class="wp-caption aligncenter" style="width: 490px"><img src="http://estan.dose.se/wp-content/uploads/2009/07/table-insert-row-height.png" alt="Cell Heights Adjustment" title="Cell Heights Adjustment" width="480" height="400" class="size-full wp-image-118" /><p class="wp-caption-text">Cell Heights Adjustment</p></div>
<p>I have just commited the beginnings of this in <a href="http://websvn.kde.org/?view=rev&#038;revision=997173">r997173</a>. TableLayout now has an updateCellContentHeight(QTextTableCell&#038;) API, which is called once the content of a cell has been laid out in Layout::nextParag().</p>
<p>There are a lot of rough edges, and my tests of course broke left and right, but it principally works, fingers crossed <img src='http://estan.dose.se/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> Here&#8217;s a video demonstration:</p>
<div id="attachment_126" class="wp-caption aligncenter" style="width: 510px"><a href="http://nya-doxa.se/elvis/gsoc-content-heights.ogv"><img src="http://estan.dose.se/wp-content/uploads/2009/07/gsoc-content-heights1.png" alt="Cell Heights Calculations" title="Cell Heights Calculations" width="500" height="400" class="size-full wp-image-126" /></a><p class="wp-caption-text">Cell Heights Calculations</p></div>
<p><a href="http://nya-doxa.se/elvis/gsoc-content-heights.ogv">Direct link</a> (1:30 min, 7.6 MB Ogg/Theora).</p>
<p>I skipped uploading to Vimeo this time, as it&#8217;s so clunky. I don&#8217;t think anyone will miss Flash right?</p>
<p>Anyway, my dear mom just appeared and is taking me out to eat, then I need to start fixing/extending those tests, so bye for now!</p>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2009/07/tables-update-heights/feed</wfw:commentRss>
<enclosure url="http://nya-doxa.se/elvis/gsoc-content-heights.ogv" length="7961205" type="video/ogg" />
		</item>
		<item>
		<title>Tables GSoC Status</title>
		<link>http://estan.dose.se/2009/07/tables-gsoc-status</link>
		<comments>http://estan.dose.se/2009/07/tables-gsoc-status#comments</comments>
		<pubDate>Wed, 08 Jul 2009 15:41:18 +0000</pubDate>
		<dc:creator>estan</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[gsoc]]></category>

		<category><![CDATA[koffice]]></category>

		<category><![CDATA[planetkde]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=103</guid>
		<description><![CDATA[Hi all,
I hope everyone had a nice time on Gran Canaria. It seems like it&#8217;s been a really successful event from all the posts I&#8217;ve read.
I&#8217;m not one of the frequent GSoC bloggers here on p.k.o, but as we are in mid-term now I thought I&#8217;d make a little summary of my thoughts around the [...]]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p>I hope everyone had a nice time on Gran Canaria. It seems like it&#8217;s been a really successful event from all the posts I&#8217;ve read.</p>
<p>I&#8217;m not one of the frequent GSoC bloggers here on p.k.o, but as we are in mid-term now I thought I&#8217;d make a little summary of my thoughts around the project so far and give a little status report.</p>
<p>Initially my idea was to divide this post into two sections; &#8220;The Good&#8221; and &#8220;The Bad&#8221;, with a summary at the end. But then I realized that for almost every bad thing I could think of, I could find a good side to it, and vice versa. There&#8217;s always two sides to a coin. So instead I&#8217;ve decided to make a table. How appropriate <img src='http://estan.dose.se/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<table>
<caption align="bottom"><em>(The table is styled and probably looks better at my blog page)</em></caption>
<thead>
<tr>
<td colspan="2">GSoC experiences so far</td>
</tr>
<tr>
<td class="negative">-</td>
<td class="positive">+</td>
</thead>
<tbody>
<tr>
<td>Table layout is hard. There are just so many things to consider, and a lot of side cases to take care of. Just look at <a href="http://qt.gitorious.org/qt/qt/blobs/master/src/gui/text/qtextdocumentlayout.cpp">Qt Scribe&#8217;s implementation</a>. Lord knows I have <img src='http://estan.dose.se/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </td>
<td>But extremely fun and a very rewarding thing to work on. The feedback is quite immediate, which is very gratifying.</td>
</tr>
<tr>
<td>Unit testing is an art. You have to be very careful what you test for and how you go about it. Just writing the tests is not enough, you have to put a lot of thought into it.</td>
<td>But it&#8217;s an invaluable tool when starting out and trying to focus on a specific aspect of a complex thing such as table layout. By the way, anyone who can recommend a short little book on unit testing? Preferably something as concise and &#8220;hands-on&#8221; as e.g. Meyers&#8217; Effective C++.</td>
</tr>
<tr>
<td>I have probably over-estimated my abilities as a programmer. I tend to try to consider all the consequences of the changes I do at once and look into the future, instead of focusing on the actual problem at hand, and this tend to be a real show stopper for productivity. As my good mentor Thomas put it; perfection is the enemy of productivity.
</td>
<td>But I&#8217;ve learnt a lot about my abilities and limitations, and I feel that I&#8217;m improving. I&#8217;m confident that by the end of this summer, I will have grown as a programmer.</td>
</tr>
<tr>
<td>Git can be confusing. Coming from centralized VCSs like SVN and CVS, wrapping your head around this new-fangled distributed VCS can be quite daunting, especially as the user interface is a veritable swiss army knife of funky names and idioms. A text that really helped me understand how Git works was <a href="http://tom.preston-werner.com/2009/05/19/the-git-parable.html">The Git Parable</a>. And for the more technically inclined I&#8217;ve heard good things about <a href="http://eagain.net/articles/git-for-computer-scientists/">Git for Computer Scientists</a></td>
<td>But it is a God-send after all, and I can&#8217;t wait until all of KOffice (and KDE) is on Git. Things like cherrypicking, interactive rebasing and extremely easy branching/merging is just too good to say no to. I&#8217;d like to make a parallel to when I first learned Vim. No pain no gain right? <img src='http://estan.dose.se/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> Recent posts here on the planet, if I understand them correctly, indicates that there are talks about hosting KDE Git repos at Gitorious, which sounds like a good idea to me.</td>
<tr>
<td>The payment schedule of Summer of Code is kind of unfortunate. At least if you have high fixed expenses every month, as you&#8217;ll have to go all through June without any money. This is something to think about if you&#8217;re considering participating. I was lucky to be able to loan money for my rent/Internet/electricity/phone bill.</td>
<td>But this is definitely understandable. Having monthly payments would mean having monthly evaluations and a lot more work for both mentors and Google staff members. I guess a lot of students in the program live with their parents and don&#8217;t have a lot of expenses. But I&#8217;m (almost) an old fart as far as students go <img src='http://estan.dose.se/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> Just bringing this up, as it can become an extra stress factor.</td>
</tbody>
</table>
<p></p>
<p>All in all, I&#8217;m having a great GSoC so far, and I think it can only get better.</p>
<h2>Progress</h2>
<p>Now on to some information about my progress. What I&#8217;ve been working on is getting some first basic table layout working. The design is quite simple so far, and looks very roughly something like this:</p>
<div id="attachment_105" class="wp-caption aligncenter" style="width: 491px"><img src="http://estan.dose.se/wp-content/uploads/2009/07/gsoc-overview.png" alt="Table Layout Design Overview" title="Table Layout Design Overview" width="481" height="401" class="size-full wp-image-105" /><p class="wp-caption-text">Table Layout Design Overview</p></div>
<p>The Layout class is the innermost class of the text layout engine in KOffice, and is the one responsible for most of the nitty gritty details of text layout. It is declared as an inner class of KoTextDocumentLayout, which has an instance of this class called <em>m_state</em>.</p>
<p>KoTextDocumentLayout in turn is a higher level class that derives from Qt&#8217;s abstract document layout class QAbstractTextDocumentLayout. Qt&#8217;s own document layout engine, QTextDocumentLayout, which is not shown in the diagram above, derives from this same ABC. I&#8217;ve also included KWTextDocumentLayout, which is a specialized KoTextDocumentLayout used in KWord. It adds support for letting text flow around other shapes, among other things.</p>
<p>What this all means is that KOffice&#8217;s layout engine, while still working with an underlying QTextDocument, is completely separate from Qt&#8217;s. Now, because of poor research on my part in the weeks leading up to the GSoC start, I actually thought I&#8217;d be able to leverage at least some of the built-in support for table layout in Qt. But I have only myself to blame for that, and it&#8217;s nothing to cry over now. What I do get is QTextTable, which can be considered a blueprint for a table, and my task is to lay out this table according to its properties, which I&#8217;ll later have to extend to support ODF features that don&#8217;t have a 1:1 equivalent in QTextTable and its associate classes.</p>
<p>I&#8217;ve modified Layout to have an instance of the new class TableLayout, which is responsible for doing layout and drawing of tables. It takes a QTextTable and lays it out, storing the layout information, such as table and cell geometries in an associated TableData instance. It actually caches TableData instances per-table internally. TableLayout offers an API to be used from Layout to obtain cell content rectangles to direct the layout engine into, as well as an API for adjusting cell heights based on the cell contents.</p>
<p>It&#8217;s a simple design, but one that I think will work out fine for all the requirements that will come later, and I already have ideas on how e.g. cell spanning should be implemented. Things on my TODO are too many to even enumerate, but what I&#8217;m working on right this minute is row heights calculations and finding a good way to let the layout process in Layout notify the TableLayout of cell content height changes. After that comes, among other things:</p>
<ul>
<li>Margins/paddings/borders.</li>
<li>Variable column widths.</li>
<li>Tests, tests and more tests.</li>
</ul>
<p>Now let&#8217;s see, this post has had a table, a diagram and a list. What&#8217;s missing? A video of course <img src='http://estan.dose.se/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> Take 50 seconds and marvel at me pasting a basic table from Firefox into KWord and editing the cell contents:</p>
<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=5507473&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=5507473&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object></p>
<p><a href="http://nya-doxa.se/elvis/gsoc-midterm-basic-tables.ogv">Direct link</a> (5.7 MB Ogg/Theora).</p>
<p>Actually I&#8217;m cheating in the above video, as the table height is hard coded, but don&#8217;t tell anyone! <img src='http://estan.dose.se/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Finally, I&#8217;d like to  be honest and admit that progress really haven&#8217;t been as fast as I thought it would be, but I do feel that I&#8217;m on the right track. And even though the road ahead is longer than what I would have wanted, at least it seems pretty straight, all things considered.</p>
<p>Now if you&#8217;ll excuse me, I really need to get back to coding!</p>
<p>Bye &#8217;til next time!</p>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2009/07/tables-gsoc-status/feed</wfw:commentRss>
<enclosure url="http://nya-doxa.se/elvis/gsoc-midterm-basic-tables.ogv" length="5930078" type="video/ogg" />
		</item>
		<item>
		<title>Summer of Tables!</title>
		<link>http://estan.dose.se/2009/04/summer-of-tables</link>
		<comments>http://estan.dose.se/2009/04/summer-of-tables#comments</comments>
		<pubDate>Tue, 28 Apr 2009 08:40:02 +0000</pubDate>
		<dc:creator>estan</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[gsoc]]></category>

		<category><![CDATA[koffice]]></category>

		<category><![CDATA[planetkde]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=97</guid>
		<description><![CDATA[I&#8217;m probably one of the last GSoC student to blog after the announcement, but I&#8217;m just knee high in school work right now  
The good news is: Yes! My proposal was accepted and I&#8217;ll be working this summer with implementing basic support for tables in KOffice&#8217;s text shape. Of course I&#8217;m very excited about [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m probably one of the last GSoC student to blog after the announcement, but I&#8217;m just knee high in school work right now <img src='http://estan.dose.se/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The good news is: <b>Yes!</b> My <a href="http://techbase.kde.org/Projects/Summer_of_Code/2009/Projects/Basic_tables_support_for_KWord#Original_Proposal">proposal</a> was accepted and I&#8217;ll be working this summer with implementing basic support for tables in KOffice&#8217;s text shape. Of course I&#8217;m very excited about this and I just wish school was over so I can start hacking.</p>
<p>I&#8217;ve been aggregated on the planet for a while now, so maybe some of you have an idea of who I am, though my very infrequent posting surely hasn&#8217;t helped. My name is Elvis Stansvik and I&#8217;m a 25 year old student from Sweden. A little more about me in my <a href="http://techbase.kde.org/Projects/Summer_of_Code/2009/Projects/Basic_tables_support_for_KWord#About_Me">original proposal</a>. I&#8217;ve followed the KOffice project with great interest for the past 4 years or so, and when time has allowed I&#8217;ve done some bug fixing et.c. I&#8217;m looking forward to finally be able to put my heart into the project this summer.</p>
<p>Since support for tables is quite an ambitious task and one that is important to get right, I&#8217;m very honored by the confidence put in me by the KOffice mentors and I&#8217;ll make sure to work closely with my assigned mentor <a href="http://labs.trolltech.com/blogs/author/tzander/">Thomas</a> and other senior devs within KOffice to bring it to fruition. Don&#8217;t be fooled by the word &#8220;basic&#8221; in my proposal title, tables are a complex thing to implement and although my goals for this summer does not include support for every single detail of the ODF specification of tables, all the requirements of the spec must still be kept in mind in order for my implementation to be able to grow in the future.</p>
<p>As I said, at the moment I&#8217;m kind of swamped by school work, but during the little free moments that I actually have, I&#8217;m putting my nose in the text layout and loading code of KOffice, and I think that I already have quite a good grasp of how it fits together. School work should ease up a bit in the coming week or two, and during this initial &#8220;Community Bonding&#8221; period, my plan is to:</p>
<ul>
<li>Read all the relevant portions of the ODF specification and keep my eye out for things that I need to keep in mind that I haven&#8217;t thought of already, and maybe create a short list of &#8220;requirements&#8221; to get a better overview of what ODF demands when it comes to tables.</li>
<li>Spend more time reading and maybe even poking at some at the text layout code in <b>plugins/textshape</b> and loading code in <b>libs/kotext/opendocument</b>. No better way to learn than to break stuff.</li>
<li>Ask my good&#8217;ol mentor quite some questions! <img src='http://estan.dose.se/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
<p>In the beginning of June, I&#8217;ll also be attending the <a href="http://wiki.koffice.org/index.php?title=Meetings/Mid_2009_meeting">KOffice meeting</a> in Berlin, where I&#8217;ll be able to meet Thomas and the other KOffice devs.</p>
<p>All in all, I think this summer will be a lot of hard work, but a great opportunity, both for me to grow as a programmer and learn more about the KOffice code, but also for KOffice who will finally be getting a proper implementation of tables for the 2.x series, and I&#8217;m very much looking forward to it.</p>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2009/04/summer-of-tables/feed</wfw:commentRss>
		</item>
		<item>
		<title>To Komvux students in Sweden</title>
		<link>http://estan.dose.se/2009/03/to-komvux-students-in-sweden</link>
		<comments>http://estan.dose.se/2009/03/to-komvux-students-in-sweden#comments</comments>
		<pubDate>Sat, 28 Mar 2009 10:41:45 +0000</pubDate>
		<dc:creator>estan</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[gsoc]]></category>

		<category><![CDATA[komvux]]></category>

		<category><![CDATA[planetkde]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=94</guid>
		<description><![CDATA[Yes, we are apparently eligible for Google Summer of Code! I looked it up.
Just posting this in case it helps anyone else who like me was unsure about their eligibility.
]]></description>
			<content:encoded><![CDATA[<p><strong>Yes</strong>, we are apparently eligible for Google Summer of Code! I looked it up.</p>
<p>Just posting this in case it helps anyone else who like me was unsure about their eligibility.</p>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2009/03/to-komvux-students-in-sweden/feed</wfw:commentRss>
		</item>
		<item>
		<title>Looking for part time work</title>
		<link>http://estan.dose.se/2009/02/looking-for-part-time-work</link>
		<comments>http://estan.dose.se/2009/02/looking-for-part-time-work#comments</comments>
		<pubDate>Thu, 19 Feb 2009 13:45:01 +0000</pubDate>
		<dc:creator>estan</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[planetkde]]></category>

		<guid isPermaLink="false">http://estan.dose.se/?p=90</guid>
		<description><![CDATA[Shame on me for using the planet like this, but I&#8217;m currently looking for a part time / temporary job that I can combine with my studies. I&#8217;m a free software hacker (duh) in my spare time, and you can find some patches from me sprinkled about projects such as KOffice, The Gimp, Scribus, libxml2 [...]]]></description>
			<content:encoded><![CDATA[<p>Shame on me for using the planet like this, but I&#8217;m currently looking for a part time / temporary job that I can combine with my studies. I&#8217;m a free software hacker (duh) in my spare time, and you can find some patches from me sprinkled about projects such as KOffice, The Gimp, Scribus, libxml2 and FreeBSD.</p>
<p>My previous work experiences are quite varied and include running my own book shop and eventually a book café, working as an IT-technician for a small book publishing company and also being leased out as a programming consultant to other Swedish publishing companies. At the moment I&#8217;m studying and doing some part time work as a translator of technical manuals and user interfaces for a Spanish localization company.</p>
<p>I&#8217;m an agile worker and good at keeping deadlines and delivering on spec, as well as quickly getting up to speed in large existing code bases in a multitude of programming languages.</p>
<p>If you need an extra hand for your project, or just need an additional part time worker on your staff, please don&#8217;t hesitate to contact me! <a href="http://dose.se/CV-en.pdf">Here&#8217;s my CV</a>. I&#8217;m not picky about which tools or technologies you want me to work with, or afraid of mundane tasks. And the pay just have to be reasonable, not more <img src='http://estan.dose.se/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Looking forward to hearing from you!</p>
<p>Phone: +46763091545<br />
E-mail/Skype: elvstone [[at]] gmail.com</p>
]]></content:encoded>
			<wfw:commentRss>http://estan.dose.se/2009/02/looking-for-part-time-work/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
