Branch libreoffice-5-0-4
[LibreOffice.git] / include / svtools / editimplementation.hxx
blob4140388fcea4d622e584d6e81a6fb3d95883aea6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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!"
22 #endif
25 template <class EDIT>
26 GenericEditImplementation< EDIT >::GenericEditImplementation( EDIT& _rEdit )
27 :m_rEdit( _rEdit )
32 template <class EDIT>
33 Control& GenericEditImplementation< EDIT >::GetControl()
35 return m_rEdit;
39 template <class EDIT>
40 OUString GenericEditImplementation< EDIT >::GetText( LineEnd ) const
42 // ignore the line end - this base implementation does not support it
43 return m_rEdit.GetText( );
47 template <class EDIT>
48 void GenericEditImplementation< EDIT >::SetText( const OUString& _rStr )
50 m_rEdit.SetText( _rStr );
54 template <class EDIT>
55 Selection GenericEditImplementation< EDIT >::GetSelection() const
57 return m_rEdit.GetSelection( );
61 template <class EDIT>
62 void GenericEditImplementation< EDIT >::SetSelection( const Selection& _rSelection )
64 m_rEdit.SetSelection( _rSelection );
68 template <class EDIT>
69 void GenericEditImplementation< EDIT >::SetReadOnly( bool bReadOnly )
71 m_rEdit.SetReadOnly( bReadOnly );
75 template <class EDIT>
76 bool GenericEditImplementation< EDIT >::IsReadOnly() const
78 return m_rEdit.IsReadOnly();
82 template <class EDIT>
83 void GenericEditImplementation< EDIT >::ReplaceSelected( const OUString& _rStr )
85 m_rEdit.ReplaceSelected( _rStr );
89 template <class EDIT>
90 void GenericEditImplementation< EDIT >::DeleteSelected()
92 m_rEdit.DeleteSelected();
96 template <class EDIT>
97 OUString GenericEditImplementation< EDIT >::GetSelected( LineEnd ) const
99 return m_rEdit.GetSelected( );
103 template <class EDIT>
104 void GenericEditImplementation< EDIT >::SetMaxTextLen( sal_Int32 _nMaxLen )
106 m_rEdit.SetMaxTextLen( _nMaxLen );
110 template <class EDIT>
111 sal_Int32 GenericEditImplementation< EDIT >::GetMaxTextLen() const
113 return m_rEdit.GetMaxTextLen( );
117 template <class EDIT>
118 void GenericEditImplementation< EDIT >::SetModified()
120 m_rEdit.SetModifyFlag();
124 template <class EDIT>
125 bool GenericEditImplementation< EDIT >::IsModified() const
127 return m_rEdit.IsModified();
131 template <class EDIT>
132 void GenericEditImplementation< EDIT >::ClearModified()
134 m_rEdit.ClearModifyFlag();
138 template <class EDIT>
139 void GenericEditImplementation< EDIT >::SetModifyHdl( const Link<>& _rLink )
141 m_rEdit.SetModifyHdl( _rLink );
144 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */