xref: /aoo4110/main/svtools/source/edit/svmedit2.cxx (revision b1cdbd2c)
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 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_svtools.hxx"
26 
27 #include <svtools/svmedit2.hxx>
28 #include <svtools/xtextedt.hxx>
29 
ExtMultiLineEdit(Window * pParent,WinBits nWinStyle)30 ExtMultiLineEdit::ExtMultiLineEdit( Window* pParent, WinBits nWinStyle ) :
31 
32 	MultiLineEdit( pParent, nWinStyle )
33 
34 {
35 }
36 
ExtMultiLineEdit(Window * pParent,const ResId & rResId)37 ExtMultiLineEdit::ExtMultiLineEdit( Window* pParent, const ResId& rResId ) :
38 
39 	MultiLineEdit( pParent, rResId )
40 
41 {
42 }
43 
~ExtMultiLineEdit()44 ExtMultiLineEdit::~ExtMultiLineEdit()
45 {
46 }
47 
InsertText(const String & rNew,sal_Bool)48 void ExtMultiLineEdit::InsertText( const String& rNew, sal_Bool )
49 {
50 	GetTextView()->InsertText( rNew, sal_False );
51 }
52 
SetAutoScroll(sal_Bool bAutoScroll)53 void ExtMultiLineEdit::SetAutoScroll( sal_Bool bAutoScroll )
54 {
55 	GetTextView()->SetAutoScroll( bAutoScroll );
56 }
57 
EnableCursor(sal_Bool bEnable)58 void ExtMultiLineEdit::EnableCursor( sal_Bool bEnable )
59 {
60 	GetTextView()->EnableCursor( bEnable );
61 }
62 
SetAttrib(const TextAttrib & rAttr,sal_uLong nPara,sal_uInt16 nStart,sal_uInt16 nEnd)63 void ExtMultiLineEdit::SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd )
64 {
65 	GetTextEngine()->SetAttrib( rAttr, nPara, nStart, nEnd );
66 }
67 
SetLeftMargin(sal_uInt16 nLeftMargin)68 void ExtMultiLineEdit::SetLeftMargin( sal_uInt16 nLeftMargin )
69 {
70 	GetTextEngine()->SetLeftMargin( nLeftMargin );
71 }
72 
GetParagraphCount() const73 sal_uLong ExtMultiLineEdit::GetParagraphCount() const
74 {
75 	return GetTextEngine()->GetParagraphCount();
76 }
77 
78