diff options
author | Noel Grandin <noel@peralex.com> | 2013-09-26 12:17:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-10-01 10:08:43 +0200 |
commit | d11ed5a57e23fcc8d59ec40e7f52c7f54f7241a4 (patch) | |
tree | 1cac73d4879d1349a7c849aad892fa14560c03ca /dbaccess/source/ui/querydesign | |
parent | 5a9e9c8a22586a9309b53cc49f063115d31f5b38 (diff) |
convert dbaccess module from String to OUString
Change-Id: I110c925f8d955dfd841cdd1092c13df4d8205393
Diffstat (limited to 'dbaccess/source/ui/querydesign')
9 files changed, 68 insertions, 67 deletions
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx index 9c376095276b..f49fdefa6fbb 100644 --- a/dbaccess/source/ui/querydesign/JoinController.cxx +++ b/dbaccess/source/ui/querydesign/JoinController.cxx @@ -95,7 +95,7 @@ public: virtual bool allowViews() const; virtual bool allowQueries() const; virtual bool allowAddition() const; - virtual void addTableWindow( const String& _rQualifiedTableName, const String& _rAliasName ); + virtual void addTableWindow( const OUString& _rQualifiedTableName, const OUString& _rAliasName ); virtual void onWindowClosing( const Window* _pWindow ); private: @@ -122,7 +122,7 @@ bool AddTableDialogContext::allowAddition() const return const_cast< OJoinController& >( m_rController ).getJoinView()->getTableView()->IsAddAllowed(); } -void AddTableDialogContext::addTableWindow( const String& _rQualifiedTableName, const String& _rAliasName ) +void AddTableDialogContext::addTableWindow( const OUString& _rQualifiedTableName, const OUString& _rAliasName ) { getTableView()->AddTabWin( _rQualifiedTableName, _rAliasName, sal_True ); } diff --git a/dbaccess/source/ui/querydesign/JoinExchange.cxx b/dbaccess/source/ui/querydesign/JoinExchange.cxx index 6cc155618771..70007d70601a 100644 --- a/dbaccess/source/ui/querydesign/JoinExchange.cxx +++ b/dbaccess/source/ui/querydesign/JoinExchange.cxx @@ -28,7 +28,8 @@ namespace dbaui using namespace ::com::sun::star::lang; using namespace ::com::sun::star::datatransfer; - String OJoinExchObj::m_sJoinFormat; + OUString OJoinExchObj::m_sJoinFormat; + // class OJoinExchObj DBG_NAME(OJoinExchObj) OJoinExchObj::OJoinExchObj(const OJoinExchangeData& jxdSource,sal_Bool _bFirstEntry) diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index c20d09153f58..79ef08d72490 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -262,7 +262,7 @@ bool OJoinTableView::RemoveConnection( OTableConnection* _pConn,sal_Bool _bDelet return true; } -OTableWindow* OJoinTableView::GetTabWindow( const String& rName ) +OTableWindow* OJoinTableView::GetTabWindow( const OUString& rName ) { DBG_CHKTHIS(OJoinTableView,NULL); OTableWindowMapIterator aIter = m_aTableMap.find(rName); @@ -385,7 +385,7 @@ void OJoinTableView::RemoveTabWin( OTableWindow* pTabWin ) rController.setModified(sal_True); } - String aWinName = pTabWin->GetWinName(); + OUString aWinName = pTabWin->GetWinName(); if(m_aTableMap.find(aWinName) != m_aTableMap.end()) m_aTableMap.erase( aWinName ); else diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index b62564a244e5..30ba7170bc4d 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -264,15 +264,15 @@ namespace if ( !bErg ) { eErrorCode = eColumnNotFound; - String sError(ModuleRes(STR_QRY_COLUMN_NOT_FOUND)); - sError.SearchAndReplaceAscii("$name$",aColumnName); + OUString sError(ModuleRes(STR_QRY_COLUMN_NOT_FOUND)); + sError = sError.replaceFirst("$name$",aColumnName); _pView->getController().appendError( sError ); try { Reference<XDatabaseMetaData> xMeta = _pView->getController().getConnection()->getMetaData(); if ( xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers() ) - _pView->getController().appendError( String( ModuleRes( STR_QRY_CHECK_CASESENSITIVE ) ) ); + _pView->getController().appendError( OUString( ModuleRes( STR_QRY_CHECK_CASESENSITIVE ) ) ); } catch(Exception&) { @@ -572,7 +572,7 @@ namespace SQL_ISRULE(pNode->getChild(2),column_ref) && pNode->getChild(1)->getNodeType() == SQL_NODE_EQUAL)) { - String sError(ModuleRes(STR_QRY_JOIN_COLUMN_COMPARE)); + OUString sError(ModuleRes(STR_QRY_JOIN_COLUMN_COMPARE)); _pView->getController().appendError( sError ); return eIllegalJoin; } @@ -962,14 +962,14 @@ namespace } { - String sTemp(comphelper::string::stripEnd(aWorkStr, ',')); + OUString sTemp(comphelper::string::stripEnd(aWorkStr, ',')); aWorkStr = sTemp; } if ( !aWorkStr.isEmpty() ) { const sal_Int32 nMaxOrder = xMetaData->getMaxColumnsInOrderBy(); - String sToken(aWorkStr); + OUString sToken(aWorkStr); if ( nMaxOrder && nMaxOrder < comphelper::string::getTokenCount(sToken, ',') ) eErrorCode = eStatementTooLong; else @@ -1424,7 +1424,7 @@ namespace else { eErrorCode = eNoColumnInLike; - String sError(ModuleRes(STR_QRY_LIKE_LEFT_NO_COLUMN)); + OUString sError(ModuleRes(STR_QRY_LIKE_LEFT_NO_COLUMN)); _pView->getController().appendError( sError ); } } @@ -1548,8 +1548,8 @@ namespace OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(aIter->second); if (pTabWin->ExistsField( OUString("*"), aDragLeft )) { - aDragLeft->SetAlias(String()); - aDragLeft->SetTable(String()); + aDragLeft->SetAlias(OUString()); + aDragLeft->SetTable(OUString()); break; } } @@ -2209,8 +2209,8 @@ namespace OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(aIter->second); if (pTabWin->ExistsField( OUString("*"), aInfo )) { - aInfo->SetAlias(String()); - aInfo->SetTable(String()); + aInfo->SetAlias(OUString()); + aInfo->SetTable(OUString()); break; } } @@ -2245,8 +2245,8 @@ namespace if ( SQL_ISRULE(pColumnRef,general_set_fct) ) { aInfo->SetFunctionType(nFunctionType|FKT_AGGREGATE); - String aCol(aColumns); - aInfo->SetFunction(comphelper::string::stripEnd(aCol.GetToken(0,'('), ' ')); + OUString aCol(aColumns); + aInfo->SetFunction(comphelper::string::stripEnd(aCol.getToken(0,'('), ' ')); } else aInfo->SetFunctionType(nFunctionType|FKT_OTHER); @@ -2438,7 +2438,7 @@ namespace return eErrorCode; } - String getParseErrorMessage( SqlParseError _eErrorCode ) + OUString getParseErrorMessage( SqlParseError _eErrorCode ) { sal_uInt16 nResId; switch(_eErrorCode) @@ -2484,7 +2484,7 @@ namespace break; } ; - return String( ModuleRes( nResId ) ); + return OUString( ModuleRes( nResId ) ); } } @@ -2734,7 +2734,7 @@ SqlParseError OQueryDesignView::InsertField( const OTableFieldDescRef& rInfo, sa sal_Int32 OQueryDesignView::getColWidth(sal_uInt16 _nColPos) const { - static sal_Int32 s_nDefaultWidth = GetTextWidth(String(RTL_CONSTASCII_USTRINGPARAM("0"))) * 15; + static sal_Int32 s_nDefaultWidth = GetTextWidth(OUString("0")) * 15; sal_Int32 nWidth = static_cast<OQueryController&>(getController()).getColWidth(_nColPos); if ( !nWidth ) nWidth = s_nDefaultWidth; @@ -3031,19 +3031,19 @@ OSQLParseNode* OQueryDesignView::getPredicateTreeFromEntry(OTableFieldDescRef pE // special handling for functions if ( pEntry->GetFunctionType() & (FKT_OTHER | FKT_AGGREGATE | FKT_NUMERIC) ) { - // we have a function here so we have to distinguish the type of return value - String sFunction; + // we have a function here so we have to distinguish the type of return vOUalue + OUString sFunction; if ( pEntry->isNumericOrAggreateFunction() ) sFunction = pEntry->GetFunction(); - if ( !sFunction.Len() ) + if ( sFunction.isEmpty() ) sFunction = pEntry->GetField(); if (comphelper::string::getTokenCount(sFunction, '(') > 1) - sFunction = sFunction.GetToken(0,'('); // this should be the name of the function + sFunction = sFunction.getToken(0,'('); // this should be the name of the function sal_Int32 nType = ::connectivity::OSQLParser::getFunctionReturnType(sFunction,&rParser.getContext()); - if ( nType == DataType::OTHER || (!sFunction.Len() && pEntry->isNumericOrAggreateFunction()) ) + if ( nType == DataType::OTHER || (sFunction.isEmpty() && pEntry->isNumericOrAggreateFunction()) ) { // first try the international version OUString sSql; diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index ecb8c10236ae..8d378e2aa3cd 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -235,7 +235,7 @@ OQueryTableView::~OQueryTableView() DBG_DTOR(OQueryTableView,NULL); } -sal_Int32 OQueryTableView::CountTableAlias(const String& rName, sal_Int32& rMax) +sal_Int32 OQueryTableView::CountTableAlias(const OUString& rName, sal_Int32& rMax) { DBG_CHKTHIS(OQueryTableView,NULL); sal_Int32 nRet = 0; @@ -715,10 +715,10 @@ void OQueryTableView::KeyInput( const KeyEvent& rEvt ) OJoinTableView::KeyInput( rEvt ); } -OQueryTableWindow* OQueryTableView::FindTable(const String& rAliasName) +OQueryTableWindow* OQueryTableView::FindTable(const OUString& rAliasName) { DBG_CHKTHIS(OQueryTableView,NULL); - OSL_ENSURE(rAliasName.Len(), "OQueryTableView::FindTable : the AliasName should not be empty !"); + OSL_ENSURE(!rAliasName.isEmpty(), "OQueryTableView::FindTable : the AliasName should not be empty !"); // (it is harmless but does not make sense and indicates that there is probably an error in the caller) OTableWindowMap::const_iterator aIter = GetTabWinMap()->find(rAliasName); if(aIter != GetTabWinMap()->end()) @@ -726,7 +726,7 @@ OQueryTableWindow* OQueryTableView::FindTable(const String& rAliasName) return NULL; } -sal_Bool OQueryTableView::FindTableFromField(const String& rFieldName, OTableFieldDescRef& rInfo, sal_uInt16& rCnt) +sal_Bool OQueryTableView::FindTableFromField(const OUString& rFieldName, OTableFieldDescRef& rInfo, sal_uInt16& rCnt) { DBG_CHKTHIS(OQueryTableView,NULL); rCnt = 0; diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx index 6cb5ad3cd582..059c6f7532ee 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx @@ -68,7 +68,7 @@ namespace dbaui sal_Int32 m_nMaxColumns; // maximum number of columns in a Select-Statement - String m_aFunctionStrings; + OUString m_aFunctionStrings; sal_uInt16 m_nVisibleCount; // maximum number of visible rows sal_uInt32 m_nLastSortColumn; // index of last (highest) sort column sal_Bool m_bOrderByUnRelated; @@ -87,7 +87,7 @@ namespace dbaui OTableFieldDescRef InsertField( const OTableFieldDescRef& rInfo, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID, sal_Bool bVis=sal_True, sal_Bool bActivate=sal_True ); void InsertColumn( OTableFieldDescRef pEntry, sal_uInt16& _nColumnPosition ); void RemoveColumn( sal_uInt16 _nColumnId ); - void DeleteFields( const String& rAliasName ); + void DeleteFields( const OUString& rAliasName ); bool HasFieldByAliasName(const OUString& rFieldName, OTableFieldDescRef& rInfo) const; @@ -95,7 +95,7 @@ namespace dbaui // the flag is not set void AddGroupBy( const OTableFieldDescRef& rInfo,sal_uInt32 _nCurrentPos); void AddCondition( const OTableFieldDescRef& rInfo, - const String& rValue, + const OUString& rValue, const sal_uInt16 nLevel, bool _bAddOrOnOneLine ); void DuplicateConditionLevel( const sal_uInt16 nLevel); @@ -110,8 +110,8 @@ namespace dbaui void SetColWidth(sal_uInt16 nColId, long lNewWidth); // unlike SetColumnWidth of the base class it checks an active cell in this column - String GetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId); - void SetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId, const String& strNewText); + OUString GetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId); + void SetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId, const OUString& strNewText); // cell content (formatted as string) set/return sal_Int32 GetNoneVisibleRows() const; void SetNoneVisbleRow(long nRows); @@ -205,7 +205,7 @@ namespace dbaui virtual sal_uInt32 GetTotalCellWidth(long nRow, sal_uInt16 nColId); - virtual sal_uInt16 GetDefaultColumnWidth(const String& rName) const; + virtual sal_uInt16 GetDefaultColumnWidth(const OUString& rName) const; // if you want to have an own header ... virtual BrowserHeader* imp_CreateHeaderBar(BrowseBox* pParent); @@ -227,11 +227,11 @@ namespace dbaui long GetRealRow(long nRow) const; long GetBrowseRow(long nRowId) const; sal_Bool GetFunctionName(sal_uInt32 _nFunctionTokenId, OUString& rFkt); - void appendUndoAction(const String& _rOldValue,const String& _rNewValue,sal_Int32 _nRow,sal_Bool& _bListAction); - void appendUndoAction(const String& _rOldValue,const String& _rNewValue,sal_Int32 _nRow); + void appendUndoAction(const OUString& _rOldValue,const OUString& _rNewValue,sal_Int32 _nRow,sal_Bool& _bListAction); + void appendUndoAction(const OUString& _rOldValue,const OUString& _rNewValue,sal_Int32 _nRow); OTableFields& getFields() const; void enableControl(const OTableFieldDescRef& _rEntry,Window* _pControl); - void setTextCellContext(const OTableFieldDescRef& _rEntry,const String& _sText,const OString& _sHelpId); + void setTextCellContext(const OTableFieldDescRef& _rEntry,const OUString& _sText,const OString& _sHelpId); void invalidateUndoRedo(); OTableFieldDescRef getEntry(OTableFields::size_type _nPos); @@ -247,7 +247,7 @@ namespace dbaui @return <TRUE/> if an error occurred otherwise <FALSE/> */ - sal_Bool saveField(String& _sFieldName, OTableFieldDescRef& _pEntry, sal_Bool& _bListAction); + sal_Bool saveField(OUString& _sFieldName, OTableFieldDescRef& _pEntry, sal_Bool& _bListAction); /** sets the table window at the _pEntry @param _pEntry @@ -289,7 +289,7 @@ namespace dbaui @param _bListAction Will be set to <TRUE/> when we are in a list action otherwise <FALSE/> */ - void notifyTableFieldChanged(const String& _sOldAlias,const String& _sAlias,sal_Bool& _bListAction,sal_uInt16 _nColumnId); + void notifyTableFieldChanged(const OUString& _sOldAlias,const OUString& _sAlias,sal_Bool& _bListAction,sal_uInt16 _nColumnId); /** append an undo action for the function field @param _sOldFunctionName @@ -299,7 +299,7 @@ namespace dbaui @param _bListAction Will be set to <TRUE/> when we are in a list action otherwise <FALSE/> */ - void notifyFunctionFieldChanged(const String& _sOldFunctionName,const String& _sFunctionName,sal_Bool& _bListAction,sal_uInt16 _nColumnId); + void notifyFunctionFieldChanged(const OUString& _sOldFunctionName,const OUString& _sFunctionName,sal_Bool& _bListAction,sal_uInt16 _nColumnId); /** clears the function fields of the submitted entry if it doesn't match the SQL standard and append an undo action. E.q. AGGREGATE functions are only valid when the field name isn't an asterix @@ -310,7 +310,7 @@ namespace dbaui @param _bListAction When <TRUE/> an list action will be created. */ - void clearEntryFunctionField(const String& _sFieldName,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction,sal_uInt16 _nColumnId); + void clearEntryFunctionField(const OUString& _sFieldName,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction,sal_uInt16 _nColumnId); /** remove or insert the necessary function types @param _pEntry diff --git a/dbaccess/source/ui/querydesign/TableConnectionData.cxx b/dbaccess/source/ui/querydesign/TableConnectionData.cxx index 2d7b3be86c26..8ce999d98581 100644 --- a/dbaccess/source/ui/querydesign/TableConnectionData.cxx +++ b/dbaccess/source/ui/querydesign/TableConnectionData.cxx @@ -34,7 +34,7 @@ OTableConnectionData::OTableConnectionData() OTableConnectionData::OTableConnectionData(const TTableWindowData::value_type& _pReferencingTable ,const TTableWindowData::value_type& _pReferencedTable - ,const String& rConnName ) + ,const OUString& rConnName ) :m_pReferencingTable(_pReferencingTable) ,m_pReferencedTable(_pReferencedTable) ,m_aConnName( rConnName ) @@ -93,7 +93,7 @@ OTableConnectionData& OTableConnectionData::operator=( const OTableConnectionDat return *this; } -sal_Bool OTableConnectionData::SetConnLine( sal_uInt16 nIndex, const String& rSourceFieldName, const String& rDestFieldName ) +sal_Bool OTableConnectionData::SetConnLine( sal_uInt16 nIndex, const OUString& rSourceFieldName, const OUString& rDestFieldName ) { if (sal_uInt16(m_vConnLineData.size()) < nIndex) return sal_False; diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index c32d8319e385..6b734e8b6ee7 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -740,7 +740,7 @@ long OTableWindow::PreNotify(NotifyEvent& rNEvt) return 1L; } -String OTableWindow::getTitle() const +OUString OTableWindow::getTitle() const { return m_aTitle.GetText(); } diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 189bc53fb4c2..af1d3809c75a 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -222,15 +222,15 @@ namespace dbaui namespace { - String lcl_getObjectResourceString( sal_uInt16 _nResId, sal_Int32 _nCommandType ) + OUString lcl_getObjectResourceString( sal_uInt16 _nResId, sal_Int32 _nCommandType ) { - String sMessageText = String( ModuleRes( _nResId ) ); - String sObjectType; + OUString sMessageText = ModuleRes( _nResId ); + OUString sObjectType; { LocalResourceAccess aLocalRes( RSC_QUERY_OBJECT_TYPE, RSC_RESOURCE ); - sObjectType = String( ModuleRes( (sal_uInt16)( _nCommandType + 1 ) ) ); + sObjectType = ModuleRes( (sal_uInt16)( _nCommandType + 1 ) ); } - sMessageText.SearchAndReplace( OUString("$object$"), sObjectType ); + sMessageText = sMessageText.replaceFirst( "$object$", sObjectType ); return sMessageText; } } @@ -639,7 +639,7 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& if ( m_pSqlIterator->getStatementType() != SQL_STATEMENT_SELECT || xTabs.begin() == xTabs.end() ) { aError = SQLException( - String( ModuleRes( STR_QRY_NOSELECT ) ), + OUString( ModuleRes( STR_QRY_NOSELECT ) ), NULL, "S1000", 1000, @@ -662,7 +662,7 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& else { aError = SQLException( - String( ModuleRes( STR_QRY_SYNTAX ) ), + OUString( ModuleRes( STR_QRY_SYNTAX ) ), NULL, "S1000", 1000, @@ -692,7 +692,7 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& break; case SID_BROWSER_CLEAR_QUERY: { - GetUndoManager().EnterListAction( String( ModuleRes(STR_QUERY_UNDO_TABWINDELETE) ), String() ); + GetUndoManager().EnterListAction( OUString( ModuleRes(STR_QUERY_UNDO_TABWINDELETE) ), OUString() ); getContainer()->clear(); GetUndoManager().LeaveListAction(); @@ -988,8 +988,8 @@ void OQueryController::impl_initialize() m_nCommandType = CommandType::QUERY; sal_Bool bClose = sal_False; { - String aTitle( ModuleRes( STR_QUERYDESIGN_NO_VIEW_SUPPORT ) ); - String aMessage( ModuleRes( STR_QUERYDESIGN_NO_VIEW_ASK ) ); + OUString aTitle( ModuleRes( STR_QUERYDESIGN_NO_VIEW_SUPPORT ) ); + OUString aMessage( ModuleRes( STR_QUERYDESIGN_NO_VIEW_ASK ) ); ODataView* pWindow = getView(); OSQLMessageBox aDlg( pWindow, aTitle, aMessage, WB_YES_NO | WB_DEF_YES, OSQLMessageBox::Query ); bClose = aDlg.Execute() == RET_NO; @@ -1006,7 +1006,7 @@ void OQueryController::impl_initialize() if ( !( aView >>= m_xAlterView ) ) { throw IllegalArgumentException( - OUString( String( ModuleRes( STR_NO_ALTER_VIEW_SUPPORT ) ) ), + OUString( ModuleRes( STR_NO_ALTER_VIEW_SUPPORT ) ), *this, 1 ); @@ -1084,8 +1084,8 @@ OUString OQueryController::getPrivateTitle( ) const { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); - String aDefaultName = String( ModuleRes( editingView() ? STR_VIEW_TITLE : STR_QRY_TITLE ) ); - sName = aDefaultName.GetToken(0,' '); + OUString aDefaultName = ModuleRes( editingView() ? STR_VIEW_TITLE : STR_QRY_TITLE ); + sName = aDefaultName.getToken(0,' '); sName += OUString::number(getCurrentStartNumber()); } } @@ -1391,13 +1391,13 @@ sal_Bool OQueryController::askForNewName(const Reference<XNameAccess>& _xElement sal_Bool bNew = _bSaveAs || !_xElements->hasByName( m_sName ); if(bNew) { - String aDefaultName; + OUString aDefaultName; if ( ( _bSaveAs && !bNew ) || ( bNew && !m_sName.isEmpty() ) ) - aDefaultName = String( m_sName ); + aDefaultName = m_sName; else { - String sName = String( ModuleRes( editingView() ? STR_VIEW_TITLE : STR_QRY_TITLE ) ); - aDefaultName = sName.GetToken(0,' '); + OUString sName = ModuleRes( editingView() ? STR_VIEW_TITLE : STR_QRY_TITLE ); + aDefaultName = sName.getToken(0,' '); aDefaultName = ::dbtools::createUniqueName(_xElements,aDefaultName); } @@ -1430,7 +1430,7 @@ bool OQueryController::doSaveAsDoc(sal_Bool _bSaveAs) OSL_ENSURE(isEditable(),"Slot ID_BROWSER_SAVEDOC should not be enabled!"); if ( !editingCommand() && !haveDataSource() ) { - String aMessage(ModuleRes(STR_DATASOURCE_DELETED)); + OUString aMessage(ModuleRes(STR_DATASOURCE_DELETED)); OSQLWarningBox( getView(), aMessage ).Execute(); return false; } @@ -1781,7 +1781,7 @@ OUString OQueryController::translateStatement( bool _bFireStatementChange ) else if(m_sStatement.isEmpty()) { ModuleRes aModuleRes(STR_QRY_NOSELECT); - String sTmpStr(aModuleRes); + OUString sTmpStr(aModuleRes); OUString sError(sTmpStr); showError(SQLException(sError,NULL,"S1000",1000,Any())); } @@ -1805,7 +1805,7 @@ short OQueryController::saveModified() ) ) { - String sMessageText( lcl_getObjectResourceString( STR_QUERY_SAVEMODIFIED, m_nCommandType ) ); + OUString sMessageText( lcl_getObjectResourceString( STR_QUERY_SAVEMODIFIED, m_nCommandType ) ); QueryBox aQry( getView(), WB_YES_NO_CANCEL | WB_DEF_YES, sMessageText ); nRet = aQry.Execute(); @@ -1917,7 +1917,7 @@ void OQueryController::impl_reset( const bool i_bForceCurrentControllerSettings { if ( !i_bForceCurrentControllerSettings && !editingView() ) { - String aTitle(ModuleRes(STR_SVT_SQL_SYNTAX_ERROR)); + OUString aTitle(ModuleRes(STR_SVT_SQL_SYNTAX_ERROR)); OSQLMessageBox aDlg(getView(),aTitle,aErrorMsg); aDlg.Execute(); } |