sc/source/filter/xml/XMLTableShapeImportHelper.cxx | 6 ++---- sc/source/filter/xml/XMLTableShapeImportHelper.hxx | 6 +++--- sc/source/filter/xml/xmlcelli.cxx | 5 +---- sc/source/filter/xml/xmlfilti.cxx | 8 ++++---- sc/source/filter/xml/xmlfilti.hxx | 5 +---- 5 files changed, 11 insertions(+), 19 deletions(-)
New commits: commit e1078f21d6e0faf93b22cb8e8af2a91c0b16071d Author: Bartosz Kosiorek <gan...@poczta.onet.pl> Date: Sat Nov 19 16:00:29 2016 +0100 tdf#48140 Replace CellAddress uno calls with direct access Change-Id: I4c8b36eaa29241f886810f9bff88ed9ca9d3192f Reviewed-on: https://gerrit.libreoffice.org/30979 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx index 239e8bc..83751e0 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 1bb7d70..397f07d 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 851101e..ddd8543 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 01fa5d7..f1a5d80 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 195c6ec..e646a0e 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits