From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- sd/source/ui/inc/BulletAndPositionDlg.hxx | 157 ++++++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 sd/source/ui/inc/BulletAndPositionDlg.hxx (limited to 'sd/source/ui/inc/BulletAndPositionDlg.hxx') diff --git a/sd/source/ui/inc/BulletAndPositionDlg.hxx b/sd/source/ui/inc/BulletAndPositionDlg.hxx new file mode 100644 index 000000000..6dde73753 --- /dev/null +++ b/sd/source/ui/inc/BulletAndPositionDlg.hxx @@ -0,0 +1,157 @@ +/* -*- 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 . + */ + +#pragma once + +#include +#include + +#include +#include +#include +#include "View.hxx" +#include + +#define MN_GALLERY_ENTRY 100 + +class ColorListBox; +class SvxNumValueSet; +class SvxNumRule; +class SvxBmpNumValueSet; +class SvxBrushItem; +class SdDrawDocument; + +namespace sd +{ +class View; +} + +/// Main class for handling the bullets, numbering format and their position. +class SvxBulletAndPositionDlg : public weld::GenericDialogController +{ + OUString m_sNumCharFmtName; + + Timer aInvalidateTimer; + + std::unique_ptr pActNum; + std::unique_ptr pSaveNum; + const SfxItemSet& rFirstStateSet; + + Size aInitSize[SVX_MAX_NUM]; + + bool bLastWidthModified : 1; + bool bModified : 1; + bool bInInitControl : 1; // workaround for Modify-error, is said to be corrected from 391 on + bool bLabelAlignmentPosAndSpaceModeActive; + bool bApplyToMaster; + + std::vector aGrfNames; + vcl::Font aActBulletFont; + + sal_uInt8 nBullet; + sal_uInt16 nActNumLvl; + weld::Window* p_Window; + TypedWhichId nNumItemId; + MapUnit eCoreUnit; + + SvxNumberingPreview m_aPreviewWIN; + std::unique_ptr m_xGrid; + std::unique_ptr m_xLevelLB; + std::unique_ptr m_xFmtLB; + std::unique_ptr m_xPrefixFT; + std::unique_ptr m_xPrefixED; + std::unique_ptr m_xSuffixFT; + std::unique_ptr m_xSuffixED; + std::unique_ptr m_xBeforeAfter; + std::unique_ptr m_xBulColorFT; + std::unique_ptr m_xBulColLB; + std::unique_ptr m_xBulRelSizeFT; + std::unique_ptr m_xBulRelSizeMF; + std::unique_ptr m_xStartFT; + std::unique_ptr m_xStartED; + std::unique_ptr m_xBulletFT; + std::unique_ptr m_xBulletPB; + std::unique_ptr m_xBitmapMB; + std::unique_ptr m_xWidthFT; + std::unique_ptr m_xWidthMF; + std::unique_ptr m_xHeightFT; + std::unique_ptr m_xHeightMF; + std::unique_ptr m_xRatioCB; + std::unique_ptr m_xGalleryMenu; + std::unique_ptr m_xPreviewWIN; + std::unique_ptr m_xDistBorderFT; + std::unique_ptr m_xDistBorderMF; + std::unique_ptr m_xRelativeCB; + std::unique_ptr m_xIndentFT; + std::unique_ptr m_xIndentMF; + std::unique_ptr m_xLeftTB; + std::unique_ptr m_xCenterTB; + std::unique_ptr m_xRightTB; + std::unique_ptr m_xSlideRB; + std::unique_ptr m_xSelectionRB; + std::unique_ptr m_xApplyToMaster; + std::unique_ptr m_xReset; + + void InitControls(); + /** To switch between the numbering type + 0 - Number; + 1 - Bullet; + 2 - Bitmap; */ + void SwitchNumberType(sal_uInt8 nType); + void CheckForStartValue_Impl(sal_uInt16 nNumberingType); + + DECL_LINK(NumberTypeSelectHdl_Impl, weld::ComboBox&, void); + DECL_LINK(LevelHdl_Impl, weld::TreeView&, void); + DECL_LINK(PopupActivateHdl_Impl, weld::Toggleable&, void); + DECL_LINK(GraphicHdl_Impl, const OString&, void); + DECL_LINK(BulletHdl_Impl, weld::Button&, void); + DECL_LINK(SizeHdl_Impl, weld::MetricSpinButton&, void); + DECL_LINK(RatioHdl_Impl, weld::Toggleable&, void); + DECL_LINK(EditModifyHdl_Impl, weld::Entry&, void); + DECL_LINK(SpinModifyHdl_Impl, weld::SpinButton&, void); + DECL_LINK(BulColorHdl_Impl, ColorListBox&, void); + DECL_LINK(BulRelSizeHdl_Impl, weld::MetricSpinButton&, void); + DECL_LINK(PreviewInvalidateHdl_Impl, Timer*, void); + DECL_LINK(DistanceHdl_Impl, weld::MetricSpinButton&, void); + DECL_LINK(RelativeHdl_Impl, weld::Toggleable&, void); + DECL_LINK(SelectLeftAlignmentHdl_Impl, weld::Toggleable&, void); + DECL_LINK(SelectCenterAlignmentHdl_Impl, weld::Toggleable&, void); + DECL_LINK(SelectRightAlignmentHdl_Impl, weld::Toggleable&, void); + DECL_LINK(ApplyToMasterHdl_Impl, weld::Toggleable&, void); + DECL_LINK(ResetHdl_Impl, weld::Button&, void); + void EditModifyHdl_Impl(const weld::Entry*); + void InitPosAndSpaceMode(); + void SetAlignmentHdl_Impl(SvxAdjust); + +public: + SvxBulletAndPositionDlg(weld::Window* pWindow, const SfxItemSet& rSet, const ::sd::View* pView); + virtual ~SvxBulletAndPositionDlg() override; + + SfxItemSet* GetOutputItemSet(SfxItemSet* rSet); + bool IsApplyToMaster() const; + bool IsSlideScope() const; + void Reset(const SfxItemSet* rSet); + + void SetCharFmt(const OUString& rNumName) { m_sNumCharFmtName = rNumName; } + void SetMetric(FieldUnit eSet); + + void SetModified(bool bRepaint = true); +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3