diff options
author | Niklas Nebel <nn@openoffice.org> | 2010-09-08 11:31:43 +0200 |
---|---|---|
committer | Niklas Nebel <nn@openoffice.org> | 2010-09-08 11:31:43 +0200 |
commit | 78b01360e3307dd0d277c90fc7d02249544f6f6d (patch) | |
tree | cf22fea6fec38a2a0702bb7733794dd833c5bad2 /sc | |
parent | mib19: #163561# use mode SC_SIZE_DIRECT for SetWidthOrHeight (diff) | |
download | core-78b01360e3307dd0d277c90fc7d02249544f6f6d.tar.gz core-78b01360e3307dd0d277c90fc7d02249544f6f6d.zip |
mib19: #163566# ScProgress: don't create progress bar if paint is locked
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/progress.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sc/source/core/tool/progress.cxx b/sc/source/core/tool/progress.cxx index a2fa45764bcc..d36f4d431fdf 100644 --- a/sc/source/core/tool/progress.cxx +++ b/sc/source/core/tool/progress.cxx @@ -46,6 +46,7 @@ #include "global.hxx" #include "globstr.hrc" +using namespace com::sun::star; static ScProgress theDummyInterpretProgress; @@ -78,6 +79,14 @@ BOOL lcl_IsHiddenDocument( SfxObjectShell* pObjSh ) return FALSE; } +bool lcl_HasControllersLocked( SfxObjectShell& rObjSh ) +{ + uno::Reference<frame::XModel> xModel( rObjSh.GetBaseModel() ); + if (xModel.is()) + return xModel->hasControllersLocked(); + return false; +} + ScProgress::ScProgress( SfxObjectShell* pObjSh, const String& rText, ULONG nRange, BOOL bAllDocs, BOOL bWait ) { @@ -104,10 +113,12 @@ ScProgress::ScProgress( SfxObjectShell* pObjSh, const String& rText, pProgress = NULL; } else if ( pObjSh && ( pObjSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED || - pObjSh->GetProgress() ) ) + pObjSh->GetProgress() || + lcl_HasControllersLocked(*pObjSh) ) ) { // #62808# no own progress for embedded objects, // #73633# no second progress if the document already has one + // #163566# no progress while controllers are locked (repaint disabled) pProgress = NULL; } |