/* -*- 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 .
*/
/// Collection of BroadcastAreas class ScBroadcastAreaSlot
{ private:
ScBroadcastAreas aBroadcastAreaTbl; mutable ScBroadcastArea aTmpSeekBroadcastArea; // for FindBroadcastArea()
ScDocument& rDoc;
ScBroadcastAreaSlotMachine* pBASM; bool mbInBroadcastIteration;
/** * If true, the slot has at least one area broadcaster marked for removal. * This flag is used only during broadcast iteration, to speed up * iteration. Using this flag is cheaper than dereferencing each iterator * and checking its own flag inside especially when no areas are marked * for removal.
*/ bool mbHasErasedArea;
/** More hypothetical (memory would probably be doomed anyway) check whether there would be an overflow when adding an area, setting the proper state if so.
@return HardRecalcState::ETERNAL if a HardRecalcState is effective and area is not to be added.
*/
ScDocument::HardRecalcState CheckHardRecalcStateCondition() const;
/** Finally erase all areas pushed as to-be-erased. */ void FinallyEraseAreas();
/** Only here new ScBroadcastArea objects are created, prevention of dupes.
@param rpArea If NULL, a new ScBroadcastArea is created and assigned ton the reference if a matching area wasn't found. If a matching area was found, that is assigned. In any case, the SvtListener is added to the broadcaster.
If not NULL then no listeners are started, only the area is inserted and the reference count incremented. Effectively the same as InsertListeningArea(), so use that instead.
@return true if rpArea passed was NULL and ScBroadcastArea is newly created.
*/ bool StartListeningArea( const ScRange& rRange, bool bGroupListening, SvtListener* pListener, ScBroadcastArea*& rpArea );
/** Insert a ScBroadcastArea obtained via StartListeningArea() to subsequent slots.
*/ void InsertListeningArea( ScBroadcastArea* pArea );
private: struct ScSlotData
{
SCROW nStartRow; // first row of this segment
SCROW nStopRow; // first row of next segment
SCSIZE nSliceRow; // row slice size in this segment
SCSIZE nCumulatedRow; // cumulated slots of previous segments (previous rows)
SCROW nStartCol; // first column of this segment
SCROW nStopCol; // first column of next segment
SCSIZE nSliceCol; // column slice size in this segment
SCSIZE nCumulatedCol; // cumulated slots of previous segments (previous columns)
/// @return: how many removed
size_t RemoveBulkArea( const ScBroadcastArea* p ); void SetUpdateChain( ScBroadcastArea* p ) { pUpdateChain = p; }
ScBroadcastArea* GetEOUpdateChain() const { return pEOUpdateChain; } void SetEOUpdateChain( ScBroadcastArea* p ) { pEOUpdateChain = p; } bool IsInBulkBroadcast() const { return nInBulkBroadcast > 0; }
// only for ScBroadcastAreaSlot void PushAreaToBeErased( ScBroadcastAreaSlot* pSlot,
ScBroadcastAreas::iterator& rIter ); // only for ScBroadcastAreaSlot void FinallyEraseAreas( ScBroadcastAreaSlot* pSlot );
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.