diff options
Diffstat (limited to 'sc/source/core')
-rw-r--r-- | sc/source/core/data/documen3.cxx | 8 | ||||
-rw-r--r-- | sc/source/core/data/document.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/progress.cxx | 13 |
3 files changed, 21 insertions, 2 deletions
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index 8fea4b8af2b9..f3b3f1ab32c6 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -544,6 +544,14 @@ bool ScDocument::HasAnySheetEventScript( sal_Int32 nEvent, bool bWithVbaEvents ) return false; } +bool ScDocument::HasAnyCalcNotification() const +{ + for (SCTAB nTab = 0; nTab <= MAXTAB; nTab++) + if (pTab[nTab] && pTab[nTab]->GetCalcNotification()) + return true; + return false; +} + BOOL ScDocument::HasCalcNotification( SCTAB nTab ) const { if (VALIDTAB(nTab) && pTab[nTab]) diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 192e6f69bc67..3711b1b68603 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -158,7 +158,7 @@ BOOL ScDocument::GetName( SCTAB nTab, String& rName ) const return FALSE; } -BOOL ScDocument::SetCodeName( SCTAB nTab, String& rName ) +BOOL ScDocument::SetCodeName( SCTAB nTab, const String& rName ) { if (VALIDTAB(nTab)) { 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; } |