diff options
author | Valentin Kettner <vakevk+libreoffice@gmail.com> | 2014-06-10 20:57:05 +0200 |
---|---|---|
committer | Valentin Kettner <vakevk+libreoffice@gmail.com> | 2014-07-15 15:44:02 +0200 |
commit | a27e8f6c8dd81d1fa1a34a88890bcd944682146d (patch) | |
tree | a3280729a95a12c4808679512f310412c83c3d2d /sw/source/core | |
parent | c88a3d3e8c718bfc448b3030af388d1361efe015 (diff) |
Refactored IDocumentTimerAccess in SwDoc into DocumentTimerManager.
Change-Id: Idb39ef2cdc34e0c0e7853de0a656f579ca3528da
Diffstat (limited to 'sw/source/core')
-rw-r--r-- | sw/source/core/attr/format.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/doc/DocumentTimerManager.cxx | 175 | ||||
-rw-r--r-- | sw/source/core/doc/doc.cxx | 38 | ||||
-rw-r--r-- | sw/source/core/doc/doclay.cxx | 123 | ||||
-rw-r--r-- | sw/source/core/doc/docnew.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/inc/DocumentTimerManager.hxx | 70 | ||||
-rw-r--r-- | sw/source/core/inc/docfld.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/inc/rootfrm.hxx | 5 | ||||
-rw-r--r-- | sw/source/core/layout/frmtool.cxx | 5 |
9 files changed, 282 insertions, 150 deletions
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx index fba99b858304..7b60fe7f53dc 100644 --- a/sw/source/core/attr/format.cxx +++ b/sw/source/core/attr/format.cxx @@ -19,6 +19,7 @@ #include <doc.hxx> #include <DocumentSettingManager.hxx> //For SwFmt::getIDocumentSettingAccess() +#include <IDocumentTimerAccess.hxx> #include <fmtcolfunc.hxx> #include <frame.hxx> #include <format.hxx> @@ -763,7 +764,7 @@ const IDocumentDrawModelAccess* SwFmt::getIDocumentDrawModelAccess() const { ret IDocumentDrawModelAccess* SwFmt::getIDocumentDrawModelAccess() { return & GetDoc()->getIDocumentDrawModelAccess(); } const IDocumentLayoutAccess* SwFmt::getIDocumentLayoutAccess() const { return GetDoc(); } IDocumentLayoutAccess* SwFmt::getIDocumentLayoutAccess() { return GetDoc(); } -IDocumentTimerAccess* SwFmt::getIDocumentTimerAccess() { return GetDoc(); } +IDocumentTimerAccess* SwFmt::getIDocumentTimerAccess() { return & GetDoc()->getIDocumentTimerAccess(); } IDocumentFieldsAccess* SwFmt::getIDocumentFieldsAccess() { return GetDoc(); } IDocumentChartDataProviderAccess* SwFmt::getIDocumentChartDataProviderAccess() { return & GetDoc()->getIDocumentChartDataProviderAccess(); } diff --git a/sw/source/core/doc/DocumentTimerManager.cxx b/sw/source/core/doc/DocumentTimerManager.cxx new file mode 100644 index 000000000000..d99f3da39115 --- /dev/null +++ b/sw/source/core/doc/DocumentTimerManager.cxx @@ -0,0 +1,175 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#include <DocumentTimerManager.hxx> + +#include <doc.hxx> +#include <DocumentSettingManager.hxx> +#include <rootfrm.hxx> +#include <viewsh.hxx> +#include <unotools/lingucfg.hxx> +#include <unotools/linguprops.hxx> +#include <set> +#include <fldupde.hxx> +#include <sfx2/progress.hxx> +#include <viewopt.hxx> +#include <docsh.hxx> +#include <docfld.hxx> +#include <fldbas.hxx> +#include <rtl/logfile.hxx> + +namespace sw +{ + +DocumentTimerManager::DocumentTimerManager( SwDoc& i_rSwdoc ) : m_rSwdoc( i_rSwdoc ), + mbStartIdleTimer( false ), + mIdleBlockCount( 0 ) +{ + maIdleTimer.SetTimeout( 600 ); + maIdleTimer.SetTimeoutHdl( LINK( this, DocumentTimerManager, DoIdleJobs) ); +} + +void DocumentTimerManager::StartIdling() +{ + mbStartIdleTimer = true; + if( !mIdleBlockCount ) + maIdleTimer.Start(); +} + +void DocumentTimerManager::StopIdling() +{ + mbStartIdleTimer = false; + maIdleTimer.Stop(); +} + +void DocumentTimerManager::BlockIdling() +{ + maIdleTimer.Stop(); + ++mIdleBlockCount; +} + +void DocumentTimerManager::UnblockIdling() +{ + --mIdleBlockCount; + if( !mIdleBlockCount && mbStartIdleTimer && !maIdleTimer.IsActive() ) + maIdleTimer.Start(); +} + +void DocumentTimerManager::StartBackgroundJobs() { + // Trigger DoIdleJobs(), asynchronously. + maIdleTimer.Start(); +} + +IMPL_LINK( DocumentTimerManager, DoIdleJobs, Timer *, pTimer ) +{ +#ifdef TIMELOG + static ::rtl::Logfile* pModLogFile = 0; + if( !pModLogFile ) + pModLogFile = new ::rtl::Logfile( "First DoIdleJobs" ); +#endif + + SwRootFrm* pTmpRoot = m_rSwdoc.GetCurrentLayout(); + if( pTmpRoot && + !SfxProgress::GetActiveProgress( m_rSwdoc.GetDocShell() ) ) + { + SwViewShell *pSh, *pStartSh; + pSh = pStartSh = m_rSwdoc.GetCurrentViewShell(); + do { + if( pSh->ActionPend() ) + { + pTimer->Start(); + return 0; + } + pSh = (SwViewShell*)pSh->GetNext(); + } while( pSh != pStartSh ); + + if( pTmpRoot->IsNeedGrammarCheck() ) + { + bool bIsOnlineSpell = pSh->GetViewOptions()->IsOnlineSpell(); + bool bIsAutoGrammar = false; + SvtLinguConfig().GetProperty( OUString( + UPN_IS_GRAMMAR_AUTO ) ) >>= bIsAutoGrammar; + + if (bIsOnlineSpell && bIsAutoGrammar) + StartGrammarChecking( m_rSwdoc ); + } + std::set<SwRootFrm*> aAllLayouts = m_rSwdoc.GetAllLayouts(); + std::set<SwRootFrm*>::iterator pLayIter = aAllLayouts.begin(); + for ( ;pLayIter != aAllLayouts.end();++pLayIter ) + { + if ((*pLayIter)->IsIdleFormat()) + { + (*pLayIter)->GetCurrShell()->LayoutIdle(); + + // Defer the remaining work. + pTimer->Start(); + return 0; + } + } + + SwFldUpdateFlags nFldUpdFlag = m_rSwdoc.GetDocumentSettingManager().getFieldUpdateFlags(true); + if( ( AUTOUPD_FIELD_ONLY == nFldUpdFlag + || AUTOUPD_FIELD_AND_CHARTS == nFldUpdFlag ) && + m_rSwdoc.GetUpdtFlds().IsFieldsDirty() + // If we switch the field name the Fields are not updated. + // So the "backgorund update" should always be carried out + /* && !pStartSh->GetViewOptions()->IsFldName()*/ ) + { + if ( m_rSwdoc.GetUpdtFlds().IsInUpdateFlds() || + m_rSwdoc.IsExpFldsLocked() ) + { + pTimer->Start(); + return 0; + } + + // Action brackets! + m_rSwdoc.GetUpdtFlds().SetInUpdateFlds( true ); + + pTmpRoot->StartAllAction(); + + // no jump on update of fields #i85168# + const bool bOldLockView = pStartSh->IsViewLocked(); + pStartSh->LockView( true ); + + m_rSwdoc.GetSysFldType( RES_CHAPTERFLD )->ModifyNotification( 0, 0 ); // ChapterField + m_rSwdoc.UpdateExpFlds( 0, false ); // Updates ExpressionFields + m_rSwdoc.UpdateTblFlds(NULL); // Tables + m_rSwdoc.UpdateRefFlds(NULL); // References + + pTmpRoot->EndAllAction(); + + pStartSh->LockView( bOldLockView ); + + m_rSwdoc.GetUpdtFlds().SetInUpdateFlds( false ); + m_rSwdoc.GetUpdtFlds().SetFieldsDirty( false ); + } + } +#ifdef TIMELOG + if( pModLogFile && 1 != (long)pModLogFile ) + delete pModLogFile, ((long&)pModLogFile) = 1; +#endif + return 0; +} + +DocumentTimerManager::~DocumentTimerManager() {} + +} + + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 4d0766017b8f..0e4cc29920fb 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -20,6 +20,9 @@ #include <doc.hxx> #include <DocumentSettingManager.hxx> #include <DocumentDrawModelManager.hxx> +#include <DocumentTimerManager.hxx> +#include <DocumentDeviceManager.hxx> +#include <DocumentChartDataProviderManager.hxx> #include <UndoManager.hxx> #include <hintids.hxx> #include <tools/shl.hxx> @@ -108,9 +111,6 @@ #include <txtfrm.hxx> #include <attrhint.hxx> #include <view.hxx> -#include <DocumentDeviceManager.hxx> -#include <DocumentSettingManager.hxx> -#include <DocumentChartDataProviderManager.hxx> #include <wdocsh.hxx> #include <prtopt.hxx> @@ -216,17 +216,6 @@ IDocumentSettingAccess & SwDoc::getIDocumentSettingAccess() return *m_pDocumentSettingManager; } -/* IDocumentChartDataProviderAccess */ -IDocumentChartDataProviderAccess const & SwDoc::getIDocumentChartDataProviderAccess() const -{ - return *m_pDocumentChartDataProviderManager; -} - -IDocumentChartDataProviderAccess & SwDoc::getIDocumentChartDataProviderAccess() -{ - return *m_pDocumentChartDataProviderManager; -} - sal_uInt32 SwDoc::getRsid() const { return mnRsid; @@ -259,6 +248,16 @@ void SwDoc::setRsidRoot( sal_uInt32 nVal ) mnRsidRoot = nVal; } +/* IDocumentChartDataProviderAccess */ +IDocumentChartDataProviderAccess const & SwDoc::getIDocumentChartDataProviderAccess() const +{ + return *m_pDocumentChartDataProviderManager; +} + +IDocumentChartDataProviderAccess & SwDoc::getIDocumentChartDataProviderAccess() +{ + return *m_pDocumentChartDataProviderManager; +} // IDocumentDeviceAccess IDocumentDeviceAccess const & SwDoc::getIDocumentDeviceAccess() const @@ -271,6 +270,17 @@ IDocumentDeviceAccess & SwDoc::getIDocumentDeviceAccess() return *m_pDeviceAccess; } +//IDocumentTimerAccess +IDocumentTimerAccess const & SwDoc::getIDocumentTimerAccess() const +{ + return *m_pDocumentTimerManager; +} + +IDocumentTimerAccess & SwDoc::getIDocumentTimerAccess() +{ + return *m_pDocumentTimerManager; +} + /* Implementations the next Interface here */ diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index bf17f3eaffd7..1caf4e8c7efb 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -1770,129 +1770,6 @@ SwFlyFrmFmt* SwDoc::InsertDrawLabel( return pNewFmt; } -// IDocumentTimerAccess methods -void SwDoc::StartIdling() -{ - mbStartIdleTimer = true; - if( !mIdleBlockCount ) - maIdleTimer.Start(); -} - -void SwDoc::StopIdling() -{ - mbStartIdleTimer = false; - maIdleTimer.Stop(); -} - -void SwDoc::BlockIdling() -{ - maIdleTimer.Stop(); - ++mIdleBlockCount; -} - -void SwDoc::UnblockIdling() -{ - --mIdleBlockCount; - if( !mIdleBlockCount && mbStartIdleTimer && !maIdleTimer.IsActive() ) - maIdleTimer.Start(); -} - -void SwDoc::StartBackgroundJobs() { - // Trigger DoIdleJobs(), asynchronously. - maIdleTimer.Start(); -} - -IMPL_LINK( SwDoc, DoIdleJobs, Timer *, pTimer ) -{ -#ifdef TIMELOG - static ::rtl::Logfile* pModLogFile = 0; - if( !pModLogFile ) - pModLogFile = new ::rtl::Logfile( "First DoIdleJobs" ); -#endif - - SwRootFrm* pTmpRoot = GetCurrentLayout(); - if( pTmpRoot && - !SfxProgress::GetActiveProgress( mpDocShell ) ) - { - SwViewShell *pSh, *pStartSh; - pSh = pStartSh = GetCurrentViewShell(); - do { - if( pSh->ActionPend() ) - { - pTimer->Start(); - return 0; - } - pSh = (SwViewShell*)pSh->GetNext(); - } while( pSh != pStartSh ); - - if( pTmpRoot->IsNeedGrammarCheck() ) - { - bool bIsOnlineSpell = pSh->GetViewOptions()->IsOnlineSpell(); - bool bIsAutoGrammar = false; - SvtLinguConfig().GetProperty( OUString( - UPN_IS_GRAMMAR_AUTO ) ) >>= bIsAutoGrammar; - - if (bIsOnlineSpell && bIsAutoGrammar) - StartGrammarChecking( *this ); - } - std::set<SwRootFrm*> aAllLayouts = GetAllLayouts(); - std::set<SwRootFrm*>::iterator pLayIter = aAllLayouts.begin(); - for ( ;pLayIter != aAllLayouts.end();++pLayIter ) - { - if ((*pLayIter)->IsIdleFormat()) - { - (*pLayIter)->GetCurrShell()->LayoutIdle(); - - // Defer the remaining work. - pTimer->Start(); - return 0; - } - } - - SwFldUpdateFlags nFldUpdFlag = GetDocumentSettingManager().getFieldUpdateFlags(true); - if( ( AUTOUPD_FIELD_ONLY == nFldUpdFlag - || AUTOUPD_FIELD_AND_CHARTS == nFldUpdFlag ) && - GetUpdtFlds().IsFieldsDirty() - // If we switch the field name the Fields are not updated. - // So the "backgorund update" should always be carried out - /* && !pStartSh->GetViewOptions()->IsFldName()*/ ) - { - if ( GetUpdtFlds().IsInUpdateFlds() || - IsExpFldsLocked() ) - { - pTimer->Start(); - return 0; - } - - // Action brackets! - GetUpdtFlds().SetInUpdateFlds( true ); - - pTmpRoot->StartAllAction(); - - // no jump on update of fields #i85168# - const bool bOldLockView = pStartSh->IsViewLocked(); - pStartSh->LockView( true ); - - GetSysFldType( RES_CHAPTERFLD )->ModifyNotification( 0, 0 ); // ChapterField - UpdateExpFlds( 0, false ); // Updates ExpressionFields - UpdateTblFlds(NULL); // Tables - UpdateRefFlds(NULL); // References - - pTmpRoot->EndAllAction(); - - pStartSh->LockView( bOldLockView ); - - GetUpdtFlds().SetInUpdateFlds( false ); - GetUpdtFlds().SetFieldsDirty( false ); - } - } -#ifdef TIMELOG - if( pModLogFile && 1 != (long)pModLogFile ) - delete pModLogFile, ((long&)pModLogFile) = 1; -#endif - return 0; -} - IMPL_STATIC_LINK( SwDoc, BackgroundDone, SvxBrushItem*, EMPTYARG ) { SwViewShell *pSh, *pStartSh; diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index e39e41a432ea..72f6560193c3 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -91,6 +91,7 @@ #include <DocumentSettingManager.hxx> #include <DocumentDrawModelManager.hxx> #include <DocumentChartDataProviderManager.hxx> +#include <DocumentTimerManager.hxx> #include <unochart.hxx> #include <fldbas.hxx> @@ -198,6 +199,7 @@ SwDoc::SwDoc() m_pDocumentSettingManager(new ::sw::DocumentSettingManager(*this)), m_pDocumentChartDataProviderManager( new sw::DocumentChartDataProviderManager( *this ) ), m_pDeviceAccess( new ::sw::DocumentDeviceManager( *this ) ), + m_pDocumentTimerManager( new ::sw::DocumentTimerManager( *this ) ), mpDfltFrmFmt( new SwFrmFmt( GetAttrPool(), sFrmFmtStr, 0 ) ), mpEmptyPageFmt( new SwFrmFmt( GetAttrPool(), sEmptyPageStr, mpDfltFrmFmt ) ), mpColumnContFmt( new SwFrmFmt( GetAttrPool(), sColumnCntStr, mpDfltFrmFmt ) ), @@ -247,7 +249,6 @@ SwDoc::SwDoc() mnAutoFmtRedlnCommentNo( 0 ), meRedlineMode((RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE)), mReferenceCount(0), - mIdleBlockCount(0), mnLockExpFld( 0 ), mbGlossDoc(false), mbModified(false), @@ -280,7 +281,6 @@ SwDoc::SwDoc() #endif mbContainsAtPageObjWithContentAnchor(false), //#i119292#, fdo#37024 - mbStartIdleTimer(false), mbReadOnly(false), meDocType(DOCTYPE_NATIVE) { @@ -341,10 +341,6 @@ SwDoc::SwDoc() new SwTxtNode( SwNodeIndex( GetNodes().GetEndOfContent() ), GetTxtCollFromPool( RES_POOLCOLL_STANDARD )); - // set the own IdleTimer - maIdleTimer.SetTimeout( 600 ); - maIdleTimer.SetTimeoutHdl( LINK(this, SwDoc, DoIdleJobs) ); - maOLEModifiedTimer.SetTimeout( 1000 ); maOLEModifiedTimer.SetTimeoutHdl( LINK( this, SwDoc, DoUpdateModifiedOLE )); @@ -458,7 +454,7 @@ SwDoc::~SwDoc() SwFmtCharFmt aCharFmt(NULL); SetDefault(aCharFmt); - StopIdling(); // stop idle timer + getIDocumentTimerAccess().StopIdling(); // stop idle timer maStatsUpdateTimer.Stop(); delete mpUnoCallBack, mpUnoCallBack = 0; diff --git a/sw/source/core/inc/DocumentTimerManager.hxx b/sw/source/core/inc/DocumentTimerManager.hxx new file mode 100644 index 000000000000..6bd7fcdaaeb8 --- /dev/null +++ b/sw/source/core/inc/DocumentTimerManager.hxx @@ -0,0 +1,70 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SW_SOURCE_CORE_INC_DOCUMENTTIMERMANAGER_HXX +#define INCLUDED_SW_SOURCE_CORE_INC_DOCUMENTTIMERMANAGER_HX + +#include <IDocumentTimerAccess.hxx> +#include <boost/utility.hpp> + +#include <vcl/timer.hxx> +#include <sal/types.h> +#include <tools/link.hxx> + +class SwDoc; + +namespace sw +{ + +class DocumentTimerManager : public IDocumentTimerAccess, + public ::boost::noncopyable +{ +public: + + DocumentTimerManager( SwDoc& i_rSwdoc ); + + void StartIdling() SAL_OVERRIDE; + + void StopIdling() SAL_OVERRIDE; + + void BlockIdling() SAL_OVERRIDE; + + void UnblockIdling() SAL_OVERRIDE; + + void StartBackgroundJobs() SAL_OVERRIDE; + + // Our own 'IdleTimer' calls the following method + DECL_LINK( DoIdleJobs, Timer * ); + + virtual ~DocumentTimerManager(); + +private: + + SwDoc& m_rSwdoc; + + bool mbStartIdleTimer; //< idle timer mode start/stop + sal_Int32 mIdleBlockCount; + Timer maIdleTimer; +}; + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/inc/docfld.hxx b/sw/source/core/inc/docfld.hxx index 009e36fd83e3..ed8b4791dcc7 100644 --- a/sw/source/core/inc/docfld.hxx +++ b/sw/source/core/inc/docfld.hxx @@ -22,6 +22,7 @@ #include <calc.hxx> #include <doc.hxx> +#include <IDocumentTimerAccess.hxx> #include <o3tl/sorted_vector.hxx> class SwTxtFld; @@ -175,7 +176,7 @@ public: if (b) { - pDocument->StartBackgroundJobs(); + pDocument->getIDocumentTimerAccess().StartBackgroundJobs(); } } diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx index 78a95e54013f..fa4acdb17057 100644 --- a/sw/source/core/inc/rootfrm.hxx +++ b/sw/source/core/inc/rootfrm.hxx @@ -22,6 +22,7 @@ #include "layfrm.hxx" #include <viewsh.hxx> #include <doc.hxx> +#include <IDocumentTimerAccess.hxx> class SwCntntFrm; class SwViewShell; @@ -211,7 +212,7 @@ public: // May be NULL if called from SfxBaseModel::dispose // (this happens in the build test 'rtfexport'). if (lcl_pCurrShell != NULL) - lcl_pCurrShell->GetDoc()->StartBackgroundJobs(); + lcl_pCurrShell->GetDoc()->getIDocumentTimerAccess().StartBackgroundJobs(); } bool IsIdleFormat() const { return bIdleFormat; } void ResetIdleFormat() { bIdleFormat = false; } @@ -227,7 +228,7 @@ public: // May be NULL if called from SfxBaseModel::dispose // (this happens in the build test 'rtfexport'). if (lcl_pCurrShell != NULL) - lcl_pCurrShell->GetDoc()->StartBackgroundJobs(); + lcl_pCurrShell->GetDoc()->getIDocumentTimerAccess().StartBackgroundJobs(); } } diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 60658bf973c3..38ca293929c5 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -62,6 +62,7 @@ #include <objectformatter.hxx> #include <switerator.hxx> #include <DocumentSettingManager.hxx> +#include <IDocumentTimerAccess.hxx> //UUUU #include <svx/sdr/attribute/sdrallfillattributeshelper.hxx> @@ -1178,7 +1179,7 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, sal_uLong nIndex, bool bPages, sal_uLong nEndIndex, SwFrm *pPrv ) { - pDoc->BlockIdling(); + pDoc->getIDocumentTimerAccess().BlockIdling(); SwRootFrm* pLayout = pLay->getRootFrm(); const bool bOldCallbackActionEnabled = pLayout ? pLayout->IsCallbackActionEnabled() : sal_False; if( bOldCallbackActionEnabled ) @@ -1563,7 +1564,7 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, } } - pDoc->UnblockIdling(); + pDoc->getIDocumentTimerAccess().UnblockIdling(); if( bOldCallbackActionEnabled ) pLayout->SetCallbackActionEnabled( bOldCallbackActionEnabled ); } |