1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef SVTOOLS_IN_EDITBROWSEBOX_HXX
21 #error "not to be included directly!"
26 GenericEditImplementation
< EDIT
>::GenericEditImplementation( EDIT
& _rEdit
)
33 Control
& GenericEditImplementation
< EDIT
>::GetControl()
40 OUString GenericEditImplementation
< EDIT
>::GetText( LineEnd
) const
42 // ignore the line end - this base implementation does not support it
43 return m_rEdit
.GetText( );
48 void GenericEditImplementation
< EDIT
>::SetText( const OUString
& _rStr
)
50 m_rEdit
.SetText( _rStr
);
55 Selection GenericEditImplementation
< EDIT
>::GetSelection() const
57 return m_rEdit
.GetSelection( );
62 void GenericEditImplementation
< EDIT
>::SetSelection( const Selection
& _rSelection
)
64 m_rEdit
.SetSelection( _rSelection
);
69 void GenericEditImplementation
< EDIT
>::SetReadOnly( bool bReadOnly
)
71 m_rEdit
.SetReadOnly( bReadOnly
);
76 bool GenericEditImplementation
< EDIT
>::IsReadOnly() const
78 return m_rEdit
.IsReadOnly();
83 void GenericEditImplementation
< EDIT
>::ReplaceSelected( const OUString
& _rStr
)
85 m_rEdit
.ReplaceSelected( _rStr
);
90 OUString GenericEditImplementation
< EDIT
>::GetSelected( LineEnd
) const
92 return m_rEdit
.GetSelected( );
97 void GenericEditImplementation
< EDIT
>::SetMaxTextLen( sal_Int32 _nMaxLen
)
99 m_rEdit
.SetMaxTextLen( _nMaxLen
);
103 template <class EDIT
>
104 sal_Int32 GenericEditImplementation
< EDIT
>::GetMaxTextLen() const
106 return m_rEdit
.GetMaxTextLen( );
110 template <class EDIT
>
111 void GenericEditImplementation
< EDIT
>::SetModified()
113 m_rEdit
.SetModifyFlag();
117 template <class EDIT
>
118 bool GenericEditImplementation
< EDIT
>::IsModified() const
120 return m_rEdit
.IsModified();
124 template <class EDIT
>
125 void GenericEditImplementation
< EDIT
>::ClearModified()
127 m_rEdit
.ClearModifyFlag();
131 template <class EDIT
>
132 void GenericEditImplementation
< EDIT
>::SetModifyHdl( const Link
<Edit
&,void>& _rLink
)
134 m_rEdit
.SetModifyHdl( _rLink
);
137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */