diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-05-18 21:14:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-19 15:40:40 +0200 |
commit | 2155e04d6343638ca9815d394cbc4f78c2b17c3a (patch) | |
tree | 0378142f6ce9edb63074291aed45527568e7b254 /svx/source/accessibility | |
parent | cee02e81cd3b55fb46eacf5db5713e8bf4363bcd (diff) |
make string translation loading more uniform
change various ResId classes that use conversion operator to OUString to
functions that return a OUString
drop various defines
drop unnecessary toString calls
Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92
Reviewed-on: https://gerrit.libreoffice.org/37817
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/accessibility')
6 files changed, 24 insertions, 24 deletions
diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx b/svx/source/accessibility/AccessibleFrameSelector.cxx index 986d8eb72297..91e97317d03b 100644 --- a/svx/source/accessibility/AccessibleFrameSelector.cxx +++ b/svx/source/accessibility/AccessibleFrameSelector.cxx @@ -59,8 +59,8 @@ AccFrameSelector::AccFrameSelector( FrameSelector& rFrameSel, FrameBorderType eB meBorder( eBorder ), maFocusListeners( maFocusMutex ), maPropertyListeners( maPropertyMutex ), - maNames( SVX_RES( RID_SVXSTR_FRMSEL_TEXTS ) ), - maDescriptions( SVX_RES(RID_SVXSTR_FRMSEL_DESCRIPTIONS) ), + maNames( ResId(RID_SVXSTR_FRMSEL_TEXTS, DIALOG_MGR()) ), + maDescriptions( ResId(RID_SVXSTR_FRMSEL_DESCRIPTIONS, DIALOG_MGR()) ), mnClientId( 0 ) { if ( mpFrameSel ) diff --git a/svx/source/accessibility/DescriptionGenerator.cxx b/svx/source/accessibility/DescriptionGenerator.cxx index f75757d4c78a..1f51bf425960 100644 --- a/svx/source/accessibility/DescriptionGenerator.cxx +++ b/svx/source/accessibility/DescriptionGenerator.cxx @@ -73,7 +73,7 @@ void DescriptionGenerator::Initialize (sal_Int32 nResourceId) OUString sPrefix; { SolarMutexGuard aGuard; - sPrefix = OUString (SVX_RESSTR (nResourceId)); + sPrefix = OUString (SvxResId (nResourceId)); } // Forward the call with the resulting string. @@ -90,10 +90,10 @@ void DescriptionGenerator::Initialize (const OUString& sPrefix) SolarMutexGuard aGuard; msDescription.append(' '); - msDescription.append(OUString (SVX_RESSTR(RID_SVXSTR_A11Y_WITH))); + msDescription.append(OUString (SvxResId(RID_SVXSTR_A11Y_WITH))); msDescription.append(' '); - msDescription.append(OUString (SVX_RESSTR (RID_SVXSTR_A11Y_STYLE))); + msDescription.append(OUString (SvxResId (RID_SVXSTR_A11Y_STYLE))); msDescription.append('='); } @@ -133,7 +133,7 @@ void DescriptionGenerator::AddProperty ( OUString sLocalizedName; { SolarMutexGuard aGuard; - sLocalizedName = SVX_RESSTR (nLocalizedNameId); + sLocalizedName = SvxResId (nLocalizedNameId); } AddProperty (sPropertyName, aType, sLocalizedName, nWhichId); } @@ -155,7 +155,7 @@ void DescriptionGenerator::AddProperty (const OUString& sPropertyName, SolarMutexGuard aGuard; msDescription.append(' '); - msDescription.append(OUString (SVX_RESSTR(RID_SVXSTR_A11Y_AND))); + msDescription.append(OUString (SvxResId(RID_SVXSTR_A11Y_AND))); msDescription.append(' '); mbIsFirstProperty = false; } @@ -325,19 +325,19 @@ void DescriptionGenerator::AddFillStyle (const OUString& sPropertyName, switch (aFillStyle) { case drawing::FillStyle_NONE: - sFillStyleName = SVX_RESSTR(RID_SVXSTR_A11Y_FILLSTYLE_NONE); + sFillStyleName = SvxResId(RID_SVXSTR_A11Y_FILLSTYLE_NONE); break; case drawing::FillStyle_SOLID: - sFillStyleName = SVX_RESSTR(RID_SVXSTR_A11Y_FILLSTYLE_SOLID); + sFillStyleName = SvxResId(RID_SVXSTR_A11Y_FILLSTYLE_SOLID); break; case drawing::FillStyle_GRADIENT: - sFillStyleName = SVX_RESSTR(RID_SVXSTR_A11Y_FILLSTYLE_GRADIENT); + sFillStyleName = SvxResId(RID_SVXSTR_A11Y_FILLSTYLE_GRADIENT); break; case drawing::FillStyle_HATCH: - sFillStyleName = SVX_RESSTR(RID_SVXSTR_A11Y_FILLSTYLE_HATCH); + sFillStyleName = SvxResId(RID_SVXSTR_A11Y_FILLSTYLE_HATCH); break; case drawing::FillStyle_BITMAP: - sFillStyleName = SVX_RESSTR(RID_SVXSTR_A11Y_FILLSTYLE_BITMAP); + sFillStyleName = SvxResId(RID_SVXSTR_A11Y_FILLSTYLE_BITMAP); break; default: break; diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx index 2d85c66c4d63..0f970ee347d2 100644 --- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx +++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx @@ -93,8 +93,8 @@ SvxGraphCtrlAccessibleContext::SvxGraphCtrlAccessibleContext( { ::SolarMutexGuard aSolarGuard; - msName = SVX_RESSTR( RID_SVXSTR_GRAPHCTRL_ACC_NAME ); - msDescription = SVX_RESSTR( RID_SVXSTR_GRAPHCTRL_ACC_DESCRIPTION ); + msName = SvxResId( RID_SVXSTR_GRAPHCTRL_ACC_NAME ); + msDescription = SvxResId( RID_SVXSTR_GRAPHCTRL_ACC_DESCRIPTION ); } maTreeInfo.SetSdrView( mpView ); diff --git a/svx/source/accessibility/ShapeTypeHandler.cxx b/svx/source/accessibility/ShapeTypeHandler.cxx index 0fbeac31e756..021592269fc8 100644 --- a/svx/source/accessibility/ShapeTypeHandler.cxx +++ b/svx/source/accessibility/ShapeTypeHandler.cxx @@ -318,7 +318,7 @@ OUString if (nResourceId != -1) { SolarMutexGuard aGuard; - sName = OUString (SVX_RESSTR((unsigned short)nResourceId)); + sName = OUString (SvxResId((unsigned short)nResourceId)); } return sName; diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx index 3292514fd62c..579cf6e6e1f5 100644 --- a/svx/source/accessibility/charmapacc.cxx +++ b/svx/source/accessibility/charmapacc.cxx @@ -176,13 +176,13 @@ sal_Int16 SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleRole( ) OUString SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleDescription( ) { OExternalLockGuard aGuard( this ); - return SVX_RESSTR( RID_SVXSTR_CHARACTER_SELECTION); + return SvxResId( RID_SVXSTR_CHARACTER_SELECTION); } OUString SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleName( ) { OExternalLockGuard aGuard( this ); - return SVX_RESSTR( RID_SVXSTR_CHAR_SEL_DESC); + return SvxResId( RID_SVXSTR_CHAR_SEL_DESC); } Reference< XAccessibleRelationSet > SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleRelationSet( ) @@ -370,7 +370,7 @@ sal_Int16 SAL_CALL SvxShowCharSetAcc::getAccessibleRole() OUString SAL_CALL SvxShowCharSetAcc::getAccessibleDescription() { OExternalLockGuard aGuard( this ); - return SVX_RESSTR( RID_SVXSTR_CHARACTER_SELECTION ); + return SvxResId( RID_SVXSTR_CHARACTER_SELECTION ); } @@ -378,7 +378,7 @@ OUString SAL_CALL SvxShowCharSetAcc::getAccessibleName() { OExternalLockGuard aGuard( this ); ensureAlive(); - return SVX_RESSTR( RID_SVXSTR_CHAR_SEL_DESC ); + return SvxResId( RID_SVXSTR_CHAR_SEL_DESC ); } @@ -637,7 +637,7 @@ OUString SAL_CALL SvxShowCharSetItemAcc::getAccessibleDescription() if( c < 256 ) snprintf( buf+6, 10, " (%" SAL_PRIuUINT32 ")", c ); - sDescription = SVX_RESSTR( RID_SVXSTR_CHARACTER_CODE ) + sDescription = SvxResId( RID_SVXSTR_CHARACTER_CODE ) + " " + OUString(buf, strlen(buf), RTL_TEXTENCODING_ASCII_US); diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx index 0b091932c1d1..6bdc0c05c3e2 100644 --- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx +++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx @@ -113,8 +113,8 @@ SvxRectCtlAccessibleContext::SvxRectCtlAccessibleContext( { { ::SolarMutexGuard aSolarGuard; - msName = SVX_RESSTR( RID_SVXSTR_RECTCTL_ACC_CORN_NAME ); - msDescription = SVX_RESSTR( RID_SVXSTR_RECTCTL_ACC_CORN_DESCR ); + msName = SvxResId( RID_SVXSTR_RECTCTL_ACC_CORN_NAME ); + msDescription = SvxResId( RID_SVXSTR_RECTCTL_ACC_CORN_DESCR ); } mpChildren = new SvxRectCtlChildAccessibleContext*[ MAX_NUM_OF_CHILDREN ]; @@ -226,8 +226,8 @@ Reference< XAccessible > SAL_CALL SvxRectCtlAccessibleContext::getAccessibleChil if( !xChild.is() ) { const ChildIndexToPointData* p = IndexToPoint( nIndex ); - OUString aName(SVX_RESSTR(p->nResIdName)); - OUString aDescr(SVX_RESSTR(p->nResIdDescr)); + OUString aName(SvxResId(p->nResIdName)); + OUString aDescr(SvxResId(p->nResIdDescr)); tools::Rectangle aFocusRect( mpRepr->CalculateFocusRectangle( p->ePoint ) ); |