diff options
author | Noel Power <noel.power@suse.com> | 2013-01-03 13:46:38 +0000 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-01-03 14:14:47 +0000 |
commit | 2e340c01bb84cd215bfe4cc091a73756423f4647 (patch) | |
tree | b348d1c071d7eb196047b48824de7f687645abe5 | |
parent | f373868e16a1d83ceda531e4965cb00eaa523b8a (diff) |
fix fdo#58779 fdo#58403 re. raise print dialog
adds another tweak that had been removed with some print related rewrite
Change-Id: If63072c9b2c6158d46f26933fd54766fd808569c
-rw-r--r-- | sfx2/source/view/viewprn.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index d1f3c3c25778..175cde2b3929 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -690,6 +690,13 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) if ( !bSilent && pDoc->QueryHiddenInformation( WhenPrinting, NULL ) != RET_YES ) return; + // should we print only the selection or the whole document + SFX_REQUEST_ARG(rReq, pSelectItem, SfxBoolItem, SID_SELECTION, sal_False); + sal_Bool bSelection = ( pSelectItem != NULL && pSelectItem->GetValue() ); + // detect non api call from writer ( that adds SID_SELECTION ) and reset bIsAPI + if ( pSelectItem && rReq.GetArgs()->Count() == 1 ) + bIsAPI = sal_False; + uno::Sequence < beans::PropertyValue > aProps; if ( bIsAPI ) { @@ -747,10 +754,6 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) // it would be better if writer handled this internally if( nId == SID_PRINTDOCDIRECT ) { - // should we print only the selection or the whole document - SFX_REQUEST_ARG(rReq, pSelectItem, SfxBoolItem, SID_SELECTION, sal_False); - sal_Bool bSelection = ( pSelectItem != NULL && pSelectItem->GetValue() ); - aProps[nLen].Name = rtl::OUString( "PrintSelectionOnly" ); aProps[nLen].Value = makeAny( bSelection ); } |