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 /chart2 | |
parent | b18cfdc7cd3755c147970f86d23973f337be01a7 (diff) |
make ResId::toString a non-static member
Change-Id: I756c0a19bea7b1cc0e290d9f382a04d655819bfb
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/dialogs/DataBrowser.cxx | 2 | ||||
-rw-r--r-- | chart2/source/controller/dialogs/dlg_ObjectProperties.cxx | 98 | ||||
-rw-r--r-- | chart2/source/controller/main/DragMethod_PieSegment.cxx | 2 | ||||
-rw-r--r-- | chart2/source/inc/ResId.hxx | 4 | ||||
-rw-r--r-- | chart2/source/tools/InternalData.cxx | 4 | ||||
-rw-r--r-- | chart2/source/tools/RegressionCurveHelper.cxx | 10 | ||||
-rw-r--r-- | chart2/source/tools/ResId.cxx | 10 |
7 files changed, 63 insertions, 67 deletions
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index cff38eeb610b..0c38dc020f05 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -591,7 +591,7 @@ void DataBrowser::RenewTable() InsertHandleColumn( static_cast< sal_uInt16 >( GetDataWindow().LogicToPixel( Size( 42, 0 )).getWidth() )); - OUString aDefaultSeriesName( ::chart::SchResId::getResString( STR_COLUMN_LABEL )); + OUString aDefaultSeriesName(SCH_RESSTR(STR_COLUMN_LABEL)); replaceParamterInString( aDefaultSeriesName, C2U("%COLUMNNUMBER"), OUString::valueOf( sal_Int32(24) ) ); sal_Int32 nColumnWidth = GetDataWindow().GetTextWidth( aDefaultSeriesName ) + GetDataWindow().LogicToPixel( Point( 4 + impl::SeriesHeader::GetRelativeAppFontXPosForNameField(), 0 ), MAP_APPFONT ).X(); diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx index 7bce2ca29d2a..b4f5906ac4b0 100644 --- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx @@ -381,81 +381,81 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent, switch (eObjectType) { case OBJECTTYPE_TITLE: - AddTabPage(RID_SVXPAGE_LINE, ResId::toString(SchResId(STR_PAGE_BORDER))); - AddTabPage(RID_SVXPAGE_AREA, ResId::toString(SchResId(STR_PAGE_AREA))); - AddTabPage(RID_SVXPAGE_TRANSPARENCE, ResId::toString(SchResId(STR_PAGE_TRANSPARENCY))); - AddTabPage(RID_SVXPAGE_CHAR_NAME, ResId::toString(SchResId(STR_PAGE_FONT))); - AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, ResId::toString(SchResId(STR_PAGE_FONT_EFFECTS))); - AddTabPage(TP_ALIGNMENT, ResId::toString(SchResId(STR_PAGE_ALIGNMENT)), SchAlignmentTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_LINE, SCH_RESSTR(STR_PAGE_BORDER)); + AddTabPage(RID_SVXPAGE_AREA, SCH_RESSTR(STR_PAGE_AREA)); + AddTabPage(RID_SVXPAGE_TRANSPARENCE, SCH_RESSTR(STR_PAGE_TRANSPARENCY)); + AddTabPage(RID_SVXPAGE_CHAR_NAME, SCH_RESSTR(STR_PAGE_FONT)); + AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, SCH_RESSTR(STR_PAGE_FONT_EFFECTS)); + AddTabPage(TP_ALIGNMENT, SCH_RESSTR(STR_PAGE_ALIGNMENT), SchAlignmentTabPage::Create, NULL); if( aCJKOptions.IsAsianTypographyEnabled() ) - AddTabPage(RID_SVXPAGE_PARA_ASIAN, ResId::toString(SchResId(STR_PAGE_ASIAN))); + AddTabPage(RID_SVXPAGE_PARA_ASIAN, SCH_RESSTR(STR_PAGE_ASIAN)); break; case OBJECTTYPE_LEGEND: - AddTabPage(RID_SVXPAGE_LINE, ResId::toString(SchResId(STR_PAGE_BORDER))); - AddTabPage(RID_SVXPAGE_AREA, ResId::toString(SchResId(STR_PAGE_AREA))); - AddTabPage(RID_SVXPAGE_TRANSPARENCE, ResId::toString(SchResId(STR_PAGE_TRANSPARENCY))); - AddTabPage(RID_SVXPAGE_CHAR_NAME, ResId::toString(SchResId(STR_PAGE_FONT))); - AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, ResId::toString(SchResId(STR_PAGE_FONT_EFFECTS))); - AddTabPage(TP_LEGEND_POS, ResId::toString(SchResId(STR_PAGE_POSITION)), SchLegendPosTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_LINE, SCH_RESSTR(STR_PAGE_BORDER)); + AddTabPage(RID_SVXPAGE_AREA, SCH_RESSTR(STR_PAGE_AREA)); + AddTabPage(RID_SVXPAGE_TRANSPARENCE, SCH_RESSTR(STR_PAGE_TRANSPARENCY)); + AddTabPage(RID_SVXPAGE_CHAR_NAME, SCH_RESSTR(STR_PAGE_FONT)); + AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, SCH_RESSTR(STR_PAGE_FONT_EFFECTS)); + AddTabPage(TP_LEGEND_POS, SCH_RESSTR(STR_PAGE_POSITION), SchLegendPosTabPage::Create, NULL); if( aCJKOptions.IsAsianTypographyEnabled() ) - AddTabPage(RID_SVXPAGE_PARA_ASIAN, ResId::toString(SchResId(STR_PAGE_ASIAN))); + AddTabPage(RID_SVXPAGE_PARA_ASIAN, SCH_RESSTR(STR_PAGE_ASIAN)); break; case OBJECTTYPE_DATA_SERIES: case OBJECTTYPE_DATA_POINT: if( m_pParameter->ProvidesSecondaryYAxis() || m_pParameter->ProvidesOverlapAndGapWidth() || m_pParameter->ProvidesMissingValueTreatments() ) - AddTabPage(TP_OPTIONS, ResId::toString(SchResId(STR_PAGE_OPTIONS)),SchOptionTabPage::Create, NULL); + AddTabPage(TP_OPTIONS, SCH_RESSTR(STR_PAGE_OPTIONS),SchOptionTabPage::Create, NULL); if( m_pParameter->ProvidesStartingAngle()) - AddTabPage(TP_POLAROPTIONS, ResId::toString(SchResId(STR_PAGE_OPTIONS)),PolarOptionsTabPage::Create, NULL); + AddTabPage(TP_POLAROPTIONS, SCH_RESSTR(STR_PAGE_OPTIONS),PolarOptionsTabPage::Create, NULL); if( m_pParameter->HasGeometryProperties() ) - AddTabPage(TP_LAYOUT, ResId::toString(SchResId(STR_PAGE_LAYOUT)),SchLayoutTabPage::Create, NULL); + AddTabPage(TP_LAYOUT, SCH_RESSTR(STR_PAGE_LAYOUT),SchLayoutTabPage::Create, NULL); if(m_pParameter->HasAreaProperties()) { - AddTabPage(RID_SVXPAGE_AREA, ResId::toString(SchResId(STR_PAGE_AREA))); - AddTabPage(RID_SVXPAGE_TRANSPARENCE, ResId::toString(SchResId(STR_PAGE_TRANSPARENCY))); + AddTabPage(RID_SVXPAGE_AREA, SCH_RESSTR(STR_PAGE_AREA)); + AddTabPage(RID_SVXPAGE_TRANSPARENCE, SCH_RESSTR(STR_PAGE_TRANSPARENCY)); } - AddTabPage(RID_SVXPAGE_LINE, ResId::toString(SchResId( m_pParameter->HasAreaProperties() ? STR_PAGE_BORDER : STR_PAGE_LINE ))); + AddTabPage(RID_SVXPAGE_LINE, SCH_RESSTR( m_pParameter->HasAreaProperties() ? STR_PAGE_BORDER : STR_PAGE_LINE )); break; case OBJECTTYPE_DATA_LABEL: case OBJECTTYPE_DATA_LABELS: - AddTabPage(TP_DATA_DESCR, ResId::toString(SchResId(STR_OBJECT_DATALABELS)), DataLabelsTabPage::Create, NULL); - AddTabPage(RID_SVXPAGE_CHAR_NAME, ResId::toString(SchResId(STR_PAGE_FONT))); - AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, ResId::toString(SchResId(STR_PAGE_FONT_EFFECTS))); + AddTabPage(TP_DATA_DESCR, SCH_RESSTR(STR_OBJECT_DATALABELS), DataLabelsTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_CHAR_NAME, SCH_RESSTR(STR_PAGE_FONT)); + AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, SCH_RESSTR(STR_PAGE_FONT_EFFECTS)); if( aCJKOptions.IsAsianTypographyEnabled() ) - AddTabPage(RID_SVXPAGE_PARA_ASIAN, ResId::toString(SchResId(STR_PAGE_ASIAN))); + AddTabPage(RID_SVXPAGE_PARA_ASIAN, SCH_RESSTR(STR_PAGE_ASIAN)); break; case OBJECTTYPE_AXIS: { if( m_pParameter->HasScaleProperties() ) - AddTabPage(TP_SCALE, ResId::toString(SchResId(STR_PAGE_SCALE)), ScaleTabPage::Create, NULL); + AddTabPage(TP_SCALE, SCH_RESSTR(STR_PAGE_SCALE), ScaleTabPage::Create, NULL); if( m_pParameter->HasScaleProperties() )//no positioning page for z axes so far as the tickmarks are not shown so far - AddTabPage(TP_AXIS_POSITIONS, ResId::toString(SchResId(STR_PAGE_POSITIONING)), AxisPositionsTabPage::Create, NULL); - AddTabPage(RID_SVXPAGE_LINE, ResId::toString(SchResId(STR_PAGE_LINE))); - AddTabPage(TP_AXIS_LABEL, ResId::toString(SchResId(STR_OBJECT_LABEL)), SchAxisLabelTabPage::Create, NULL); + AddTabPage(TP_AXIS_POSITIONS, SCH_RESSTR(STR_PAGE_POSITIONING), AxisPositionsTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_LINE, SCH_RESSTR(STR_PAGE_LINE)); + AddTabPage(TP_AXIS_LABEL, SCH_RESSTR(STR_OBJECT_LABEL), SchAxisLabelTabPage::Create, NULL); if( m_pParameter->HasNumberProperties() ) - AddTabPage(RID_SVXPAGE_NUMBERFORMAT, ResId::toString(SchResId(STR_PAGE_NUMBERS))); - AddTabPage(RID_SVXPAGE_CHAR_NAME, ResId::toString(SchResId(STR_PAGE_FONT))); - AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, ResId::toString(SchResId(STR_PAGE_FONT_EFFECTS))); + AddTabPage(RID_SVXPAGE_NUMBERFORMAT, SCH_RESSTR(STR_PAGE_NUMBERS)); + AddTabPage(RID_SVXPAGE_CHAR_NAME, SCH_RESSTR(STR_PAGE_FONT)); + AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, SCH_RESSTR(STR_PAGE_FONT_EFFECTS)); if( aCJKOptions.IsAsianTypographyEnabled() ) - AddTabPage(RID_SVXPAGE_PARA_ASIAN, ResId::toString(SchResId(STR_PAGE_ASIAN))); + AddTabPage(RID_SVXPAGE_PARA_ASIAN, SCH_RESSTR(STR_PAGE_ASIAN)); break; } case OBJECTTYPE_DATA_ERRORS_X: - AddTabPage(TP_XERRORBAR, ResId::toString(SchResId(STR_PAGE_XERROR_BARS)), ErrorBarsTabPage::Create, NULL); - AddTabPage(RID_SVXPAGE_LINE, ResId::toString(SchResId(STR_PAGE_LINE))); + AddTabPage(TP_XERRORBAR, SCH_RESSTR(STR_PAGE_XERROR_BARS), ErrorBarsTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_LINE, SCH_RESSTR(STR_PAGE_LINE)); break; case OBJECTTYPE_DATA_ERRORS_Y: - AddTabPage(TP_YERRORBAR, ResId::toString(SchResId(STR_PAGE_YERROR_BARS)), ErrorBarsTabPage::Create, NULL); - AddTabPage(RID_SVXPAGE_LINE, ResId::toString(SchResId(STR_PAGE_LINE))); + AddTabPage(TP_YERRORBAR, SCH_RESSTR(STR_PAGE_YERROR_BARS), ErrorBarsTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_LINE, SCH_RESSTR(STR_PAGE_LINE)); break; case OBJECTTYPE_DATA_ERRORS_Z: @@ -465,12 +465,12 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent, case OBJECTTYPE_SUBGRID: case OBJECTTYPE_DATA_AVERAGE_LINE: case OBJECTTYPE_DATA_STOCK_RANGE: - AddTabPage(RID_SVXPAGE_LINE, ResId::toString(SchResId(STR_PAGE_LINE))); + AddTabPage(RID_SVXPAGE_LINE, SCH_RESSTR(STR_PAGE_LINE)); break; case OBJECTTYPE_DATA_CURVE: - AddTabPage(TP_TRENDLINE, ResId::toString(SchResId(STR_PAGE_TRENDLINE_TYPE)), TrendlineTabPage::Create, NULL); - AddTabPage(RID_SVXPAGE_LINE, ResId::toString(SchResId(STR_PAGE_LINE))); + AddTabPage(TP_TRENDLINE, SCH_RESSTR(STR_PAGE_TRENDLINE_TYPE), TrendlineTabPage::Create, NULL); + AddTabPage(RID_SVXPAGE_LINE, SCH_RESSTR(STR_PAGE_LINE)); break; case OBJECTTYPE_DATA_STOCK_LOSS: @@ -479,9 +479,9 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent, case OBJECTTYPE_DIAGRAM_FLOOR: case OBJECTTYPE_DIAGRAM_WALL: case OBJECTTYPE_DIAGRAM: - AddTabPage(RID_SVXPAGE_LINE, ResId::toString(SchResId(STR_PAGE_BORDER))); - AddTabPage(RID_SVXPAGE_AREA, ResId::toString(SchResId(STR_PAGE_AREA))); - AddTabPage(RID_SVXPAGE_TRANSPARENCE, ResId::toString(SchResId(STR_PAGE_TRANSPARENCY))); + AddTabPage(RID_SVXPAGE_LINE, SCH_RESSTR(STR_PAGE_BORDER)); + AddTabPage(RID_SVXPAGE_AREA, SCH_RESSTR(STR_PAGE_AREA)); + AddTabPage(RID_SVXPAGE_TRANSPARENCE, SCH_RESSTR(STR_PAGE_TRANSPARENCY)); break; case OBJECTTYPE_LEGEND_ENTRY: @@ -490,17 +490,17 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent, // nothing break; case OBJECTTYPE_DATA_CURVE_EQUATION: - AddTabPage(RID_SVXPAGE_LINE, ResId::toString(SchResId(STR_PAGE_BORDER))); - AddTabPage(RID_SVXPAGE_AREA, ResId::toString(SchResId(STR_PAGE_AREA))); - AddTabPage(RID_SVXPAGE_TRANSPARENCE, ResId::toString(SchResId(STR_PAGE_TRANSPARENCY))); - AddTabPage(RID_SVXPAGE_CHAR_NAME, ResId::toString(SchResId(STR_PAGE_FONT))); - AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, ResId::toString(SchResId(STR_PAGE_FONT_EFFECTS))); - AddTabPage(RID_SVXPAGE_NUMBERFORMAT, ResId::toString(SchResId(STR_PAGE_NUMBERS))); + AddTabPage(RID_SVXPAGE_LINE, SCH_RESSTR(STR_PAGE_BORDER)); + AddTabPage(RID_SVXPAGE_AREA, SCH_RESSTR(STR_PAGE_AREA)); + AddTabPage(RID_SVXPAGE_TRANSPARENCE, SCH_RESSTR(STR_PAGE_TRANSPARENCY)); + AddTabPage(RID_SVXPAGE_CHAR_NAME, SCH_RESSTR(STR_PAGE_FONT)); + AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, SCH_RESSTR(STR_PAGE_FONT_EFFECTS)); + AddTabPage(RID_SVXPAGE_NUMBERFORMAT, SCH_RESSTR(STR_PAGE_NUMBERS)); if( SvtLanguageOptions().IsCTLFontEnabled() ) /* When rotation is supported for equation text boxes, use SchAlignmentTabPage::Create here. The special SchAlignmentTabPage::CreateWithoutRotation can be deleted. */ - AddTabPage(TP_ALIGNMENT, ResId::toString(SchResId(STR_PAGE_ALIGNMENT)), SchAlignmentTabPage::CreateWithoutRotation, NULL); + AddTabPage(TP_ALIGNMENT, SCH_RESSTR(STR_PAGE_ALIGNMENT), SchAlignmentTabPage::CreateWithoutRotation, NULL); break; default: break; diff --git a/chart2/source/controller/main/DragMethod_PieSegment.cxx b/chart2/source/controller/main/DragMethod_PieSegment.cxx index c9395eb0751b..029bc92e5933 100644 --- a/chart2/source/controller/main/DragMethod_PieSegment.cxx +++ b/chart2/source/controller/main/DragMethod_PieSegment.cxx @@ -83,7 +83,7 @@ DragMethod_PieSegment::~DragMethod_PieSegment() } void DragMethod_PieSegment::TakeSdrDragComment(String& rStr) const { - rStr = ResId::toString(SchResId(STR_STATUS_PIE_SEGMENT_EXPLODED)); + rStr = SCH_RESSTR(STR_STATUS_PIE_SEGMENT_EXPLODED); rStr.SearchAndReplaceAscii( "%PERCENTVALUE", rtl::OUString::valueOf( static_cast<sal_Int32>((m_fAdditionalOffset+m_fInitialOffset)*100.0) )); } bool DragMethod_PieSegment::BeginSdrDrag() diff --git a/chart2/source/inc/ResId.hxx b/chart2/source/inc/ResId.hxx index 2e11182cff85..79ef5a180340 100644 --- a/chart2/source/inc/ResId.hxx +++ b/chart2/source/inc/ResId.hxx @@ -39,10 +39,10 @@ class OOO_DLLPUBLIC_CHARTTOOLS SchResId : public ResId { public: SchResId( sal_Int16 nId ); - - static ::rtl::OUString getResString( sal_Int16 nId ); }; +#define SCH_RESSTR(x) SchResId(x).toString() + } // namespace chart // CHART2_RESID_HXX diff --git a/chart2/source/tools/InternalData.cxx b/chart2/source/tools/InternalData.cxx index 7ed4efbc32ed..01f605d3bfae 100644 --- a/chart2/source/tools/InternalData.cxx +++ b/chart2/source/tools/InternalData.cxx @@ -105,8 +105,8 @@ void InternalData::createDefaultData() m_nColumnCount = nColumnCount; const sal_Int32 nSize = nColumnCount * nRowCount; // @todo: localize this! - const OUString aRowName( ::chart::SchResId::getResString( STR_ROW_LABEL )); - const OUString aColName( ::chart::SchResId::getResString( STR_COLUMN_LABEL )); + const OUString aRowName(SCH_RESSTR(STR_ROW_LABEL)); + const OUString aColName(SCH_RESSTR(STR_COLUMN_LABEL)); m_aData.resize( nSize ); for( sal_Int32 i=0; i<nSize; ++i ) diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx index 3988da4fac95..d445c7fb2a9e 100644 --- a/chart2/source/tools/RegressionCurveHelper.cxx +++ b/chart2/source/tools/RegressionCurveHelper.cxx @@ -585,23 +585,23 @@ OUString RegressionCurveHelper::getUINameForRegressionCurve( const Reference< XR OUString aServiceName( xServiceName->getServiceName()); if( aServiceName == "com.sun.star.chart2.MeanValueRegressionCurve" ) { - aResult = ::chart::SchResId::getResString( STR_REGRESSION_MEAN ); + aResult = SCH_RESSTR(STR_REGRESSION_MEAN); } else if( aServiceName == "com.sun.star.chart2.LinearRegressionCurve" ) { - aResult = ::chart::SchResId::getResString( STR_REGRESSION_LINEAR ); + aResult = SCH_RESSTR(STR_REGRESSION_LINEAR); } else if( aServiceName == "com.sun.star.chart2.LogarithmicRegressionCurve" ) { - aResult = ::chart::SchResId::getResString( STR_REGRESSION_LOG ); + aResult = SCH_RESSTR(STR_REGRESSION_LOG); } else if( aServiceName == "com.sun.star.chart2.ExponentialRegressionCurve" ) { - aResult = ::chart::SchResId::getResString( STR_REGRESSION_EXP ); + aResult = SCH_RESSTR(STR_REGRESSION_EXP); } else if( aServiceName == "com.sun.star.chart2.PotentialRegressionCurve" ) { - aResult = ::chart::SchResId::getResString( STR_REGRESSION_POWER ); + aResult = SCH_RESSTR(STR_REGRESSION_POWER); } return aResult; diff --git a/chart2/source/tools/ResId.cxx b/chart2/source/tools/ResId.cxx index 25fa256f56ac..665e87c99b76 100644 --- a/chart2/source/tools/ResId.cxx +++ b/chart2/source/tools/ResId.cxx @@ -34,14 +34,10 @@ namespace chart { -SchResId::SchResId( sal_Int16 nId ) + SchResId::SchResId( sal_Int16 nId ) : ResId( nId, RessourceManager::getRessourceManager() ) -{} - -::rtl::OUString SchResId::getResString( sal_Int16 nId ) -{ - return String( SchResId( nId )); -} + { + } } // namespace chart |