/* -*- 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 .
*/
// DocShell can't be tested via type info, because SfxHintId::Dying comes from the dtor if ( &rBC == pDocSh )
{ // from DocShell, only SfxHintId::Dying is interesting if ( rHint.GetId() == SfxHintId::Dying )
{
pDocSh = nullptr;
EndListening(*SfxGetpApp()); // don't access DocShell anymore for EndListening etc.
}
} elseif (dynamic_cast<const SfxApplication*>( &rBC) != nullptr)
{ if ( !aItemStr.isEmpty() && rHint.GetId() == SfxHintId::ScAreasChanged )
{ // check if named range was modified
ScRange aNew; if ( lcl_FillRangeFromName( aNew, pDocSh, aItemStr ) && aNew != aRange )
bDataChanged = true;
}
} else
{ // must be from Area broadcasters
if (rHint.GetId() == SfxHintId::ScDataChanged)
bDataChanged = true; elseif (rHint.GetId() == SfxHintId::ScAreaChanged) // position of broadcaster changed
{ const ScAreaChangedHint *pChgHint = static_cast<const ScAreaChangedHint*>(&rHint); const ScRange& aNewRange = pChgHint->GetRange(); if ( aRange != aNewRange )
{
bRefreshListener = true;
bDataChanged = true;
}
} elseif (rHint.GetId() == SfxHintId::Dying)
{ // If the range is being deleted, listening must be restarted // after the deletion is complete (done in GetData)
bRefreshListener = true;
bDataChanged = true;
}
}
if ( bDataChanged && HasDataLinks() )
SvLinkSource::NotifyDataChanged();
}
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.