summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2016-12-31 14:00:26 +0100
committerJochen Nitschke <j.nitschke+logerrit@ok.de>2017-01-03 00:17:34 +0000
commit152e2e9211ce993f365004bf9caf9ea85269489f (patch)
treebe5fd9d383d5c34ec649453b6d540072d7bd0d6a
parenta4b7a2475d33311fef16197bf6a945ad5121fc8e (diff)
tdf#48140 replace CellRangeAddress in xlsx import (5)
Change-Id: Ib0ebc3e92e595cdc2ed1241efdb1131fb79452cd Reviewed-on: https://gerrit.libreoffice.org/32574 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
-rw-r--r--sc/source/filter/inc/stylesbuffer.hxx4
-rw-r--r--sc/source/filter/oox/stylesbuffer.cxx9
-rw-r--r--sc/source/filter/oox/worksheethelper.cxx2
3 files changed, 7 insertions, 8 deletions
diff --git a/sc/source/filter/inc/stylesbuffer.hxx b/sc/source/filter/inc/stylesbuffer.hxx
index 2bc75986f6ea..8a5fdc84d408 100644
--- a/sc/source/filter/inc/stylesbuffer.hxx
+++ b/sc/source/filter/inc/stylesbuffer.hxx
@@ -636,7 +636,7 @@ public:
void applyPatternToAttrList(
AttrList& rAttrs, SCROW nRow1, SCROW nRow2, sal_Int32 nForceScNumFmt );
- void writeToDoc( ScDocumentImport& rDoc, const css::table::CellRangeAddress& rRange );
+ void writeToDoc( ScDocumentImport& rDoc, const ScRange& rRange );
const ::ScPatternAttr& createPattern( bool bSkipPoolDefs = false );
@@ -871,7 +871,7 @@ public:
void writeFillToItemSet( SfxItemSet& rItemSet, sal_Int32 nFillId, bool bSkipPoolDefs ) const;
/** Writes the cell formatting attributes of the specified XF to the passed property set. */
- void writeCellXfToDoc( ScDocumentImport& rDoc, const css::table::CellRangeAddress& rRange, sal_Int32 nXfId ) const;
+ void writeCellXfToDoc( ScDocumentImport& rDoc, const ScRange& rRange, sal_Int32 nXfId ) const;
private:
typedef RefVector< Font > FontVector;
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index f4c746906144..0d097b0f699a 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -82,7 +82,6 @@
#include <documentimport.hxx>
#include <numformat.hxx>
-using ::com::sun::star::table::BorderLine2;
namespace oox {
namespace xls {
@@ -2083,7 +2082,7 @@ void Xf::applyPatternToAttrList( AttrList& rAttrs, SCROW nRow1, SCROW nRow2, sal
}
}
-void Xf::writeToDoc( ScDocumentImport& rDoc, const table::CellRangeAddress& rRange )
+void Xf::writeToDoc( ScDocumentImport& rDoc, const ScRange& rRange )
{
const StylesBuffer& rStyles = getStyles();
@@ -2099,14 +2098,14 @@ void Xf::writeToDoc( ScDocumentImport& rDoc, const table::CellRangeAddress& rRan
if (pStyleSheet)
{
rDoc.getDoc().ApplyStyleAreaTab(
- rRange.StartColumn, rRange.StartRow, rRange.EndColumn, rRange.EndRow, rRange.Sheet,
+ rRange.aStart.Col(), rRange.aStart.Row(), rRange.aEnd.Col(), rRange.aEnd.Row(), rRange.aStart.Tab(),
*pStyleSheet);
}
}
const ScPatternAttr& rAttr = createPattern();
rDoc.getDoc().ApplyPatternAreaTab(
- rRange.StartColumn, rRange.StartRow, rRange.EndColumn, rRange.EndRow, rRange.Sheet, rAttr);
+ rRange.aStart.Col(), rRange.aStart.Row(), rRange.aEnd.Col(), rRange.aEnd.Row(), rRange.aStart.Tab(), rAttr);
}
const ::ScPatternAttr&
@@ -2963,7 +2962,7 @@ bool operator==( const Xf& rXf1, const Xf& rXf2 )
}
void StylesBuffer::writeCellXfToDoc(
- ScDocumentImport& rDoc, const table::CellRangeAddress& rRange, sal_Int32 nXfId ) const
+ ScDocumentImport& rDoc, const ScRange& rRange, sal_Int32 nXfId ) const
{
Xf* pXf = maCellXfs.get(nXfId).get();
if (!pXf)
diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx
index f159cea5fe27..92e95c808ae9 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -833,7 +833,7 @@ void WorksheetGlobals::setColumnModel( const ColumnModel& rModel )
void WorksheetGlobals::convertColumnFormat( sal_Int32 nFirstCol, sal_Int32 nLastCol, sal_Int32 nXfId )
{
- CellRangeAddress aRange( getSheetIndex(), nFirstCol, 0, nLastCol, mrMaxApiPos.Row() );
+ ScRange aRange( nFirstCol, 0, getSheetIndex(), nLastCol, mrMaxApiPos.Row(), getSheetIndex() );
if( getAddressConverter().validateCellRange( aRange, true, false ) )
{
const StylesBuffer& rStyles = getStyles();