diff options
author | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2016-11-25 00:53:22 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-26 10:20:49 +0000 |
commit | b0c3665b2a74256e8dca9743073c668df30839b4 (patch) | |
tree | 3732fe4063e59fdc5f981890f0d2ffa6348bac51 /sc | |
parent | abe4d7bd0a1ec4b5a31cc5622080952e4cd53ebf (diff) |
tdf#48140 Replace uno with direct calls
Change-Id: I38af8d3e4dfbd42f025734ba14de409e8bd97393
Reviewed-on: https://gerrit.libreoffice.org/31179
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xml/XMLStylesExportHelper.cxx | 11 | ||||
-rw-r--r-- | sc/source/filter/xml/XMLStylesExportHelper.hxx | 7 | ||||
-rw-r--r-- | sc/source/filter/xml/xmldrani.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xml/xmldrani.hxx | 7 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlfilti.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlfilti.hxx | 3 |
6 files changed, 16 insertions, 18 deletions
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx index 06dd75fd522c..5b1b82ff87c0 100644 --- a/sc/source/filter/xml/XMLStylesExportHelper.cxx +++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx @@ -68,9 +68,9 @@ bool ScMyValidation::IsEqual(const ScMyValidation& aVal) const if (aVal.bIgnoreBlanks == bIgnoreBlanks && aVal.bShowImputMessage == bShowImputMessage && aVal.bShowErrorMessage == bShowErrorMessage && - aVal.aBaseCell.Sheet == aBaseCell.Sheet && - aVal.aBaseCell.Column == aBaseCell.Column && - aVal.aBaseCell.Row == aBaseCell.Row && + aVal.aBaseCell.Tab() == aBaseCell.Tab() && + aVal.aBaseCell.Col() == aBaseCell.Col() && + aVal.aBaseCell.Row() == aBaseCell.Row() && aVal.aAlertStyle == aAlertStyle && aVal.aValidationType == aValidationType && aVal.aOperator == aOperator && @@ -143,7 +143,8 @@ void ScMyValidationsContainer::AddValidation(const uno::Any& aTempAny, aValidation.sFormula1 = xCondition->getFormula1(); aValidation.sFormula2 = xCondition->getFormula2(); aValidation.aOperator = xCondition->getOperator(); - aValidation.aBaseCell = xCondition->getSourcePosition(); + table::CellAddress aCellAddress= xCondition->getSourcePosition(); + aValidation.aBaseCell = ScAddress( static_cast<SCCOL>(aCellAddress.Column), static_cast<SCROW>(aCellAddress.Row), aCellAddress.Sheet ); } //ScMyValidationRange aValidationRange; bool bEqualFound(false); @@ -286,7 +287,7 @@ OUString ScMyValidationsContainer::GetCondition(ScXMLExport& rExport, const ScMy return sCondition; } -OUString ScMyValidationsContainer::GetBaseCellAddress(ScDocument* pDoc, const table::CellAddress& aCell) +OUString ScMyValidationsContainer::GetBaseCellAddress(ScDocument* pDoc, const ScAddress& aCell) { OUString sAddress; ScRangeStringConverter::GetStringFromAddress( sAddress, aCell, pDoc, ::formula::FormulaGrammar::CONV_OOO ); diff --git a/sc/source/filter/xml/XMLStylesExportHelper.hxx b/sc/source/filter/xml/XMLStylesExportHelper.hxx index 2d385d552873..67362125e7d2 100644 --- a/sc/source/filter/xml/XMLStylesExportHelper.hxx +++ b/sc/source/filter/xml/XMLStylesExportHelper.hxx @@ -23,9 +23,10 @@ #include <vector> #include <memory> #include <list> + +#include "address.hxx" #include <com/sun/star/uno/Any.h> #include <com/sun/star/table/CellRangeAddress.hpp> -#include <com/sun/star/table/CellAddress.hpp> #include <com/sun/star/sheet/ConditionOperator.hpp> #include <com/sun/star/sheet/ValidationAlertStyle.hpp> #include <com/sun/star/sheet/ValidationType.hpp> @@ -44,7 +45,7 @@ struct ScMyValidation OUString sImputTitle; OUString sFormula1; OUString sFormula2; - css::table::CellAddress aBaseCell; + ScAddress aBaseCell; css::sheet::ValidationAlertStyle aAlertStyle; css::sheet::ValidationType aValidationType; css::sheet::ConditionOperator aOperator; @@ -83,7 +84,7 @@ public: void AddValidation(const css::uno::Any& aAny, sal_Int32& nValidationIndex); static OUString GetCondition(ScXMLExport& rExport, const ScMyValidation& aValidation); - static OUString GetBaseCellAddress(ScDocument* pDoc, const css::table::CellAddress& aCell); + static OUString GetBaseCellAddress(ScDocument* pDoc, const ScAddress& aCell); static void WriteMessage(ScXMLExport& rExport, const OUString& sTitle, const OUString& sMessage, const bool bShowMessage, const bool bIsHelpMessage); diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx index c525b046cfe2..7f81c22c71bf 100644 --- a/sc/source/filter/xml/xmldrani.cxx +++ b/sc/source/filter/xml/xmldrani.cxx @@ -288,9 +288,7 @@ std::unique_ptr<ScDBData> ScXMLDatabaseRangeContext::ConvertToDBData(const OUStr if (bFilterConditionSourceRange) { - ScRange aAdvSource; - ScUnoConversion::FillScRange(aAdvSource, aFilterConditionSourceRangeAddress); - pData->SetAdvancedQuerySource(&aAdvSource); + pData->SetAdvancedQuerySource( &aFilterConditionSourceRangeAddress ); } { diff --git a/sc/source/filter/xml/xmldrani.hxx b/sc/source/filter/xml/xmldrani.hxx index a22339a201fa..2533d4b68c68 100644 --- a/sc/source/filter/xml/xmldrani.hxx +++ b/sc/source/filter/xml/xmldrani.hxx @@ -24,7 +24,6 @@ #include <com/sun/star/sheet/DataImportMode.hpp> #include <com/sun/star/sheet/SubTotalColumn.hpp> #include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/table/CellRangeAddress.hpp> #include <com/sun/star/table/TableOrientation.hpp> #include "dbdata.hxx" @@ -69,7 +68,7 @@ class ScXMLDatabaseRangeContext : public ScXMLImportContext OUString sSourceObject; css::uno::Sequence <css::beans::PropertyValue> aSortSequence; std::vector < ScSubTotalRule > aSubTotalRules; - css::table::CellRangeAddress aFilterConditionSourceRangeAddress; + ScRange aFilterConditionSourceRangeAddress; css::sheet::DataImportMode nSourceType; sal_Int32 nRefresh; sal_Int16 nSubTotalsUserListIndex; @@ -123,8 +122,8 @@ public: void SetSubTotalsSortGroups(const bool bTemp) { bSubTotalsSortGroups = bTemp; } void AddSubTotalRule(const ScSubTotalRule& rRule) { aSubTotalRules.push_back(rRule); } void SetSortSequence(const css::uno::Sequence <css::beans::PropertyValue>& aTempSortSequence) { aSortSequence = aTempSortSequence; } - void SetFilterConditionSourceRangeAddress(const css::table::CellRangeAddress& aTemp) { aFilterConditionSourceRangeAddress = aTemp; - bFilterConditionSourceRange = true; } + void SetFilterConditionSourceRangeAddress(const ScRange& aRange) { aFilterConditionSourceRangeAddress = aRange; + bFilterConditionSourceRange = true; } }; class ScXMLSourceSQLContext : public ScXMLImportContext diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx index f1a5d80dcc1b..944d7f29ea21 100644 --- a/sc/source/filter/xml/xmlfilti.cxx +++ b/sc/source/filter/xml/xmlfilti.cxx @@ -80,7 +80,7 @@ ScXMLFilterContext::ScXMLFilterContext( ScXMLImport& rImport, case XML_TOK_FILTER_ATTR_CONDITION_SOURCE_RANGE_ADDRESS : { sal_Int32 nOffset(0); - if (ScRangeStringConverter::GetRangeFromString( aConditionSourceRangeAddress, sValue, pDoc, ::formula::FormulaGrammar::CONV_OOO, nOffset )) + if (ScRangeStringConverter::GetRangeFromString( aConditionSourceRangeAddress, sValue, pDoc, ::formula::FormulaGrammar::CONV_OOO, nOffset ) ) bConditionSourceRange = true; } break; diff --git a/sc/source/filter/xml/xmlfilti.hxx b/sc/source/filter/xml/xmlfilti.hxx index e646a0eb522f..3679ef85c431 100644 --- a/sc/source/filter/xml/xmlfilti.hxx +++ b/sc/source/filter/xml/xmlfilti.hxx @@ -22,7 +22,6 @@ #include <xmloff/xmlictxt.hxx> #include <xmloff/xmlimp.hxx> -#include <com/sun/star/table/CellRangeAddress.hpp> #include <com/sun/star/sheet/FilterOperator.hpp> #include "xmldrani.hxx" @@ -48,7 +47,7 @@ class ScXMLFilterContext : public ScXMLImportContext ScXMLDatabaseRangeContext* pDatabaseRangeContext; ScAddress aOutputPosition; - css::table::CellRangeAddress aConditionSourceRangeAddress; + ScRange aConditionSourceRangeAddress; bool bSkipDuplicates; bool bCopyOutputData; bool bConditionSourceRange; |