summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-02-03 12:37:13 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-02-03 12:37:13 +0100
commitd4bfe4634cdbd3769835a700943675c5fa132be7 (patch)
tree8237265c26017bf74770612cb9631b86df57803b
parentb5008653ec887447fe2a0e6b725710550a606ce7 (diff)
try to fix the build
-rw-r--r--sc/source/ui/docshell/impex.cxx43
-rw-r--r--sc/source/ui/inc/impex.hxx1
2 files changed, 44 insertions, 0 deletions
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 7ba8487d058c..2df60d661e25 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 256c224a4846..8be2cbc1e71b 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();