bump product version to 5.0.4.1
[LibreOffice.git] / cui / source / inc / labdlg.hxx
blob7995287a00ecdd2fa75973171a4a0d0115341b7a
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_LABDLG_HXX
20 #define INCLUDED_CUI_SOURCE_INC_LABDLG_HXX
22 #include <vcl/field.hxx>
23 #include <vcl/lstbox.hxx>
24 #include <vcl/fixed.hxx>
25 #include <svtools/valueset.hxx>
26 #include <sfx2/tabdlg.hxx>
27 class SdrView;
29 // class SvxCaptionTabPage -----------------------------------------------
31 const sal_uInt16 CAPTYPE_BITMAPS_COUNT = 3;
33 class SvxCaptionTabPage : public SfxTabPage
35 private:
36 static const sal_uInt16 pCaptionRanges[];
37 VclPtr<ValueSet> m_pCT_CAPTTYPE;
38 VclPtr<MetricField> m_pMF_ABSTAND;
39 VclPtr<ListBox> m_pLB_ANSATZ;
40 VclPtr<FixedText> m_pFT_UM;
41 VclPtr<MetricField> m_pMF_ANSATZ;
42 VclPtr<FixedText> m_pFT_ANSATZ_REL;
43 VclPtr<ListBox> m_pLB_ANSATZ_REL;
44 VclPtr<FixedText> m_pFT_LAENGE;
45 VclPtr<MetricField> m_pMF_LAENGE;
46 VclPtr<CheckBox> m_pCB_LAENGE;
48 Image m_aBmpCapTypes[CAPTYPE_BITMAPS_COUNT];
50 std::vector<OUString> m_aStrHorzList;
51 std::vector<OUString> m_aStrVertList;
52 std::vector<OUString> m_aLineTypes;
54 short nCaptionType;
55 sal_Int32 nGap;
56 short nEscDir;
57 bool bEscRel;
58 sal_Int32 nEscAbs;
59 sal_Int32 nEscRel;
60 sal_Int32 nLineLen;
61 bool bFitLineLen;
63 sal_uInt16 nAnsatzRelPos;
64 sal_uInt16 nAnsatzTypePos;
66 void SetupAnsatz_Impl( sal_uInt16 nType );
67 void SetupType_Impl( sal_uInt16 nType );
68 DECL_LINK( AnsatzSelectHdl_Impl, ListBox * );
69 DECL_LINK( AnsatzRelSelectHdl_Impl, ListBox * );
70 DECL_LINK( LineOptHdl_Impl, Button * );
71 DECL_LINK( SelectCaptTypeHdl_Impl, void * );
73 const SfxItemSet& rOutAttrs;
74 const SdrView* pView;
76 public:
77 SvxCaptionTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
78 virtual ~SvxCaptionTabPage();
79 virtual void dispose() SAL_OVERRIDE;
81 static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
82 static const sal_uInt16* GetRanges() { return pCaptionRanges; }
84 virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
85 virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;
86 void Construct();
87 void SetView( const SdrView* pSdrView )
88 { pView = pSdrView; }
90 virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
91 void FillValueSet();
94 // class SvxCaptionTabDialog ---------------------------------------------
96 class SvxCaptionTabDialog : public SfxTabDialog
98 private:
99 const SdrView* pView;
100 sal_uInt16 nAnchorCtrls;
101 sal_uInt16 m_nSwPosSizePageId;
102 sal_uInt16 m_nPositionSizePageId;
103 sal_uInt16 m_nCaptionPageId;
105 Link<> aValidateLink;
107 virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) SAL_OVERRIDE;
109 public:
110 SvxCaptionTabDialog(vcl::Window* pParent, const SdrView* pView,
111 sal_uInt16 nAnchorTypes = 0);
113 /// link for the Writer to validate positions
114 void SetValidateFramePosLink( const Link<>& rLink );
118 #endif // INCLUDED_CUI_SOURCE_INC_LABDLG_HXX
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */