Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef SVTOOLS_IN_EDITBROWSEBOX_HXX
21 : #error "not to be included directly!"
22 : #endif
23 :
24 : //----------------------------------------------------------------------
25 : template <class EDIT>
26 62 : GenericEditImplementation< EDIT >::GenericEditImplementation( EDIT& _rEdit )
27 62 : :m_rEdit( _rEdit )
28 : {
29 62 : }
30 :
31 : //----------------------------------------------------------------------
32 : template <class EDIT>
33 17 : Control& GenericEditImplementation< EDIT >::GetControl()
34 : {
35 17 : return m_rEdit;
36 : }
37 :
38 : //----------------------------------------------------------------------
39 : template <class EDIT>
40 0 : String GenericEditImplementation< EDIT >::GetText( LineEnd ) const
41 : {
42 : // ignore the line end - this base implementation does not support it
43 0 : return m_rEdit.GetText( );
44 : }
45 :
46 : //----------------------------------------------------------------------
47 : template <class EDIT>
48 24 : void GenericEditImplementation< EDIT >::SetText( const OUString& _rStr )
49 : {
50 24 : m_rEdit.SetText( _rStr );
51 24 : }
52 :
53 : //----------------------------------------------------------------------
54 : template <class EDIT>
55 0 : Selection GenericEditImplementation< EDIT >::GetSelection() const
56 : {
57 0 : return m_rEdit.GetSelection( );
58 : }
59 :
60 : //----------------------------------------------------------------------
61 : template <class EDIT>
62 0 : void GenericEditImplementation< EDIT >::SetSelection( const Selection& _rSelection )
63 : {
64 0 : m_rEdit.SetSelection( _rSelection );
65 0 : }
66 :
67 : //----------------------------------------------------------------------
68 : template <class EDIT>
69 0 : void GenericEditImplementation< EDIT >::SetReadOnly( sal_Bool bReadOnly )
70 : {
71 0 : m_rEdit.SetReadOnly( bReadOnly );
72 0 : }
73 :
74 : //----------------------------------------------------------------------
75 : template <class EDIT>
76 0 : sal_Bool GenericEditImplementation< EDIT >::IsReadOnly() const
77 : {
78 0 : return m_rEdit.IsReadOnly();
79 : }
80 :
81 : //----------------------------------------------------------------------
82 : template <class EDIT>
83 0 : void GenericEditImplementation< EDIT >::ReplaceSelected( const String& _rStr )
84 : {
85 0 : m_rEdit.ReplaceSelected( _rStr );
86 0 : }
87 :
88 : //----------------------------------------------------------------------
89 : template <class EDIT>
90 0 : void GenericEditImplementation< EDIT >::DeleteSelected()
91 : {
92 0 : m_rEdit.DeleteSelected();
93 0 : }
94 :
95 : //----------------------------------------------------------------------
96 : template <class EDIT>
97 0 : String GenericEditImplementation< EDIT >::GetSelected( LineEnd ) const
98 : {
99 0 : return m_rEdit.GetSelected( );
100 : }
101 :
102 : //----------------------------------------------------------------------
103 : template <class EDIT>
104 34 : void GenericEditImplementation< EDIT >::SetMaxTextLen( xub_StrLen _nMaxLen )
105 : {
106 34 : m_rEdit.SetMaxTextLen( _nMaxLen );
107 34 : }
108 :
109 : //----------------------------------------------------------------------
110 : template <class EDIT>
111 0 : xub_StrLen GenericEditImplementation< EDIT >::GetMaxTextLen() const
112 : {
113 0 : return (xub_StrLen)m_rEdit.GetMaxTextLen( );
114 : }
115 :
116 : //----------------------------------------------------------------------
117 : template <class EDIT>
118 0 : void GenericEditImplementation< EDIT >::SetModified()
119 : {
120 0 : m_rEdit.SetModifyFlag();
121 0 : }
122 :
123 : //----------------------------------------------------------------------
124 : template <class EDIT>
125 0 : sal_Bool GenericEditImplementation< EDIT >::IsModified() const
126 : {
127 0 : return m_rEdit.IsModified();
128 : }
129 :
130 : //----------------------------------------------------------------------
131 : template <class EDIT>
132 0 : void GenericEditImplementation< EDIT >::ClearModified()
133 : {
134 0 : m_rEdit.ClearModifyFlag();
135 0 : }
136 :
137 : //----------------------------------------------------------------------
138 : template <class EDIT>
139 31 : void GenericEditImplementation< EDIT >::SetModifyHdl( const Link& _rLink )
140 : {
141 31 : m_rEdit.SetModifyHdl( _rLink );
142 31 : }
143 :
144 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|