[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sc/source

Markus Mohrhard markus.mohrhard at googlemail.com
Tue Apr 12 11:38:17 UTC 2016


 sc/source/filter/inc/stylesbuffer.hxx |    2 +-
 sc/source/filter/oox/stylesbuffer.cxx |   19 +++----------------
 2 files changed, 4 insertions(+), 17 deletions(-)

New commits:
commit 3ced9d208d3eb8fefa4e5b3e06e2c3884eef591a
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sat Apr 9 09:36:45 2016 +0200

    import all formatting properties for column style, tdf#96549
    
    Change-Id: I782f3ea7cfa9af335bd117b9f4ad6ac9c719115b
    Reviewed-on: https://gerrit.libreoffice.org/23932
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit e8322dffb4dfc7015ee0842f133b79080eb2b0d8)
    Reviewed-on: https://gerrit.libreoffice.org/23943
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/filter/inc/stylesbuffer.hxx b/sc/source/filter/inc/stylesbuffer.hxx
index b140079..f8fc2fd 100644
--- a/sc/source/filter/inc/stylesbuffer.hxx
+++ b/sc/source/filter/inc/stylesbuffer.hxx
@@ -659,7 +659,7 @@ public:
     /** Writes all formatting attributes to the passed property set. */
     void                writeToPropertySet( PropertySet& rPropSet ) const;
 
-    void writeToDoc( ScDocumentImport& rDoc, const css::table::CellRangeAddress& rRange ) const;
+    void writeToDoc( ScDocumentImport& rDoc, const css::table::CellRangeAddress& rRange );
 
     const ::ScPatternAttr& createPattern( bool bSkipPoolDefs = false );
 
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index ce909ad..48fc501 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -2252,7 +2252,7 @@ void Xf::writeToPropertySet( PropertySet& rPropSet ) const
     rPropSet.setProperties( aPropMap );
 }
 
-void Xf::writeToDoc( ScDocumentImport& rDoc, const table::CellRangeAddress& rRange ) const
+void Xf::writeToDoc( ScDocumentImport& rDoc, const table::CellRangeAddress& rRange )
 {
     const StylesBuffer& rStyles = getStyles();
 
@@ -2273,22 +2273,9 @@ void Xf::writeToDoc( ScDocumentImport& rDoc, const table::CellRangeAddress& rRan
         }
     }
 
-    std::unique_ptr<ScPatternAttr> pAttr(new ScPatternAttr(rDoc.getDoc().GetPool()));
-
-    {
-        SvxRotateMode eRotateMode = SVX_ROTATE_MODE_STANDARD;
-
-        if (maModel.mbBorderUsed && rStyles.hasBorder(maModel.mnBorderId) && maAlignment.getApiData().mnRotation)
-            eRotateMode = SVX_ROTATE_MODE_BOTTOM;
-
-        SvxRotateModeItem aItem(eRotateMode, ATTR_ROTATE_MODE);
-        ScfTools::PutItem(pAttr->GetItemSet(), aItem, false);
-    }
-
-    // TODO : Move more properties from writeToPropertyMap().
-
+    const ScPatternAttr& rAttr = createPattern();
     rDoc.getDoc().ApplyPatternAreaTab(
-        rRange.StartColumn, rRange.StartRow, rRange.EndColumn, rRange.EndRow, rRange.Sheet, *pAttr);
+        rRange.StartColumn, rRange.StartRow, rRange.EndColumn, rRange.EndRow, rRange.Sheet, rAttr);
 }
 
 const ::ScPatternAttr&


More information about the Libreoffice-commits mailing list