From 5d812cae7eacccb7819a46ae45c577295db9f190 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 4 Oct 2016 15:39:09 +0100 Subject: These are just floating windows, no need for all the special intrastructure get rid of the roundabout way that these popups are popup controllers (of a kind) for real popups for the moment keeping them as loaded from resources Change-Id: I083e8609ab133e3dc4a036daf8bfb44c08a6719f --- .../ui/sidebar/CellAppearancePropertyPanel.cxx | 74 +++++----------------- .../ui/sidebar/CellAppearancePropertyPanel.hxx | 63 ++++++++++++++---- sc/source/ui/sidebar/CellBorderStyleControl.cxx | 26 ++++---- sc/source/ui/sidebar/CellBorderStyleControl.hxx | 12 ++-- sc/source/ui/sidebar/CellBorderStylePopup.cxx | 38 ----------- sc/source/ui/sidebar/CellBorderStylePopup.hxx | 41 ------------ sc/source/ui/sidebar/CellLineStyleControl.cxx | 20 +++--- sc/source/ui/sidebar/CellLineStyleControl.hxx | 8 ++- sc/source/ui/sidebar/CellLineStylePopup.cxx | 50 --------------- sc/source/ui/sidebar/CellLineStylePopup.hxx | 43 ------------- 10 files changed, 101 insertions(+), 274 deletions(-) delete mode 100644 sc/source/ui/sidebar/CellBorderStylePopup.cxx delete mode 100644 sc/source/ui/sidebar/CellBorderStylePopup.hxx delete mode 100644 sc/source/ui/sidebar/CellLineStylePopup.cxx delete mode 100644 sc/source/ui/sidebar/CellLineStylePopup.hxx (limited to 'sc/source/ui/sidebar') diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx index 3cc6e4f47701..74fdafdba32a 100644 --- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx +++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx @@ -35,10 +35,8 @@ #include #include #include "CellLineStyleControl.hxx" -#include "CellLineStylePopup.hxx" #include "CellBorderUpdater.hxx" #include "CellBorderStyleControl.hxx" -#include "CellBorderStylePopup.hxx" using namespace css; using namespace css::uno; @@ -50,32 +48,6 @@ const char UNO_LINESTYLE[] = ".uno:LineStyle"; namespace sc { namespace sidebar { -Control* CellAppearancePropertyPanel::CreateCellLineStylePopupControl(svx::sidebar::PopupContainer* pParent) -{ - return VclPtr::Create(pParent, *this); -} - -void CellAppearancePropertyPanel::EndCellLineStylePopupMode() -{ - if(mpCellLineStylePopup.get()) - { - mpCellLineStylePopup->Hide(); - } -} - -Control* CellAppearancePropertyPanel::CreateCellBorderStylePopupControl(svx::sidebar::PopupContainer* pParent) -{ - return VclPtr::Create(pParent, *this); -} - -void CellAppearancePropertyPanel::EndCellBorderStylePopupMode() -{ - if(mpCellBorderStylePopup.get()) - { - mpCellBorderStylePopup->Hide(); - } -} - CellAppearancePropertyPanel::CellAppearancePropertyPanel( vcl::Window* pParent, const css::uno::Reference& rxFrame, @@ -121,8 +93,8 @@ CellAppearancePropertyPanel::CellAppearancePropertyPanel( mbTLBR(false), mbBLTR(false), - mpCellLineStylePopup(), - mpCellBorderStylePopup(), + mxCellLineStylePopup(), + mxCellBorderStylePopup(), maContext(), mpBindings(pBindings) @@ -148,6 +120,8 @@ void CellAppearancePropertyPanel::dispose() mpTBLineStyle.clear(); mpTBLineColor.clear(); + mxCellBorderStylePopup.disposeAndClear(); + mxCellLineStylePopup.disposeAndClear(); maLineStyleControl.dispose(); maBorderOuterControl.dispose(); maBorderInnerControl.dispose(); @@ -182,21 +156,12 @@ IMPL_LINK_TYPED(CellAppearancePropertyPanel, TbxCellBorderSelectHdl, ToolBox*, p { const OUString aCommand(pToolBox->GetItemCommand(pToolBox->GetCurItemId())); - if(aCommand == UNO_SETBORDERSTYLE) + if (aCommand == UNO_SETBORDERSTYLE) { - // create popup on demand - if(!mpCellBorderStylePopup.get()) - { - mpCellBorderStylePopup.reset( - new CellBorderStylePopup( - this, - [this] (svx::sidebar::PopupContainer* pParent) { return this->CreateCellBorderStylePopupControl(pParent); } )); - } - - if(mpCellBorderStylePopup.get()) - { - mpCellBorderStylePopup->Show(*pToolBox); - } + if (!mxCellBorderStylePopup) + mxCellBorderStylePopup = VclPtr::Create(pToolBox, GetBindings()->GetDispatcher()); + mxCellBorderStylePopup->StartPopupMode(pToolBox, FloatWinPopupFlags::Down | + FloatWinPopupFlags::NoAppFocusClose); } } @@ -204,22 +169,13 @@ IMPL_LINK_TYPED(CellAppearancePropertyPanel, TbxLineStyleSelectHdl, ToolBox*, pT { const OUString aCommand(pToolBox->GetItemCommand(pToolBox->GetCurItemId())); - if(aCommand == UNO_LINESTYLE) + if (aCommand == UNO_LINESTYLE) { - // create popup on demand - if(!mpCellLineStylePopup.get()) - { - mpCellLineStylePopup.reset( - new CellLineStylePopup( - this, - [this] (svx::sidebar::PopupContainer* pParent) { return this->CreateCellLineStylePopupControl(pParent); } )); - } - - if(mpCellLineStylePopup.get()) - { - mpCellLineStylePopup->SetLineStyleSelect(mnOut, mnIn, mnDis); - mpCellLineStylePopup->Show(*pToolBox); - } + if (!mxCellLineStylePopup) + mxCellLineStylePopup = VclPtr::Create(pToolBox, GetBindings()->GetDispatcher()); + mxCellLineStylePopup->SetLineStyleSelect(mnOut, mnIn, mnDis); + mxCellLineStylePopup->StartPopupMode(pToolBox, FloatWinPopupFlags::Down | + FloatWinPopupFlags::NoAppFocusClose); } } diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx index 1e6dfcf5229f..a6cfcb0ae66b 100644 --- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx +++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx @@ -22,6 +22,9 @@ #include #include #include +#include +#include "CellBorderStyleControl.hxx" +#include "CellLineStyleControl.hxx" #include class FixedText; @@ -29,8 +32,6 @@ namespace svx { namespace sidebar { class PopupContainer; }} namespace sc { namespace sidebar { - class CellLineStylePopup; - class CellBorderStylePopup; class CellLineStyleControl; class CellBorderUpdater; }} @@ -39,6 +40,52 @@ class CheckBox; namespace sc { namespace sidebar { +class CellBorderStylePopup : public FloatingWindow +{ + VclPtr m_xControl; +public: + CellBorderStylePopup(vcl::Window* pParent, SfxDispatcher* pDispatcher) + : FloatingWindow(pParent, WB_BORDER | WB_SYSTEMWINDOW) + , m_xControl(VclPtr::Create(this, pDispatcher)) + { + SetSizePixel(m_xControl->GetOutputSizePixel()); + } + virtual ~CellBorderStylePopup() override + { + disposeOnce(); + } + virtual void dispose() override + { + m_xControl.disposeAndClear(); + FloatingWindow::dispose(); + } +}; + +class CellLineStylePopup : public FloatingWindow +{ + VclPtr m_xControl; +public: + CellLineStylePopup(vcl::Window* pParent, SfxDispatcher* pDispatcher) + : FloatingWindow(pParent, WB_BORDER | WB_SYSTEMWINDOW) + , m_xControl(VclPtr::Create(this, pDispatcher)) + { + SetSizePixel(m_xControl->GetOutputSizePixel()); + } + void SetLineStyleSelect(sal_uInt16 out, sal_uInt16 in, sal_uInt16 dis) + { + m_xControl->SetLineStyleSelect(out, in, dis); + } + virtual ~CellLineStylePopup() override + { + disposeOnce(); + } + virtual void dispose() override + { + m_xControl.disposeAndClear(); + FloatingWindow::dispose(); + } +}; + class CellAppearancePropertyPanel : public PanelLayout, public ::sfx2::sidebar::IContextChangeReceiver, @@ -131,8 +178,8 @@ private: bool mbBLTR : 1; // popups - std::unique_ptr< CellLineStylePopup > mpCellLineStylePopup; - std::unique_ptr< CellBorderStylePopup > mpCellBorderStylePopup; + VclPtr mxCellLineStylePopup; + VclPtr mxCellBorderStylePopup; vcl::EnumContext maContext; SfxBindings* mpBindings; @@ -140,14 +187,6 @@ private: DECL_LINK_TYPED(TbxCellBorderSelectHdl, ToolBox*, void); DECL_LINK_TYPED(TbxLineStyleSelectHdl, ToolBox*, void); - // for CellLineStyle popup - Control* CreateCellLineStylePopupControl(svx::sidebar::PopupContainer* pParent); - void EndCellLineStylePopupMode(); - - // for CellBorderStyle popup - Control* CreateCellBorderStylePopupControl(svx::sidebar::PopupContainer* pParent); - void EndCellBorderStylePopupMode(); - void Initialize(); void SetStyleIcon(); void UpdateControlState(); diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.cxx b/sc/source/ui/sidebar/CellBorderStyleControl.cxx index 47a60cc15d51..1c505d957fea 100644 --- a/sc/source/ui/sidebar/CellBorderStyleControl.cxx +++ b/sc/source/ui/sidebar/CellBorderStyleControl.cxx @@ -42,9 +42,10 @@ namespace sc { namespace sidebar { #define FRM_VALID_OUTER 0x0f #define FRM_VALID_ALL 0xff -CellBorderStyleControl::CellBorderStyleControl(vcl::Window* pParent, CellAppearancePropertyPanel& rPanel) +CellBorderStyleControl::CellBorderStyleControl(FloatingWindow* pParent, SfxDispatcher* pDispatcher) : Control(pParent, ScResId(RID_POPUPPANEL_APPEARANCE_CELL_BORDERSTYLE)), - mrCellAppearancePropertyPanel(rPanel), + mpDispatcher(pDispatcher), + mxFloatParent(pParent), maTBBorder1(VclPtr::Create(this, ScResId(TB_BORDER1))), maTBBorder2(VclPtr::Create(this, ScResId(TB_BORDER2))), maTBBorder3(VclPtr::Create(this, ScResId(TB_BORDER3))), @@ -69,6 +70,7 @@ void CellBorderStyleControl::dispose() maTBBorder3.disposeAndClear(); maFL1.disposeAndClear(); maFL2.disposeAndClear(); + mxFloatParent.clear(); Control::dispose(); } @@ -162,9 +164,9 @@ IMPL_LINK_TYPED(CellBorderStyleControl, TB1SelectHdl, ToolBox*, pToolBox, void) SvxLineItem aLineItem2( SID_ATTR_BORDER_DIAG_TLBR ); aLineItem1.SetLine( nullptr ); //modify aLineItem2.SetLine( nullptr ); //modify - mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->ExecuteList( + mpDispatcher->ExecuteList( SID_ATTR_BORDER_DIAG_BLTR, SfxCallMode::RECORD, { &aLineItem1 }); - mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->ExecuteList( + mpDispatcher->ExecuteList( SID_ATTR_BORDER_DIAG_TLBR, SfxCallMode::RECORD, { &aLineItem2 }); } break; @@ -199,9 +201,9 @@ IMPL_LINK_TYPED(CellBorderStyleControl, TB1SelectHdl, ToolBox*, pToolBox, void) aBorderInner.SetValid( SvxBoxInfoItemValidFlags::DISTANCE ); aBorderInner.SetValid( SvxBoxInfoItemValidFlags::DISABLE, false ); - mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->ExecuteList( + mpDispatcher->ExecuteList( SID_ATTR_BORDER, SfxCallMode::RECORD, { &aBorderOuter, &aBorderInner }); - mrCellAppearancePropertyPanel.EndCellBorderStylePopupMode(); + mxFloatParent->EndPopupMode(); } IMPL_LINK_TYPED(CellBorderStyleControl, TB2SelectHdl, ToolBox *, pToolBox, void) @@ -268,7 +270,7 @@ IMPL_LINK_TYPED(CellBorderStyleControl, TB2SelectHdl, ToolBox *, pToolBox, void) aBorderInner.SetValid( SvxBoxInfoItemValidFlags::DISTANCE ); aBorderInner.SetValid( SvxBoxInfoItemValidFlags::DISABLE, false ); - mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->ExecuteList( + mpDispatcher->ExecuteList( SID_ATTR_BORDER, SfxCallMode::RECORD, { &aBorderOuter, &aBorderInner}); } else if(nId == TBI_BORDER2_BLTR) @@ -276,7 +278,7 @@ IMPL_LINK_TYPED(CellBorderStyleControl, TB2SelectHdl, ToolBox *, pToolBox, void) editeng::SvxBorderLine aTmp( nullptr, 1 ); SvxLineItem aLineItem( SID_ATTR_BORDER_DIAG_BLTR ); aLineItem.SetLine( &aTmp ); - mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->ExecuteList( + mpDispatcher->ExecuteList( SID_ATTR_BORDER_DIAG_BLTR, SfxCallMode::RECORD, { &aLineItem }); } else if(nId == TBI_BORDER2_TLBR) @@ -284,11 +286,11 @@ IMPL_LINK_TYPED(CellBorderStyleControl, TB2SelectHdl, ToolBox *, pToolBox, void) editeng::SvxBorderLine aTmp( nullptr, 1 ); SvxLineItem aLineItem( SID_ATTR_BORDER_DIAG_TLBR ); aLineItem.SetLine( &aTmp ); - mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->ExecuteList( + mpDispatcher->ExecuteList( SID_ATTR_BORDER_DIAG_TLBR, SfxCallMode::RECORD, { &aLineItem }); } - mrCellAppearancePropertyPanel.EndCellBorderStylePopupMode(); + mxFloatParent->EndPopupMode(); } IMPL_LINK_TYPED(CellBorderStyleControl, TB3SelectHdl, ToolBox *, pToolBox, void) @@ -342,13 +344,13 @@ IMPL_LINK_TYPED(CellBorderStyleControl, TB3SelectHdl, ToolBox *, pToolBox, void) aBorderInner.SetValid( SvxBoxInfoItemValidFlags::DISTANCE ); aBorderInner.SetValid( SvxBoxInfoItemValidFlags::DISABLE, false ); - mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->ExecuteList( + mpDispatcher->ExecuteList( SID_ATTR_BORDER, SfxCallMode::RECORD, { &aBorderOuter, &aBorderInner }); pTop.reset(); pBottom.reset(); - mrCellAppearancePropertyPanel.EndCellBorderStylePopupMode(); + mxFloatParent->EndPopupMode(); } } } // end of namespace svx::sidebar diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.hxx b/sc/source/ui/sidebar/CellBorderStyleControl.hxx index 38c2710ec2cc..bc37be4880e2 100644 --- a/sc/source/ui/sidebar/CellBorderStyleControl.hxx +++ b/sc/source/ui/sidebar/CellBorderStyleControl.hxx @@ -20,17 +20,19 @@ #define INCLUDED_SC_SOURCE_UI_SIDEBAR_CELLBORDERSTYLECONTROL_HXX #include -#include #include +#include +#include -namespace sc { namespace sidebar { +class SfxDispatcher; -class CellAppearancePropertyPanel; +namespace sc { namespace sidebar { class CellBorderStyleControl : public Control { private: - CellAppearancePropertyPanel& mrCellAppearancePropertyPanel; + SfxDispatcher* mpDispatcher; + VclPtr mxFloatParent; VclPtr maTBBorder1; VclPtr maTBBorder2; VclPtr maTBBorder3; @@ -45,7 +47,7 @@ private: DECL_LINK_TYPED(TB3SelectHdl, ToolBox *, void); public: - CellBorderStyleControl(vcl::Window* pParent, CellAppearancePropertyPanel& rPanel); + CellBorderStyleControl(FloatingWindow* pParent, SfxDispatcher* pDispatcher); virtual ~CellBorderStyleControl() override; virtual void dispose() override; }; diff --git a/sc/source/ui/sidebar/CellBorderStylePopup.cxx b/sc/source/ui/sidebar/CellBorderStylePopup.cxx deleted file mode 100644 index 7b5e8712febd..000000000000 --- a/sc/source/ui/sidebar/CellBorderStylePopup.cxx +++ /dev/null @@ -1,38 +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 "CellBorderStylePopup.hxx" -#include "CellLineStyleControl.hxx" - -namespace sc { namespace sidebar { - -CellBorderStylePopup::CellBorderStylePopup ( - vcl::Window* pParent, - const ::std::function& rControlCreator) -: Popup(pParent, rControlCreator, ::OUString("CellBorderStyle")) -{ -} - -CellBorderStylePopup::~CellBorderStylePopup() -{ -} - -} } // end of namespace sc::sidebar - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/sidebar/CellBorderStylePopup.hxx b/sc/source/ui/sidebar/CellBorderStylePopup.hxx deleted file mode 100644 index 17909b7ea373..000000000000 --- a/sc/source/ui/sidebar/CellBorderStylePopup.hxx +++ /dev/null @@ -1,41 +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_SC_SOURCE_UI_SIDEBAR_CELLBORDERSTYLEPOPUP_HXX -#define INCLUDED_SC_SOURCE_UI_SIDEBAR_CELLBORDERSTYLEPOPUP_HXX - -#include - -#include - -namespace sc { namespace sidebar { - -class CellBorderStylePopup : public svx::sidebar::Popup -{ -public: - CellBorderStylePopup( - vcl::Window* pParent, - const ::std::function& rControlCreator); - virtual ~CellBorderStylePopup() override; -}; - -} } // end of namespace sc::sidebar - -#endif // INCLUDED_SC_SOURCE_UI_SIDEBAR_CELLBORDERSTYLEPOPUP_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/sidebar/CellLineStyleControl.cxx b/sc/source/ui/sidebar/CellLineStyleControl.cxx index d383adee797b..6de614d9c736 100644 --- a/sc/source/ui/sidebar/CellLineStyleControl.cxx +++ b/sc/source/ui/sidebar/CellLineStyleControl.cxx @@ -33,9 +33,10 @@ namespace sc { namespace sidebar { -CellLineStyleControl::CellLineStyleControl(vcl::Window* pParent, CellAppearancePropertyPanel& rPanel) +CellLineStyleControl::CellLineStyleControl(FloatingWindow* pParent, SfxDispatcher* pDispatcher) : Control(pParent, ScResId(RID_POPUPPANEL_APPEARANCE_CELL_LINESTYLE)), - mrCellAppearancePropertyPanel(rPanel), + mpDispatcher(pDispatcher), + mxFloatParent(pParent), maPushButtonMoreOptions(VclPtr::Create(this, ScResId(PB_OPTIONS))), maCellLineStyleValueSet(VclPtr::Create(this, ScResId(VS_STYLE))), mbVSfocus(true) @@ -53,6 +54,7 @@ void CellLineStyleControl::dispose() { maPushButtonMoreOptions.disposeAndClear(); maCellLineStyleValueSet.disposeAndClear(); + mxFloatParent.clear(); Control::dispose(); } @@ -176,23 +178,19 @@ IMPL_LINK_TYPED(CellLineStyleControl, VSSelectHdl, ValueSet*, pControl, void) editeng::SvxBorderLine aTmp; aTmp.GuessLinesWidths(nStyle, n1, n2, n3); aLineItem.SetLine( &aTmp ); - mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->ExecuteList( + mpDispatcher->ExecuteList( SID_FRAME_LINESTYLE, SfxCallMode::RECORD, { &aLineItem }); SetAllNoSel(); - mrCellAppearancePropertyPanel.EndCellLineStylePopupMode(); + mxFloatParent->EndPopupMode(); } } IMPL_LINK_TYPED(CellLineStyleControl, PBClickHdl, Button *, pPBtn, void) { - if(pPBtn == maPushButtonMoreOptions.get()) + if (pPBtn == maPushButtonMoreOptions.get()) { - if(mrCellAppearancePropertyPanel.GetBindings()) - { - mrCellAppearancePropertyPanel.GetBindings()->GetDispatcher()->Execute(SID_CELL_FORMAT_BORDER, SfxCallMode::ASYNCHRON); - } - - mrCellAppearancePropertyPanel.EndCellLineStylePopupMode(); + mpDispatcher->Execute(SID_CELL_FORMAT_BORDER, SfxCallMode::ASYNCHRON); + mxFloatParent->EndPopupMode(); } } diff --git a/sc/source/ui/sidebar/CellLineStyleControl.hxx b/sc/source/ui/sidebar/CellLineStyleControl.hxx index 9e98e686a558..bad5780810a7 100644 --- a/sc/source/ui/sidebar/CellLineStyleControl.hxx +++ b/sc/source/ui/sidebar/CellLineStyleControl.hxx @@ -22,14 +22,16 @@ #include #include "CellLineStyleValueSet.hxx" +class SfxDispatcher; + namespace sc { namespace sidebar { class CellAppearancePropertyPanel; - class CellLineStyleControl : public Control { private: - CellAppearancePropertyPanel& mrCellAppearancePropertyPanel; + SfxDispatcher* mpDispatcher; + VclPtr mxFloatParent; VclPtr maPushButtonMoreOptions; VclPtr maCellLineStyleValueSet; OUString maStr[CELL_LINE_STYLE_ENTRIES]; @@ -43,7 +45,7 @@ private: DECL_LINK_TYPED(PBClickHdl, Button*, void); public: - CellLineStyleControl(vcl::Window* pParent, CellAppearancePropertyPanel& rPanel); + CellLineStyleControl(FloatingWindow* pParent, SfxDispatcher* pDispatcher); virtual ~CellLineStyleControl() override; virtual void dispose() override; diff --git a/sc/source/ui/sidebar/CellLineStylePopup.cxx b/sc/source/ui/sidebar/CellLineStylePopup.cxx deleted file mode 100644 index 363029bf1037..000000000000 --- a/sc/source/ui/sidebar/CellLineStylePopup.cxx +++ /dev/null @@ -1,50 +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 "CellLineStylePopup.hxx" -#include "CellLineStyleControl.hxx" - -namespace sc { namespace sidebar { - -CellLineStylePopup::CellLineStylePopup ( - vcl::Window* pParent, - const ::std::function& rControlCreator) -: Popup(pParent, rControlCreator, OUString("CellLineStyle")) -{ -} - -CellLineStylePopup::~CellLineStylePopup() -{ -} - -void CellLineStylePopup::SetLineStyleSelect(sal_uInt16 out, sal_uInt16 in, sal_uInt16 dis) -{ - ProvideContainerAndControl(); - - CellLineStyleControl* pControl = dynamic_cast< CellLineStyleControl* >(mxControl.get()); - - if(pControl) - { - pControl->SetLineStyleSelect(out, in, dis); - } -} - -} } // end of namespace sc::sidebar - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/sidebar/CellLineStylePopup.hxx b/sc/source/ui/sidebar/CellLineStylePopup.hxx deleted file mode 100644 index d72128c29462..000000000000 --- a/sc/source/ui/sidebar/CellLineStylePopup.hxx +++ /dev/null @@ -1,43 +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_SC_SOURCE_UI_SIDEBAR_CELLLINESTYLEPOPUP_HXX -#define INCLUDED_SC_SOURCE_UI_SIDEBAR_CELLLINESTYLEPOPUP_HXX - -#include - -#include - -namespace sc { namespace sidebar { - -class CellLineStylePopup : public svx::sidebar::Popup -{ -public: - CellLineStylePopup( - vcl::Window* pParent, - const ::std::function& rControlCreator); - virtual ~CellLineStylePopup() override; - - void SetLineStyleSelect(sal_uInt16 out, sal_uInt16 in, sal_uInt16 dis); -}; - -} } // end of namespace sc::sidebar - -#endif // INCLUDED_SC_SOURCE_UI_SIDEBAR_CELLLINESTYLEPOPUP_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3