[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sc/source
Caolán McNamara
caolanm at redhat.com
Wed Apr 8 05:49:50 PDT 2015
sc/source/core/data/document.cxx | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
New commits:
commit df29aada6c105364953ade776b2dc8660b4ccbe2
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
(cherry picked from commit b56b5d449fc74809fddc9b9bbd1d9f8d244a0d10)
Reviewed-on: https://gerrit.libreoffice.org/15190
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb at 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,
More information about the Libreoffice-commits
mailing list