[Libreoffice-commits] .: Branch 'libreoffice-3-4-0' - sc/source
Petr Mladek
pmladek at kemper.freedesktop.org
Tue May 24 06:44:40 PDT 2011
sc/source/filter/xml/xmldrani.cxx | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
New commits:
commit 2e0512f545a9ef641e61c5caa02d8ab402f83104
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Fri May 20 05:42:28 2011 +0200
fix for fdo#37323: Correct autofilter import from ODS.
Signed-off-by: Kohei Yoshida <kyoshida at novell.com>
Signed-off-by: Petr Mladek <pmladek at suse.cz>
Signed-off-by: Michael Meeks <michael.meeks at novell.com>
diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx
index 7e91218..d0fb4aa 100644
--- a/sc/source/filter/xml/xmldrani.cxx
+++ b/sc/source/filter/xml/xmldrani.cxx
@@ -466,21 +466,17 @@ void ScXMLDatabaseRangeContext::EndElement()
if (pData.get())
{
- // Infer sheet index from the name.
- OUString aStrNum = sDatabaseRangeName.copy(aName.getLength());
- SCTAB nTab = static_cast<SCTAB>(aStrNum.toInt32());
-
+ ScRange aRange;
+ pData->GetArea(aRange);
if (pData->HasAutoFilter())
{
// Set autofilter flags so that the buttons get displayed.
- ScRange aRange;
- pData->GetArea(aRange);
pDoc->ApplyFlagsTab(
aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aStart.Row(),
aRange.aStart.Tab(), SC_MF_AUTO);
}
- pDoc->SetAnonymousDBData(nTab, pData.release());
+ pDoc->SetAnonymousDBData(aRange.aStart.Tab(), pData.release());
}
return;
}
@@ -499,9 +495,10 @@ void ScXMLDatabaseRangeContext::EndElement()
pDoc->ApplyFlagsTab(
aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aStart.Row(),
aRange.aStart.Tab(), SC_MF_AUTO);
+ pDoc->SetAnonymousDBData(aRange.aStart.Tab(), pData.release());
}
-
- pDoc->GetDBCollection()->insertAnonRange(pData.release());
+ else
+ pDoc->GetDBCollection()->insertAnonRange(pData.release());
}
return;
}
More information about the Libreoffice-commits
mailing list