summaryrefslogtreecommitdiff
path: root/sc/source/ui/app/scmod.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/app/scmod.cxx')
-rw-r--r--sc/source/ui/app/scmod.cxx41
1 files changed, 21 insertions, 20 deletions
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 94e18def8a11..272852efcf71 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1908,21 +1908,19 @@ IMPL_LINK( ScModule, IdleHandler, Timer*, EMPTYARG )
if ( pDocSh )
{
ScDocument* pDoc = pDocSh->GetDocument();
- if ( pDoc->IsLoadingDone() )
- {
- BOOL bLinks = pDoc->IdleCheckLinks();
- BOOL bWidth = pDoc->IdleCalcTextWidth();
- BOOL bSpell = pDoc->ContinueOnlineSpelling();
- if ( bSpell )
- aSpellTimer.Start(); // da ist noch was
-
- bMore = bLinks || bWidth || bSpell; // ueberhaupt noch was?
-
- // While calculating a Basic formula, a paint event may have occured,
- // so check the bNeedsRepaint flags for this document's views
- if (bWidth)
- lcl_CheckNeedsRepaint( pDocSh );
- }
+
+ BOOL bLinks = pDoc->IdleCheckLinks();
+ BOOL bWidth = pDoc->IdleCalcTextWidth();
+ BOOL bSpell = pDoc->ContinueOnlineSpelling();
+ if ( bSpell )
+ aSpellTimer.Start(); // da ist noch was
+
+ bMore = bLinks || bWidth || bSpell; // ueberhaupt noch was?
+
+ // While calculating a Basic formula, a paint event may have occured,
+ // so check the bNeedsRepaint flags for this document's views
+ if (bWidth)
+ lcl_CheckNeedsRepaint( pDocSh );
}
ULONG nOldTime = aIdleTimer.GetTimeout();
@@ -2192,9 +2190,6 @@ IMPL_LINK( ScModule, CalcFieldValueHdl, EditFieldInfo*, pInfo )
return 0;
}
-
-
-//<!--Added by PengYunQuan for Validity Cell Range Picker
BOOL ScModule::RegisterRefWindow( USHORT nSlotId, Window *pWnd )
{
std::list<Window*> & rlRefWindow = m_mapRefWindow[nSlotId];
@@ -2244,10 +2239,13 @@ BOOL ScModule::IsAliveRefDlg( USHORT nSlotId, Window *pWnd )
Window * ScModule::Find1RefWindow( USHORT nSlotId, Window *pWndAncestor )
{
+ if (!pWndAncestor)
+ return NULL;
+
std::map<USHORT, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
if( iSlot == m_mapRefWindow.end() )
- return FALSE;
+ return NULL;
std::list<Window*> & rlRefWindow = iSlot->second;
@@ -2262,6 +2260,9 @@ Window * ScModule::Find1RefWindow( USHORT nSlotId, Window *pWndAncestor )
Window * ScModule::Find1RefWindow( Window *pWndAncestor )
{
+ if (!pWndAncestor)
+ return NULL;
+
while( Window *pParent = pWndAncestor->GetParent() ) pWndAncestor = pParent;
for( std::map<USHORT, std::list<Window*> >::iterator i = m_mapRefWindow.begin();
@@ -2272,4 +2273,4 @@ Window * ScModule::Find1RefWindow( Window *pWndAncestor )
return NULL;
}
-//<!--Added by PengYunQuan for Validity Cell Range Picker
+