if ( ! aError.Message.startsWith( "[OOoBase]" ) ) // it is an exception *not* thrown by an OOo Base core component returntrue;
// the only exception we do not display ATM is a RowSetVetoException, which // has been raised because an XRowSetApprovalListener vetoed a change if ( aError.ErrorCode + ErrorCondition::ROW_SET_OPERATION_VETOED == 0 ) returnfalse;
// everything else is to be displayed returntrue;
}
}
void displayException(const Any& _rExcept, const css::uno::Reference<css::awt::XWindow>& rParent)
{ // check whether we need to display it if ( !lcl_shouldDisplayError( _rExcept ) ) return;
SdrObjKind getControlTypeByObject(const Reference< css::lang::XServiceInfo>& _rxObject)
{ // ask for the persistent service name
Reference< css::io::XPersistObject> xPersistence(_rxObject, UNO_QUERY);
DBG_ASSERT(xPersistence.is(), "::getControlTypeByObject : argument should be a css::io::XPersistObject !"); if (!xPersistence.is()) return SdrObjKind::FormControl;
OUString sPersistentServiceName = xPersistence->getServiceName(); if (sPersistentServiceName == FM_COMPONENT_EDIT) // 5.0-Name
{ // may be a simple edit field or a formatted field, dependent of the supported services if (_rxObject->supportsService(FM_SUN_COMPONENT_FORMATTEDFIELD)) return SdrObjKind::FormFormattedField; return SdrObjKind::FormEdit;
} if (sPersistentServiceName == FM_COMPONENT_TEXTFIELD) return SdrObjKind::FormEdit; if (sPersistentServiceName == FM_COMPONENT_COMMANDBUTTON) return SdrObjKind::FormButton; if (sPersistentServiceName == FM_COMPONENT_FIXEDTEXT) return SdrObjKind::FormFixedText; if (sPersistentServiceName == FM_COMPONENT_LISTBOX) return SdrObjKind::FormListbox; if (sPersistentServiceName == FM_COMPONENT_CHECKBOX) return SdrObjKind::FormCheckbox; if (sPersistentServiceName == FM_COMPONENT_RADIOBUTTON) return SdrObjKind::FormRadioButton; if (sPersistentServiceName == FM_COMPONENT_GROUPBOX) return SdrObjKind::FormGroupBox; if (sPersistentServiceName == FM_COMPONENT_COMBOBOX) return SdrObjKind::FormCombobox; if (sPersistentServiceName == FM_COMPONENT_GRID) // 5.0-Name return SdrObjKind::FormGrid; if (sPersistentServiceName == FM_COMPONENT_GRIDCONTROL) return SdrObjKind::FormGrid; if (sPersistentServiceName == FM_COMPONENT_IMAGEBUTTON) return SdrObjKind::FormImageButton; if (sPersistentServiceName == FM_COMPONENT_FILECONTROL) return SdrObjKind::FormFileControl; if (sPersistentServiceName == FM_COMPONENT_DATEFIELD) return SdrObjKind::FormDateField; if (sPersistentServiceName == FM_COMPONENT_TIMEFIELD) return SdrObjKind::FormTimeField; if (sPersistentServiceName == FM_COMPONENT_NUMERICFIELD) return SdrObjKind::FormNumericField; if (sPersistentServiceName == FM_COMPONENT_CURRENCYFIELD) return SdrObjKind::FormCurrencyField; if (sPersistentServiceName == FM_COMPONENT_PATTERNFIELD) return SdrObjKind::FormPatternField; if (sPersistentServiceName == FM_COMPONENT_HIDDEN) // 5.0-Name return SdrObjKind::FormHidden; if (sPersistentServiceName == FM_COMPONENT_HIDDENCONTROL) return SdrObjKind::FormHidden; if (sPersistentServiceName == FM_COMPONENT_IMAGECONTROL) return SdrObjKind::FormImageControl; if (sPersistentServiceName == FM_COMPONENT_FORMATTEDFIELD)
{
OSL_FAIL("::getControlTypeByObject : suspicious persistent service name (formatted field) !"); // objects with that service name should exist as they aren't compatible with older versions return SdrObjKind::FormFormattedField;
} if ( sPersistentServiceName == FM_SUN_COMPONENT_SCROLLBAR ) return SdrObjKind::FormScrollbar; if ( sPersistentServiceName == FM_SUN_COMPONENT_SPINBUTTON ) return SdrObjKind::FormSpinButton; if ( sPersistentServiceName == FM_SUN_COMPONENT_NAVIGATIONBAR ) return SdrObjKind::FormNavigationBar;
OSL_FAIL("::getControlTypeByObject : unknown object type !"); return SdrObjKind::FormControl;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.