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_UIBASE_INC_CPTION_HXX
20 : #define INCLUDED_SW_SOURCE_UIBASE_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 TextFilterAutoConvert : public TextFilter
52 : {
53 : private:
54 : OUString m_sLastGoodText;
55 : public:
56 : virtual OUString filter(const OUString &rText) SAL_OVERRIDE;
57 : };
58 :
59 : class SwCaptionDialog : public SvxStandardDialog
60 : {
61 : Edit* m_pTextEdit;
62 : ComboBox* m_pCategoryBox;
63 : TextFilterAutoConvert m_aTextFilter;
64 : FixedText* m_pFormatText;
65 : ListBox* m_pFormatBox;
66 : //#i61007# order of captions
67 : FixedText* m_pNumberingSeparatorFT;
68 : Edit* m_pNumberingSeparatorED;
69 : FixedText* m_pSepText;
70 : Edit* m_pSepEdit;
71 : FixedText* m_pPosText;
72 : ListBox* m_pPosBox;
73 : OKButton* m_pOKButton;
74 : PushButton* m_pAutoCaptionButton;
75 : PushButton* m_pOptionButton;
76 :
77 : SwCaptionPreview* m_pPreview;
78 :
79 : OUString m_sNone;
80 :
81 : SwView &rView; // search per active, avoid View
82 : SwFldMgr *pMgr; // pointer to save the include
83 : SelectionType eType;
84 :
85 : OUString sCharacterStyle;
86 : OUString sObjectName;
87 : bool bCopyAttributes;
88 : bool bOrderNumberingFirst; //#i61007# order of captions
89 :
90 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xNameAccess;
91 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > xNamed;
92 :
93 : DECL_LINK(SelectHdl, void *);
94 : DECL_LINK(ModifyHdl, void *);
95 : DECL_LINK(OptionHdl, Button *);
96 : DECL_LINK(CaptionHdl, void *);
97 :
98 : virtual void Apply() SAL_OVERRIDE;
99 :
100 : void DrawSample();
101 : void CheckButtonWidth();
102 : void ApplyCaptionOrder(); //#i61007# order of captions
103 :
104 : static OUString our_aSepTextSave; // Save caption separator text
105 : public:
106 : SwCaptionDialog( vcl::Window *pParent, SwView &rV );
107 : virtual ~SwCaptionDialog();
108 : };
109 :
110 : #endif
111 :
112 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|