LibreOffice Module vbahelper (master) 1
vbacombobox.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 * 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_VBAHELPER_SOURCE_MSFORMS_VBACOMBOBOX_HXX
20#define INCLUDED_VBAHELPER_SOURCE_MSFORMS_VBACOMBOBOX_HXX
21#include <memory>
22#include <optional>
24#include <com/sun/star/uno/XComponentContext.hpp>
25#include <com/sun/star/beans/XPropertySet.hpp>
26#include <com/sun/star/script/XDefaultProperty.hpp>
27#include <ooo/vba/msforms/XComboBox.hpp>
28#include <com/sun/star/beans/PropertyAttribute.hpp>
29
30#include "vbacontrol.hxx"
33
34typedef cppu::ImplInheritanceHelper<ScVbaControl, ov::msforms::XComboBox, css::script::XDefaultProperty > ComboBoxImpl_BASE;
36{
38 OUString sSourceName;
39
40public:
41 ScVbaComboBox( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper );
42
43 // Attributes
44 virtual css::uno::Any SAL_CALL getListIndex() override;
45 virtual ::sal_Int32 SAL_CALL getListCount() override;
46 virtual void SAL_CALL setListIndex( const css::uno::Any& _value ) override;
47 virtual css::uno::Any SAL_CALL getValue() override;
48 virtual void SAL_CALL setValue( const css::uno::Any& _value ) override;
49 virtual OUString SAL_CALL getText() override;
50 virtual void SAL_CALL setText( const OUString& _text ) override;
51 virtual sal_Int32 SAL_CALL getStyle() override;
52 virtual void SAL_CALL setStyle( sal_Int32 nStyle ) override;
53 virtual sal_Int32 SAL_CALL getDropButtonStyle() override;
54 virtual void SAL_CALL setDropButtonStyle( sal_Int32 nDropButtonStyle ) override;
55 virtual sal_Int32 SAL_CALL getDragBehavior() override;
56 virtual void SAL_CALL setDragBehavior( sal_Int32 nDragBehavior ) override;
57 virtual sal_Int32 SAL_CALL getEnterFieldBehavior() override;
58 virtual void SAL_CALL setEnterFieldBehavior( sal_Int32 nEnterFieldBehavior ) override;
59 virtual sal_Int32 SAL_CALL getListStyle() override;
60 virtual void SAL_CALL setListStyle( sal_Int32 nListStyle ) override;
61 virtual sal_Int32 SAL_CALL getTextAlign() override;
62 virtual void SAL_CALL setTextAlign( sal_Int32 nTextAlign ) override;
63 virtual sal_Int32 SAL_CALL getTextLength() override;
64 virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() override;
65 virtual sal_Int32 SAL_CALL getBackColor() override;
66 virtual void SAL_CALL setBackColor( sal_Int32 nBackColor ) override;
67 virtual sal_Bool SAL_CALL getAutoSize() override;
68 virtual void SAL_CALL setAutoSize( sal_Bool bAutoSize ) override;
69 virtual sal_Bool SAL_CALL getLocked() override;
70 virtual void SAL_CALL setLocked( sal_Bool bAutoSize ) override;
71 virtual OUString SAL_CALL getLinkedCell() override;
72 virtual void SAL_CALL setLinkedCell( const OUString& _linkedcell ) override;
73
74 // Methods
75 virtual void SAL_CALL AddItem( const css::uno::Any& pvargItem, const css::uno::Any& pvargIndex ) override;
76 virtual void SAL_CALL removeItem( const css::uno::Any& index ) override;
77 virtual void SAL_CALL Clear( ) override;
78 virtual css::uno::Any SAL_CALL List( const css::uno::Any& pvargIndex, const css::uno::Any& pvarColumn ) override;
79 // XControl
80 virtual void SAL_CALL setRowSource( const OUString& _rowsource ) override;
81
82 // XDefaultProperty
83 OUString SAL_CALL getDefaultPropertyName( ) override { return "Value"; }
84 //XHelperInterface
85 virtual OUString getServiceImplName() override;
86 virtual css::uno::Sequence<OUString> getServiceNames() override;
87};
88
89#endif
90
91/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual sal_Bool SAL_CALL getLocked() override
virtual sal_Bool SAL_CALL getAutoSize() override
ListControlHelper maListHelper
Definition: vbacombobox.hxx:37
virtual void SAL_CALL removeItem(const css::uno::Any &index) override
virtual void SAL_CALL setLinkedCell(const OUString &_linkedcell) override
virtual css::uno::Any SAL_CALL List(const css::uno::Any &pvargIndex, const css::uno::Any &pvarColumn) override
virtual css::uno::Any SAL_CALL getValue() override
Definition: vbacombobox.cxx:60
virtual sal_Int32 SAL_CALL getDragBehavior() override
virtual css::uno::Sequence< OUString > getServiceNames() override
virtual void SAL_CALL setTextAlign(sal_Int32 nTextAlign) override
virtual void SAL_CALL setDragBehavior(sal_Int32 nDragBehavior) override
virtual sal_Int32 SAL_CALL getBackColor() override
virtual sal_Int32 SAL_CALL getTextAlign() override
virtual sal_Int32 SAL_CALL getListStyle() override
virtual OUString SAL_CALL getLinkedCell() override
virtual void SAL_CALL setListStyle(sal_Int32 nListStyle) override
virtual void SAL_CALL setLocked(sal_Bool bAutoSize) override
virtual void SAL_CALL setValue(const css::uno::Any &_value) override
virtual OUString getServiceImplName() override
OUString SAL_CALL getDefaultPropertyName() override
Definition: vbacombobox.hxx:83
virtual void SAL_CALL setDropButtonStyle(sal_Int32 nDropButtonStyle) override
virtual void SAL_CALL setEnterFieldBehavior(sal_Int32 nEnterFieldBehavior) override
virtual sal_Int32 SAL_CALL getStyle() override
virtual void SAL_CALL setBackColor(sal_Int32 nBackColor) override
virtual ::sal_Int32 SAL_CALL getListCount() override
virtual sal_Int32 SAL_CALL getTextLength() override
virtual void SAL_CALL setStyle(sal_Int32 nStyle) override
ScVbaComboBox(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::uno::XInterface > &xControl, const css::uno::Reference< css::frame::XModel > &xModel, std::unique_ptr< ov::AbstractGeometryAttributes > pGeomHelper)
Definition: vbacombobox.cxx:38
virtual sal_Int32 SAL_CALL getEnterFieldBehavior() override
virtual void SAL_CALL AddItem(const css::uno::Any &pvargItem, const css::uno::Any &pvargIndex) override
virtual css::uno::Any SAL_CALL getListIndex() override
Definition: vbacombobox.cxx:88
virtual void SAL_CALL setListIndex(const css::uno::Any &_value) override
Definition: vbacombobox.cxx:66
virtual void SAL_CALL setRowSource(const OUString &_rowsource) override
virtual void SAL_CALL setAutoSize(sal_Bool bAutoSize) override
virtual void SAL_CALL setText(const OUString &_text) override
OUString sSourceName
Definition: vbacombobox.hxx:38
virtual css::uno::Reference< ov::msforms::XNewFont > SAL_CALL getFont() override
virtual void SAL_CALL Clear() override
virtual OUString SAL_CALL getText() override
virtual sal_Int32 SAL_CALL getDropButtonStyle() override
unsigned char sal_Bool
cppu::ImplInheritanceHelper< ScVbaControl, ov::msforms::XComboBox, css::script::XDefaultProperty > ComboBoxImpl_BASE
Definition: vbacombobox.hxx:34