Update ooo320-m1
[ooovba.git] / sc / source / ui / vba / vbacharacters.hxx
blob263590a702b53d07a6a2457aaa1641b2a79e96bc
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: vbacharacters.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef SC_VBA_CHARACTERS_HXX
31 #define SC_VBA_CHARACTERS_HXX
33 #include <cppuhelper/implbase1.hxx>
35 #include <ooo/vba/excel/XCharacters.hpp>
36 #include <com/sun/star/uno/XComponentContext.hpp>
37 #include <com/sun/star/text/XSimpleText.hpp>
39 #include <vbahelper/vbahelperinterface.hxx>
40 #include "vbapalette.hxx"
41 typedef InheritedHelperInterfaceImpl1< ov::excel::XCharacters > ScVbaCharacters_BASE;
43 class ScVbaCharacters : public ScVbaCharacters_BASE
45 private:
46 css::uno::Reference< css::text::XTextRange > m_xTextRange;
47 css::uno::Reference< css::text::XSimpleText > m_xSimpleText;
48 ScVbaPalette m_aPalette;
49 sal_Int16 nLength;
50 sal_Int16 nStart;
51 // Add becuase of MSO has diferent behavior.
52 sal_Bool bReplace;
53 public:
54 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 );
56 virtual ~ScVbaCharacters() {}
57 // Attributes
58 virtual ::rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
59 virtual void SAL_CALL setCaption( const ::rtl::OUString& _caption ) throw (css::uno::RuntimeException);
60 virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException);
61 virtual ::rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
62 virtual void SAL_CALL setText( const ::rtl::OUString& _text ) throw (css::uno::RuntimeException);
63 virtual css::uno::Reference< ov::excel::XFont > SAL_CALL getFont() throw (css::uno::RuntimeException);
64 virtual void SAL_CALL setFont( const css::uno::Reference< ov::excel::XFont >& _font ) throw (css::uno::RuntimeException);
66 // Methods
67 virtual void SAL_CALL Insert( const ::rtl::OUString& String ) throw (css::uno::RuntimeException);
68 virtual void SAL_CALL Delete( ) throw (css::uno::RuntimeException);
71 // XHelperInterface
72 virtual rtl::OUString& getServiceImplName();
73 virtual css::uno::Sequence<rtl::OUString> getServiceNames();
77 #endif /* SC_VBA_CHARACTER_HXX */