xref: /aoo42x/main/sc/source/ui/vba/vbacharacters.hxx (revision 86e1cf34)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef SC_VBA_CHARACTERS_HXX
24 #define SC_VBA_CHARACTERS_HXX
25 
26 #include <cppuhelper/implbase1.hxx>
27 
28 #include <ooo/vba/excel/XCharacters.hpp>
29 #include <com/sun/star/uno/XComponentContext.hpp>
30 #include <com/sun/star/text/XSimpleText.hpp>
31 
32 #include <vbahelper/vbahelperinterface.hxx>
33 #include "vbapalette.hxx"
34 typedef InheritedHelperInterfaceImpl1< ov::excel::XCharacters > ScVbaCharacters_BASE;
35 
36 class ScVbaCharacters : public ScVbaCharacters_BASE
37 {
38 private:
39 	css::uno::Reference< css::text::XTextRange > m_xTextRange;
40 	css::uno::Reference< css::text::XSimpleText > m_xSimpleText;
41 	ScVbaPalette m_aPalette;
42 	sal_Int16 nLength;
43 	sal_Int16 nStart;
44     // Add because of MSO has different behavior.
45     sal_Bool bReplace;
46 public:
47 	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, sal_Bool bReplace = sal_False  ) throw ( css::lang::IllegalArgumentException );
48 
~ScVbaCharacters()49 	virtual ~ScVbaCharacters() {}
50 	// Attributes
51 	virtual ::rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
52 	virtual void SAL_CALL setCaption( const ::rtl::OUString& _caption ) throw (css::uno::RuntimeException);
53 	virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException);
54 	virtual ::rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
55 	virtual void SAL_CALL setText( const ::rtl::OUString& _text ) throw (css::uno::RuntimeException);
56 	virtual css::uno::Reference< ov::excel::XFont > SAL_CALL getFont() throw (css::uno::RuntimeException);
57 	virtual void SAL_CALL setFont( const css::uno::Reference< ov::excel::XFont >& _font ) throw (css::uno::RuntimeException);
58 
59 	// Methods
60 	virtual void SAL_CALL Insert( const ::rtl::OUString& String ) throw (css::uno::RuntimeException);
61 	virtual void SAL_CALL Delete(  ) throw (css::uno::RuntimeException);
62 
63 
64 	// XHelperInterface
65 	virtual rtl::OUString& getServiceImplName();
66 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
67 
68 };
69 
70 #endif /* SC_VBA_CHARACTER_HXX */
71 
72