diff options
author | Noel Power <noel.power@novell.com> | 2012-04-23 13:33:15 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2012-04-23 13:35:31 +0100 |
commit | 17c8f6745f9f98013c1b08de8ec03be66546c7fc (patch) | |
tree | 3a9ace52acac3c6b41471a4d0bd8deecbfd18559 /vbahelper | |
parent | 3120273ab10e9e8b765e2d13a90b62102a45c56f (diff) |
support Sheets.PrintPreview bnc#757844
there is still a little wrinkle, the preview shell always shows what sheets are selected, it's currently not possible to specify the sheets to preview
Diffstat (limited to 'vbahelper')
-rw-r--r-- | vbahelper/source/vbahelper/vbahelper.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index b91ef85e126d..0ef22fd4fa43 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -473,7 +473,18 @@ void PrintOutHelper( SfxViewShell* pViewShell, const uno::Any& From, const uno:: void PrintPreviewHelper( const css::uno::Any& /*EnableChanges*/, SfxViewShell* pViewShell ) { - dispatchExecute( pViewShell, SID_VIEWSHELL1 ); + SfxViewFrame* pViewFrame = NULL; + if ( pViewShell ) + pViewFrame = pViewShell->GetViewFrame(); + if ( pViewFrame ) + { + if ( !pViewFrame->GetFrame().IsInPlace() ) + { + dispatchExecute( pViewShell, SID_VIEWSHELL1 ); + while ( isInPrintPreview( pViewFrame ) ) + Application::Yield(); + } + } } bool extractBoolFromAny( const uno::Any& rAny ) throw (uno::RuntimeException) |