[Libreoffice-commits] .: 3 commits - sc/source
Daniel Bankston
dbank at kemper.freedesktop.org
Sat Jul 21 01:47:38 PDT 2012
sc/source/filter/xml/XMLStylesImportHelper.cxx | 16 ----------------
sc/source/filter/xml/XMLStylesImportHelper.hxx | 1 -
sc/source/filter/xml/xmlcelli.cxx | 3 ++-
sc/source/filter/xml/xmlimprt.cxx | 3 +--
4 files changed, 3 insertions(+), 20 deletions(-)
New commits:
commit 5a14b6bb09bd054589deec1a58d96fe5fc562f0c
Author: Daniel Bankston <daniel.e.bankston at gmail.com>
Date: Sat Jul 21 03:03:42 2012 -0500
Use correct date/datetime format for formula cells and value cells.
Change-Id: I37816eba909caa71aca95c5181daeea1751b6c5a
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index e619d10..21c2d14 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -260,6 +260,8 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
{
if (nCellType == util::NumberFormat::TEXT)
bFormulaTextResult = true;
+ if(nCellType == util::NumberFormat::DATETIME)
+ nCellType = util::NumberFormat::UNDEFINED;
}
rXMLImport.GetStylesImportHelper()->SetAttributes(pStyleName, pCurrencySymbol, nCellType);
}
commit 98435468618e2a3c16132c3e870a59a017131a4e
Author: Daniel Bankston <daniel.e.bankston at gmail.com>
Date: Fri Jul 20 18:20:54 2012 -0500
Revert "Distinguish between DATE and DATETIME formats in ODS import"
This reverts commit 4e5c55afee36d02bdfe4c0fb09e3b42e9eadb6c5.
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 26d01aa..e619d10 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -876,7 +876,6 @@ void ScXMLTableRowCellContext::AddTextAndValueCells( const ScAddress& rCellPos,
case util::NumberFormat::PERCENT:
case util::NumberFormat::CURRENCY:
case util::NumberFormat::TIME:
- case util::NumberFormat::DATE:
case util::NumberFormat::DATETIME:
case util::NumberFormat::LOGICAL:
{
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 831176c..c3e3cd7 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -1979,8 +1979,7 @@ ScXMLImport::ScXMLImport(
{ XML_FLOAT, util::NumberFormat::NUMBER },
{ XML_STRING, util::NumberFormat::TEXT },
{ XML_TIME, util::NumberFormat::TIME },
- { XML_DATE, util::NumberFormat::DATE },
- { XML_DATE_TIME, util::NumberFormat::DATETIME },
+ { XML_DATE, util::NumberFormat::DATETIME },
{ XML_PERCENTAGE, util::NumberFormat::PERCENT },
{ XML_CURRENCY, util::NumberFormat::CURRENCY },
{ XML_BOOLEAN, util::NumberFormat::LOGICAL }
commit 9608fb0e3d3a623c7cd27c6d43893cd3d7e68f96
Author: Daniel Bankston <daniel.e.bankston at gmail.com>
Date: Fri Jul 20 18:17:24 2012 -0500
Revert "Fix cause of osl warning"
This reverts commit 59b32886a48954f9dad96b3329d172ac73aaa065.
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.cxx b/sc/source/filter/xml/XMLStylesImportHelper.cxx
index 2f54d6b..438ac0e 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.cxx
@@ -85,13 +85,6 @@ 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)
@@ -159,8 +152,6 @@ 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)
@@ -214,13 +205,6 @@ 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 87765f3..6a988d0 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.hxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.hxx
@@ -97,7 +97,6 @@ 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