[Libreoffice-commits] core.git: 3 commits - include/svx sc/Library_sc.mk sc/source sfx2/inc sfx2/source svx/inc svx/Library_svx.mk svx/source sw/source
Caolán McNamara
caolanm at redhat.com
Tue Oct 4 16:27:42 UTC 2016
include/svx/sidebar/AreaPropertyPanelBase.hxx | 4
include/svx/sidebar/AreaTransparencyGradientPopup.hxx | 20 -
include/svx/sidebar/Popup.hxx | 102 ---------
include/svx/sidebar/PopupContainer.hxx | 47 ----
include/svx/sidebar/PopupControl.hxx | 49 ----
sc/Library_sc.mk | 2
sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx | 75 +-----
sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx | 67 ++++--
sc/source/ui/sidebar/CellBorderStyleControl.cxx | 30 +-
sc/source/ui/sidebar/CellBorderStyleControl.hxx | 15 -
sc/source/ui/sidebar/CellBorderStylePopup.cxx | 38 ---
sc/source/ui/sidebar/CellBorderStylePopup.hxx | 41 ---
sc/source/ui/sidebar/CellLineStyleControl.cxx | 24 +-
sc/source/ui/sidebar/CellLineStyleControl.hxx | 11 -
sc/source/ui/sidebar/CellLineStylePopup.cxx | 50 ----
sc/source/ui/sidebar/CellLineStylePopup.hxx | 43 ---
sfx2/inc/sidebar/PopupContainer.hxx | 40 ---
sfx2/source/sidebar/PopupContainer.cxx | 46 ----
svx/Library_svx.mk | 3
svx/inc/pch/precompiled_svx.hxx | 3
svx/source/sidebar/area/AreaPropertyPanel.cxx | 1
svx/source/sidebar/area/AreaPropertyPanel.hxx | 1
svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 19 -
svx/source/sidebar/area/AreaTransparencyGradientControl.cxx | 4
svx/source/sidebar/area/AreaTransparencyGradientControl.hxx | 3
svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx | 25 +-
svx/source/sidebar/line/LinePropertyPanel.cxx | 2
svx/source/sidebar/line/LinePropertyPanel.hxx | 2
svx/source/sidebar/line/LinePropertyPanelBase.cxx | 2
svx/source/sidebar/text/TextCharacterSpacingControl.hxx | 1
svx/source/sidebar/text/TextPropertyPanel.cxx | 2
svx/source/sidebar/text/TextPropertyPanel.hxx | 3
svx/source/sidebar/text/TextUnderlineControl.hxx | 1
svx/source/sidebar/tools/Popup.cxx | 130 ------------
svx/source/sidebar/tools/PopupContainer.cxx | 51 ----
svx/source/sidebar/tools/PopupControl.cxx | 51 ----
sw/source/uibase/sidebar/PageFooterPanel.hxx | 1
sw/source/uibase/sidebar/PageFormatPanel.hxx | 1
sw/source/uibase/sidebar/PageHeaderPanel.hxx | 1
sw/source/uibase/sidebar/PageMarginControl.hxx | 2
sw/source/uibase/sidebar/PagePropertyPanel.cxx | 2
sw/source/uibase/sidebar/PagePropertyPanel.hxx | 5
sw/source/uibase/sidebar/PageSizeControl.hxx | 2
sw/source/uibase/sidebar/PageStylesPanel.hxx | 1
sw/source/uibase/sidebar/StylePresetsPanel.hxx | 1
sw/source/uibase/sidebar/ThemePanel.hxx | 1
46 files changed, 140 insertions(+), 885 deletions(-)
New commits:
commit 349f4923e265d76cfd76627796dc93e99e0b5d02
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 4 17:14:33 2016 +0100
can now remove both PopupContainer copies
the recently unused svx one, and the forgotten not-built sfx2 one
Change-Id: I1a4ede49dc74bb71f250ee3eee999d1a3dfbee57
diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index 2454084..b3a37c0 100644
--- a/include/svx/sidebar/AreaPropertyPanelBase.hxx
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -53,7 +53,6 @@ class XFillBitmapItem;
namespace svx { namespace sidebar {
-class PopupContainer;
class AreaTransparencyGradientControl;
class SVX_DLLPUBLIC AreaPropertyPanelBase
diff --git a/include/svx/sidebar/PopupContainer.hxx b/include/svx/sidebar/PopupContainer.hxx
deleted file mode 100644
index f46e77e..0000000
--- a/include/svx/sidebar/PopupContainer.hxx
+++ /dev/null
@@ -1,47 +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_SVX_SIDEBAR_POPUPCONTAINER_HXX
-#define INCLUDED_SVX_SIDEBAR_POPUPCONTAINER_HXX
-
-#include <svx/svxdllapi.h>
-#include <vcl/floatwin.hxx>
-
-namespace svx { namespace sidebar {
-
-/** Simple base class for popup container windows used by sidebar
- related drop downs.
- It initializes the underlying floating window with the right
- flags and closes the drop down when appropriate.
-*/
-class SVX_DLLPUBLIC PopupContainer
- : public FloatingWindow
-{
-public:
- PopupContainer (vcl::Window* pParent);
- virtual ~PopupContainer() override;
-
- virtual bool Notify (NotifyEvent& rNEvt) override;
-};
-
-
-} } // end of namespace svx::sidebar
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index 74fdafd..be8a6f2 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -33,7 +33,6 @@
#include <editeng/lineitem.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
-#include <svx/sidebar/PopupContainer.hxx>
#include "CellLineStyleControl.hxx"
#include "CellBorderUpdater.hxx"
#include "CellBorderStyleControl.hxx"
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
index a6cfcb0..20347c2 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
@@ -28,9 +28,6 @@
#include <memory>
class FixedText;
-namespace svx { namespace sidebar {
- class PopupContainer;
-}}
namespace sc { namespace sidebar {
class CellLineStyleControl;
class CellBorderUpdater;
diff --git a/sfx2/inc/sidebar/PopupContainer.hxx b/sfx2/inc/sidebar/PopupContainer.hxx
deleted file mode 100644
index e34b207..0000000
--- a/sfx2/inc/sidebar/PopupContainer.hxx
+++ /dev/null
@@ -1,40 +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_SFX2_INC_SIDEBAR_POPUPCONTAINER_HXX
-#define INCLUDED_SFX2_INC_SIDEBAR_POPUPCONTAINER_HXX
-
-#include <sfx2/dllapi.h>
-#include <vcl/floatwin.hxx>
-
-namespace sfx2 { namespace sidebar {
-
-class SFX2_DLLPUBLIC PopupContainer : public FloatingWindow
-{
-public:
- PopupContainer (vcl::Window* pParent);
- virtual ~PopupContainer();
-
- virtual long Notify (NotifyEvent& rNEvt);
-};
-
-} } // end of namespace sfx2::sidebar
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/sidebar/PopupContainer.cxx b/sfx2/source/sidebar/PopupContainer.cxx
deleted file mode 100644
index 0b52d1f..0000000
--- a/sfx2/source/sidebar/PopupContainer.cxx
+++ /dev/null
@@ -1,46 +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 "precompiled_sfx2.hxx"
-
-#include <sidebar/PopupContainer.hxx>
-
-namespace sfx2 { namespace sidebar {
-
-PopupContainer::PopupContainer (vcl::Window* pParent)
- : FloatingWindow(pParent, WB_SYSTEMWINDOW | WB_3DLOOK)
-{
-}
-
-PopupContainer::~PopupContainer()
-{
-}
-
-long PopupContainer::Notify (NotifyEvent& rEvent)
-{
- if (rEvent.GetType() == MouseNotifyEvent::LOSEFOCUS)
- {
- if( ! HasChildPathFocus(sal_True))
- EndPopupMode();
- }
- return FloatingWindow::Notify(rEvent);
-}
-
-} } // end of namespace sfx2::sidebar
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index 8ff1232..3f801e7 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -206,7 +206,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
svx/source/sidebar/possize/SidebarDialControl \
svx/source/sidebar/shapes/DefaultShapesPanel \
svx/source/sidebar/shapes/ShapesUtil \
- svx/source/sidebar/tools/PopupContainer \
svx/source/sidebar/tools/ValueSetWithTextControl \
svx/source/stbctrls/pszctrl \
svx/source/stbctrls/insctrl \
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index b2ed4cc..9317ad1 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -437,7 +437,6 @@
#include <svx/sdasitm.hxx>
#include <svx/sdrpaintwindow.hxx>
#include <svx/sidebar/LinePropertyPanelBase.hxx>
-#include <svx/sidebar/PopupContainer.hxx>
#include <svx/srchdlg.hxx>
#include <svx/svddef.hxx>
#include <svx/svdetc.hxx>
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx
index 1afba46..e2610a7 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx
@@ -16,7 +16,6 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "svx/sidebar/PopupContainer.hxx"
#include "AreaTransparencyGradientControl.hxx"
#include <sfx2/sidebar/ResourceDefinitions.hrc>
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.hxx b/svx/source/sidebar/area/AreaPropertyPanel.hxx
index 458ace7..9875855 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.hxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.hxx
@@ -45,7 +45,6 @@ class XFillBitmapItem;
namespace svx { namespace sidebar {
-class PopupContainer;
class AreaTransparencyGradientControl;
class AreaPropertyPanel : public AreaPropertyPanelBase
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index 6cb5b08..a48fbf6 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -16,7 +16,6 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "svx/sidebar/PopupContainer.hxx"
#include "AreaTransparencyGradientControl.hxx"
#include <sfx2/sidebar/ResourceDefinitions.hrc>
diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx
index 45f68d5..20791b5 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.cxx
@@ -45,7 +45,6 @@
#include <svx/xlnedit.hxx>
#include <svx/xlncapit.hxx>
#include <svx/xlinjoit.hxx>
-#include "svx/sidebar/PopupContainer.hxx"
using namespace css;
using namespace css::uno;
diff --git a/svx/source/sidebar/line/LinePropertyPanel.hxx b/svx/source/sidebar/line/LinePropertyPanel.hxx
index 4d6531a..0dd37aa 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.hxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.hxx
@@ -55,8 +55,6 @@ namespace svx
namespace sidebar
{
-class PopupContainer;
-
class LinePropertyPanel : public LinePropertyPanelBase,
public sfx2::sidebar::IContextChangeReceiver,
public sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
index 653a13f..41688c8 100644
--- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
@@ -45,7 +45,6 @@
#include <svx/xlnedit.hxx>
#include <svx/xlncapit.hxx>
#include <svx/xlinjoit.hxx>
-#include "svx/sidebar/PopupContainer.hxx"
using namespace css;
using namespace css::uno;
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx
index b8afb5e..6014b1f 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -27,8 +27,6 @@
#include <svtools/unitconv.hxx>
#include <vcl/toolbox.hxx>
-#include <svx/sidebar/PopupContainer.hxx>
-
using namespace css;
using namespace css::uno;
diff --git a/svx/source/sidebar/text/TextPropertyPanel.hxx b/svx/source/sidebar/text/TextPropertyPanel.hxx
index 13ba78a..e3d3b4e 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.hxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.hxx
@@ -35,8 +35,6 @@ class ToolBox;
namespace svx { namespace sidebar {
-class PopupContainer;
-
class TextPropertyPanel
: public PanelLayout,
public ::sfx2::sidebar::IContextChangeReceiver,
diff --git a/svx/source/sidebar/tools/PopupContainer.cxx b/svx/source/sidebar/tools/PopupContainer.cxx
deleted file mode 100644
index efb478d..0000000
--- a/svx/source/sidebar/tools/PopupContainer.cxx
+++ /dev/null
@@ -1,51 +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 "svx/sidebar/PopupContainer.hxx"
-#include <sfx2/sidebar/Theme.hxx>
-#include <vcl/gradient.hxx>
-
-namespace svx { namespace sidebar {
-
-PopupContainer::PopupContainer (vcl::Window* pParent)
- : FloatingWindow(pParent, WB_SYSTEMWINDOW | WB_3DLOOK) // | WB_POPUP_FOCUSWIN)
-{
-}
-
-PopupContainer::~PopupContainer()
-{
- disposeOnce();
-}
-
-bool PopupContainer::Notify (NotifyEvent& rEvent)
-{
- if (rEvent.GetType() == MouseNotifyEvent::LOSEFOCUS)
- {
- if ( ! HasChildPathFocus(true))
- {
- EndPopupMode();
- }
- }
-
- return FloatingWindow::Notify(rEvent);
-}
-
-
-} } // end of namespace svx::sidebar
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.cxx b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
index a051a47..508cb3e 100644
--- a/sw/source/uibase/sidebar/PagePropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
@@ -23,8 +23,6 @@
#include "PagePropertyPanel.hxx"
-#include <svx/sidebar/PopupContainer.hxx>
-
#include <swtypes.hxx>
#include <cmdid.h>
commit 5d812cae7eacccb7819a46ae45c577295db9f190
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 4 15:39:09 2016 +0100
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
diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index 7668f3b..2454084 100644
--- a/include/svx/sidebar/AreaPropertyPanelBase.hxx
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -152,7 +152,7 @@ protected:
Image maImgSquare;
Image maImgLinear;
- AreaTransparencyGradientPopup maTrGrPopup;
+ VclPtr<AreaTransparencyGradientPopup> mxTrGrPopup;
std::unique_ptr< XFillFloatTransparenceItem > mpFloatTransparenceItem;
std::unique_ptr< SfxUInt16Item > mpTransparanceItem;
@@ -170,7 +170,6 @@ protected:
DECL_LINK_TYPED(ClickImportBitmapHdl, Button*, void);
// for transparency gradient
- VclPtr<Control> CreateTransparencyGradientControl (PopupContainer* pParent);
DECL_LINK_TYPED( ClickTrGrHdl_Impl, ToolBox*, void );
void Initialize();
diff --git a/include/svx/sidebar/AreaTransparencyGradientPopup.hxx b/include/svx/sidebar/AreaTransparencyGradientPopup.hxx
index 31c041b..519224b 100644
--- a/include/svx/sidebar/AreaTransparencyGradientPopup.hxx
+++ b/include/svx/sidebar/AreaTransparencyGradientPopup.hxx
@@ -19,26 +19,24 @@
#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREATRANSPARENCYGRADIENTPOPUP_HXX
#define INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREATRANSPARENCYGRADIENTPOPUP_HXX
-#include "svx/sidebar/Popup.hxx"
-
-#include <functional>
-
+#include <vcl/floatwin.hxx>
class XFillFloatTransparenceItem;
-
namespace svx { namespace sidebar {
-class AreaTransparencyGradientPopup
- : public Popup
+class AreaTransparencyGradientControl;
+class AreaPropertyPanelBase;
+
+class AreaTransparencyGradientPopup : public FloatingWindow
{
+private:
+ VclPtr<AreaTransparencyGradientControl> m_xControl;
public:
- AreaTransparencyGradientPopup (
- vcl::Window* pParent,
- ::std::function<Control*(PopupContainer*)> const& rControlCreator);
+ AreaTransparencyGradientPopup(vcl::Window* pParent, AreaPropertyPanelBase& rPanel);
virtual ~AreaTransparencyGradientPopup() override;
-
void Rearrange (XFillFloatTransparenceItem* pItem);
+ virtual void dispose() override;
};
} } // end of namespace svx::sidebar
diff --git a/include/svx/sidebar/Popup.hxx b/include/svx/sidebar/Popup.hxx
deleted file mode 100644
index 0e0bccf..0000000
--- a/include/svx/sidebar/Popup.hxx
+++ /dev/null
@@ -1,101 +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_SVX_SIDEBAR_POPUP_HXX
-#define INCLUDED_SVX_SIDEBAR_POPUP_HXX
-
-#include <svx/svxdllapi.h>
-#include <rtl/ustring.hxx>
-#include <tools/link.hxx>
-#include <vcl/vclptr.hxx>
-#include <svx/sidebar/PopupContainer.hxx>
-
-#include <functional>
-
-namespace vcl { class Window; }
-class ToolBox;
-
-namespace svx { namespace sidebar {
-
-/** A wrapper around a PopupContainer and a Control object.
- Usually used as drop down for a toolbox. Use Show() to start
- drop down mode and Hide() to end it.
-*/
-class SVX_DLLPUBLIC Popup
-{
-public:
- /** Create a Popup wrapper object.
- @param pParent
- Parent window of the PopupContainer, which in turn is the
- parent of the Control.
- @param rControlCreator
- A functor that is called to create the Control object
- (usually an instance of a class derived from
- Control).
- */
- Popup (
- vcl::Window* pParent,
- const ::std::function<Control*(PopupContainer*)>& rControlCreator,
- const ::rtl::OUString& rsAccessibleName);
- virtual ~Popup();
-
- /** Show the popup.
- @rToolBox
- The tool box is used to determine the position at which
- the popup is displayed.
- */
- void Show (ToolBox& rToolBox);
-
- /** Hide the popup.
- This method is called automatically when eg. the user clicks
- outside the popup or when the ESC-key is pressed. The
- application can call Hide() when the popup should be closed
- for other, non-standard reasons.
- */
- void Hide();
-
- void dispose();
-
-protected:
- VclPtr<Control> mxControl;
-
- /** Make sure that both PopupContainer and Control objects
- exist. Calls the maControlCreator functor if necessary.
- */
- void ProvideContainerAndControl();
-
- /** A derived specialisation class can override this method to do
- additional work.
- */
- void CreateContainerAndControl();
-
-private:
- VclPtr<vcl::Window> mpParent;
- ::std::function<VclPtr<Control>(PopupContainer*)> maControlCreator;
- ::std::function<void()> maPopupModeEndCallback;
- const ::rtl::OUString msAccessibleName;
- VclPtr<PopupContainer> mxContainer;
-
- DECL_LINK_TYPED(PopupModeEndHandler, FloatingWindow*, void);
-};
-
-} } // end of namespace svx::sidebar
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index bf75fb1..27326ae 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -497,12 +497,10 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
sc/source/ui/pagedlg/tphfedit \
sc/source/ui/sidebar/AlignmentPropertyPanel \
sc/source/ui/sidebar/CellLineStyleControl \
- sc/source/ui/sidebar/CellLineStylePopup \
sc/source/ui/sidebar/CellLineStyleValueSet \
sc/source/ui/sidebar/CellBorderUpdater \
sc/source/ui/sidebar/CellAppearancePropertyPanel \
sc/source/ui/sidebar/CellBorderStyleControl \
- sc/source/ui/sidebar/CellBorderStylePopup \
sc/source/ui/sidebar/NumberFormatControl \
sc/source/ui/sidebar/NumberFormatPropertyPanel \
sc/source/ui/sidebar/ScPanelFactory \
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index 3cc6e4f..74fdafd 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -35,10 +35,8 @@
#include <vcl/settings.hxx>
#include <svx/sidebar/PopupContainer.hxx>
#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<CellLineStyleControl>::Create(pParent, *this);
-}
-
-void CellAppearancePropertyPanel::EndCellLineStylePopupMode()
-{
- if(mpCellLineStylePopup.get())
- {
- mpCellLineStylePopup->Hide();
- }
-}
-
-Control* CellAppearancePropertyPanel::CreateCellBorderStylePopupControl(svx::sidebar::PopupContainer* pParent)
-{
- return VclPtr<CellBorderStyleControl>::Create(pParent, *this);
-}
-
-void CellAppearancePropertyPanel::EndCellBorderStylePopupMode()
-{
- if(mpCellBorderStylePopup.get())
- {
- mpCellBorderStylePopup->Hide();
- }
-}
-
CellAppearancePropertyPanel::CellAppearancePropertyPanel(
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& 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<CellBorderStylePopup>::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<CellLineStylePopup>::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 1e6dfcf..a6cfcb0 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
@@ -22,6 +22,9 @@
#include <sfx2/sidebar/ControllerItem.hxx>
#include <sfx2/sidebar/IContextChangeReceiver.hxx>
#include <svx/sidebar/PanelLayout.hxx>
+#include <vcl/floatwin.hxx>
+#include "CellBorderStyleControl.hxx"
+#include "CellLineStyleControl.hxx"
#include <memory>
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<Control> m_xControl;
+public:
+ CellBorderStylePopup(vcl::Window* pParent, SfxDispatcher* pDispatcher)
+ : FloatingWindow(pParent, WB_BORDER | WB_SYSTEMWINDOW)
+ , m_xControl(VclPtr<CellBorderStyleControl>::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<CellLineStyleControl> m_xControl;
+public:
+ CellLineStylePopup(vcl::Window* pParent, SfxDispatcher* pDispatcher)
+ : FloatingWindow(pParent, WB_BORDER | WB_SYSTEMWINDOW)
+ , m_xControl(VclPtr<CellLineStyleControl>::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<CellLineStylePopup> mxCellLineStylePopup;
+ VclPtr<CellBorderStylePopup> 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 47a60cc..1c505d9 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<ToolBox>::Create(this, ScResId(TB_BORDER1))),
maTBBorder2(VclPtr<ToolBox>::Create(this, ScResId(TB_BORDER2))),
maTBBorder3(VclPtr<ToolBox>::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 38c2710..bc37be4 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 <vcl/button.hxx>
-#include <vcl/toolbox.hxx>
#include <vcl/fixed.hxx>
+#include <vcl/floatwin.hxx>
+#include <vcl/toolbox.hxx>
-namespace sc { namespace sidebar {
+class SfxDispatcher;
-class CellAppearancePropertyPanel;
+namespace sc { namespace sidebar {
class CellBorderStyleControl : public Control
{
private:
- CellAppearancePropertyPanel& mrCellAppearancePropertyPanel;
+ SfxDispatcher* mpDispatcher;
+ VclPtr<FloatingWindow> mxFloatParent;
VclPtr<ToolBox> maTBBorder1;
VclPtr<ToolBox> maTBBorder2;
VclPtr<ToolBox> 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 7b5e871..0000000
--- 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<Control* (svx::sidebar::PopupContainer*)>& 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 17909b7..0000000
--- 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 <svx/sidebar/Popup.hxx>
-
-#include <functional>
-
-namespace sc { namespace sidebar {
-
-class CellBorderStylePopup : public svx::sidebar::Popup
-{
-public:
- CellBorderStylePopup(
- vcl::Window* pParent,
- const ::std::function<Control*(svx::sidebar::PopupContainer*)>& 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 d383ade..6de614d 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<PushButton>::Create(this, ScResId(PB_OPTIONS))),
maCellLineStyleValueSet(VclPtr<sc::sidebar::CellLineStyleValueSet>::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 9e98e68..bad5780 100644
--- a/sc/source/ui/sidebar/CellLineStyleControl.hxx
+++ b/sc/source/ui/sidebar/CellLineStyleControl.hxx
@@ -22,14 +22,16 @@
#include <vcl/button.hxx>
#include "CellLineStyleValueSet.hxx"
+class SfxDispatcher;
+
namespace sc { namespace sidebar {
class CellAppearancePropertyPanel;
-
class CellLineStyleControl : public Control
{
private:
- CellAppearancePropertyPanel& mrCellAppearancePropertyPanel;
+ SfxDispatcher* mpDispatcher;
+ VclPtr<FloatingWindow> mxFloatParent;
VclPtr<PushButton> maPushButtonMoreOptions;
VclPtr<CellLineStyleValueSet> 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 363029b..0000000
--- 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<Control* (svx::sidebar::PopupContainer*)>& 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 d72128c..0000000
--- 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 <svx/sidebar/Popup.hxx>
-
-#include <functional>
-
-namespace sc { namespace sidebar {
-
-class CellLineStylePopup : public svx::sidebar::Popup
-{
-public:
- CellLineStylePopup(
- vcl::Window* pParent,
- const ::std::function<Control* (svx::sidebar::PopupContainer*)>& 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: */
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index f5af93d..8ff1232 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -207,7 +207,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
svx/source/sidebar/shapes/DefaultShapesPanel \
svx/source/sidebar/shapes/ShapesUtil \
svx/source/sidebar/tools/PopupContainer \
- svx/source/sidebar/tools/Popup \
svx/source/sidebar/tools/ValueSetWithTextControl \
svx/source/stbctrls/pszctrl \
svx/source/stbctrls/insctrl \
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index 0d729d8..b2ed4cc 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -437,7 +437,6 @@
#include <svx/sdasitm.hxx>
#include <svx/sdrpaintwindow.hxx>
#include <svx/sidebar/LinePropertyPanelBase.hxx>
-#include <svx/sidebar/Popup.hxx>
#include <svx/sidebar/PopupContainer.hxx>
#include <svx/srchdlg.hxx>
#include <svx/svddef.hxx>
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index d9ef7c2..6cb5b08 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -95,7 +95,6 @@ AreaPropertyPanelBase::AreaPropertyPanelBase(
maImgRadial(SVX_RES(IMG_RADIAL)),
maImgSquare(SVX_RES(IMG_SQUARE)),
maImgLinear(SVX_RES(IMG_LINEAR)),
- maTrGrPopup(this, [this] (PopupContainer *const pContainer) { return this->CreateTransparencyGradientControl(pContainer); }),
mpFloatTransparenceItem(),
mpTransparanceItem(),
mxFrame(rxFrame),
@@ -126,6 +125,7 @@ AreaPropertyPanelBase::~AreaPropertyPanelBase()
void AreaPropertyPanelBase::dispose()
{
+ mxTrGrPopup.disposeAndClear();
mpColorTextFT.clear();
mpLbFillType.clear();
mpLbFillAttr.clear();
@@ -495,11 +495,6 @@ IMPL_LINK_NOARG_TYPED(AreaPropertyPanelBase, ChangeGradientAngle, Edit&, void)
SelectFillAttrHdl_Impl();
}
-VclPtr<Control> AreaPropertyPanelBase::CreateTransparencyGradientControl (PopupContainer* pParent)
-{
- return VclPtrInstance<AreaTransparencyGradientControl>(pParent, *this);
-}
-
void AreaPropertyPanelBase::DataChanged(
const DataChangedEvent& /*rEvent*/)
{
@@ -675,9 +670,9 @@ void AreaPropertyPanelBase::ImpUpdateTransparencies()
SetTransparency(nValue);
}
- if(!bZeroValue)
+ if (!bZeroValue && mxTrGrPopup)
{
- maTrGrPopup.Hide();
+ mxTrGrPopup->EndPopupMode();
}
}
@@ -1327,9 +1322,12 @@ IMPL_LINK_NOARG_TYPED(AreaPropertyPanelBase, ModifyTransSliderHdl, Slider*, void
IMPL_LINK_TYPED( AreaPropertyPanelBase, ClickTrGrHdl_Impl, ToolBox*, pToolBox, void )
{
- maTrGrPopup.Rearrange(mpFloatTransparenceItem.get());
+ if (!mxTrGrPopup)
+ mxTrGrPopup = VclPtr<AreaTransparencyGradientPopup>::Create(pToolBox, *this);
+ mxTrGrPopup->Rearrange(mpFloatTransparenceItem.get());
OSL_ASSERT( pToolBox->GetItemCommand(pToolBox->GetCurItemId()) == UNO_SIDEBARGRADIENT);
- maTrGrPopup.Show(*pToolBox);
+ mxTrGrPopup->StartPopupMode(pToolBox, FloatWinPopupFlags::Down |
+ FloatWinPopupFlags::NoAppFocusClose);
}
IMPL_LINK_NOARG_TYPED(AreaPropertyPanelBase, ChangeTrgrTypeHdl_Impl, ListBox&, void)
diff --git a/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx b/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx
index 5dfe37c..0e64683 100644
--- a/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx
+++ b/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx
@@ -21,29 +21,28 @@
namespace svx { namespace sidebar {
-AreaTransparencyGradientPopup::AreaTransparencyGradientPopup (
- vcl::Window* pParent,
- const ::std::function<Control* (PopupContainer*)>& rControlCreator)
- : Popup(
- pParent,
- rControlCreator,
- OUString( "Transparency and Gradient"))
+AreaTransparencyGradientPopup::AreaTransparencyGradientPopup(vcl::Window* pParent, AreaPropertyPanelBase& rPanel)
+ : FloatingWindow(pParent, WB_BORDER | WB_SYSTEMWINDOW)
+ , m_xControl(VclPtr<AreaTransparencyGradientControl>::Create(this, rPanel))
{
}
AreaTransparencyGradientPopup::~AreaTransparencyGradientPopup()
{
+ disposeOnce();
}
-void AreaTransparencyGradientPopup::Rearrange (XFillFloatTransparenceItem* pItem)
+void AreaTransparencyGradientPopup::Rearrange(XFillFloatTransparenceItem* pItem)
{
- ProvideContainerAndControl();
-
- AreaTransparencyGradientControl* pControl = dynamic_cast<AreaTransparencyGradientControl*>(mxControl.get());
- if (pControl != nullptr)
- pControl->Rearrange(pItem);
+ m_xControl->Rearrange(pItem);
+ SetSizePixel(m_xControl->GetOutputSizePixel());
}
+void AreaTransparencyGradientPopup::dispose()
+{
+ m_xControl.disposeAndClear();
+ FloatingWindow::dispose();
+}
} } // end of namespace svx::sidebar
diff --git a/svx/source/sidebar/tools/Popup.cxx b/svx/source/sidebar/tools/Popup.cxx
deleted file mode 100644
index ffd1bf5..0000000
--- a/svx/source/sidebar/tools/Popup.cxx
+++ /dev/null
@@ -1,129 +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 "svx/sidebar/Popup.hxx"
-#include "svx/sidebar/PopupContainer.hxx"
-
-#include <vcl/toolbox.hxx>
-
-
-namespace svx { namespace sidebar {
-
-Popup::Popup (
- vcl::Window* pParent,
- const ::std::function<Control* (PopupContainer*)>& rControlCreator,
- const ::rtl::OUString& rsAccessibleName)
- : mxControl(),
- mpParent(pParent),
- maControlCreator(rControlCreator),
- maPopupModeEndCallback(),
- msAccessibleName(rsAccessibleName),
- mxContainer()
-{
- OSL_ASSERT(mpParent!=nullptr);
- OSL_ASSERT(maControlCreator);
-}
-
-void Popup::dispose()
-{
- mxControl.disposeAndClear();
- mxContainer.disposeAndClear();
- mpParent.clear();
-}
-
-Popup::~Popup()
-{
- dispose();
-}
-
-void Popup::Show (ToolBox& rToolBox)
-{
- rToolBox.SetItemDown(rToolBox.GetCurItemId(), true);
-
- ProvideContainerAndControl();
- if ( ! (mxContainer && mxControl))
- {
- OSL_ASSERT(mxContainer);
- OSL_ASSERT(mxControl);
- return;
- }
-
- if ( !mxContainer->IsInPopupMode() )
- {
- mxContainer->SetSizePixel(mxControl->GetOutputSizePixel());
-
- const Point aPos (rToolBox.GetParent()->OutputToScreenPixel(rToolBox.GetPosPixel()));
- const Size aSize (rToolBox.GetSizePixel());
- const Rectangle aRect (aPos, aSize);
-
- mxContainer->StartPopupMode(
- aRect,
- FloatWinPopupFlags::Down);
- mxContainer->SetPopupModeFlags(
- mxContainer->GetPopupModeFlags()
- | FloatWinPopupFlags::NoAppFocusClose);
-
- mxControl->GetFocus();
- }
-}
-
-void Popup::Hide()
-{
- if (mxContainer)
- if (mxContainer->IsInPopupMode())
- mxContainer->EndPopupMode();
-}
-
-void Popup::ProvideContainerAndControl()
-{
- if ( ! (mxContainer && mxControl)
- && mpParent != nullptr
- && maControlCreator)
- {
- CreateContainerAndControl();
- }
-}
-
-void Popup::CreateContainerAndControl()
-{
- // Clean previous components, if any
- mxControl.disposeAndClear();
- mxContainer.disposeAndClear();
-
- mxContainer.set(VclPtr<PopupContainer>::Create(mpParent));
- mxContainer->SetAccessibleName(msAccessibleName);
- mxContainer->SetPopupModeEndHdl(LINK(this, Popup, PopupModeEndHandler));
- mxContainer->SetBorderStyle(mxContainer->GetBorderStyle() | WindowBorderStyle::MENU);
-
- mxControl.set(maControlCreator(mxContainer.get()));
-}
-
-IMPL_LINK_NOARG_TYPED(Popup, PopupModeEndHandler, FloatingWindow*, void)
-{
- if (maPopupModeEndCallback)
- maPopupModeEndCallback();
-
- // Popup control is no longer needed and can be destroyed.
- mxControl.disposeAndClear();
- mxContainer.disposeAndClear();
-}
-
-
-} } // end of namespace svx::sidebar
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/sidebar/PageFooterPanel.hxx b/sw/source/uibase/sidebar/PageFooterPanel.hxx
index 161aa0c..c1357ad 100644
--- a/sw/source/uibase/sidebar/PageFooterPanel.hxx
+++ b/sw/source/uibase/sidebar/PageFooterPanel.hxx
@@ -22,7 +22,6 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/document/XUndoManager.hpp>
-#include <svx/sidebar/Popup.hxx>
#include <svx/sidebar/PanelLayout.hxx>
#include <sfx2/sidebar/ControllerItem.hxx>
diff --git a/sw/source/uibase/sidebar/PageFormatPanel.hxx b/sw/source/uibase/sidebar/PageFormatPanel.hxx
index c483a65..5fc5f2c 100644
--- a/sw/source/uibase/sidebar/PageFormatPanel.hxx
+++ b/sw/source/uibase/sidebar/PageFormatPanel.hxx
@@ -22,7 +22,6 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/document/XUndoManager.hpp>
-#include <svx/sidebar/Popup.hxx>
#include <svx/sidebar/PanelLayout.hxx>
#include <sfx2/sidebar/ControllerItem.hxx>
diff --git a/sw/source/uibase/sidebar/PageHeaderPanel.hxx b/sw/source/uibase/sidebar/PageHeaderPanel.hxx
index 2aa7149..ffce205 100644
--- a/sw/source/uibase/sidebar/PageHeaderPanel.hxx
+++ b/sw/source/uibase/sidebar/PageHeaderPanel.hxx
@@ -22,7 +22,6 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/document/XUndoManager.hpp>
-#include <svx/sidebar/Popup.hxx>
#include <svx/sidebar/PanelLayout.hxx>
#include <sfx2/sidebar/ControllerItem.hxx>
diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.hxx b/sw/source/uibase/sidebar/PagePropertyPanel.hxx
index 0c3bf05..f744014 100644
--- a/sw/source/uibase/sidebar/PagePropertyPanel.hxx
+++ b/sw/source/uibase/sidebar/PagePropertyPanel.hxx
@@ -22,7 +22,6 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/document/XUndoManager.hpp>
-#include <svx/sidebar/Popup.hxx>
#include <svx/sidebar/PanelLayout.hxx>
#include <sfx2/sidebar/ControllerItem.hxx>
diff --git a/sw/source/uibase/sidebar/PageStylesPanel.hxx b/sw/source/uibase/sidebar/PageStylesPanel.hxx
index 2f82abc..2f3f401 100644
--- a/sw/source/uibase/sidebar/PageStylesPanel.hxx
+++ b/sw/source/uibase/sidebar/PageStylesPanel.hxx
@@ -22,7 +22,6 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/document/XUndoManager.hpp>
-#include <svx/sidebar/Popup.hxx>
#include <svx/sidebar/PanelLayout.hxx>
#include <sfx2/sidebar/ControllerItem.hxx>
diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.hxx b/sw/source/uibase/sidebar/StylePresetsPanel.hxx
index fa5c8b0..3f4afbf 100644
--- a/sw/source/uibase/sidebar/StylePresetsPanel.hxx
+++ b/sw/source/uibase/sidebar/StylePresetsPanel.hxx
@@ -14,7 +14,6 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/document/XUndoManager.hpp>
-#include <svx/sidebar/Popup.hxx>
#include <svx/sidebar/PanelLayout.hxx>
#include <sfx2/sidebar/ControllerItem.hxx>
diff --git a/sw/source/uibase/sidebar/ThemePanel.hxx b/sw/source/uibase/sidebar/ThemePanel.hxx
index bc1b0cd..d9833af 100644
--- a/sw/source/uibase/sidebar/ThemePanel.hxx
+++ b/sw/source/uibase/sidebar/ThemePanel.hxx
@@ -14,7 +14,6 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/document/XUndoManager.hpp>
-#include <svx/sidebar/Popup.hxx>
#include <svx/sidebar/PanelLayout.hxx>
#include <sfx2/sidebar/ControllerItem.hxx>
commit 7e61e1d644270f05664d358abeffbc8f72b01a96
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 4 14:11:40 2016 +0100
remove PopupControl as an intermediate step
Change-Id: I31438860511af6ae00bf7a94fb29326c3ed1a10c
diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index f6827b5..7668f3b 100644
--- a/include/svx/sidebar/AreaPropertyPanelBase.hxx
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -170,7 +170,7 @@ protected:
DECL_LINK_TYPED(ClickImportBitmapHdl, Button*, void);
// for transparency gradient
- VclPtr<PopupControl> CreateTransparencyGradientControl (PopupContainer* pParent);
+ VclPtr<Control> CreateTransparencyGradientControl (PopupContainer* pParent);
DECL_LINK_TYPED( ClickTrGrHdl_Impl, ToolBox*, void );
void Initialize();
diff --git a/include/svx/sidebar/AreaTransparencyGradientPopup.hxx b/include/svx/sidebar/AreaTransparencyGradientPopup.hxx
index c7aee94..31c041b 100644
--- a/include/svx/sidebar/AreaTransparencyGradientPopup.hxx
+++ b/include/svx/sidebar/AreaTransparencyGradientPopup.hxx
@@ -35,7 +35,7 @@ class AreaTransparencyGradientPopup
public:
AreaTransparencyGradientPopup (
vcl::Window* pParent,
- ::std::function<PopupControl*(PopupContainer*)> const& rControlCreator);
+ ::std::function<Control*(PopupContainer*)> const& rControlCreator);
virtual ~AreaTransparencyGradientPopup() override;
void Rearrange (XFillFloatTransparenceItem* pItem);
diff --git a/include/svx/sidebar/Popup.hxx b/include/svx/sidebar/Popup.hxx
index 78d6de2..0e0bccf 100644
--- a/include/svx/sidebar/Popup.hxx
+++ b/include/svx/sidebar/Popup.hxx
@@ -24,7 +24,6 @@
#include <tools/link.hxx>
#include <vcl/vclptr.hxx>
#include <svx/sidebar/PopupContainer.hxx>
-#include <svx/sidebar/PopupControl.hxx>
#include <functional>
@@ -33,7 +32,7 @@ class ToolBox;
namespace svx { namespace sidebar {
-/** A wrapper around a PopupContainer and a PopupControl object.
+/** A wrapper around a PopupContainer and a Control object.
Usually used as drop down for a toolbox. Use Show() to start
drop down mode and Hide() to end it.
*/
@@ -43,15 +42,15 @@ public:
/** Create a Popup wrapper object.
@param pParent
Parent window of the PopupContainer, which in turn is the
- parent of the PopupControl.
+ parent of the Control.
@param rControlCreator
- A functor that is called to create the PopupControl object
+ A functor that is called to create the Control object
(usually an instance of a class derived from
- PopupControl).
+ Control).
*/
Popup (
vcl::Window* pParent,
- const ::std::function<PopupControl*(PopupContainer*)>& rControlCreator,
+ const ::std::function<Control*(PopupContainer*)>& rControlCreator,
const ::rtl::OUString& rsAccessibleName);
virtual ~Popup();
@@ -73,9 +72,9 @@ public:
void dispose();
protected:
- VclPtr<PopupControl> mxControl;
+ VclPtr<Control> mxControl;
- /** Make sure that both PopupContainer and PopupControl objects
+ /** Make sure that both PopupContainer and Control objects
exist. Calls the maControlCreator functor if necessary.
*/
void ProvideContainerAndControl();
@@ -87,7 +86,7 @@ protected:
private:
VclPtr<vcl::Window> mpParent;
- ::std::function<VclPtr<PopupControl>(PopupContainer*)> maControlCreator;
+ ::std::function<VclPtr<Control>(PopupContainer*)> maControlCreator;
::std::function<void()> maPopupModeEndCallback;
const ::rtl::OUString msAccessibleName;
VclPtr<PopupContainer> mxContainer;
diff --git a/include/svx/sidebar/PopupControl.hxx b/include/svx/sidebar/PopupControl.hxx
deleted file mode 100644
index 8f87c9a..0000000
--- a/include/svx/sidebar/PopupControl.hxx
+++ /dev/null
@@ -1,49 +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_SVX_SIDEBAR_POPUPCONTROL_HXX
-#define INCLUDED_SVX_SIDEBAR_POPUPCONTROL_HXX
-
-#include <svx/svxdllapi.h>
-#include <vcl/ctrl.hxx>
-
-namespace svx { namespace sidebar {
-
-/** Base class for sidebar related popup controls.
- A PopupControl is typically a child of a PopupContainer and
- provides the actual content of a popup.
- This base class takes care of painting the proper background and
- border for sidebar popups.
- Specialize by derivation.
-*/
-class SVX_DLLPUBLIC PopupControl
- : public Control
-{
-public:
- PopupControl (
- vcl::Window* pParent,
- const ResId& rResId);
-
- virtual void Paint (vcl::RenderContext& rRenderContext, const Rectangle& rect) override;
-};
-
-} } // end of namespace svx::sidebar
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index a425145..3cc6e4f 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -50,7 +50,7 @@ const char UNO_LINESTYLE[] = ".uno:LineStyle";
namespace sc { namespace sidebar {
-svx::sidebar::PopupControl* CellAppearancePropertyPanel::CreateCellLineStylePopupControl(svx::sidebar::PopupContainer* pParent)
+Control* CellAppearancePropertyPanel::CreateCellLineStylePopupControl(svx::sidebar::PopupContainer* pParent)
{
return VclPtr<CellLineStyleControl>::Create(pParent, *this);
}
@@ -63,7 +63,7 @@ void CellAppearancePropertyPanel::EndCellLineStylePopupMode()
}
}
-svx::sidebar::PopupControl* CellAppearancePropertyPanel::CreateCellBorderStylePopupControl(svx::sidebar::PopupContainer* pParent)
+Control* CellAppearancePropertyPanel::CreateCellBorderStylePopupControl(svx::sidebar::PopupContainer* pParent)
{
return VclPtr<CellBorderStyleControl>::Create(pParent, *this);
}
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
index 10b5a37..1e6dfcf 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
@@ -26,7 +26,6 @@
class FixedText;
namespace svx { namespace sidebar {
- class PopupControl;
class PopupContainer;
}}
namespace sc { namespace sidebar {
@@ -142,11 +141,11 @@ private:
DECL_LINK_TYPED(TbxLineStyleSelectHdl, ToolBox*, void);
// for CellLineStyle popup
- svx::sidebar::PopupControl* CreateCellLineStylePopupControl(svx::sidebar::PopupContainer* pParent);
+ Control* CreateCellLineStylePopupControl(svx::sidebar::PopupContainer* pParent);
void EndCellLineStylePopupMode();
// for CellBorderStyle popup
- svx::sidebar::PopupControl* CreateCellBorderStylePopupControl(svx::sidebar::PopupContainer* pParent);
+ Control* CreateCellBorderStylePopupControl(svx::sidebar::PopupContainer* pParent);
void EndCellBorderStylePopupMode();
void Initialize();
diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.cxx b/sc/source/ui/sidebar/CellBorderStyleControl.cxx
index 8280bc3..47a60cc 100644
--- a/sc/source/ui/sidebar/CellBorderStyleControl.cxx
+++ b/sc/source/ui/sidebar/CellBorderStyleControl.cxx
@@ -43,7 +43,7 @@ namespace sc { namespace sidebar {
#define FRM_VALID_ALL 0xff
CellBorderStyleControl::CellBorderStyleControl(vcl::Window* pParent, CellAppearancePropertyPanel& rPanel)
-: svx::sidebar::PopupControl(pParent, ScResId(RID_POPUPPANEL_APPEARANCE_CELL_BORDERSTYLE)),
+: Control(pParent, ScResId(RID_POPUPPANEL_APPEARANCE_CELL_BORDERSTYLE)),
mrCellAppearancePropertyPanel(rPanel),
maTBBorder1(VclPtr<ToolBox>::Create(this, ScResId(TB_BORDER1))),
maTBBorder2(VclPtr<ToolBox>::Create(this, ScResId(TB_BORDER2))),
@@ -69,7 +69,7 @@ void CellBorderStyleControl::dispose()
maTBBorder3.disposeAndClear();
maFL1.disposeAndClear();
maFL2.disposeAndClear();
- svx::sidebar::PopupControl::dispose();
+ Control::dispose();
}
void CellBorderStyleControl::Initialize()
diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.hxx b/sc/source/ui/sidebar/CellBorderStyleControl.hxx
index a19580f..38c2710 100644
--- a/sc/source/ui/sidebar/CellBorderStyleControl.hxx
+++ b/sc/source/ui/sidebar/CellBorderStyleControl.hxx
@@ -19,7 +19,6 @@
#ifndef INCLUDED_SC_SOURCE_UI_SIDEBAR_CELLBORDERSTYLECONTROL_HXX
#define INCLUDED_SC_SOURCE_UI_SIDEBAR_CELLBORDERSTYLECONTROL_HXX
-#include <svx/sidebar/PopupControl.hxx>
#include <vcl/button.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/fixed.hxx>
@@ -28,7 +27,7 @@ namespace sc { namespace sidebar {
class CellAppearancePropertyPanel;
-class CellBorderStyleControl : public svx::sidebar::PopupControl
+class CellBorderStyleControl : public Control
{
private:
CellAppearancePropertyPanel& mrCellAppearancePropertyPanel;
diff --git a/sc/source/ui/sidebar/CellBorderStylePopup.cxx b/sc/source/ui/sidebar/CellBorderStylePopup.cxx
index f71603e..7b5e871 100644
--- a/sc/source/ui/sidebar/CellBorderStylePopup.cxx
+++ b/sc/source/ui/sidebar/CellBorderStylePopup.cxx
@@ -24,7 +24,7 @@ namespace sc { namespace sidebar {
CellBorderStylePopup::CellBorderStylePopup (
vcl::Window* pParent,
- const ::std::function<svx::sidebar::PopupControl* (svx::sidebar::PopupContainer*)>& rControlCreator)
+ const ::std::function<Control* (svx::sidebar::PopupContainer*)>& rControlCreator)
: Popup(pParent, rControlCreator, ::OUString("CellBorderStyle"))
{
}
diff --git a/sc/source/ui/sidebar/CellBorderStylePopup.hxx b/sc/source/ui/sidebar/CellBorderStylePopup.hxx
index 7b3e822..17909b7 100644
--- a/sc/source/ui/sidebar/CellBorderStylePopup.hxx
+++ b/sc/source/ui/sidebar/CellBorderStylePopup.hxx
@@ -30,7 +30,7 @@ class CellBorderStylePopup : public svx::sidebar::Popup
public:
CellBorderStylePopup(
vcl::Window* pParent,
- const ::std::function<svx::sidebar::PopupControl*(svx::sidebar::PopupContainer*)>& rControlCreator);
+ const ::std::function<Control*(svx::sidebar::PopupContainer*)>& rControlCreator);
virtual ~CellBorderStylePopup() override;
};
diff --git a/sc/source/ui/sidebar/CellLineStyleControl.cxx b/sc/source/ui/sidebar/CellLineStyleControl.cxx
index 59a25ed..d383ade 100644
--- a/sc/source/ui/sidebar/CellLineStyleControl.cxx
+++ b/sc/source/ui/sidebar/CellLineStyleControl.cxx
@@ -34,7 +34,7 @@
namespace sc { namespace sidebar {
CellLineStyleControl::CellLineStyleControl(vcl::Window* pParent, CellAppearancePropertyPanel& rPanel)
-: svx::sidebar::PopupControl(pParent, ScResId(RID_POPUPPANEL_APPEARANCE_CELL_LINESTYLE)),
+: Control(pParent, ScResId(RID_POPUPPANEL_APPEARANCE_CELL_LINESTYLE)),
mrCellAppearancePropertyPanel(rPanel),
maPushButtonMoreOptions(VclPtr<PushButton>::Create(this, ScResId(PB_OPTIONS))),
maCellLineStyleValueSet(VclPtr<sc::sidebar::CellLineStyleValueSet>::Create(this, ScResId(VS_STYLE))),
@@ -53,7 +53,7 @@ void CellLineStyleControl::dispose()
{
maPushButtonMoreOptions.disposeAndClear();
maCellLineStyleValueSet.disposeAndClear();
- svx::sidebar::PopupControl::dispose();
+ Control::dispose();
}
void CellLineStyleControl::Initialize()
diff --git a/sc/source/ui/sidebar/CellLineStyleControl.hxx b/sc/source/ui/sidebar/CellLineStyleControl.hxx
index ef74eb0..9e98e68 100644
--- a/sc/source/ui/sidebar/CellLineStyleControl.hxx
+++ b/sc/source/ui/sidebar/CellLineStyleControl.hxx
@@ -19,7 +19,6 @@
#ifndef INCLUDED_SC_SOURCE_UI_SIDEBAR_CELLLINESTYLECONTROL_HXX
#define INCLUDED_SC_SOURCE_UI_SIDEBAR_CELLLINESTYLECONTROL_HXX
-#include <svx/sidebar/PopupControl.hxx>
#include <vcl/button.hxx>
#include "CellLineStyleValueSet.hxx"
@@ -27,7 +26,7 @@ namespace sc { namespace sidebar {
class CellAppearancePropertyPanel;
-class CellLineStyleControl : public svx::sidebar::PopupControl
+class CellLineStyleControl : public Control
{
private:
CellAppearancePropertyPanel& mrCellAppearancePropertyPanel;
diff --git a/sc/source/ui/sidebar/CellLineStylePopup.cxx b/sc/source/ui/sidebar/CellLineStylePopup.cxx
index 59b4b06..363029b 100644
--- a/sc/source/ui/sidebar/CellLineStylePopup.cxx
+++ b/sc/source/ui/sidebar/CellLineStylePopup.cxx
@@ -24,7 +24,7 @@ namespace sc { namespace sidebar {
CellLineStylePopup::CellLineStylePopup (
vcl::Window* pParent,
- const ::std::function<svx::sidebar::PopupControl* (svx::sidebar::PopupContainer*)>& rControlCreator)
+ const ::std::function<Control* (svx::sidebar::PopupContainer*)>& rControlCreator)
: Popup(pParent, rControlCreator, OUString("CellLineStyle"))
{
}
diff --git a/sc/source/ui/sidebar/CellLineStylePopup.hxx b/sc/source/ui/sidebar/CellLineStylePopup.hxx
index 7e90829..d72128c 100644
--- a/sc/source/ui/sidebar/CellLineStylePopup.hxx
+++ b/sc/source/ui/sidebar/CellLineStylePopup.hxx
@@ -30,7 +30,7 @@ class CellLineStylePopup : public svx::sidebar::Popup
public:
CellLineStylePopup(
vcl::Window* pParent,
- const ::std::function<svx::sidebar::PopupControl* (svx::sidebar::PopupContainer*)>& rControlCreator);
+ const ::std::function<Control* (svx::sidebar::PopupContainer*)>& rControlCreator);
virtual ~CellLineStylePopup() override;
void SetLineStyleSelect(sal_uInt16 out, sal_uInt16 in, sal_uInt16 dis);
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index 9c09ed0..f5af93d 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -206,7 +206,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
svx/source/sidebar/possize/SidebarDialControl \
svx/source/sidebar/shapes/DefaultShapesPanel \
svx/source/sidebar/shapes/ShapesUtil \
- svx/source/sidebar/tools/PopupControl \
svx/source/sidebar/tools/PopupContainer \
svx/source/sidebar/tools/Popup \
svx/source/sidebar/tools/ValueSetWithTextControl \
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index 726dee0..0d729d8 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -439,7 +439,6 @@
#include <svx/sidebar/LinePropertyPanelBase.hxx>
#include <svx/sidebar/Popup.hxx>
#include <svx/sidebar/PopupContainer.hxx>
-#include <svx/sidebar/PopupControl.hxx>
#include <svx/srchdlg.hxx>
#include <svx/svddef.hxx>
#include <svx/svdetc.hxx>
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index c9a0a07..d9ef7c2 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -495,7 +495,7 @@ IMPL_LINK_NOARG_TYPED(AreaPropertyPanelBase, ChangeGradientAngle, Edit&, void)
SelectFillAttrHdl_Impl();
}
-VclPtr<PopupControl> AreaPropertyPanelBase::CreateTransparencyGradientControl (PopupContainer* pParent)
+VclPtr<Control> AreaPropertyPanelBase::CreateTransparencyGradientControl (PopupContainer* pParent)
{
return VclPtrInstance<AreaTransparencyGradientControl>(pParent, *this);
}
diff --git a/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx b/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx
index d6e64d4..7b89594 100644
--- a/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx
+++ b/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx
@@ -52,7 +52,7 @@ namespace svx { namespace sidebar {
AreaTransparencyGradientControl::AreaTransparencyGradientControl (
vcl::Window* pParent,
AreaPropertyPanelBase& rPanel)
- : PopupControl( pParent,SVX_RES(RID_POPUPPANEL_AREAPAGE_TRGR)),
+ : Control( pParent,SVX_RES(RID_POPUPPANEL_AREAPAGE_TRGR)),
maFtTrgrCenterX(VclPtr<FixedText>::Create(this, SVX_RES(FT_TRGR_CENTER_X))),
maMtrTrgrCenterX(VclPtr<MetricField>::Create(this, SVX_RES(MTR_TRGR_CENTER_X))),
maFtTrgrCenterY(VclPtr<FixedText>::Create(this, SVX_RES(FT_TRGR_CENTER_Y))),
@@ -119,7 +119,7 @@ void AreaTransparencyGradientControl::dispose()
maMtrTrgrEndValue.disposeAndClear();
maFtTrgrBorder.disposeAndClear();
maMtrTrgrBorder.disposeAndClear();
- PopupControl::dispose();
+ Control::dispose();
}
void AreaTransparencyGradientControl::Rearrange(XFillFloatTransparenceItem* pGradientItem)
diff --git a/svx/source/sidebar/area/AreaTransparencyGradientControl.hxx b/svx/source/sidebar/area/AreaTransparencyGradientControl.hxx
index 04b6b6d..304e030 100644
--- a/svx/source/sidebar/area/AreaTransparencyGradientControl.hxx
+++ b/svx/source/sidebar/area/AreaTransparencyGradientControl.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREATRANSPARENCYGRADIENTCONTROL_HXX
#define INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREATRANSPARENCYGRADIENTCONTROL_HXX
-#include "svx/sidebar/PopupControl.hxx"
#include <vcl/fixed.hxx>
#include <vcl/field.hxx>
@@ -35,7 +34,7 @@ namespace svx { namespace sidebar {
class AreaPropertyPanelBase;
-class AreaTransparencyGradientControl : public PopupControl
+class AreaTransparencyGradientControl : public Control
{
public:
AreaTransparencyGradientControl (
diff --git a/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx b/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx
index 04db2e7..5dfe37c 100644
--- a/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx
+++ b/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx
@@ -23,7 +23,7 @@ namespace svx { namespace sidebar {
AreaTransparencyGradientPopup::AreaTransparencyGradientPopup (
vcl::Window* pParent,
- const ::std::function<PopupControl* (PopupContainer*)>& rControlCreator)
+ const ::std::function<Control* (PopupContainer*)>& rControlCreator)
: Popup(
pParent,
rControlCreator,
diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx
index b5038bc..45f68d5 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.cxx
@@ -46,7 +46,6 @@
#include <svx/xlncapit.hxx>
#include <svx/xlinjoit.hxx>
#include "svx/sidebar/PopupContainer.hxx"
-#include "svx/sidebar/PopupControl.hxx"
using namespace css;
using namespace css::uno;
diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
index fb19752..653a13f 100644
--- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
@@ -46,7 +46,6 @@
#include <svx/xlncapit.hxx>
#include <svx/xlinjoit.hxx>
#include "svx/sidebar/PopupContainer.hxx"
-#include "svx/sidebar/PopupControl.hxx"
using namespace css;
using namespace css::uno;
diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.hxx b/svx/source/sidebar/text/TextCharacterSpacingControl.hxx
index 7e4893b..0046ea3 100644
--- a/svx/source/sidebar/text/TextCharacterSpacingControl.hxx
+++ b/svx/source/sidebar/text/TextCharacterSpacingControl.hxx
@@ -19,7 +19,6 @@
#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_TEXT_TEXTCHARACTERSPACINGCONTROL_HXX
#define INCLUDED_SVX_SOURCE_SIDEBAR_TEXT_TEXTCHARACTERSPACINGCONTROL_HXX
-#include "svx/sidebar/PopupControl.hxx"
#include <sfx2/bindings.hxx>
#include <vcl/fixed.hxx>
#include <vcl/field.hxx>
diff --git a/svx/source/sidebar/text/TextPropertyPanel.hxx b/svx/source/sidebar/text/TextPropertyPanel.hxx
index d005ac7..13ba78a 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.hxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.hxx
@@ -35,7 +35,6 @@ class ToolBox;
namespace svx { namespace sidebar {
-class PopupControl;
class PopupContainer;
class TextPropertyPanel
diff --git a/svx/source/sidebar/text/TextUnderlineControl.hxx b/svx/source/sidebar/text/TextUnderlineControl.hxx
index 7e82602..0fd0dff 100644
--- a/svx/source/sidebar/text/TextUnderlineControl.hxx
+++ b/svx/source/sidebar/text/TextUnderlineControl.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_TEXT_TEXTUNDERLINECONTROL_HXX
#define INCLUDED_SVX_SOURCE_SIDEBAR_TEXT_TEXTUNDERLINECONTROL_HXX
-#include "svx/sidebar/PopupControl.hxx"
#include <sfx2/bindings.hxx>
#include <vcl/button.hxx>
#include <vcl/vclenum.hxx>
diff --git a/svx/source/sidebar/tools/Popup.cxx b/svx/source/sidebar/tools/Popup.cxx
index 041c31d..ffd1bf5 100644
--- a/svx/source/sidebar/tools/Popup.cxx
+++ b/svx/source/sidebar/tools/Popup.cxx
@@ -18,7 +18,6 @@
*/
#include "svx/sidebar/Popup.hxx"
#include "svx/sidebar/PopupContainer.hxx"
-#include "svx/sidebar/PopupControl.hxx"
#include <vcl/toolbox.hxx>
@@ -27,7 +26,7 @@ namespace svx { namespace sidebar {
Popup::Popup (
vcl::Window* pParent,
- const ::std::function<PopupControl* (PopupContainer*)>& rControlCreator,
+ const ::std::function<Control* (PopupContainer*)>& rControlCreator,
const ::rtl::OUString& rsAccessibleName)
: mxControl(),
mpParent(pParent),
diff --git a/svx/source/sidebar/tools/PopupControl.cxx b/svx/source/sidebar/tools/PopupControl.cxx
deleted file mode 100644
index 93e696a..0000000
--- a/svx/source/sidebar/tools/PopupControl.cxx
+++ /dev/null
@@ -1,51 +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 "svx/sidebar/PopupControl.hxx"
-#include <sfx2/sidebar/Theme.hxx>
-#include <vcl/gradient.hxx>
-
-using ::sfx2::sidebar::Theme;
-
-namespace svx { namespace sidebar {
-
-PopupControl::PopupControl (
- vcl::Window* pParent,
- const ResId& rResId)
- : Control( pParent,rResId)
-{
- EnableChildTransparentMode();
- SetControlBackground();
-
- SetBackground(Theme::GetWallpaper(Theme::Paint_DropDownBackground));
-}
-
-void PopupControl::Paint (vcl::RenderContext& rRenderContext, const Rectangle& rRect)
-{
- Control::Paint(rRenderContext, rRect);
-
- // The background is taken care of by setting the background color
- // in the constructor. Here we just paint the border.
- rRenderContext.SetFillColor();
- rRenderContext.SetLineColor(Theme::GetColor(Theme::Color_DropDownBorder));
- rRenderContext.DrawRect(Rectangle(Point(0,0), GetOutputSizePixel()));
-}
-
-} } // end of namespace svx::sidebar
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/sidebar/PageMarginControl.hxx b/sw/source/uibase/sidebar/PageMarginControl.hxx
index 5336b14..822d7a8 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.hxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.hxx
@@ -19,8 +19,6 @@
#ifndef INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_PAGEMARGINCONTROL_HXX
#define INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_PAGEMARGINCONTROL_HXX
-#include <svx/sidebar/PopupControl.hxx>
-
#include <tools/fldunit.hxx>
#include <svl/poolitem.hxx>
#include <svx/rulritem.hxx>
diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.hxx b/sw/source/uibase/sidebar/PagePropertyPanel.hxx
index e3cd3e9..0c3bf05 100644
--- a/sw/source/uibase/sidebar/PagePropertyPanel.hxx
+++ b/sw/source/uibase/sidebar/PagePropertyPanel.hxx
@@ -27,10 +27,6 @@
#include <sfx2/sidebar/ControllerItem.hxx>
-namespace svx { namespace sidebar {
- class PopupControl;
-} }
-
#include <i18nutil/paper.hxx>
#include <svx/pageitem.hxx>
diff --git a/sw/source/uibase/sidebar/PageSizeControl.hxx b/sw/source/uibase/sidebar/PageSizeControl.hxx
index 36c8c87..3bd1da1 100644
--- a/sw/source/uibase/sidebar/PageSizeControl.hxx
+++ b/sw/source/uibase/sidebar/PageSizeControl.hxx
@@ -19,8 +19,6 @@
#ifndef INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_PAGESIZECONTROL_HXX
#define INCLUDED_SW_SOURCE_UIBASE_SIDEBAR_PAGESIZECONTROL_HXX
-#include <svx/sidebar/PopupControl.hxx>
-
#include <i18nutil/paper.hxx>
#include <vcl/button.hxx>
More information about the Libreoffice-commits
mailing list