summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/ViewShellImplementation.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-11-16 15:38:11 +0000
committerOliver Bolte <obo@openoffice.org>2004-11-16 15:38:11 +0000
commit5f85beafecb0c2974e5aca088470c6b6077a7741 (patch)
treef4796e8ec5c16eacc150ba4999063aa8452795c8 /sd/source/ui/view/ViewShellImplementation.cxx
parent1de961d4c9f81ded754ad351d85dea8cf22bdbc3 (diff)
INTEGRATION: CWS impress15 (1.4.66); FILE MERGED
2004/11/01 09:59:08 af 1.4.66.1: #i31283# Determine the view id by looking at the current view shell.
Diffstat (limited to 'sd/source/ui/view/ViewShellImplementation.cxx')
-rw-r--r--sd/source/ui/view/ViewShellImplementation.cxx44
1 files changed, 42 insertions, 2 deletions
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index a4c3249fb56f..1ff461e9661a 100644
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ViewShellImplementation.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: pjunck $ $Date: 2004-10-28 13:33:51 $
+ * last change: $Author: obo $ $Date: 2004-11-16 16:38:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -79,6 +79,7 @@
#include "PreviewChildWindow.hxx"
#include "PreviewWindow.hxx"
#include "fuslshow.hxx"
+#include "FactoryIds.hxx"
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
@@ -429,4 +430,43 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
}
+
+
+sal_uInt16 ViewShell::Implementation::GetViewId (void)
+{
+ switch (mrViewShell.GetShellType())
+ {
+ case ViewShell::ST_IMPRESS:
+ case ViewShell::ST_NOTES:
+ case ViewShell::ST_HANDOUT:
+ return IMPRESS_FACTORY_ID;
+
+ case ViewShell::ST_DRAW:
+ return DRAW_FACTORY_ID;
+
+ case ViewShell::ST_OUTLINE:
+ return OUTLINE_FACTORY_ID;
+
+ case ViewShell::ST_SLIDE:
+ case ViewShell::ST_SLIDE_SORTER:
+ return SLIDE_SORTER_FACTORY_ID;
+
+ case ViewShell::ST_PREVIEW:
+ return PREVIEW_FACTORY_ID;
+
+ case ViewShell::ST_PRESENTATION:
+ return PRESENTATION_FACTORY_ID;
+
+ // Since we have to return a view id for every possible shell type
+ // and there is not (yet) a proper ViewShellBase sub class for the
+ // remaining types we chose the Impress factory as a fall back.
+ case ViewShell::ST_TASK_PANE:
+ case ViewShell::ST_NONE:
+ default:
+ return IMPRESS_FACTORY_ID;
+ }
+}
+
+
+
} // end of namespace sd