sc/source/core/data/document.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
New commits: commit df29aada6c105364953ade776b2dc8660b4ccbe2 Author: Caolán McNamara <caol...@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 (cherry picked from commit b56b5d449fc74809fddc9b9bbd1d9f8d244a0d10) Reviewed-on: https://gerrit.libreoffice.org/15190 Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index ff5ffe7..5a21587 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -3525,17 +3525,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,
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits