Review Request: fix/restore thumbnailing for Words

C. Boemann cbr at boemann.dk
Sun Jul 1 08:58:24 BST 2012



> On July 1, 2012, 4:42 a.m., C. Boemann wrote:
> > No idea if there is a better solution either, but if it works then fine with me.
> > 
> > Little nag why an item is used. What happens if it's widget based, pr am i just not understanding the issues here.
> > 
> > Anyway no objection for me if it works. ok to backport too (I trust you have tested well)
> 
> Friedrich W. H. Kossebau wrote:
>     Seemed to me like the only way to get a shapemanager. But after your nagging I researched a little more and now found what that canvasitem is. So I will change the patch to first look if there is any view to take the shapemanager from, and only then create the item.
>     
>     And if you can nag Thorsten about https://git.reviewboard.kde.org/r/105390 to give it a final "Ship it!" (hopefully) I could improve this patch to reuse the KoPAUtil::setSizeAndZoom(...) I introduced there :)
> 
> C. Boemann wrote:
>     Well sure I can nag Thorsten, but you can't use KoPAUtil in Words .. different framework
> 
> Friedrich W. H. Kossebau wrote:
>     Oh, right. Was confused because KoPAUtil is also used in CSThumbProviderWords... Perhaps those utils could be moved up to KoDocument area...
>     
>     Hm, is using the shapemanager of a view from views() a safe thing to do? Could that view and its canvas and the shapemanager be destroyed while KWDocument::generatePreview(...) is called? E.g. will be called during KoDocument::saveNativeFormatODF(...). And someone before me wrote that 
>         foreach(KoShape* shape, shapeManager->shapes()) {
>             shape->waitUntilReady(zoomHandler, false);
>         }
>     in KWPage::thumbnail(...), so that can take a while. Hm. That one single canvasitem seems a more safe thing to do, or? At least it worked for me (did not try Calligra Active though).
>     Okay, will commit now as I have no better idea. And if someone then can tell Calligra Active has no issues as well, I will backport.

Ok :)


- C.


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105385/#review15270
-----------------------------------------------------------


On June 29, 2012, 4:42 p.m., Friedrich W. H. Kossebau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105385/
> -----------------------------------------------------------
> 
> (Updated June 29, 2012, 4:42 p.m.)
> 
> 
> Review request for Calligra and C. Boemann.
> 
> 
> Description
> -------
> 
> Currently the thumbnailing for documents saved with Words is broken. Attached patch makes it at least working again, no idea if there are better solutions to get the result, I relied on the existing code in KWPage::thumbnail(...)
> 
> Okay to also backport to 2.5?
> 
> 
> Diffs
> -----
> 
>   words/part/KWDocument.h a8d8ae4 
>   words/part/KWDocument.cpp d5c4c2e 
>   words/part/KWPage.cpp 8ce9554 
> 
> Diff: http://git.reviewboard.kde.org/r/105385/diff/
> 
> 
> Testing
> -------
> 
> Created a few new files and looked at the thumbnails stored in the saved odf.
> 
> 
> Thanks,
> 
> Friedrich W. H. Kossebau
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120701/64a52a08/attachment.htm>


More information about the calligra-devel mailing list