summaryrefslogtreecommitdiff
path: root/vbahelper/source
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2012-04-24 11:23:46 +0100
committerNoel Power <noel.power@novell.com>2012-04-24 11:26:32 +0100
commit7ddb8f73c1a5573eedc593168f702287921ecb7a (patch)
tree53909f45bb66b2c9bf6def612257012b48b027dd /vbahelper/source
parent061e4e119cc932dadda976d2b8622f671201a6bd (diff)
tweak support Sheets.PrintPreview bnc#75784 allow specific sheet(s) selection
this is a followup to commit 17c8f6745f9f98013c1b08de8ec03be66546c7fc
Diffstat (limited to 'vbahelper/source')
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index 0ef22fd4fa43..ebfc85476be3 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -450,8 +450,7 @@ void PrintOutHelper( SfxViewShell* pViewShell, const uno::Any& From, const uno::
// #TODO is this necessary ( calc specific )
// SC_MOD()->InputEnterHandler();
pViewFrame->GetDispatcher()->Execute( SID_VIEWSHELL1, SFX_CALLMODE_SYNCHRON );
- while ( isInPrintPreview( pViewFrame ) )
- Application::Yield();
+ WaitUntilPreviewIsClosed( pViewFrame );
}
}
else
@@ -481,12 +480,17 @@ void PrintOutHelper( SfxViewShell* pViewShell, const uno::Any& From, const uno::
if ( !pViewFrame->GetFrame().IsInPlace() )
{
dispatchExecute( pViewShell, SID_VIEWSHELL1 );
- while ( isInPrintPreview( pViewFrame ) )
- Application::Yield();
+ WaitUntilPreviewIsClosed( pViewFrame );
}
}
}
+void WaitUntilPreviewIsClosed( SfxViewFrame* pViewFrame )
+{
+ while ( pViewFrame && isInPrintPreview( pViewFrame ) )
+ Application::Yield();
+}
+
bool extractBoolFromAny( const uno::Any& rAny ) throw (uno::RuntimeException)
{
switch( rAny.getValueType().getTypeClass() )