summaryrefslogtreecommitdiffstats
path: root/forms/source/component/Filter.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'forms/source/component/Filter.cxx')
-rw-r--r--forms/source/component/Filter.cxx42
1 files changed, 17 insertions, 25 deletions
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx
index cc57cecf027a..295d4af747c1 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -56,7 +56,7 @@
#include <connectivity/predicateinput.hxx>
#include <o3tl/safeint.hxx>
#include <rtl/ustrbuf.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <tools/gen.hxx>
@@ -135,7 +135,7 @@ namespace frm
}
- OUString OFilterControl::GetComponentServiceName()
+ OUString OFilterControl::GetComponentServiceName() const
{
OUString aServiceName;
switch (m_nControlClass)
@@ -183,8 +183,8 @@ namespace frm
case FormComponentType::CHECKBOX:
{
// checkboxes always have a tristate-mode
- xVclWindow->setProperty( PROPERTY_TRISTATE, makeAny( true ) );
- xVclWindow->setProperty( PROPERTY_STATE, makeAny( sal_Int32( TRISTATE_INDET ) ) );
+ xVclWindow->setProperty( PROPERTY_TRISTATE, Any( true ) );
+ xVclWindow->setProperty( PROPERTY_STATE, Any( sal_Int32( TRISTATE_INDET ) ) );
Reference< XCheckBox > xBox( getPeer(), UNO_QUERY_THROW );
xBox->addItemListener( this );
@@ -194,7 +194,7 @@ namespace frm
case FormComponentType::RADIOBUTTON:
{
- xVclWindow->setProperty( PROPERTY_STATE, makeAny( sal_Int32( TRISTATE_FALSE ) ) );
+ xVclWindow->setProperty( PROPERTY_STATE, Any( sal_Int32( TRISTATE_FALSE ) ) );
Reference< XRadioButton > xRadio( getPeer(), UNO_QUERY_THROW );
xRadio->addItemListener( this );
@@ -210,7 +210,7 @@ namespace frm
case FormComponentType::COMBOBOX:
{
- xVclWindow->setProperty(PROPERTY_AUTOCOMPLETE, makeAny( true ) );
+ xVclWindow->setProperty(PROPERTY_AUTOCOMPLETE, Any( true ) );
[[fallthrough]];
}
@@ -230,7 +230,7 @@ namespace frm
Reference< XPropertySet > xModel( getModel(), UNO_QUERY_THROW );
Reference< XPropertySetInfo > xModelPSI( xModel->getPropertySetInfo(), UNO_SET_THROW );
if ( xModelPSI->hasPropertyByName( PROPERTY_READONLY ) )
- xVclWindow->setProperty( PROPERTY_READONLY, makeAny( false ) );
+ xVclWindow->setProperty( PROPERTY_READONLY, Any( false ) );
}
catch( const Exception& )
{
@@ -355,9 +355,7 @@ namespace frm
m_aText = sText;
TextEvent aEvt;
aEvt.Source = *this;
- ::comphelper::OInterfaceIteratorHelper3 aIt(m_aTextListeners);
- while( aIt.hasMoreElements() )
- aIt.next()->textChanged(aEvt);
+ m_aTextListeners.notifyEach(&css::awt::XTextListener::textChanged, aEvt);
}
#endif
}
@@ -414,18 +412,16 @@ namespace frm
const Reference< XDatabaseMetaData > xMeta( xConnection->getMetaData(), UNO_SET_THROW );
const OUString sQuoteChar = xMeta->getIdentifierQuoteString();
- aStatement.append( "SELECT DISTINCT " );
- aStatement.append( sQuoteChar );
- aStatement.append( sRealFieldName );
- aStatement.append( sQuoteChar );
+ aStatement.append(
+ "SELECT DISTINCT "
+ + sQuoteChar
+ + sRealFieldName
+ + sQuoteChar );
// if the field had an alias in our form's statement, give it this alias in the new statement, too
if ( !sFieldName.isEmpty() && ( sFieldName != sRealFieldName ) )
{
- aStatement.append(" AS ");
- aStatement.append( sQuoteChar );
- aStatement.append( sFieldName );
- aStatement.append( sQuoteChar );
+ aStatement.append(" AS "+ sQuoteChar + sFieldName + sQuoteChar );
}
aStatement.append( " FROM " );
@@ -519,9 +515,7 @@ namespace frm
if ( !aPredicateInput.normalizePredicateString( aNewText, m_xField, &sErrorMessage ) )
{
// display the error and outta here
- SQLContext aError;
- aError.Message = ResourceManager::loadString(RID_STR_SYNTAXERROR);
- aError.Details = sErrorMessage;
+ SQLContext aError(ResourceManager::loadString(RID_STR_SYNTAXERROR), {}, {}, 0, {}, sErrorMessage);
displayException( aError );
return false;
}
@@ -530,9 +524,7 @@ namespace frm
setText(aNewText);
TextEvent aEvt;
aEvt.Source = *this;
- ::comphelper::OInterfaceIteratorHelper3 aIt(m_aTextListeners);
- while( aIt.hasMoreElements() )
- aIt.next()->textChanged(aEvt);
+ m_aTextListeners.notifyEach(&css::awt::XTextListener::textChanged, aEvt);
#endif
return true;
}
@@ -730,7 +722,7 @@ namespace frm
{
try
{
- Reference< XExecutableDialog > xErrorDialog = ErrorMessageDialog::create( m_xContext, "", m_xMessageParent, makeAny(_rExcept));
+ Reference< XExecutableDialog > xErrorDialog = ErrorMessageDialog::create( m_xContext, "", m_xMessageParent, Any(_rExcept));
xErrorDialog->execute();
}
catch( const Exception& )