summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJaskaran Singh <jvsg1303@gmail.com>2016-09-27 20:52:25 +0530
committerJaskaran singh <jvsg1303@gmail.com>2016-09-28 05:18:13 +0000
commit43e9abd29cc3a9246a3d2789024c6c252974c9e3 (patch)
tree2a7dc6606f45e03dbc1ec0c8f80b484be2f08d3c /sc
parent3d9231dd4945dcd6c3d53ba11152049d382b975f (diff)
Add functionality to set parent cell style
Change-Id: I829a39f5b013f14a867c509052a5719a878a3a81 Reviewed-on: https://gerrit.libreoffice.org/29325 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jaskaran singh <jvsg1303@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/inc/orcusinterface.hxx1
-rw-r--r--sc/source/filter/orcus/interface.cxx7
2 files changed, 6 insertions, 2 deletions
diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index e467b85390fa..28b214d8f9cc 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -366,6 +366,7 @@ private:
struct cell_style
{
OUString maName;
+ OUString maParentName;
size_t mnXFId;
size_t mnBuiltInId;
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index a94b6f7a2372..8b08c1b41c9e 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -947,6 +947,7 @@ ScOrcusStyles::xf::xf():
}
ScOrcusStyles::cell_style::cell_style():
+ maParentName("Default"),
mnXFId(0),
mnBuiltInId(0)
{
@@ -1550,9 +1551,10 @@ void ScOrcusStyles::set_cell_style_builtin(size_t index)
maCurrentCellStyle.mnBuiltInId = index;
}
-void ScOrcusStyles::set_cell_style_parent_name(const char* /*s*/, size_t /*n*/)
+void ScOrcusStyles::set_cell_style_parent_name(const char* s, size_t n)
{
- // place holder
+ OUString aParentName(s, n, RTL_TEXTENCODING_UTF8);
+ maCurrentCellStyle.maParentName = aParentName;
}
size_t ScOrcusStyles::commit_cell_style()
@@ -1570,6 +1572,7 @@ size_t ScOrcusStyles::commit_cell_style()
ScStyleSheetPool* pPool = mrDoc.GetStyleSheetPool();
SfxStyleSheetBase& rBase = pPool->Make(maCurrentCellStyle.maName, SfxStyleFamily::Para);
+ rBase.SetParent(maCurrentCellStyle.maParentName);
SfxItemSet& rSet = rBase.GetItemSet();
xf& rXf = maCellStyleXfs[maCurrentCellStyle.mnXFId];