diff options
author | Eike Rathke <erack@redhat.com> | 2016-09-22 23:50:57 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-09-22 23:53:55 +0200 |
commit | 854254c36f4c4804bb5c8fcde2edef444baed25c (patch) | |
tree | 89c4c13c6e14cd1ab0e0ca01abf6722aaec8d3d1 | |
parent | 853a63997aaae1e54b638432b1b1391c070f4e2b (diff) |
attempt to fix build, ScImportExport( ScDocument*, const OUString& )
... is not unused but only in ifdef _WIN32
commit c4cd079b8f613084a99a83b95c3968b65cbd8900
Date: Thu Sep 22 15:08:42 2016 +0200
loplugin:unusedmethods in sc..vcl
Change-Id: I36c8d57fddfffe8c99cf40ae514270f445388d08
-rw-r--r-- | sc/source/ui/docshell/impex.cxx | 43 | ||||
-rw-r--r-- | sc/source/ui/inc/impex.hxx | 1 |
2 files changed, 44 insertions, 0 deletions
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 930c7942d4b4..85efd9ab8219 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -136,6 +136,49 @@ ScImportExport::ScImportExport( ScDocument* p, const ScRange& r ) aRange.aEnd.SetTab( aRange.aStart.Tab() ); } +// Evaluate input string - either range, cell or the whole document (when error) +// If a View exists, the TabNo of the view will be used. +ScImportExport::ScImportExport( ScDocument* p, const OUString& rPos ) + : pDocSh( dynamic_cast< ScDocShell* >(p->GetDocumentShell()) ), pDoc( p ), + nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ), + bFormulas( false ), bIncludeFiltered( true ), + bAll( false ), bSingle( true ), bUndo( pDocSh != nullptr ), + bOverflowRow( false ), bOverflowCol( false ), bOverflowCell( false ), + mbApi( true ), mbImportBroadcast(false), mbOverwriting( false ), + mExportTextOptions() +{ + pUndoDoc = nullptr; + pExtOptions = nullptr; + + SCTAB nTab = ScDocShell::GetCurTab(); + aRange.aStart.SetTab( nTab ); + OUString aPos( rPos ); + // Named range? + ScRangeName* pRange = pDoc->GetRangeName(); + if (pRange) + { + const ScRangeData* pData = pRange->findByUpperName(ScGlobal::pCharClass->uppercase(aPos)); + if (pData) + { + if( pData->HasType( ScRangeData::Type::RefArea ) + || pData->HasType( ScRangeData::Type::AbsArea ) + || pData->HasType( ScRangeData::Type::AbsPos ) ) + { + pData->GetSymbol(aPos); + } + } + } + formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); + // Range? + if (aRange.Parse(aPos, pDoc, eConv) & ScRefFlags::VALID) + bSingle = false; + // Cell? + else if (aRange.aStart.Parse(aPos, pDoc, eConv) & ScRefFlags::VALID) + aRange.aEnd = aRange.aStart; + else + bAll = true; +} + ScImportExport::~ScImportExport() { delete pUndoDoc; diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx index b5b69f6e14d1..b0be3efd67e9 100644 --- a/sc/source/ui/inc/impex.hxx +++ b/sc/source/ui/inc/impex.hxx @@ -89,6 +89,7 @@ class ScImportExport public: ScImportExport( ScDocument* ); // the whole document + ScImportExport( ScDocument*, const OUString& ); // Range/cell input ScImportExport( ScDocument*, const ScAddress& ); ScImportExport( ScDocument*, const ScRange& ); ~ScImportExport(); |