[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/source
Kohei Yoshida
kohei.yoshida at gmail.com
Mon May 20 09:32:55 PDT 2013
sc/source/core/data/document.cxx | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
New commits:
commit 34da5c4cd4d4dbbffe347b8cc425630b255d9333
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Mon May 20 12:35:05 2013 -0400
A bit of cleanup.
Change-Id: I9f200377c1f5bf44eb4ba60c272b02ae3d632a19
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index d47f837..d9145b0 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2229,26 +2229,29 @@ ScDocument::NumFmtMergeHandler::~NumFmtMergeHandler()
SvtBroadcaster* ScDocument::GetBroadcaster( const ScAddress& rPos )
{
- if (!TableExists(rPos.Tab()))
+ ScTable* pTab = FetchTable(rPos.Tab());
+ if (!pTab)
return NULL;
- return maTabs[rPos.Tab()]->GetBroadcaster(rPos.Col(), rPos.Row());
+ return pTab->GetBroadcaster(rPos.Col(), rPos.Row());
}
const SvtBroadcaster* ScDocument::GetBroadcaster( const ScAddress& rPos ) const
{
- if (!TableExists(rPos.Tab()))
+ ScTable* pTab = FetchTable(rPos.Tab());
+ if (!pTab)
return NULL;
- return maTabs[rPos.Tab()]->GetBroadcaster(rPos.Col(), rPos.Row());
+ return pTab->GetBroadcaster(rPos.Col(), rPos.Row());
}
void ScDocument::DeleteBroadcasters( const ScAddress& rTopPos, SCROW nLength )
{
- if (!TableExists(rTopPos.Tab()) || nLength <= 0)
+ ScTable* pTab = FetchTable(rTopPos.Tab());
+ if (!pTab || nLength <= 0)
return;
- maTabs[rTopPos.Tab()]->DeleteBroadcasters(rTopPos.Col(), rTopPos.Row(), rTopPos.Row()+nLength-1);
+ pTab->DeleteBroadcasters(rTopPos.Col(), rTopPos.Row(), rTopPos.Row()+nLength-1);
}
bool ScDocument::TableExists( SCTAB nTab ) const
More information about the Libreoffice-commits
mailing list