diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-04 16:11:26 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-04 20:58:12 +0100 |
commit | 9b0bc61f4bcba6d5716e9c3717cda5c682cf5965 (patch) | |
tree | 67a0acbcc3d01f78f1ed8ebdb2a9882fb458f46e /sd/source/ui/sidebar | |
parent | b4993358c89f4c43fe65aeeb2a8adff4d1e04fed (diff) |
drop newly unused PanelBase
Change-Id: I5e84823fd25508c953dbe98c9d63e2333b4d6f82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111974
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/source/ui/sidebar')
-rw-r--r-- | sd/source/ui/sidebar/PanelBase.cxx | 85 | ||||
-rw-r--r-- | sd/source/ui/sidebar/PanelBase.hxx | 69 |
2 files changed, 0 insertions, 154 deletions
diff --git a/sd/source/ui/sidebar/PanelBase.cxx b/sd/source/ui/sidebar/PanelBase.cxx deleted file mode 100644 index 70a20ea4e017..000000000000 --- a/sd/source/ui/sidebar/PanelBase.cxx +++ /dev/null @@ -1,85 +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 "PanelBase.hxx" - -namespace sd::sidebar { - -PanelBase::PanelBase ( - vcl::Window* pParentWindow, - ViewShellBase& rViewShellBase) - : Control(pParentWindow), - mpWrappedControl(nullptr), - mrViewShellBase(rViewShellBase) -{ -#ifdef DEBUG - SetText(OUString("sd:PanelBase")); -#endif -} - -PanelBase::~PanelBase() -{ - disposeOnce(); -} - -void PanelBase::dispose() -{ - mpWrappedControl.disposeAndClear(); - Control::dispose(); -} - -css::ui::LayoutSize PanelBase::GetHeightForWidth (const sal_Int32 /*nWidth*/) -{ - sal_Int32 nHeight (0); - if (ProvideWrappedControl()) - nHeight = mpWrappedControl->GetSizePixel().Height(); - return css::ui::LayoutSize(nHeight,nHeight,nHeight); -} - -void PanelBase::Resize() -{ - if (ProvideWrappedControl()) - { - Size aNewSize (GetSizePixel()); - mpWrappedControl->SetOutputSizePixel(aNewSize); - } -} - -bool PanelBase::ProvideWrappedControl() -{ - if ( ! mpWrappedControl) - { - mpWrappedControl.reset(CreateWrappedControl(this, mrViewShellBase)); - if (mpWrappedControl) - mpWrappedControl->Show(); - } - return bool(mpWrappedControl); -} - -ISidebarReceiver::~ISidebarReceiver() -{ -} - -IDisposable::~IDisposable() -{ -} - -} // end of namespace sd::sidebar - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/sidebar/PanelBase.hxx b/sd/source/ui/sidebar/PanelBase.hxx deleted file mode 100644 index 835dc74bda4d..000000000000 --- a/sd/source/ui/sidebar/PanelBase.hxx +++ /dev/null @@ -1,69 +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 . - */ -#ifndef INCLUDED_SD_SOURCE_UI_SIDEBAR_PANELBASE_HXX -#define INCLUDED_SD_SOURCE_UI_SIDEBAR_PANELBASE_HXX - -#include "IDisposable.hxx" -#include "ISidebarReceiver.hxx" -#include <sfx2/sidebar/ILayoutableWindow.hxx> - -#include <vcl/ctrl.hxx> - - -namespace sd { - class ViewShellBase; -} - -namespace sd::sidebar { - -class PanelBase - : public Control, - public sfx2::sidebar::ILayoutableWindow, - public IDisposable, - public ISidebarReceiver -{ -public: - PanelBase ( - vcl::Window* pParentWindow, - ViewShellBase& rViewShellBase); - virtual ~PanelBase() override; - virtual void dispose() override; - - virtual void Resize() override; - - // ILayoutableWindow - virtual css::ui::LayoutSize GetHeightForWidth (const sal_Int32 nWidth) override; - -protected: - VclPtr<vcl::Window> mpWrappedControl; - virtual vcl::Window* CreateWrappedControl ( - vcl::Window* pParentWindow, - ViewShellBase& rViewShellBase) = 0; - -private: - ViewShellBase& mrViewShellBase; - - bool ProvideWrappedControl(); -}; - -} // end of namespace sd::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |