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