| 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_WORDVBAHELPER_HXX |
| 20 | #define INCLUDED_SW_SOURCE_UI_VBA_WORDVBAHELPER_HXX |
| 21 | |
| 22 | #include <vbahelper/vbahelper.hxx> |
| 23 | #include <com/sun/star/text/XText.hpp> |
| 24 | #include <com/sun/star/text/XTextViewCursor.hpp> |
| 25 | #include <com/sun/star/style/XStyle.hpp> |
| 26 | #include <com/sun/star/beans/XPropertySet.hpp> |
| 27 | #include <rtl/ref.hxx> |
| 28 | |
| 29 | class SwView; |
| 30 | class SwXTextDocument; |
| 31 | class SwXBaseStyle; |
| 32 | |
| 33 | namespace ooo::vba::word |
| 34 | { |
| 35 | SwView* getView( const rtl::Reference<SwXTextDocument>& xModel ); |
| 36 | /// @throws css::uno::RuntimeException |
| 37 | css::uno::Reference< css::text::XTextViewCursor > getXTextViewCursor( const rtl::Reference< SwXTextDocument >& xModel ); |
| 38 | /// @throws css::uno::RuntimeException |
| 39 | rtl::Reference< SwXBaseStyle > getCurrentPageStyle( const rtl::Reference< SwXTextDocument >& xModel ); |
| 40 | /// @throws css::uno::RuntimeException |
| 41 | rtl::Reference< SwXBaseStyle > getCurrentPageStyle( const rtl::Reference< SwXTextDocument>& xModel, const css::uno::Reference< css::beans::XPropertySet >& xProps ); |
| 42 | /// @throws css::uno::RuntimeException |
| 43 | sal_Int32 getPageCount( const rtl::Reference<SwXTextDocument>& xModel ); |
| 44 | /// @throws css::uno::RuntimeException |
| 45 | rtl::Reference< SwXBaseStyle > getDefaultParagraphStyle( const rtl::Reference< SwXTextDocument >& xModel ); |
| 46 | /// @throws css::uno::RuntimeException |
| 47 | css::uno::Reference< css::text::XTextRange > getFirstObjectPosition( const css::uno::Reference< css::text::XText >& xText ); |
| 48 | /// @throws css::uno::RuntimeException |
| 49 | css::uno::Reference< css::text::XText > getCurrentXText( const rtl::Reference<SwXTextDocument>& xModel ); |
| 50 | /// @throws css::uno::RuntimeException |
| 51 | bool gotoSelectedObjectAnchor( const rtl::Reference<SwXTextDocument>& xModel ); |
| 52 | /// @throws css::uno::RuntimeException |
| 53 | rtl::Reference< SwXTextDocument > getCurrentWordDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ); |
| 54 | /// @throws css::uno::RuntimeException |
| 55 | rtl::Reference< SwXTextDocument > getThisWordDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ); |
| 56 | |
| 57 | enum E_DIRECTION |
| 58 | { |
| 59 | MOVE_LEFT = 1, |
| 60 | MOVE_RIGHT, |
| 61 | MOVE_UP, |
| 62 | MOVE_DOWN |
| 63 | }; |
| 64 | |
| 65 | } // ooo::vba::word |
| 66 | #endif |
| 67 | |
| 68 | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |