[Libreoffice-commits] core.git: sc/source
Caolán McNamara
caolanm at redhat.com
Tue Apr 7 08:56:41 PDT 2015
sc/source/core/data/document.cxx | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
New commits:
commit b56b5d449fc74809fddc9b9bbd1d9f8d244a0d10
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Apr 7 16:45:38 2015 +0100
fix crash on re-export of fdo64646-4.xls back to xls
Change-Id: Ic6d6e7d7d8d42af0fc739d964a1190d40f9dba2e
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index c3a2f8e..170d202 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -3535,17 +3535,19 @@ sal_uInt32 ScDocument::GetNumberFormat( const ScRange& rRange ) const
sal_uInt32 ScDocument::GetNumberFormat( const ScAddress& rPos ) const
{
SCTAB nTab = rPos.Tab();
- if ( maTabs[nTab] )
- return maTabs[nTab]->GetNumberFormat( rPos );
- return 0;
+ if (!TableExists(nTab))
+ return 0;
+
+ return maTabs[nTab]->GetNumberFormat( rPos );
}
void ScDocument::SetNumberFormat( const ScAddress& rPos, sal_uInt32 nNumberFormat )
{
- if (!TableExists(rPos.Tab()))
+ SCTAB nTab = rPos.Tab();
+ if (!TableExists(nTab))
return;
- maTabs[rPos.Tab()]->SetNumberFormat(rPos.Col(), rPos.Row(), nNumberFormat);
+ maTabs[nTab]->SetNumberFormat(rPos.Col(), rPos.Row(), nNumberFormat);
}
void ScDocument::GetNumberFormatInfo( short& nType, sal_uLong& nIndex,
More information about the Libreoffice-commits
mailing list