LibreOffice Module sw (master)  1
vbaparagraphformat.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_SW_SOURCE_UI_VBA_VBAPARAGRAPHFORMAT_HXX
20 #define INCLUDED_SW_SOURCE_UI_VBA_VBAPARAGRAPHFORMAT_HXX
21 
22 #include <ooo/vba/word/XParagraphFormat.hpp>
24 #include <com/sun/star/style/LineSpacing.hpp>
25 #include <com/sun/star/style/ParagraphAdjust.hpp>
26 
28 
30 {
31 private:
32  css::uno::Reference< css::beans::XPropertySet > mxParaProps;
33 
34 private:
35  static css::style::LineSpacing getOOoLineSpacing( float _lineSpace, sal_Int16 mode );
36  css::style::LineSpacing getOOoLineSpacingFromRule( sal_Int32 _linespacingrule );
37  static float getMSWordLineSpacing( css::style::LineSpacing const & rLineSpacing );
38  static sal_Int32 getMSWordLineSpacingRule( css::style::LineSpacing const & rLineSpacing );
40  sal_Int16 getCharHeight();
41  static css::style::ParagraphAdjust getOOoAlignment( sal_Int32 _alignment );
42  static sal_Int32 getMSWordAlignment( css::style::ParagraphAdjust _alignment );
43 
44 public:
45  SwVbaParagraphFormat( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::beans::XPropertySet >& rParaProps );
46  virtual ~SwVbaParagraphFormat() override;
47 
48  // Attributes
49  virtual ::sal_Int32 SAL_CALL getAlignment() override;
50  virtual void SAL_CALL setAlignment( ::sal_Int32 _alignment ) override;
51  virtual float SAL_CALL getFirstLineIndent() override;
52  virtual void SAL_CALL setFirstLineIndent( float _firstlineindent ) override;
53  virtual css::uno::Any SAL_CALL getKeepTogether() override;
54  virtual void SAL_CALL setKeepTogether( const css::uno::Any& _keeptogether ) override;
55  virtual css::uno::Any SAL_CALL getKeepWithNext() override;
56  virtual void SAL_CALL setKeepWithNext( const css::uno::Any& _keepwithnext ) override;
57  virtual css::uno::Any SAL_CALL getHyphenation() override;
58  virtual void SAL_CALL setHyphenation( const css::uno::Any& _hyphenation ) override;
59  virtual float SAL_CALL getLineSpacing() override;
60  virtual void SAL_CALL setLineSpacing( float _linespacing ) override;
61  virtual ::sal_Int32 SAL_CALL getLineSpacingRule() override;
62  virtual void SAL_CALL setLineSpacingRule( ::sal_Int32 _linespacingrule ) override;
63  virtual css::uno::Any SAL_CALL getNoLineNumber() override;
64  virtual void SAL_CALL setNoLineNumber( const css::uno::Any& _nolinenumber ) override;
65  virtual ::sal_Int32 SAL_CALL getOutlineLevel() override;
66  virtual void SAL_CALL setOutlineLevel( ::sal_Int32 _outlinelevel ) override;
67  virtual css::uno::Any SAL_CALL getPageBreakBefore() override;
68  virtual void SAL_CALL setPageBreakBefore( const css::uno::Any& _pagebreakbefore ) override;
69  virtual float SAL_CALL getSpaceBefore() override;
70  virtual void SAL_CALL setSpaceBefore( float _spacebefore ) override;
71  virtual float SAL_CALL getSpaceAfter() override;
72  virtual void SAL_CALL setSpaceAfter( float _spaceafter ) override;
73  virtual float SAL_CALL getLeftIndent() override;
74  virtual void SAL_CALL setLeftIndent( float _leftindent ) override;
75  virtual float SAL_CALL getRightIndent() override;
76  virtual void SAL_CALL setRightIndent( float _rightindent ) override;
77  virtual css::uno::Any SAL_CALL getTabStops() override;
78  virtual void SAL_CALL setTabStops( const css::uno::Any& _tabstops ) override;
79  virtual css::uno::Any SAL_CALL getWidowControl() override;
80  virtual void SAL_CALL setWidowControl( const css::uno::Any& _widowcontrol ) override;
81 
82  // XHelperInterface
83  virtual OUString getServiceImplName() override;
84  virtual css::uno::Sequence<OUString> getServiceNames() override;
85 };
86 #endif // INCLUDED_SW_SOURCE_UI_VBA_VBAPARAGRAPHFORMAT_HXX
87 
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL setLineSpacingRule(::sal_Int32 _linespacingrule) override
static float getMSWordLineSpacing(css::style::LineSpacing const &rLineSpacing)
virtual css::uno::Any SAL_CALL getTabStops() override
virtual void SAL_CALL setSpaceAfter(float _spaceafter) override
virtual float SAL_CALL getLineSpacing() override
virtual void SAL_CALL setKeepTogether(const css::uno::Any &_keeptogether) override
virtual ::sal_Int32 SAL_CALL getAlignment() override
virtual void SAL_CALL setLineSpacing(float _linespacing) override
virtual css::uno::Any SAL_CALL getPageBreakBefore() override
virtual void SAL_CALL setNoLineNumber(const css::uno::Any &_nolinenumber) override
virtual ::sal_Int32 SAL_CALL getLineSpacingRule() override
SwVbaParagraphFormat(const css::uno::Reference< ooo::vba::XHelperInterface > &rParent, const css::uno::Reference< css::uno::XComponentContext > &rContext, const css::uno::Reference< css::beans::XPropertySet > &rParaProps)
virtual css::uno::Any SAL_CALL getKeepTogether() override
virtual float SAL_CALL getSpaceBefore() override
virtual void SAL_CALL setLeftIndent(float _leftindent) override
virtual ::sal_Int32 SAL_CALL getOutlineLevel() override
virtual void SAL_CALL setOutlineLevel(::sal_Int32 _outlinelevel) override
static sal_Int32 getMSWordLineSpacingRule(css::style::LineSpacing const &rLineSpacing)
static css::style::LineSpacing getOOoLineSpacing(float _lineSpace, sal_Int16 mode)
virtual float SAL_CALL getRightIndent() override
virtual void SAL_CALL setFirstLineIndent(float _firstlineindent) override
virtual void SAL_CALL setTabStops(const css::uno::Any &_tabstops) override
static sal_Int32 getMSWordAlignment(css::style::ParagraphAdjust _alignment)
virtual float SAL_CALL getFirstLineIndent() override
virtual void SAL_CALL setWidowControl(const css::uno::Any &_widowcontrol) override
virtual void SAL_CALL setKeepWithNext(const css::uno::Any &_keepwithnext) override
css::uno::Reference< css::beans::XPropertySet > mxParaProps
virtual ~SwVbaParagraphFormat() override
virtual css::uno::Any SAL_CALL getWidowControl() override
virtual void SAL_CALL setAlignment(::sal_Int32 _alignment) override
virtual void SAL_CALL setSpaceBefore(float _spacebefore) override
virtual float SAL_CALL getSpaceAfter() override
virtual css::uno::Any SAL_CALL getHyphenation() override
virtual float SAL_CALL getLeftIndent() override
css::style::LineSpacing getOOoLineSpacingFromRule(sal_Int32 _linespacingrule)
virtual OUString getServiceImplName() override
static css::style::ParagraphAdjust getOOoAlignment(sal_Int32 _alignment)
virtual css::uno::Any SAL_CALL getKeepWithNext() override
InheritedHelperInterfaceWeakImpl< ooo::vba::word::XParagraphFormat > SwVbaParagraphFormat_BASE
virtual void SAL_CALL setHyphenation(const css::uno::Any &_hyphenation) override
virtual void SAL_CALL setPageBreakBefore(const css::uno::Any &_pagebreakbefore) override
virtual css::uno::Any SAL_CALL getNoLineNumber() override
virtual void SAL_CALL setRightIndent(float _rightindent) override
virtual css::uno::Sequence< OUString > getServiceNames() override