LCOV - code coverage report
Current view: top level - svx/source/sidebar/paragraph - ParaPropertyPanel.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 3 0.0 %
Date: 2014-11-03 Functions: 0 3 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : #ifndef INCLUDED_SVX_SOURCE_SIDEBAR_PARAGRAPH_PARAPROPERTYPANEL_HXX
      20             : #define INCLUDED_SVX_SOURCE_SIDEBAR_PARAGRAPH_PARAPROPERTYPANEL_HXX
      21             : 
      22             : #include <vcl/ctrl.hxx>
      23             : #include <sfx2/sidebar/ControllerItem.hxx>
      24             : #include <sfx2/sidebar/IContextChangeReceiver.hxx>
      25             : #include <editeng/lspcitem.hxx>
      26             : #include <svtools/ctrlbox.hxx>
      27             : #include <svx/sidebar/PanelLayout.hxx>
      28             : #include <svx/relfld.hxx>
      29             : #include <editeng/svxenum.hxx>
      30             : #include <editeng/fhgtitem.hxx>
      31             : 
      32             : #include <com/sun/star/frame/XFrame.hpp>
      33             : #include <com/sun/star/ui/XSidebar.hpp>
      34             : 
      35             : #include <vcl/vclenum.hxx>
      36             : #include <vcl/fixed.hxx>
      37             : #include <svl/poolitem.hxx>
      38             : #include <tools/fldunit.hxx>
      39             : 
      40             : #include "ParaBulletsPopup.hxx"
      41             : #include "ParaNumberingPopup.hxx"
      42             : #include "ParaLineSpacingPopup.hxx"
      43             : 
      44             : class FloatingWindow;
      45             : class ToolBox;
      46             : 
      47             : 
      48             : namespace svx { namespace sidebar {
      49             : 
      50             : class PopupControl;
      51             : class PopupContainer;
      52             : 
      53             : class ParaPropertyPanel
      54             :     : public PanelLayout,
      55             :       public ::sfx2::sidebar::IContextChangeReceiver,
      56             :       public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
      57             : {
      58             : public:
      59             :     static ParaPropertyPanel* Create (
      60             :         vcl::Window* pParent,
      61             :         const css::uno::Reference<css::frame::XFrame>& rxFrame,
      62             :         SfxBindings* pBindings,
      63             :         const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
      64             : 
      65             :     virtual void DataChanged (const DataChangedEvent& rEvent) SAL_OVERRIDE;
      66           0 :     SfxBindings* GetBindings() { return mpBindings;}
      67             : 
      68             :     virtual void HandleContextChange (
      69             :         const ::sfx2::sidebar::EnumContext aContext) SAL_OVERRIDE;
      70             : 
      71             :     virtual void NotifyItemUpdate(
      72             :         const sal_uInt16 nSId,
      73             :         const SfxItemState eState,
      74             :         const SfxPoolItem* pState,
      75             :         const bool bIsEnabled) SAL_OVERRIDE;
      76             : 
      77           0 :     sal_uInt16 GetBulletTypeIndex(){ return mnBulletTypeIndex; }
      78           0 :     sal_uInt16 GetNumTypeIndex(){ return mnNumTypeIndex; }
      79             :     FieldUnit GetCurrentUnit( SfxItemState eState, const SfxPoolItem* pState );
      80             : 
      81             :     void EndSpacingPopupMode (void);
      82             :     void EndBulletsPopupMode (void);
      83             :     void EndNumberingPopupMode (void);
      84             : 
      85             : private:
      86             :     // UI controls
      87             :     //Alignment
      88             :     ToolBox*            mpTBxVertAlign;
      89             :     //NumBullet&Backcolor
      90             :     ToolBox*            mpTBxNumBullet;
      91             :     ToolBox*            mpTBxBackColor;
      92             :     //Paragraph spacing
      93             :     ToolBox*            mpTbxUL_IncDec;
      94             :     SvxRelativeField*   mpTopDist;
      95             :     SvxRelativeField*   mpBottomDist;
      96             :     ToolBox*            mpLineSPTbx;
      97             :     ToolBox*            mpTbxIndent_IncDec;
      98             :     ToolBox*            mpTbxProDemote;
      99             :     SvxRelativeField*   mpLeftIndent;
     100             :     SvxRelativeField*   mpRightIndent;
     101             :     SvxRelativeField*   mpFLineIndent;
     102             : 
     103             :     // Resources
     104             :     Image  maSpace3;
     105             :     Image  maIndHang;
     106             : 
     107             :     ImageList   maNumBImageList;
     108             :     ImageList   maNumBImageListRTL;
     109             : 
     110             :     // Data Member
     111             :     long                maTxtLeft;
     112             :     //Line spacing
     113             :     SvxLineSpacingItem  *mpLnSPItem;
     114             :     SfxItemState            meLnSpState;
     115             :     bool                    mbOutLineLeft;
     116             :     bool                    mbOutLineRight;
     117             :     long                    maUpper;
     118             :     long                    maLower;
     119             : 
     120             :     sal_uInt16          mnBulletTypeIndex;
     121             :     sal_uInt16          mnNumTypeIndex;
     122             :     FieldUnit                       m_eMetricUnit;
     123             :     FieldUnit                       m_last_eMetricUnit;
     124             :     SfxMapUnit                      m_eLRSpaceUnit;
     125             :     SfxMapUnit                      m_eULSpaceUnit;
     126             :     // Control Items
     127             :     ::sfx2::sidebar::ControllerItem  maLRSpaceControl;
     128             :     ::sfx2::sidebar::ControllerItem  maLNSpaceControl;
     129             :     ::sfx2::sidebar::ControllerItem  maULSpaceControl;
     130             :     ::sfx2::sidebar::ControllerItem  maOutLineLeftControl;
     131             :     ::sfx2::sidebar::ControllerItem  maOutLineRightControl;
     132             :     ::sfx2::sidebar::ControllerItem  maDecIndentControl;
     133             :     ::sfx2::sidebar::ControllerItem  maIncIndentControl;
     134             :     ::sfx2::sidebar::ControllerItem  maBulletOnOff;
     135             :     ::sfx2::sidebar::ControllerItem  maNumberOnOff;
     136             :     ::sfx2::sidebar::ControllerItem  m_aMetricCtl;
     137             :     ::sfx2::sidebar::ControllerItem  maBulletNumRuleIndex;
     138             :     ::sfx2::sidebar::ControllerItem  maNumNumRuleIndex;
     139             : 
     140             :     css::uno::Reference<css::frame::XFrame> mxFrame;
     141             :     ::sfx2::sidebar::EnumContext maContext;
     142             :     SfxBindings* mpBindings;
     143             :     ParaLineSpacingPopup maLineSpacePopup;
     144             :     ParaBulletsPopup maBulletsPopup;
     145             :     ParaNumberingPopup maNumberingPopup;
     146             :     css::uno::Reference<css::ui::XSidebar> mxSidebar;
     147             : 
     148             : 
     149             :     ParaPropertyPanel (
     150             :         vcl::Window* pParent,
     151             :         const css::uno::Reference<css::frame::XFrame>& rxFrame,
     152             :         SfxBindings* pBindings,
     153             :         const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
     154             :     virtual ~ParaPropertyPanel (void);
     155             : 
     156             :     DECL_LINK(NumBTbxSelectHandler, ToolBox*);
     157             :     DECL_LINK(ModifyIndentHdl_Impl, void*);
     158             :     DECL_LINK(ClickIndent_IncDec_Hdl_Impl, ToolBox*);
     159             :     DECL_LINK(ClickProDemote_Hdl_Impl, ToolBox*);
     160             :     DECL_LINK(ULSpaceHdl_Impl, void*);
     161             :     DECL_LINK(ClickUL_IncDec_Hdl_Impl, ToolBox*);
     162             : 
     163             :     void StateChangedIndentImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
     164             :     void StateChangedLnSPImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
     165             :     void StateChangedULImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
     166             :     void StateChangeOutLineImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
     167             :     void StateChangeIncDecImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
     168             :     // Add toggle state for numbering and bullet icons
     169             :     void StateChangeBulletNumImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
     170             :     //Modified for Numbering&Bullets Dialog UX Enh
     171             :     //Handing the transferred the num rule index data of the current selection
     172             :     void StateChangeBulletNumRuleImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
     173             : 
     174             :     void initial();
     175             :     void ReSize(bool bSize);
     176             : 
     177             : 
     178             :     PopupControl* CreateLineSpacingControl (PopupContainer* pParent);
     179             :     PopupControl* CreateBulletsPopupControl (PopupContainer* pParent);
     180             :     PopupControl* CreateNumberingPopupControl (PopupContainer* pParent);
     181             :     DECL_LINK(ClickLineSPDropDownHdl_Impl, ToolBox*);
     182             :     DECL_LINK(NumBTbxDDHandler, ToolBox*);
     183             : 
     184             :     void InitToolBoxIndent();
     185             :     void InitToolBoxBulletsNumbering();
     186             :     void InitToolBoxSpacing();
     187             :     void InitToolBoxLineSpacing();
     188             : };
     189             : 
     190             : } } // end of namespace ::svx::sidebar
     191             : 
     192             : #endif
     193             : 
     194             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10