summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-06-25 12:50:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-06-25 14:19:03 +0100
commit2c757293b819118780eef3a30bb4434528d38673 (patch)
tree35beab468034fbeab06137452542d0d9191bb309 /sd/source
parent2ce31e56efaf1e429ecc13fd80b6767cb9ea585b (diff)
reduce static_initialization_and_destruction chain
Change-Id: I0c1b2f2d908c31d1510662880c13504d81445a6a
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/app/sdmod2.cxx27
-rw-r--r--sd/source/ui/framework/factories/BasicToolBarFactory.cxx2
-rw-r--r--sd/source/ui/framework/factories/TaskPanelFactory.cxx2
3 files changed, 7 insertions, 24 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
{
diff --git a/sd/source/ui/framework/factories/BasicToolBarFactory.cxx b/sd/source/ui/framework/factories/BasicToolBarFactory.cxx
index 0b05ca453d40..048fb493df52 100644
--- a/sd/source/ui/framework/factories/BasicToolBarFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicToolBarFactory.cxx
@@ -64,7 +64,7 @@ Reference<XInterface> SAL_CALL BasicToolBarFactory_createInstance (
Sequence<rtl::OUString> SAL_CALL BasicToolBarFactory_getSupportedServiceNames (void)
throw (RuntimeException)
{
- static const ::rtl::OUString sServiceName("com.sun.star.drawing.framework.BasicToolBarFactory");
+ const ::rtl::OUString sServiceName("com.sun.star.drawing.framework.BasicToolBarFactory");
return Sequence<rtl::OUString>(&sServiceName, 1);
}
diff --git a/sd/source/ui/framework/factories/TaskPanelFactory.cxx b/sd/source/ui/framework/factories/TaskPanelFactory.cxx
index fe5cd6cde6cd..eda39de09483 100644
--- a/sd/source/ui/framework/factories/TaskPanelFactory.cxx
+++ b/sd/source/ui/framework/factories/TaskPanelFactory.cxx
@@ -63,7 +63,7 @@ Reference<XInterface> SAL_CALL TaskPanelFactory_createInstance (
Sequence<rtl::OUString> SAL_CALL TaskPanelFactory_getSupportedServiceNames (void)
throw (RuntimeException)
{
- static const OUString sServiceName("com.sun.star.drawing.framework.TaskPanelFactory");
+ const OUString sServiceName("com.sun.star.drawing.framework.TaskPanelFactory");
return Sequence<rtl::OUString>(&sServiceName, 1);
}