connectivity/source/commontools/dbtools2.cxx | 10 ++-- extensions/source/abpilot/datasourcehandling.cxx | 6 +- reportdesign/source/ui/inc/GeometryHandler.hxx | 4 - reportdesign/source/ui/inspection/GeometryHandler.cxx | 40 ++++++++-------- svx/source/sidebar/nbdtmg.cxx | 29 ++++------- sw/source/core/edit/autofmt.cxx | 44 +++++++++--------- ucb/source/ucp/file/shell.cxx | 8 +-- 7 files changed, 67 insertions(+), 74 deletions(-)
New commits: commit 8578aabbc45ce3601fc0cfca89d8914c2e2632d3 Author: Tor Lillqvist <t...@collabora.com> Date: Thu Mar 13 10:32:14 2014 +0200 "prefix" and "postfix" are single words Change-Id: I32824c614d070cd4649e18da4a0b91b03bccfaba diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index f6077d25..2dd7676 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -88,7 +88,7 @@ OUString createStandardTypePart(const Reference< XPropertySet >& xColProp,const xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION)) >>= sAutoIncrementValue; // look if we have to use precisions sal_Bool bUseLiteral = sal_False; - OUString sPreFix,sPostFix,sCreateParams; + OUString sPrefix,sPostfix,sCreateParams; { Reference<XResultSet> xRes = xMetaData->getTypeInfo(); if(xRes.is()) @@ -98,8 +98,8 @@ OUString createStandardTypePart(const Reference< XPropertySet >& xColProp,const { OUString sTypeName2Cmp = xRow->getString(1); sal_Int32 nType = xRow->getShort(2); - sPreFix = xRow->getString (4); - sPostFix = xRow->getString (5); + sPrefix = xRow->getString (4); + sPostfix = xRow->getString (5); sCreateParams = xRow->getString(6); // first identical type will be used if typename is empty if ( sTypeName.isEmpty() && nType == nDataType ) @@ -157,9 +157,9 @@ OUString createStandardTypePart(const Reference< XPropertySet >& xColProp,const if ( !aDefault.isEmpty() ) { aSql.append(" DEFAULT "); - aSql.append(sPreFix); + aSql.append(sPrefix); aSql.append(aDefault); - aSql.append(sPostFix); + aSql.append(sPostfix); } // if ( aDefault.getLength() ) return aSql.makeStringAndClear(); diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx index 5c5cfe9..06f743a 100644 --- a/extensions/source/abpilot/datasourcehandling.cxx +++ b/extensions/source/abpilot/datasourcehandling.cxx @@ -215,11 +215,11 @@ namespace abp OUString sCheck( _rDataSourceName ); StringBag::const_iterator aPos = m_pImpl->aDataSourceNames.find( sCheck ); - sal_Int32 nPostFix = 1; - while ( ( m_pImpl->aDataSourceNames.end() != aPos ) && ( nPostFix < 65535 ) ) + sal_Int32 nPostfix = 1; + while ( ( m_pImpl->aDataSourceNames.end() != aPos ) && ( nPostfix < 65535 ) ) { // there already is a data source with this name sCheck = _rDataSourceName; - sCheck += OUString::number( nPostFix++ ); + sCheck += OUString::number( nPostfix++ ); aPos = m_pImpl->aDataSourceNames.find( sCheck ); } diff --git a/reportdesign/source/ui/inc/GeometryHandler.hxx b/reportdesign/source/ui/inc/GeometryHandler.hxx index 272d293..de0b379 100644 --- a/reportdesign/source/ui/inc/GeometryHandler.hxx +++ b/reportdesign/source/ui/inc/GeometryHandler.hxx @@ -177,10 +177,10 @@ namespace rptui /** get the functions supplier for the set scope, default is the surrounding group. * - * \param _rsNamePostFix the name post fix which canbe used when the scope as name part is needed + * \param _rsNamePostfix the name postfix which can be used when the scope as name part is needed * \return the function supplier */ - ::com::sun::star::uno::Reference< ::com::sun::star::report::XFunctionsSupplier> fillScope_throw(OUString& _rsNamePostFix); + ::com::sun::star::uno::Reference< ::com::sun::star::report::XFunctionsSupplier> fillScope_throw(OUString& _rsNamePostfix); /** checks if the given function is a default function we know. * diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index f6b6730..325b3a7 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -555,8 +555,8 @@ void SAL_CALL GeometryHandler::setPropertyValue(const OUString & PropertyName, c impl_isCounterFunction_throw(sFunction,m_sScope); else { - OUString sNamePostFix; - const uno::Reference< report::XFunctionsSupplier> xFunctionsSupplier = fillScope_throw(sNamePostFix); + OUString sNamePostfix; + const uno::Reference< report::XFunctionsSupplier> xFunctionsSupplier = fillScope_throw(sNamePostfix); isDefaultFunction(sFunction,sDataField,xFunctionsSupplier,true); } const sal_uInt32 nOldDataFieldType = m_nDataFieldType; @@ -598,8 +598,8 @@ void SAL_CALL GeometryHandler::setPropertyValue(const OUString & PropertyName, c { OSL_ENSURE(m_xFunction.is(),"Where is my function gone!"); - OUString sNamePostFix; - const uno::Reference< report::XFunctionsSupplier> xFunctionsSupplier = fillScope_throw(sNamePostFix); + OUString sNamePostfix; + const uno::Reference< report::XFunctionsSupplier> xFunctionsSupplier = fillScope_throw(sNamePostfix); OUString sQuotedFunctionName(lcl_getQuotedFunctionName(m_xFunction)); if ( isDefaultFunction(sQuotedFunctionName,sQuotedFunctionName,xFunctionsSupplier,true) ) @@ -1724,7 +1724,7 @@ void GeometryHandler::impl_fillScopeList_nothrow(::std::vector< OUString >& _out } } -uno::Reference< report::XFunctionsSupplier> GeometryHandler::fillScope_throw(OUString& _rsNamePostFix) +uno::Reference< report::XFunctionsSupplier> GeometryHandler::fillScope_throw(OUString& _rsNamePostfix) { uno::Reference< report::XFunctionsSupplier> xReturn; @@ -1737,8 +1737,8 @@ uno::Reference< report::XFunctionsSupplier> GeometryHandler::fillScope_throw(OUS if ( xGroup.is() ) { OUString sGroupName = ModuleRes(RID_STR_SCOPE_GROUP).toString(); - _rsNamePostFix = xGroup->getExpression(); - m_sScope = sGroupName.replaceFirst("%1",_rsNamePostFix); + _rsNamePostfix = xGroup->getExpression(); + m_sScope = sGroupName.replaceFirst("%1",_rsNamePostfix); xReturn = xGroup.get(); } else if ( xSection == xReportDefinition->getDetail() ) @@ -1749,21 +1749,21 @@ uno::Reference< report::XFunctionsSupplier> GeometryHandler::fillScope_throw(OUS { const uno::Reference< report::XGroup> xGroup2(xGroups->getByIndex(nCount - 1),uno::UNO_QUERY_THROW); OUString sGroupName = ModuleRes(RID_STR_SCOPE_GROUP); - _rsNamePostFix = xGroup2->getExpression(); - m_sScope = sGroupName.replaceFirst("%1",_rsNamePostFix); + _rsNamePostfix = xGroup2->getExpression(); + m_sScope = sGroupName.replaceFirst("%1",_rsNamePostfix); xReturn = xGroup2.get(); } } if ( m_sScope.isEmpty() ) { xReturn = xReportDefinition.get(); - _rsNamePostFix = m_sScope = xReportDefinition->getName(); + _rsNamePostfix = m_sScope = xReportDefinition->getName(); } } else if ( m_sScope == xReportDefinition->getName() ) { xReturn = xReportDefinition.get(); - _rsNamePostFix = m_sScope; + _rsNamePostfix = m_sScope; } else { @@ -1776,7 +1776,7 @@ uno::Reference< report::XFunctionsSupplier> GeometryHandler::fillScope_throw(OUS OUString sGroupName = ModuleRes(RID_STR_SCOPE_GROUP); if ( m_sScope == sGroupName.replaceFirst("%1",xGroup->getExpression()) ) { - _rsNamePostFix = xGroup->getExpression(); + _rsNamePostfix = xGroup->getExpression(); xReturn = xGroup.get(); break; } @@ -1923,8 +1923,8 @@ void GeometryHandler::createDefaultFunction(::osl::ResettableMutexGuard& _aGuard { try { - OUString sNamePostFix; - const uno::Reference< report::XFunctionsSupplier> xFunctionsSupplier = fillScope_throw(sNamePostFix); + OUString sNamePostfix; + const uno::Reference< report::XFunctionsSupplier> xFunctionsSupplier = fillScope_throw(sNamePostfix); ::std::vector< DefaultFunction >::const_iterator aIter = m_aDefaultFunctions.begin(); ::std::vector< DefaultFunction >::const_iterator aDeEnd = m_aDefaultFunctions.end(); @@ -1932,7 +1932,7 @@ void GeometryHandler::createDefaultFunction(::osl::ResettableMutexGuard& _aGuard { if ( aIter->m_sName == _sFunction ) { - const OUString sFunctionName( _sFunction + _sDataField + sNamePostFix); + const OUString sFunctionName( _sFunction + _sDataField + sNamePostfix); const OUString sQuotedFunctionName(lcl_getQuotedFunctionName(sFunctionName)); beans::PropertyChangeEvent aEvent; @@ -2120,8 +2120,8 @@ void GeometryHandler::impl_createFunction(const OUString& _sFunctionName,const O aInitialFormula.Value = sInitialFormula; m_xFunction->setInitialFormula( aInitialFormula ); } - OUString sNamePostFix; - const uno::Reference< report::XFunctionsSupplier> xFunctionsSupplier = fillScope_throw(sNamePostFix); + OUString sNamePostfix; + const uno::Reference< report::XFunctionsSupplier> xFunctionsSupplier = fillScope_throw(sNamePostfix); const uno::Reference< container::XIndexContainer> xFunctions(xFunctionsSupplier->getFunctions(),uno::UNO_QUERY_THROW); xFunctions->insertByIndex(xFunctions->getCount(),uno::makeAny(m_xFunction)); m_aFunctionNames.insert(TFunctions::value_type(sQuotedFunctionName,TFunctionPair(m_xFunction,xFunctionsSupplier))); @@ -2130,10 +2130,10 @@ void GeometryHandler::impl_createFunction(const OUString& _sFunctionName,const O void GeometryHandler::impl_setCounterFunction_throw() { - OUString sNamePostFix; - fillScope_throw(sNamePostFix); + OUString sNamePostfix; + fillScope_throw(sNamePostfix); OUString sFunctionName = m_aCounterFunction.m_sName; - sFunctionName += sNamePostFix; + sFunctionName += sNamePostfix; const OUString sQuotedFunctionName = lcl_getQuotedFunctionName(sFunctionName); OUString sScope; if ( !(!sFunctionName.isEmpty() && m_aFunctionNames.find(sQuotedFunctionName) != m_aFunctionNames.end() && impl_isCounterFunction_throw(sQuotedFunctionName,sScope)) ) diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 1b6458c..6b1a9b8 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -102,30 +102,23 @@ static const sal_Unicode aDefaultRTLBulletTypes[] = 0x2714 }; -static const sal_Char sNumberingType[] = "NumberingType"; -static const sal_Char sParentNumbering[] = "ParentNumbering"; -static const sal_Char sPrefix[] = "Prefix"; -static const sal_Char sSuffix[] = "Suffix"; -static const sal_Char sBulletChar[] = "BulletChar"; -static const sal_Char sBulletFontName[] = "BulletFontName"; - NumSettings_ImplPtr lcl_CreateNumberingSettingsPtr(const Sequence<PropertyValue>& rLevelProps) { const PropertyValue* pValues = rLevelProps.getConstArray(); NumSettings_ImplPtr pNew = new NumSettings_Impl; for(sal_Int32 j = 0; j < rLevelProps.getLength(); j++) { - if(pValues[j].Name == sNumberingType) + if(pValues[j].Name == "NumberingType") pValues[j].Value >>= pNew->nNumberType; - else if(pValues[j].Name == sPrefix) + else if(pValues[j].Name == "Prefix") pValues[j].Value >>= pNew->sPrefix; - else if(pValues[j].Name == sSuffix) + else if(pValues[j].Name == "Suffix") pValues[j].Value >>= pNew->sSuffix; - else if(pValues[j].Name == sParentNumbering) + else if(pValues[j].Name == "ParentNumbering") pValues[j].Value >>= pNew->nParentNumbering; - else if(pValues[j].Name == sBulletChar) + else if(pValues[j].Name == "BulletChar") pValues[j].Value >>= pNew->sBulletChar; - else if(pValues[j].Name == sBulletFontName) + else if(pValues[j].Name == "BulletFontName") pValues[j].Value >>= pNew->sBulletFont; } const sal_Unicode cLocalPrefix = pNew->sPrefix.getLength() ? pNew->sPrefix[0] : 0; @@ -1414,7 +1407,7 @@ sal_uInt16 NumberingTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 m SvxNumberFormat aFmt(aNum.GetLevel(nActLv)); //sal_Unicode cPrefix = rtl::OUString(aFmt.GetPrefix())[0]; //sal_Unicode cSuffix = rtl::OUString(aFmt.GetSuffix())[0]; - OUString sPreFix = aFmt.GetPrefix(); + OUString sPrefix = aFmt.GetPrefix(); OUString sLclSuffix = aFmt.GetSuffix(); sal_Int16 eNumType = aFmt.GetNumberingType(); @@ -1423,9 +1416,9 @@ sal_uInt16 NumberingTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 m { NumberSettings_ImplPtr _pSet = (*pNumberSettingsArr)[i].get(); sal_Int16 eNType = _pSet->pNumSetting->nNumberType; - OUString sLocalPreFix = _pSet->pNumSetting->sPrefix; + OUString sLocalPrefix = _pSet->pNumSetting->sPrefix; OUString sLocalSuffix = _pSet->pNumSetting->sSuffix; - if (sPreFix == sLocalPreFix && + if (sPrefix == sLocalPrefix && sLclSuffix == sLocalSuffix && eNumType == eNType ) { @@ -1641,7 +1634,7 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m sal_Int16 eNType = _pSet->nNumberType; SvxNumberFormat aFmt(aNum.GetLevel(iLevel)); - OUString sPreFix = aFmt.GetPrefix(); + OUString sPrefix = aFmt.GetPrefix(); OUString sLclSuffix = aFmt.GetSuffix(); sal_Int16 eNumType = aFmt.GetNumberingType(); if( eNumType == SVX_NUM_CHAR_SPECIAL) @@ -1681,7 +1674,7 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m } } else { - if (!(sPreFix == _pSet->sPrefix && + if (!(sPrefix == _pSet->sPrefix && sLclSuffix == _pSet->sSuffix && eNumType == eNType && _pSet->eLabelFollowedBy == aFmt.GetLabelFollowedBy() && diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 3fa6430..0cc8f85 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -174,7 +174,7 @@ class SwAutoFormat bool IsFirstCharCapital( const SwTxtNode& rNd ) const; sal_uInt16 GetDigitLevel( const SwTxtNode& rTxtNd, sal_Int32& rPos, - OUString* pPreFix = 0, OUString* pPostFix = 0, + OUString* pPrefix = 0, OUString* pPostfix = 0, OUString* pNumTypes = 0 ) const; /// get the FORMATED TextFrame SwTxtFrm* GetFrm( const SwTxtNode& rTxtNd ) const; @@ -721,7 +721,7 @@ bool SwAutoFormat::IsFirstCharCapital( const SwTxtNode& rNd ) const } sal_uInt16 SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, sal_Int32& rPos, - OUString* pPreFix, OUString* pPostFix, OUString* pNumTypes ) const + OUString* pPrefix, OUString* pPostfix, OUString* pNumTypes ) const { // check for 1.) / 1. / 1.1.1 / (1). / (1) / .... const OUString& rTxt = rNd.GetTxt(); @@ -747,8 +747,8 @@ sal_uInt16 SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, sal_Int32& rPos, if( eScan & CHG ) // not if it starts with a number { ++nDigitLvl; - if( pPostFix ) - *pPostFix += OUString((sal_Unicode)1); + if( pPostfix ) + *pPostfix += OUString((sal_Unicode)1); } if( pNumTypes ) @@ -823,8 +823,8 @@ sal_uInt16 SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, sal_Int32& rPos, if( eScan & CHG ) // not if it starts with a number { ++nDigitLvl; - if( pPostFix ) - *pPostFix += OUString((sal_Unicode)1); + if( pPostfix ) + *pPostfix += OUString((sal_Unicode)1); } if( pNumTypes ) @@ -925,16 +925,16 @@ CHECK_ROMAN_5: else if(cCurrentChar == ')'|| cCurrentChar == 0xFF08) nClosingParentheses++; // only if no numbers were read until here - if( pPreFix && !( eScan & ( NO_DELIM | CHG )) ) - *pPreFix += OUString(rTxt[nPos]); - else if( pPostFix ) - *pPostFix += OUString(rTxt[nPos]); + if( pPrefix && !( eScan & ( NO_DELIM | CHG )) ) + *pPrefix += OUString(rTxt[nPos]); + else if( pPostfix ) + *pPostfix += OUString(rTxt[nPos]); if( NO_DELIM & eScan ) { eScan |= CHG; - if( pPreFix ) - *pPreFix += OUString((sal_Unicode)1) + if( pPrefix ) + *pPrefix += OUString((sal_Unicode)1) + OUString::number( nStart ); } eScan &= ~NO_DELIM; // remove Delim @@ -951,8 +951,8 @@ CHECK_ROMAN_5: (nOpeningParentheses > nClosingParentheses)) return USHRT_MAX; - if( (NO_DELIM & eScan) && pPreFix ) // do not forget the last one - *pPreFix += OUString((sal_Unicode)1) + OUString::number( nStart ); + if( (NO_DELIM & eScan) && pPrefix ) // do not forget the last one + *pPrefix += OUString((sal_Unicode)1) + OUString::number( nStart ); rPos = nPos; return nDigitLvl; // 0 .. 9 (MAXLEVEL - 1) @@ -1471,9 +1471,9 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel ) //JP 21.11.97: The NumLevel is either the DigitLevel or, if the latter is not existent or 0, // it is determined by the indentation level. - OUString aPostFix, aPreFix, aNumTypes; + OUString aPostfix, aPrefix, aNumTypes; if( USHRT_MAX != ( nDigitLevel = GetDigitLevel( *m_pCurTxtNd, nTxtStt, - &aPreFix, &aPostFix, &aNumTypes )) ) + &aPrefix, &aPostfix, &aNumTypes )) ) { bChgEnum = true; @@ -1494,10 +1494,10 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel ) if( !nDigitLevel ) { SwNumFmt aFmt( aRule.Get( nLvl ) ); - aFmt.SetStart( static_cast<sal_uInt16>(aPreFix.getToken( 1, + aFmt.SetStart( static_cast<sal_uInt16>(aPrefix.getToken( 1, (sal_Unicode)1 ).toInt32())); - aFmt.SetPrefix( aPreFix.getToken( 0, (sal_Unicode)1 )); - aFmt.SetSuffix( aPostFix.getToken( 0, (sal_Unicode)1 )); + aFmt.SetPrefix( aPrefix.getToken( 0, (sal_Unicode)1 )); + aFmt.SetSuffix( aPostfix.getToken( 0, (sal_Unicode)1 )); aFmt.SetIncludeUpperLevels( 0 ); if( !aFmt.GetCharFmt() ) @@ -1518,11 +1518,11 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel ) { SwNumFmt aFmt( aRule.Get( n ) ); - aFmt.SetStart( static_cast<sal_uInt16>(aPreFix.getToken( n+1, + aFmt.SetStart( static_cast<sal_uInt16>(aPrefix.getToken( n+1, (sal_Unicode)1 ).toInt32() )); if( !n ) - aFmt.SetPrefix( aPreFix.getToken( n, (sal_Unicode)1 )); - aFmt.SetSuffix( aPostFix.getToken( n, (sal_Unicode)1 )); + aFmt.SetPrefix( aPrefix.getToken( n, (sal_Unicode)1 )); + aFmt.SetSuffix( aPostfix.getToken( n, (sal_Unicode)1 )); aFmt.SetIncludeUpperLevels( MAXLEVEL ); if( n < aNumTypes.getLength() ) aFmt.SetNumberingType((aNumTypes[ n ] - '0')); diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx index 63fb388..ada695b 100644 --- a/ucb/source/ucp/file/shell.cxx +++ b/ucb/source/ucp/file/shell.cxx @@ -1194,9 +1194,9 @@ shell::move( sal_Int32 CommandId, { newDstUnqPath = dstUnqPath; - OUString aPostFix = "_" + OUString::number( ++nTry ); + OUString aPostfix = "_" + OUString::number( ++nTry ); - newDstUnqPath = newDstUnqPath.replaceAt( nPos, 0, aPostFix ); + newDstUnqPath = newDstUnqPath.replaceAt( nPos, 0, aPostfix ); nError = osl_File_move( srcUnqPath,newDstUnqPath,true ); } @@ -1420,9 +1420,9 @@ shell::copy( { newDstUnqPath = dstUnqPath; - OUString aPostFix = "_" + OUString::number( ++nTry ); + OUString aPostfix = "_" + OUString::number( ++nTry ); - newDstUnqPath = newDstUnqPath.replaceAt( nPos, 0, aPostFix ); + newDstUnqPath = newDstUnqPath.replaceAt( nPos, 0, aPostfix ); nError = copy_recursive( rslvdSrcUnqPath,newDstUnqPath,IsWhat,true ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits