DrawController.cxx (79aad27f) DrawController.cxx (65be1ea2)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 37 unchanged lines hidden (view full) ---

46#include <com/sun/star/drawing/framework/ModuleController.hpp>
47#include <com/sun/star/lang/XInitialization.hpp>
48
49#include "slideshow.hxx"
50
51#include <svx/fmshell.hxx>
52#include <vos/mutex.hxx>
53#include <vcl/svapp.hxx>
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 37 unchanged lines hidden (view full) ---

46#include <com/sun/star/drawing/framework/ModuleController.hpp>
47#include <com/sun/star/lang/XInitialization.hpp>
48
49#include "slideshow.hxx"
50
51#include <svx/fmshell.hxx>
52#include <vos/mutex.hxx>
53#include <vcl/svapp.hxx>
54#include <sfx2/sidebar/EnumContext.hxx>
55#include <svx/sidebar/ContextChangeEventMultiplexer.hxx>
56
54#include <boost/shared_ptr.hpp>
55
56using namespace ::std;
57using ::rtl::OUString;
58using namespace ::cppu;
59using namespace ::vos;
60using namespace ::com::sun::star;
61using namespace ::com::sun::star::uno;
62using namespace ::com::sun::star::drawing::framework;
57#include <boost/shared_ptr.hpp>
58
59using namespace ::std;
60using ::rtl::OUString;
61using namespace ::cppu;
62using namespace ::vos;
63using namespace ::com::sun::star;
64using namespace ::com::sun::star::uno;
65using namespace ::com::sun::star::drawing::framework;
66using ::sfx2::sidebar::EnumContext;
63
64namespace {
65static const ::com::sun::star::uno::Type saComponentTypeIdentifier (
66 ::getCppuType( (Reference<lang::XEventListener > *)0 ));
67static const ::com::sun::star::uno::Type saSelectionTypeIdentifier (
68 ::getCppuType( (Reference<view::XSelectionChangeListener > *)0 ));
69
70} // end of anonymous namespace

--- 485 unchanged lines hidden (view full) ---

556 // exception.
557 }
558
559}
560
561
562
563
67
68namespace {
69static const ::com::sun::star::uno::Type saComponentTypeIdentifier (
70 ::getCppuType( (Reference<lang::XEventListener > *)0 ));
71static const ::com::sun::star::uno::Type saSelectionTypeIdentifier (
72 ::getCppuType( (Reference<view::XSelectionChangeListener > *)0 ));
73
74} // end of anonymous namespace

--- 485 unchanged lines hidden (view full) ---

560 // exception.
561 }
562
563}
564
565
566
567
568void DrawController::BroadcastContextChange (void) const
569{
570 ::boost::shared_ptr<ViewShell> pViewShell (mpBase->GetMainViewShell());
571 if ( ! pViewShell)
572 return;
573
574 EnumContext::Context eContext (EnumContext::Context_Unknown);
575 switch (pViewShell->GetShellType())
576 {
577 case ViewShell::ST_IMPRESS:
578 case ViewShell::ST_DRAW:
579 if (mbMasterPageMode)
580 eContext = EnumContext::Context_MasterPage;
581 else
582 eContext = EnumContext::Context_DrawPage;
583 break;
584
585 case ViewShell::ST_NOTES:
586 eContext = EnumContext::Context_NotesPage;
587 break;
588
589 case ViewShell::ST_HANDOUT:
590 eContext = EnumContext::Context_HandoutPage;
591 break;
592
593 case ViewShell::ST_OUTLINE:
594 eContext = EnumContext::Context_OutlineText;
595 break;
596
597 case ViewShell::ST_SLIDE_SORTER:
598 eContext = EnumContext::Context_SlidesorterPage;
599 break;
600
601 case ViewShell::ST_PRESENTATION:
602 case ViewShell::ST_NONE:
603 eContext = EnumContext::Context_Empty;
604 break;
605 }
606
607 ContextChangeEventMultiplexer::NotifyContextChange(mpBase, eContext);
608}
609
610
611
612
564ViewShellBase* DrawController::GetViewShellBase (void)
565{
566 return mpBase;
567}
568
569
570
571

--- 363 unchanged lines hidden ---
613ViewShellBase* DrawController::GetViewShellBase (void)
614{
615 return mpBase;
616}
617
618
619
620

--- 363 unchanged lines hidden ---