Bugzilla – Attachment 49253 Details for
Bug 34697
Print Current Page in Print dialog - Calc [Writer, Draw, Impress are finished]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
modified patch, see comment 6
34697.patch (text/plain), 3.17 KB, created by
Korrawit Pruegsanusak
on 2011-07-18 07:49:07 UTC
(
hide
)
Description:
modified patch, see comment 6
Filename:
MIME Type:
Creator:
Korrawit Pruegsanusak
Created:
2011-07-18 07:49:07 UTC
Size:
3.17 KB
patch
obsolete
>diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx >index f7ecb55..cbc9adf 100644 >--- a/sw/inc/printdata.hxx >+++ b/sw/inc/printdata.hxx >@@ -191,9 +191,10 @@ class SwPrintUIOptions : public vcl::PrinterOptionsHelper > { > OutputDevice* m_pLast; > const SwPrintData & m_rDefaultPrintData; >+ short m_nCrsrCurPage; // current page where the cursor is > > public: >- SwPrintUIOptions( bool bWeb, bool bSwSrcView, bool bHasSelection, bool bHasPostIts, const SwPrintData &rDefaultPrintData ); >+ SwPrintUIOptions( short nCurPage, bool bWeb, bool bSwSrcView, bool bHasSelection, bool bHasPostIts, const SwPrintData &rDefaultPrintData ); > virtual ~SwPrintUIOptions(); > > bool processPropertiesAndCheckFormat( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& i_rNewProp ); >diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx >index db5313d..5a09125 100644 >--- a/sw/source/core/view/printdata.cxx >+++ b/sw/source/core/view/printdata.cxx >@@ -185,6 +185,7 @@ void SwRenderData::MakeSwPrtOptions( > ////////////////////////////////////////////////////////////////////// > > SwPrintUIOptions::SwPrintUIOptions( >+ short nCurPage, > bool bWeb, > bool bSwSrcView, > bool bHasSelection, >@@ -193,6 +194,7 @@ SwPrintUIOptions::SwPrintUIOptions( > m_pLast( NULL ), > m_rDefaultPrintData( rDefaultPrintData ) > { >+ SwPrintUIOptions::m_nCrsrCurPage = nCurPage; > ResStringArray aLocalizedStrings( SW_RES( STR_PRINTOPTUI ) ); > > OSL_ENSURE( aLocalizedStrings.Count() >= 30, "resource incomplete" ); >@@ -335,7 +337,7 @@ SwPrintUIOptions::SwPrintUIOptions( > m_aUIProperties[nIdx++].Value = getEditControlOpt( rtl::OUString(), > rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PageRange:Edit" ) ), > rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ), >- rtl::OUString(), >+ rtl::OUString::valueOf( (sal_Int32)m_nCrsrCurPage )/* set text box to current page number */, > aPageRangeOpt > ); > // print content selection >diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx >index 1011e78..fbb12f4 100644 >--- a/sw/source/ui/uno/unotxdoc.cxx >+++ b/sw/source/ui/uno/unotxdoc.cxx >@@ -187,7 +187,14 @@ SwPrintUIOptions * lcl_GetPrintUIOptions( > // get default values to use in dialog from documents SwPrintData > const SwPrintData &rPrintData = pDocShell->GetDoc()->getPrintData(); > >- return new SwPrintUIOptions( bWebDoc, bSwSrcView, bHasSelection, bHasPostIts, rPrintData ); >+ /*[MHST]*/ >+ >+ // Get current page number >+ SwWrtShell* pSh = (pDocShell->GetWrtShell()); >+ SwPaM* pShellCrsr = pSh->GetCrsr(); >+ short nCurPage = (short)pShellCrsr->GetPageNum(sal_True, 0); >+ >+ return new SwPrintUIOptions( nCurPage, bWebDoc, bSwSrcView, bHasSelection, bHasPostIts, rPrintData ); > } > > SwTxtFmtColl *lcl_GetParaStyle(const String& rCollName, SwDoc* pDoc)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 34697
:
49228
|
49235
| 49253 |
50298
|
50299
|
50300
|
50301