diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-07-29 02:46:50 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-07-30 05:45:22 +0200 |
commit | 57dcf78e6b17777f499fd7e7c2ee8d129bf0f79b (patch) | |
tree | 9a555967efb2810cd156a66291c331ad63eb2956 /svx/source | |
parent | fee180f13d48c1fa97a3ecde4b2067e5b0f13fc2 (diff) |
provide structure for chart line panel
Change-Id: I75204a012e4bc59f40a06db814bb9057a1cf8598
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/sidebar/line/LinePropertyPanel.hxx | 3 | ||||
-rw-r--r-- | svx/source/sidebar/line/LinePropertyPanelBase.cxx | 2 | ||||
-rw-r--r-- | svx/source/sidebar/line/LinePropertyPanelBase.hxx | 172 | ||||
-rw-r--r-- | svx/source/sidebar/line/LineWidthControl.cxx | 2 | ||||
-rw-r--r-- | svx/source/sidebar/line/LineWidthPopup.cxx | 5 | ||||
-rw-r--r-- | svx/source/sidebar/line/LineWidthPopup.hxx | 50 |
6 files changed, 6 insertions, 228 deletions
diff --git a/svx/source/sidebar/line/LinePropertyPanel.hxx b/svx/source/sidebar/line/LinePropertyPanel.hxx index 6a94423cd4cd..45f90f90b558 100644 --- a/svx/source/sidebar/line/LinePropertyPanel.hxx +++ b/svx/source/sidebar/line/LinePropertyPanel.hxx @@ -29,8 +29,7 @@ #include <memory> #include <svx/sidebar/PanelLayout.hxx> #include <svx/xtable.hxx> -#include "LineWidthPopup.hxx" -#include "LinePropertyPanelBase.hxx" +#include <svx/sidebar/LinePropertyPanelBase.hxx> class XLineStyleItem; diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx index 14ad854b5609..c04fa3f2b402 100644 --- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx +++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx @@ -19,7 +19,7 @@ #include <sfx2/sidebar/ResourceDefinitions.hrc> #include <sfx2/sidebar/Theme.hxx> #include <sfx2/sidebar/ControlFactory.hxx> -#include <LinePropertyPanelBase.hxx> +#include <svx/sidebar/LinePropertyPanelBase.hxx> #include <LinePropertyPanel.hrc> #include <svx/dialogs.hrc> #include <svx/dialmgr.hxx> diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.hxx b/svx/source/sidebar/line/LinePropertyPanelBase.hxx deleted file mode 100644 index e5dd0d9897e1..000000000000 --- a/svx/source/sidebar/line/LinePropertyPanelBase.hxx +++ /dev/null @@ -1,172 +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_SOURCE_SIDEBAR_LINE_LINEPROPERTYPANELBASE_HXX -#define INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEPROPERTYPANELBASE_HXX - -#include <svx/xdash.hxx> -#include <vcl/ctrl.hxx> -#include <sfx2/sidebar/SidebarPanelBase.hxx> -#include <sfx2/sidebar/ControllerItem.hxx> -#include <vcl/fixed.hxx> -#include <vcl/field.hxx> -#include <vcl/layout.hxx> -#include <memory> -#include <svx/sidebar/PanelLayout.hxx> -#include <svx/xtable.hxx> -#include "LineWidthPopup.hxx" - - -class XLineStyleItem; -class XLineDashItem; -class XLineStartItem; -class XLineWidthItem; -class XLineEndItem; -class XLineEndList; -class XLineJointItem; -class XLineCapItem; -class XLineTransparenceItem; -class XDashList; -class ListBox; -class ToolBox; -class FloatingWindow; - -namespace -{ - -#define SIDEBAR_LINE_WIDTH_GLOBAL_VALUE "PopupPanel_LineWidth" - -} //end of anonymous namespace - -namespace svx -{ -namespace sidebar -{ - -class PopupContainer; -class LineWidthControl; - -class LinePropertyPanelBase : public PanelLayout -{ -public: - virtual ~LinePropertyPanelBase(); - virtual void dispose() SAL_OVERRIDE; - - virtual void DataChanged( - const DataChangedEvent& rEvent) SAL_OVERRIDE; - - void SetWidth(long nWidth); - void SetWidthIcon(int n); - void SetWidthIcon(); - - void EndLineWidthPopupMode(); - - // constructor/destuctor - LinePropertyPanelBase( - vcl::Window* pParent, - const css::uno::Reference<css::frame::XFrame>& rxFrame); - - virtual void setLineWidth(const XLineWidthItem& rItem) = 0; - -protected: - - virtual void setLineStyle(const XLineStyleItem& rItem) = 0; - virtual void setLineDash(const XLineDashItem& rItem) = 0; - virtual void setLineEndStyle(const XLineEndItem* pItem) = 0; - virtual void setLineStartStyle(const XLineStartItem* pItem) = 0; - virtual void setLineTransparency(const XLineTransparenceItem& rItem) = 0; - virtual void setLineJoint(const XLineJointItem* pItem) = 0; - virtual void setLineCap(const XLineCapItem* pItem) = 0; - - - void updateLineStyle(bool bDisabled, bool bSetOrDefault, const XLineStyleItem* pItem); - void updateLineDash(bool bDisabled, bool bSetOrDefault, const XLineDashItem* pItem); - void updateLineTransparence(bool bDisabled, bool bSetOrDefault, const XLineTransparenceItem* pItem); - void updateLineWidth(bool bDisabled, bool bSetOrDefault, const XLineWidthItem* pItem); - void updateLineStart(bool bDisabled, bool bSetOrDefault, const XLineStartItem* pItem); - void updateLineEnd(bool bDisabled, bool bSetOrDefault, const XLineEndItem* pItem); - void updateLineJoint(bool bDisabled, bool bSetOrDefault, const XLineJointItem* pItem); - void updateLineCap(bool bDisabled, bool bSetOrDefault, const XLineCapItem* pItem); - - void FillLineEndList(); - void FillLineStyleList(); - void SelectEndStyle(bool bStart); - void SelectLineStyle(); - void ActivateControls(); - -private: - //ui controls - VclPtr<FixedText> mpFTWidth; - VclPtr<ToolBox> mpTBWidth; - VclPtr<FixedText> mpFTStyle; - VclPtr<ListBox> mpLBStyle; - VclPtr<FixedText> mpFTTransparency; - VclPtr<MetricField> mpMFTransparent; - VclPtr<FixedText> mpFTArrow; - VclPtr<ListBox> mpLBStart; - VclPtr<ListBox> mpLBEnd; - VclPtr<FixedText> mpFTEdgeStyle; - VclPtr<ListBox> mpLBEdgeStyle; - VclPtr<FixedText> mpFTCapStyle; - VclPtr<ListBox> mpLBCapStyle; - VclPtr<VclGrid> mpGridLineProps; - VclPtr<VclVBox> mpBoxArrowProps; - - std::unique_ptr<XLineStyleItem> mpStyleItem; - std::unique_ptr<XLineDashItem> mpDashItem; - - sal_uInt16 mnTrans; - SfxMapUnit meMapUnit; - sal_Int32 mnWidthCoreValue; - XLineEndListRef mxLineEndList; - XDashListRef mxLineStyleList; - std::unique_ptr<XLineStartItem> mpStartItem; - std::unique_ptr<XLineEndItem> mpEndItem; - - //popup windows - LineWidthPopup maLineWidthPopup; - - // images from resource - Image maIMGNone; - - // multi-images - std::unique_ptr<Image[]> mpIMGWidthIcon; - - css::uno::Reference<css::frame::XFrame> mxFrame; - - /// bitfield - bool mbWidthValuable : 1; - - void Initialize(); - - DECL_LINK(ChangeLineStyleHdl, void*); - DECL_LINK_TYPED(ToolboxWidthSelectHdl, ToolBox*, void); - DECL_LINK(ChangeTransparentHdl , void *); - DECL_LINK(ChangeStartHdl, void *); - DECL_LINK(ChangeEndHdl, void *); - DECL_LINK(ChangeEdgeStyleHdl, void *); - DECL_LINK(ChangeCapStyleHdl, void *); - - VclPtr<PopupControl> CreateLineWidthPopupControl (PopupContainer* pParent); -}; - -} } // end of namespace svx::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/line/LineWidthControl.cxx b/svx/source/sidebar/line/LineWidthControl.cxx index 2bee185dbdaa..4053c495a047 100644 --- a/svx/source/sidebar/line/LineWidthControl.cxx +++ b/svx/source/sidebar/line/LineWidthControl.cxx @@ -18,7 +18,7 @@ */ #include "LineWidthControl.hxx" #include "LinePropertyPanel.hrc" -#include "LinePropertyPanelBase.hxx" +#include <svx/sidebar/LinePropertyPanelBase.hxx> #include <svx/dialogs.hrc> #include <svx/dialmgr.hxx> diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx index 968a58d91193..351d12d11bc3 100644 --- a/svx/source/sidebar/line/LineWidthPopup.cxx +++ b/svx/source/sidebar/line/LineWidthPopup.cxx @@ -16,9 +16,10 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "LineWidthPopup.hxx" +#include <svx/sidebar/LineWidthPopup.hxx> #include "LineWidthControl.hxx" -#include "LinePropertyPanel.hxx" + +#include <svx/sidebar/LinePropertyPanelBase.hxx> #include <unotools/viewoptions.hxx> diff --git a/svx/source/sidebar/line/LineWidthPopup.hxx b/svx/source/sidebar/line/LineWidthPopup.hxx deleted file mode 100644 index 772934fb07b3..000000000000 --- a/svx/source/sidebar/line/LineWidthPopup.hxx +++ /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 . - */ -#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHPOPUP_HXX -#define INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHPOPUP_HXX - -#include "svx/sidebar/Popup.hxx" - -#include <svl/poolitem.hxx> - -#include <boost/function.hpp> - - -namespace svx { namespace sidebar { - -class LineWidthPopup - : public Popup -{ -public: - LineWidthPopup ( - vcl::Window* pParent, - const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator); - virtual ~LineWidthPopup(); - - void SetWidthSelect (long lValue, bool bValuable, SfxMapUnit eMapUnit); - -private: - void PopupModeEndCallback(); -}; - -} } // end of namespace svx::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |