1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 "vbascrollbar.hxx"
22 using namespace com::sun::star
;
23 using namespace ooo::vba
;
25 ScVbaScrollBar::ScVbaScrollBar( 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 : ScrollBarImpl_BASE( xParent
, xContext
, xControl
, xModel
, std::move(pGeomHelper
) )
32 ScVbaScrollBar::getValue()
34 return m_xProps
->getPropertyValue( "ScrollValue" );
38 ScVbaScrollBar::setValue( const uno::Any
& _value
)
40 m_xProps
->setPropertyValue( "ScrollValue", _value
);
44 ScVbaScrollBar::getMax()
47 m_xProps
->getPropertyValue( "ScrollValueMax" ) >>= nMax
;
52 ScVbaScrollBar::setMax( sal_Int32 nVal
)
54 m_xProps
->setPropertyValue( "ScrollValueMax", uno::makeAny( nVal
) );
58 ScVbaScrollBar::getMin()
61 m_xProps
->getPropertyValue( "ScrollValueMin" ) >>= nVal
;
66 ScVbaScrollBar::setMin( sal_Int32 nVal
)
68 m_xProps
->setPropertyValue( "ScrollValueMin", uno::makeAny( nVal
) );
72 ScVbaScrollBar::setLargeChange( ::sal_Int32 _largechange
)
74 m_xProps
->setPropertyValue( "BlockIncrement", uno::makeAny( _largechange
) );
78 ScVbaScrollBar::getLargeChange()
81 m_xProps
->getPropertyValue( "BlockIncrement" ) >>= nVal
;
86 ScVbaScrollBar::getSmallChange()
88 sal_Int32 nSmallChange
= 0;
89 m_xProps
->getPropertyValue( "LineIncrement" ) >>= nSmallChange
;
94 ScVbaScrollBar::setSmallChange( ::sal_Int32 _smallchange
)
96 m_xProps
->setPropertyValue( "LineIncrement", uno::makeAny( _smallchange
) );
100 ScVbaScrollBar::getServiceImplName()
102 return "ScVbaScrollBar";
105 uno::Sequence
< OUString
>
106 ScVbaScrollBar::getServiceNames()
108 static uno::Sequence
< OUString
> const aServiceNames
110 "ooo.vba.msforms.Frame"
112 return aServiceNames
;
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */