/* -*- 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_CUI_SOURCE_INC_PARAGRPH_HXX #define INCLUDED_CUI_SOURCE_INC_PARAGRPH_HXX #include #include #include #include #include #include #include #include class SvxLineSpacingItem; // class SvxStdParagraphTabPage ------------------------------------------ /* [Description] With this TabPage standard attributes of a paragraph can be set (indention, distance, alignment, line spacing). [Items] */ class SvxStdParagraphTabPage: public SfxTabPage { friend class VclPtr; using TabPage::DeactivatePage; static const sal_uInt16 pStdRanges[]; private: SvxStdParagraphTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); // indention VclPtr m_pLeftIndent; VclPtr m_pRightLabel; VclPtr m_pRightIndent; VclPtr m_pFLineLabel; VclPtr m_pFLineIndent; VclPtr m_pAutoCB; // distance VclPtr m_pTopDist; VclPtr m_pBottomDist; VclPtr m_pContextualCB; // line spacing VclPtr m_pLineDist; VclPtr m_pLineDistAtLabel; VclPtr m_pLineDistAtPercentBox; VclPtr m_pLineDistAtMetricBox; VclPtr m_pAbsDist; OUString sAbsDist; VclPtr m_pExampleWin; // only writer VclPtr m_pRegisterFL; VclPtr m_pRegisterCB; long nAbst; long nWidth; long nMinFixDist; bool bRelativeMode; void SetLineSpacing_Impl( const SvxLineSpacingItem& rAttr ); void Init_Impl(); void UpdateExample_Impl(); DECL_LINK( LineDistHdl_Impl, ListBox&, void ); DECL_LINK( ModifyHdl_Impl, Edit&, void ); DECL_LINK( AutoHdl_Impl, Button*, void ); protected: virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; public: virtual ~SvxStdParagraphTabPage() override; virtual void dispose() override; DECL_LINK(ELRLoseFocusHdl, Control&, void); static VclPtr Create( vcl::Window* pParent, const SfxItemSet* rSet ); static const sal_uInt16* GetRanges() { return pStdRanges; } virtual bool FillItemSet( SfxItemSet* rSet ) override; virtual void Reset( const SfxItemSet* rSet ) override; virtual void ChangesApplied() override; void EnableRelativeMode(); void EnableRegisterMode(); void EnableContextualMode(); void EnableAutoFirstLine(); void EnableAbsLineDist(long nMinTwip); void EnableNegativeMode(); virtual void PageCreated(const SfxAllItemSet& aSet) override; }; // class SvxParaAlignTabPage ------------------------------------------------ class SvxParaAlignTabPage : public SfxTabPage { friend class VclPtr; using TabPage::DeactivatePage; static const sal_uInt16 pAlignRanges[]; // alignment VclPtr m_pLeft; VclPtr m_pRight; VclPtr m_pCenter; VclPtr m_pJustify; VclPtr m_pLeftBottom; VclPtr m_pRightTop; VclPtr m_pLastLineFT; VclPtr m_pLastLineLB; VclPtr m_pExpandCB; VclPtr m_pSnapToGridCB; //preview VclPtr m_pExampleWin; //vertical alignment VclPtr m_pVertAlignFL; VclPtr m_pVertAlignLB; VclPtr m_pPropertiesFL; VclPtr m_pTextDirectionLB; DECL_LINK(AlignHdl_Impl, Button*, void); DECL_LINK(LastLineHdl_Impl, ListBox&, void); DECL_LINK(TextDirectionHdl_Impl, ListBox&, void); void UpdateExample_Impl(); SvxParaAlignTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); protected: virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; public: virtual ~SvxParaAlignTabPage() override; virtual void dispose() override; static VclPtr Create( vcl::Window* pParent, const SfxItemSet* rSet ); static const sal_uInt16* GetRanges() { return pAlignRanges; } virtual bool FillItemSet( SfxItemSet* rSet ) override; virtual void Reset( const SfxItemSet* rSet ) override; virtual void ChangesApplied() override; void EnableJustifyExt(); virtual void PageCreated(const SfxAllItemSet& aSet) override; }; // class SvxExtParagraphTabPage ------------------------------------------ /* [Description] With this TabPage special attributes of a paragraph can be set (hyphenation, pagebreak, orphan, widow, ...). [Items] */ class SvxExtParagraphTabPage: public SfxTabPage { friend class VclPtr; using TabPage::DeactivatePage; static const sal_uInt16 pExtRanges[]; public: virtual ~SvxExtParagraphTabPage() override; virtual void dispose() override; static VclPtr Create( vcl::Window* pParent, const SfxItemSet* rSet ); static const sal_uInt16* GetRanges() { return pExtRanges; } virtual bool FillItemSet( SfxItemSet* rSet ) override; virtual void Reset( const SfxItemSet* rSet ) override; virtual void ChangesApplied() override; void DisablePageBreak(); protected: virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; private: SvxExtParagraphTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); // hyphenation VclPtr m_pHyphenBox; VclPtr m_pBeforeText; VclPtr m_pExtHyphenBeforeBox; VclPtr m_pAfterText; VclPtr m_pExtHyphenAfterBox; VclPtr m_pMaxHyphenLabel; VclPtr m_pMaxHyphenEdit; // pagebreak VclPtr m_pPageBreakBox; VclPtr m_pBreakTypeFT; VclPtr m_pBreakTypeLB; VclPtr m_pBreakPositionFT; VclPtr m_pBreakPositionLB; VclPtr m_pApplyCollBtn; VclPtr m_pApplyCollBox; VclPtr m_pPageNumBox; VclPtr m_pPagenumEdit; // paragraph division VclPtr m_pKeepTogetherBox; VclPtr m_pKeepParaBox; // orphan/widow VclPtr m_pOrphanBox; VclPtr m_pOrphanRowNo; VclPtr m_pOrphanRowLabel; VclPtr m_pWidowBox; VclPtr m_pWidowRowNo; VclPtr m_pWidowRowLabel; bool bPageBreak; bool bHtmlMode; sal_uInt16 nStdPos; DECL_LINK(PageBreakHdl_Impl, Button*, void); DECL_LINK(KeepTogetherHdl_Impl, Button*, void); DECL_LINK(WidowHdl_Impl, Button*, void); DECL_LINK(OrphanHdl_Impl, Button*, void); DECL_LINK(HyphenClickHdl_Impl, Button*, void); DECL_LINK(ApplyCollClickHdl_Impl, Button*, void); DECL_LINK( PageBreakPosHdl_Impl, ListBox&, void ); DECL_LINK( PageBreakTypeHdl_Impl, ListBox&, void ); DECL_LINK(PageNumBoxClickHdl_Impl, Button*, void); virtual void PageCreated(const SfxAllItemSet& aSet) override; }; class SvxAsianTabPage : public SfxTabPage { friend class VclPtr; VclPtr m_pForbiddenRulesCB; VclPtr m_pHangingPunctCB; VclPtr m_pScriptSpaceCB; SvxAsianTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); DECL_STATIC_LINK( SvxAsianTabPage, ClickHdl_Impl, Button*, void ); public: virtual ~SvxAsianTabPage() override; virtual void dispose() override; static VclPtr Create( vcl::Window* pParent, const SfxItemSet* rSet ); static const sal_uInt16* GetRanges(); virtual bool FillItemSet( SfxItemSet* rSet ) override; virtual void Reset( const SfxItemSet* rSet ) override; virtual void ChangesApplied() override; }; #endif // INCLUDED_CUI_SOURCE_INC_PARAGRPH_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */