diff options
Diffstat (limited to 'forms/source')
38 files changed, 210 insertions, 302 deletions
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index 65838c5d9a3b..33d1e9d3a553 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -440,7 +440,7 @@ void SAL_CALL OButtonControl::disposing( const EventObject& _rSource ) throw( Ru void OButtonControl::actionPerformed(const ActionEvent& /*rEvent*/) throw ( ::com::sun::star::uno::RuntimeException) { // Asynchron fuer starutil::URL-Button - ULONG n = Application::PostUserEvent( LINK(this, OButtonControl,OnClick) ); + sal_uLong n = Application::PostUserEvent( LINK(this, OButtonControl,OnClick) ); { ::osl::MutexGuard aGuard( m_aMutex ); m_nClickEvent = n; diff --git a/forms/source/component/Button.hxx b/forms/source/component/Button.hxx index b866c55b3b1c..1c6b168a877c 100644 --- a/forms/source/component/Button.hxx +++ b/forms/source/component/Button.hxx @@ -128,7 +128,7 @@ class OButtonControl :public OButtonControl_BASE ,public OFormNavigationHelper { private: - ULONG m_nClickEvent; + sal_uLong m_nClickEvent; sal_Int16 m_nTargetUrlFeatureId; /// caches the value of the "Enabled" property of our model sal_Bool m_bEnabledByPropertyValue; diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index e29a2ad14210..74fab9759d33 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -1500,8 +1500,8 @@ Reference< XCloneable > SAL_CALL ODatabaseForm::createClone( ) throw (RuntimeEx //------------------------------------------------------------------------------ void ODatabaseForm::fire( sal_Int32* pnHandles, const Any* pNewValues, const Any* pOldValues, sal_Int32 nCount, sal_Bool bVetoable ) { - // same as in getFastPropertyValue(INT32) : if we're resetting currently don't fire any changes of the - // IsModified property from FALSE to TRUE, as this is only temporary 'til the reset is done + // same as in getFastPropertyValue(sal_Int32) : if we're resetting currently don't fire any changes of the + // IsModified property from sal_False to sal_True, as this is only temporary 'til the reset is done if (m_nResetsPending > 0) { // look for the PROPERTY_ID_ISMODIFIED diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx index 75249a2b8adf..14fe7111e835 100644 --- a/forms/source/component/DatabaseForm.hxx +++ b/forms/source/component/DatabaseForm.hxx @@ -200,7 +200,7 @@ class ODatabaseForm :public OFormComponents // will be used as additional context information // when an exception is catched and forwarded to the listeners - INT32 m_nResetsPending; + sal_Int32 m_nResetsPending; // <overwritten_properties> sal_Int32 m_nPrivileges; sal_Bool m_bInsertOnly; diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx index c7cdda51722a..d948dec4f392 100644 --- a/forms/source/component/Edit.cxx +++ b/forms/source/component/Edit.cxx @@ -40,7 +40,7 @@ #include <com/sun/star/awt/XVclWindowPeer.hpp> #include <vcl/svapp.hxx> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include <connectivity/dbtools.hxx> #include <connectivity/formattedcolumnvalue.hxx> diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index 6aff61483a6d..d5b203249de1 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -58,6 +58,7 @@ #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> #include <com/sun/star/sdbcx/XTablesSupplier.hpp> #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> +#include <com/sun/star/awt/XItemList.hpp> /** === end UNO includes === **/ #include <comphelper/numbers.hxx> @@ -72,7 +73,7 @@ #include <unotools/localedatawrapper.hxx> #include <vcl/stdtext.hxx> #include <vcl/svapp.hxx> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> //-------------------------------------------------------------------------- extern "C" void SAL_CALL createRegistryInfo_OFilterControl() @@ -104,8 +105,8 @@ namespace frm //===================================================================== //--------------------------------------------------------------------- OFilterControl::OFilterControl( const Reference< XMultiServiceFactory >& _rxORB ) - :m_aTextListeners( *this ) - ,m_aContext( _rxORB ) + :UnoControl( _rxORB ) + ,m_aTextListeners( *this ) ,m_aParser( _rxORB ) ,m_nControlClass( FormComponentType::TEXTFIELD ) ,m_bFilterList( sal_False ) @@ -132,11 +133,11 @@ namespace frm if ( !m_xFormatter.is() ) { // we can create one from the connection, if it's an SDB connection - Reference< XNumberFormatsSupplier > xFormatSupplier = ::dbtools::getNumberFormats( m_xConnection, sal_True, m_aContext.getLegacyServiceFactory() ); + Reference< XNumberFormatsSupplier > xFormatSupplier = ::dbtools::getNumberFormats( m_xConnection, sal_True, maContext.getLegacyServiceFactory() ); if ( xFormatSupplier.is() ) { - m_aContext.createComponent( "com.sun.star.util.NumberFormatter", m_xFormatter ); + maContext.createComponent( "com.sun.star.util.NumberFormatter", m_xFormatter ); if ( m_xFormatter.is() ) m_xFormatter->attachNumberFormatsSupplier( xFormatSupplier ); } @@ -342,11 +343,28 @@ namespace frm case FormComponentType::LISTBOX: { - Sequence< ::rtl::OUString> aValueSelection; - Reference< XPropertySet > aPropertyPointer(getModel(), UNO_QUERY); - aPropertyPointer->getPropertyValue(PROPERTY_VALUE_SEQ) >>= aValueSelection; - if (rEvent.Selected <= aValueSelection.getLength()) - aText.append( aValueSelection[ rEvent.Selected ] ); + try + { + const Reference< XItemList > xItemList( getModel(), UNO_QUERY_THROW ); + ::rtl::OUString sItemText( xItemList->getItemText( rEvent.Selected ) ); + + const MapString2String::const_iterator itemPos = m_aDisplayItemToValueItem.find( sItemText ); + if ( itemPos != m_aDisplayItemToValueItem.end() ) + { + sItemText = itemPos->second; + if ( sItemText.getLength() ) + { + ::dbtools::OPredicateInputController aPredicateInput( maContext.getLegacyServiceFactory(), m_xConnection, getParseContext() ); + ::rtl::OUString sErrorMessage; + OSL_VERIFY( aPredicateInput.normalizePredicateString( sItemText, m_xField, &sErrorMessage ) ); + } + } + aText.append( sItemText ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } } break; @@ -521,7 +539,7 @@ namespace frm aNewText.trim(); if ( aNewText.getLength() ) { - ::dbtools::OPredicateInputController aPredicateInput( m_aContext.getLegacyServiceFactory(), m_xConnection, getParseContext() ); + ::dbtools::OPredicateInputController aPredicateInput( maContext.getLegacyServiceFactory(), m_xConnection, getParseContext() ); ::rtl::OUString sErrorMessage; if ( !aPredicateInput.normalizePredicateString( aNewText, m_xField, &sErrorMessage ) ) { @@ -614,6 +632,16 @@ namespace frm { m_aText = aText; xListBox->selectItem(m_aText, sal_True); + if ( xListBox->getSelectedItemPos() >= 0 ) + { + const bool isQuoted = ( aText.getLength() > 0 ) + && ( aText[0] == '\'' ) + && ( aText[aText.getLength() - 1] == '\'' ); + if ( isQuoted ) + { + xListBox->selectItem( aText.copy( 1, aText.getLength() - 2 ), sal_True ); + } + } } } break; default: @@ -715,7 +743,7 @@ namespace frm static ::rtl::OUString s_sDialogServiceName (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.ErrorMessageDialog") ); - Reference< XExecutableDialog > xErrorDialog( m_aContext.createComponentWithArguments( s_sDialogServiceName, aArgs ), UNO_QUERY ); + Reference< XExecutableDialog > xErrorDialog( maContext.createComponentWithArguments( s_sDialogServiceName, aArgs ), UNO_QUERY ); if ( xErrorDialog.is() ) xErrorDialog->execute(); else @@ -804,6 +832,16 @@ namespace frm case FormComponentType::LISTBOX: case FormComponentType::COMBOBOX: m_nControlClass = nClassId; + if ( FormComponentType::LISTBOX == nClassId ) + { + Sequence< ::rtl::OUString > aDisplayItems; + OSL_VERIFY( xControlModel->getPropertyValue( PROPERTY_STRINGITEMLIST ) >>= aDisplayItems ); + Sequence< ::rtl::OUString > aValueItems; + OSL_VERIFY( xControlModel->getPropertyValue( PROPERTY_VALUE_SEQ ) >>= aValueItems ); + OSL_ENSURE( aDisplayItems.getLength() == aValueItems.getLength(), "OFilterControl::initialize: inconsistent item lists!" ); + for ( sal_Int32 i=0; i < ::std::min( aDisplayItems.getLength(), aValueItems.getLength() ); ++i ) + m_aDisplayItemToValueItem[ aDisplayItems[i] ] = aValueItems[i]; + } break; default: m_bMultiLine = ::comphelper::hasProperty( PROPERTY_MULTILINE, xControlModel ) && ::comphelper::getBOOL( xControlModel->getPropertyValue( PROPERTY_MULTILINE ) ); diff --git a/forms/source/component/Filter.hxx b/forms/source/component/Filter.hxx index 8bac596b016d..97b291db9fbb 100644 --- a/forms/source/component/Filter.hxx +++ b/forms/source/component/Filter.hxx @@ -46,7 +46,7 @@ #include <connectivity/sqlparse.hxx> #include <svx/ParseContext.hxx> -class Window; +#include <boost/unordered_map.hpp> //......................................................................... namespace frm @@ -69,13 +69,15 @@ namespace frm { TextListenerMultiplexer m_aTextListeners; - ::comphelper::ComponentContext m_aContext; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xField; ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xFormatter; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xMessageParent; + typedef ::boost::unordered_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > MapString2String; + MapString2String m_aDisplayItemToValueItem; + ::rtl::OUString m_aText; ::connectivity::OSQLParser m_aParser; sal_Int16 m_nControlClass; // which kind of control do we use? diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 6cf05e78359e..4eeb9970da33 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -294,11 +294,11 @@ Sequence< ::rtl::OUString > SAL_CALL OControl::getSupportedServiceNames_Static() //------------------------------------------------------------------------------ void SAL_CALL OControl::disposing(const com::sun::star::lang::EventObject& _rEvent) throw (RuntimeException) { - InterfaceRef xAggAsIface; + Reference< XInterface > xAggAsIface; query_aggregation(m_xAggregate, xAggAsIface); // does the disposing come from the aggregate ? - if (xAggAsIface != InterfaceRef(_rEvent.Source, UNO_QUERY)) + if (xAggAsIface != Reference< XInterface >(_rEvent.Source, UNO_QUERY)) { // no -> forward it Reference<com::sun::star::lang::XEventListener> xListener; if (query_aggregation(m_xAggregate, xListener)) @@ -308,16 +308,16 @@ void SAL_CALL OControl::disposing(const com::sun::star::lang::EventObject& _rEve // XControl //------------------------------------------------------------------------------ -void SAL_CALL OControl::setContext(const InterfaceRef& Context) throw (RuntimeException) +void SAL_CALL OControl::setContext(const Reference< XInterface >& Context) throw (RuntimeException) { if (m_xControl.is()) m_xControl->setContext(Context); } //------------------------------------------------------------------------------ -InterfaceRef SAL_CALL OControl::getContext() throw (RuntimeException) +Reference< XInterface > SAL_CALL OControl::getContext() throw (RuntimeException) { - return m_xControl.is() ? m_xControl->getContext() : InterfaceRef(); + return m_xControl.is() ? m_xControl->getContext() : Reference< XInterface >(); } //------------------------------------------------------------------------------ @@ -709,13 +709,13 @@ void OControlModel::doSetDelegator() // XChild //------------------------------------------------------------------------------ -InterfaceRef SAL_CALL OControlModel::getParent() throw(RuntimeException) +Reference< XInterface > SAL_CALL OControlModel::getParent() throw(RuntimeException) { return m_xParent; } //------------------------------------------------------------------------------ -void SAL_CALL OControlModel::setParent(const InterfaceRef& _rxParent) throw(com::sun::star::lang::NoSupportException, RuntimeException) +void SAL_CALL OControlModel::setParent(const Reference< XInterface >& _rxParent) throw(com::sun::star::lang::NoSupportException, RuntimeException) { osl::MutexGuard aGuard(m_aMutex); @@ -918,7 +918,7 @@ void OControlModel::read(const Reference<stario::XObjectInputStream>& InStream) } // 2. Lesen des Versionsnummer - UINT16 nVersion = InStream->readShort(); + sal_uInt16 nVersion = InStream->readShort(); // 3. Lesen der allgemeinen Properties ::comphelper::operator>>( InStream, m_aName); @@ -1755,7 +1755,7 @@ void SAL_CALL OBoundControlModel::read( const Reference< stario::XObjectInputStr OControlModel::read(_rxInStream); osl::MutexGuard aGuard(m_aMutex); - UINT16 nVersion = _rxInStream->readShort(); (void)nVersion; + sal_uInt16 nVersion = _rxInStream->readShort(); (void)nVersion; ::comphelper::operator>>( _rxInStream, m_aControlSource); } @@ -1864,30 +1864,24 @@ void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, co throw com::sun::star::lang::IllegalArgumentException(); case PROPERTY_ID_CONTROLLABEL: { - DBG_ASSERT(!rValue.hasValue() || (rValue.getValueType().getTypeClass() == TypeClass_INTERFACE), - "OBoundControlModel::setFastPropertyValue_NoBroadcast : invalid argument !"); - if (!rValue.hasValue()) + if ( rValue.hasValue() && ( rValue.getValueTypeClass() != TypeClass_INTERFACE ) ) + throw com::sun::star::lang::IllegalArgumentException(); + + Reference< XInterface > xNewValue( rValue, UNO_QUERY ); + if ( !xNewValue.is() ) { // set property to "void" - Reference<com::sun::star::lang::XComponent> xComp(m_xLabelControl, UNO_QUERY); - if (xComp.is()) - xComp->removeEventListener(static_cast<com::sun::star::lang::XEventListener*>(static_cast<XPropertyChangeListener*>(this))); + Reference< XComponent > xComp( m_xLabelControl, UNO_QUERY ); + if ( xComp.is() ) + xComp->removeEventListener( static_cast< XPropertyChangeListener* >( this ) ); m_xLabelControl = NULL; break; } - InterfaceRef xNewValue; - rValue >>= xNewValue; - - Reference<XControlModel> xAsModel(xNewValue, UNO_QUERY); - Reference<com::sun::star::lang::XServiceInfo> xAsServiceInfo(xNewValue, UNO_QUERY); - Reference<XPropertySet> xAsPropSet(xNewValue, UNO_QUERY); - Reference<XChild> xAsChild(xNewValue, UNO_QUERY); - if (!xAsModel.is() || !xAsServiceInfo.is() || !xAsPropSet.is() || !xAsChild.is()) - { - throw com::sun::star::lang::IllegalArgumentException(); - } - - if (!xAsServiceInfo->supportsService(m_aLabelServiceName)) + Reference< XControlModel > xAsModel ( xNewValue, UNO_QUERY ); + Reference< XServiceInfo > xAsServiceInfo ( xAsModel, UNO_QUERY ); + Reference< XPropertySet > xAsPropSet ( xAsServiceInfo, UNO_QUERY ); + Reference< XChild > xAsChild ( xAsPropSet, UNO_QUERY ); + if ( !xAsChild.is() || !xAsServiceInfo->supportsService( m_aLabelServiceName ) ) { throw com::sun::star::lang::IllegalArgumentException(); } @@ -1895,7 +1889,7 @@ void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, co // check if weself and the given model have a common anchestor (up to the forms collection) Reference<XChild> xCont; query_interface(static_cast<XWeak*>(this), xCont); - InterfaceRef xMyTopLevel = xCont->getParent(); + Reference< XInterface > xMyTopLevel = xCont->getParent(); while (xMyTopLevel.is()) { Reference<XForm> xAsForm(xMyTopLevel, UNO_QUERY); @@ -1904,9 +1898,9 @@ void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, co break; Reference<XChild> xLoopAsChild(xMyTopLevel, UNO_QUERY); - xMyTopLevel = xLoopAsChild.is() ? xLoopAsChild->getParent() : InterfaceRef(); + xMyTopLevel = xLoopAsChild.is() ? xLoopAsChild->getParent() : Reference< XInterface >(); } - InterfaceRef xNewTopLevel = xAsChild->getParent(); + Reference< XInterface > xNewTopLevel = xAsChild->getParent(); while (xNewTopLevel.is()) { Reference<XForm> xAsForm(xNewTopLevel, UNO_QUERY); @@ -1914,7 +1908,7 @@ void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, co break; Reference<XChild> xLoopAsChild(xNewTopLevel, UNO_QUERY); - xNewTopLevel = xLoopAsChild.is() ? xLoopAsChild->getParent() : InterfaceRef(); + xNewTopLevel = xLoopAsChild.is() ? xLoopAsChild->getParent() : Reference< XInterface >(); } if (xNewTopLevel != xMyTopLevel) { @@ -2131,7 +2125,7 @@ sal_Bool OBoundControlModel::connectToField(const Reference<XRowSet>& rForm) m_xColumnUpdate = Reference< XColumnUpdate >( m_xField, UNO_QUERY ); m_xColumn = Reference< XColumn >( m_xField, UNO_QUERY ); - INT32 nNullableFlag = ColumnValue::NO_NULLS; + sal_Int32 nNullableFlag = ColumnValue::NO_NULLS; m_xField->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullableFlag; m_bRequired = (ColumnValue::NO_NULLS == nNullableFlag); // we're optimistic : in case of ColumnValue_NULLABLE_UNKNOWN we assume nullability .... diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 000f3ea3f770..871385c207a6 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -44,7 +44,7 @@ #include <svl/numuno.hxx> #include <vcl/svapp.hxx> #include <tools/debug.hxx> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include <i18npool/mslangid.hxx> #include <rtl/textenc.h> #include <com/sun/star/sdbc/DataType.hpp> @@ -1197,7 +1197,7 @@ Any OFormattedModel::translateControlValueToExternalValue( ) const Any OFormattedModel::translateDbColumnToControlValue() { if ( m_bNumeric ) - m_aSaveValue <<= DBTypeConversion::getValue( m_xColumn, m_aNullDate, m_nKeyType ); // #100056# OJ + m_aSaveValue <<= DBTypeConversion::getValue( m_xColumn, m_aNullDate ); // #100056# OJ else m_aSaveValue <<= m_xColumn->getString(); diff --git a/forms/source/component/Hidden.cxx b/forms/source/component/Hidden.cxx index e71396ec2a39..b2813dd21d93 100644 --- a/forms/source/component/Hidden.cxx +++ b/forms/source/component/Hidden.cxx @@ -170,7 +170,7 @@ void SAL_CALL OHiddenModel::write(const Reference<XObjectOutputStream>& _rxOutSt void SAL_CALL OHiddenModel::read(const Reference<XObjectInputStream>& _rxInStream) throw(IOException, RuntimeException) { // Version - UINT16 nVersion = _rxInStream->readShort(); + sal_uInt16 nVersion = _rxInStream->readShort(); // Name DBG_ASSERT(nVersion != 1, "OHiddenModel::read : this version is obsolete !"); diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index 23cb10bd064e..c05e9e3f2828 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -856,7 +856,7 @@ bool OImageControlControl::implInsertGraphics() implClearGraphics( sal_False ); sal_Bool bIsLink = sal_False; xController->getValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0) >>= bIsLink; - // Force bIsLink to be TRUE if we're bound to a field. Though we initialized the file picker with IsLink=TRUE + // Force bIsLink to be sal_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# diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index ac56e7fd8395..a489f50ffeda 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -65,6 +65,8 @@ #include <unotools/sharedunocomponent.hxx> #include <vcl/svapp.hxx> +#include <boost/optional.hpp> + #include <algorithm> #include <functional> @@ -678,9 +680,13 @@ namespace frm return; } - sal_Int16 nBoundColumn = 0; - if (m_aBoundColumn.getValueType().getTypeClass() == TypeClass_SHORT) + ::boost::optional< sal_Int16 > aBoundColumn; + if ( m_aBoundColumn.getValueType().getTypeClass() == TypeClass_SHORT ) + { + sal_Int16 nBoundColumn( 0 ); m_aBoundColumn >>= nBoundColumn; + aBoundColumn.reset( nBoundColumn ); + } ::utl::SharedUNOComponent< XResultSet > xListCursor; try @@ -704,14 +710,14 @@ namespace frm ::rtl::OUString aFieldName; ::rtl::OUString aBoundFieldName; - if ((nBoundColumn > 0) && xFieldsByIndex.is()) + if ( !!aBoundColumn && ( *aBoundColumn >= 0 ) && xFieldsByIndex.is() ) { - if (xFieldsByIndex->getCount() <= nBoundColumn) + if ( *aBoundColumn >= xFieldsByIndex->getCount() ) break; - Reference<XPropertySet> xFieldAsSet(xFieldsByIndex->getByIndex(nBoundColumn),UNO_QUERY); + Reference<XPropertySet> xFieldAsSet(xFieldsByIndex->getByIndex( *aBoundColumn ),UNO_QUERY); xFieldAsSet->getPropertyValue(PROPERTY_NAME) >>= aBoundFieldName; - nBoundColumn = 1; + aBoundColumn.reset( 1 ); xFieldAsSet.set(xFieldsByIndex->getByIndex(0),UNO_QUERY); xFieldAsSet->getPropertyValue(PROPERTY_NAME) >>= aFieldName; @@ -841,11 +847,11 @@ namespace frm // Feld der BoundColumn des ResultSets holen m_nBoundColumnType = DataType::SQLNULL; - if ( ( nBoundColumn > 0 ) && m_xColumn.is() ) + if ( !!aBoundColumn && ( *aBoundColumn >= 0 ) && m_xColumn.is() ) { // don't look for a bound column if we're not connected to a field try { - Reference< XPropertySet > xBoundField( xColumns->getByIndex( nBoundColumn ), UNO_QUERY_THROW ); + Reference< XPropertySet > xBoundField( xColumns->getByIndex( *aBoundColumn ), UNO_QUERY_THROW ); OSL_VERIFY( xBoundField->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type") ) ) >>= m_nBoundColumnType ); } catch( const Exception& ) @@ -869,7 +875,7 @@ namespace frm if ( impl_hasBoundComponent() ) { - aBoundValue.fill( nBoundColumn + 1, m_nBoundColumnType, xCursorRow ); + aBoundValue.fill( *aBoundColumn + 1, m_nBoundColumnType, xCursorRow ); aValueList.push_back( aBoundValue ); } diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx index 0f04b9dd3313..5227e5396db8 100644 --- a/forms/source/component/RadioButton.cxx +++ b/forms/source/component/RadioButton.cxx @@ -329,7 +329,7 @@ void SAL_CALL ORadioButtonModel::read(const Reference<XObjectInputStream>& _rxIn ::osl::MutexGuard aGuard(m_aMutex); // Version - UINT16 nVersion = _rxInStream->readShort(); + sal_uInt16 nVersion = _rxInStream->readShort(); ::rtl::OUString sReferenceValue; sal_Int16 nDefaultChecked( 0 ); diff --git a/forms/source/helper/windowstateguard.cxx b/forms/source/helper/windowstateguard.cxx index a35ebd68ff44..7a947ecf30fb 100644 --- a/forms/source/helper/windowstateguard.cxx +++ b/forms/source/helper/windowstateguard.cxx @@ -99,7 +99,7 @@ namespace frm @precond our mutex is locked */ - void impl_ensureEnabledState_nothrow() const; + void impl_ensureEnabledState_nothrow_nolck(); }; //-------------------------------------------------------------------- @@ -130,16 +130,24 @@ namespace frm } //-------------------------------------------------------------------- - void WindowStateGuard_Impl::impl_ensureEnabledState_nothrow() const + void WindowStateGuard_Impl::impl_ensureEnabledState_nothrow_nolck() { try { - sal_Bool bEnabled = m_xWindow->isEnabled(); + Reference< XWindow2 > xWindow; + sal_Bool bEnabled = sal_False; sal_Bool bShouldBeEnabled = sal_False; - OSL_VERIFY( m_xModelProps->getPropertyValue( PROPERTY_ENABLED ) >>= bShouldBeEnabled ); - - if ( !bShouldBeEnabled && bEnabled ) - m_xWindow->setEnable( sal_False ); + { + ::osl::MutexGuard aGuard( m_aMutex ); + if ( !m_xWindow.is() || !m_xModelProps.is() ) + return; + xWindow = m_xWindow; + bEnabled = xWindow->isEnabled(); + OSL_VERIFY( m_xModelProps->getPropertyValue( PROPERTY_ENABLED ) >>= bShouldBeEnabled ); + } + + if ( !bShouldBeEnabled && bEnabled && xWindow.is() ) + xWindow->setEnable( sal_False ); } catch( const Exception& ) { @@ -150,15 +158,13 @@ namespace frm //-------------------------------------------------------------------- void SAL_CALL WindowStateGuard_Impl::windowEnabled( const EventObject& /*e*/ ) throw (RuntimeException) { - ::osl::MutexGuard aGuard( m_aMutex ); - impl_ensureEnabledState_nothrow(); + impl_ensureEnabledState_nothrow_nolck(); } //-------------------------------------------------------------------- void SAL_CALL WindowStateGuard_Impl::windowDisabled( const EventObject& /*e*/ ) throw (RuntimeException) { - ::osl::MutexGuard aGuard( m_aMutex ); - impl_ensureEnabledState_nothrow(); + impl_ensureEnabledState_nothrow_nolck(); } //-------------------------------------------------------------------- diff --git a/forms/source/inc/FormComponent.hxx b/forms/source/inc/FormComponent.hxx index 288f3e030d08..40a4a0705ca5 100644 --- a/forms/source/inc/FormComponent.hxx +++ b/forms/source/inc/FormComponent.hxx @@ -384,13 +384,13 @@ protected: const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rFactory, // factory to create the aggregate with const ::rtl::OUString& _rUnoControlModelTypeName, // service name of te model to aggregate const ::rtl::OUString& rDefault = ::rtl::OUString(), // service name of the default control - const sal_Bool _bSetDelegator = sal_True // set to FALSE if you want to call setDelegator later (after returning from this ctor) + const sal_Bool _bSetDelegator = sal_True // set to sal_False if you want to call setDelegator later (after returning from this ctor) ); OControlModel( const OControlModel* _pOriginal, // the original object to clone const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rFactory, // factory to create the aggregate with const sal_Bool _bCloneAggregate = sal_True, // should the aggregate of the original be cloned, too? - const sal_Bool _bSetDelegator = sal_True // set to FALSE if you want to call setDelegator later (after returning from this ctor) + const sal_Bool _bSetDelegator = sal_True // set to sal_False if you want to call setDelegator later (after returning from this ctor) ); virtual ~OControlModel(); @@ -711,8 +711,8 @@ protected: const ::rtl::OUString& _rUnoControlModelTypeName, // service name of te model to aggregate const ::rtl::OUString& _rDefault, // service name of the default control const sal_Bool _bCommitable, // is the control (model) commitable ? - const sal_Bool _bSupportExternalBinding, // set to TRUE if you want to support XBindableValue - const sal_Bool _bSupportsValidation // set to TRUE if you want to support XValidatable + const sal_Bool _bSupportExternalBinding, // set to sal_True if you want to support XBindableValue + const sal_Bool _bSupportsValidation // set to sal_True if you want to support XValidatable ); OBoundControlModel( const OBoundControlModel* _pOriginal, // the original object to clone diff --git a/forms/source/inc/forms_module.hxx b/forms/source/inc/forms_module.hxx index 866de89fab6c..0f909a343285 100644 --- a/forms/source/inc/forms_module.hxx +++ b/forms/source/inc/forms_module.hxx @@ -102,21 +102,6 @@ namespace FORMS_MODULE_NAMESPACE static void revokeComponent( const ::rtl::OUString& _rImplementationName); - /** write the registration information of all known components - <p>writes the registration information of all components which are currently registered into the - specified registry.<p/> - <p>Usually used from within component_writeInfo.<p/> - @param _rxServiceManager - the service manager - @param _rRootKey - the registry key under which the information will be stored - @return - sal_True if the registration of all implementations was successfull, sal_False otherwise - */ - static sal_Bool writeComponentInfos( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxServiceManager, - const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey >& _rRootKey); - /** creates a Factory for the component with the given implementation name. <p>Usually used from within component_getFactory.<p/> @param _rxServiceManager diff --git a/forms/source/inc/forms_module_impl.hxx b/forms/source/inc/forms_module_impl.hxx index fc3bbafec326..d2bb8f3a8c62 100644 --- a/forms/source/inc/forms_module_impl.hxx +++ b/forms/source/inc/forms_module_impl.hxx @@ -108,54 +108,6 @@ namespace FORMS_MODULE_NAMESPACE } //-------------------------------------------------------------------------- - sal_Bool OFormsModule::writeComponentInfos( - const Reference< XMultiServiceFactory >& /*_rxServiceManager*/, - const Reference< XRegistryKey >& _rxRootKey) - { - OSL_ENSURE(_rxRootKey.is(), "OFormsModule::writeComponentInfos : invalid argument !"); - - if (!s_pImplementationNames) - { - 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, - "OFormsModule::writeComponentInfos : inconsistent state (the pointers) !"); - OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength()) - && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength()) - && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()), - "OFormsModule::writeComponentInfos : inconsistent state !"); - - sal_Int32 nLen = s_pImplementationNames->getLength(); - const ::rtl::OUString* pImplName = s_pImplementationNames->getConstArray(); - const Sequence< ::rtl::OUString >* pServices = s_pSupportedServices->getConstArray(); - - ::rtl::OUString sRootKey("/", 1, RTL_TEXTENCODING_ASCII_US); - for (sal_Int32 i=0; i<nLen; ++i, ++pImplName, ++pServices) - { - ::rtl::OUString aMainKeyName(sRootKey); - aMainKeyName += *pImplName; - aMainKeyName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES") ); - - try - { - Reference< XRegistryKey > xNewKey( _rxRootKey->createKey(aMainKeyName) ); - - const ::rtl::OUString* pService = pServices->getConstArray(); - for (sal_Int32 j=0; j<pServices->getLength(); ++j, ++pService) - xNewKey->createKey(*pService); - } - catch(Exception&) - { - OSL_FAIL("OFormsModule::writeComponentInfos : something went wrong while creating the keys !"); - return sal_False; - } - } - - return sal_True; - } - - //-------------------------------------------------------------------------- Reference< XInterface > OFormsModule::getComponentFactory( const ::rtl::OUString& _rImplementationName, const Reference< XMultiServiceFactory >& _rxServiceManager) diff --git a/forms/source/misc/services.cxx b/forms/source/misc/services.cxx index ab891083d50e..5c089c4c018d 100644 --- a/forms/source/misc/services.cxx +++ b/forms/source/misc/services.cxx @@ -284,22 +284,6 @@ void ensureClassInfos() } -//--------------------------------------------------------------------------------------- -void registerServiceProvider(const ::rtl::OUString& _rServiceImplName, const Sequence< ::rtl::OUString >& _rServices, XRegistryKey* _pKey) -{ - ::rtl::OUString sMainKeyName (RTL_CONSTASCII_USTRINGPARAM("/") ); - sMainKeyName += _rServiceImplName; - sMainKeyName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES") ); - Reference< XRegistryKey > xNewKey = _pKey->createKey(sMainKeyName); - OSL_ENSURE(xNewKey.is(), "forms::registerProvider : could not create a registry key !"); - if (!xNewKey.is()) - return; - - const ::rtl::OUString* pSupportedServices = _rServices.getConstArray(); - for (sal_Int32 i=0; i<_rServices.getLength(); ++i, ++pSupportedServices) - xNewKey->createKey(*pSupportedServices); -} - //======================================================================================= extern "C" { @@ -343,57 +327,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const } //--------------------------------------------------------------------------------------- -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(void* _pServiceManager, XRegistryKey* _pRegistryKey) -{ - if (_pRegistryKey) - { - try - { - // ======================================================================== - // the real way - use the OModule - createRegistryInfo_FORMS(); - if ( !::frm::OFormsModule::writeComponentInfos( - static_cast<XMultiServiceFactory*>( _pServiceManager ), - static_cast<XRegistryKey*>( _pRegistryKey ) ) - ) - return sal_False; - - // ======================================================================== - // a lot of stuff which is implemented "manually" here in this file - - // collect the class infos - ensureClassInfos(); - - // both our static sequences should have the same length ... - sal_Int32 nClasses = s_aClassImplementationNames.getLength(); - OSL_ENSURE(s_aClassServiceNames.getLength() == nClasses, - "forms::component_writeInfo : invalid class infos !"); - - // loop through the sequences and register the service providers - const ::rtl::OUString* pClasses = s_aClassImplementationNames.getConstArray(); - const Sequence< ::rtl::OUString >* pServices = s_aClassServiceNames.getConstArray(); - - for (sal_Int32 i=0; i<nClasses; ++i, ++pClasses, ++pServices) - registerServiceProvider(*pClasses, *pServices, _pRegistryKey); - - s_aClassImplementationNames.realloc(0); - s_aClassServiceNames.realloc(0); - s_aFactories.realloc(0); - - return sal_True; - } - catch ( InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "forms::component_writeInfo : InvalidRegistryException !"); - } - } - s_aClassImplementationNames.realloc(0); - s_aClassServiceNames.realloc(0); - s_aFactories.realloc(0); - return sal_False; -} - -//--------------------------------------------------------------------------------------- SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* _pImplName, XMultiServiceFactory* _pServiceManager, void* /*_pRegistryKey*/) { if (!_pServiceManager || !_pImplName) diff --git a/forms/source/richtext/clipboarddispatcher.cxx b/forms/source/richtext/clipboarddispatcher.cxx index 02a44fef4c42..52069085ed2c 100644 --- a/forms/source/richtext/clipboarddispatcher.cxx +++ b/forms/source/richtext/clipboarddispatcher.cxx @@ -156,7 +156,7 @@ namespace frm { m_pClipListener = new TransferableClipboardListener( LINK( this, OPasteClipboardDispatcher, OnClipboardChanged ) ); m_pClipListener->acquire(); - m_pClipListener->AddRemoveListener( _rView.GetWindow(), TRUE ); + m_pClipListener->AddRemoveListener( _rView.GetWindow(), sal_True ); // initial state TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( _rView.GetWindow() ) ); @@ -190,7 +190,7 @@ namespace frm { OSL_ENSURE( getEditView() && getEditView()->GetWindow(), "OPasteClipboardDispatcher::disposing: EditView should not (yet) be disfunctional here!" ); if ( getEditView() && getEditView()->GetWindow() && m_pClipListener ) - m_pClipListener->AddRemoveListener( getEditView()->GetWindow(), FALSE ); + m_pClipListener->AddRemoveListener( getEditView()->GetWindow(), sal_False ); m_pClipListener->release(); m_pClipListener = NULL; diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx index c6345a25ece0..42f6dad4ca41 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -108,7 +108,7 @@ namespace frm DBG_NAME( ORichTextControl ) //------------------------------------------------------------------ ORichTextControl::ORichTextControl( const Reference< XMultiServiceFactory >& _rxORB ) - :m_xORB( _rxORB ) + :UnoEditControl( _rxORB ) { DBG_CTOR( ORichTextControl, NULL ); } diff --git a/forms/source/richtext/richtextcontrol.hxx b/forms/source/richtext/richtextcontrol.hxx index ad16b0fc9c42..99753d14ceba 100644 --- a/forms/source/richtext/richtextcontrol.hxx +++ b/forms/source/richtext/richtextcontrol.hxx @@ -38,7 +38,7 @@ #include <comphelper/uno3.hxx> #include <comphelper/implementationreference.hxx> #include <cppuhelper/implbase1.hxx> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include "rtattributes.hxx" #include "attributedispatcher.hxx" @@ -60,10 +60,6 @@ namespace frm class ORichTextControl :public UnoEditControl ,public ORichTextControl_Base { - private: - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > - m_xORB; - public: ORichTextControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB diff --git a/forms/source/richtext/richtextengine.cxx b/forms/source/richtext/richtextengine.cxx index a627c6d0e4e3..4b210e7ede60 100644 --- a/forms/source/richtext/richtextengine.cxx +++ b/forms/source/richtext/richtextengine.cxx @@ -39,7 +39,7 @@ #define ITEMID_LANGUAGE EE_CHAR_LANGUAGE #include <editeng/langitem.hxx> #include <vcl/svapp.hxx> -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> #include <vcl/mapmod.hxx> #include <vcl/outdev.hxx> #include <unotools/lingucfg.hxx> diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx index 244291bc81f9..c0c6fe2a7cdd 100644 --- a/forms/source/richtext/richtextimplcontrol.cxx +++ b/forms/source/richtext/richtextimplcontrol.cxx @@ -41,7 +41,7 @@ #include <editeng/editobj.hxx> #include <svl/itempool.hxx> #include <svl/itemset.hxx> -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> #include <vcl/window.hxx> #include <vcl/svapp.hxx> @@ -88,7 +88,7 @@ namespace frm m_pEngine->registerEngineStatusListener( this ); { - ULONG nViewControlWord = m_pView->GetControlWord(); + sal_uLong nViewControlWord = m_pView->GetControlWord(); nViewControlWord |= EV_CNTRL_AUTOSCROLL; m_pView->SetControlWord( nViewControlWord ); } @@ -235,7 +235,7 @@ namespace frm //-------------------------------------------------------------------- void RichTextControlImpl::normalizeScriptDependentAttribute( SvxScriptSetItem& _rScriptSetItem ) { - _rScriptSetItem.GetItemSet().Put( m_pView->GetAttribs(), FALSE ); + _rScriptSetItem.GetItemSet().Put( m_pView->GetAttribs(), sal_False ); const SfxPoolItem* pNormalizedItem = _rScriptSetItem.GetItemOfScript( getSelectedScriptType() ); WhichId nNormalizedWhichId = _rScriptSetItem.GetItemSet().GetPool()->GetWhich( _rScriptSetItem.Which() ); @@ -290,7 +290,7 @@ namespace frm //-------------------------------------------------------------------- void RichTextControlImpl::EditEngineStatusChanged( const EditStatus& _rStatus ) { - ULONG nStatusWord( _rStatus.GetStatusWord() ); + sal_uLong nStatusWord( _rStatus.GetStatusWord() ); if ( ( nStatusWord & EE_STAT_TEXTWIDTHCHANGED ) || ( nStatusWord & EE_STAT_TEXTHEIGHTCHANGED ) ) @@ -588,7 +588,7 @@ namespace frm } //-------------------------------------------------------------------- - void RichTextControlImpl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, ULONG /*_nFlags*/ ) + void RichTextControlImpl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, sal_uLong /*_nFlags*/ ) { // need to normalize the map mode of the device - every paint operation on any device needs // to use the same map mode @@ -642,7 +642,7 @@ namespace frm lcl_inflate( aPlayground, -aOnePixel.Width(), -aOnePixel.Height() ); // actually draw the content - m_pEngine->Draw( _pDev, aPlayground, Point(), TRUE ); + m_pEngine->Draw( _pDev, aPlayground, Point(), sal_True ); _pDev->Pop(); } diff --git a/forms/source/richtext/richtextimplcontrol.hxx b/forms/source/richtext/richtextimplcontrol.hxx index a79efcf1b89d..4cec7242279b 100644 --- a/forms/source/richtext/richtextimplcontrol.hxx +++ b/forms/source/richtext/richtextimplcontrol.hxx @@ -153,7 +153,7 @@ namespace frm bool GetHideInactiveSelection() const; /// draws the control onto a given output device - void Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, ULONG _nFlags ); + void Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, sal_uLong _nFlags ); /// handles command events arrived at the anti-impl control long HandleCommand( const CommandEvent& _rEvent ); diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx index 42accca83e79..e38757211fe6 100644 --- a/forms/source/richtext/richtextmodel.cxx +++ b/forms/source/richtext/richtextmodel.cxx @@ -158,7 +158,7 @@ namespace frm { m_pEngine->SetModifyHdl( LINK( this, ORichTextModel, OnEngineContentModified ) ); - ULONG nEngineControlWord = m_pEngine->GetControlWord(); + sal_uLong nEngineControlWord = m_pEngine->GetControlWord(); nEngineControlWord = nEngineControlWord & ~EE_CNTRL_AUTOPAGESIZE; m_pEngine->SetControlWord( nEngineControlWord ); diff --git a/forms/source/richtext/richtextunowrapper.cxx b/forms/source/richtext/richtextunowrapper.cxx index fd1e5cc74e5a..2077b43756a8 100644 --- a/forms/source/richtext/richtextunowrapper.cxx +++ b/forms/source/richtext/richtextunowrapper.cxx @@ -119,8 +119,8 @@ namespace frm { // this means that the content of the EditEngine changed via the UNO API // to reflect this in the views, we need to update them - USHORT viewCount = m_rEngine.GetViewCount(); - for ( USHORT view = 0; view < viewCount; ++view ) + sal_uInt16 viewCount = m_rEngine.GetViewCount(); + for ( sal_uInt16 view = 0; view < viewCount; ++view ) { EditView* pView = m_rEngine.GetView( view ); if ( pView ) diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx index 53e7d9091f80..d5b9d560dd3f 100644 --- a/forms/source/richtext/richtextvclcontrol.cxx +++ b/forms/source/richtext/richtextvclcontrol.cxx @@ -84,7 +84,7 @@ namespace frm void RichTextControl::implInit( RichTextEngine* _pEngine, ITextAttributeListener* _pTextAttribListener, ITextSelectionListener* _pSelectionListener ) { m_pImpl = new RichTextControlImpl( this, _pEngine, _pTextAttribListener, _pSelectionListener ); - SetCompoundControl( TRUE ); + SetCompoundControl( sal_True ); } //-------------------------------------------------------------------- @@ -119,8 +119,8 @@ namespace frm if ( HasChildPathFocus() ) getView().HideCursor(); - BOOL bOldUpdateMode = getEngine().GetUpdateMode(); // TODO: guard? - getEngine().SetUpdateMode( FALSE ); + sal_Bool bOldUpdateMode = getEngine().GetUpdateMode(); // TODO: guard? + getEngine().SetUpdateMode( sal_False ); getView().SetAttribs( _rAttributesToApply ); @@ -321,7 +321,7 @@ namespace frm } //-------------------------------------------------------------------- - void RichTextControl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, ULONG _nFlags ) + void RichTextControl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, sal_uLong _nFlags ) { m_pImpl->Draw( _pDev, _rPos, _rSize, _nFlags ); } diff --git a/forms/source/richtext/richtextvclcontrol.hxx b/forms/source/richtext/richtextvclcontrol.hxx index 4ea84a925519..b69a31c593e0 100644 --- a/forms/source/richtext/richtextvclcontrol.hxx +++ b/forms/source/richtext/richtextvclcontrol.hxx @@ -114,7 +114,7 @@ namespace frm EditView& getView(); // Window overridables - virtual void Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, ULONG _nFlags ); + virtual void Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, sal_uLong _nFlags ); protected: // Window overridables diff --git a/forms/source/richtext/richtextviewport.cxx b/forms/source/richtext/richtextviewport.cxx index 5d6bff8e85bb..4c5a05b7e3d7 100644 --- a/forms/source/richtext/richtextviewport.cxx +++ b/forms/source/richtext/richtextviewport.cxx @@ -64,7 +64,7 @@ namespace frm { Control::GetFocus(); m_pView->SetSelectionMode( EE_SELMODE_STD ); - m_pView->ShowCursor( TRUE ); + m_pView->ShowCursor( sal_True ); } //-------------------------------------------------------------------- diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx index 3b43f137ab6a..157f3b1244a5 100644 --- a/forms/source/richtext/rtattributehandler.cxx +++ b/forms/source/richtext/rtattributehandler.cxx @@ -34,7 +34,7 @@ #include <editeng/eeitem.hxx> #include <svl/itemset.hxx> #include <svl/itempool.hxx> -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> #include <vcl/mapmod.hxx> #include <vcl/outdev.hxx> @@ -121,7 +121,7 @@ namespace frm { SvxScriptSetItem aSetItem( (WhichId)getAttributeId(), *_rAttribs.GetPool() ); aSetItem.PutItemForScriptType( _nForScriptType, _rItem ); - _rAttribs.Put( aSetItem.GetItemSet(), FALSE ); + _rAttribs.Put( aSetItem.GetItemSet(), sal_False ); } //-------------------------------------------------------------------- @@ -275,7 +275,7 @@ namespace frm AttributeCheckState LineSpacingHandler::implGetCheckState( const SfxPoolItem& _rItem ) const { OSL_ENSURE( _rItem.ISA( SvxLineSpacingItem ), "LineSpacingHandler::implGetCheckState: invalid pool item!" ); - USHORT nLineSpace = static_cast< const SvxLineSpacingItem& >( _rItem ).GetPropLineSpace(); + sal_uInt16 nLineSpace = static_cast< const SvxLineSpacingItem& >( _rItem ).GetPropLineSpace(); return ( nLineSpace == m_nLineSpace ) ? eChecked : eUnchecked; } @@ -290,7 +290,7 @@ namespace frm if ( 100 == m_nLineSpace ) aLineSpacing.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF; else - aLineSpacing.SetPropLineSpace( (BYTE)m_nLineSpace ); + aLineSpacing.SetPropLineSpace( (sal_uInt8)m_nLineSpace ); _rNewAttribs.Put( aLineSpacing ); } @@ -398,7 +398,7 @@ namespace frm if ( pFontHeightItem ) { // by definition, the item should have the unit twip - ULONG nHeight = pFontHeightItem->GetHeight(); + sal_uLong nHeight = pFontHeightItem->GetHeight(); if ( _rAttribs.GetPool()->GetMetric( getWhich() ) != SFX_MAPUNIT_TWIP ) { nHeight = OutputDevice::LogicToLogic( @@ -426,7 +426,7 @@ namespace frm { // corect measurement units SfxMapUnit eItemMapUnit = pFontHeightItem->GetPropUnit(); (void)eItemMapUnit; - ULONG nHeight = pFontHeightItem->GetHeight(); + sal_uLong nHeight = pFontHeightItem->GetHeight(); if ( _rNewAttribs.GetPool()->GetMetric( getWhich() ) != SFX_MAPUNIT_TWIP ) { nHeight = OutputDevice::LogicToLogic( @@ -487,7 +487,7 @@ namespace frm // then we toggle the adjustment, too SvxAdjust eCurrentAdjustment = SVX_ADJUST_LEFT; const SfxPoolItem* pCurrentAdjustment = NULL; - if ( SFX_ITEM_ON == _rCurrentAttribs.GetItemState( EE_PARA_JUST, TRUE, &pCurrentAdjustment ) ) + if ( SFX_ITEM_ON == _rCurrentAttribs.GetItemState( EE_PARA_JUST, sal_True, &pCurrentAdjustment ) ) eCurrentAdjustment = static_cast< const SvxAdjustItem* >( pCurrentAdjustment )->GetAdjust(); if ( eCurrentAdjustment == m_eOppositeDefaultAdjustment ) diff --git a/forms/source/richtext/rtattributehandler.hxx b/forms/source/richtext/rtattributehandler.hxx index 87e192032c38..e908ae75162c 100644 --- a/forms/source/richtext/rtattributehandler.hxx +++ b/forms/source/richtext/rtattributehandler.hxx @@ -147,7 +147,7 @@ namespace frm class LineSpacingHandler : public AttributeHandler { private: - USHORT m_nLineSpace; + sal_uInt16 m_nLineSpace; public: LineSpacingHandler( AttributeId _nAttributeId ); diff --git a/forms/source/richtext/rtattributes.hxx b/forms/source/richtext/rtattributes.hxx index c15eca82f587..246a1366e283 100644 --- a/forms/source/richtext/rtattributes.hxx +++ b/forms/source/richtext/rtattributes.hxx @@ -44,11 +44,11 @@ namespace frm /// the id of an attribute typedef sal_Int32 AttributeId; /// the "which id" of an item in an SfxItemSet - typedef USHORT WhichId; + typedef sal_uInt16 WhichId; /// a SFX slot id - typedef USHORT SfxSlotId; + typedef sal_uInt16 SfxSlotId; /// a script type - typedef USHORT ScriptType; + typedef sal_uInt16 ScriptType; //==================================================================== //= AttributeCheckState diff --git a/forms/source/richtext/specialdispatchers.cxx b/forms/source/richtext/specialdispatchers.cxx index aeb4427b5aaf..d384a670a2cd 100644 --- a/forms/source/richtext/specialdispatchers.cxx +++ b/forms/source/richtext/specialdispatchers.cxx @@ -79,10 +79,10 @@ namespace frm if ( !pEngine ) return; - USHORT nParagraphs = pEngine->GetParagraphCount(); + sal_uInt16 nParagraphs = pEngine->GetParagraphCount(); if ( nParagraphs ) { - USHORT nLastParaNumber = nParagraphs - 1; + sal_uInt16 nLastParaNumber = nParagraphs - 1; xub_StrLen nParaLen = pEngine->GetTextLen( nLastParaNumber ); getEditView()->SetSelection( ESelection( 0, 0, nLastParaNumber, nParaLen ) ); } diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx index 673501803f29..f0e552d79fba 100644 --- a/forms/source/solar/component/navbarcontrol.cxx +++ b/forms/source/solar/component/navbarcontrol.cxx @@ -107,7 +107,7 @@ namespace frm DBG_NAME( ONavigationBarControl ) //------------------------------------------------------------------ ONavigationBarControl::ONavigationBarControl( const Reference< XMultiServiceFactory >& _rxORB ) - :m_xORB( _rxORB ) + :UnoControl( _rxORB ) { DBG_CTOR( ONavigationBarControl, NULL ); } @@ -182,7 +182,7 @@ namespace frm } // create the peer - ONavigationBarPeer* pPeer = ONavigationBarPeer::Create( m_xORB, pParentWin, getModel() ); + ONavigationBarPeer* pPeer = ONavigationBarPeer::Create( maContext.getLegacyServiceFactory(), pParentWin, getModel() ); DBG_ASSERT( pPeer, "ONavigationBarControl::createPeer: invalid peer returned!" ); if ( pPeer ) // by definition, the returned component is aquired once @@ -301,7 +301,7 @@ namespace frm MouseSettings aMouseSettings = aSettings.GetMouseSettings(); aMouseSettings.SetButtonRepeat( 10 ); aSettings.SetMouseSettings( aMouseSettings ); - pNavBar->SetSettings( aSettings, TRUE ); + pNavBar->SetSettings( aSettings, sal_True ); // outta here return pPeer; diff --git a/forms/source/solar/component/navbarcontrol.hxx b/forms/source/solar/component/navbarcontrol.hxx index 864ff225e8de..33becc6476de 100644 --- a/forms/source/solar/component/navbarcontrol.hxx +++ b/forms/source/solar/component/navbarcontrol.hxx @@ -40,7 +40,7 @@ #include <toolkit/awt/vclxwindow.hxx> #include <comphelper/uno3.hxx> #include <cppuhelper/implbase1.hxx> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> //......................................................................... namespace frm @@ -57,10 +57,6 @@ namespace frm :public UnoControl ,public ONavigationBarControl_Base { - private: - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > - m_xORB; - public: ONavigationBarControl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx index b408b7052578..f87cd2c9d3a6 100644 --- a/forms/source/solar/control/navtoolbar.cxx +++ b/forms/source/solar/control/navtoolbar.cxx @@ -66,7 +66,7 @@ namespace frm || ( _nFeatureId == LID_RECORD_FILLER ); } - static String getLabelString( USHORT _nResId ) + static String getLabelString( sal_uInt16 _nResId ) { String sLabel = String::CreateFromAscii( " " ); sLabel += String( FRM_RES_STRING( _nResId ) ); @@ -197,9 +197,9 @@ namespace frm //--------------------------------------------------------------------- void NavigationToolBar::updateFeatureStates( ) { - for ( USHORT nPos = 0; nPos < m_pToolbar->GetItemCount(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < m_pToolbar->GetItemCount(); ++nPos ) { - USHORT nItemId = m_pToolbar->GetItemId( nPos ); + sal_uInt16 nItemId = m_pToolbar->GetItemId( nPos ); if ( ( nItemId == LID_RECORD_LABEL ) || ( nItemId == LID_RECORD_FILLER ) ) continue; @@ -211,7 +211,7 @@ namespace frm } //--------------------------------------------------------------------- - void NavigationToolBar::implEnableItem( USHORT _nItemId, bool _bEnabled ) + void NavigationToolBar::implEnableItem( sal_uInt16 _nItemId, bool _bEnabled ) { m_pToolbar->EnableItem( _nItemId, _bEnabled ); @@ -225,32 +225,32 @@ namespace frm //--------------------------------------------------------------------- void NavigationToolBar::enableFeature( sal_Int16 _nFeatureId, bool _bEnabled ) { - DBG_ASSERT( m_pToolbar->GetItemPos( (USHORT)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND, + DBG_ASSERT( m_pToolbar->GetItemPos( (sal_uInt16)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND, "NavigationToolBar::enableFeature: invalid id!" ); - implEnableItem( (USHORT)_nFeatureId, _bEnabled ); + implEnableItem( (sal_uInt16)_nFeatureId, _bEnabled ); } //--------------------------------------------------------------------- void NavigationToolBar::checkFeature( sal_Int16 _nFeatureId, bool _bEnabled ) { - DBG_ASSERT( m_pToolbar->GetItemPos( (USHORT)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND, + DBG_ASSERT( m_pToolbar->GetItemPos( (sal_uInt16)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND, "NavigationToolBar::checkFeature: invalid id!" ); - m_pToolbar->CheckItem( (USHORT)_nFeatureId, _bEnabled ); + m_pToolbar->CheckItem( (sal_uInt16)_nFeatureId, _bEnabled ); } //--------------------------------------------------------------------- void NavigationToolBar::setFeatureText( sal_Int16 _nFeatureId, const ::rtl::OUString& _rText ) { - DBG_ASSERT( m_pToolbar->GetItemPos( (USHORT)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND, + DBG_ASSERT( m_pToolbar->GetItemPos( (sal_uInt16)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND, "NavigationToolBar::checkFeature: invalid id!" ); - Window* pItemWindow = m_pToolbar->GetItemWindow( (USHORT)_nFeatureId ); + Window* pItemWindow = m_pToolbar->GetItemWindow( (sal_uInt16)_nFeatureId ); if ( pItemWindow ) pItemWindow->SetText( _rText ); else - m_pToolbar->SetItemText( (USHORT)_nFeatureId, _rText ); + m_pToolbar->SetItemText( (sal_uInt16)_nFeatureId, _rText ); } //--------------------------------------------------------------------- @@ -266,7 +266,7 @@ namespace frm struct FeatureDescription { - USHORT nId; + sal_uInt16 nId; bool bRepeat; bool bItemWindow; } aSupportedFeatures[] = @@ -333,7 +333,7 @@ namespace frm { pItemWindow = new FixedText( m_pToolbar, WB_VCENTER ); pItemWindow->SetBackground(); - pItemWindow->SetPaintTransparent(TRUE); + pItemWindow->SetPaintTransparent(sal_True); } m_aChildWins.push_back( pItemWindow ); @@ -369,16 +369,16 @@ namespace frm if ( !m_pImageProvider ) return; - const USHORT nItemCount = m_pToolbar->GetItemCount(); + const sal_uInt16 nItemCount = m_pToolbar->GetItemCount(); // collect the FormFeatures in the toolbar typedef ::std::vector< sal_Int16 > FormFeatures; FormFeatures aFormFeatures; aFormFeatures.reserve( nItemCount ); - for ( USHORT i=0; i<nItemCount; ++i ) + for ( sal_uInt16 i=0; i<nItemCount; ++i ) { - USHORT nId = m_pToolbar->GetItemId( i ); + sal_uInt16 nId = m_pToolbar->GetItemId( i ); if ( ( TOOLBOXITEM_BUTTON == m_pToolbar->GetItemType( i ) ) && !isArtificialItem( nId ) ) aFormFeatures.push_back( nId ); } @@ -429,13 +429,13 @@ namespace frm //--------------------------------------------------------------------- void NavigationToolBar::ShowFunctionGroup( FunctionGroup _eGroup, bool _bShow ) { - const USHORT* pGroupIds = NULL; + const sal_uInt16* pGroupIds = NULL; switch ( _eGroup ) { case ePosition: { - static const USHORT aPositionIds[] = { + static const sal_uInt16 aPositionIds[] = { LID_RECORD_LABEL, FormFeature::MoveAbsolute, LID_RECORD_FILLER, FormFeature::TotalRecords, 0 }; pGroupIds = aPositionIds; @@ -443,7 +443,7 @@ namespace frm break; case eNavigation: { - static const USHORT aNavigationIds[] = { + static const sal_uInt16 aNavigationIds[] = { FormFeature::MoveToFirst, FormFeature::MoveToPrevious, FormFeature::MoveToNext, FormFeature::MoveToLast, FormFeature::MoveToInsertRow, 0 }; pGroupIds = aNavigationIds; @@ -451,7 +451,7 @@ namespace frm break; case eRecordActions: { - static const USHORT aActionIds[] = { + static const sal_uInt16 aActionIds[] = { FormFeature::SaveRecordChanges, FormFeature::UndoRecordChanges, FormFeature::DeleteRecord, FormFeature::ReloadForm, FormFeature::RefreshCurrentControl, 0 }; pGroupIds = aActionIds; @@ -459,7 +459,7 @@ namespace frm break; case eFilterSort: { - static const USHORT aFilterSortIds[] = { + static const sal_uInt16 aFilterSortIds[] = { FormFeature::SortAscending, FormFeature::SortDescending, FormFeature::InteractiveSort, FormFeature::AutoFilter, FormFeature::InteractiveFilter, FormFeature::ToggleApplyFilter, FormFeature::RemoveFilterAndSort, 0 }; pGroupIds = aFilterSortIds; @@ -477,7 +477,7 @@ namespace frm //--------------------------------------------------------------------- bool NavigationToolBar::IsFunctionGroupVisible( FunctionGroup _eGroup ) { - USHORT nIndicatorItem = 0; + sal_uInt16 nIndicatorItem = 0; switch ( _eGroup ) { case ePosition : nIndicatorItem = LID_RECORD_LABEL; break; @@ -516,7 +516,7 @@ namespace frm case STATE_CHANGE_MIRRORING: { - BOOL bIsRTLEnabled( IsRTLEnabled() ); + sal_Bool bIsRTLEnabled( IsRTLEnabled() ); m_pToolbar->EnableRTL( bIsRTLEnabled ); forEachItemWindow( &NavigationToolBar::enableItemRTL, &bIsRTLEnabled ); Resize(); @@ -577,9 +577,9 @@ namespace frm //--------------------------------------------------------------------- void NavigationToolBar::forEachItemWindow( ItemWindowHandler _handler, const void* _pParam ) { - for ( USHORT item = 0; item < m_pToolbar->GetItemCount(); ++item ) + for ( sal_uInt16 item = 0; item < m_pToolbar->GetItemCount(); ++item ) { - USHORT nItemId = m_pToolbar->GetItemId( item ); + sal_uInt16 nItemId = m_pToolbar->GetItemId( item ); Window* pItemWindow = m_pToolbar->GetItemWindow( nItemId ); if ( pItemWindow ) (this->*_handler)( nItemId, pItemWindow, _pParam ); @@ -587,7 +587,7 @@ namespace frm } //--------------------------------------------------------------------- - void NavigationToolBar::setItemBackground( USHORT /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const + void NavigationToolBar::setItemBackground( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const { if ( _pColor ) _pItemWindow->SetControlBackground( *static_cast< const Color* >( _pColor ) ); @@ -596,7 +596,7 @@ namespace frm } //--------------------------------------------------------------------- - void NavigationToolBar::setTextLineColor( USHORT /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const + void NavigationToolBar::setTextLineColor( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const { if ( _pColor ) _pItemWindow->SetTextLineColor( *static_cast< const Color* >( _pColor ) ); @@ -605,14 +605,14 @@ namespace frm } #if 0 //--------------------------------------------------------------------- - void NavigationToolBar::setItemWindowZoom( USHORT /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const + void NavigationToolBar::setItemWindowZoom( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const { _pItemWindow->SetZoom( GetZoom() ); _pItemWindow->SetZoomedPointFont( IsControlFont() ? GetControlFont() : GetPointFont() ); } #endif //--------------------------------------------------------------------- - void NavigationToolBar::setItemControlFont( USHORT /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const + void NavigationToolBar::setItemControlFont( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const { if ( IsControlFont() ) _pItemWindow->SetControlFont( GetControlFont() ); @@ -621,7 +621,7 @@ namespace frm } //--------------------------------------------------------------------- - void NavigationToolBar::setItemControlForeground( USHORT /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const + void NavigationToolBar::setItemControlForeground( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const { if ( IsControlForeground() ) _pItemWindow->SetControlForeground( GetControlForeground() ); @@ -631,7 +631,7 @@ namespace frm } //--------------------------------------------------------------------- - void NavigationToolBar::adjustItemWindowWidth( USHORT _nItemId, Window* _pItemWindow, const void* /* _pParam */ ) const + void NavigationToolBar::adjustItemWindowWidth( sal_uInt16 _nItemId, Window* _pItemWindow, const void* /* _pParam */ ) const { String sItemText; switch ( _nItemId ) @@ -661,9 +661,9 @@ namespace frm } //--------------------------------------------------------------------- - void NavigationToolBar::enableItemRTL( USHORT /*_nItemId*/, Window* _pItemWindow, const void* _pIsRTLEnabled ) const + void NavigationToolBar::enableItemRTL( sal_uInt16 /*_nItemId*/, Window* _pItemWindow, const void* _pIsRTLEnabled ) const { - _pItemWindow->EnableRTL( *static_cast< const BOOL* >( _pIsRTLEnabled ) ); + _pItemWindow->EnableRTL( *static_cast< const sal_Bool* >( _pIsRTLEnabled ) ); } //===================================================================== @@ -678,7 +678,7 @@ namespace frm SetFirst( 1 ); SetSpinSize( 1 ); SetDecimalDigits( 0 ); - SetStrictFormat( TRUE ); + SetStrictFormat( sal_True ); SetBorderStyle( WINDOW_BORDER_MONO ); } diff --git a/forms/source/solar/inc/navtoolbar.hxx b/forms/source/solar/inc/navtoolbar.hxx index 03343e5d2d8b..0cc1a1c2cfd7 100644 --- a/forms/source/solar/inc/navtoolbar.hxx +++ b/forms/source/solar/inc/navtoolbar.hxx @@ -142,25 +142,25 @@ namespace frm void implUpdateImages(); /// enables or disables an item, plus possible dependent items - void implEnableItem( USHORT _nItemId, bool _bEnabled ); + void implEnableItem( sal_uInt16 _nItemId, bool _bEnabled ); /** update the states of all features, using the callback */ void updateFeatureStates( ); // iterating through item windows - typedef void (NavigationToolBar::*ItemWindowHandler) (USHORT, Window*, const void*) const; + typedef void (NavigationToolBar::*ItemWindowHandler) (sal_uInt16, Window*, const void*) const; void forEachItemWindow( ItemWindowHandler _handler, const void* _pParam ); - void setItemBackground( USHORT /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const; - void setTextLineColor( USHORT /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const; + void setItemBackground( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const; + void setTextLineColor( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const; #if 0 - void setItemWindowZoom( USHORT /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const; + void setItemWindowZoom( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const; #endif - void setItemControlFont( USHORT /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const; - void setItemControlForeground( USHORT /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const; - void adjustItemWindowWidth( USHORT _nItemId, Window* _pItemWindow, const void* /* _pParam */ ) const; - void enableItemRTL( USHORT /*_nItemId*/, Window* _pItemWindow, const void* _pIsRTLEnabled ) const; + void setItemControlFont( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const; + void setItemControlForeground( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const; + void adjustItemWindowWidth( sal_uInt16 _nItemId, Window* _pItemWindow, const void* /* _pParam */ ) const; + void enableItemRTL( sal_uInt16 /*_nItemId*/, Window* _pItemWindow, const void* _pIsRTLEnabled ) const; }; //===================================================================== diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx b/forms/source/xforms/xpathlib/xpathlib.cxx index 9a6f59a1592f..8b12aebd5204 100644 --- a/forms/source/xforms/xpathlib/xpathlib.cxx +++ b/forms/source/xforms/xpathlib/xpathlib.cxx @@ -328,7 +328,7 @@ static sal_Bool parseDateTime(const ::rtl::OUString& aString, DateTime& aDateTim sal_Int32 nMinute = aTimeString.getToken(0, ':', nIndex).toInt32(); sal_Int32 nSecond = aTimeString.getToken(0, ':', nIndex).toInt32(); - Date tmpDate((USHORT)nDay, (USHORT)nMonth, (USHORT)nYear); + Date tmpDate((sal_uInt16)nDay, (sal_uInt16)nMonth, (sal_uInt16)nYear); Time tmpTime(nHour, nMinute, nSecond); DateTime tmpDateTime(tmpDate, tmpTime); if (aString.indexOf(aUTCString) < 0) |