summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-01-20 18:33:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-01-20 19:22:26 +0000
commitcb32938d572777c9a5d75007cc76ba50c5a698eb (patch)
treeeeab9909e3da6015a51af5f22b4953f776b33260 /sd/source/ui
parent4a72caaae9534cd229186fd952603a4ef736ef45 (diff)
[API CHANGE] remove unused SlideSorterService
which was introduced in commit 8c4d7aa42dd4b3b08c3b4a9e4ba772737b7bd0c4 Author: Kurt Zenker <kz@openoffice.org> Date: Thu Apr 3 13:42:43 2008 +0000 INTEGRATION: CWS presenterview (1.1.2); FILE ADDED but does not appear to have ever been actually used. Change-Id: Icd33f81cfee246fe72a4b9e584f7a6ca96d6e38b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/slidesorter/shell/SlideSorterService.cxx411
-rw-r--r--sd/source/ui/slidesorter/shell/SlideSorterService.hxx153
2 files changed, 0 insertions, 564 deletions
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
deleted file mode 100644
index fa65cba421b4..000000000000
--- a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
+++ /dev/null
@@ -1,411 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "SlideSorterService.hxx"
-#include <SlideSorter.hxx>
-#include <controller/SlideSorterController.hxx>
-#include <controller/SlsProperties.hxx>
-#include <controller/SlsCurrentSlideManager.hxx>
-#include <model/SlideSorterModel.hxx>
-#include <model/SlsPageDescriptor.hxx>
-#include <view/SlideSorterView.hxx>
-#include <view/SlsLayouter.hxx>
-#include <DrawController.hxx>
-
-#include <comphelper/servicehelper.hxx>
-#include <toolkit/helper/vclunohelper.hxx>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::drawing::framework;
-using ::sd::slidesorter::view::Layouter;
-
-namespace sd::slidesorter {
-
-//===== SlideSorterService ==========================================================
-
-SlideSorterService::SlideSorterService()
-{
-}
-
-SlideSorterService::~SlideSorterService()
-{
-}
-
-void SlideSorterService::disposing(std::unique_lock<std::mutex>&)
-{
- mpSlideSorter.reset();
-
- if (mxParentWindow.is())
- {
- mxParentWindow->removeWindowListener(this);
- }
-}
-
-//----- XInitialization -------------------------------------------------------
-
-void SAL_CALL SlideSorterService::initialize (const Sequence<Any>& rArguments)
-{
- ThrowIfDisposed();
-
- if (rArguments.getLength() != 3)
- {
- throw RuntimeException("SlideSorterService: invalid number of arguments",
- static_cast<drawing::XDrawView*>(this));
- }
-
- mxViewId.set(rArguments[0], UNO_QUERY_THROW);
-
- // Get the XController.
- Reference<frame::XController> xController (rArguments[1], UNO_QUERY_THROW);
-
- // Tunnel through the controller to obtain a ViewShellBase.
- ViewShellBase* pBase = nullptr;
- ::sd::DrawController* pController = dynamic_cast<sd::DrawController*>(xController.get());
- if (pController != nullptr)
- pBase = pController->GetViewShellBase();
-
- // Get the parent window.
- mxParentWindow.set(rArguments[2], UNO_QUERY_THROW);
- VclPtr<vcl::Window> pParentWindow = VCLUnoHelper::GetWindow(mxParentWindow);
-
- mxParentWindow->addWindowListener(this);
-
- if (pBase != nullptr && pParentWindow)
- mpSlideSorter = SlideSorter::CreateSlideSorter(
- *pBase,
- *pParentWindow);
-
- Resize();
-}
-
-//----- XView -----------------------------------------------------------------
-
-Reference<XResourceId> SAL_CALL SlideSorterService::getResourceId()
-{
- return mxViewId;
-}
-
-sal_Bool SAL_CALL SlideSorterService::isAnchorOnly()
-{
- return false;
-}
-
-//----- XWindowListener -------------------------------------------------------
-
-void SAL_CALL SlideSorterService::windowResized (const awt::WindowEvent&)
-{
- ThrowIfDisposed();
-
- Resize();
-}
-
-void SAL_CALL SlideSorterService::windowMoved (const awt::WindowEvent&) {}
-
-void SAL_CALL SlideSorterService::windowShown (const lang::EventObject&)
-{
- ThrowIfDisposed();
- Resize();
-}
-
-void SAL_CALL SlideSorterService::windowHidden (const lang::EventObject&)
-{
- ThrowIfDisposed();
-}
-
-//----- lang::XEventListener --------------------------------------------------
-
-void SAL_CALL SlideSorterService::disposing (const lang::EventObject& rEvent)
-{
- if (rEvent.Source == mxParentWindow)
- mxParentWindow = nullptr;
-}
-
-//----- XDrawView -------------------------------------------------------------
-
-void SAL_CALL SlideSorterService::setCurrentPage(const Reference<drawing::XDrawPage>& rxSlide)
-{
- ThrowIfDisposed();
- if (mpSlideSorter != nullptr)
- mpSlideSorter->GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange(
- mpSlideSorter->GetModel().GetIndex(rxSlide));
-}
-
-Reference<drawing::XDrawPage> SAL_CALL SlideSorterService::getCurrentPage()
-{
- ThrowIfDisposed();
- if (mpSlideSorter != nullptr)
- return mpSlideSorter->GetController().GetCurrentSlideManager()->GetCurrentSlide()->GetXDrawPage();
- else
- return nullptr;
-}
-
-//----- attributes ------------------------------------------------------------
-
-Reference<container::XIndexAccess> SAL_CALL SlideSorterService::getDocumentSlides()
-{
- return mpSlideSorter->GetModel().GetDocumentSlides();
-}
-
-void SAL_CALL SlideSorterService::setDocumentSlides (
- const Reference<container::XIndexAccess >& rxSlides)
-{
- ThrowIfDisposed();
- if (mpSlideSorter != nullptr && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().SetDocumentSlides(rxSlides);
-}
-
-sal_Bool SAL_CALL SlideSorterService::getIsHighlightCurrentSlide()
-{
- ThrowIfDisposed();
- if (mpSlideSorter == nullptr || !mpSlideSorter->IsValid())
- return false;
- else
- return mpSlideSorter->GetProperties()->IsHighlightCurrentSlide();
-}
-
-void SAL_CALL SlideSorterService::setIsHighlightCurrentSlide (sal_Bool bValue)
-{
- ThrowIfDisposed();
- if (mpSlideSorter != nullptr && mpSlideSorter->IsValid())
- {
- mpSlideSorter->GetProperties()->SetHighlightCurrentSlide(bValue);
- controller::SlideSorterController::ModelChangeLock aLock (mpSlideSorter->GetController());
- mpSlideSorter->GetController().HandleModelChange();
- }
-}
-
-sal_Bool SAL_CALL SlideSorterService::getIsShowSelection()
-{
- ThrowIfDisposed();
- if (mpSlideSorter == nullptr || !mpSlideSorter->IsValid())
- return false;
- else
- return mpSlideSorter->GetProperties()->IsShowSelection();
-}
-
-void SAL_CALL SlideSorterService::setIsShowSelection (sal_Bool bValue)
-{
- ThrowIfDisposed();
- if (mpSlideSorter != nullptr && mpSlideSorter->IsValid())
- mpSlideSorter->GetProperties()->SetShowSelection(bValue);
-}
-
-sal_Bool SAL_CALL SlideSorterService::getIsShowFocus()
-{
- ThrowIfDisposed();
- if (mpSlideSorter == nullptr || !mpSlideSorter->IsValid())
- return false;
- else
- return mpSlideSorter->GetProperties()->IsShowFocus();
-}
-
-void SAL_CALL SlideSorterService::setIsShowFocus (sal_Bool bValue)
-{
- ThrowIfDisposed();
- if (mpSlideSorter != nullptr && mpSlideSorter->IsValid())
- mpSlideSorter->GetProperties()->SetShowFocus(bValue);
-}
-
-sal_Bool SAL_CALL SlideSorterService::getIsCenterSelection()
-{
- ThrowIfDisposed();
- if (mpSlideSorter == nullptr || !mpSlideSorter->IsValid())
- return false;
- else
- return mpSlideSorter->GetProperties()->IsCenterSelection();
-}
-
-void SAL_CALL SlideSorterService::setIsCenterSelection (sal_Bool bValue)
-{
- ThrowIfDisposed();
- if (mpSlideSorter != nullptr && mpSlideSorter->IsValid())
- mpSlideSorter->GetProperties()->SetCenterSelection(bValue);
-}
-
-sal_Bool SAL_CALL SlideSorterService::getIsSuspendPreviewUpdatesDuringFullScreenPresentation()
-{
- ThrowIfDisposed();
- if (mpSlideSorter == nullptr || !mpSlideSorter->IsValid())
- return true;
- else
- return mpSlideSorter->GetProperties()
- ->IsSuspendPreviewUpdatesDuringFullScreenPresentation();
-}
-
-void SAL_CALL SlideSorterService::setIsSuspendPreviewUpdatesDuringFullScreenPresentation (
- sal_Bool bValue)
-{
- ThrowIfDisposed();
- if (mpSlideSorter != nullptr && mpSlideSorter->IsValid())
- mpSlideSorter->GetProperties()
- ->SetSuspendPreviewUpdatesDuringFullScreenPresentation(bValue);
-}
-
-sal_Bool SAL_CALL SlideSorterService::getIsOrientationVertical()
-{
- ThrowIfDisposed();
- if (mpSlideSorter == nullptr || !mpSlideSorter->IsValid())
- return true;
- else
- return mpSlideSorter->GetView().GetOrientation() != Layouter::HORIZONTAL;
-}
-
-void SAL_CALL SlideSorterService::setIsOrientationVertical (sal_Bool bValue)
-{
- ThrowIfDisposed();
- if (mpSlideSorter != nullptr && mpSlideSorter->IsValid())
- mpSlideSorter->GetView().SetOrientation(bValue
- ? Layouter::GRID
- : Layouter::HORIZONTAL);
-}
-
-sal_Bool SAL_CALL SlideSorterService::getIsSmoothScrolling()
-{
- ThrowIfDisposed();
- if (mpSlideSorter == nullptr || !mpSlideSorter->IsValid())
- return false;
- else
- return mpSlideSorter->GetProperties()->IsSmoothSelectionScrolling();
-}
-
-void SAL_CALL SlideSorterService::setIsSmoothScrolling (sal_Bool bValue)
-{
- ThrowIfDisposed();
- if (mpSlideSorter != nullptr && mpSlideSorter->IsValid())
- mpSlideSorter->GetProperties()->SetSmoothSelectionScrolling(bValue);
-}
-
-sal_Int32 SAL_CALL SlideSorterService::getBackgroundColor()
-{
- ThrowIfDisposed();
- if (mpSlideSorter == nullptr || !mpSlideSorter->IsValid())
- return util::Color();
- else
- return util::Color(
- mpSlideSorter->GetProperties()->GetBackgroundColor());
-}
-
-void SAL_CALL SlideSorterService::setBackgroundColor (sal_Int32 aBackgroundColor)
-{
- ThrowIfDisposed();
- if (mpSlideSorter != nullptr && mpSlideSorter->IsValid())
- mpSlideSorter->GetProperties()->SetBackgroundColor(Color(ColorTransparency, aBackgroundColor));
-}
-
-sal_Int32 SAL_CALL SlideSorterService::getTextColor()
-{
- ThrowIfDisposed();
- if (mpSlideSorter == nullptr || !mpSlideSorter->IsValid())
- return util::Color();
- else
- return util::Color(
- mpSlideSorter->GetProperties()->GetTextColor());
-}
-
-void SAL_CALL SlideSorterService::setTextColor (sal_Int32 aTextColor)
-{
- ThrowIfDisposed();
- if (mpSlideSorter != nullptr && mpSlideSorter->IsValid())
- mpSlideSorter->GetProperties()->SetTextColor(Color(ColorTransparency, aTextColor));
-}
-
-sal_Int32 SAL_CALL SlideSorterService::getSelectionColor()
-{
- ThrowIfDisposed();
- if (mpSlideSorter == nullptr || !mpSlideSorter->IsValid())
- return util::Color();
- else
- return util::Color(
- mpSlideSorter->GetProperties()->GetSelectionColor());
-}
-
-void SAL_CALL SlideSorterService::setSelectionColor (sal_Int32 aSelectionColor)
-{
- ThrowIfDisposed();
- if (mpSlideSorter != nullptr && mpSlideSorter->IsValid())
- mpSlideSorter->GetProperties()->SetSelectionColor(Color(ColorTransparency, aSelectionColor));
-}
-
-sal_Int32 SAL_CALL SlideSorterService::getHighlightColor()
-{
- ThrowIfDisposed();
- if (mpSlideSorter == nullptr || !mpSlideSorter->IsValid())
- return util::Color();
- else
- return util::Color(
- mpSlideSorter->GetProperties()->GetHighlightColor());
-}
-
-void SAL_CALL SlideSorterService::setHighlightColor (sal_Int32 aHighlightColor)
-{
- ThrowIfDisposed();
- if (mpSlideSorter != nullptr && mpSlideSorter->IsValid())
- mpSlideSorter->GetProperties()->SetHighlightColor(Color(ColorTransparency, aHighlightColor));
-}
-
-sal_Bool SAL_CALL SlideSorterService::getIsUIReadOnly()
-{
- ThrowIfDisposed();
- if (mpSlideSorter == nullptr || !mpSlideSorter->IsValid())
- return true;
- else
- return mpSlideSorter->GetProperties()->IsUIReadOnly();
-}
-
-void SAL_CALL SlideSorterService::setIsUIReadOnly (sal_Bool bIsUIReadOnly)
-{
- ThrowIfDisposed();
- if (mpSlideSorter != nullptr && mpSlideSorter->IsValid())
- mpSlideSorter->GetProperties()->SetUIReadOnly(bIsUIReadOnly);
-}
-
-void SlideSorterService::Resize()
-{
- if (mxParentWindow.is())
- {
- awt::Rectangle aWindowBox = mxParentWindow->getPosSize();
- mpSlideSorter->ArrangeGUIElements(
- Point(0,0),
- Size(aWindowBox.Width, aWindowBox.Height));
- }
-}
-
-void SlideSorterService::ThrowIfDisposed()
-{
- if (SlideSorterServiceInterfaceBase::m_bDisposed)
- {
- throw lang::DisposedException ("SlideSorterService object has already been disposed",
- static_cast<drawing::XDrawView*>(this));
- }
-}
-
-} // end of namespace ::sd::slidesorter
-
-
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
-com_sun_star_comp_Draw_SlideSorter_get_implementation(css::uno::XComponentContext* /*context*/,
- css::uno::Sequence<css::uno::Any> const &)
-{
- return cppu::acquire(new sd::slidesorter::SlideSorterService);
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterService.hxx b/sd/source/ui/slidesorter/shell/SlideSorterService.hxx
deleted file mode 100644
index 579a5bae5c33..000000000000
--- a/sd/source/ui/slidesorter/shell/SlideSorterService.hxx
+++ /dev/null
@@ -1,153 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#pragma once
-
-#include <com/sun/star/awt/XWindowListener.hpp>
-#include <com/sun/star/drawing/XSlideSorterBase.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <comphelper/compbase.hxx>
-#include <memory>
-
-namespace com::sun::star::awt { class XWindow; }
-
-namespace sd::slidesorter {
-
-typedef comphelper::WeakComponentImplHelper <
- css::drawing::XSlideSorterBase,
- css::lang::XInitialization,
- css::awt::XWindowListener
-> SlideSorterServiceInterfaceBase;
-
-class SlideSorter;
-
-/** Implementation of the com.sun.star.drawing.SlideSorter service.
-*/
-class SlideSorterService
- : public SlideSorterServiceInterfaceBase
-{
-public:
- explicit SlideSorterService();
- virtual ~SlideSorterService() override;
- SlideSorterService(const SlideSorterService&) = delete;
- SlideSorterService& operator=(const SlideSorterService&) = delete;
- virtual void disposing(std::unique_lock<std::mutex>&) override;
-
- // XInitialization
-
- virtual void SAL_CALL initialize (const css::uno::Sequence<css::uno::Any>& rArguments) override;
-
- // XResourceId
-
- css::uno::Reference<css::drawing::framework::XResourceId> SAL_CALL getResourceId() override;
-
- sal_Bool SAL_CALL isAnchorOnly() override;
-
- // XWindowListener
-
- virtual void SAL_CALL windowResized (const css::awt::WindowEvent& rEvent) override;
-
- virtual void SAL_CALL windowMoved (const css::awt::WindowEvent& rEvent) override;
-
- virtual void SAL_CALL windowShown (const css::lang::EventObject& rEvent) override;
-
- virtual void SAL_CALL windowHidden (const css::lang::EventObject& rEvent) override;
-
- // lang::XEventListener
- virtual void SAL_CALL disposing (const css::lang::EventObject& rEvent) override;
-
- // XDrawView
-
- virtual void SAL_CALL setCurrentPage(
- const css::uno::Reference<css::drawing::XDrawPage>& rxSlide) override;
-
- virtual css::uno::Reference<css::drawing::XDrawPage> SAL_CALL getCurrentPage() override;
-
- // Attributes
-
- virtual css::uno::Reference<css::container::XIndexAccess> SAL_CALL getDocumentSlides() override;
-
- virtual void SAL_CALL setDocumentSlides (
- const css::uno::Reference<css::container::XIndexAccess >& rxSlides) override;
-
- virtual sal_Bool SAL_CALL getIsHighlightCurrentSlide() override;
-
- virtual void SAL_CALL setIsHighlightCurrentSlide (sal_Bool bIsHighlightCurrentSlide) override;
-
- virtual sal_Bool SAL_CALL getIsShowSelection() override;
-
- virtual void SAL_CALL setIsShowSelection (sal_Bool bIsShowSelection) override;
-
- virtual sal_Bool SAL_CALL getIsCenterSelection() override;
-
- virtual void SAL_CALL setIsCenterSelection (sal_Bool bIsCenterSelection) override;
-
- virtual sal_Bool SAL_CALL getIsSuspendPreviewUpdatesDuringFullScreenPresentation() override;
-
- virtual void SAL_CALL setIsSuspendPreviewUpdatesDuringFullScreenPresentation (
- sal_Bool bIsSuspendPreviewUpdatesDuringFullScreenPresentation) override;
-
- virtual sal_Bool SAL_CALL getIsOrientationVertical() override;
-
- virtual void SAL_CALL setIsOrientationVertical (sal_Bool bIsOrientationVertical) override;
-
- virtual sal_Bool SAL_CALL getIsSmoothScrolling() override;
-
- virtual void SAL_CALL setIsSmoothScrolling (sal_Bool bIsOrientationVertical) override;
-
- virtual sal_Int32 SAL_CALL getBackgroundColor() override;
-
- virtual void SAL_CALL setBackgroundColor (sal_Int32 aBackgroundColor) override;
-
- virtual sal_Int32 SAL_CALL getTextColor() override;
-
- virtual void SAL_CALL setTextColor (sal_Int32 aTextColor) override;
-
- virtual sal_Int32 SAL_CALL getSelectionColor() override;
-
- virtual void SAL_CALL setSelectionColor (sal_Int32 aSelectionColor) override;
-
- virtual sal_Int32 SAL_CALL getHighlightColor() override;
-
- virtual void SAL_CALL setHighlightColor (sal_Int32 aHighlightColor) override;
-
- virtual sal_Bool SAL_CALL getIsUIReadOnly() override;
-
- virtual void SAL_CALL setIsUIReadOnly (sal_Bool bIsUIReadOnly) override;
-
- virtual sal_Bool SAL_CALL getIsShowFocus() override;
-
- virtual void SAL_CALL setIsShowFocus (sal_Bool bIsShowFocus) override;
-
-private:
- std::shared_ptr<SlideSorter> mpSlideSorter;
- css::uno::Reference<css::drawing::framework::XResourceId> mxViewId;
- css::uno::Reference<css::awt::XWindow> mxParentWindow;
-
- void Resize();
-
- /** @throws css::lang::DisposedException when the object has already been
- disposed.
- */
- void ThrowIfDisposed();
-};
-
-} // end of namespace ::sd::slidesorter
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */