fix fdo#58779 fdo#58403 re. raise print dialog
adds another tweak that had been removed with some print related rewrite Change-Id: If63072c9b2c6158d46f26933fd54766fd808569c
This commit is contained in:
parent
95fc4bdb8e
commit
446ac227bf
1 changed files with 7 additions and 4 deletions
|
@ -682,6 +682,13 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
|
||||||
if ( !bSilent && pDoc->QueryHiddenInformation( WhenPrinting, NULL ) != RET_YES )
|
if ( !bSilent && pDoc->QueryHiddenInformation( WhenPrinting, NULL ) != RET_YES )
|
||||||
return;
|
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;
|
uno::Sequence < beans::PropertyValue > aProps;
|
||||||
if ( bIsAPI )
|
if ( bIsAPI )
|
||||||
{
|
{
|
||||||
|
@ -739,10 +746,6 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
|
||||||
// it would be better if writer handled this internally
|
// it would be better if writer handled this internally
|
||||||
if( nId == SID_PRINTDOCDIRECT )
|
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].Name = rtl::OUString( "PrintSelectionOnly" );
|
||||||
aProps[nLen].Value = makeAny( bSelection );
|
aProps[nLen].Value = makeAny( bSelection );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue