[Libreoffice-commits] .: Branch 'feature/gsoc-calc-perf2' - sc/source
Daniel Bankston
dbank at kemper.freedesktop.org
Wed Jul 11 15:48:38 PDT 2012
sc/source/filter/xml/XMLStylesImportHelper.cxx | 18 ++++++++++++++++++
sc/source/filter/xml/XMLStylesImportHelper.hxx | 1 +
2 files changed, 19 insertions(+)
New commits:
commit beb8319ccaa0513daef03fbe995fb8775bf0b0c9
Author: Daniel Bankston <daniel.e.bankston at gmail.com>
Date: Wed Jul 11 17:48:00 2012 -0500
Fix cause of osl warning
Change-Id: Idfeaab29da60f323fdf8528599459cc38ab9f27c
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.cxx b/sc/source/filter/xml/XMLStylesImportHelper.cxx
index 1ae7ef0..75eb976 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.cxx
@@ -85,6 +85,13 @@ void ScMyStyleRanges::AddRange(const ScRange& rRange,
mpTimeList->addRange(rRange);
}
break;
+ case util::NumberFormat::DATE:
+ {
+ if (!mpDateList)
+ mpDateList.reset(new ScSimpleRangeList);
+ mpDateList->addRange(rRange);
+ }
+ break;
case util::NumberFormat::DATETIME:
{
if (!mpDateTimeList)
@@ -152,6 +159,8 @@ void ScMyStyleRanges::InsertRow(const sal_Int32 nRow, const sal_Int32 nTab, ScDo
mpNumberList->insertRow(static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab));
if (mpTimeList)
mpTimeList->insertRow(static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab));
+ if (mpDateList)
+ mpDateList->insertRow(static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab));
if (mpDateTimeList)
mpDateTimeList->insertRow(static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab));
if (mpPercentList)
@@ -181,6 +190,8 @@ void ScMyStyleRanges::InsertCol(const sal_Int32 nCol, const sal_Int32 nTab, ScDo
mpNumberList->insertCol(static_cast<SCCOL>(nCol), static_cast<SCTAB>(nTab));
if (mpTimeList)
mpTimeList->insertCol(static_cast<SCCOL>(nCol), static_cast<SCTAB>(nTab));
+ if (mpDateList)
+ mpDateList->insertCol(static_cast<SCCOL>(nCol), static_cast<SCTAB>(nTab));
if (mpDateTimeList)
mpDateTimeList->insertCol(static_cast<SCCOL>(nCol), static_cast<SCTAB>(nTab));
if (mpPercentList)
@@ -234,6 +245,13 @@ void ScMyStyleRanges::SetStylesToRanges(const rtl::OUString* pStyleName, ScXMLIm
SetStylesToRanges(aList, pStyleName, util::NumberFormat::TIME, NULL, rImport);
mpTimeList->clear();
}
+ if (mpDateList)
+ {
+ list<ScRange> aList;
+ mpDateList->getRangeList(aList);
+ SetStylesToRanges(aList, pStyleName, util::NumberFormat::DATE, NULL, rImport);
+ mpDateList->clear();
+ }
if (mpDateTimeList)
{
list<ScRange> aList;
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.hxx b/sc/source/filter/xml/XMLStylesImportHelper.hxx
index c5bf5d3..8e5a68b 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.hxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.hxx
@@ -97,6 +97,7 @@ class ScMyStyleRanges : public SvRefBase
::boost::shared_ptr<ScSimpleRangeList> mpTextList;
::boost::shared_ptr<ScSimpleRangeList> mpNumberList;
::boost::shared_ptr<ScSimpleRangeList> mpTimeList;
+ ::boost::shared_ptr<ScSimpleRangeList> mpDateList;
::boost::shared_ptr<ScSimpleRangeList> mpDateTimeList;
::boost::shared_ptr<ScSimpleRangeList> mpPercentList;
::boost::shared_ptr<ScSimpleRangeList> mpLogicalList;
More information about the Libreoffice-commits
mailing list