xref: /AOO41X/main/svtools/source/edit/svmedit2.cxx (revision 5900e8ec128faec89519683efce668ccd8cc6084)
1*5900e8ecSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*5900e8ecSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*5900e8ecSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*5900e8ecSAndrew Rist  * distributed with this work for additional information
6*5900e8ecSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*5900e8ecSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*5900e8ecSAndrew Rist  * "License"); you may not use this file except in compliance
9*5900e8ecSAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*5900e8ecSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*5900e8ecSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*5900e8ecSAndrew Rist  * software distributed under the License is distributed on an
15*5900e8ecSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*5900e8ecSAndrew Rist  * KIND, either express or implied.  See the License for the
17*5900e8ecSAndrew Rist  * specific language governing permissions and limitations
18*5900e8ecSAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*5900e8ecSAndrew Rist  *************************************************************/
21*5900e8ecSAndrew Rist 
22*5900e8ecSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_svtools.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <svtools/svmedit2.hxx>
28cdf0e10cSrcweir #include <svtools/xtextedt.hxx>
29cdf0e10cSrcweir 
ExtMultiLineEdit(Window * pParent,WinBits nWinStyle)30cdf0e10cSrcweir ExtMultiLineEdit::ExtMultiLineEdit( Window* pParent, WinBits nWinStyle ) :
31cdf0e10cSrcweir 
32cdf0e10cSrcweir 	MultiLineEdit( pParent, nWinStyle )
33cdf0e10cSrcweir 
34cdf0e10cSrcweir {
35cdf0e10cSrcweir }
36cdf0e10cSrcweir 
ExtMultiLineEdit(Window * pParent,const ResId & rResId)37cdf0e10cSrcweir ExtMultiLineEdit::ExtMultiLineEdit( Window* pParent, const ResId& rResId ) :
38cdf0e10cSrcweir 
39cdf0e10cSrcweir 	MultiLineEdit( pParent, rResId )
40cdf0e10cSrcweir 
41cdf0e10cSrcweir {
42cdf0e10cSrcweir }
43cdf0e10cSrcweir 
~ExtMultiLineEdit()44cdf0e10cSrcweir ExtMultiLineEdit::~ExtMultiLineEdit()
45cdf0e10cSrcweir {
46cdf0e10cSrcweir }
47cdf0e10cSrcweir 
InsertText(const String & rNew,sal_Bool)48cdf0e10cSrcweir void ExtMultiLineEdit::InsertText( const String& rNew, sal_Bool )
49cdf0e10cSrcweir {
50cdf0e10cSrcweir 	GetTextView()->InsertText( rNew, sal_False );
51cdf0e10cSrcweir }
52cdf0e10cSrcweir 
SetAutoScroll(sal_Bool bAutoScroll)53cdf0e10cSrcweir void ExtMultiLineEdit::SetAutoScroll( sal_Bool bAutoScroll )
54cdf0e10cSrcweir {
55cdf0e10cSrcweir 	GetTextView()->SetAutoScroll( bAutoScroll );
56cdf0e10cSrcweir }
57cdf0e10cSrcweir 
EnableCursor(sal_Bool bEnable)58cdf0e10cSrcweir void ExtMultiLineEdit::EnableCursor( sal_Bool bEnable )
59cdf0e10cSrcweir {
60cdf0e10cSrcweir 	GetTextView()->EnableCursor( bEnable );
61cdf0e10cSrcweir }
62cdf0e10cSrcweir 
SetAttrib(const TextAttrib & rAttr,sal_uLong nPara,sal_uInt16 nStart,sal_uInt16 nEnd)63cdf0e10cSrcweir void ExtMultiLineEdit::SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd )
64cdf0e10cSrcweir {
65cdf0e10cSrcweir 	GetTextEngine()->SetAttrib( rAttr, nPara, nStart, nEnd );
66cdf0e10cSrcweir }
67cdf0e10cSrcweir 
SetLeftMargin(sal_uInt16 nLeftMargin)68cdf0e10cSrcweir void ExtMultiLineEdit::SetLeftMargin( sal_uInt16 nLeftMargin )
69cdf0e10cSrcweir {
70cdf0e10cSrcweir 	GetTextEngine()->SetLeftMargin( nLeftMargin );
71cdf0e10cSrcweir }
72cdf0e10cSrcweir 
GetParagraphCount() const73cdf0e10cSrcweir sal_uLong ExtMultiLineEdit::GetParagraphCount() const
74cdf0e10cSrcweir {
75cdf0e10cSrcweir 	return GetTextEngine()->GetParagraphCount();
76cdf0e10cSrcweir }
77cdf0e10cSrcweir 
78