LibreOffice Module sc (master)  1
vbacharacters.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 #pragma once
20 
21 #include <ooo/vba/excel/XCharacters.hpp>
22 #include <com/sun/star/uno/XComponentContext.hpp>
23 #include <com/sun/star/text/XSimpleText.hpp>
24 
26 #include "vbapalette.hxx"
28 
30 {
31 private:
32  css::uno::Reference< css::text::XTextRange > m_xTextRange;
33  css::uno::Reference< css::text::XSimpleText > m_xSimpleText;
35  // Add because of MSO has different behavior.
36  bool bReplace;
37 public:
40  ScVbaCharacters( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, const css::uno::Reference< css::text::XSimpleText >& xRange, const css::uno::Any& Start, const css::uno::Any& Length, bool bReplace = false );
41 
42  // Attributes
43  virtual OUString SAL_CALL getCaption() override;
44  virtual void SAL_CALL setCaption( const OUString& _caption ) override;
45  virtual ::sal_Int32 SAL_CALL getCount() override;
46  virtual OUString SAL_CALL getText() override;
47  virtual void SAL_CALL setText( const OUString& _text ) override;
48  virtual css::uno::Reference< ov::excel::XFont > SAL_CALL getFont() override;
49  virtual void SAL_CALL setFont( const css::uno::Reference< ov::excel::XFont >& _font ) override;
50 
51  // Methods
52  virtual void SAL_CALL Insert( const OUString& String ) override;
53  virtual void SAL_CALL Delete( ) override;
54 
55  // XHelperInterface
56  virtual OUString getServiceImplName() override;
57  virtual css::uno::Sequence<OUString> getServiceNames() override;
58 
59 };
60 
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScVbaCharacters(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const ScVbaPalette &dPalette, const css::uno::Reference< css::text::XSimpleText > &xRange, const css::uno::Any &Start, const css::uno::Any &Length, bool bReplace=false)
css::uno::Reference< css::text::XSimpleText > m_xSimpleText
InheritedHelperInterfaceWeakImpl< ov::excel::XCharacters > ScVbaCharacters_BASE
virtual void SAL_CALL setText(const OUString &_text) override
Length
virtual void SAL_CALL Delete() override
virtual OUString getServiceImplName() override
virtual OUString SAL_CALL getText() override
virtual void SAL_CALL setCaption(const OUString &_caption) override
virtual ::sal_Int32 SAL_CALL getCount() override
virtual css::uno::Sequence< OUString > getServiceNames() override
virtual OUString SAL_CALL getCaption() override
virtual void SAL_CALL setFont(const css::uno::Reference< ov::excel::XFont > &_font) override
virtual css::uno::Reference< ov::excel::XFont > SAL_CALL getFont() override
ScVbaPalette m_aPalette
virtual void SAL_CALL Insert(const OUString &String) override
css::uno::Reference< css::text::XTextRange > m_xTextRange