Bug 124645 - tab "Sheet Selection" twice in print dialog
Summary: tab "Sheet Selection" twice in print dialog
Status: RESOLVED FIXED
Alias: None
Product: calligrasheets
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Calligra Sheets (KSpread) Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-31 15:52 UTC by Burkhard Lück
Modified: 2009-01-08 01:43 UTC (History)
3 users (show)

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 Burkhard Lück 2006-03-31 15:52:31 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

Sometimes I have two tabs "Sheet Selection" in the expanded print dialog of kspread.

Reproduce:
Select File -> Print Preview... and close the preview.
Select File -> Print... 
In the print dialog click on "Options >>", then I have two tabs "Sheet Selection"

This happens only if I do a Print Preview immediately before File -> Print...
Comment 1 Sebastian Sauer 2006-08-19 14:32:57 UTC
The reason for this bug is, that in lib/kofficecore/KoMainWindow.cpp#1221 in the method "void KoMainWindow::slotFilePrintPreview()" rootView()->print(printer); got called before printer.setup(rootView()); is called. Normaly printer.setup does take care of freeing the with KPrinter::addDialogPage added custom pages. Since it is not called, each time the preview got called a new KPSheetSelectPage got added via the "void View::setupPrinter( KPrinter &prt )" method in kspread/kspread_view.cc.

So, the correct solution would be to check via KPrinter.previewOnly() if we are in printpreview-mode and if that's the case, just don't add the custom page. Since we use the custom page at the "void View::print( KPrinter &prt )" method in kspread_view.cc, it's difficult to find a nice patch for that case cause what to do with the selected sheets if the user don't choosed which one should be printed? Just show all sheets in the preview even if the user likes to print/preview only e.g. the first sheet?
Comment 2 Elián Hanisch 2008-11-02 20:54:19 UTC
can't test it as Print preview crashes kspread. bug #174120
Comment 3 Marijn Kruisselbrink 2009-01-08 01:43:52 UTC
this bug no longer seems to be present in kspread trunk