LibreOffice Module sc (master) 1
CellAppearancePropertyPanel.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#pragma once
20
24#include <vcl/EnumContext.hxx>
25#include <vcl/image.hxx>
26#include <com/sun/star/frame/XFrame.hpp>
27
30
31namespace sc::sidebar {
32
34: public PanelLayout,
37{
38private:
39 friend class CellLineStylePopup;
41
42public:
43 static std::unique_ptr<PanelLayout> Create(
44 weld::Widget* pParent,
45 const css::uno::Reference<css::frame::XFrame>& rxFrame,
46 SfxBindings* pBindings);
47
48 virtual void HandleContextChange(
49 const vcl::EnumContext& rContext) override;
50
51 virtual void NotifyItemUpdate(
52 const sal_uInt16 nSId,
53 const SfxItemState eState,
54 const SfxPoolItem* pState) override;
55
56 virtual void GetControlState(
57 const sal_uInt16 /*nSId*/,
58 boost::property_tree::ptree& /*rState*/) override {};
59
61
62 // constructor/destructor
64 weld::Widget* pParent,
65 const css::uno::Reference<css::frame::XFrame>& rxFrame,
66 SfxBindings* pBindings);
67 virtual ~CellAppearancePropertyPanel() override;
68
69private:
70 //ui controls
71
72 std::unique_ptr<ToolbarPopupContainer> mxCellBorderPopoverContainer;
73 std::unique_ptr<weld::Toolbar> mxTBCellBorder;
74 std::unique_ptr<weld::Toolbar> mxTBCellBackground;
75 std::unique_ptr<ToolbarUnoDispatcher> mxBackColorDispatch;
76 std::unique_ptr<ToolbarPopupContainer> mxLinePopoverContainer;
77 std::unique_ptr<weld::Toolbar> mxTBLineStyle;
78 std::unique_ptr<weld::Toolbar> mxTBLineColor;
79 std::unique_ptr<ToolbarUnoDispatcher> mxLineColorDispatch;
80
83
90
91 // images
103
104 // BorderStyle defines
105 sal_uInt16 mnInWidth;
106 sal_uInt16 mnOutWidth;
107 sal_uInt16 mnDistance;
114
116
117 // CellBorder defines
118 bool mbLeft : 1;
119 bool mbRight : 1;
120 bool mbTop : 1;
121 bool mbBottom : 1;
122 bool mbVer : 1;
123 bool mbHor : 1;
124
125 bool mbOuterBorder : 1; // mbLeft || mbRight || mbTop || mbBottom
126 bool mbInnerBorder : 1; // mbVer || mbHor || bLeft || bRight || bTop || bBottom
127
128 bool mbDiagTLBR : 1;
129 bool mbDiagBLTR : 1;
130
133
134 DECL_LINK(TbxCellBorderSelectHdl, const OString&, void);
135 DECL_LINK(TbxCellBorderMenuHdl, const OString&, void);
136 DECL_LINK(TbxLineStyleSelectHdl, const OString&, void);
137 DECL_LINK(TbxLineStyleMenuHdl, const OString&, void);
138
139 void Initialize();
140 void SetStyleIcon();
141 void UpdateControlState();
142 void UpdateCellBorder(bool bTop, bool bBot, bool bLeft, bool bRight, bool bVer, bool bHor, bool bTLBR, bool bBLTR);
143};
144
145} // end of namespace ::sc::sidebar
146
147/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem *pState) override
std::unique_ptr< ToolbarPopupContainer > mxCellBorderPopoverContainer
std::unique_ptr< ToolbarUnoDispatcher > mxLineColorDispatch
DECL_LINK(TbxCellBorderMenuHdl, const OString &, void)
std::unique_ptr< ToolbarUnoDispatcher > mxBackColorDispatch
virtual void HandleContextChange(const vcl::EnumContext &rContext) override
DECL_LINK(TbxLineStyleSelectHdl, const OString &, void)
DECL_LINK(TbxLineStyleMenuHdl, const OString &, void)
static std::unique_ptr< PanelLayout > Create(weld::Widget *pParent, const css::uno::Reference< css::frame::XFrame > &rxFrame, SfxBindings *pBindings)
::sfx2::sidebar::ControllerItem maBorderInnerControl
void UpdateCellBorder(bool bTop, bool bBot, bool bLeft, bool bRight, bool bVer, bool bHor, bool bTLBR, bool bBLTR)
std::unique_ptr< weld::Toolbar > mxTBCellBackground
virtual void GetControlState(const sal_uInt16, boost::property_tree::ptree &) override
std::unique_ptr< ToolbarPopupContainer > mxLinePopoverContainer
CellAppearancePropertyPanel(weld::Widget *pParent, const css::uno::Reference< css::frame::XFrame > &rxFrame, SfxBindings *pBindings)
DECL_LINK(TbxCellBorderSelectHdl, const OString &, void)
::sfx2::sidebar::ControllerItem maBorderOuterControl
SfxItemState