summaryrefslogtreecommitdiffstats
path: root/sc/source/filter/oox/workbookhelper.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-06-24 19:40:54 +0200
committerEike Rathke <erack@redhat.com>2015-06-24 19:47:29 +0200
commit715b4bbca56ca3cb1f26184a0461ea07c485b8f3 (patch)
tree4bf2e16feda5e1cecad2dc640f27417ecfa714f0 /sc/source/filter/oox/workbookhelper.cxx
parenttdf#92258 - fix crash editing macro module name. (diff)
downloadcore-715b4bbca56ca3cb1f26184a0461ea07c485b8f3.tar.gz
core-715b4bbca56ca3cb1f26184a0461ea07c485b8f3.zip
TableRef: import OOXML table column names to ScDBData
Change-Id: I5fa32922fffcd027ddf1c61fe0b122fa2d320d98
Diffstat (limited to 'sc/source/filter/oox/workbookhelper.cxx')
-rw-r--r--sc/source/filter/oox/workbookhelper.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index f34332aee286..d264e5621d6c 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -167,6 +167,8 @@ public:
Reference< XDatabaseRange > createDatabaseRangeObject( OUString& orName, const CellRangeAddress& rRangeAddr );
/** Creates and returns an unnamed database range on-the-fly in the Calc document. */
Reference< XDatabaseRange > createUnnamedDatabaseRangeObject( const CellRangeAddress& rRangeAddr );
+ /** Finds the (already existing) database range of the given formula token index. */
+ ScDBData* findDatabaseRangeByIndex( sal_uInt16 nIndex );
/** Creates and returns a com.sun.star.style.Style object for cells or pages. */
Reference< XStyle > createStyleObject( OUString& orStyleName, bool bPageStyle );
/** Helper to switch chart data table - specifically for xlsx imports */
@@ -495,6 +497,14 @@ Reference< XDatabaseRange > WorkbookGlobals::createUnnamedDatabaseRangeObject( c
return xDatabaseRange;
}
+ScDBData* WorkbookGlobals::findDatabaseRangeByIndex( sal_uInt16 nIndex )
+{
+ ScDBCollection* pDBCollection = getScDocument().GetDBCollection();
+ if (!pDBCollection)
+ return nullptr;
+ return pDBCollection->getNamedDBs().findByIndex( nIndex );
+}
+
Reference< XStyle > WorkbookGlobals::createStyleObject( OUString& orStyleName, bool bPageStyle )
{
Reference< XStyle > xStyle;
@@ -901,6 +911,11 @@ Reference< XDatabaseRange > WorkbookHelper::createUnnamedDatabaseRangeObject( co
return mrBookGlob.createUnnamedDatabaseRangeObject( rRangeAddr );
}
+ScDBData* WorkbookHelper::findDatabaseRangeByIndex( sal_uInt16 nIndex ) const
+{
+ return mrBookGlob.findDatabaseRangeByIndex( nIndex );
+}
+
Reference< XStyle > WorkbookHelper::createStyleObject( OUString& orStyleName, bool bPageStyle ) const
{
return mrBookGlob.createStyleObject( orStyleName, bPageStyle );