summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Kosiorek <gang65@poczta.onet.pl>2016-11-19 16:00:29 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-11-19 22:46:45 +0000
commite1078f21d6e0faf93b22cb8e8af2a91c0b16071d (patch)
tree9e88b4bca84fe569849974d2975e61340ff54ff4
parentda7aa2561297da42058da55ed2629d0df6fb03f3 (diff)
tdf#48140 Replace CellAddress uno calls with direct access
Change-Id: I4c8b36eaa29241f886810f9bff88ed9ca9d3192f Reviewed-on: https://gerrit.libreoffice.org/30979 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sc/source/filter/xml/XMLTableShapeImportHelper.cxx6
-rw-r--r--sc/source/filter/xml/XMLTableShapeImportHelper.hxx6
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx5
-rw-r--r--sc/source/filter/xml/xmlfilti.cxx8
-rw-r--r--sc/source/filter/xml/xmlfilti.hxx5
5 files changed, 11 insertions, 19 deletions
diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
index 239e8bc433b6..83751e0a7eb6 100644
--- a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
+++ b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
@@ -88,14 +88,13 @@ void XMLTableShapeImportHelper::finishShape(
if (!pAnnotationContext)
{
ScDrawObjData aAnchor;
- aAnchor.maStart = ScAddress(aStartCell.Column, aStartCell.Row, aStartCell.Sheet);
+ aAnchor.maStart = aStartCell;
awt::Point aStartPoint(rShape->getPosition());
aAnchor.maStartOffset = Point(aStartPoint.X, aStartPoint.Y);
sal_Int32 nEndX(-1);
sal_Int32 nEndY(-1);
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
- table::CellAddress aEndCell;
std::unique_ptr<OUString> xRangeList;
sal_Int16 nLayerID(-1);
for( sal_Int16 i=0; i < nAttrCount; ++i )
@@ -112,8 +111,7 @@ void XMLTableShapeImportHelper::finishShape(
if (IsXMLToken(aLocalName, XML_END_CELL_ADDRESS))
{
sal_Int32 nOffset(0);
- ScRangeStringConverter::GetAddressFromString(aEndCell, rValue, static_cast<ScXMLImport&>(mrImporter).GetDocument(), ::formula::FormulaGrammar::CONV_OOO, nOffset);
- aAnchor.maEnd = ScAddress(aEndCell.Column, aEndCell.Row, aEndCell.Sheet);
+ ScRangeStringConverter::GetAddressFromString(aAnchor.maEnd, rValue, static_cast<ScXMLImport&>(mrImporter).GetDocument(), ::formula::FormulaGrammar::CONV_OOO, nOffset);
}
else if (IsXMLToken(aLocalName, XML_END_X))
{
diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.hxx b/sc/source/filter/xml/XMLTableShapeImportHelper.hxx
index 1bb7d70cccb1..397f07dcb4b9 100644
--- a/sc/source/filter/xml/XMLTableShapeImportHelper.hxx
+++ b/sc/source/filter/xml/XMLTableShapeImportHelper.hxx
@@ -21,14 +21,14 @@
#define INCLUDED_SC_SOURCE_FILTER_XML_XMLTABLESHAPEIMPORTHELPER_HXX
#include <xmloff/shapeimport.hxx>
-#include <com/sun/star/table/CellAddress.hpp>
+#include "address.hxx"
class ScXMLImport;
class ScXMLAnnotationContext;
class XMLTableShapeImportHelper : public XMLShapeImportHelper
{
- css::table::CellAddress aStartCell;
+ ScAddress aStartCell;
ScXMLAnnotationContext* pAnnotationContext;
bool bOnTable;
@@ -42,7 +42,7 @@ public:
const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList,
css::uno::Reference< css::drawing::XShapes >& rShapes) override;
- void SetCell (const css::table::CellAddress& rAddress) { aStartCell = rAddress; }
+ void SetCell (const ScAddress& rAddress) { aStartCell = rAddress; }
void SetOnTable (const bool bTempOnTable) { bOnTable = bTempOnTable; }
void SetAnnotation(ScXMLAnnotationContext* pAnnotation) { pAnnotationContext = pAnnotation; }
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 851101eeda93..ddd85435d8f8 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -91,7 +91,6 @@
#include <svtools/miscopt.hxx>
#include <sax/tools/converter.hxx>
-#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/util/NumberFormat.hpp>
#include <com/sun/star/util/Date.hpp>
@@ -710,9 +709,7 @@ SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( sal_uInt16 nPr
XMLTableShapeImportHelper* pTableShapeImport =
static_cast< XMLTableShapeImportHelper* >( rXMLImport.GetShapeImport().get() );
pTableShapeImport->SetOnTable(false);
- css::table::CellAddress aCellAddress;
- ScUnoConversion::FillApiAddress( aCellAddress, aCellPos );
- pTableShapeImport->SetCell(aCellAddress);
+ pTableShapeImport->SetCell(aCellPos);
pContext = rXMLImport.GetShapeImport()->CreateGroupChildContext(
rXMLImport, nPrefix, rLName, xAttrList, xShapes);
if (pContext)
diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
index 01fa5d7c9060..f1a5d80dcc1b 100644
--- a/sc/source/filter/xml/xmlfilti.cxx
+++ b/sc/source/filter/xml/xmlfilti.cxx
@@ -72,7 +72,7 @@ ScXMLFilterContext::ScXMLFilterContext( ScXMLImport& rImport,
sal_Int32 nOffset(0);
if (ScRangeStringConverter::GetRangeFromString( aScRange, sValue, pDoc, ::formula::FormulaGrammar::CONV_OOO, nOffset ))
{
- ScUnoConversion::FillApiAddress( aOutputPosition, aScRange.aStart );
+ aOutputPosition = aScRange.aStart;
bCopyOutputData = true;
}
}
@@ -144,9 +144,9 @@ void ScXMLFilterContext::EndElement()
if (bCopyOutputData)
{
- mrQueryParam.nDestCol = aOutputPosition.Column;
- mrQueryParam.nDestRow = aOutputPosition.Row;
- mrQueryParam.nDestTab = aOutputPosition.Sheet;
+ mrQueryParam.nDestCol = aOutputPosition.Col();
+ mrQueryParam.nDestRow = aOutputPosition.Row();
+ mrQueryParam.nDestTab = aOutputPosition.Tab();
}
if (bConditionSourceRange)
diff --git a/sc/source/filter/xml/xmlfilti.hxx b/sc/source/filter/xml/xmlfilti.hxx
index 195c6eceaf4b..e646a0eb522f 100644
--- a/sc/source/filter/xml/xmlfilti.hxx
+++ b/sc/source/filter/xml/xmlfilti.hxx
@@ -22,11 +22,8 @@
#include <xmloff/xmlictxt.hxx>
#include <xmloff/xmlimp.hxx>
-#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/table/CellRangeAddress.hpp>
#include <com/sun/star/sheet/FilterOperator.hpp>
-#include <com/sun/star/sheet/FilterOperator2.hpp>
-#include <com/sun/star/sheet/TableFilterField2.hpp>
#include "xmldrani.hxx"
#include "xmldpimp.hxx"
@@ -50,7 +47,7 @@ class ScXMLFilterContext : public ScXMLImportContext
ScQueryParam& mrQueryParam;
ScXMLDatabaseRangeContext* pDatabaseRangeContext;
- css::table::CellAddress aOutputPosition;
+ ScAddress aOutputPosition;
css::table::CellRangeAddress aConditionSourceRangeAddress;
bool bSkipDuplicates;
bool bCopyOutputData;