Re: [Libreoffice] [MHST][Easy Hack] Get current page number for printing

2011-07-19 Thread Ta Duc Tung

On 07/18/2011 11:07 AM, Andrew Douglas Pitonyak wrote:

On 07/16/2011 05:02 AM, Ta Duc Tung wrote:

Hi,

1. How to get current page number for printing?
We've found a variable mnCurPage from printdlg.cxx but it 
seems not to be the right one. I think it is current page number for 
preview in print dialog.


If I were writing a macro and I wanted to know, I would probably get 
this from the view cursor (but that is just a guess).



Hi,

Last mail, I said that I can get the current page number from 
SwDocShell. However, that number is the page where the cursor is, not 
always the page which user see. Could you give me some hint where to get 
the page number where user is seeing? Is that view cursor? Where can I 
find it?


Thanks and Best Regards,
Ta Tung
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [MHST][Easy Hack] Get current page number for printing

2011-07-18 Thread Ta Duc Tung

On 07/18/2011 11:07 AM, Andrew Douglas Pitonyak wrote:

On 07/16/2011 05:02 AM, Ta Duc Tung wrote:

Hi,

1. How to get current page number for printing?
We've found a variable mnCurPage from printdlg.cxx but it 
seems not to be the right one. I think it is current page number for 
preview in print dialog.


If I were writing a macro and I wanted to know, I would probably get 
this from the view cursor (but that is just a guess).


Thank you for replying Andrew. We've managed to get the current page. 
Cause we want to pass the current page to print dialog so we went to 
unotxdoc.cxx and get the current page from SwDocShell :)

Again, thank you very much.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [MHST][Easy Hack] Get current page number for printing

2011-07-18 Thread Christoph Noack
Hi TaTung, all!

Sorry for answering so late ...

Am Samstag, den 16.07.2011, 21:40 +0700 schrieb Ta Duc Tung:
 On 07/16/2011 07:29 PM, Christoph Noack wrote:
[...]
  We are trying to hack into this easy hack
  https://bugs.freedesktop.org/show_bug.cgi?id=38830
  We're still studying source code. We have 2 questions:
  Great!

[...]

2. How to add another RadioButton in to print dialog?
We can enable and disable existing RadioButton like All, Pages,
  or Selection but it's still mystery for adding new RadioButton. We want
  to add a Current Page radio button just below Pages radio button.
 
  Anyone please help us :)
  Is there a specific reason to use another radio button? OOo once added
  the current page number to the Pages field - which worked okay for
  many users.

 I think it will be more intuitive and easier to use if we have a Current 
 Page radio button there. As a beginner, I won't aware that the number in 
 the text box is current page because normally, I scarcely care which 
 page I was.

Okay, that's a good point - when we've designed the today's printing
dialog, we tried hard to get rid of many of the old options to make it
both useful and clean (although current page was never part of that).

I've noticed that you already provided a patch for that - thanks! And
here I'd like to ask you to help me to get some understanding ...
reason: I lack C++ coding skills.

So ...
  * Where is Current page located? Between Pages and
Selection, I assume, or?
  * Please take care that the dialog does not grow in height (too
much), since it won't be usable on netbooks.
  * Does this patch also provide Current Page for Draw/Impress?
This would be essential for consistency. If yes, then the
terminology for Impress only) is different: Current Slide.
Only for Calc and Math it is not needed or makes less sense.

Could you please provide some hints to me? Thanks!

Mmh, looking at a recent LibO version, I notice that somebody moved ...
the reverse order option to a weird position (makes no sense, breaks
spacing etc.) But that's another story.

Cheers,
Christoph

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [MHST][Easy Hack] Get current page number for printing

2011-07-17 Thread Andrew Douglas Pitonyak

On 07/16/2011 05:02 AM, Ta Duc Tung wrote:

Hi,

1. How to get current page number for printing?
We've found a variable mnCurPage from printdlg.cxx but it 
seems not to be the right one. I think it is current page number for 
preview in print dialog.


If I were writing a macro and I wanted to know, I would probably get 
this from the view cursor (but that is just a guess).


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [MHST][Easy Hack] Get current page number for printing

2011-07-16 Thread Christoph Noack
Hi TaTung!, all!

Am Samstag, den 16.07.2011, 16:02 +0700 schrieb Ta Duc Tung:
 Hi,
 
 We are trying to hack into this easy hack
 https://bugs.freedesktop.org/show_bug.cgi?id=38830
 We're still studying source code. We have 2 questions:

Great!

[...]

  2. How to add another RadioButton in to print dialog?
  We can enable and disable existing RadioButton like All, Pages, 
 or Selection but it's still mystery for adding new RadioButton. We want 
 to add a Current Page radio button just below Pages radio button.
 
 Anyone please help us :)

Is there a specific reason to use another radio button? OOo once added
the current page number to the Pages field - which worked okay for
many users.

And Word, as far as I remember, also handles this a bit different (if we
look for easing the transition from MSO users to us).

Thanks for working on that!

Christoph

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [MHST][Easy Hack] Get current page number for printing

2011-07-16 Thread Ta Duc Tung

On 07/16/2011 07:29 PM, Christoph Noack wrote:

Hi TaTung!, all!

Am Samstag, den 16.07.2011, 16:02 +0700 schrieb Ta Duc Tung:

Hi,

We are trying to hack into this easy hack
https://bugs.freedesktop.org/show_bug.cgi?id=38830
We're still studying source code. We have 2 questions:

Great!

[...]


  2. How to add another RadioButton in to print dialog?
  We can enable and disable existing RadioButton like All, Pages,
or Selection but it's still mystery for adding new RadioButton. We want
to add a Current Page radio button just below Pages radio button.

Anyone please help us :)

Is there a specific reason to use another radio button? OOo once added
the current page number to the Pages field - which worked okay for
many users.
I think it will be more intuitive and easier to use if we have a Current 
Page radio button there. As a beginner, I won't aware that the number in 
the text box is current page because normally, I scarcely care which 
page I was.

And Word, as far as I remember, also handles this a bit different (if we
look for easing the transition from MSO users to us).
I don't have M$ Word here but after googling some images, I see they 
also have the Current Page option. And I think it's a clever design.

Thanks for working on that!

Christoph



Best Regards,
TaTung
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice