1*1d2dbeb0SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*1d2dbeb0SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*1d2dbeb0SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*1d2dbeb0SAndrew Rist * distributed with this work for additional information 6*1d2dbeb0SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*1d2dbeb0SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*1d2dbeb0SAndrew Rist * "License"); you may not use this file except in compliance 9*1d2dbeb0SAndrew Rist * with the License. You may obtain a copy of the License at 10*1d2dbeb0SAndrew Rist * 11*1d2dbeb0SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*1d2dbeb0SAndrew Rist * 13*1d2dbeb0SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*1d2dbeb0SAndrew Rist * software distributed under the License is distributed on an 15*1d2dbeb0SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*1d2dbeb0SAndrew Rist * KIND, either express or implied. See the License for the 17*1d2dbeb0SAndrew Rist * specific language governing permissions and limitations 18*1d2dbeb0SAndrew Rist * under the License. 19*1d2dbeb0SAndrew Rist * 20*1d2dbeb0SAndrew Rist *************************************************************/ 21*1d2dbeb0SAndrew Rist 22*1d2dbeb0SAndrew Rist 23cdf0e10cSrcweir #ifndef SW_VBA_PARAGRAPHFORMAT_HXX 24cdf0e10cSrcweir #define SW_VBA_PARAGRAPHFORMAT_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <ooo/vba/word/XParagraphFormat.hpp> 27cdf0e10cSrcweir #include <vbahelper/vbahelperinterface.hxx> 28cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx> 29cdf0e10cSrcweir #include <com/sun/star/text/XTextDocument.hpp> 30cdf0e10cSrcweir #include <com/sun/star/style/LineSpacing.hpp> 31cdf0e10cSrcweir 32cdf0e10cSrcweir typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XParagraphFormat > SwVbaParagraphFormat_BASE; 33cdf0e10cSrcweir 34cdf0e10cSrcweir class SwVbaParagraphFormat : public SwVbaParagraphFormat_BASE 35cdf0e10cSrcweir { 36cdf0e10cSrcweir private: 37cdf0e10cSrcweir css::uno::Reference< css::text::XTextDocument > mxTextDocument; 38cdf0e10cSrcweir css::uno::Reference< css::beans::XPropertySet > mxParaProps; 39cdf0e10cSrcweir 40cdf0e10cSrcweir private: 41cdf0e10cSrcweir css::style::LineSpacing getOOoLineSpacing( float _lineSpace, sal_Int16 mode ); 42cdf0e10cSrcweir css::style::LineSpacing getOOoLineSpacingFromRule( sal_Int32 _linespacingrule ); 43cdf0e10cSrcweir float getMSWordLineSpacing( css::style::LineSpacing& rLineSpacing ); 44cdf0e10cSrcweir sal_Int32 getMSWordLineSpacingRule( css::style::LineSpacing& rLineSpacing ); 45cdf0e10cSrcweir sal_Int16 getCharHeight() throw (css::uno::RuntimeException); 46cdf0e10cSrcweir sal_Int32 getOOoAlignment( sal_Int32 _alignment ); 47cdf0e10cSrcweir sal_Int32 getMSWordAlignment( sal_Int32 _alignment ); 48cdf0e10cSrcweir 49cdf0e10cSrcweir public: 50cdf0e10cSrcweir SwVbaParagraphFormat( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::beans::XPropertySet >& rParaProps ); 51cdf0e10cSrcweir virtual ~SwVbaParagraphFormat(); 52cdf0e10cSrcweir 53cdf0e10cSrcweir // Attributes 54cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getAlignment() throw (css::uno::RuntimeException); 55cdf0e10cSrcweir virtual void SAL_CALL setAlignment( ::sal_Int32 _alignment ) throw (css::uno::RuntimeException); 56cdf0e10cSrcweir virtual float SAL_CALL getFirstLineIndent() throw (css::uno::RuntimeException); 57cdf0e10cSrcweir virtual void SAL_CALL setFirstLineIndent( float _firstlineindent ) throw (css::uno::RuntimeException); 58cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getKeepTogether() throw (css::uno::RuntimeException); 59cdf0e10cSrcweir virtual void SAL_CALL setKeepTogether( const css::uno::Any& _keeptogether ) throw (css::uno::RuntimeException); 60cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getKeepWithNext() throw (css::uno::RuntimeException); 61cdf0e10cSrcweir virtual void SAL_CALL setKeepWithNext( const css::uno::Any& _keepwithnext ) throw (css::uno::RuntimeException); 62cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getHyphenation() throw (css::uno::RuntimeException); 63cdf0e10cSrcweir virtual void SAL_CALL setHyphenation( const css::uno::Any& _hyphenation ) throw (css::uno::RuntimeException); 64cdf0e10cSrcweir virtual float SAL_CALL getLineSpacing() throw (css::uno::RuntimeException); 65cdf0e10cSrcweir virtual void SAL_CALL setLineSpacing( float _linespacing ) throw (css::uno::RuntimeException); 66cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getLineSpacingRule() throw (css::uno::RuntimeException); 67cdf0e10cSrcweir virtual void SAL_CALL setLineSpacingRule( ::sal_Int32 _linespacingrule ) throw (css::uno::RuntimeException); 68cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getNoLineNumber() throw (css::uno::RuntimeException); 69cdf0e10cSrcweir virtual void SAL_CALL setNoLineNumber( const css::uno::Any& _nolinenumber ) throw (css::uno::RuntimeException); 70cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getOutlineLevel() throw (css::uno::RuntimeException); 71cdf0e10cSrcweir virtual void SAL_CALL setOutlineLevel( ::sal_Int32 _outlinelevel ) throw (css::uno::RuntimeException); 72cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getPageBreakBefore() throw (css::uno::RuntimeException); 73cdf0e10cSrcweir virtual void SAL_CALL setPageBreakBefore( const css::uno::Any& _pagebreakbefore ) throw (css::uno::RuntimeException); 74cdf0e10cSrcweir virtual float SAL_CALL getSpaceBefore() throw (css::uno::RuntimeException); 75cdf0e10cSrcweir virtual void SAL_CALL setSpaceBefore( float _spacebefore ) throw (css::uno::RuntimeException); 76cdf0e10cSrcweir virtual float SAL_CALL getSpaceAfter() throw (css::uno::RuntimeException); 77cdf0e10cSrcweir virtual void SAL_CALL setSpaceAfter( float _spaceafter ) throw (css::uno::RuntimeException); 78cdf0e10cSrcweir virtual float SAL_CALL getLeftIndent() throw (css::uno::RuntimeException); 79cdf0e10cSrcweir virtual void SAL_CALL setLeftIndent( float _leftindent ) throw (css::uno::RuntimeException); 80cdf0e10cSrcweir virtual float SAL_CALL getRightIndent() throw (css::uno::RuntimeException); 81cdf0e10cSrcweir virtual void SAL_CALL setRightIndent( float _rightindent ) throw (css::uno::RuntimeException); 82cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getTabStops() throw (css::uno::RuntimeException); 83cdf0e10cSrcweir virtual void SAL_CALL setTabStops( const css::uno::Any& _tabstops ) throw (css::uno::RuntimeException); 84cdf0e10cSrcweir virtual css::uno::Any SAL_CALL getWidowControl() throw (css::uno::RuntimeException); 85cdf0e10cSrcweir virtual void SAL_CALL setWidowControl( const css::uno::Any& _widowcontrol ) throw (css::uno::RuntimeException); 86cdf0e10cSrcweir 87cdf0e10cSrcweir // XHelperInterface 88cdf0e10cSrcweir virtual rtl::OUString& getServiceImplName(); 89cdf0e10cSrcweir virtual css::uno::Sequence<rtl::OUString> getServiceNames(); 90cdf0e10cSrcweir }; 91cdf0e10cSrcweir #endif /* SW_VBA_PARAGRAPHFORMAT_HXX */ 92