Apache OpenOffice (AOO) Bugzilla – Issue 88521
Adding scaling factor on page preview in calc!
Last modified: 2013-08-07 15:14:39 UTC
According to the request of the to-do list in Calc OOo community,the feature is to add scaling factor on page preview in Calc.it would make the user get immediate feedback when changing this setting. See the specification: http://specs.openoffice.org/calc/features/Print_Output_Scaling_Factor.odt and the feature spec: http://wiki.services.openoffice.org/wiki/Calc/Drafts/Page_margins
Created attachment 53429 [details] The patch file is about issue88521-v1#.
Created attachment 53437 [details] The patch file about i88521-v2#
Hello Niklas, Please review the i88521#-v1 patch file,thanks!
Some comments on the patch: In Window::Paint, the rectangle is the area that was invalidated, which can be only a part of the window. So you must not position the elements based on that rectangle. This is different from status bar controls. In ScPreviewShell::Execute, you can't call ModifyStyleSheet directly with the item from the controller, because the page style contains a different item. The status notification (ScZoomSliderControl::StateChanged) doesn't work because SvxZoomSliderItem implementation is incomplete. It doesn't set mnMinZoom/mnMaxZoom in the copy constructor, and it doesn't read/write them in QueryValue/PutValue. Also note that our C++ source files must contain 7-bit ASCII characters only, including comments.
Created attachment 53815 [details] The patch file is about i88521#.
This patch looks quite good. So it has to be decided now how to handle "fit to pages".
STARTED
This issue is important and listed on the quarterly review for Calc: http://wiki.services.openoffice.org/wiki/2008_Q2_Review_of_Spreadsheet_Project
Hello Niklas, About "fit to pages" how should I handle it? I hope you can give some advice.
Hello Niklas, I have a small question about the slider,if Scaling mode is Reduce/enlarge printout,Scaling factor is 200%, when the user switch from that mode to Fit to pages,the slider should disable,but I don't know how to set its position,there are two scenarios: 1).when the user select Fit to pages,it is disabled,the slider's position is 200%. 2).the other when the user select Fit to pages,it is disabled,the slider's position is 100%, meantime,when the user switch to Reduce/enlarge printout, Is the slider's position 100%? or Is the slider's position 200%? any better ideas? or better scenario? I hope you can give me some advice. thanks!
Hi Niklas, I know how to handle it.:)
Created attachment 54246 [details] The patch is about i88521#-v3
Created attachment 54392 [details] The patch is about i88521#-v4
You initialize the gradient's start and end color to the same value, GetFaceColor. But even with different colors, it doesn't look the same as most native toolbox styles (look at Windows XP default theme, for example). Some more smaller points: - The new slot needs a user-visible name (CalcCommands.xcu in officecfg). - The group ID in the sdi file should be GID_FORMAT, not GID_VIEW (the print scale is saved as part of the document, not a view setting).
Created attachment 54672 [details] the zoomslider's background color.
Created attachment 54852 [details] The patch file is about i88521#-v5
Hi Niklas, Some smaller points have been fixed. the SID has been modified from SID_PREVIEW_ZOOMSLIDER to SID_PREVIEW_SCALINGFACTOR. the zoom control's background color is not fixed.
taking the issue
I added the last patch to CWS "calc47", with the solid background color, so we can have the feature in 3.1. I created the follow-up issue 95578 to add transparent background later.
Reassigning to QA for verification
Created attachment 58617 [details] TCS for scaling slider in spreadsheet
verified in internal build cws_calc47
Verified in DEV300_m39 .deb version - Closing - Sophie