LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / vbahelper / source / msforms / vbaspinbutton.cxx
blob3180f4861e8300adc1a6c1eb9309ec983f72f537
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 .
20 #include "vbaspinbutton.hxx"
22 using namespace com::sun::star;
23 using namespace ooo::vba;
25 ScVbaSpinButton::ScVbaSpinButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, std::unique_ptr<AbstractGeometryAttributes> pGeomHelper )
26 : SpinButtonImpl_BASE( xParent, xContext, xControl, xModel, std::move(pGeomHelper) )
30 // Attributes
31 uno::Any SAL_CALL
32 ScVbaSpinButton::getValue()
34 return m_xProps->getPropertyValue( "SpinValue" );
37 void SAL_CALL
38 ScVbaSpinButton::setValue( const uno::Any& _value )
40 m_xProps->setPropertyValue( "SpinValue", _value );
43 ::sal_Int32 SAL_CALL
44 ScVbaSpinButton::getMax()
46 sal_Int32 nMax = 0;
47 m_xProps->getPropertyValue( "SpinValueMax" ) >>= nMax;
48 return nMax;
51 void SAL_CALL
52 ScVbaSpinButton::setMax( sal_Int32 nVal )
54 m_xProps->setPropertyValue( "SpinValueMax", uno::makeAny( nVal ) );
57 ::sal_Int32 SAL_CALL
58 ScVbaSpinButton::getMin()
60 sal_Int32 nVal = 0;
61 m_xProps->getPropertyValue( "SpinValueMin" ) >>= nVal;
62 return nVal;
65 void SAL_CALL
66 ScVbaSpinButton::setMin( sal_Int32 nVal )
68 m_xProps->setPropertyValue( "SpinValueMin", uno::makeAny( nVal ) );
71 OUString
72 ScVbaSpinButton::getServiceImplName()
74 return "ScVbaSpinButton";
77 uno::Sequence< OUString >
78 ScVbaSpinButton::getServiceNames()
80 static uno::Sequence< OUString > const aServiceNames
82 "ooo.vba.msforms.Frame"
84 return aServiceNames;
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */