summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMihai Varga <mihai.varga@collabora.com>2015-07-22 16:21:08 +0300
committerJan Holesovsky <kendy@collabora.com>2015-07-27 11:35:51 +0000
commit50fe21c7807afb9650c048e1a82bd97a7fc1d226 (patch)
tree6d8f63d191a5da5ae72a6cddf4a1dada07c81b65 /sc
parentd74436fb8681f18c1a4097a8b13c5a138cc73e79 (diff)
tiledrendering: added getPartName method for calc
This method is used to get the sheet's name and to display it in the tabs (sheet selector) I've also added an unit test for it and uncommented a similar one Change-Id: Ia866815c594a873812c71a6c86e303c869e1f093 Reviewed-on: https://gerrit.libreoffice.org/17294 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/docuno.hxx3
-rw-r--r--sc/source/ui/unoobj/docuno.cxx8
2 files changed, 11 insertions, 0 deletions
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index a7e9af5afb2c..cd6888598f69 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -388,6 +388,9 @@ public:
/// @see vcl::ITiledRenderable::getParts().
virtual int getParts() SAL_OVERRIDE;
+ /// @see vcl::ITiledRenderable::getPartName().
+ virtual OUString getPartName(int nPart) SAL_OVERRIDE;
+
/// @see vcl::ITiledRenderable::initializeForTiledRendering().
virtual void initializeForTiledRendering() SAL_OVERRIDE;
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index a1bf52764c29..fd9cb632d381 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -510,6 +510,14 @@ int ScModelObj::getPart()
return pViewData->GetTabNo();
}
+OUString ScModelObj::getPartName( int nPart )
+{
+ OUString sTabName;
+ ScViewData* pViewData = ScDocShell::GetViewData();
+ pViewData->GetDocument()->GetName(nPart, sTabName);
+ return sTabName;
+}
+
Size ScModelObj::getDocumentSize()
{
Size aSize(10, 10); // minimum size