Bump version to 6.4.7.2.M8
[LibreOffice.git] / cui / source / inc / textattr.hxx
blob392794de95436105ea546ce76855f77a42055d5a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_CUI_SOURCE_INC_TEXTATTR_HXX
20 #define INCLUDED_CUI_SOURCE_INC_TEXTATTR_HXX
22 #include <svx/dlgctrl.hxx>
23 #include <svx/svdobj.hxx>
25 class SdrView;
27 /*************************************************************************
29 |* Dialog for changing TextAttributes
31 \************************************************************************/
33 class SvxTextAttrPage : public SvxTabPage
35 private:
36 static const sal_uInt16 pRanges[];
38 const SfxItemSet& rOutAttrs;
39 SdrObjKind m_eObjKind;
41 bool bAutoGrowSizeEnabled;
42 bool bContourEnabled;
43 bool bAutoGrowWidthEnabled;
44 bool bAutoGrowHeightEnabled;
45 bool bWordWrapTextEnabled;
46 bool bFitToSizeEnabled;
48 SvxRectCtl m_aCtlPosition;
50 std::unique_ptr<weld::Widget> m_xDrawingText;
51 std::unique_ptr<weld::Widget> m_xCustomShapeText;
52 std::unique_ptr<weld::CheckButton> m_xTsbAutoGrowWidth;
53 std::unique_ptr<weld::CheckButton> m_xTsbAutoGrowHeight;
54 std::unique_ptr<weld::CheckButton> m_xTsbFitToSize;
55 std::unique_ptr<weld::CheckButton> m_xTsbContour;
56 std::unique_ptr<weld::CheckButton> m_xTsbWordWrapText;
57 std::unique_ptr<weld::CheckButton> m_xTsbAutoGrowSize;
58 std::unique_ptr<weld::Frame> m_xFlDistance;
59 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldLeft;
60 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldRight;
61 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldTop;
62 std::unique_ptr<weld::MetricSpinButton> m_xMtrFldBottom;
63 std::unique_ptr<weld::Frame> m_xFlPosition;
64 std::unique_ptr<weld::CustomWeld> m_xCtlPosition;
65 std::unique_ptr<weld::CheckButton> m_xTsbFullWidth;
67 DECL_LINK(ClickFullWidthHdl_Impl, weld::Button&, void);
68 DECL_LINK(ClickHdl_Impl, weld::Button&, void);
70 /** Return whether the text direction is from left to right (</sal_True>) or
71 top to bottom (</sal_False>).
73 bool IsTextDirectionLeftToRight() const;
75 public:
77 SvxTextAttrPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
78 virtual ~SvxTextAttrPage() override;
80 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
81 static const sal_uInt16* GetRanges() { return pRanges; }
83 virtual bool FillItemSet( SfxItemSet* ) override;
84 virtual void Reset( const SfxItemSet * ) override;
86 virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) override;
88 void Construct();
89 void SetObjKind(SdrObjKind eObjKind) { m_eObjKind = eObjKind; }
90 virtual void PageCreated(const SfxAllItemSet& aSet) override;
93 #endif // INCLUDED_CUI_SOURCE_INC_TEXTATTR_HXX
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */