summaryrefslogtreecommitdiff
path: root/sd/source/ui/app/sdmod2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/app/sdmod2.cxx')
-rw-r--r--sd/source/ui/app/sdmod2.cxx27
1 files changed, 5 insertions, 22 deletions
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 92979de304db..c0b21392883c 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -258,10 +258,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo)
aRepresentation = pDoc->CreatePageNumValue((sal_uInt16)nPgNum);
}
else
- {
- static String aNumberText( SdResId( STR_FIELD_PLACEHOLDER_NUMBER ) );
- aRepresentation = aNumberText;
- }
+ aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_NUMBER).toString();
pInfo->SetRepresentation( aRepresentation );
}
@@ -298,14 +295,9 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo)
}
if( nPageCount > 0 )
- {
aRepresentation = pDoc->CreatePageNumValue(nPageCount);
- }
else
- {
- static String aNumberText( SdResId( STR_FIELD_PLACEHOLDER_COUNT ) );
- aRepresentation = aNumberText;
- }
+ aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_COUNT).toString();
pInfo->SetRepresentation( aRepresentation );
}
@@ -351,20 +343,11 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo)
if( (pPage == NULL) || bMasterView )
{
if( bHeaderField )
- {
- static String aHeaderStr( SdResId( STR_FIELD_PLACEHOLDER_HEADER ) );
- aRepresentation = aHeaderStr;
- }
+ aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_HEADER).toString();
else if (bFooterField )
- {
- static String aFooterStr( SdResId( STR_FIELD_PLACEHOLDER_FOOTER ) );
- aRepresentation = aFooterStr;
- }
+ aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_FOOTER).toString();
else if (bDateTimeField )
- {
- static String aDateTimeStr( SdResId( STR_FIELD_PLACEHOLDER_DATETIME ) );
- aRepresentation = aDateTimeStr;
- }
+ aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_DATETIME).toString();
}
else
{