[Libreoffice-commits] core.git: Branch 'feature/orcus-odf' - 6 commits - sc/source
Jaskaran Singh
jvsg1303 at gmail.com
Fri Jul 22 15:35:58 UTC 2016
sc/source/filter/inc/orcusinterface.hxx | 4 +---
sc/source/filter/orcus/interface.cxx | 27 +++++++++++++++------------
2 files changed, 16 insertions(+), 15 deletions(-)
New commits:
commit 358c327846ccc44bc7f1df0e396e8afad16af310
Author: Jaskaran Singh <jvsg1303 at gmail.com>
Date: Fri Jul 22 21:03:43 2016 +0530
Reform orcus unit warning
Change-Id: Iec221f019a65fcb42281f76b724ea306587f66c8
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 2fd826f..d59b2fa 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -258,7 +258,8 @@ double translateToInternal(double nVal, orcus::length_unit_t unit)
return nVal * 20.0 * 72.0 / 2.54;
break;
case orcus::length_unit_t::unknown:
- SAL_WARN("sc.orcus", "unknown unit");
+ if (nVal != 0)
+ SAL_WARN("sc.orcus", "unknown unit");
break;
default:
break;
commit d64978fa5116d7792700c5f94dfd88fc128638c4
Author: Jaskaran Singh <jvsg1303 at gmail.com>
Date: Fri Jul 22 18:38:45 2016 +0530
Fix reorder and overflow warning in orcus interface
Change-Id: I700463434a99a87e485b61bac78513a286f507cd
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 3dd68ff..2fd826f 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -753,18 +753,19 @@ ScOrcusStyles::ScOrcusStyles(ScDocument& rDoc):
ScOrcusStyles::font::font():
mbBold(false),
mbItalic(false),
+ mnSize(10),
+ maColor(COL_WHITE),
mbHasFontAttr(false),
mbHasUnderlineAttr(false),
- mnSize(10),
meUnderline(LINESTYLE_NONE),
- maColor(COL_WHITE, COL_WHITE, COL_WHITE, COL_WHITE)
+ maUnderlineColor(COL_WHITE)
{
}
ScOrcusStyles::fill::fill():
maPattern(""),
- maFgColor(Color(COL_WHITE, COL_WHITE, COL_WHITE)),
- maBgColor(Color(COL_WHITE, COL_WHITE, COL_WHITE)),
+ maFgColor(COL_WHITE),
+ maBgColor(COL_WHITE),
mbHasFillAttr(false)
{
}
commit f83b5aa1603157557b67e855e2ec26b5c39c3d12
Author: Jaskaran Singh <jvsg1303 at gmail.com>
Date: Fri Jul 22 18:36:57 2016 +0530
Remove unused variable from orcus interface
Change-Id: I3883b5361824838a3cb802cb9c577d4d39c070b2
diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index 48332f4..7f469e4 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -262,8 +262,6 @@ private:
bool mbHasUnderlineAttr;
FontLineStyle meUnderline;
- FontLineStyle meUnderlineType;
- FontLineStyle meUnderlineWidth;
Color maUnderlineColor;
font();
commit 13c5c11f094921984183d9d49de7331518e2ca24
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Tue Jul 19 23:18:30 2016 +0200
fix assert in number format orcus import
Change-Id: Ib0a8ce074c9245fa8ba66008524887f015c7bf76
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 89d8f47..3dd68ff 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -906,7 +906,7 @@ void ScOrcusStyles::number_format::applyToItemSet(SfxItemSet& rSet, ScDocument&
{
if (nCheckPos == 0)
{
- rSet.Put(SfxUInt32Item(nKey, ATTR_VALUE_FORMAT));
+ rSet.Put(SfxUInt32Item(ATTR_VALUE_FORMAT, nKey));
}
}
else
commit e6659211e4dfa54eb966897a4059798687442864
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Tue Jul 19 23:25:43 2016 +0200
use ScDocument's number formatter
Change-Id: Iff04869b8e8ba73575bd5d336db42f1e08cec5d8
diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index b6b7c676..48332f4 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -333,7 +333,7 @@ private:
bool mbHasNumberFormatAttr;
number_format();
- void applyToItemSet(SfxItemSet& rSet) const;
+ void applyToItemSet(SfxItemSet& rSet, ScDocument& rDoc) const;
};
number_format maCurrentNumberFormat;
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 1aedcd5..89d8f47 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -894,15 +894,15 @@ void ScOrcusStyles::border::applyToItemSet(SfxItemSet& rSet) const
rSet.Put(aBoxItem);
}
-void ScOrcusStyles::number_format::applyToItemSet(SfxItemSet& rSet) const
+void ScOrcusStyles::number_format::applyToItemSet(SfxItemSet& rSet, ScDocument& rDoc) const
{
sal_uInt32 nKey;
sal_Int32 nCheckPos;
- SvNumberFormatter NumberFormatter(comphelper::getProcessComponentContext(), LANGUAGE_ENGLISH_US);
+ SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
OUString Code = maCode; /* <-- Done because the SvNumberFormatter::PutEntry demands a non const NumFormat Code*/
sal_Int16 type = css::util::NumberFormat::ALL;
- if (NumberFormatter.PutEntry(Code, nCheckPos, type, nKey, LANGUAGE_ENGLISH_US))
+ if (pFormatter->PutEntry(Code, nCheckPos, type, nKey, LANGUAGE_ENGLISH_US))
{
if (nCheckPos == 0)
{
@@ -981,7 +981,7 @@ void ScOrcusStyles::applyXfToItemSet(SfxItemSet& rSet, const xf& rXf)
}
const number_format& rFormat = maNumberFormats[nNumberFormatId];
if (rFormat.mbHasNumberFormatAttr)
- rFormat.applyToItemSet(rSet);
+ rFormat.applyToItemSet(rSet, mrDoc);
}
void ScOrcusStyles::applyXfToItemSet(SfxItemSet& rSet, size_t xfId)
commit bd4e5ea10ae1b4d86ce4613ed4aff10938f728ee
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Tue Jul 19 23:06:36 2016 +0200
fix assert when opening a calc document in new orcus styles import
Change-Id: I6e62ddaeb20687bf3ad3e7de86f749e1047363b9
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 37591d2..1aedcd5 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -797,8 +797,9 @@ void ScOrcusStyles::font::applyToItemSet(SfxItemSet& rSet) const
if (mbHasUnderlineAttr)
{
- rSet.Put(SvxUnderlineItem(meUnderline, ATTR_FONT_UNDERLINE));
- rSet.Put(SvxColorItem(maUnderlineColor, ATTR_FONT_UNDERLINE));
+ SvxUnderlineItem aUnderline(meUnderline, ATTR_FONT_UNDERLINE);
+ aUnderline.SetColor(maUnderlineColor);
+ rSet.Put(aUnderline);
}
rSet.Put( SvxColorItem(maColor, ATTR_FONT_COLOR));
More information about the Libreoffice-commits
mailing list