LibreOffice Module sw (master)  1
vbaselection.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_VBASELECTION_HXX
20 #define INCLUDED_SW_SOURCE_UI_VBA_VBASELECTION_HXX
21 
22 #include <ooo/vba/word/XSelection.hpp>
23 #include <ooo/vba/word/XRange.hpp>
25 #include <com/sun/star/text/XTextViewCursor.hpp>
26 #include <com/sun/star/text/XTextTable.hpp>
27 #include <ooo/vba/word/XParagraphFormat.hpp>
28 #include <ooo/vba/word/XFind.hpp>
29 #include <ooo/vba/word/XFont.hpp>
30 #include <ooo/vba/word/XHeaderFooter.hpp>
31 #include "wordvbahelper.hxx"
32 
34 
36 {
37 private:
38  css::uno::Reference< css::frame::XModel > mxModel;
39  css::uno::Reference< css::text::XTextViewCursor > mxTextViewCursor;
40 
41 private:
44  void Move( const css::uno::Any& _unit, const css::uno::Any& _count, const css::uno::Any& _extend, ooo::vba::word::E_DIRECTION eDirection );
47  void NextCell( sal_Int32 nCount, ooo::vba::word::E_DIRECTION eDirection );
49  css::uno::Reference< css::text::XTextRange > GetSelectedRange();
51  void GetSelectedCellRange( OUString& sTLName, OUString& sBRName );
53  css::uno::Reference< css::text::XTextTable > GetXTextTable() const;
55  bool IsInTable() const;
57  bool HasSelection();
58 
59 public:
61  SwVbaSelection( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& rModel );
62  virtual ~SwVbaSelection() override;
63 
64  // Attribute
65  virtual OUString SAL_CALL getText() override;
66  virtual void SAL_CALL setText( const OUString& rText ) override;
67  virtual css::uno::Reference< ooo::vba::word::XRange > SAL_CALL getRange() override;
68  virtual void SAL_CALL HomeKey( const css::uno::Any& _unit, const css::uno::Any& _extend ) override;
69  virtual void SAL_CALL EndKey( const css::uno::Any& _unit, const css::uno::Any& _extend ) override;
70  virtual void SAL_CALL TypeText( const OUString& rText ) override;
71  virtual void SAL_CALL Delete( const css::uno::Any& _unit, const css::uno::Any& _count ) override;
72  virtual void SAL_CALL MoveRight( const css::uno::Any& _unit, const css::uno::Any& _count, const css::uno::Any& _extend ) override;
73  virtual void SAL_CALL MoveLeft( const css::uno::Any& _unit, const css::uno::Any& _count, const css::uno::Any& _extend ) override;
74  virtual void SAL_CALL MoveDown( const css::uno::Any& _unit, const css::uno::Any& _count, const css::uno::Any& _extend ) override;
75  virtual void SAL_CALL MoveUp( const css::uno::Any& _unit, const css::uno::Any& _count, const css::uno::Any& _extend ) override;
76  virtual void SAL_CALL TypeParagraph() override;
77  virtual void SAL_CALL InsertParagraph() override;
78  virtual void SAL_CALL InsertParagraphBefore() override;
79  virtual void SAL_CALL InsertParagraphAfter() override;
80  virtual css::uno::Reference< ooo::vba::word::XParagraphFormat > SAL_CALL getParagraphFormat() override;
81  virtual void SAL_CALL setParagraphFormat( const css::uno::Reference< ooo::vba::word::XParagraphFormat >& rParagraphFormat ) override;
82  virtual css::uno::Reference< ooo::vba::word::XFind > SAL_CALL getFind() override;
83  virtual css::uno::Any SAL_CALL getStyle() override;
84  virtual void SAL_CALL setStyle( const css::uno::Any& _xStyle ) override;
85  virtual css::uno::Reference< ooo::vba::word::XFont > SAL_CALL getFont() override;
86  virtual void SAL_CALL TypeBackspace() override;
87  virtual css::uno::Reference< ooo::vba::word::XRange > SAL_CALL GoTo( const css::uno::Any& _what, const css::uno::Any& _which, const css::uno::Any& _count, const css::uno::Any& _name ) override;
88  virtual ::sal_Int32 SAL_CALL getLanguageID( ) override;
89  virtual void SAL_CALL setLanguageID( ::sal_Int32 _languageid ) override;
90  virtual css::uno::Any SAL_CALL Information( sal_Int32 _type ) override;
91  virtual void SAL_CALL InsertBreak( const css::uno::Any& _breakType ) override;
92  virtual css::uno::Any SAL_CALL Tables( const css::uno::Any& aIndex ) override;
93  virtual css::uno::Any SAL_CALL Fields( const css::uno::Any& aIndex ) override;
94  virtual css::uno::Reference< ooo::vba::word::XHeaderFooter > SAL_CALL getHeaderFooter() override;
95  virtual css::uno::Any SAL_CALL ShapeRange( ) override;
96  virtual ::sal_Int32 SAL_CALL getStart() override;
97  virtual void SAL_CALL setStart( ::sal_Int32 _start ) override;
98  virtual ::sal_Int32 SAL_CALL getEnd() override;
99  virtual void SAL_CALL setEnd( ::sal_Int32 _end ) override;
100  virtual void SAL_CALL SelectRow() override;
101  virtual void SAL_CALL SelectColumn() override;
102  virtual css::uno::Any SAL_CALL Rows( const css::uno::Any& aIndex ) override;
103  virtual css::uno::Any SAL_CALL Columns( const css::uno::Any& aIndex ) override;
104  virtual css::uno::Any SAL_CALL Cells( const css::uno::Any& aIndex ) override;
105  virtual void SAL_CALL Copy( ) override;
106  virtual void SAL_CALL CopyAsPicture( ) override;
107  virtual void SAL_CALL Paste( ) override;
108  virtual void SAL_CALL Collapse( const css::uno::Any& Direction ) override;
109  virtual void SAL_CALL WholeStory( ) override;
110  virtual sal_Bool SAL_CALL InRange( const css::uno::Reference< ::ooo::vba::word::XRange >& Range ) override;
111  virtual void SAL_CALL SplitTable() override;
112  virtual css::uno::Any SAL_CALL Paragraphs( const css::uno::Any& aIndex ) override;
113 
114  // XHelperInterface
115  virtual OUString getServiceImplName() override;
116  virtual css::uno::Sequence<OUString> getServiceNames() override;
117 };
118 #endif // INCLUDED_SW_SOURCE_UI_VBA_VBASELECTION_HXX
119 
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void GetSelectedCellRange(OUString &sTLName, OUString &sBRName)
virtual css::uno::Any SAL_CALL Rows(const css::uno::Any &aIndex) override
virtual void SAL_CALL InsertParagraphAfter() override
virtual css::uno::Reference< ooo::vba::word::XHeaderFooter > SAL_CALL getHeaderFooter() override
css::uno::Reference< css::text::XTextRange > GetSelectedRange()
virtual css::uno::Any SAL_CALL ShapeRange() override
css::uno::Reference< css::frame::XModel > mxModel
void Move(const css::uno::Any &_unit, const css::uno::Any &_count, const css::uno::Any &_extend, ooo::vba::word::E_DIRECTION eDirection)
virtual void SAL_CALL WholeStory() override
bool IsInTable() const
virtual void SAL_CALL TypeBackspace() override
virtual void SAL_CALL setParagraphFormat(const css::uno::Reference< ooo::vba::word::XParagraphFormat > &rParagraphFormat) override
virtual void SAL_CALL InsertParagraphBefore() override
virtual css::uno::Any SAL_CALL Fields(const css::uno::Any &aIndex) override
virtual css::uno::Reference< ooo::vba::word::XRange > SAL_CALL GoTo(const css::uno::Any &_what, const css::uno::Any &_which, const css::uno::Any &_count, const css::uno::Any &_name) override
virtual css::uno::Reference< ooo::vba::word::XFind > SAL_CALL getFind() override
virtual void SAL_CALL CopyAsPicture() override
virtual css::uno::Reference< ooo::vba::word::XParagraphFormat > SAL_CALL getParagraphFormat() override
virtual css::uno::Any SAL_CALL Columns(const css::uno::Any &aIndex) override
virtual void SAL_CALL setEnd(::sal_Int32 _end) override
virtual void SAL_CALL InsertParagraph() override
virtual ::sal_Int32 SAL_CALL getStart() override
virtual css::uno::Reference< ooo::vba::word::XRange > SAL_CALL getRange() override
virtual void SAL_CALL HomeKey(const css::uno::Any &_unit, const css::uno::Any &_extend) override
virtual css::uno::Any SAL_CALL Paragraphs(const css::uno::Any &aIndex) override
virtual css::uno::Any SAL_CALL Tables(const css::uno::Any &aIndex) override
virtual css::uno::Any SAL_CALL getStyle() override
virtual ~SwVbaSelection() override
virtual void SAL_CALL InsertBreak(const css::uno::Any &_breakType) override
virtual css::uno::Any SAL_CALL Information(sal_Int32 _type) override
virtual void SAL_CALL setStart(::sal_Int32 _start) override
virtual void SAL_CALL setLanguageID(::sal_Int32 _languageid) override
virtual void SAL_CALL TypeParagraph() override
virtual void SAL_CALL MoveRight(const css::uno::Any &_unit, const css::uno::Any &_count, const css::uno::Any &_extend) override
virtual void SAL_CALL MoveDown(const css::uno::Any &_unit, const css::uno::Any &_count, const css::uno::Any &_extend) override
virtual void SAL_CALL TypeText(const OUString &rText) override
unsigned char sal_Bool
virtual OUString SAL_CALL getText() override
virtual void SAL_CALL Copy() override
virtual void SAL_CALL SelectRow() override
virtual void SAL_CALL MoveLeft(const css::uno::Any &_unit, const css::uno::Any &_count, const css::uno::Any &_extend) override
virtual sal_Bool SAL_CALL InRange(const css::uno::Reference< ::ooo::vba::word::XRange > &Range) override
virtual void SAL_CALL Paste() override
virtual void SAL_CALL setText(const OUString &rText) override
virtual void SAL_CALL MoveUp(const css::uno::Any &_unit, const css::uno::Any &_count, const css::uno::Any &_extend) override
virtual void SAL_CALL Collapse(const css::uno::Any &Direction) override
Direction
virtual OUString getServiceImplName() override
SwVbaSelection(const css::uno::Reference< ooo::vba::XHelperInterface > &rParent, const css::uno::Reference< css::uno::XComponentContext > &rContext, const css::uno::Reference< css::frame::XModel > &rModel)
virtual void SAL_CALL SelectColumn() override
css::uno::Reference< css::text::XTextTable > GetXTextTable() const
virtual css::uno::Any SAL_CALL Cells(const css::uno::Any &aIndex) override
virtual css::uno::Reference< ooo::vba::word::XFont > SAL_CALL getFont() override
virtual css::uno::Sequence< OUString > getServiceNames() override
virtual void SAL_CALL SplitTable() override
virtual void SAL_CALL setStyle(const css::uno::Any &_xStyle) override
css::uno::Reference< css::text::XTextViewCursor > mxTextViewCursor
virtual ::sal_Int32 SAL_CALL getLanguageID() override
virtual void SAL_CALL Delete(const css::uno::Any &_unit, const css::uno::Any &_count) override
virtual ::sal_Int32 SAL_CALL getEnd() override
void NextCell(sal_Int32 nCount, ooo::vba::word::E_DIRECTION eDirection)
InheritedHelperInterfaceWeakImpl< ooo::vba::word::XSelection > SwVbaSelection_BASE
virtual void SAL_CALL EndKey(const css::uno::Any &_unit, const css::uno::Any &_extend) override