Issue 88521 - Adding scaling factor on page preview in calc!
Summary: Adding scaling factor on page preview in calc!
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: 680m227
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: oc
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks: 72764
  Show dependency tree
 
Reported: 2008-04-21 08:22 UTC by yonggang.mao
Modified: 2013-08-07 15:14 UTC (History)
6 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
The patch file is about issue88521-v1#. (27.52 KB, text/plain)
2008-05-07 06:58 UTC, yonggang.mao
no flags Details
The patch file about i88521-v2# (27.66 KB, text/plain)
2008-05-07 09:22 UTC, yonggang.mao
no flags Details
The patch file is about i88521#. (44.45 KB, text/plain)
2008-05-21 10:19 UTC, yonggang.mao
no flags Details
The patch is about i88521#-v3 (45.86 KB, text/plain)
2008-06-05 03:58 UTC, yonggang.mao
no flags Details
The patch is about i88521#-v4 (43.29 KB, text/plain)
2008-06-11 09:31 UTC, yonggang.mao
no flags Details
the zoomslider's background color. (126.03 KB, text/plain)
2008-06-23 06:41 UTC, yonggang.mao
no flags Details
The patch file is about i88521#-v5 (44.05 KB, text/plain)
2008-07-01 09:05 UTC, yonggang.mao
no flags Details
TCS for scaling slider in spreadsheet (7.75 KB, text/html)
2008-12-08 10:38 UTC, oc
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description yonggang.mao 2008-04-21 08:22:49 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
Comment 1 yonggang.mao 2008-05-07 06:58:41 UTC
Created attachment 53429 [details]
The patch file is about issue88521-v1#.
Comment 2 yonggang.mao 2008-05-07 09:22:01 UTC
Created attachment 53437 [details]
The patch file about i88521-v2#
Comment 3 yonggang.mao 2008-05-09 08:39:15 UTC
Hello Niklas,
Please review the i88521#-v1 patch file,thanks!
Comment 4 niklas.nebel 2008-05-09 15:40:01 UTC
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.
Comment 5 yonggang.mao 2008-05-21 10:19:14 UTC
Created attachment 53815 [details]
The patch file is about i88521#.
Comment 6 niklas.nebel 2008-05-21 19:18:30 UTC
This patch looks quite good. So it has to be decided now how to handle "fit to
pages".
Comment 7 yonggang.mao 2008-05-22 04:48:50 UTC
STARTED
Comment 8 frank.loehmann 2008-05-22 09:37:22 UTC
This issue is important and listed on the quarterly review for Calc:
http://wiki.services.openoffice.org/wiki/2008_Q2_Review_of_Spreadsheet_Project
Comment 9 yonggang.mao 2008-05-26 09:27:34 UTC
Hello Niklas,
About "fit to pages" how should I handle it? I hope you can give some advice.
Comment 10 yonggang.mao 2008-06-04 16:16:50 UTC
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!
Comment 11 yonggang.mao 2008-06-05 03:31:08 UTC
Hi Niklas,
I know how to handle it.:)
Comment 12 yonggang.mao 2008-06-05 03:58:08 UTC
Created attachment 54246 [details]
The patch is about i88521#-v3
Comment 13 yonggang.mao 2008-06-11 09:31:07 UTC
Created attachment 54392 [details]
The patch is about i88521#-v4
Comment 14 niklas.nebel 2008-06-16 16:35:22 UTC
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).
Comment 15 yonggang.mao 2008-06-23 06:41:21 UTC
Created attachment 54672 [details]
the zoomslider's background color.
Comment 16 yonggang.mao 2008-07-01 09:05:08 UTC
Created attachment 54852 [details]
The patch file is about i88521#-v5
Comment 17 yonggang.mao 2008-07-01 09:13:04 UTC
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.
Comment 18 niklas.nebel 2008-10-29 12:24:58 UTC
taking the issue
Comment 19 niklas.nebel 2008-10-29 12:33:20 UTC
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.
Comment 20 niklas.nebel 2008-12-04 15:40:56 UTC
Reassigning to QA for verification
Comment 21 oc 2008-12-08 10:38:04 UTC
Created attachment 58617 [details]
TCS for scaling slider in spreadsheet
Comment 22 oc 2008-12-09 11:30:36 UTC
verified in internal build cws_calc47
Comment 23 sgautier.ooo 2009-01-25 18:44:22 UTC
Verified in DEV300_m39 .deb version - Closing - Sophie