LibreOffice Module sw (master) 1
vbaformfield.hxx
Go to the documentation of this file.
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#pragma once
10
11#include <com/sun/star/text/XTextDocument.hpp>
12#include <ooo/vba/word/XFormField.hpp>
13
15
17
19
21{
22private:
23 css::uno::Reference<css::text::XTextDocument> m_xTextDocument;
24 sw::mark::IFieldmark& m_rFormField;
25
26public:
28 SwVbaFormField(const css::uno::Reference<ooo::vba::XHelperInterface>& rParent,
29 const css::uno::Reference<css::uno::XComponentContext>& rContext,
30 const uno::Reference<text::XTextDocument>& xTextDocument,
31 sw::mark::IFieldmark& rFormField);
32 ~SwVbaFormField() override;
33
34 // XFormField Methods
35 OUString SAL_CALL getDefaultPropertyName() override;
36
37 css::uno::Any SAL_CALL CheckBox() override;
38 css::uno::Any SAL_CALL DropDown() override;
39 css::uno::Any SAL_CALL TextInput() override;
40 css::uno::Any SAL_CALL Previous() override;
41 css::uno::Any SAL_CALL Next() override;
42 css::uno::Reference<ooo::vba::word::XRange> SAL_CALL Range() override;
43
44 // Indicates which of the three form fields this is: oovbaapi/ooo/vba/word/WdFieldType.idl
45 sal_Int32 SAL_CALL getType() override;
46 // True if references to the specified form field
47 // are automatically updated whenever the field is exited
48 sal_Bool SAL_CALL getCalculateOnExit() override;
49 void SAL_CALL setCalculateOnExit(sal_Bool bSet) override;
50 sal_Bool SAL_CALL getEnabled() override;
51 void SAL_CALL setEnabled(sal_Bool bSet) override;
52 OUString SAL_CALL getEntryMacro() override;
53 void SAL_CALL setEntryMacro(const OUString& rSet) override;
54 OUString SAL_CALL getExitMacro() override;
55 void SAL_CALL setExitMacro(const OUString& rSet) override;
56 /*
57 * If the OwnHelp property is set to True,
58 * HelpText specifies the text string value.
59 * If OwnHelp is set to False, HelpText specifies the name of an AutoText entry
60 * that contains help text for the form field.
61 */
62 OUString SAL_CALL getHelpText() override;
63 void SAL_CALL setHelpText(const OUString& rSet) override;
64 sal_Bool SAL_CALL getOwnHelp() override;
65 void SAL_CALL setOwnHelp(sal_Bool bSet) override;
66
67 OUString SAL_CALL getName() override;
68 void SAL_CALL setName(const OUString& rSet) override;
69 OUString SAL_CALL getResult() override;
70 void SAL_CALL setResult(const OUString& rSet) override;
71 /*
72 * If the OwnStatus property is set to True,
73 * StatusText specifies the status bar value.
74 * If OwnStatus is set to False, StatusText specifies the name of an AutoText entry
75 * that contains status bar text for the form field.
76 */
77 OUString SAL_CALL getStatusText() override;
78 void SAL_CALL setStatusText(const OUString& rSet) override;
79 sal_Bool SAL_CALL getOwnStatus() override;
80 void SAL_CALL setOwnStatus(sal_Bool bSet) override;
81
82 // XHelperInterface
83 OUString getServiceImplName() override;
84 css::uno::Sequence<OUString> getServiceNames() override;
85};
86
87/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
~SwVbaFormField() override
css::uno::Any SAL_CALL CheckBox() override
void SAL_CALL setEnabled(sal_Bool bSet) override
OUString SAL_CALL getEntryMacro() override
css::uno::Sequence< OUString > getServiceNames() override
sw::mark::IFieldmark & m_rFormField
OUString SAL_CALL getDefaultPropertyName() override
css::uno::Any SAL_CALL DropDown() override
OUString SAL_CALL getName() override
void SAL_CALL setCalculateOnExit(sal_Bool bSet) override
css::uno::Any SAL_CALL TextInput() override
void SAL_CALL setResult(const OUString &rSet) override
OUString SAL_CALL getResult() override
OUString getServiceImplName() override
sal_Bool SAL_CALL getOwnStatus() override
sal_Bool SAL_CALL getEnabled() override
void SAL_CALL setName(const OUString &rSet) override
OUString SAL_CALL getStatusText() override
SwVbaFormField(const css::uno::Reference< ooo::vba::XHelperInterface > &rParent, const css::uno::Reference< css::uno::XComponentContext > &rContext, const uno::Reference< text::XTextDocument > &xTextDocument, sw::mark::IFieldmark &rFormField)
FormFields are inline text objects that are only found in MS Word.
css::uno::Reference< ooo::vba::word::XRange > SAL_CALL Range() override
void SAL_CALL setHelpText(const OUString &rSet) override
void SAL_CALL setOwnHelp(sal_Bool bSet) override
OUString SAL_CALL getExitMacro() override
OUString SAL_CALL getHelpText() override
void SAL_CALL setStatusText(const OUString &rSet) override
sal_Bool SAL_CALL getCalculateOnExit() override
sal_Int32 SAL_CALL getType() override
void SAL_CALL setOwnStatus(sal_Bool bSet) override
css::uno::Reference< css::text::XTextDocument > m_xTextDocument
void SAL_CALL setExitMacro(const OUString &rSet) override
sal_Bool SAL_CALL getOwnHelp() override
css::uno::Any SAL_CALL Next() override
css::uno::Any SAL_CALL Previous() override
void SAL_CALL setEntryMacro(const OUString &rSet) override
unsigned char sal_Bool
InheritedHelperInterfaceWeakImpl< ooo::vba::word::XFormField > SwVbaFormField_BASE