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_SW_SOURCE_UI_INC_CPTION_HXX
20 : #define INCLUDED_SW_SOURCE_UI_INC_CPTION_HXX
21 :
22 : #include <svx/stddlg.hxx>
23 :
24 : #include <vcl/fixed.hxx>
25 :
26 : #include <vcl/lstbox.hxx>
27 :
28 : #include <vcl/edit.hxx>
29 :
30 : #include <vcl/group.hxx>
31 :
32 : #include <vcl/button.hxx>
33 : #include <actctrl.hxx>
34 :
35 : #include <com/sun/star/container/XEnumerationAccess.hpp>
36 : #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
37 : #include <com/sun/star/container/XNameAccess.hpp>
38 : #include <com/sun/star/container/XContentEnumerationAccess.hpp>
39 : #include <com/sun/star/container/XEnumeration.hpp>
40 : #include <com/sun/star/container/XElementAccess.hpp>
41 : #include <com/sun/star/container/XIndexAccess.hpp>
42 : #include <com/sun/star/container/XNamed.hpp>
43 :
44 : class SwFldMgr;
45 : class SwView;
46 :
47 : #include <wrtsh.hxx>
48 : #include "optload.hxx"
49 : #include "swlbox.hxx"
50 :
51 0 : class CategoryBox : public ComboBox
52 : {
53 : public:
54 0 : CategoryBox( Window* pParent, WinBits nStyle = 0 )
55 0 : : ComboBox( pParent, nStyle )
56 0 : {}
57 :
58 : virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
59 : };
60 :
61 : class SwCaptionDialog : public SvxStandardDialog
62 : {
63 : Edit* m_pTextEdit;
64 : CategoryBox* m_pCategoryBox;
65 : FixedText* m_pFormatText;
66 : ListBox* m_pFormatBox;
67 : //#i61007# order of captions
68 : FixedText* m_pNumberingSeparatorFT;
69 : Edit* m_pNumberingSeparatorED;
70 : FixedText* m_pSepText;
71 : Edit* m_pSepEdit;
72 : FixedText* m_pPosText;
73 : ListBox* m_pPosBox;
74 : OKButton* m_pOKButton;
75 : PushButton* m_pAutoCaptionButton;
76 : PushButton* m_pOptionButton;
77 :
78 : SwCaptionPreview* m_pPreview;
79 :
80 : OUString m_sNone;
81 :
82 : SwView &rView; // search per active, avoid ::com::sun::star::sdbcx::View
83 : SwFldMgr *pMgr; // pointer to save the include
84 : SelectionType eType;
85 :
86 : OUString sCharacterStyle;
87 : OUString sObjectName;
88 : bool bCopyAttributes;
89 : bool bOrderNumberingFirst; //#i61007# order of captions
90 :
91 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xNameAccess;
92 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > xNamed;
93 :
94 : DECL_LINK(SelectHdl, void *);
95 : DECL_LINK(ModifyHdl, void *);
96 : DECL_LINK(OptionHdl, Button *);
97 : DECL_LINK(CaptionHdl, void *);
98 :
99 : virtual void Apply() SAL_OVERRIDE;
100 :
101 : void DrawSample();
102 : void CheckButtonWidth();
103 : void ApplyCaptionOrder(); //#i61007# order of captions
104 :
105 : static OUString our_aSepTextSave; // Save caption separator text
106 : public:
107 : SwCaptionDialog( Window *pParent, SwView &rV );
108 : virtual ~SwCaptionDialog();
109 : };
110 :
111 : #endif
112 :
113 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|