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> GenericEditImplementation(EDIT & _rEdit)26GenericEditImplementation< EDIT >::GenericEditImplementation( EDIT& _rEdit ) 27 :m_rEdit( _rEdit ) 28 { 29 } 30 31 32 template <class EDIT> GetControl()33Control& GenericEditImplementation< EDIT >::GetControl() 34 { 35 return m_rEdit; 36 } 37 38 39 template <class EDIT> GetText(LineEnd) const40OUString GenericEditImplementation< EDIT >::GetText( LineEnd ) const 41 { 42 // ignore the line end - this base implementation does not support it 43 return m_rEdit.GetText( ); 44 } 45 46 47 template <class EDIT> SetText(const OUString & _rStr)48void GenericEditImplementation< EDIT >::SetText( const OUString& _rStr ) 49 { 50 m_rEdit.SetText( _rStr ); 51 } 52 53 54 template <class EDIT> GetSelection() const55Selection GenericEditImplementation< EDIT >::GetSelection() const 56 { 57 return m_rEdit.GetSelection( ); 58 } 59 60 61 template <class EDIT> SetSelection(const Selection & _rSelection)62void GenericEditImplementation< EDIT >::SetSelection( const Selection& _rSelection ) 63 { 64 m_rEdit.SetSelection( _rSelection ); 65 } 66 67 68 template <class EDIT> SetReadOnly(bool bReadOnly)69void GenericEditImplementation< EDIT >::SetReadOnly( bool bReadOnly ) 70 { 71 m_rEdit.SetReadOnly( bReadOnly ); 72 } 73 74 75 template <class EDIT> IsReadOnly() const76bool GenericEditImplementation< EDIT >::IsReadOnly() const 77 { 78 return m_rEdit.IsReadOnly(); 79 } 80 81 82 template <class EDIT> ReplaceSelected(const OUString & _rStr)83void GenericEditImplementation< EDIT >::ReplaceSelected( const OUString& _rStr ) 84 { 85 m_rEdit.ReplaceSelected( _rStr ); 86 } 87 88 89 template <class EDIT> GetSelected(LineEnd) const90OUString GenericEditImplementation< EDIT >::GetSelected( LineEnd ) const 91 { 92 return m_rEdit.GetSelected( ); 93 } 94 95 96 template <class EDIT> SetMaxTextLen(sal_Int32 _nMaxLen)97void GenericEditImplementation< EDIT >::SetMaxTextLen( sal_Int32 _nMaxLen ) 98 { 99 m_rEdit.SetMaxTextLen( _nMaxLen ); 100 } 101 102 103 template <class EDIT> GetMaxTextLen() const104sal_Int32 GenericEditImplementation< EDIT >::GetMaxTextLen() const 105 { 106 return m_rEdit.GetMaxTextLen( ); 107 } 108 109 110 template <class EDIT> SetModified()111void GenericEditImplementation< EDIT >::SetModified() 112 { 113 m_rEdit.SetModifyFlag(); 114 } 115 116 117 template <class EDIT> IsModified() const118bool GenericEditImplementation< EDIT >::IsModified() const 119 { 120 return m_rEdit.IsModified(); 121 } 122 123 124 template <class EDIT> ClearModified()125void GenericEditImplementation< EDIT >::ClearModified() 126 { 127 m_rEdit.ClearModifyFlag(); 128 } 129 130 131 template <class EDIT> SetModifyHdl(const Link<Edit &,void> & _rLink)132void GenericEditImplementation< EDIT >::SetModifyHdl( const Link<Edit&,void>& _rLink ) 133 { 134 m_rEdit.SetModifyHdl( _rLink ); 135 } 136 137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 138