diff options
-rw-r--r-- | dbaccess/source/core/api/CacheSet.cxx | 9 | ||||
-rw-r--r-- | dbaccess/source/core/api/KeySet.cxx | 9 | ||||
-rw-r--r-- | dbaccess/source/core/api/OptimisticSet.cxx | 16 | ||||
-rw-r--r-- | dbaccess/source/core/api/View.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/documentcontainer.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/documentdefinition.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/core/misc/dsntypes.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/control/FieldDescControl.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/indexdialog.cxx | 16 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/queryfilter.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/queryorder.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/tablespage.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/TokenWriter.cxx | 22 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/UITools.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/indexcollection.cxx | 19 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/QueryDesignView.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/querycontroller.cxx | 3 |
17 files changed, 43 insertions, 92 deletions
diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx index 7f492b4a0426..723e2925a4fd 100644 --- a/dbaccess/source/core/api/CacheSet.cxx +++ b/dbaccess/source/core/api/CacheSet.cxx @@ -157,16 +157,14 @@ void SAL_CALL OCacheSet::insertRow( const ORowSetRow& _rInsertRow,const connecti // set values and column names OUStringBuffer aValues(" VALUES ( "); - static const char aPara[] = "?,"; OUString aQuote = getIdentifierQuoteString(); - static const char aComma[] = ","; sal_Int32 i = 1; ORowVector< ORowSetValue >::Vector::const_iterator aIter = _rInsertRow->get().begin()+1; connectivity::ORowVector< ORowSetValue > ::Vector::iterator aEnd = _rInsertRow->get().end(); for(; aIter != aEnd;++aIter) { - aSql.append(::dbtools::quoteName( aQuote,m_xSetMetaData->getColumnName(i++)) + aComma); - aValues.append(aPara); + aSql.append(::dbtools::quoteName( aQuote,m_xSetMetaData->getColumnName(i++)) + ","); + aValues.append("?,"); } aSql[aSql.getLength() - 1] = ')'; @@ -227,7 +225,6 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow OUString aColumnName; - static const char aPara[] = "?,"; static const char aAnd[] = " AND "; OUString aQuote = getIdentifierQuoteString(); @@ -271,7 +268,7 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow } if(aIter->isModified()) { - _sParameter.append(::dbtools::quoteName( aQuote,aColumnName) + aPara); + _sParameter.append(::dbtools::quoteName( aQuote,aColumnName) + "?,"); } } } diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index a42d27393805..18724f60c20a 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -221,12 +221,11 @@ namespace { void appendOneKeyColumnClause( const OUString &tblName, const OUString &colName, const connectivity::ORowSetValue &_rValue, OUStringBuffer &o_buf ) { - static const char s_sDot[] = "."; OUString fullName; if (tblName.isEmpty()) fullName = colName; else - fullName = tblName + s_sDot + colName; + fullName = tblName + "." + colName; if ( _rValue.isNull() ) { o_buf.append(fullName + " IS NULL "); @@ -627,9 +626,7 @@ void SAL_CALL OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivi // set values and column names OUStringBuffer aValues(" VALUES ( "); - static const char aPara[] = "?,"; OUString aQuote = getIdentifierQuoteString(); - static const char aComma[] = ","; SelectColumnsMetaData::const_iterator aIter = m_pColumnNames->begin(); SelectColumnsMetaData::const_iterator aEnd = m_pColumnNames->end(); @@ -644,8 +641,8 @@ void SAL_CALL OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivi { bRefetch = ::std::find(m_aFilterColumns.begin(),m_aFilterColumns.end(),aIter->second.sRealName) == m_aFilterColumns.end(); } - aSql.append(::dbtools::quoteName( aQuote,aIter->second.sRealName) + aComma); - aValues.append(aPara); + aSql.append(::dbtools::quoteName( aQuote,aIter->second.sRealName) + ","); + aValues.append("?,"); bModified = true; } } diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx index 154ed3d1993b..f32e709f9c44 100644 --- a/dbaccess/source/core/api/OptimisticSet.cxx +++ b/dbaccess/source/core/api/OptimisticSet.cxx @@ -172,7 +172,6 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow if ( m_aJoinedKeyColumns.empty() ) throw SQLException(); // list all columns that should be set - static const char s_sPara[] = " = ?"; OUString aQuote = getIdentifierQuoteString(); ::std::map< OUString,bool > aResultSetChanged; @@ -205,7 +204,7 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow OUStringBuffer& rPart = aSql[aIter->second.sTableName]; if ( !rPart.isEmpty() ) rPart.append(", "); - rPart.append(sQuotedColumnName + s_sPara); + rPart.append(sQuotedColumnName + " = ?"); } } @@ -215,9 +214,6 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow if( aKeyConditions.empty() ) ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_CONDITION_FOR_PK ), StandardSQLState::GENERAL_ERROR, m_xConnection ); - static const char s_sUPDATE[] = "UPDATE "; - static const char s_sSET[] = " SET "; - Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData(); TSQLStatements::iterator aSqlIter = aSql.begin(); @@ -229,8 +225,8 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow m_bResultSetChanged = m_bResultSetChanged || aResultSetChanged[aSqlIter->first]; OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation); - OUStringBuffer sSql(s_sUPDATE + ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ) + - s_sSET + aSqlIter->second.toString()); + OUStringBuffer sSql("UPDATE " + ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ) + + " SET " + aSqlIter->second.toString()); OUStringBuffer& rCondition = aKeyConditions[aSqlIter->first]; if ( !rCondition.isEmpty() ) sSql.append(" WHERE " + rCondition.toString() ); @@ -283,8 +279,6 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_VALUE_CHANGED ), StandardSQLState::GENERAL_ERROR, m_xConnection ); Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData(); - static const char s_sINSERT[] = "INSERT INTO "; - static const char s_sVALUES[] = ") VALUES ( "; TSQLStatements::iterator aSqlIter = aSql.begin(); TSQLStatements::iterator aSqlEnd = aSql.end(); for(;aSqlIter != aSqlEnd ; ++aSqlIter) @@ -295,8 +289,8 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation); OUString sComposedTableName = ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ); - OUString sSql(s_sINSERT + sComposedTableName + " ( " + aSqlIter->second.toString() + - s_sVALUES + aParameter[aSqlIter->first].toString() + " )"); + OUString sSql("INSERT INTO " + sComposedTableName + " ( " + aSqlIter->second.toString() + + ") VALUES ( " + aParameter[aSqlIter->first].toString() + " )"); OUStringBuffer& rCondition = aKeyConditions[aSqlIter->first]; if ( !rCondition.isEmpty() ) diff --git a/dbaccess/source/core/api/View.cxx b/dbaccess/source/core/api/View.cxx index b30f1c865f19..41e4800c69c9 100644 --- a/dbaccess/source/core/api/View.cxx +++ b/dbaccess/source/core/api/View.cxx @@ -56,8 +56,7 @@ namespace dbaccess try { Reference<XMultiServiceFactory> xFac(_rxConnection,UNO_QUERY_THROW); - static const char s_sViewAccess[] = "ViewAccessServiceName"; - m_xViewAccess.set(xFac->createInstance(lcl_getServiceNameForSetting(_rxConnection,s_sViewAccess)),UNO_QUERY); + m_xViewAccess.set(xFac->createInstance(lcl_getServiceNameForSetting(_rxConnection,"ViewAccessServiceName")),UNO_QUERY); } catch(const Exception& ) { diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx index 543091169970..51bebd79802c 100644 --- a/dbaccess/source/core/dataaccess/documentcontainer.cxx +++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx @@ -218,9 +218,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments bool bNew = sPersistentName.isEmpty(); if ( bNew ) { - static const char sBaseName[] = "Obj"; - - sPersistentName = sBaseName + OUString::number(rDefinitions.size() + 1); + sPersistentName = "Obj" + OUString::number(rDefinitions.size() + 1); Reference<XNameAccess> xElements(getContainerStorage(),UNO_QUERY); if ( xElements.is() ) sPersistentName = ::dbtools::createUniqueName(xElements,sPersistentName); diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index 0dbfdaf724c2..a0cdc67e12bd 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -1351,9 +1351,8 @@ void ODocumentDefinition::saveAs() try { Reference< XStorage> xStorage = getContainerStorage(); - static const char sBaseName[] = "Obj"; - OUString sPersistentName = ::dbtools::createUniqueName(xStorage,sBaseName); + OUString sPersistentName = ::dbtools::createUniqueName(xStorage,"Obj"); xStorage->copyElementTo(m_pImpl->m_aProps.sPersistentName,xStorage,sPersistentName); OUString sOldName = m_pImpl->m_aProps.aTitle; diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx index 87b16061df8c..0414b77e2219 100644 --- a/dbaccess/source/core/misc/dsntypes.cxx +++ b/dbaccess/source/core/misc/dsntypes.cxx @@ -292,8 +292,7 @@ bool ODsnTypeCollection::isEmbeddedDatabase( const OUString& _sURL ) OUString ODsnTypeCollection::getEmbeddedDatabase() const { OUString sEmbeddedDatabaseURL; - static const char s_sNodeName[] = "org.openoffice.Office.DataAccess"; ///Installed - const ::utl::OConfigurationTreeRoot aInstalled = ::utl::OConfigurationTreeRoot::createWithComponentContext(m_xContext, s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY); + const ::utl::OConfigurationTreeRoot aInstalled = ::utl::OConfigurationTreeRoot::createWithComponentContext(m_xContext, "org.openoffice.Office.DataAccess", -1, ::utl::OConfigurationTreeRoot::CM_READONLY); if ( aInstalled.isValid() ) { if ( aInstalled.hasByName("EmbeddedDatabases/DefaultEmbeddedDatabase/Value") ) diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index ad41b38aaa70..48bad58c95db 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -1146,8 +1146,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) ActivateAggregate( tpScale ); pScale->SetMax(::std::max<sal_Int32>(pFieldType->nMaximumScale,pFieldDescr->GetScale())); pScale->SetMin(pFieldType->nMinimumScale); - static const char s_sPRECISION[] = "PRECISION"; - pScale->SetSpecialReadOnly(pFieldType->aCreateParams.isEmpty() || pFieldType->aCreateParams == s_sPRECISION); + pScale->SetSpecialReadOnly(pFieldType->aCreateParams.isEmpty() || pFieldType->aCreateParams == "PRECISION"); } else DeactivateAggregate( tpScale ); diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index d2758b0d51ac..d094ae91da98 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -37,12 +37,6 @@ #include <connectivity/dbtools.hxx> #include <osl/diagnose.h> -const char INDEX_NEW_CMD[] = ".index:createNew"; -const char INDEX_DROP_CMD[] = ".index:dropCurrent"; -const char INDEX_RENAME_CMD[] = ".index:renameCurrent"; -const char INDEX_SAVE_CMD[] = ".index:saveCurrent"; -const char INDEX_RESET_CMD[] = ".index:resetCurrent"; - namespace dbaui { @@ -175,11 +169,11 @@ namespace dbaui { get(m_pActions, "ACTIONS"); - mnNewCmdId = m_pActions->GetItemId(INDEX_NEW_CMD); - mnDropCmdId = m_pActions->GetItemId(INDEX_DROP_CMD); - mnRenameCmdId = m_pActions->GetItemId(INDEX_RENAME_CMD); - mnSaveCmdId = m_pActions->GetItemId(INDEX_SAVE_CMD); - mnResetCmdId = m_pActions->GetItemId(INDEX_RESET_CMD); + mnNewCmdId = m_pActions->GetItemId(".index:createNew"); + mnDropCmdId = m_pActions->GetItemId(".index:dropCurrent"); + mnRenameCmdId = m_pActions->GetItemId(".index:renameCurrent"); + mnSaveCmdId = m_pActions->GetItemId(".index:saveCurrent"); + mnResetCmdId = m_pActions->GetItemId(".index:resetCurrent"); maScNewCmdImg = m_pActions->GetItemImage(mnNewCmdId); maScDropCmdImg = m_pActions->GetItemImage(mnDropCmdId); diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index 710c5329ec56..acfc9376d32a 100644 --- a/dbaccess/source/ui/dlg/queryfilter.cxx +++ b/dbaccess/source/ui/dlg/queryfilter.cxx @@ -348,8 +348,7 @@ bool DlgFilterCrit::getCondition(const ListBox& _rField,const ListBox& _rComp,co _rFilter.Name = ::dbtools::quoteName(aQuote,_rFilter.Name); if ( !sTableName.isEmpty() ) { - static const char sSep[] = "."; - sTableName += sSep; + sTableName += "."; sTableName += _rFilter.Name; _rFilter.Name = sTableName; } diff --git a/dbaccess/source/ui/dlg/queryorder.cxx b/dbaccess/source/ui/dlg/queryorder.cxx index b4952833a769..5e3c1205a07c 100644 --- a/dbaccess/source/ui/dlg/queryorder.cxx +++ b/dbaccess/source/ui/dlg/queryorder.cxx @@ -216,8 +216,6 @@ OUString DlgOrderCrit::GetOrderList( ) const { Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData(); OUString sQuote = xMetaData.is() ? xMetaData->getIdentifierQuoteString() : OUString(); - static const char sDESC[] = " DESC "; - static const char sASC[] = " ASC "; Reference< XNameAccess> xColumns = Reference< XColumnsSupplier >(m_xQueryComposer,UNO_QUERY)->getColumns(); @@ -232,9 +230,9 @@ OUString DlgOrderCrit::GetOrderList( ) const OUString sName = m_aColumnList[i]->GetSelectEntry(); sOrder += ::dbtools::quoteName(sQuote,sName); if(m_aValueList[i]->GetSelectEntryPos()) - sOrder += sDESC; + sOrder += " DESC "; else - sOrder += sASC; + sOrder += " ASC "; } } return sOrder; diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index 7886c4483a81..365716964d6c 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -440,7 +440,6 @@ namespace dbaui Sequence< OUString > OTableSubscriptionPage::collectDetailedSelection() const { Sequence< OUString > aTableFilter; - static const char sDot[] = "."; static const char sWildcard[] = "%"; OUString sComposedName; @@ -494,7 +493,7 @@ namespace dbaui } } bSchemaWildcard = OTableTreeListBox::isWildcardChecked(pSchema); - sComposedName += m_pTablesList->GetEntryText( pSchema ) + sDot; + sComposedName += m_pTablesList->GetEntryText( pSchema ) + "."; } if (bSchemaWildcard) diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index cb7d8873356c..ba5e4b083079 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -74,11 +74,6 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::awt; using namespace ::com::sun::star::util; -const static char sMyBegComment[] = "<!-- "; -const static char sMyEndComment[] = " -->"; -const static char sFontFamily[] = "font-family: "; -const static char sFontSize[] = "font-size: "; - #define SBA_FORMAT_SELECTION_COUNT 4 #define CELL_X 1437 @@ -410,8 +405,6 @@ bool ORTFImportExport::Write() m_pStream->WriteCharPtr( ";\\red255\\green255\\blue255;\\red192\\green192\\blue192;}" ) .WriteCharPtr( SAL_NEWLINE_STRING ); - static char const aTRRH[] = "\\trrh-270\\pard\\intbl"; - static char const aFS[] = "\\fs20\\f0\\cf0\\cb2"; static char const aCell1[] = "\\clbrdrl\\brdrs\\brdrcf0\\clbrdrt\\brdrs\\brdrcf0\\clbrdrb\\brdrs\\brdrcf0\\clbrdrr\\brdrs\\brdrcf0\\clshdng10000\\clcfpat2\\cellx"; m_pStream->WriteCharPtr( OOO_STRING_SVTOOLS_RTF_TROWD ).WriteCharPtr( OOO_STRING_SVTOOLS_RTF_TRGAPH ); @@ -442,7 +435,7 @@ bool ORTFImportExport::Write() // column description m_pStream->WriteChar( '{' ).WriteCharPtr( SAL_NEWLINE_STRING ); - m_pStream->WriteCharPtr( aTRRH ); + m_pStream->WriteCharPtr( "\\trrh-270\\pard\\intbl" ); std::unique_ptr<OString[]> pHorzChar(new OString[nCount]); @@ -481,7 +474,7 @@ bool ORTFImportExport::Write() if ( bUnderline ) m_pStream->WriteCharPtr( OOO_STRING_SVTOOLS_RTF_UL ); if ( bStrikeout ) m_pStream->WriteCharPtr( OOO_STRING_SVTOOLS_RTF_STRIKE ); - m_pStream->WriteCharPtr( aFS ); + m_pStream->WriteCharPtr( "\\fs20\\f0\\cf0\\cb2" ); m_pStream->WriteChar( ' ' ); RTFOutFuncs::Out_String(*m_pStream,sColumnName,eDestEnc); @@ -546,7 +539,6 @@ void ORTFImportExport::appendRow(OString* pHorzChar,sal_Int32 _nColumnCount,sal_ m_pStream->WriteCharPtr( SAL_NEWLINE_STRING ); static char const aCell2[] = "\\clbrdrl\\brdrs\\brdrcf2\\clbrdrt\\brdrs\\brdrcf2\\clbrdrb\\brdrs\\brdrcf2\\clbrdrr\\brdrs\\brdrcf2\\clshdng10000\\clcfpat1\\cellx"; - static char const aTRRH[] = "\\trrh-270\\pard\\intbl"; for ( sal_Int32 i=1; i<=_nColumnCount; ++i ) { @@ -562,7 +554,7 @@ void ORTFImportExport::appendRow(OString* pHorzChar,sal_Int32 _nColumnCount,sal_ Reference< XRowSet > xRowSet(m_xRow,UNO_QUERY); m_pStream->WriteChar( '{' ); - m_pStream->WriteCharPtr( aTRRH ); + m_pStream->WriteCharPtr( "\\trrh-270\\pard\\intbl" ); for ( sal_Int32 i=1; i <= _nColumnCount; ++i ) { m_pStream->WriteCharPtr( SAL_NEWLINE_STRING ); @@ -711,15 +703,15 @@ void OHTMLImportExport::WriteBody() IncIndent(1); m_pStream->WriteCharPtr( "<" ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_style ).WriteCharPtr( " " ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_O_type ).WriteCharPtr( "=\"text/css\">" ); - m_pStream->WriteCharPtr( sMyBegComment ); OUT_LF(); - m_pStream->WriteCharPtr( OOO_STRING_SVTOOLS_HTML_body ).WriteCharPtr( " { " ).WriteCharPtr( sFontFamily ).WriteChar( '"' ).WriteCharPtr( OUStringToOString(m_aFont.Name, osl_getThreadTextEncoding()).getStr() ).WriteChar( '\"' ); + m_pStream->WriteCharPtr( "<!-- " ); OUT_LF(); + m_pStream->WriteCharPtr( OOO_STRING_SVTOOLS_HTML_body ).WriteCharPtr( " { " ).WriteCharPtr( "font-family: " ).WriteChar( '"' ).WriteCharPtr( OUStringToOString(m_aFont.Name, osl_getThreadTextEncoding()).getStr() ).WriteChar( '\"' ); // TODO : think about the encoding of the font name - m_pStream->WriteCharPtr( "; " ).WriteCharPtr( sFontSize ); + m_pStream->WriteCharPtr( "; " ).WriteCharPtr( "font-size: " ); m_pStream->WriteInt32AsString(m_aFont.Height); m_pStream->WriteChar( '}' ); OUT_LF(); - m_pStream->WriteCharPtr( sMyEndComment ); + m_pStream->WriteCharPtr( " -->" ); IncIndent(-1); OUT_LF(); TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_style ); OUT_LF(); diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 35ba9385d185..f416675c298e 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -436,8 +436,6 @@ void fillTypeInfo( const Reference< css::sdbc::XConnection>& _rxConnection, // Information for a single SQL type if(xRs.is()) { - static const char aB1[] = " [ "; - static const char aB2[] = " ]"; Reference<XResultSetMetaData> xResultSetMetaData = Reference<XResultSetMetaDataSupplier>(xRs,UNO_QUERY)->getMetaData(); ::connectivity::ORowSetValue aValue; ::std::vector<sal_Int32> aTypes; @@ -620,11 +618,11 @@ void fillTypeInfo( const Reference< css::sdbc::XConnection>& _rxConnection, if ( !aName.isEmpty() ) { pInfo->aUIName = aName; - pInfo->aUIName += aB1; + pInfo->aUIName += " [ "; } pInfo->aUIName += pInfo->aTypeName; if ( !aName.isEmpty() ) - pInfo->aUIName += aB2; + pInfo->aUIName += " ]"; // Now that we have the type info, save it in the multimap _rTypeInfoMap.insert(OTypeInfoMap::value_type(pInfo->nType,pInfo)); } diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx index b45dbd4df956..96e70108a69c 100644 --- a/dbaccess/source/ui/misc/indexcollection.cxx +++ b/dbaccess/source/ui/misc/indexcollection.cxx @@ -142,11 +142,9 @@ namespace dbaui } // set the properties - static const char s_sUniquePropertyName[] = "IsUnique"; - static const char s_sSortPropertyName[] = "IsAscending"; static const char s_sNamePropertyName[] = "Name"; // the index' own props - xIndexDescriptor->setPropertyValue(s_sUniquePropertyName, css::uno::makeAny(_rPos->bUnique)); + xIndexDescriptor->setPropertyValue("IsUnique", css::uno::makeAny(_rPos->bUnique)); xIndexDescriptor->setPropertyValue(s_sNamePropertyName, makeAny(_rPos->sName)); // the fields @@ -161,7 +159,7 @@ namespace dbaui OSL_ENSURE(xColDescriptor.is(), "OIndexCollection::commitNewIndex: invalid column descriptor!"); if (xColDescriptor.is()) { - xColDescriptor->setPropertyValue(s_sSortPropertyName, css::uno::makeAny(aFieldLoop->bSortAscending)); + xColDescriptor->setPropertyValue("IsAscending", css::uno::makeAny(aFieldLoop->bSortAscending)); xColDescriptor->setPropertyValue(s_sNamePropertyName, makeAny(OUString(aFieldLoop->sFieldName))); xAppendCols->appendByDescriptor(xColDescriptor); } @@ -244,14 +242,9 @@ namespace dbaui void OIndexCollection::implFillIndexInfo(OIndex& _rIndex, const Reference< XPropertySet >& _rxDescriptor) { - static const char s_sPrimaryIndexPropertyName[] = "IsPrimaryKeyIndex"; - static const char s_sUniquePropertyName[] = "IsUnique"; - static const char s_sSortPropertyName[] = "IsAscending"; - static const char s_sCatalogPropertyName[] = "Catalog"; - - _rIndex.bPrimaryKey = ::cppu::any2bool(_rxDescriptor->getPropertyValue(s_sPrimaryIndexPropertyName)); - _rIndex.bUnique = ::cppu::any2bool(_rxDescriptor->getPropertyValue(s_sUniquePropertyName)); - _rxDescriptor->getPropertyValue(s_sCatalogPropertyName) >>= _rIndex.sDescription; + _rIndex.bPrimaryKey = ::cppu::any2bool(_rxDescriptor->getPropertyValue("IsPrimaryKeyIndex")); + _rIndex.bUnique = ::cppu::any2bool(_rxDescriptor->getPropertyValue("IsUnique")); + _rxDescriptor->getPropertyValue("Catalog") >>= _rIndex.sDescription; // the columns Reference< XColumnsSupplier > xSuppCols(_rxDescriptor, UNO_QUERY); @@ -283,7 +276,7 @@ namespace dbaui // get the relevant properties aCopyTo->sFieldName = *pFieldNames; - aCopyTo->bSortAscending = ::cppu::any2bool(xIndexColumn->getPropertyValue(s_sSortPropertyName)); + aCopyTo->bSortAscending = ::cppu::any2bool(xIndexColumn->getPropertyValue("IsAscending")); } _rIndex.aFields.resize(aCopyTo - _rIndex.aFields.begin()); diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index e5186d843a83..09228c144435 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -630,9 +630,6 @@ namespace OJoinTableView::OTableWindowMap& rTabList = _pView->getTableView()->GetTabWinMap(); - static const char sFieldSeparator[] = ", "; - static const char s_sAs[] = " AS "; - aIter = _rFieldList.begin(); for(;aIter != aEnd;++aIter) { @@ -689,11 +686,11 @@ namespace pEntryField->isNumericOrAggreateFunction() || pEntryField->isOtherFunction())) { - aTmpStr.append(s_sAs); + aTmpStr.append(" AS "); aTmpStr.append(::dbtools::quoteName(aQuote, rFieldAlias)); } aFieldListStr.append(aTmpStr.makeStringAndClear()); - aFieldListStr.append(sFieldSeparator); + aFieldListStr.append(", "); } } if(!aFieldListStr.isEmpty()) diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 3fa97d7c37bb..6dac16d1492c 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -279,9 +279,8 @@ namespace */ void grabFocusFromLimitBox( OQueryController& _rController ) { - static const char sResourceURL[] = "private:resource/toolbar/designobjectbar"; Reference< XLayoutManager > xLayoutManager = OGenericUnoController::getLayoutManager( _rController.getFrame() ); - Reference< XUIElement > xUIElement = xLayoutManager->getElement(sResourceURL); + Reference< XUIElement > xUIElement = xLayoutManager->getElement("private:resource/toolbar/designobjectbar"); if (xUIElement.is()) { Reference< XWindow > xWindow(xUIElement->getRealInterface(), css::uno::UNO_QUERY); |