diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-04-29 23:36:57 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-04-30 11:22:09 +0100 |
commit | 8a0685d49f679d6f98de2f357f1ec74590573852 (patch) | |
tree | 97eb05105a45186049c1c3dad20233c29747ed9c /svtools | |
parent | SVG: text elements and graphic elements should not share style ids (diff) | |
download | core-8a0685d49f679d6f98de2f357f1ec74590573852.tar.gz core-8a0685d49f679d6f98de2f357f1ec74590573852.zip |
make ResId::toString a non-static member
Change-Id: I756c0a19bea7b1cc0e290d9f382a04d655819bfb
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/inc/svtools/svtresid.hxx | 2 | ||||
-rw-r--r-- | svtools/source/contnr/fileview.cxx | 24 | ||||
-rw-r--r-- | svtools/source/contnr/svtabbx.cxx | 4 | ||||
-rw-r--r-- | svtools/source/contnr/templwin.cxx | 16 | ||||
-rw-r--r-- | svtools/source/control/calendar.cxx | 8 | ||||
-rw-r--r-- | svtools/source/control/collatorres.cxx | 3 | ||||
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/ctrltool.cxx | 38 | ||||
-rw-r--r-- | svtools/source/control/filectrl.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/indexentryres.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/tabbar.cxx | 8 | ||||
-rw-r--r-- | svtools/source/dialogs/addresstemplate.cxx | 68 | ||||
-rw-r--r-- | svtools/source/dialogs/filedlg2.cxx | 16 | ||||
-rw-r--r-- | svtools/source/dialogs/insdlg.cxx | 7 | ||||
-rw-r--r-- | svtools/source/dialogs/prnsetup.cxx | 6 | ||||
-rw-r--r-- | svtools/source/dialogs/roadmapwizard.cxx | 2 | ||||
-rw-r--r-- | svtools/source/dialogs/wizardmachine.cxx | 6 |
17 files changed, 100 insertions, 114 deletions
diff --git a/svtools/inc/svtools/svtresid.hxx b/svtools/inc/svtools/svtresid.hxx index f30ed5605e98..3b83a785dfc1 100644 --- a/svtools/inc/svtools/svtresid.hxx +++ b/svtools/inc/svtools/svtresid.hxx @@ -40,6 +40,8 @@ public: static void DeleteResMgr(); }; +#define SVT_RESSTR(i) SvtResId(i).toString() + #endif // _SVTOOLS_SVTRESID_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index a78adb3ff4fa..11f80bf73bc0 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -674,25 +674,25 @@ OUString CreateExactSizeText( sal_Int64 nSize ) if ( nSize < 10000 ) { - aUnitStr += String( SvtResId( STR_SVT_BYTES ) ); + aUnitStr += SVT_RESSTR(STR_SVT_BYTES ); nDec = 0; } else if ( nSize < nMega ) { fSize /= 1024; - aUnitStr += String( SvtResId( STR_SVT_KB ) ); + aUnitStr += SVT_RESSTR(STR_SVT_KB); nDec = 1; } else if ( nSize < nGiga ) { fSize /= nMega; - aUnitStr += String( SvtResId( STR_SVT_MB ) ); + aUnitStr += SVT_RESSTR(STR_SVT_MB); nDec = 2; } else { fSize /= nGiga; - aUnitStr += String( SvtResId( STR_SVT_GB ) ); + aUnitStr += SVT_RESSTR(STR_SVT_GB); nDec = 3; } @@ -716,9 +716,9 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* pParentWin, mpHeaderBar ( NULL ), mpParent ( pParent ), - msAccessibleDescText( SvtResId( STR_SVT_ACC_DESC_FILEVIEW ) ), - msFolder ( SvtResId( STR_SVT_ACC_DESC_FOLDER ) ), - msFile ( SvtResId( STR_SVT_ACC_DESC_FILE ) ), + msAccessibleDescText( SVT_RESSTR(STR_SVT_ACC_DESC_FILEVIEW) ), + msFolder ( SVT_RESSTR(STR_SVT_ACC_DESC_FOLDER) ), + msFile ( SVT_RESSTR(STR_SVT_ACC_DESC_FILE) ), mnSearchIndex ( 0 ), mbResizeDisabled ( sal_False ), mbAutoResize ( sal_False ), @@ -736,7 +736,7 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* pParentWin, long pTabs[] = { 2, 20, 600 }; SetTabs(&pTabs[0], MAP_PIXEL); - mpHeaderBar->InsertItem(COLUMN_TITLE, String(SvtResId(STR_SVT_FILEVIEW_COLUMN_TITLE)), 600, nBits | HIB_UPARROW); + mpHeaderBar->InsertItem(COLUMN_TITLE, SVT_RESSTR(STR_SVT_FILEVIEW_COLUMN_TITLE), 600, nBits | HIB_UPARROW); } else { @@ -744,10 +744,10 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* pParentWin, SetTabs(&pTabs[0], MAP_PIXEL); SetTabJustify(2, AdjustRight); // column "Size" - mpHeaderBar->InsertItem(COLUMN_TITLE, String(SvtResId(STR_SVT_FILEVIEW_COLUMN_TITLE)), 180, nBits | HIB_UPARROW); - mpHeaderBar->InsertItem(COLUMN_TYPE, String(SvtResId(STR_SVT_FILEVIEW_COLUMN_TYPE)), 140, nBits); - mpHeaderBar->InsertItem(COLUMN_SIZE, String(SvtResId(STR_SVT_FILEVIEW_COLUMN_SIZE)), 80, nBits); - mpHeaderBar->InsertItem(COLUMN_DATE, String(SvtResId(STR_SVT_FILEVIEW_COLUMN_DATE)), 500, nBits); + mpHeaderBar->InsertItem(COLUMN_TITLE, SVT_RESSTR(STR_SVT_FILEVIEW_COLUMN_TITLE), 180, nBits | HIB_UPARROW); + mpHeaderBar->InsertItem(COLUMN_TYPE, SVT_RESSTR(STR_SVT_FILEVIEW_COLUMN_TYPE), 140, nBits); + mpHeaderBar->InsertItem(COLUMN_SIZE, SVT_RESSTR(STR_SVT_FILEVIEW_COLUMN_SIZE), 80, nBits); + mpHeaderBar->InsertItem(COLUMN_DATE, SVT_RESSTR(STR_SVT_FILEVIEW_COLUMN_DATE), 500, nBits); } Size aHeadSize = mpHeaderBar->GetSizePixel(); diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx index 02597f48cfa7..497bd20cdb79 100644 --- a/svtools/source/contnr/svtabbx.cxx +++ b/svtools/source/contnr/svtabbx.cxx @@ -468,7 +468,7 @@ String SvTabListBox::GetTabEntryText( sal_uLong nPos, sal_uInt16 nCol ) const { String sRet = static_cast<SvLBoxString*>( pStr )->GetText(); if ( sRet.Len() == 0 ) - sRet = String( SvtResId( STR_SVT_ACC_EMPTY_FIELD ) ); + sRet = SVT_RESSTR( STR_SVT_ACC_EMPTY_FIELD ); return sRet; } --nCol; @@ -1121,7 +1121,7 @@ sal_Bool SvHeaderTabListBox::ConvertPointToColumnHeader( sal_uInt16&, const Poin sal_Int32 nRow = _nPos / nColumnCount; sal_uInt16 nColumn = static_cast< sal_uInt16 >( _nPos % nColumnCount ); - String aText( SvtResId( STR_SVT_ACC_DESC_TABLISTBOX ) ); + String aText( SVT_RESSTR(STR_SVT_ACC_DESC_TABLISTBOX) ); aText.SearchAndReplace( sVar1, String::CreateFromInt32( nRow ) ); String sColHeader = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( nColumn ) ); if ( sColHeader.Len() == 0 ) diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx index a49770e9f38a..b1b85c2677ab 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -192,11 +192,11 @@ SvtIconWindow_Impl::SvtIconWindow_Impl( Window* pParent ) : // "New Document" Image aImage( SvtResId( IMG_SVT_NEWDOC ) ); nMaxTextLength = aImage.GetSizePixel().Width(); - String aEntryStr = String( SvtResId( STR_SVT_NEWDOC ) ); + String aEntryStr = SVT_RESSTR(STR_SVT_NEWDOC); SvxIconChoiceCtrlEntry* pEntry = aIconCtrl.InsertEntry( aEntryStr, aImage, ICON_POS_NEWDOC ); pEntry->SetUserData( new String( aNewDocumentRootURL ) ); - pEntry->SetQuickHelpText( String( SvtResId( STR_SVT_NEWDOC_HELP ) ) ); + pEntry->SetQuickHelpText( SVT_RESSTR(STR_SVT_NEWDOC_HELP) ); DBG_ASSERT( !pEntry->GetBoundRect().IsEmpty(), "empty rectangle" ); long nTemp = pEntry->GetBoundRect().GetSize().Width(); if (nTemp > nMaxTextLength) @@ -205,11 +205,11 @@ SvtIconWindow_Impl::SvtIconWindow_Impl( Window* pParent ) : // "Templates" if( aTemplateRootURL.Len() > 0 ) { - aEntryStr = String( SvtResId( STR_SVT_TEMPLATES ) ); + aEntryStr = SVT_RESSTR(STR_SVT_TEMPLATES); pEntry = aIconCtrl.InsertEntry( aEntryStr, Image( SvtResId( IMG_SVT_TEMPLATES ) ), ICON_POS_TEMPLATES ); pEntry->SetUserData( new String( aTemplateRootURL ) ); - pEntry->SetQuickHelpText( String( SvtResId( STR_SVT_TEMPLATES_HELP ) ) ); + pEntry->SetQuickHelpText(SVT_RESSTR(STR_SVT_TEMPLATES_HELP)); DBG_ASSERT( !pEntry->GetBoundRect().IsEmpty(), "empty rectangle" ); nTemp = pEntry->GetBoundRect().GetSize().Width(); if (nTemp > nMaxTextLength) @@ -217,22 +217,22 @@ SvtIconWindow_Impl::SvtIconWindow_Impl( Window* pParent ) : } // "My Documents" - aEntryStr = String( SvtResId( STR_SVT_MYDOCS ) ); + aEntryStr = SVT_RESSTR(STR_SVT_MYDOCS); pEntry = aIconCtrl.InsertEntry( aEntryStr, Image( SvtResId( IMG_SVT_MYDOCS ) ), ICON_POS_MYDOCS ); pEntry->SetUserData( new String( aMyDocumentsRootURL ) ); - pEntry->SetQuickHelpText( String( SvtResId( STR_SVT_MYDOCS_HELP ) ) ); + pEntry->SetQuickHelpText( SVT_RESSTR(STR_SVT_MYDOCS_HELP) ); DBG_ASSERT( !pEntry->GetBoundRect().IsEmpty(), "empty rectangle" ); nTemp = pEntry->GetBoundRect().GetSize().Width(); if( nTemp > nMaxTextLength ) nMaxTextLength = nTemp; // "Samples" - aEntryStr = String( SvtResId( STR_SVT_SAMPLES ) ); + aEntryStr = SVT_RESSTR(STR_SVT_SAMPLES); pEntry = aIconCtrl.InsertEntry( aEntryStr, Image( SvtResId( IMG_SVT_SAMPLES ) ), ICON_POS_SAMPLES ); pEntry->SetUserData( new String( aSamplesFolderRootURL ) ); - pEntry->SetQuickHelpText( String( SvtResId( STR_SVT_SAMPLES_HELP ) ) ); + pEntry->SetQuickHelpText( SVT_RESSTR(STR_SVT_SAMPLES_HELP)); DBG_ASSERT( !pEntry->GetBoundRect().IsEmpty(), "empty rectangle" ); nTemp = pEntry->GetBoundRect().GetSize().Width(); if (nTemp > nMaxTextLength) diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index de24a6bf42fa..6da63862e6b4 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -228,8 +228,8 @@ void Calendar::ImplInit( WinBits nWinStyle ) ImplCalendarSelectDate( mpSelectTable, maCurDate, sal_True ); // Sonstige Strings erzeugen - maDayText = XubString( SvtResId( STR_SVT_CALENDAR_DAY ) ); - maWeekText = XubString( SvtResId( STR_SVT_CALENDAR_WEEK ) ); + maDayText = SVT_RESSTR(STR_SVT_CALENDAR_DAY); + maWeekText = SVT_RESSTR(STR_SVT_CALENDAR_WEEK); // Tagestexte anlegen for (sal_Int32 i = 0; i < 31; ++i) @@ -2276,7 +2276,7 @@ PushButton* ImplCFieldFloatWin::EnableTodayBtn( sal_Bool bEnable ) if ( !mpTodayBtn ) { mpTodayBtn = new PushButton( this, WB_NOPOINTERFOCUS ); - XubString aTodayText( SvtResId( STR_SVT_CALENDAR_TODAY ) ); + XubString aTodayText(SVT_RESSTR(STR_SVT_CALENDAR_TODAY)); mpTodayBtn->SetText( aTodayText ); Size aSize; aSize.Width() = mpTodayBtn->GetCtrlTextWidth( mpTodayBtn->GetText() ); @@ -2308,7 +2308,7 @@ PushButton* ImplCFieldFloatWin::EnableNoneBtn( sal_Bool bEnable ) if ( !mpNoneBtn ) { mpNoneBtn = new PushButton( this, WB_NOPOINTERFOCUS ); - XubString aNoneText( SvtResId( STR_SVT_CALENDAR_NONE ) ); + XubString aNoneText(SVT_RESSTR(STR_SVT_CALENDAR_NONE)); mpNoneBtn->SetText( aNoneText ); Size aSize; aSize.Width() = mpNoneBtn->GetCtrlTextWidth( mpNoneBtn->GetText() ); diff --git a/svtools/source/control/collatorres.cxx b/svtools/source/control/collatorres.cxx index 79388a7b9c9c..7c669c6c59cd 100644 --- a/svtools/source/control/collatorres.cxx +++ b/svtools/source/control/collatorres.cxx @@ -76,8 +76,7 @@ CollatorRessource::CollatorRessource() mp_Data = new CollatorRessourceData[COLLATOR_RESSOURCE_COUNT]; #define ASCSTR(str) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(str)) - #define RESSTR(rid) ResId::toString(SvtResId(rid)) - + #define RESSTR(rid) SvtResId(rid).toString() mp_Data[0] = CollatorRessourceData (ASCSTR("alphanumeric"), RESSTR(STR_SVT_COLLATE_ALPHANUMERIC)); mp_Data[1] = CollatorRessourceData (ASCSTR("charset"), RESSTR(STR_SVT_COLLATE_CHARSET)); diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index d58c534c9ade..9c5ddb9a9310 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -185,7 +185,7 @@ sal_uInt16 ColorListBox::InsertEntry( const Color& rColor, const XubString& rStr void ColorListBox::InsertAutomaticEntryColor(const Color &rColor) { // insert the "Automatic"-entry always on the first position - InsertEntry( rColor, SvtResId( STR_SVT_AUTOMATIC_COLOR ), 0 ); + InsertEntry( rColor, SVT_RESSTR(STR_SVT_AUTOMATIC_COLOR), 0 ); } // ----------------------------------------------------------------------- diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index b43a8a7b7e70..01459ad1f20a 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -355,14 +355,14 @@ FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2, sal_Bool bAll mpSizeAry = NULL; // Stylenamen festlegen - maLight = XubString( SvtResId( STR_SVT_STYLE_LIGHT ) ); - maLightItalic = XubString( SvtResId( STR_SVT_STYLE_LIGHT_ITALIC ) ); - maNormal = XubString( SvtResId( STR_SVT_STYLE_NORMAL ) ); - maNormalItalic = XubString( SvtResId( STR_SVT_STYLE_NORMAL_ITALIC ) ); - maBold = XubString( SvtResId( STR_SVT_STYLE_BOLD ) ); - maBoldItalic = XubString( SvtResId( STR_SVT_STYLE_BOLD_ITALIC ) ); - maBlack = XubString( SvtResId( STR_SVT_STYLE_BLACK ) ); - maBlackItalic = XubString( SvtResId( STR_SVT_STYLE_BLACK_ITALIC ) ); + maLight = SVT_RESSTR(STR_SVT_STYLE_LIGHT); + maLightItalic = SVT_RESSTR(STR_SVT_STYLE_LIGHT_ITALIC); + maNormal = SVT_RESSTR(STR_SVT_STYLE_NORMAL); + maNormalItalic = SVT_RESSTR(STR_SVT_STYLE_NORMAL_ITALIC); + maBold = SVT_RESSTR(STR_SVT_STYLE_BOLD); + maBoldItalic = SVT_RESSTR(STR_SVT_STYLE_BOLD_ITALIC); + maBlack = SVT_RESSTR(STR_SVT_STYLE_BLACK); + maBlackItalic = SVT_RESSTR(STR_SVT_STYLE_BLACK_ITALIC); ImplInsertFonts( pDevice, bAll, sal_True ); @@ -521,7 +521,7 @@ XubString FontList::GetFontMapText( const FontInfo& rInfo ) const if ( !pData ) { if ( !maMapNotAvailable.Len() ) - ((FontList*)this)->maMapNotAvailable = XubString( SvtResId( STR_SVT_FONTMAP_NOTAVAILABLE ) ); + ((FontList*)this)->maMapNotAvailable = SVT_RESSTR(STR_SVT_FONTMAP_NOTAVAILABLE); return maMapNotAvailable; } @@ -555,28 +555,16 @@ XubString FontList::GetFontMapText( const FontInfo& rInfo ) const else if ( !bNotSynthetic ) { if ( !maMapStyleNotAvailable.Len() ) - ((FontList*)this)->maMapStyleNotAvailable = XubString( SvtResId( STR_SVT_FONTMAP_STYLENOTAVAILABLE ) ); + ((FontList*)this)->maMapStyleNotAvailable = SVT_RESSTR(STR_SVT_FONTMAP_STYLENOTAVAILABLE); return maMapStyleNotAvailable; } } - /* Size not available not implemented yet - if ( !(nType & FONTLIST_FONTNAMETYPE_SCALABLE) ) - { - ... - { - if ( !maMapSizeNotAvailable.Len() ) - ((FontList*)this)->maMapSizeNotAvailable = XubString( SvtResId( STR_SVT_FONTMAP_SIZENOTAVAILABLE ) ); - return maMapSizeNotAvailable; - } - } - */ - // Only Printer-Font? if ( (nType & (FONTLIST_FONTNAMETYPE_PRINTER | FONTLIST_FONTNAMETYPE_SCREEN)) == FONTLIST_FONTNAMETYPE_PRINTER ) { if ( !maMapPrinterOnly.Len() ) - ((FontList*)this)->maMapPrinterOnly = XubString( SvtResId( STR_SVT_FONTMAP_PRINTERONLY ) ); + ((FontList*)this)->maMapPrinterOnly = SVT_RESSTR(STR_SVT_FONTMAP_PRINTERONLY); return maMapPrinterOnly; } // Only Screen-Font? @@ -584,13 +572,13 @@ XubString FontList::GetFontMapText( const FontInfo& rInfo ) const && rInfo.GetType() == TYPE_RASTER ) { if ( !maMapScreenOnly.Len() ) - ((FontList*)this)->maMapScreenOnly = XubString( SvtResId( STR_SVT_FONTMAP_SCREENONLY ) ); + ((FontList*)this)->maMapScreenOnly = SVT_RESSTR(STR_SVT_FONTMAP_SCREENONLY); return maMapScreenOnly; } else { if ( !maMapBoth.Len() ) - ((FontList*)this)->maMapBoth = XubString( SvtResId( STR_SVT_FONTMAP_BOTH ) ); + ((FontList*)this)->maMapBoth = SVT_RESSTR(STR_SVT_FONTMAP_BOTH); return maMapBoth; } } diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx index 235074441850..ddf8fdd54d7d 100644 --- a/svtools/source/control/filectrl.cxx +++ b/svtools/source/control/filectrl.cxx @@ -38,7 +38,7 @@ FileControl::FileControl( Window* pParent, WinBits nStyle, FileControlMode nFlag Window( pParent, nStyle|WB_DIALOGCONTROL ), maEdit( this, (nStyle&(~WB_BORDER))|WB_NOTABSTOP ), maButton( this, (nStyle&(~WB_BORDER))|WB_NOLIGHTBORDER|WB_NOPOINTERFOCUS|WB_NOTABSTOP ), - maButtonText( SvtResId( STR_FILECTRL_BUTTONTEXT ) ), + maButtonText( SVT_RESSTR(STR_FILECTRL_BUTTONTEXT) ), mnFlags( nFlags ), mnInternalFlags( FILECTRL_ORIGINALBUTTONTEXT ) { diff --git a/svtools/source/control/indexentryres.cxx b/svtools/source/control/indexentryres.cxx index 5a741122a9cd..3b0007ce304b 100644 --- a/svtools/source/control/indexentryres.cxx +++ b/svtools/source/control/indexentryres.cxx @@ -76,7 +76,7 @@ IndexEntryRessource::IndexEntryRessource() mp_Data = new IndexEntryRessourceData[INDEXENTRY_RESSOURCE_COUNT]; #define ASCSTR(str) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(str)) - #define RESSTR(rid) ResId::toString(SvtResId(rid)) + #define RESSTR(rid) SvtResId(rid).toString() mp_Data[STR_SVT_INDEXENTRY_ALPHANUMERIC - STR_SVT_INDEXENTRY_START] = IndexEntryRessourceData (ASCSTR("alphanumeric"), RESSTR(STR_SVT_INDEXENTRY_ALPHANUMERIC)); diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 0881063e9c3f..fb25b442eb1e 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -414,13 +414,13 @@ void TabBar::ImplInit( WinBits nWinStyle ) ImplInitControls(); if(mpFirstBtn) - mpFirstBtn->SetAccessibleName(String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVET0HOME))); + mpFirstBtn->SetAccessibleName(SVT_RESSTR(STR_TABBAR_PUSHBUTTON_MOVET0HOME)); if(mpPrevBtn) - mpPrevBtn->SetAccessibleName( String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVELEFT))); + mpPrevBtn->SetAccessibleName(SVT_RESSTR(STR_TABBAR_PUSHBUTTON_MOVELEFT)); if(mpNextBtn) - mpNextBtn->SetAccessibleName(String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVERIGHT))); + mpNextBtn->SetAccessibleName(SVT_RESSTR(STR_TABBAR_PUSHBUTTON_MOVERIGHT)); if(mpLastBtn) - mpLastBtn->SetAccessibleName( String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVETOEND))); + mpLastBtn->SetAccessibleName(SVT_RESSTR(STR_TABBAR_PUSHBUTTON_MOVETOEND)); SetSizePixel( Size( 100, CalcWindowSizePixel().Height() ) ); ImplInitSettings( sal_True, sal_True ); diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 09d43f90838f..e423b6a1c382 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -181,7 +181,7 @@ public: // first collect all known programmatic names StringBag aKnownNames; - rtl::OUString sLogicalFieldNames(ResId::toString(SvtResId(STR_LOGICAL_FIELD_NAMES))); + rtl::OUString sLogicalFieldNames(SVT_RESSTR(STR_LOGICAL_FIELD_NAMES)); sal_Int32 nIndex = 0; do { @@ -565,7 +565,7 @@ void AssignmentPersistentData::Commit() ,m_aOK (this, SvtResId(PB_OK))\ ,m_aCancel (this, SvtResId(PB_CANCEL))\ ,m_aHelp (this, SvtResId(PB_HELP))\ - ,m_sNoFieldSelection(SvtResId(STR_NO_FIELD_SELECTION))\ + ,m_sNoFieldSelection(SVT_RESSTR(STR_NO_FIELD_SELECTION))\ ,m_xORB(_rxORB) // ------------------------------------------------------------------- @@ -622,37 +622,37 @@ void AssignmentPersistentData::Commit() // should be adjustable with a rather small effort.) // initialize the strings for the field labels - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_FIRSTNAME )) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_LASTNAME )) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_COMPANY)) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_DEPARTMENT )) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_STREET )) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_ZIPCODE )) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_CITY )) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_STATE)) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_COUNTRY )) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_HOMETEL )) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_WORKTEL )) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_OFFICETEL)) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_MOBILE)) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_TELOTHER)) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_PAGER)) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_FAX )) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_EMAIL )) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_URL )) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_TITLE )) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_POSITION )) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_INITIALS )) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_ADDRFORM )) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_SALUTATION )) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_ID)) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_CALENDAR)) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_INVITE)) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_NOTE)) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_USER1)) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_USER2)) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_USER3)) ); - m_pImpl->aFieldLabels.push_back( String(SvtResId( STR_FIELD_USER4)) ); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_FIRSTNAME )); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_LASTNAME )); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_COMPANY)); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_DEPARTMENT )); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_STREET )); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_ZIPCODE )); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_CITY )); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_STATE)); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_COUNTRY )); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_HOMETEL )); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_WORKTEL )); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_OFFICETEL)); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_MOBILE)); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_TELOTHER)); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_PAGER)); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_FAX )); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_EMAIL )); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_URL )); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_TITLE )); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_POSITION )); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_INITIALS )); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_ADDRFORM )); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_SALUTATION )); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_ID)); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_CALENDAR)); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_INVITE)); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_NOTE)); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_USER1)); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_USER2)); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_USER3)); + m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_USER4)); // force a even number of known fields m_pImpl->bOddFieldNumber = (m_pImpl->aFieldLabels.size() % 2) != 0; @@ -691,7 +691,7 @@ void AssignmentPersistentData::Commit() implScrollFields(0, sal_False, sal_False); // the logical names - rtl::OUString sLogicalFieldNames(ResId::toString(SvtResId(STR_LOGICAL_FIELD_NAMES))); + rtl::OUString sLogicalFieldNames(SVT_RESSTR(STR_LOGICAL_FIELD_NAMES)); sal_Int32 nAdjustedTokenCount = comphelper::string::getTokenCount(sLogicalFieldNames, ';') + (m_pImpl->bOddFieldNumber ? 1 : 0); DBG_ASSERT(nAdjustedTokenCount == (sal_Int32)m_pImpl->aFieldLabels.size(), "AddressBookSourceDialog::AddressBookSourceDialog: inconsistence between logical and UI field names!"); diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx index 1d84fa441d6c..d16f65aebfc9 100644 --- a/svtools/source/dialogs/filedlg2.cxx +++ b/svtools/source/dialogs/filedlg2.cxx @@ -150,7 +150,7 @@ ImpPathDialog::~ImpPathDialog() void ImpPathDialog::InitControls() { PathDialog* pDlg = GetPathDialog(); - pDlg->SetText( UniString( SvtResId( STR_FILEDLG_SELECT ) ) ); + pDlg->SetText( SVT_RESSTR(STR_FILEDLG_SELECT) ); Size a3Siz = pDlg->LogicToPixel( Size( 3, 3 ), MAP_APPFONT ); Size a6Siz = pDlg->LogicToPixel( Size( 6, 6 ), MAP_APPFONT ); @@ -163,7 +163,7 @@ void ImpPathDialog::InitControls() UniString aEmptyStr; INITCONTROL( pDirTitel, FixedText, 0, - aPnt, aFTSiz, UniString( SvtResId( STR_FILEDLG_DIR ) ), HID_FILEDLG_DIR ); + aPnt, aFTSiz, SVT_RESSTR( STR_FILEDLG_DIR ), HID_FILEDLG_DIR ); aPnt.Y() += aFTSiz.Height() + a3Siz.Height(); INITCONTROL( pEdit, Edit, WB_BORDER, aPnt, aEDSiz, aPath.GetFull(), HID_FILEDLG_EDIT ); @@ -175,7 +175,7 @@ void ImpPathDialog::InitControls() aPnt, Size( aEDSiz.Width(), nLbH1 ), aEmptyStr, HID_FILEDLG_DIRS ); aPnt.Y() += nLbH1 + a6Siz.Height(); INITCONTROL( pDriveTitle, FixedText, 0, - aPnt, aFTSiz, UniString( SvtResId( STR_FILEDLG_DRIVES ) ), HID_FILEDLG_DRIVE ); + aPnt, aFTSiz, SVT_RESSTR( STR_FILEDLG_DRIVES ), HID_FILEDLG_DRIVE ); aPnt.Y() += aFTSiz.Height() + a3Siz.Height(); INITCONTROL( pDriveList, ListBox, WB_DROPDOWN, aPnt, Size( aEDSiz.Width(), nLbH2 ), aEmptyStr, HID_FILEDLG_DRIVES ); @@ -201,12 +201,12 @@ void ImpPathDialog::InitControls() if( nTextWidth > aBtnSiz.Width() ) aBtnSiz.Width() = nTextWidth; - String aNewDirStr( SvtResId( STR_FILEDLG_NEWDIR ) ); + String aNewDirStr( SVT_RESSTR( STR_FILEDLG_NEWDIR ) ); nTextWidth = pDlg->GetTextWidth( aNewDirStr )+nExtraWidth; if( nTextWidth > aBtnSiz.Width() ) aBtnSiz.Width() = nTextWidth; #if defined(UNX) - String aHomeDirStr( SvtResId( STR_FILEDLG_HOME ) ); + String aHomeDirStr( SVT_RESSTR( STR_FILEDLG_HOME ) ); nTextWidth = pDlg->GetTextWidth( aHomeDirStr )+nExtraWidth; if( nTextWidth > aBtnSiz.Width() ) aBtnSiz.Width() = nTextWidth; @@ -405,7 +405,7 @@ IMPL_LINK( ImpPathDialog, DblClickHdl, ListBox*, pBox ) { ErrorBox aBox( GetPathDialog(), WB_OK_CANCEL | WB_DEF_OK, - UniString( SvtResId( STR_FILEDLG_CANTCHDIR ) ) ); + SVT_RESSTR( STR_FILEDLG_CANTCHDIR ) ); if( aBox.Execute() == RET_CANCEL ) GetPathDialog()->EndDialog( sal_False ); } @@ -508,7 +508,7 @@ sal_Bool ImpPathDialog::IsFileOk( const DirEntry& rDirEntry ) // Datei vorhanden ? if( ! rDirEntry.Exists() ) { - UniString aQueryTxt( SvtResId( STR_FILEDLG_ASKNEWDIR ) ); + UniString aQueryTxt( SVT_RESSTR( STR_FILEDLG_ASKNEWDIR ) ); aQueryTxt.SearchAndReplaceAscii( "%s", rDirEntry.GetFull() ); QueryBox aQuery( GetPathDialog(), WB_YES_NO | WB_DEF_YES, @@ -520,7 +520,7 @@ sal_Bool ImpPathDialog::IsFileOk( const DirEntry& rDirEntry ) } if( !FileStat( rDirEntry ).IsKind( FSYS_KIND_DIR ) ) { - UniString aBoxText( SvtResId( STR_FILEDLG_CANTOPENDIR ) ); + UniString aBoxText( SVT_RESSTR( STR_FILEDLG_CANTOPENDIR ) ); aBoxText.AppendAscii( "\n[" ); aBoxText += rDirEntry.GetFull(); aBoxText.AppendAscii( "]" ); diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx index a7de833ff9a6..9f3f70b020ae 100644 --- a/svtools/source/dialogs/insdlg.cxx +++ b/svtools/source/dialogs/insdlg.cxx @@ -204,7 +204,7 @@ void SvObjectServerList::FillInsertObjects() #ifdef WNT SvGlobalName aOleFact( SO3_OUT_CLASSID ); - String aOleObj( SvtResId( STR_FURTHER_OBJECT ) ); + String aOleObj( SVT_RESSTR( STR_FURTHER_OBJECT ) ); aObjectServerList.push_back( SvObjectServer( aOleFact, aOleObj ) ); #endif @@ -306,7 +306,7 @@ String SvPasteObjectHelper::GetSotFormatUIName( SotFormatStringId nId ) } if( nResId ) - aUIName = String( SvtResId( nResId ) ); + aUIName = SVT_RESSTR( nResId ); else aUIName = SotExchange::GetFormatName( nId ); @@ -363,8 +363,7 @@ sal_Bool SvPasteObjectHelper::GetEmbeddedName(const TransferableDataHelper& rDat _rSource.Append( pSrcOfCopy ); } else - _rSource = - String( SvtResId( STR_UNKNOWN_SOURCE ) ); + _rSource = SVT_RESSTR(STR_UNKNOWN_SOURCE); } bRet = sal_True; } diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx index 3eb70f1705f4..add15bc37444 100644 --- a/svtools/source/dialogs/prnsetup.cxx +++ b/svtools/source/dialogs/prnsetup.cxx @@ -144,9 +144,7 @@ static void ImplPrnDlgAddString( XubString& rStr, const XubString& rAddStr ) static void ImplPrnDlgAddResString( XubString& rStr, sal_uInt16 nResId ) { - SvtResId aResId( nResId ); - XubString aAddStr( aResId ); - ImplPrnDlgAddString( rStr, aAddStr ); + ImplPrnDlgAddString( rStr, SVT_RESSTR(nResId) ); } // ----------------------------------------------------------------------- @@ -217,7 +215,7 @@ XubString ImplPrnDlgGetStatusText( const QueueInfo& rInfo ) sal_uLong nJobs = rInfo.GetJobs(); if ( nJobs && (nJobs != QUEUE_JOBS_DONTKNOW) ) { - XubString aJobStr( SvtResId( STR_SVT_PRNDLG_JOBCOUNT ) ); + XubString aJobStr( SVT_RESSTR( STR_SVT_PRNDLG_JOBCOUNT ) ); XubString aJobs( XubString::CreateFromInt32( nJobs ) ); aJobStr.SearchAndReplaceAscii( "%d", aJobs ); ImplPrnDlgAddString( aStr, aJobStr ); diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx index a6d591941b7d..6a7490e26038 100644 --- a/svtools/source/dialogs/roadmapwizard.cxx +++ b/svtools/source/dialogs/roadmapwizard.cxx @@ -200,7 +200,7 @@ namespace svt SetEmptyViewMargin(); m_pImpl->pRoadmap = new ORoadmap( this, WB_TABSTOP ); - m_pImpl->pRoadmap->SetText( SvtResId( STR_WIZDLG_ROADMAP_TITLE ) ); + m_pImpl->pRoadmap->SetText( SVT_RESSTR( STR_WIZDLG_ROADMAP_TITLE ) ); m_pImpl->pRoadmap->SetPosPixel( Point( 0, 0 ) ); m_pImpl->pRoadmap->SetItemSelectHdl( LINK( this, RoadmapWizard, OnRoadmapItemSelected ) ); diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx index 56d66a1c0fc5..b024364c4861 100644 --- a/svtools/source/dialogs/wizardmachine.cxx +++ b/svtools/source/dialogs/wizardmachine.cxx @@ -170,7 +170,7 @@ namespace svt m_pPrevPage = new PushButton(this, WB_TABSTOP); m_pPrevPage->SetHelpId( HID_WIZARD_PREVIOUS ); m_pPrevPage->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) ); - m_pPrevPage->SetText(String(SvtResId(STR_WIZDLG_PREVIOUS))); + m_pPrevPage->SetText(SVT_RESSTR(STR_WIZDLG_PREVIOUS)); m_pPrevPage->Show(); if (_nButtonFlags & WZB_NEXT) @@ -187,7 +187,7 @@ namespace svt m_pNextPage = new PushButton(this, WB_TABSTOP); m_pNextPage->SetHelpId( HID_WIZARD_NEXT ); m_pNextPage->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) ); - m_pNextPage->SetText(String(SvtResId(STR_WIZDLG_NEXT))); + m_pNextPage->SetText(String(SVT_RESSTR(STR_WIZDLG_NEXT))); m_pNextPage->Show(); AddButton( m_pNextPage, WIZARDDIALOG_BUTTON_STDOFFSET_X ); @@ -200,7 +200,7 @@ namespace svt { m_pFinish = new OKButton(this, WB_TABSTOP); m_pFinish->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) ); - m_pFinish->SetText(String(SvtResId(STR_WIZDLG_FINISH))); + m_pFinish->SetText(SVT_RESSTR(STR_WIZDLG_FINISH)); m_pFinish->Show(); AddButton( m_pFinish, WIZARDDIALOG_BUTTON_STDOFFSET_X ); |