diff options
Diffstat (limited to 'forms/source/runtime')
-rw-r--r-- | forms/source/runtime/formoperations.cxx | 32 | ||||
-rw-r--r-- | forms/source/runtime/formoperations.hxx | 13 |
2 files changed, 22 insertions, 23 deletions
diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx index ae40c527b4d6..1e3df2857e74 100644 --- a/forms/source/runtime/formoperations.cxx +++ b/forms/source/runtime/formoperations.cxx @@ -52,7 +52,7 @@ #include <vcl/svapp.hxx> #include <vcl/stdtext.hxx> #include <vcl/weld.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include <comphelper/container.hxx> #include <comphelper/property.hxx> #include <comphelper/namedvaluecollection.hxx> @@ -86,7 +86,6 @@ namespace frm using namespace ::com::sun::star::sdbc; using ::com::sun::star::form::XForm; using ::com::sun::star::ucb::AlreadyInitializedException; - using ::com::sun::star::util::XModifyBroadcaster; using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::lang::EventObject; using ::com::sun::star::beans::PropertyChangeEvent; @@ -105,7 +104,6 @@ namespace frm using namespace ::com::sun::star::sdb; using ::com::sun::star::form::XReset; using ::com::sun::star::beans::XMultiPropertySet; - using ::com::sun::star::uno::makeAny; using ::com::sun::star::lang::WrappedTargetException; using ::com::sun::star::ui::dialogs::XExecutableDialog; using ::com::sun::star::beans::NamedValue; @@ -740,7 +738,7 @@ namespace frm // simply toggle the value bool bApplied = false; m_xCursorProperties->getPropertyValue( PROPERTY_APPLYFILTER ) >>= bApplied; - m_xCursorProperties->setPropertyValue( PROPERTY_APPLYFILTER, makeAny( !bApplied ) ); + m_xCursorProperties->setPropertyValue( PROPERTY_APPLYFILTER, Any( !bApplied ) ); // and reload weld::WaitObject aWO(Application::GetFrameWeld(GetDialogParent())); @@ -1546,12 +1544,12 @@ namespace frm m_xParser->setOrder( OUString() ); impl_appendOrderByColumn_throw aAction(this, xBoundField, _bUp); - impl_doActionInSQLContext_throw(aAction, RID_STR_COULD_NOT_SET_ORDER ); + impl_doActionInSQLContext_throw(std::move(aAction), RID_STR_COULD_NOT_SET_ORDER ); weld::WaitObject aWO(Application::GetFrameWeld(GetDialogParent())); try { - m_xCursorProperties->setPropertyValue( PROPERTY_SORT, makeAny( m_xParser->getOrder() ) ); + m_xCursorProperties->setPropertyValue( PROPERTY_SORT, Any( m_xParser->getOrder() ) ); m_xLoadableForm->reload(); } catch( const Exception& ) @@ -1565,7 +1563,7 @@ namespace frm try { m_xParser->setOrder( sOriginalSort ); - m_xCursorProperties->setPropertyValue( PROPERTY_SORT, makeAny( m_xParser->getOrder() ) ); + m_xCursorProperties->setPropertyValue( PROPERTY_SORT, Any( m_xParser->getOrder() ) ); m_xLoadableForm->reload(); } catch( const Exception& ) @@ -1617,14 +1615,14 @@ namespace frm } impl_appendFilterByColumn_throw aAction(this, m_xParser, xBoundField); - impl_doActionInSQLContext_throw( aAction, RID_STR_COULD_NOT_SET_FILTER ); + impl_doActionInSQLContext_throw( std::move(aAction), RID_STR_COULD_NOT_SET_FILTER ); weld::WaitObject aWO(Application::GetFrameWeld(GetDialogParent())); try { - m_xCursorProperties->setPropertyValue( PROPERTY_FILTER, makeAny( m_xParser->getFilter() ) ); - m_xCursorProperties->setPropertyValue( PROPERTY_HAVINGCLAUSE, makeAny( m_xParser->getHavingClause() ) ); - m_xCursorProperties->setPropertyValue( PROPERTY_APPLYFILTER, makeAny( true ) ); + m_xCursorProperties->setPropertyValue( PROPERTY_FILTER, Any( m_xParser->getFilter() ) ); + m_xCursorProperties->setPropertyValue( PROPERTY_HAVINGCLAUSE, Any( m_xParser->getHavingClause() ) ); + m_xCursorProperties->setPropertyValue( PROPERTY_APPLYFILTER, Any( true ) ); m_xLoadableForm->reload(); } @@ -1640,9 +1638,9 @@ namespace frm { m_xParser->setFilter ( sOriginalFilter ); m_xParser->setHavingClause( sOriginalHaving ); - m_xCursorProperties->setPropertyValue( PROPERTY_APPLYFILTER, makeAny( bApplied ) ); - m_xCursorProperties->setPropertyValue( PROPERTY_FILTER, makeAny( m_xParser->getFilter() ) ); - m_xCursorProperties->setPropertyValue( PROPERTY_HAVINGCLAUSE, makeAny( m_xParser->getHavingClause() ) ); + m_xCursorProperties->setPropertyValue( PROPERTY_APPLYFILTER, Any( bApplied ) ); + m_xCursorProperties->setPropertyValue( PROPERTY_FILTER, Any( m_xParser->getFilter() ) ); + m_xCursorProperties->setPropertyValue( PROPERTY_HAVINGCLAUSE, Any( m_xParser->getHavingClause() ) ); m_xLoadableForm->reload(); } catch( const Exception& ) @@ -1709,11 +1707,11 @@ namespace frm weld::WaitObject aWO(Application::GetFrameWeld(xDialogParent)); if ( _bFilter ) { - m_xCursorProperties->setPropertyValue( PROPERTY_FILTER, makeAny( m_xParser->getFilter() ) ); - m_xCursorProperties->setPropertyValue( PROPERTY_HAVINGCLAUSE, makeAny( m_xParser->getHavingClause() ) ); + m_xCursorProperties->setPropertyValue( PROPERTY_FILTER, Any( m_xParser->getFilter() ) ); + m_xCursorProperties->setPropertyValue( PROPERTY_HAVINGCLAUSE, Any( m_xParser->getHavingClause() ) ); } else - m_xCursorProperties->setPropertyValue( PROPERTY_SORT, makeAny( m_xParser->getOrder() ) ); + m_xCursorProperties->setPropertyValue( PROPERTY_SORT, Any( m_xParser->getOrder() ) ); m_xLoadableForm->reload(); } diff --git a/forms/source/runtime/formoperations.hxx b/forms/source/runtime/formoperations.hxx index 182b0a7e0958..a8d0ec45a432 100644 --- a/forms/source/runtime/formoperations.hxx +++ b/forms/source/runtime/formoperations.hxx @@ -36,6 +36,7 @@ #include <connectivity/dbtools.hxx> #include <tools/long.hxx> #include <unotools/resmgr.hxx> +#include <utility> namespace frm { @@ -301,10 +302,10 @@ namespace frm { public: impl_appendOrderByColumn_throw(const FormOperations *pFO, - css::uno::Reference< css::beans::XPropertySet > const & xField, + css::uno::Reference< css::beans::XPropertySet > xField, bool bUp) : m_pFO(pFO) - , m_xField(xField) + , m_xField(std::move(xField)) , m_bUp(bUp) {}; @@ -320,11 +321,11 @@ namespace frm { public: impl_appendFilterByColumn_throw(const FormOperations *pFO, - css::uno::Reference< css::sdb::XSingleSelectQueryComposer > const & xParser, - css::uno::Reference< css::beans::XPropertySet > const & xField) + css::uno::Reference< css::sdb::XSingleSelectQueryComposer > xParser, + css::uno::Reference< css::beans::XPropertySet > xField) : m_pFO(pFO) - , m_xParser(xParser) - , m_xField(xField) + , m_xParser(std::move(xParser)) + , m_xField(std::move(xField)) {}; void operator()() { |