diff options
Diffstat (limited to 'forms/source')
41 files changed, 74 insertions, 235 deletions
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index da060f997052..65838c5d9a3b 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -224,7 +224,7 @@ void OButtonModel::read(const Reference<XObjectInputStream>& _rxInStream) throw break; default: - DBG_ERROR("OButtonModel::read : unknown version !"); + OSL_FAIL("OButtonModel::read : unknown version !"); m_eButtonType = FormButtonType_PUSH; m_sTargetURL = ::rtl::OUString(); m_sTargetFrame = ::rtl::OUString(); @@ -480,7 +480,6 @@ IMPL_LINK( OButtonControl, OnClick, void*, EMPTYARG ) // catch exceptions // and catch them on a per-listener basis - if one listener fails, the others still need // to get notified - // 97676 - 21.02.2002 - fs@openoffice.org try { static_cast< XActionListener* >( aIter.next() )->actionPerformed(aEvt); @@ -493,7 +492,7 @@ IMPL_LINK( OButtonControl, OnClick, void*, EMPTYARG ) #endif catch( const Exception& ) { - DBG_ERROR( "OButtonControl::OnClick: caught a exception other than RuntimeException!" ); + OSL_FAIL( "OButtonControl::OnClick: caught a exception other than RuntimeException!" ); } } } diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx index 11ccbe16690a..5fbf0a8d1086 100644 --- a/forms/source/component/CheckBox.cxx +++ b/forms/source/component/CheckBox.cxx @@ -200,7 +200,7 @@ void SAL_CALL OCheckBoxModel::read(const Reference<stario::XObjectInputStream>& readCommonProperties(_rxInStream); break; default: - DBG_ERROR("OCheckBoxModel::read : unknown version !"); + OSL_FAIL("OCheckBoxModel::read : unknown version !"); defaultCommonProperties(); break; } @@ -257,12 +257,12 @@ sal_Bool OCheckBoxModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) m_xColumnUpdate->updateBoolean( sal_False ); break; default: - DBG_ERROR("OCheckBoxModel::commitControlValueToDbColumn: invalid value !"); + OSL_FAIL("OCheckBoxModel::commitControlValueToDbColumn: invalid value !"); } } catch(Exception&) { - DBG_ERROR("OCheckBoxModel::commitControlValueToDbColumn: could not commit !"); + OSL_FAIL("OCheckBoxModel::commitControlValueToDbColumn: could not commit !"); } } return sal_True; diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index 899289025e7b..4ddf4532f51b 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -403,7 +403,7 @@ void SAL_CALL OComboBoxModel::read(const Reference<stario::XObjectInputStream>& if (nVersion > 0x0006) { - DBG_ERROR("OComboBoxModel::read : invalid (means unknown) version !"); + OSL_FAIL("OComboBoxModel::read : invalid (means unknown) version !"); m_aListSource = ::rtl::OUString(); m_aBoundColumn <<= (sal_Int16)0; m_aDefaultText = ::rtl::OUString(); @@ -498,7 +498,7 @@ void OComboBoxModel::loadData( bool _bForce ) Reference<XServiceInfo> xServiceInfo(xConnection, UNO_QUERY); if (!xServiceInfo.is() || !xServiceInfo->supportsService(SRV_SDB_CONNECTION)) { - DBG_ERROR("OComboBoxModel::loadData : invalid connection !"); + OSL_FAIL("OComboBoxModel::loadData : invalid connection !"); return; } diff --git a/forms/source/component/Currency.cxx b/forms/source/component/Currency.cxx index ed919f60b0d6..9ae25ed9b4b8 100644 --- a/forms/source/component/Currency.cxx +++ b/forms/source/component/Currency.cxx @@ -137,7 +137,7 @@ void OCurrencyModel::implConstruct() } catch(Exception&) { - DBG_ERROR( "OCurrencyModel::implConstruct: caught an exception while initializing the aggregate!" ); + OSL_FAIL( "OCurrencyModel::implConstruct: caught an exception while initializing the aggregate!" ); } } } diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 87a2e572a615..e29a2ad14210 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -92,7 +92,7 @@ #include <osl/mutex.hxx> #include <ctype.h> -#include <hash_map> +#include <boost/unordered_map.hpp> // compatiblity: DatabaseCursorType is dead, but for compatiblity reasons we still have to write it ... namespace com { @@ -1157,7 +1157,7 @@ bool ODatabaseForm::hasValidParent() const Reference<XResultSet> xResultSet(m_xParent, UNO_QUERY); if (!xResultSet.is()) { - DBG_ERROR("ODatabaseForm::hasValidParent() : no parent resultset !"); + OSL_FAIL("ODatabaseForm::hasValidParent() : no parent resultset !"); return false; } try @@ -2106,8 +2106,7 @@ void ODatabaseForm::reset_impl(bool _bAproveByListeners) aResetGuard.reset(); // ensure that the row isn't modified // (do this _before_ the listeners are notified ! their reaction (maybe asynchronous) may depend - // on the modified state of the row - // 21.02.00 - 73265 - FS) + // on the modified state of the row) if (bInsertRow) m_xAggregateSet->setPropertyValue(PROPERTY_ISMODIFIED, ::cppu::bool2any(sal_Bool(sal_False))); @@ -2340,7 +2339,7 @@ void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const ::com: lcl_dispatch(xFrame,xTransformer,aURLStr,aReferer,aTargetName,aData,osl_getThreadTextEncoding()); } else { - DBG_ERROR("ODatabaseForm::submit_Impl : wrong encoding !"); + OSL_FAIL("ODatabaseForm::submit_Impl : wrong encoding !"); } } @@ -3023,7 +3022,7 @@ void ODatabaseForm::reload_impl(sal_Bool bMoveToFirst, const Reference< XInterac } catch( const SQLException& e ) { - DBG_ERROR("ODatabaseForm::reload_impl : shouldn't executeRowSet catch this exception?"); + OSL_FAIL("ODatabaseForm::reload_impl : shouldn't executeRowSet catch this exception?"); (void)e; } @@ -3596,15 +3595,13 @@ void SAL_CALL ODatabaseForm::moveToInsertRow() throw( SQLException, RuntimeExcep // * in reset_impl // - set the control defaults into the columns if not void // - do _not_ set the columns to NULL if no control default is set - // This fixes both #88888# and #97955# // // Still, there is #72756#. During fixing this bug, DG introduced not calling the aggregate here. So // in theory, we re-introduced #72756#. But the bug described therein does not happen anymore, as the // preliminaries for it changed (no display of guessed values for new records with autoinc fields) // - // BTW: the public Issuezilla bug for #97955# is #i2815# + // BTW: the public Issuezilla bug is #i2815# // - // 16.04.2002 - 97955 - fs@openoffice.org xUpdate->moveToInsertRow(); // then set the default values and the parameters given from the parent @@ -3866,7 +3863,6 @@ Sequence< ::rtl::OUString > SAL_CALL ODatabaseForm::getSupportedServiceNames() t // the compatible names // This is maily to be consistent with the implementation before fixing #97083#, though the // better solution _may_ be to return the compatible names at runtime, too - // 04.03.2002 - fs@openoffice.org } //------------------------------------------------------------------------------ @@ -3939,7 +3935,7 @@ void SAL_CALL ODatabaseForm::write(const Reference<XObjectOutputStream>& _rxOutS eTranslated = bEscapeProcessing ? DataSelectionType_SQL : DataSelectionType_SQLPASSTHROUGH; } break; - default : DBG_ERROR("ODatabaseForm::write : wrong CommandType !"); + default : OSL_FAIL("ODatabaseForm::write : wrong CommandType !"); } } _rxOutStream->writeShort((sal_Int16)eTranslated); // former DataSelectionType @@ -4045,7 +4041,7 @@ void SAL_CALL ODatabaseForm::read(const Reference<XObjectInputStream>& _rxInStre m_xAggregateSet->setPropertyValue(PROPERTY_ESCAPE_PROCESSING, makeAny((sal_Bool)bEscapeProcessing)); } break; - default : DBG_ERROR("ODatabaseForm::read : wrong CommandType !"); + default : OSL_FAIL("ODatabaseForm::read : wrong CommandType !"); } if (m_xAggregateSet.is()) m_xAggregateSet->setPropertyValue(PROPERTY_COMMANDTYPE, makeAny(nCommandType)); diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx index e5f5375f0e1a..c7cdda51722a 100644 --- a/forms/source/component/Edit.cxx +++ b/forms/source/component/Edit.cxx @@ -561,7 +561,6 @@ void OEditModel::write(const Reference<XObjectOutputStream>& _rxOutStream) throw { // -> fuer die Dauer des Speicherns meinem aggregierten Model die alte TextLen einreden // before doing this we have to save the current text value of the aggregate, as this may be affected by resetting the text len - // FS - 08.12.99 - 70606 aCurrentText = m_xAggregateSet->getPropertyValue(PROPERTY_TEXT); m_xAggregateSet->getPropertyValue(PROPERTY_MAXTEXTLEN) >>= nOldTextLen; diff --git a/forms/source/component/File.cxx b/forms/source/component/File.cxx index 4e4b62dc6131..170241c6eba2 100644 --- a/forms/source/component/File.cxx +++ b/forms/source/component/File.cxx @@ -248,7 +248,7 @@ void OFileControlModel::read(const Reference<stario::XObjectInputStream>& _rxInS readHelpTextCompatibly(_rxInStream); break; default: - DBG_ERROR("OFileControlModel::read : unknown version !"); + OSL_FAIL("OFileControlModel::read : unknown version !"); m_sDefaultValue = ::rtl::OUString(); } @@ -294,7 +294,6 @@ void OFileControlModel::_reset() { // release our mutex once (it's acquired in the calling method !), as setting aggregate properties // may cause any uno controls belonging to us to lock the solar mutex, which is potentially dangerous with // our own mutex locked - // FS - 72451 - 31.01.00 MutexRelease aRelease(m_aMutex); m_xAggregateSet->setPropertyValue(PROPERTY_TEXT, makeAny(m_sDefaultValue)); } diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index 07e964bf5c43..6aff61483a6d 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -256,7 +256,6 @@ namespace frm OControl::initFormControlPeer( getPeer() ); // filter controls are _never_ readonly - // #107013# - 2002-02-03 - fs@openoffice.org Reference< XPropertySet > xModel( getModel(), UNO_QUERY_THROW ); Reference< XPropertySetInfo > xModelPSI( xModel->getPropertySetInfo(), UNO_SET_THROW ); if ( xModelPSI->hasPropertyByName( PROPERTY_READONLY ) ) @@ -757,7 +756,7 @@ namespace frm } else { - DBG_ERROR( "OFilterControl::initialize: unrecognized argument!" ); + OSL_FAIL( "OFilterControl::initialize: unrecognized argument!" ); continue; } diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 0d36f10dc958..53881a3e2ac2 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -599,7 +599,7 @@ OControlModel::OControlModel( ,m_bNativeLook( sal_False ) // form controls are usually embedded into documents, not dialogs, and in documents // the native look is ugly .... - // #i37342# / 2004-11-19 / frank.schoenheit@sun.com + // #i37342# { DBG_CTOR(OControlModel, NULL); if (_rUnoControlModelTypeName.getLength()) // the is a model we have to aggregate @@ -1680,7 +1680,6 @@ void SAL_CALL OBoundControlModel::write( const Reference<stario::XObjectOutputSt // in anything from data loss to crash. // (use writeCommonProperties instead, this is called in derived classes write-method) // !!! EOIN !!! - // FS - 68876 - 28.09.1999 } //------------------------------------------------------------------------------ @@ -1805,7 +1804,7 @@ sal_Bool OBoundControlModel::convertFastPropertyValue( bModified = tryPropertyValue(_rConvertedValue, _rOldValue, _rValue, m_aControlSource); break; case PROPERTY_ID_BOUNDFIELD: - DBG_ERROR( "OBoundControlModel::convertFastPropertyValue: BoundField should be a read-only property !" ); + OSL_FAIL( "OBoundControlModel::convertFastPropertyValue: BoundField should be a read-only property !" ); throw com::sun::star::lang::IllegalArgumentException(); case PROPERTY_ID_CONTROLLABEL: if (!_rValue.hasValue()) @@ -1861,7 +1860,7 @@ void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, co OSL_VERIFY( rValue >>= m_aControlSource ); break; case PROPERTY_ID_BOUNDFIELD: - DBG_ERROR("OBoundControlModel::setFastPropertyValue_NoBroadcast : BoundField should be a read-only property !"); + OSL_FAIL("OBoundControlModel::setFastPropertyValue_NoBroadcast : BoundField should be a read-only property !"); throw com::sun::star::lang::IllegalArgumentException(); case PROPERTY_ID_CONTROLLABEL: { @@ -2163,7 +2162,7 @@ void OBoundControlModel::initFromField( const Reference< XRowSet >& _rxRowSet ) transferDbValueToControl(); else // reset the field if the row set is empty - // #i30661# / 2004-12-16 / frank.schoenheit@sun.com + // #i30661# resetNoBroadcast(); } } @@ -2336,7 +2335,6 @@ void OBoundControlModel::doSetControlValue( const Any& _rValue ) // release our mutex once (it's acquired in one of the the calling methods), as setting aggregate properties // may cause any uno controls belonging to us to lock the solar mutex, which is potentially dangerous with // our own mutex locked - // #72451# / 2000-01-31 / frank.schoenheit@sun.com MutexRelease aRelease( m_aMutex ); if ( ( m_nValuePropertyAggregateHandle != -1 ) && m_xAggregateFastSet.is() ) { @@ -2477,10 +2475,7 @@ void OBoundControlModel::reset() throw (RuntimeException) { OSL_ENSURE( sal_False, "OBoundControlModel::reset: caught an SQL exception!" ); } - // don't count the insert row as "invalid" - // @since #i24495# - // @date 2004-05-14 - // @author fs@openoffice.org + // #i24495# - don't count the insert row as "invalid" sal_Bool bSimpleReset = ( !m_xColumn.is() // no connection to a database column @@ -2524,7 +2519,7 @@ void OBoundControlModel::reset() throw (RuntimeException) } catch(Exception&) { - DBG_ERROR("OBoundControlModel::reset: this should have succeeded in all cases!"); + OSL_FAIL("OBoundControlModel::reset: this should have succeeded in all cases!"); } sal_Bool bNeedValueTransfer = sal_True; diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 145671a6e120..000f3ea3f770 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -127,7 +127,7 @@ StandardFormatsSupplier::StandardFormatsSupplier(const Reference< XMultiServiceF { SetNumberFormatter(m_pMyPrivateFormatter); - // #i29147# - 2004-06-18 - fs@openoffice.org + // #i29147# ::utl::DesktopTerminationObserver::registerTerminationListener( this ); } @@ -184,7 +184,7 @@ void StandardFormatsSupplier::notifyTermination() Reference< XNumberFormatsSupplier > xKeepAlive = this; // when the application is terminating, release our static reference so that we are cleared/destructed // earlier than upon unloading the library - // #i29147# - 2004-06-18 - fs@openoffice.org + // #i29147# s_xDefaultFormatsSupplier = WeakReference< XNumberFormatsSupplier >( ); SetNumberFormatter( NULL ); @@ -480,14 +480,12 @@ void OFormattedModel::describeAggregateProperties( Sequence< Property >& _rAggre // same for FormatKey // (though the paragraph above for the TreatAsNumeric does not hold anymore - we do not have an UI for this. // But we have for the format key ...) - // 25.06.2001 - 87862 - frank.schoenheit@sun.com ModifyPropertyAttributes(_rAggregateProps, PROPERTY_FORMATKEY, 0, PropertyAttribute::TRANSIENT); RemoveProperty(_rAggregateProps, PROPERTY_STRICTFORMAT); // no strict format property for formatted fields: it does not make sense, 'cause // there is no general way to decide which characters/sub strings are allowed during the input of an // arbitraryly formatted control - // 81441 - 12/07/00 - FS } //------------------------------------------------------------------------------ @@ -661,7 +659,7 @@ Reference<XNumberFormatsSupplier> OFormattedModel::calcFormFormatsSupplier() co if (!xNextParentForm.is()) { - DBG_ERROR("OFormattedModel::calcFormFormatsSupplier : have no ancestor which is a form !"); + OSL_FAIL("OFormattedModel::calcFormFormatsSupplier : have no ancestor which is a form !"); return NULL; } @@ -691,7 +689,6 @@ void OFormattedModel::loaded(const EventObject& rEvent) throw ( ::com::sun::star // property requests and one for our own code. This would need a lot of code rewriting // alternative b): The NumberFormatter has to be really threadsafe (with an own mutex), which is // the only "clean" solution for me. - // FS - 69603 - 02.11.99 SolarMutexGuard aGuard; OEditBaseModel::loaded(rEvent); @@ -980,7 +977,7 @@ void OFormattedModel::read(const Reference<XObjectInputStream>& _rxInStream) thr case 2: break; case 3: - DBG_ERROR("FmXFormattedModel::read : unknown effective value type !"); + OSL_FAIL("FmXFormattedModel::read : unknown effective value type !"); } } @@ -1000,7 +997,7 @@ void OFormattedModel::read(const Reference<XObjectInputStream>& _rxInStream) thr } break; default : - DBG_ERROR("OFormattedModel::read : unknown version !"); + OSL_FAIL("OFormattedModel::read : unknown version !"); // dann bleibt das Format des aggregierten Sets, wie es bei der Erzeugung ist : void defaultCommonEditProperties(); break; diff --git a/forms/source/component/FormattedFieldWrapper.cxx b/forms/source/component/FormattedFieldWrapper.cxx index 6ac7740f78b0..118c06921ce1 100644 --- a/forms/source/component/FormattedFieldWrapper.cxx +++ b/forms/source/component/FormattedFieldWrapper.cxx @@ -380,7 +380,7 @@ void OFormattedFieldWrapper::ensureAggregate() Reference< XServiceInfo > xSI(m_xAggregate, UNO_QUERY); if (!xSI.is()) { - DBG_ERROR("OFormattedFieldWrapper::ensureAggregate: the aggregate has no XServiceInfo!"); + OSL_FAIL("OFormattedFieldWrapper::ensureAggregate: the aggregate has no XServiceInfo!"); m_xAggregate.clear(); } } diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx index 701f143c1c0a..7fdb83591834 100644 --- a/forms/source/component/Grid.cxx +++ b/forms/source/component/Grid.cxx @@ -203,7 +203,7 @@ void OGridControlModel::cloneColumns( const OGridControlModel* _pOriginalContain } catch( const Exception& ) { - DBG_ERROR( "OGridControlModel::cloneColumns: caught an exception while cloning the columns!" ); + OSL_FAIL( "OGridControlModel::cloneColumns: caught an exception while cloning the columns!" ); } } @@ -399,7 +399,7 @@ Reference<XPropertySet> OGridControlModel::createColumn(sal_Int32 nTypeId) cons case TYPE_TIMEFIELD: xReturn = new TimeFieldColumn( getContext() ); break; case TYPE_FORMATTEDFIELD: xReturn = new FormattedFieldColumn( getContext() ); break; default: - DBG_ERROR("OGridControlModel::createColumn: Unknown Column"); + OSL_FAIL("OGridControlModel::createColumn: Unknown Column"); break; } return xReturn; diff --git a/forms/source/component/GroupBox.cxx b/forms/source/component/GroupBox.cxx index 702a3aba1905..ccb45d2f8a48 100644 --- a/forms/source/component/GroupBox.cxx +++ b/forms/source/component/GroupBox.cxx @@ -137,7 +137,7 @@ void SAL_CALL OGroupBoxModel::read(const Reference< XObjectInputStream>& _rxInSt if (nVersion > 0x0002) { - DBG_ERROR("OGroupBoxModel::read : unknown version !"); + OSL_FAIL("OGroupBoxModel::read : unknown version !"); } }; diff --git a/forms/source/component/GroupManager.cxx b/forms/source/component/GroupManager.cxx index 7704af43018e..1268bcb5828b 100644 --- a/forms/source/component/GroupManager.cxx +++ b/forms/source/component/GroupManager.cxx @@ -226,12 +226,12 @@ void OGroup::RemoveComponent( const Reference<XPropertySet>& rxElement ) } else { - DBG_ERROR( "OGroup::RemoveComponent: Component nicht in Gruppe" ); + OSL_FAIL( "OGroup::RemoveComponent: Component nicht in Gruppe" ); } } else { - DBG_ERROR( "OGroup::RemoveComponent: Component nicht in Gruppe" ); + OSL_FAIL( "OGroup::RemoveComponent: Component nicht in Gruppe" ); } } diff --git a/forms/source/component/Hidden.cxx b/forms/source/component/Hidden.cxx index 6f1e595d7e79..e71396ec2a39 100644 --- a/forms/source/component/Hidden.cxx +++ b/forms/source/component/Hidden.cxx @@ -178,7 +178,7 @@ void SAL_CALL OHiddenModel::read(const Reference<XObjectInputStream>& _rxInStrea { case 1 : { ::rtl::OUString sDummy; _rxInStream >> sDummy; _rxInStream >> m_sHiddenValue; } break; case 2 : _rxInStream >> m_sHiddenValue; break; - default : DBG_ERROR("OHiddenModel::read : unknown version !"); m_sHiddenValue = ::rtl::OUString(); + default : OSL_FAIL("OHiddenModel::read : unknown version !"); m_sHiddenValue = ::rtl::OUString(); } OControlModel::read(_rxInStream); } diff --git a/forms/source/component/ImageButton.cxx b/forms/source/component/ImageButton.cxx index 926ed5c57e55..c65fea102a12 100644 --- a/forms/source/component/ImageButton.cxx +++ b/forms/source/component/ImageButton.cxx @@ -165,7 +165,7 @@ void OImageButtonModel::read(const Reference<XObjectInputStream>& _rxInStream) t break; default : - DBG_ERROR("OImageButtonModel::read : unknown version !"); + OSL_FAIL("OImageButtonModel::read : unknown version !"); m_eButtonType = FormButtonType_PUSH; m_sTargetURL = ::rtl::OUString(); m_sTargetFrame = ::rtl::OUString(); diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index 6caf6f4b530a..e11ace8dd091 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -180,7 +180,6 @@ OImageControlModel::OImageControlModel( const OImageControlModel* _pOriginal, co osl_incrementInterlockedCount( &m_refCount ); { // simulate a propertyChanged event for the ImageURL - // 2003-05-15 - #109591# - fs@openoffice.org ::osl::MutexGuard aGuard( m_aMutex ); impl_handleNewImageURL_lck( eOther ); } @@ -409,7 +408,7 @@ void OImageControlModel::read(const Reference<XObjectInputStream>& _rxInStream) readCommonProperties(_rxInStream); break; default : - DBG_ERROR("OImageControlModel::read : unknown version !"); + OSL_FAIL("OImageControlModel::read : unknown version !"); m_bReadOnly = sal_False; defaultCommonProperties(); break; @@ -644,7 +643,6 @@ void OImageControlModel::doSetControlValue( const Any& _rValue ) // release our mutex once (it's acquired in the calling method!), as starting the image production may // result in the locking of the solar mutex (unfortunally the default implementation of our aggregate, // VCLXImageControl, does this locking) - // FS - 74438 - 30.03.00 MutexRelease aRelease(m_aMutex); xProducer->startProduction(); } @@ -861,7 +859,7 @@ bool OImageControlControl::implInsertGraphics() // Force bIsLink to be TRUE if we're bound to a field. Though we initialized the file picker with IsLink=TRUE // in this case, and disabled the respective control, there might be picker implementations which do not // respect this, and return IsLink=FALSE here. In this case, "normalize" the flag. - // #i112659# / 2010-08-26 / frank.schoenheit@oracle.com + // #i112659# bIsLink |= bHasField; if ( !bIsLink ) { @@ -877,7 +875,7 @@ bool OImageControlControl::implInsertGraphics() } catch(Exception&) { - DBG_ERROR("OImageControlControl::implInsertGraphics: caught an exception while attempting to execute the FilePicker!"); + OSL_FAIL("OImageControlControl::implInsertGraphics: caught an exception while attempting to execute the FilePicker!"); } return false; } @@ -934,7 +932,6 @@ void OImageControlControl::mousePressed(const ::com::sun::star::awt::MouseEvent& if ( ( e.X < 0 ) || ( e.Y < 0 ) ) { // context menu triggered by keyboard // position it in the center of the control - // 102205 - 16.08.2002 - fs@openoffice.org Reference< XWindow > xWindow( static_cast< ::cppu::OWeakObject* >( this ), UNO_QUERY ); OSL_ENSURE( xWindow.is(), "OImageControlControl::mousePressed: me not a window? How this?" ); if ( xWindow.is() ) @@ -974,7 +971,6 @@ void OImageControlControl::mousePressed(const ::com::sun::star::awt::MouseEvent& // wenn Control nicht gebunden ist, kein Dialog (da die zu schickende URL hinterher sowieso // versanden wuerde) - // FS - #64946# - 19.04.99 Reference<XPropertySet> xBoundField; if (hasProperty(PROPERTY_BOUNDFIELD, xSet)) ::cppu::extractInterface(xBoundField, xSet->getPropertyValue(PROPERTY_BOUNDFIELD)); diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index 734704c33c76..213f58558a6f 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -411,7 +411,7 @@ namespace frm void SAL_CALL OListBoxModel::setPropertyValues( const Sequence< ::rtl::OUString >& _rPropertyNames, const Sequence< Any >& _rValues ) throw(PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { // if both SelectedItems and StringItemList are set, care for this - // #i27024# / 2004-04-05 / fs@openoffice.org + // #i27024# const Any* pSelectSequenceValue = NULL; const ::rtl::OUString* pStartPos = _rPropertyNames.getConstArray(); @@ -553,7 +553,7 @@ namespace frm if (nVersion > 0x0004) { - DBG_ERROR("OListBoxModel::read : invalid (means unknown) version !"); + OSL_FAIL("OListBoxModel::read : invalid (means unknown) version !"); ValueList().swap(m_aListSourceValues); m_aBoundColumn <<= (sal_Int16)0; ValueList().swap(m_aBoundValues); diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx index 68dbd633c85f..0f04b9dd3313 100644 --- a/forms/source/component/RadioButton.cxx +++ b/forms/source/component/RadioButton.cxx @@ -351,7 +351,7 @@ void SAL_CALL ORadioButtonModel::read(const Reference<XObjectInputStream>& _rxIn readCommonProperties(_rxInStream); break; default : - DBG_ERROR("ORadioButtonModel::read : unknown version !"); + OSL_FAIL("ORadioButtonModel::read : unknown version !"); defaultCommonProperties(); break; } @@ -425,7 +425,7 @@ sal_Bool ORadioButtonModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) } catch(Exception&) { - DBG_ERROR("ORadioButtonModel::commitControlValueToDbColumn: could not commit !"); + OSL_FAIL("ORadioButtonModel::commitControlValueToDbColumn: could not commit !"); } } return sal_True; diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx index f37c6bbeb89f..dc839f679c4b 100644 --- a/forms/source/component/clickableimage.cxx +++ b/forms/source/component/clickableimage.cxx @@ -296,7 +296,6 @@ namespace frm // * at the UI, show only the mark // * !!!! recognize every SAVEAS on the document, so the absolute URL can be adjusted. This seems // rather impossible !!! - // 89752 - 23.07.2001 - frank.schoenheit@sun.com aURL.Mark = aURL.Complete; aURL.Complete = xModel->getURL(); aURL.Complete += aURL.Mark; @@ -501,7 +500,6 @@ namespace frm osl_incrementInterlockedCount( &m_refCount ); { // simulate a propertyChanged event for the ImageURL - // 2003-05-15 - #109591# - fs@openoffice.org Any aImageURL; getFastPropertyValue( aImageURL, PROPERTY_ID_IMAGE_URL ); _propertyChanged( PropertyChangeEvent( *this, PROPERTY_IMAGE_URL, sal_False, PROPERTY_ID_IMAGE_URL, Any( ), aImageURL ) ); @@ -699,7 +697,6 @@ namespace frm pImgProd->SetImage( sURL ); else // caution: the medium may be NULL if somebody gave us a invalid URL to work with - // 11/24/2000 - 79667 - FS pImgProd->SetImage(String()); m_bDownloading = sal_False; return; @@ -733,7 +730,6 @@ namespace frm } // the SfxMedium is not allowed to be created with an invalid URL, so we have to check this first - // 23.01.2001 - 81927 - FS INetURLObject aUrl(rURL); if (INET_PROT_NOT_VALID == aUrl.GetProtocol()) // we treat an invalid URL like we would treat no URL diff --git a/forms/source/component/formcontrolfont.cxx b/forms/source/component/formcontrolfont.cxx index f1488c85846a..c9837d5ee862 100644 --- a/forms/source/component/formcontrolfont.cxx +++ b/forms/source/component/formcontrolfont.cxx @@ -357,7 +357,7 @@ namespace frm break; default: - DBG_ERROR( "FontControlModel::convertFastPropertyValue: no font aggregate!" ); + OSL_FAIL( "FontControlModel::convertFastPropertyValue: no font aggregate!" ); } return bModified; } @@ -460,7 +460,7 @@ namespace frm break; default: - DBG_ERROR( "FontControlModel::setFastPropertyValue_NoBroadcast: invalid property!" ); + OSL_FAIL( "FontControlModel::setFastPropertyValue_NoBroadcast: invalid property!" ); } } @@ -539,7 +539,7 @@ namespace frm break; default: - DBG_ERROR( "FontControlModel::getPropertyDefaultByHandle: invalid property!" ); + OSL_FAIL( "FontControlModel::getPropertyDefaultByHandle: invalid property!" ); } return aReturn; diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx index ceeeccaffa79..39d025719297 100644 --- a/forms/source/component/imgprod.cxx +++ b/forms/source/component/imgprod.cxx @@ -164,7 +164,7 @@ ErrCode ImgProdLockBytes::SetSize( sal_Size nSize ) return SvLockBytes::SetSize( nSize ); else { - DBG_ERROR( "ImgProdLockBytes::SetSize not supported for xInputStream..." ); + OSL_FAIL( "ImgProdLockBytes::SetSize not supported for xInputStream..." ); return ERRCODE_IO_CANTWRITE; } } diff --git a/forms/source/component/propertybaghelper.cxx b/forms/source/component/propertybaghelper.cxx index 508c05ac5ca1..ef09d4841148 100644 --- a/forms/source/component/propertybaghelper.cxx +++ b/forms/source/component/propertybaghelper.cxx @@ -94,7 +94,6 @@ namespace frm ,m_pPropertyArrayHelper( NULL ) ,m_bDisposed( false ) { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::PropertyBagHelper" ); } //-------------------------------------------------------------------- @@ -106,14 +105,12 @@ namespace frm //-------------------------------------------------------------------- void PropertyBagHelper::dispose() { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::dispose" ); m_bDisposed = true; } //-------------------------------------------------------------------- void PropertyBagHelper::impl_nts_checkDisposed_throw() const { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::impl_nts_checkDisposed_throw" ); if ( m_bDisposed ) throw DisposedException(); } @@ -121,14 +118,12 @@ namespace frm //-------------------------------------------------------------------- void PropertyBagHelper::impl_nts_invalidatePropertySetInfo() { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::impl_nts_invalidatePropertySetInfo" ); delete m_pPropertyArrayHelper, m_pPropertyArrayHelper = NULL; } //-------------------------------------------------------------------- sal_Int32 PropertyBagHelper::impl_findFreeHandle( const ::rtl::OUString& _rPropertyName ) { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::impl_findFreeHandle" ); ::comphelper::OPropertyArrayAggregationHelper& rPropInfo( impl_ts_getArrayHelper() ); // check the preferred handle @@ -168,8 +163,6 @@ namespace frm //-------------------------------------------------------------------- ::comphelper::OPropertyArrayAggregationHelper& PropertyBagHelper::impl_ts_getArrayHelper() const { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::impl_ts_getArrayHelper" ); - //::osl::MutexGuard aGuard( m_rContext.getMutex() ); OPropertyArrayAggregationHelper* p = m_pPropertyArrayHelper; if ( !p ) { @@ -204,7 +197,6 @@ namespace frm //-------------------------------------------------------------------- void PropertyBagHelper::addProperty( const ::rtl::OUString& _rName, ::sal_Int16 _nAttributes, const Any& _rInitialValue ) { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::addProperty" ); ::osl::MutexGuard aGuard( m_rContext.getMutex() ); impl_nts_checkDisposed_throw(); @@ -232,7 +224,6 @@ namespace frm //-------------------------------------------------------------------- void PropertyBagHelper::removeProperty( const ::rtl::OUString& _rName ) { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::removeProperty" ); ::osl::MutexGuard aGuard( m_rContext.getMutex() ); impl_nts_checkDisposed_throw(); @@ -281,7 +272,6 @@ namespace frm //-------------------------------------------------------------------- Sequence< PropertyValue > PropertyBagHelper::getPropertyValues() { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::getPropertyValues" ); ::osl::MutexGuard aGuard( m_rContext.getMutex() ); impl_nts_checkDisposed_throw(); @@ -324,7 +314,6 @@ namespace frm //-------------------------------------------------------------------- void PropertyBagHelper::setPropertyValues( const Sequence< PropertyValue >& _rProps ) { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::setPropertyValues" ); ::osl::ClearableMutexGuard aGuard( m_rContext.getMutex() ); impl_nts_checkDisposed_throw(); diff --git a/forms/source/helper/controlfeatureinterception.cxx b/forms/source/helper/controlfeatureinterception.cxx index 78746c7f4918..05bb0347dd72 100644 --- a/forms/source/helper/controlfeatureinterception.cxx +++ b/forms/source/helper/controlfeatureinterception.cxx @@ -59,7 +59,7 @@ namespace frm { if ( !_rxInterceptor.is() ) { - DBG_ERROR( "ControlFeatureInterception::registerDispatchProviderInterceptor: invalid interceptor!" ); + OSL_FAIL( "ControlFeatureInterception::registerDispatchProviderInterceptor: invalid interceptor!" ); return; } @@ -82,7 +82,7 @@ namespace frm { if ( !_rxInterceptor.is() ) { - DBG_ERROR( "ControlFeatureInterception::releaseDispatchProviderInterceptor: invalid interceptor!" ); + OSL_FAIL( "ControlFeatureInterception::releaseDispatchProviderInterceptor: invalid interceptor!" ); return; } diff --git a/forms/source/helper/formnavigation.cxx b/forms/source/helper/formnavigation.cxx index 5ac563e63373..3a14f429445c 100644 --- a/forms/source/helper/formnavigation.cxx +++ b/forms/source/helper/formnavigation.cxx @@ -133,7 +133,7 @@ namespace frm } // unreachable - DBG_ERROR( "OFormNavigationHelper::statusChanged: huh? An invalid/unknown URL?" ); + OSL_FAIL( "OFormNavigationHelper::statusChanged: huh? An invalid/unknown URL?" ); } //------------------------------------------------------------------ diff --git a/forms/source/inc/InterfaceContainer.hxx b/forms/source/inc/InterfaceContainer.hxx index 5a327d60576b..88c25d99259b 100644 --- a/forms/source/inc/InterfaceContainer.hxx +++ b/forms/source/inc/InterfaceContainer.hxx @@ -29,7 +29,7 @@ #ifndef _FRM_INTERFACE_CONTAINER_HXX_ #define _FRM_INTERFACE_CONTAINER_HXX_ -#include <hash_map> +#include <boost/unordered_map.hpp> #include <comphelper/stl_types.hxx> #include <comphelper/types.hxx> #include <comphelper/uno3.hxx> @@ -83,7 +83,7 @@ namespace frm }; typedef ::std::vector<InterfaceRef> OInterfaceArray; -typedef ::std::hash_multimap< ::rtl::OUString, InterfaceRef, ::comphelper::UStringHash, ::comphelper::UStringEqual> OInterfaceMap; +typedef ::boost::unordered_multimap< ::rtl::OUString, InterfaceRef, ::comphelper::UStringHash, ::comphelper::UStringEqual> OInterfaceMap; //================================================================== // OInterfaceContainer diff --git a/forms/source/inc/forms_module_impl.hxx b/forms/source/inc/forms_module_impl.hxx index b3063b30546f..fc3bbafec326 100644 --- a/forms/source/inc/forms_module_impl.hxx +++ b/forms/source/inc/forms_module_impl.hxx @@ -74,7 +74,7 @@ namespace FORMS_MODULE_NAMESPACE { if (!s_pImplementationNames) { - OSL_ASSERT("OFormsModule::revokeComponent : have no class infos ! Are you sure called this method at the right time ?"); + OSL_FAIL("OFormsModule::revokeComponent : have no class infos ! Are you sure called this method at the right time ?"); return; } OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, @@ -116,7 +116,7 @@ namespace FORMS_MODULE_NAMESPACE if (!s_pImplementationNames) { - OSL_ASSERT("OFormsModule::writeComponentInfos : have no class infos ! Are you sure called this method at the right time ?"); + OSL_FAIL("OFormsModule::writeComponentInfos : have no class infos ! Are you sure called this method at the right time ?"); return sal_True; } OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, @@ -147,7 +147,7 @@ namespace FORMS_MODULE_NAMESPACE } catch(Exception&) { - OSL_ASSERT("OFormsModule::writeComponentInfos : something went wrong while creating the keys !"); + OSL_FAIL("OFormsModule::writeComponentInfos : something went wrong while creating the keys !"); return sal_False; } } @@ -165,7 +165,7 @@ namespace FORMS_MODULE_NAMESPACE if (!s_pImplementationNames) { - OSL_ASSERT("OFormsModule::getComponentFactory : have no class infos ! Are you sure called this method at the right time ?"); + OSL_FAIL("OFormsModule::getComponentFactory : have no class infos ! Are you sure called this method at the right time ?"); return NULL; } OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx index 7374370c0b2c..9c25049affb8 100644 --- a/forms/source/misc/InterfaceContainer.cxx +++ b/forms/source/misc/InterfaceContainer.cxx @@ -554,7 +554,6 @@ void SAL_CALL OInterfaceContainer::read( const Reference< XObjectInputStream >& // after ::read the object is expected to be in the state it was when ::write was called, so we have // to empty ourself here - // FS - 71598 - 12.01.00 while (getCount()) removeByIndex(0); @@ -583,7 +582,6 @@ void SAL_CALL OInterfaceContainer::read( const Reference< XObjectInputStream >& if ( !xObj.is() ) // couldn't handle it throw; - // 72133 - 09.02.00 - FS } catch(Exception&) { @@ -610,7 +608,7 @@ void SAL_CALL OInterfaceContainer::read( const Reference< XObjectInputStream >& } catch( const Exception& ) { - DBG_ERROR( "OInterfaceContainerHelper::read: reading succeeded, but not inserting!" ); + OSL_FAIL( "OInterfaceContainerHelper::read: reading succeeded, but not inserting!" ); // create a placeholder xElement = xElement.query( lcl_createPlaceHolder( m_xServiceFactory ) ); if ( !xElement.is() ) @@ -1137,7 +1135,7 @@ void SAL_CALL OInterfaceContainer::insertByName(const ::rtl::OUString& _rName, c } catch( const Exception& ) { - DBG_ERROR( "OInterfaceContainer::insertByName: caught an exception!" ); + OSL_FAIL( "OInterfaceContainer::insertByName: caught an exception!" ); } implInsert( m_aItems.size(), xElementProps, sal_True, aElementMetaData.get(), sal_True ); } diff --git a/forms/source/misc/makefile.mk b/forms/source/misc/makefile.mk index 64af07b00c01..c824369751ad 100644 --- a/forms/source/misc/makefile.mk +++ b/forms/source/misc/makefile.mk @@ -31,7 +31,6 @@ PRJNAME=forms TARGET=common ENABLE_EXCEPTIONS=TRUE -#TARGETTYPE=GUI # --- Settings ---------------------------------- diff --git a/forms/source/misc/services.cxx b/forms/source/misc/services.cxx index 2184fb42f992..ab891083d50e 100644 --- a/forms/source/misc/services.cxx +++ b/forms/source/misc/services.cxx @@ -419,7 +419,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* _pImplN for (sal_Int32 i=0; i<nClasses; ++i, ++pClasses, ++pServices, ++pFunctionsAsInts) { - if (rtl_ustr_ascii_compare(*pClasses, _pImplName) == 0) + if (rtl_ustr_ascii_compare(pClasses->getStr(), _pImplName) == 0) { ::cppu::ComponentInstantiation aCurrentCreateFunction = reinterpret_cast< ::cppu::ComponentInstantiation>(*pFunctionsAsInts); diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx index 7744168f9ef4..5bca1a5447a6 100644 --- a/forms/source/runtime/formoperations.cxx +++ b/forms/source/runtime/formoperations.cxx @@ -548,7 +548,7 @@ namespace frm m_xLoadableForm->reload(); // refresh all controls in the form (and sub forms) which can be refreshed - // #i90914# / 2008-07-02 / frank.schoenheit@sun.com + // #i90914# ::comphelper::IndexAccessIterator aIter( m_xLoadableForm ); Reference< XInterface > xElement( aIter.Next() ); while ( xElement.is() ) @@ -650,7 +650,6 @@ namespace frm case FormFeature::MoveToInsertRow: // move to the last row before moving to the insert row - // 21.01.2002 - 96480 - fs@openoffice.org m_xCursor->last(); m_xUpdateCursor->moveToInsertRow(); break; diff --git a/forms/source/xforms/convert.cxx b/forms/source/xforms/convert.cxx index 4e7ecbab2561..b03132ddd85b 100644 --- a/forms/source/xforms/convert.cxx +++ b/forms/source/xforms/convert.cxx @@ -35,6 +35,7 @@ #include <memory> #include <algorithm> #include <functional> +#include <o3tl/compat_functional.hxx> #include <rtl/math.hxx> #include <rtl/ustrbuf.hxx> #include <tools/date.hxx> @@ -51,6 +52,7 @@ using com::sun::star::uno::Any; using com::sun::star::uno::makeAny; using com::sun::star::util::Time; using namespace std; +using namespace o3tl; typedef com::sun::star::util::Date UNODate; typedef com::sun::star::util::Time UNOTime; @@ -539,7 +541,7 @@ Convert::Types_t Convert::getTypes() { Types_t aTypes( maMap.size() ); transform( maMap.begin(), maMap.end(), aTypes.getArray(), - select1st<Map_t::value_type>() ); + o3tl::select1st<Map_t::value_type>() ); return aTypes; } diff --git a/forms/source/xforms/datatyperepository.cxx b/forms/source/xforms/datatyperepository.cxx index a4bce7e66db3..593c486b1795 100644 --- a/forms/source/xforms/datatyperepository.cxx +++ b/forms/source/xforms/datatyperepository.cxx @@ -43,6 +43,7 @@ #include <functional> #include <algorithm> +#include <o3tl/compat_functional.hxx> //........................................................................ namespace xforms @@ -205,7 +206,7 @@ namespace xforms m_aRepository.begin(), m_aRepository.end(), aNames.getArray(), - ::std::select1st< Repository::value_type >() + ::o3tl::select1st< Repository::value_type >() ); return aNames; } diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index 26c7981ddfdf..26074f2a1c6f 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -234,60 +234,12 @@ void Model::dbg_assertInvariant() const { OSL_ENSURE( mpInstances != NULL, "no instances found" ); OSL_ENSURE( mxInstances.is(), "No instance container!" ); - // OSL_ENSURE( mxInstances->hasElements(), "no instance!" ); OSL_ENSURE( mpBindings != NULL, "no bindings element" ); OSL_ENSURE( mxBindings.is(), "No Bindings container" ); OSL_ENSURE( mpSubmissions != NULL, "no submissions element" ); OSL_ENSURE( mxSubmissions.is(), "No Submission container" ); - - - - /* - // check bindings, and things that have to do with our binding - std::vector<MIP*> aAllMIPs; // check MIP map - sal_Int32 nCount = mpBindings->countItems(); - for( sal_Int32 i = 0; i < nCount; i++ ) - { - Binding* pBind = Binding::getBinding( - mpBindings->Collection<XPropertySet_t>::getItem( i ) ); - - // examine and check binding - OSL_ENSURE( pBind != NULL, "invalid binding found" ); - - OSL_ENSURE( Model::getModel( pBind->getModel() ) == this, - "our binding doesn't know us."); - // check this binding's MIP against MIP map - MIP* pMIP = const_cast<MIP*>( pBind->_getMIP() ); - sal_Int32 nFound = 0; - if( pMIP != NULL ) - { - aAllMIPs.push_back( pMIP ); - for( MIPs_t::const_iterator aIter = maMIPs.begin(); - aIter != maMIPs.end(); - aIter++ ) - { - if( pMIP == aIter->second ) - nFound++; - } - } - OSL_ENSURE( ( pMIP == NULL ) == ( nFound == 0 ), "MIP-map wrong" ); - } - - // check MIP map for left-over MIPs - for( MIPs_t::const_iterator aIter = maMIPs.begin(); - aIter != maMIPs.end(); - aIter++ ) - { - MIP* pMIP = aIter->second; - std::vector<MIP*>::iterator aFound = - std::find( aAllMIPs.begin(), aAllMIPs.end(), pMIP ); - if( aFound != aAllMIPs.end() ) - aAllMIPs.erase( aFound ); - } - OSL_ENSURE( aAllMIPs.empty(), "lonely MIPs found!" ); - */ } #endif @@ -325,8 +277,6 @@ void Model::removeMIPs( void* pTag ) MIP Model::queryMIP( const XNode_t& xNode ) const { - // OSL_ENSURE( xNode.is(), "no node" ); - // travel up inheritance chain and inherit MIPs MIP aRet; for( XNode_t xCurrent = xNode; @@ -717,15 +667,6 @@ Model::XSet_t Model::getSubmissions() return mxSubmissions; } - - -// -// implementation of XFormsUIHelper1 interface -// can be found in file model_ui.cxx -// - - - // // implement XPropertySet & friends // @@ -778,33 +719,4 @@ Sequence<sal_Int8> Model::getImplementationId() return getUnoTunnelID(); } - -// -// 'shift' operators for getting data into and out of Anys -// - -void operator <<= ( com::sun::star::uno::Any& rAny, - xforms::Model* pModel) -{ - Reference<XPropertySet> xPropSet( static_cast<XPropertySet*>( pModel ) ); - rAny <<= xPropSet; -} - -bool operator >>= ( xforms::Model* pModel, - com::sun::star::uno::Any& rAny ) -{ - bool bRet = false; - - // acquire model pointer through XUnoTunnel - Reference<XUnoTunnel> xTunnel( rAny, UNO_QUERY ); - if( xTunnel.is() ) - { - pModel = reinterpret_cast<xforms::Model*>( - xTunnel->getSomething( xforms::Model::getUnoTunnelID() ) ); - bRet = true; - } - - return bRet; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/model.hxx b/forms/source/xforms/model.hxx index 03db8210f388..a237d7de14fd 100644 --- a/forms/source/xforms/model.hxx +++ b/forms/source/xforms/model.hxx @@ -428,10 +428,6 @@ public: }; -// finally, allow 'shifting' of Model objects into/out of Any -void operator <<= ( com::sun::star::uno::Any&, const xforms::Model* ); -bool operator >>= ( xforms::Model*, const com::sun::star::uno::Any& ); - } // namespace #endif diff --git a/forms/source/xforms/propertysetbase.cxx b/forms/source/xforms/propertysetbase.cxx index dd2c3f139098..438212d55dbd 100644 --- a/forms/source/xforms/propertysetbase.cxx +++ b/forms/source/xforms/propertysetbase.cxx @@ -125,7 +125,7 @@ void PropertySetBase::notifyAndCachePropertyValue( sal_Int32 nHandle ) } catch( Exception& ) { - DBG_ERROR( "PropertySetBase::notifyAndCachePropertyValue: this is not expected to fail!" ); + OSL_FAIL( "PropertySetBase::notifyAndCachePropertyValue: this is not expected to fail!" ); } } Any aOldValue = aPos->second; diff --git a/forms/source/xforms/submission/serialization_app_xml.cxx b/forms/source/xforms/submission/serialization_app_xml.cxx index c3e2ab545668..f7262c527045 100644 --- a/forms/source/xforms/submission/serialization_app_xml.cxx +++ b/forms/source/xforms/submission/serialization_app_xml.cxx @@ -96,17 +96,6 @@ CSerializationAppXML::serialize_node(const CSS::uno::Reference< CSS::xml::dom::X } } -/* -void -CSerializationAppXML::serialize_nodeset() -{ - CSS::uno::Reference< CSS::xml::dom::XNodeList > aNodeList = m_aXPathObject->getNodeList(); - for (sal_Int32 i=0; i<aNodeList->getLength(); i++) - serialize_node(aNodeList->item(i)); - m_aPipe->closeOutput(); -} -*/ - void CSerializationAppXML::serialize() { diff --git a/forms/source/xforms/submission/serialization_urlencoded.cxx b/forms/source/xforms/submission/serialization_urlencoded.cxx index e5ab54533e61..b0f498ff1b96 100644 --- a/forms/source/xforms/submission/serialization_urlencoded.cxx +++ b/forms/source/xforms/submission/serialization_urlencoded.cxx @@ -170,23 +170,7 @@ void CSerializationURLEncoded::serialize_node(const Reference< XNode >& aNode) if (aChild.is() && aChild->getNodeType() == NodeType_ELEMENT_NODE) serialize_node(aChild); } - - // siblings... -// Reference< XNode > aSibling = aNode->getNextSibling(); -// if (aSibling.is()) -// serialize_node(aSibling); - -} - -/* -void CSerializationURLEncoded::serialize_nodeset() -{ - Reference< XNodeList > aNodeList = m_aXPathObject->getNodeList(); - for (sal_Int32 i=0; i<aNodeList->getLength(); i++) - serialize_node(aNodeList->item(i)); - m_aPipe->closeOutput(); } -*/ void CSerializationURLEncoded::serialize() { diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx index c8e87fa68a04..d7d0d005cb67 100644 --- a/forms/source/xforms/submission/submission_get.cxx +++ b/forms/source/xforms/submission/submission_get.cxx @@ -45,11 +45,14 @@ using namespace CSS::uno; using namespace CSS::ucb; using namespace CSS::task; using namespace CSS::io; -using namespace rtl; using namespace osl; using namespace ucbhelper; using namespace std; +using ::rtl::OUString; +using ::rtl::OStringToOUString; +using ::rtl::OStringBuffer; + CSubmissionGet::CSubmissionGet(const rtl::OUString& aURL, const CSS::uno::Reference< CSS::xml::dom::XDocumentFragment >& aFragment) : CSubmission(aURL, aFragment) diff --git a/forms/source/xforms/submission/submission_post.cxx b/forms/source/xforms/submission/submission_post.cxx index c76d492873d9..d7a92c885964 100644 --- a/forms/source/xforms/submission/submission_post.cxx +++ b/forms/source/xforms/submission/submission_post.cxx @@ -45,11 +45,12 @@ using namespace CSS::uno; using namespace CSS::ucb; using namespace CSS::task; using namespace CSS::io; -using namespace rtl; using namespace osl; using namespace ucbhelper; using namespace std; +using ::rtl::OUString; + CSubmissionPost::CSubmissionPost(const rtl::OUString& aURL, const CSS::uno::Reference< CSS::xml::dom::XDocumentFragment >& aFragment) : CSubmission(aURL, aFragment) @@ -66,7 +67,6 @@ CSubmission::SubmissionResult CSubmissionPost::submit(const CSS::uno::Reference< ucbhelper::Content aContent(m_aURLObj.GetMainURL(INetURLObject::NO_DECODE), aEnvironment); // use post command - OUString aCommandName(RTL_CONSTASCII_USTRINGPARAM("post")); PostCommandArgument2 aPostArgument; aPostArgument.Source = apSerialization->getInputStream(); @@ -78,26 +78,17 @@ CSubmission::SubmissionResult CSubmissionPost::submit(const CSS::uno::Reference< aCommandArgument <<= aPostArgument; aContent.executeCommand( aCommandName, aCommandArgument); - // wait for command to finish - // pProgressHelper->m_cFinished.wait(); - - // CSS::uno::Reference< XOutputStream > xOut(aSink, UNO_QUERY_THROW); - // xOut->closeOutput(); - try { - // m_aResultStream = CSS::uno::Reference< XInputStream >(aSink, UNO_QUERY_THROW); m_aResultStream = aSink->getInputStream(); } catch (Exception&) { OSL_ENSURE(sal_False, "Cannot open reply stream from content"); } } catch (Exception&) { - // XXX OSL_ENSURE(sal_False, "Exception during UCB operatration."); return UNKNOWN_ERROR; } - return SUCCESS; } diff --git a/forms/source/xforms/submission/submission_put.cxx b/forms/source/xforms/submission/submission_put.cxx index a9f9681014be..98774af3f1e0 100644 --- a/forms/source/xforms/submission/submission_put.cxx +++ b/forms/source/xforms/submission/submission_put.cxx @@ -43,11 +43,11 @@ using namespace CSS::uno; using namespace CSS::ucb; using namespace CSS::task; using namespace CSS::io; -using namespace rtl; using namespace osl; using namespace ucbhelper; using namespace std; +using ::rtl::OUString; CSubmissionPut::CSubmissionPut(const rtl::OUString& aURL, const CSS::uno::Reference< CSS::xml::dom::XDocumentFragment >& aFragment) : CSubmission(aURL, aFragment) |