summaryrefslogtreecommitdiffstats
path: root/dbaccess/source/ui/app/AppControllerGen.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/app/AppControllerGen.cxx')
-rw-r--r--dbaccess/source/ui/app/AppControllerGen.cxx29
1 files changed, 12 insertions, 17 deletions
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index 44e1a3b9666e..0f6eda11de7b 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -50,7 +50,7 @@
#include <sfx2/mailmodelapi.hxx>
#include <svx/dbaexchange.hxx>
#include <toolkit/helper/vclunohelper.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <osl/diagnose.h>
#include <vcl/mnemonic.hxx>
#include <vcl/svapp.hxx>
@@ -110,7 +110,7 @@ void OApplicationController::convertToView(const OUString& _sName)
Reference<XPropertySet> xView = ::dbaui::createView(sNewName,xConnection,xSourceObject);
if ( !xView.is() )
throw SQLException(DBA_RES(STR_NO_TABLE_FORMAT_INSIDE),*this, "S1000",0,Any());
- getContainer()->elementAdded(E_TABLE,sNewName,makeAny(xView));
+ getContainer()->elementAdded(E_TABLE,sNewName,Any(xView));
}
}
catch(const SQLException& )
@@ -168,7 +168,7 @@ void OApplicationController::openDialog( const OUString& _sServiceName )
// the parent window
pArgs[nArgPos++] <<= PropertyValue( "ParentWindow",
0,
- makeAny(xWindow),
+ Any(xWindow),
PropertyState_DIRECT_VALUE);
// the initial selection
@@ -179,7 +179,7 @@ void OApplicationController::openDialog( const OUString& _sServiceName )
{
pArgs[ nArgPos++ ] <<= PropertyValue(
"InitialSelection", 0,
- makeAny( sInitialSelection ), PropertyState_DIRECT_VALUE );
+ Any( sInitialSelection ), PropertyState_DIRECT_VALUE );
}
SharedConnection xConnection( getConnection() );
@@ -321,7 +321,8 @@ void SAL_CALL OApplicationController::connect( )
// no particular error, but nonetheless could not connect -> throw a generic exception
OUString sConnectingContext( DBA_RES( STR_COULDNOTCONNECT_DATASOURCE ) );
- ::dbtools::throwGenericSQLException( sConnectingContext.replaceFirst( "$name$", getStrippedDatabaseName() ), *this );
+ OUString sDatabaseName;
+ ::dbtools::throwGenericSQLException( sConnectingContext.replaceFirst( "$name$", ::dbaui::getStrippedDatabaseName(m_xDataSource, sDatabaseName) ), *this );
}
}
@@ -433,7 +434,7 @@ Reference< XComponent > SAL_CALL OApplicationController::loadComponentWithArgume
Reference< XComponent > xComponent( openElementWithArguments(
ObjectName,
lcl_objectType2ElementType( ObjectType ),
- ForEditing ? E_OPEN_DESIGN : E_OPEN_NORMAL,
+ ForEditing ? ElementOpenMode::Design : ElementOpenMode::Normal,
ForEditing ? SID_DB_APP_EDIT : SID_DB_APP_OPEN,
::comphelper::NamedValueCollection( Arguments )
) );
@@ -487,7 +488,7 @@ void OApplicationController::previewChanged( sal_Int32 _nMode )
if ( nOldMode != _nMode )
{
aLayoutInfo.put( "Preview", _nMode );
- m_xDataSource->setPropertyValue( PROPERTY_LAYOUTINFORMATION, makeAny( aLayoutInfo.getPropertyValues() ) );
+ m_xDataSource->setPropertyValue( PROPERTY_LAYOUTINFORMATION, Any( aLayoutInfo.getPropertyValues() ) );
}
}
catch ( const Exception& )
@@ -550,12 +551,6 @@ OUString OApplicationController::getDatabaseName() const
return sDatabaseName;
}
-OUString OApplicationController::getStrippedDatabaseName() const
-{
- OUString sDatabaseName;
- return ::dbaui::getStrippedDatabaseName( m_xDataSource, sDatabaseName );
-}
-
void OApplicationController::onDocumentOpened( const OUString& _rName, const sal_Int32 _nType,
const ElementOpenMode _eMode, const Reference< XComponent >& _xDocument, const Reference< XComponent >& _rxDefinition )
{
@@ -639,7 +634,7 @@ void OApplicationController::onLoadedMenu(const Reference< css::frame::XLayoutMa
if ( !_xLayoutManager.is() )
return;
- static constexpr OUStringLiteral s_sStatusbar = u"private:resource/statusbar/statusbar";
+ static constexpr OUString s_sStatusbar = u"private:resource/statusbar/statusbar"_ustr;
_xLayoutManager->createElement( s_sStatusbar );
_xLayoutManager->requestElement( s_sStatusbar );
@@ -667,10 +662,10 @@ void OApplicationController::doAction(sal_uInt16 _nId, const ElementOpenMode _eO
ElementType eType = getContainer()->getElementType();
::comphelper::NamedValueCollection aArguments;
ElementOpenMode eOpenMode = _eOpenMode;
- if ( eType == E_REPORT && E_OPEN_FOR_MAIL == _eOpenMode )
+ if ( eType == E_REPORT && ElementOpenMode::Mail == _eOpenMode )
{
aArguments.put("Hidden",true);
- eOpenMode = E_OPEN_NORMAL;
+ eOpenMode = ElementOpenMode::Normal;
}
std::vector< std::pair< OUString ,Reference< XModel > > > aComponents;
@@ -686,7 +681,7 @@ void OApplicationController::doAction(sal_uInt16 _nId, const ElementOpenMode _eO
}
// special handling for mail, if more than one document is selected attach them all
- if ( _eOpenMode != E_OPEN_FOR_MAIL )
+ if ( _eOpenMode != ElementOpenMode::Mail )
return;