sc/source/ui/docshell/impex.cxx | 43 ++++++++++++++++++++++++++++++++++++++++ sc/source/ui/inc/impex.hxx | 1 2 files changed, 44 insertions(+)
New commits: commit d4bfe4634cdbd3769835a700943675c5fa132be7 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Tue Feb 3 12:37:13 2015 +0100 try to fix the build diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 7ba8487..2df60d6 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -125,6 +125,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( PTR_CAST(ScDocShell,p->GetDocumentShell()) ), pDoc( p ), + nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ), + bFormulas( false ), bIncludeFiltered( true ), + bAll( false ), bSingle( true ), bUndo( pDocSh != NULL ), + bOverflowRow( false ), bOverflowCol( false ), bOverflowCell( false ), + mbApi( true ), mbImportBroadcast(false), mbOverwriting( false ), + mExportTextOptions() +{ + pUndoDoc = NULL; + pExtOptions = NULL; + + 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( RT_REFAREA ) + || pData->HasType( RT_ABSAREA ) + || pData->HasType( RT_ABSPOS ) ) + { + pData->GetSymbol(aPos); + } + } + } + formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); + // Range? + if (aRange.Parse(aPos, pDoc, eConv) & SCA_VALID) + bSingle = false; + // Cell? + else if (aRange.aStart.Parse(aPos, pDoc, eConv) & SCA_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 256c224..8be2cbc1 100644 --- a/sc/source/ui/inc/impex.hxx +++ b/sc/source/ui/inc/impex.hxx @@ -90,6 +90,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(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits