diff options
author | Santiago Alessandri <salessandri@nasel.com.ar> | 2010-11-13 21:19:14 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-11-13 21:19:14 +0000 |
commit | 19934b8578f210d2a90aaceb994ec861549b9a4d (patch) | |
tree | 92cddd49b0e25bcdfc8322237b6e14bd546adb9e /dbaccess/source/ui/querydesign | |
parent | 1a9679501f755050e14e4df2c2ce7f541ba3b759 (diff) |
Replaced createFromAscii in all dbaccess tree under base repo
Diffstat (limited to 'dbaccess/source/ui/querydesign')
7 files changed, 65 insertions, 60 deletions
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx index 8f532687e72c..411c49d68c2f 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx @@ -81,7 +81,7 @@ namespace dbaui // ----------------------------------------------------------------------------- ::rtl::OUString OConnectionLineAccess::getImplementationName_Static(void) throw( RuntimeException ) { - return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.ConnectionLineAccessibility"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.ConnectionLineAccessibility")); } // ----------------------------------------------------------------------------- // XAccessibleContext diff --git a/dbaccess/source/ui/querydesign/JAccess.cxx b/dbaccess/source/ui/querydesign/JAccess.cxx index 155aac4c27da..90feae92b25d 100644 --- a/dbaccess/source/ui/querydesign/JAccess.cxx +++ b/dbaccess/source/ui/querydesign/JAccess.cxx @@ -57,7 +57,7 @@ namespace dbaui // ----------------------------------------------------------------------------- ::rtl::OUString OJoinDesignViewAccess::getImplementationName_Static(void) throw( RuntimeException ) { - return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.JoinViewAccessibility"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.JoinViewAccessibility")); } // ----------------------------------------------------------------------------- void OJoinDesignViewAccess::clearTableView() diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 60e71a4a8e7d..43835aca09bc 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -83,8 +83,8 @@ using namespace ::com::sun::star::container; // please look at the book LargeScale C++ to know why namespace { - static const ::rtl::OUString C_AND = ::rtl::OUString::createFromAscii(" AND "); - static const ::rtl::OUString C_OR = ::rtl::OUString::createFromAscii(" OR "); + static const ::rtl::OUString C_AND(RTL_CONSTASCII_USTRINGPARAM(" AND ")); + static const ::rtl::OUString C_OR(RTL_CONSTASCII_USTRINGPARAM(" OR ")); // forward declarations sal_Bool InsertJoin( const OQueryDesignView* _pView, @@ -389,9 +389,9 @@ namespace ::rtl::OUString aQuote = xMetaData->getIdentifierQuoteString(); if ( _bForce || isAppendTableAliasEnabled( _xConnection ) || pEntryTab->GetAliasName() != aDBName ) { - aTableListStr += ::rtl::OUString::createFromAscii(" "); + aTableListStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")); if ( generateAsBeforeTableAlias( _xConnection ) ) - aTableListStr += ::rtl::OUString::createFromAscii("AS "); + aTableListStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AS ")); aTableListStr += ::dbtools::quoteName( aQuote, pEntryTab->GetAliasName() ); } aDBName = aTableListStr; @@ -975,7 +975,7 @@ namespace eErrorCode = eStatementTooLong; else { - _rsRet = ::rtl::OUString::createFromAscii(" ORDER BY "); + _rsRet = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ORDER BY ")); _rsRet += aWorkStr; } } @@ -1210,7 +1210,7 @@ namespace if ( aGroupByStr.getLength() ) { aGroupByStr = aGroupByStr.replaceAt(aGroupByStr.getLength()-1,1, ::rtl::OUString(' ') ); - ::rtl::OUString aGroupByStr2 = ::rtl::OUString::createFromAscii(" GROUP BY "); + ::rtl::OUString aGroupByStr2(RTL_CONSTASCII_USTRINGPARAM(" GROUP BY ")); aGroupByStr2 += aGroupByStr; aGroupByStr = aGroupByStr2; } @@ -1575,7 +1575,7 @@ namespace for(;aIter != aTabEnd;++aIter) { OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(aIter->second); - if (pTabWin->ExistsField( ::rtl::OUString::createFromAscii("*"), aDragLeft )) + if (pTabWin->ExistsField( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")), aDragLeft )) { aDragLeft->SetAlias(String()); aDragLeft->SetTable(String()); @@ -1689,22 +1689,22 @@ namespace case SQL_NODE_LESS: // take the opposite as we change the order i--; - aCondition = aCondition + ::rtl::OUString::createFromAscii(">"); + aCondition = aCondition + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(">")); break; case SQL_NODE_LESSEQ: // take the opposite as we change the order i--; - aCondition = aCondition + ::rtl::OUString::createFromAscii(">="); + aCondition = aCondition + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(">=")); break; case SQL_NODE_GREAT: // take the opposite as we change the order i--; - aCondition = aCondition + ::rtl::OUString::createFromAscii("<"); + aCondition = aCondition + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("<")); break; case SQL_NODE_GREATEQ: // take the opposite as we change the order i--; - aCondition = aCondition + ::rtl::OUString::createFromAscii("<="); + aCondition = aCondition + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("<=")); break; default: break; @@ -2232,7 +2232,7 @@ namespace for(;aIter != aEnd;++aIter) { OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(aIter->second); - if (pTabWin->ExistsField( ::rtl::OUString::createFromAscii("*"), aInfo )) + if (pTabWin->ExistsField( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")), aInfo )) { aInfo->SetAlias(String()); aInfo->SetTable(String()); @@ -2903,9 +2903,9 @@ sal_Bool OQueryDesignView::checkStatement() GenerateInnerJoinCriterias(xConnection,aJoinCrit,pConnList); if(aJoinCrit.getLength()) { - ::rtl::OUString aTmp = ::rtl::OUString::createFromAscii("( "); + ::rtl::OUString aTmp(RTL_CONSTASCII_USTRINGPARAM("( ")); aTmp += aJoinCrit; - aTmp += ::rtl::OUString::createFromAscii(" )"); + aTmp += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" )")); if(aCriteriaListStr.getLength()) { aTmp += C_AND; @@ -2914,16 +2914,16 @@ sal_Bool OQueryDesignView::checkStatement() aCriteriaListStr = aTmp; } // ----------------- Statement aufbauen ---------------------- - ::rtl::OUStringBuffer aSqlCmd(::rtl::OUString::createFromAscii("SELECT ")); + ::rtl::OUStringBuffer aSqlCmd(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT "))); if(static_cast<OQueryController&>(getController()).isDistinct()) - aSqlCmd.append(::rtl::OUString::createFromAscii(" DISTINCT ")); + aSqlCmd.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" DISTINCT "))); aSqlCmd.append(aFieldListStr); - aSqlCmd.append(::rtl::OUString::createFromAscii(" FROM ")); + aSqlCmd.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" FROM "))); aSqlCmd.append(aTableListStr); if (aCriteriaListStr.getLength()) { - aSqlCmd.append(::rtl::OUString::createFromAscii(" WHERE ")); + aSqlCmd.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" WHERE "))); aSqlCmd.append(aCriteriaListStr.makeStringAndClear()); } // ----------------- GroupBy aufbauen und Anh"angen ------------ @@ -2938,7 +2938,7 @@ sal_Bool OQueryDesignView::checkStatement() // ----------------- having Anh"angen ------------ if(aHavingStr.getLength()) { - aSqlCmd.append(::rtl::OUString::createFromAscii(" HAVING ")); + aSqlCmd.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" HAVING "))); aSqlCmd.append(aHavingStr.makeStringAndClear()); } // ----------------- Sortierung aufbauen und Anh"angen ------------ diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index 186260f20e92..f09d15bda269 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -194,7 +194,7 @@ BOOL OTableWindow::FillListBox() if (GetData()->IsShowAll()) { - SvLBoxEntry* pEntry = m_pListBox->InsertEntry( ::rtl::OUString::createFromAscii("*") ); + SvLBoxEntry* pEntry = m_pListBox->InsertEntry( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")) ); pEntry->SetUserData( createUserData(NULL,false) ); } diff --git a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx index aad8a07fa4cc..90bb7e4a9280 100644 --- a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx @@ -100,14 +100,14 @@ namespace dbaui Sequence< ::rtl::OUString > OTableWindowAccess::getSupportedServiceNames_Static(void) throw( RuntimeException ) { Sequence< ::rtl::OUString > aSupported(2); - aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.accessibility.Accessible"); - aSupported[1] = ::rtl::OUString::createFromAscii("com.sun.star.accessibility.AccessibleContext"); + aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.accessibility.Accessible")); + aSupported[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.accessibility.AccessibleContext")); return aSupported; } // ----------------------------------------------------------------------------- ::rtl::OUString OTableWindowAccess::getImplementationName_Static(void) throw( RuntimeException ) { - return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.TableWindowAccessibility"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.TableWindowAccessibility")); } // ----------------------------------------------------------------------------- // XAccessibleContext diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx index 56343b778e0a..227156ca515e 100644 --- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx +++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx @@ -207,7 +207,7 @@ namespace dbaui ::dbaui::notifySystemWindow(this,m_pBeamer,::comphelper::mem_fun(&TaskPaneList::AddWindow)); - Reference < XFrame > xBeamerFrame( m_pViewSwitch->getORB()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.Frame")),UNO_QUERY ); + Reference < XFrame > xBeamerFrame( m_pViewSwitch->getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Frame"))),UNO_QUERY ); m_xBeamer.set( xBeamerFrame ); OSL_ENSURE(m_xBeamer.is(),"No frame created!"); m_xBeamer->initialize( VCLUnoHelper::GetInterface ( m_pBeamer ) ); diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 82122c97aed1..ac2c82b40a7c 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -124,12 +124,12 @@ namespace dbaui // need by registration static ::rtl::OUString getImplementationName_Static() throw( RuntimeException ) { - return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.OViewDesign"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.OViewDesign")); } static Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( RuntimeException ) { Sequence< ::rtl::OUString> aSupported(1); - aSupported.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdb.ViewDesign"); + aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.ViewDesign")); return aSupported; } static Reference< XInterface > SAL_CALL Create(const Reference< XMultiServiceFactory >& _rM) @@ -156,11 +156,11 @@ namespace dbaui if (!_pNode->isToken()) { // Regelnamen als rule: ... - rString = ::rtl::OUString::createFromAscii("RULE_ID: "); + rString = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RULE_ID: ")); rString += ::rtl::OUString::valueOf( (sal_Int32)_pNode->getRuleID()); - rString+= ::rtl::OUString::createFromAscii("("); + rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("(")); rString += OSQLParser::RuleIDToStr(_pNode->getRuleID()); - rString+= ::rtl::OUString::createFromAscii(")"); + rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")")); _pParent = _pBox->InsertEntry(rString,_pParent); @@ -181,50 +181,55 @@ namespace dbaui case SQL_NODE_KEYWORD: { - rString+= ::rtl::OUString::createFromAscii("SQL_KEYWORD:"); + rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_KEYWORD:")); ::rtl::OString sT = OSQLParser::TokenIDToStr(_pNode->getTokenID()); rString += ::rtl::OUString(sT,sT.getLength(),RTL_TEXTENCODING_UTF8); break;} case SQL_NODE_COMPARISON: - {rString+= ::rtl::OUString::createFromAscii("SQL_COMPARISON:"); - rString += _pNode->getTokenValue(); // haenge Nodevalue an + { + rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_COMPARISON:")); + rString += _pNode->getTokenValue(); // haenge Nodevalue an // und beginne neu Zeile - break;} + break;} case SQL_NODE_NAME: - {rString+= ::rtl::OUString::createFromAscii("SQL_NAME:"); - rString+= ::rtl::OUString::createFromAscii("\""); - rString += _pNode->getTokenValue(); - rString+= ::rtl::OUString::createFromAscii("\""); - - break;} + { + rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_NAME:")); + rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"")); + rString += _pNode->getTokenValue(); + rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"")); + break;} case SQL_NODE_STRING: - {rString += ::rtl::OUString::createFromAscii("SQL_STRING:'"); - rString += _pNode->getTokenValue(); - break;} + { + rString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_STRING:'")); + rString += _pNode->getTokenValue(); + break;} case SQL_NODE_INTNUM: - {rString += ::rtl::OUString::createFromAscii("SQL_INTNUM:"); - rString += _pNode->getTokenValue(); - break;} + { + rString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_INTNUM:")); + rString += _pNode->getTokenValue(); + break;} case SQL_NODE_APPROXNUM: - {rString += ::rtl::OUString::createFromAscii("SQL_APPROXNUM:"); - rString += _pNode->getTokenValue(); - break;} + { + rString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_APPROXNUM:")); + rString += _pNode->getTokenValue(); + break;} case SQL_NODE_PUNCTUATION: - {rString += ::rtl::OUString::createFromAscii("SQL_PUNCTUATION:"); - rString += _pNode->getTokenValue(); // haenge Nodevalue an - break;} + { + rString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_PUNCTUATION:")); + rString += _pNode->getTokenValue(); // haenge Nodevalue an + break;} case SQL_NODE_AMMSC: - {rString += ::rtl::OUString::createFromAscii("SQL_AMMSC:"); - rString += _pNode->getTokenValue(); // haenge Nodevalue an - - break;} + { + rString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_AMMSC:")); + rString += _pNode->getTokenValue(); // haenge Nodevalue an + break;} default: OSL_ASSERT("OSQLParser::ShowParseTree: unzulaessiger NodeType"); @@ -303,13 +308,13 @@ namespace //------------------------------------------------------------------------------ ::rtl::OUString OQueryController::getImplementationName_Static() throw( RuntimeException ) { - return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.OQueryDesign"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.OQueryDesign")); } //------------------------------------------------------------------------------ Sequence< ::rtl::OUString> OQueryController::getSupportedServiceNames_Static(void) throw( RuntimeException ) { Sequence< ::rtl::OUString> aSupported(1); - aSupported.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdb.QueryDesign"); + aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.QueryDesign")); return aSupported; } //------------------------------------------------------------------------- @@ -1290,7 +1295,7 @@ void OQueryController::executeQuery() InvalidateFeature(SID_DB_QUERY_PREVIEW); URL aWantToDispatch; - aWantToDispatch.Complete = ::rtl::OUString::createFromAscii(".component:DB/DataSourceBrowser"); + aWantToDispatch.Complete = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".component:DB/DataSourceBrowser")); ::rtl::OUString sFrameName( FRAME_NAME_QUERY_PREVIEW ); sal_Int32 nSearchFlags = FrameSearchFlag::CHILDREN; |