edittest.cxx (36a46462) | edittest.cxx (4386a992) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 179 unchanged lines hidden (view full) --- 188 virtual void Main(); 189}; 190 191class MyEditEngine : public EditEngine 192{ 193public: 194 MyEditEngine( SfxItemPool* pPool ) : EditEngine( pPool ) { ; } 195 virtual String CalcFieldValue( const SvxFieldItem& rField, sal_uInt32 nPara, USHORT nPos, Color*& rTxtColor, Color*& rFldColor ); | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 179 unchanged lines hidden (view full) --- 188 virtual void Main(); 189}; 190 191class MyEditEngine : public EditEngine 192{ 193public: 194 MyEditEngine( SfxItemPool* pPool ) : EditEngine( pPool ) { ; } 195 virtual String CalcFieldValue( const SvxFieldItem& rField, sal_uInt32 nPara, USHORT nPos, Color*& rTxtColor, Color*& rFldColor ); |
196 virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ); | 196 virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt32 nPara, USHORT nPos ); |
197 virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ); 198}; 199 200XubString __EXPORT MyEditEngine::CalcFieldValue( const SvxFieldItem& rField, sal_uInt32 nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) 201{ 202 const SvxFieldData* pField = rField.GetField(); 203 if ( !pField ) 204 return String( RTL_CONSTASCII_USTRINGPARAM( "<Empty>" ) ); --- 17 unchanged lines hidden (view full) --- 222 } 223 if ( pURL->GetFormat() == SVXURLFORMAT_URL ) 224 return pURL->GetURL(); 225 return pURL->GetRepresentation(); 226 } 227 return String( RTL_CONSTASCII_USTRINGPARAM( "???" ) ); 228} 229 | 197 virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ); 198}; 199 200XubString __EXPORT MyEditEngine::CalcFieldValue( const SvxFieldItem& rField, sal_uInt32 nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) 201{ 202 const SvxFieldData* pField = rField.GetField(); 203 if ( !pField ) 204 return String( RTL_CONSTASCII_USTRINGPARAM( "<Empty>" ) ); --- 17 unchanged lines hidden (view full) --- 222 } 223 if ( pURL->GetFormat() == SVXURLFORMAT_URL ) 224 return pURL->GetURL(); 225 return pURL->GetRepresentation(); 226 } 227 return String( RTL_CONSTASCII_USTRINGPARAM( "???" ) ); 228} 229 |
230void __EXPORT MyEditEngine::FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ) | 230void __EXPORT MyEditEngine::FieldClicked( const SvxFieldItem& rField, sal_uInt32 nPara, USHORT nPos ) |
231{ 232 EditEngine::FieldClicked( rField, nPara, nPos ); // Falls URL 233 const SvxFieldData* pField = rField.GetField(); 234 if ( !pField ) 235 return; 236 237 if ( pField->ISA( SvxURLField ) ) 238 { --- 1553 unchanged lines hidden --- | 231{ 232 EditEngine::FieldClicked( rField, nPara, nPos ); // Falls URL 233 const SvxFieldData* pField = rField.GetField(); 234 if ( !pField ) 235 return; 236 237 if ( pField->ISA( SvxURLField ) ) 238 { --- 1553 unchanged lines hidden --- |