[Libreoffice-commits] .: sd/source

Ivan Timofeev ivantimofeev at kemper.freedesktop.org
Wed Jul 11 12:36:30 PDT 2012


 sd/source/ui/view/DocumentRenderer.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit be68d26b6cba797c7838afd15b098f0b95399d78
Author: Rob Snelders <programming at ertai.nl>
Date:   Wed Jul 11 20:15:23 2012 +0200

    fdo#34697 - Print Current Page in Print dialog - Draw, Impress
    
    Change-Id: I40922cd1357ff473c251681f7280ba53b3060feb

diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 794e4ab..1dd9417 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -369,9 +369,10 @@ namespace {
     class DialogCreator : Resource
     {
     public:
-        DialogCreator (bool bImpress)
+        DialogCreator (bool bImpress, sal_Int32 nCurPage)
             : Resource(SdResId(_STR_IMPRESS_PRINT_UI_OPTIONS))
             , mbImpress(bImpress)
+            , mnCurPage(nCurPage)
         {
             ProcessResource();
         }
@@ -398,6 +399,7 @@ namespace {
         ::std::vector<beans::PropertyValue> maProperties;
         ::std::vector<sal_Int32> maSlidesPerPage;
         bool mbImpress;
+        sal_Int32 mnCurPage;
 
         void ProcessResource()
         {
@@ -634,7 +636,7 @@ namespace {
             AddDialogControl( vcl::PrinterOptionsHelper::getEditControlOpt( "",
                                 ".HelpID:vcl:PrintDialog:PageRange:Edit" ,
                                 "PageRange" ,
-                                "",
+                                OUString::valueOf(mnCurPage + 1),
                                 aPageRangeOpt )
                             );
 
@@ -1197,7 +1199,7 @@ public:
         , mpPrintView()
         , mbHasOrientationWarningBeenShown(false)
     {
-        DialogCreator aCreator( mrBase.GetDocShell()->GetDocumentType() == DOCUMENT_TYPE_IMPRESS );
+        DialogCreator aCreator( mrBase.GetDocShell()->GetDocumentType() == DOCUMENT_TYPE_IMPRESS, GetCurrentPageIndex() );
         m_aUIProperties = aCreator.GetDialogControls();
         maSlidesPerPage = aCreator.GetSlidesPerPage();
 


More information about the Libreoffice-commits mailing list