1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 29*cdf0e10cSrcweir #include "precompiled_forms.hxx" 30*cdf0e10cSrcweir #include "EditBase.hxx" 31*cdf0e10cSrcweir #include "property.hxx" 32*cdf0e10cSrcweir #ifndef _FRM_PROPERTY_HRC_ 33*cdf0e10cSrcweir #include "property.hrc" 34*cdf0e10cSrcweir #endif 35*cdf0e10cSrcweir #include "services.hxx" 36*cdf0e10cSrcweir #include <tools/debug.hxx> 37*cdf0e10cSrcweir #include <comphelper/basicio.hxx> 38*cdf0e10cSrcweir #include <cppuhelper/queryinterface.hxx> 39*cdf0e10cSrcweir #include "frm_resource.hxx" 40*cdf0e10cSrcweir #ifndef _FRM_RESOURCE_HRC_ 41*cdf0e10cSrcweir #include "frm_resource.hrc" 42*cdf0e10cSrcweir #endif 43*cdf0e10cSrcweir 44*cdf0e10cSrcweir //......................................................................... 45*cdf0e10cSrcweir namespace frm 46*cdf0e10cSrcweir { 47*cdf0e10cSrcweir using namespace ::com::sun::star::uno; 48*cdf0e10cSrcweir using namespace ::com::sun::star::sdb; 49*cdf0e10cSrcweir using namespace ::com::sun::star::sdbc; 50*cdf0e10cSrcweir using namespace ::com::sun::star::sdbcx; 51*cdf0e10cSrcweir using namespace ::com::sun::star::beans; 52*cdf0e10cSrcweir using namespace ::com::sun::star::container; 53*cdf0e10cSrcweir using namespace ::com::sun::star::form; 54*cdf0e10cSrcweir using namespace ::com::sun::star::awt; 55*cdf0e10cSrcweir using namespace ::com::sun::star::io; 56*cdf0e10cSrcweir using namespace ::com::sun::star::lang; 57*cdf0e10cSrcweir using namespace ::com::sun::star::util; 58*cdf0e10cSrcweir 59*cdf0e10cSrcweir const sal_uInt16 DEFAULT_LONG = 0x0001; 60*cdf0e10cSrcweir const sal_uInt16 DEFAULT_DOUBLE = 0x0002; 61*cdf0e10cSrcweir const sal_uInt16 FILTERPROPOSAL = 0x0004; 62*cdf0e10cSrcweir 63*cdf0e10cSrcweir DBG_NAME( OEditBaseModel ) 64*cdf0e10cSrcweir //------------------------------------------------------------------ 65*cdf0e10cSrcweir OEditBaseModel::OEditBaseModel( const Reference< XMultiServiceFactory >& _rxFactory, const ::rtl::OUString& rUnoControlModelName, 66*cdf0e10cSrcweir const ::rtl::OUString& rDefault, const sal_Bool _bSupportExternalBinding, const sal_Bool _bSupportsValidation ) 67*cdf0e10cSrcweir :OBoundControlModel( _rxFactory, rUnoControlModelName, rDefault, sal_True, _bSupportExternalBinding, _bSupportsValidation ) 68*cdf0e10cSrcweir ,m_nLastReadVersion(0) 69*cdf0e10cSrcweir ,m_bEmptyIsNull(sal_True) 70*cdf0e10cSrcweir ,m_bFilterProposal(sal_False) 71*cdf0e10cSrcweir { 72*cdf0e10cSrcweir DBG_CTOR( OEditBaseModel, NULL ); 73*cdf0e10cSrcweir } 74*cdf0e10cSrcweir 75*cdf0e10cSrcweir //------------------------------------------------------------------ 76*cdf0e10cSrcweir OEditBaseModel::OEditBaseModel( const OEditBaseModel* _pOriginal, const Reference< XMultiServiceFactory >& _rxFactory ) 77*cdf0e10cSrcweir :OBoundControlModel( _pOriginal, _rxFactory ) 78*cdf0e10cSrcweir ,m_nLastReadVersion(0) 79*cdf0e10cSrcweir { 80*cdf0e10cSrcweir DBG_CTOR( OEditBaseModel, NULL ); 81*cdf0e10cSrcweir 82*cdf0e10cSrcweir m_bFilterProposal = _pOriginal->m_bFilterProposal; 83*cdf0e10cSrcweir m_bEmptyIsNull = _pOriginal->m_bEmptyIsNull; 84*cdf0e10cSrcweir m_aDefault = _pOriginal->m_aDefault; 85*cdf0e10cSrcweir m_aDefaultText = _pOriginal->m_aDefaultText; 86*cdf0e10cSrcweir } 87*cdf0e10cSrcweir 88*cdf0e10cSrcweir //------------------------------------------------------------------ 89*cdf0e10cSrcweir OEditBaseModel::~OEditBaseModel( ) 90*cdf0e10cSrcweir { 91*cdf0e10cSrcweir DBG_DTOR( OEditBaseModel, NULL ); 92*cdf0e10cSrcweir } 93*cdf0e10cSrcweir 94*cdf0e10cSrcweir // XPersist 95*cdf0e10cSrcweir //------------------------------------------------------------------------------ 96*cdf0e10cSrcweir void OEditBaseModel::write(const Reference<XObjectOutputStream>& _rxOutStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) 97*cdf0e10cSrcweir { 98*cdf0e10cSrcweir OBoundControlModel::write(_rxOutStream); 99*cdf0e10cSrcweir 100*cdf0e10cSrcweir // Version 101*cdf0e10cSrcweir sal_uInt16 nVersionId = 0x0005; 102*cdf0e10cSrcweir DBG_ASSERT((getPersistenceFlags() & ~PF_SPECIAL_FLAGS) == 0, 103*cdf0e10cSrcweir "OEditBaseModel::write : invalid special version flags !"); 104*cdf0e10cSrcweir // please don't use other flags, older versions can't interpret them ! 105*cdf0e10cSrcweir 106*cdf0e10cSrcweir nVersionId |= getPersistenceFlags(); 107*cdf0e10cSrcweir _rxOutStream->writeShort(nVersionId); 108*cdf0e10cSrcweir 109*cdf0e10cSrcweir // Name 110*cdf0e10cSrcweir _rxOutStream->writeShort(0); // obsolete 111*cdf0e10cSrcweir _rxOutStream << m_aDefaultText; 112*cdf0e10cSrcweir 113*cdf0e10cSrcweir // Maskierung fuer any 114*cdf0e10cSrcweir sal_uInt16 nAnyMask = 0; 115*cdf0e10cSrcweir if (m_aDefault.getValueType().getTypeClass() == TypeClass_LONG) 116*cdf0e10cSrcweir nAnyMask |= DEFAULT_LONG; 117*cdf0e10cSrcweir else if (m_aDefault.getValueType().getTypeClass() == TypeClass_DOUBLE) 118*cdf0e10cSrcweir nAnyMask |= DEFAULT_DOUBLE; 119*cdf0e10cSrcweir 120*cdf0e10cSrcweir if (m_bFilterProposal) // da boolean, kein Wert speichern 121*cdf0e10cSrcweir nAnyMask |= FILTERPROPOSAL; 122*cdf0e10cSrcweir 123*cdf0e10cSrcweir _rxOutStream->writeBoolean(m_bEmptyIsNull); 124*cdf0e10cSrcweir _rxOutStream->writeShort(nAnyMask); 125*cdf0e10cSrcweir 126*cdf0e10cSrcweir if ((nAnyMask & DEFAULT_LONG) == DEFAULT_LONG) 127*cdf0e10cSrcweir _rxOutStream->writeLong(getINT32(m_aDefault)); 128*cdf0e10cSrcweir else if ((nAnyMask & DEFAULT_DOUBLE) == DEFAULT_DOUBLE) 129*cdf0e10cSrcweir _rxOutStream->writeDouble(getDouble(m_aDefault)); 130*cdf0e10cSrcweir 131*cdf0e10cSrcweir // since version 5 we write the help text 132*cdf0e10cSrcweir writeHelpTextCompatibly(_rxOutStream); 133*cdf0e10cSrcweir // (that's potentially bad : at the time I added the above line we had two derived classes : OEditModel and 134*cdf0e10cSrcweir // OFormattedModel. The first one does not have an own version handling, so it can't write the help text itself, 135*cdf0e10cSrcweir // the second one does it's own writing (reading) after calling our method, so normally we shouldn't write any 136*cdf0e10cSrcweir // additional members as this is not compatible to older office versions. 137*cdf0e10cSrcweir // We decided to place the writing of the help text here as it seems the less worse alternative. There is no delivered 138*cdf0e10cSrcweir // office version including formatted controls (and thus the OFormattedModel), and the OFormattedModel::read seems 139*cdf0e10cSrcweir // robust against this change (as it will read a wrong and unknown file version and thus set it's members to defaults). 140*cdf0e10cSrcweir 141*cdf0e10cSrcweir if ((nVersionId & PF_HANDLE_COMMON_PROPS) != 0) 142*cdf0e10cSrcweir writeCommonEditProperties(_rxOutStream); 143*cdf0e10cSrcweir 144*cdf0e10cSrcweir // !!! properties common to all OEditBaseModel derived classes should be written in writeCommonEditProperties !!! 145*cdf0e10cSrcweir } 146*cdf0e10cSrcweir 147*cdf0e10cSrcweir //------------------------------------------------------------------------------ 148*cdf0e10cSrcweir sal_uInt16 OEditBaseModel::getPersistenceFlags() const 149*cdf0e10cSrcweir { 150*cdf0e10cSrcweir return PF_HANDLE_COMMON_PROPS; 151*cdf0e10cSrcweir } 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir //------------------------------------------------------------------------------ 154*cdf0e10cSrcweir void OEditBaseModel::read(const Reference<XObjectInputStream>& _rxInStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) 155*cdf0e10cSrcweir { 156*cdf0e10cSrcweir OBoundControlModel::read(_rxInStream); 157*cdf0e10cSrcweir ::osl::MutexGuard aGuard(m_aMutex); 158*cdf0e10cSrcweir 159*cdf0e10cSrcweir // Version eigene Versionsnummer 160*cdf0e10cSrcweir sal_uInt16 nVersion = _rxInStream->readShort(); 161*cdf0e10cSrcweir m_nLastReadVersion = nVersion; 162*cdf0e10cSrcweir 163*cdf0e10cSrcweir sal_Bool bHandleCommonProps = (nVersion & PF_HANDLE_COMMON_PROPS) != 0; 164*cdf0e10cSrcweir nVersion = nVersion & ~PF_SPECIAL_FLAGS; 165*cdf0e10cSrcweir 166*cdf0e10cSrcweir // obsolete 167*cdf0e10cSrcweir _rxInStream->readShort(); 168*cdf0e10cSrcweir 169*cdf0e10cSrcweir _rxInStream >> m_aDefaultText; 170*cdf0e10cSrcweir 171*cdf0e10cSrcweir if (nVersion >= 0x0003) 172*cdf0e10cSrcweir { 173*cdf0e10cSrcweir m_bEmptyIsNull = _rxInStream->readBoolean(); 174*cdf0e10cSrcweir 175*cdf0e10cSrcweir sal_uInt16 nAnyMask = _rxInStream->readShort(); 176*cdf0e10cSrcweir if ((nAnyMask & DEFAULT_LONG) == DEFAULT_LONG) 177*cdf0e10cSrcweir { 178*cdf0e10cSrcweir sal_Int32 nValue = _rxInStream->readLong(); 179*cdf0e10cSrcweir m_aDefault <<= (sal_Int32)nValue; 180*cdf0e10cSrcweir } 181*cdf0e10cSrcweir else if ((nAnyMask & DEFAULT_DOUBLE) == DEFAULT_DOUBLE) 182*cdf0e10cSrcweir { 183*cdf0e10cSrcweir double fValue = _rxInStream->readDouble(); 184*cdf0e10cSrcweir m_aDefault <<= (double)fValue; 185*cdf0e10cSrcweir } 186*cdf0e10cSrcweir 187*cdf0e10cSrcweir if ((nAnyMask & FILTERPROPOSAL) == FILTERPROPOSAL) 188*cdf0e10cSrcweir m_bFilterProposal = sal_True; 189*cdf0e10cSrcweir } 190*cdf0e10cSrcweir 191*cdf0e10cSrcweir if (nVersion > 4) 192*cdf0e10cSrcweir readHelpTextCompatibly(_rxInStream); 193*cdf0e10cSrcweir 194*cdf0e10cSrcweir if (bHandleCommonProps) 195*cdf0e10cSrcweir readCommonEditProperties(_rxInStream); 196*cdf0e10cSrcweir 197*cdf0e10cSrcweir // Nach dem Lesen die Defaultwerte anzeigen 198*cdf0e10cSrcweir if ( getControlSource().getLength() ) 199*cdf0e10cSrcweir // (not if we don't have a control source - the "State" property acts like it is persistent, then) 200*cdf0e10cSrcweir resetNoBroadcast(); 201*cdf0e10cSrcweir }; 202*cdf0e10cSrcweir 203*cdf0e10cSrcweir //------------------------------------------------------------------------------ 204*cdf0e10cSrcweir void OEditBaseModel::defaultCommonEditProperties() 205*cdf0e10cSrcweir { 206*cdf0e10cSrcweir OBoundControlModel::defaultCommonProperties(); 207*cdf0e10cSrcweir // no own common properties at the moment 208*cdf0e10cSrcweir } 209*cdf0e10cSrcweir 210*cdf0e10cSrcweir //------------------------------------------------------------------------------ 211*cdf0e10cSrcweir void OEditBaseModel::readCommonEditProperties(const Reference<XObjectInputStream>& _rxInStream) 212*cdf0e10cSrcweir { 213*cdf0e10cSrcweir sal_Int32 nLen = _rxInStream->readLong(); 214*cdf0e10cSrcweir 215*cdf0e10cSrcweir Reference<XMarkableStream> xMark(_rxInStream, UNO_QUERY); 216*cdf0e10cSrcweir DBG_ASSERT(xMark.is(), "OBoundControlModel::readCommonProperties : can only work with markable streams !"); 217*cdf0e10cSrcweir sal_Int32 nMark = xMark->createMark(); 218*cdf0e10cSrcweir 219*cdf0e10cSrcweir // read properties common to all OBoundControlModels 220*cdf0e10cSrcweir OBoundControlModel::readCommonProperties(_rxInStream); 221*cdf0e10cSrcweir 222*cdf0e10cSrcweir // read properties common to all OEditBaseModels 223*cdf0e10cSrcweir 224*cdf0e10cSrcweir // skip the remaining bytes 225*cdf0e10cSrcweir xMark->jumpToMark(nMark); 226*cdf0e10cSrcweir _rxInStream->skipBytes(nLen); 227*cdf0e10cSrcweir xMark->deleteMark(nMark); 228*cdf0e10cSrcweir } 229*cdf0e10cSrcweir 230*cdf0e10cSrcweir //------------------------------------------------------------------------------ 231*cdf0e10cSrcweir void OEditBaseModel::writeCommonEditProperties(const Reference<XObjectOutputStream>& _rxOutStream) 232*cdf0e10cSrcweir { 233*cdf0e10cSrcweir Reference<XMarkableStream> xMark(_rxOutStream, UNO_QUERY); 234*cdf0e10cSrcweir DBG_ASSERT(xMark.is(), "OEditBaseModel::writeCommonProperties : can only work with markable streams !"); 235*cdf0e10cSrcweir sal_Int32 nMark = xMark->createMark(); 236*cdf0e10cSrcweir 237*cdf0e10cSrcweir // a placeholder where we will write the overall length (later in this method) 238*cdf0e10cSrcweir sal_Int32 nLen = 0; 239*cdf0e10cSrcweir _rxOutStream->writeLong(nLen); 240*cdf0e10cSrcweir 241*cdf0e10cSrcweir // write properties common to all OBoundControlModels 242*cdf0e10cSrcweir OBoundControlModel::writeCommonProperties(_rxOutStream); 243*cdf0e10cSrcweir 244*cdf0e10cSrcweir // write properties common to all OEditBaseModels 245*cdf0e10cSrcweir 246*cdf0e10cSrcweir // close the block - write the correct length at the beginning 247*cdf0e10cSrcweir nLen = xMark->offsetToMark(nMark) - sizeof(nLen); 248*cdf0e10cSrcweir xMark->jumpToMark(nMark); 249*cdf0e10cSrcweir _rxOutStream->writeLong(nLen); 250*cdf0e10cSrcweir xMark->jumpToFurthest(); 251*cdf0e10cSrcweir xMark->deleteMark(nMark); 252*cdf0e10cSrcweir } 253*cdf0e10cSrcweir 254*cdf0e10cSrcweir //------------------------------------------------------------------------------ 255*cdf0e10cSrcweir void OEditBaseModel::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const 256*cdf0e10cSrcweir { 257*cdf0e10cSrcweir switch (nHandle) 258*cdf0e10cSrcweir { 259*cdf0e10cSrcweir case PROPERTY_ID_EMPTY_IS_NULL: 260*cdf0e10cSrcweir rValue <<= (sal_Bool)m_bEmptyIsNull; 261*cdf0e10cSrcweir break; 262*cdf0e10cSrcweir case PROPERTY_ID_FILTERPROPOSAL: 263*cdf0e10cSrcweir rValue <<= (sal_Bool)m_bFilterProposal; 264*cdf0e10cSrcweir break; 265*cdf0e10cSrcweir case PROPERTY_ID_DEFAULT_TEXT: 266*cdf0e10cSrcweir rValue <<= m_aDefaultText; 267*cdf0e10cSrcweir break; 268*cdf0e10cSrcweir case PROPERTY_ID_DEFAULT_VALUE: 269*cdf0e10cSrcweir case PROPERTY_ID_DEFAULT_DATE: 270*cdf0e10cSrcweir case PROPERTY_ID_DEFAULT_TIME: 271*cdf0e10cSrcweir rValue = m_aDefault; 272*cdf0e10cSrcweir break; 273*cdf0e10cSrcweir default: 274*cdf0e10cSrcweir OBoundControlModel::getFastPropertyValue(rValue, nHandle); 275*cdf0e10cSrcweir } 276*cdf0e10cSrcweir } 277*cdf0e10cSrcweir 278*cdf0e10cSrcweir //------------------------------------------------------------------------------ 279*cdf0e10cSrcweir sal_Bool OEditBaseModel::convertFastPropertyValue( Any& rConvertedValue, Any& rOldValue, 280*cdf0e10cSrcweir sal_Int32 nHandle, const Any& rValue ) throw( IllegalArgumentException ) 281*cdf0e10cSrcweir { 282*cdf0e10cSrcweir sal_Bool bModified(sal_False); 283*cdf0e10cSrcweir switch (nHandle) 284*cdf0e10cSrcweir { 285*cdf0e10cSrcweir case PROPERTY_ID_EMPTY_IS_NULL: 286*cdf0e10cSrcweir bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bEmptyIsNull); 287*cdf0e10cSrcweir break; 288*cdf0e10cSrcweir case PROPERTY_ID_FILTERPROPOSAL: 289*cdf0e10cSrcweir bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bFilterProposal); 290*cdf0e10cSrcweir break; 291*cdf0e10cSrcweir case PROPERTY_ID_DEFAULT_TEXT: 292*cdf0e10cSrcweir bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aDefaultText); 293*cdf0e10cSrcweir break; 294*cdf0e10cSrcweir case PROPERTY_ID_DEFAULT_VALUE: 295*cdf0e10cSrcweir bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aDefault, ::getCppuType((const double*)0)); 296*cdf0e10cSrcweir break; 297*cdf0e10cSrcweir case PROPERTY_ID_DEFAULT_DATE: 298*cdf0e10cSrcweir case PROPERTY_ID_DEFAULT_TIME: 299*cdf0e10cSrcweir bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aDefault, ::getCppuType((const sal_Int32*)0)); 300*cdf0e10cSrcweir break; 301*cdf0e10cSrcweir default: 302*cdf0e10cSrcweir bModified = OBoundControlModel::convertFastPropertyValue( 303*cdf0e10cSrcweir rConvertedValue, 304*cdf0e10cSrcweir rOldValue, 305*cdf0e10cSrcweir nHandle, 306*cdf0e10cSrcweir rValue); 307*cdf0e10cSrcweir } 308*cdf0e10cSrcweir return bModified; 309*cdf0e10cSrcweir } 310*cdf0e10cSrcweir 311*cdf0e10cSrcweir //------------------------------------------------------------------------------ 312*cdf0e10cSrcweir void OEditBaseModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw ( ::com::sun::star::uno::Exception) 313*cdf0e10cSrcweir { 314*cdf0e10cSrcweir switch (nHandle) 315*cdf0e10cSrcweir { 316*cdf0e10cSrcweir case PROPERTY_ID_EMPTY_IS_NULL: 317*cdf0e10cSrcweir DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_BOOLEAN, "invalid type" ); 318*cdf0e10cSrcweir m_bEmptyIsNull = getBOOL(rValue); 319*cdf0e10cSrcweir break; 320*cdf0e10cSrcweir case PROPERTY_ID_FILTERPROPOSAL: 321*cdf0e10cSrcweir DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_BOOLEAN, "invalid type" ); 322*cdf0e10cSrcweir m_bFilterProposal = getBOOL(rValue); 323*cdf0e10cSrcweir break; 324*cdf0e10cSrcweir // Aenderung der defaultwerte fuehrt zu reset 325*cdf0e10cSrcweir case PROPERTY_ID_DEFAULT_TEXT: 326*cdf0e10cSrcweir DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_STRING, "invalid type" ); 327*cdf0e10cSrcweir rValue >>= m_aDefaultText; 328*cdf0e10cSrcweir resetNoBroadcast(); 329*cdf0e10cSrcweir break; 330*cdf0e10cSrcweir case PROPERTY_ID_DEFAULT_VALUE: 331*cdf0e10cSrcweir case PROPERTY_ID_DEFAULT_DATE: 332*cdf0e10cSrcweir case PROPERTY_ID_DEFAULT_TIME: 333*cdf0e10cSrcweir m_aDefault = rValue; 334*cdf0e10cSrcweir resetNoBroadcast(); 335*cdf0e10cSrcweir break; 336*cdf0e10cSrcweir default: 337*cdf0e10cSrcweir OBoundControlModel::setFastPropertyValue_NoBroadcast(nHandle, rValue ); 338*cdf0e10cSrcweir } 339*cdf0e10cSrcweir } 340*cdf0e10cSrcweir 341*cdf0e10cSrcweir //XPropertyState 342*cdf0e10cSrcweir //------------------------------------------------------------------------------ 343*cdf0e10cSrcweir Any OEditBaseModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const 344*cdf0e10cSrcweir { 345*cdf0e10cSrcweir switch (nHandle) 346*cdf0e10cSrcweir { 347*cdf0e10cSrcweir case PROPERTY_ID_DEFAULT_TEXT: 348*cdf0e10cSrcweir return makeAny(::rtl::OUString()); 349*cdf0e10cSrcweir case PROPERTY_ID_FILTERPROPOSAL: 350*cdf0e10cSrcweir return Any(makeAny((sal_Bool)sal_False)); 351*cdf0e10cSrcweir case PROPERTY_ID_DEFAULT_VALUE: 352*cdf0e10cSrcweir case PROPERTY_ID_DEFAULT_DATE: 353*cdf0e10cSrcweir case PROPERTY_ID_DEFAULT_TIME: 354*cdf0e10cSrcweir return Any(); 355*cdf0e10cSrcweir default: 356*cdf0e10cSrcweir return OBoundControlModel::getPropertyDefaultByHandle(nHandle); 357*cdf0e10cSrcweir } 358*cdf0e10cSrcweir } 359*cdf0e10cSrcweir 360*cdf0e10cSrcweir //......................................................................... 361*cdf0e10cSrcweir } 362*cdf0e10cSrcweir //......................................................................... 363*cdf0e10cSrcweir 364