[Libreoffice-commits] core.git: sc/source

Jaskaran Singh jvsg1303 at gmail.com
Wed Sep 28 05:20:51 UTC 2016


 sc/source/filter/inc/orcusinterface.hxx |    1 +
 sc/source/filter/orcus/interface.cxx    |    7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 43e9abd29cc3a9246a3d2789024c6c252974c9e3
Author: Jaskaran Singh <jvsg1303 at gmail.com>
Date:   Tue Sep 27 20:52:25 2016 +0530

    Add functionality to set parent cell style
    
    Change-Id: I829a39f5b013f14a867c509052a5719a878a3a81
    Reviewed-on: https://gerrit.libreoffice.org/29325
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Jaskaran singh <jvsg1303 at gmail.com>

diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index e467b85..28b214d 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 a94b6f7..8b08c1b 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];


More information about the Libreoffice-commits mailing list