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 .
19 #ifndef INCLUDED_VBAHELPER_VBATEXTFRAME_HXX
20 #define INCLUDED_VBAHELPER_VBATEXTFRAME_HXX
24 #include <com/sun/star/uno/Any.hxx>
25 #include <com/sun/star/uno/Reference.hxx>
26 #include <com/sun/star/uno/RuntimeException.hpp>
27 #include <com/sun/star/uno/Sequence.hxx>
28 #include <ooo/vba/msforms/XTextFrame.hpp>
29 #include <rtl/ustring.hxx>
30 #include <sal/types.h>
31 #include <vbahelper/vbadllapi.h>
32 #include <vbahelper/vbahelper.hxx>
33 #include <vbahelper/vbahelperinterface.hxx>
35 namespace com::sun::star
{
36 namespace beans
{ class XPropertySet
; }
37 namespace drawing
{ class XShape
; }
38 namespace uno
{ class XComponentContext
; }
42 class XHelperInterface
;
45 typedef InheritedHelperInterfaceWeakImpl
< ov::msforms::XTextFrame
> VbaTextFrame_BASE
;
47 class VBAHELPER_DLLPUBLIC VbaTextFrame
: public VbaTextFrame_BASE
50 css::uno::Reference
< css::drawing::XShape
> m_xShape
;
51 css::uno::Reference
< css::beans::XPropertySet
> m_xPropertySet
;
53 virtual OUString
getServiceImplName() override
;
54 virtual css::uno::Sequence
<OUString
> getServiceNames() override
;
55 void setAsMSObehavior();
56 sal_Int32
getMargin( const OUString
& sMarginType
);
57 void setMargin( const OUString
& sMarginType
, float fMargin
);
59 VbaTextFrame( const css::uno::Reference
< ov::XHelperInterface
>& xParent
, const css::uno::Reference
< css::uno::XComponentContext
>& xContext
, css::uno::Reference
< css::drawing::XShape
> xShape
);
61 virtual sal_Bool SAL_CALL
getAutoSize() override
;
62 virtual void SAL_CALL
setAutoSize( sal_Bool _autosize
) override
;
63 virtual float SAL_CALL
getMarginBottom() override
;
64 virtual void SAL_CALL
setMarginBottom( float _marginbottom
) override
;
65 virtual float SAL_CALL
getMarginTop() override
;
66 virtual void SAL_CALL
setMarginTop( float _margintop
) override
;
67 virtual float SAL_CALL
getMarginLeft() override
;
68 virtual void SAL_CALL
setMarginLeft( float _marginleft
) override
;
69 virtual float SAL_CALL
getMarginRight() override
;
70 virtual void SAL_CALL
setMarginRight( float _marginright
) override
;
73 virtual css::uno::Any SAL_CALL
Characters( ) override
;
77 #endif//SC_ INCLUDED_VBAHELPER_VBATEXTFRAME_HXX
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */