summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg/present.cxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-07-19 15:16:08 +0100
committerMichael Meeks <michael.meeks@suse.com>2013-07-19 15:16:58 +0100
commit9b0ba41906f69b2364b11621ba2397f6a15a57e7 (patch)
treefe6c0c2084a91f6ff039073c58fd8928674faa07 /sd/source/ui/dlg/present.cxx
parent2dc7af1f7a3925f2435cbd5d402a4c9fd0ee7bda (diff)
fdo#67045 - cleanup slideshow / screen string usage for 4.2.
Change-Id: If71567e2b6c6cfed8860677254d60fce60f63e14
Diffstat (limited to 'sd/source/ui/dlg/present.cxx')
-rw-r--r--sd/source/ui/dlg/present.cxx36
1 files changed, 26 insertions, 10 deletions
diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx
index 6aec2896a4e8..8264101a614d 100644
--- a/sd/source/ui/dlg/present.cxx
+++ b/sd/source/ui/dlg/present.cxx
@@ -67,7 +67,9 @@ SdStartPresentationDlg::SdStartPresentationDlg( Window* pWindow,
get( maFtMonitor, "presdisplay_label" );
get( maLBMonitor, "presdisplay_cb" );
- get( msExternalMonitor, "externalmonitor_str" );
+ get( msMonitor, "monitor_str" );
+ get( msMonitorExternal, "externalmonitor_str" );
+ get( msExternal, "external_str" );
get( msMonitor, "monitor_str" );
get( msAllMonitors, "allmonitors_str" );
@@ -149,12 +151,27 @@ SdStartPresentationDlg::SdStartPresentationDlg( Window* pWindow,
ChangePauseHdl( NULL );
}
-String SdStartPresentationDlg::GetDisplayName( sal_Int32 nDisplay, bool bExternal )
+String SdStartPresentationDlg::GetDisplayName( sal_Int32 nDisplay,
+ DisplayType eType )
{
- String aName( bExternal ? msExternalMonitor->GetText() :
- msMonitor->GetText() );
+ String aName;
+
+ switch ( eType )
+ {
+ case EXTERNAL_IS_NUMBER:
+ aName = msExternal->GetText();
+ break;
+ case MONITOR_IS_EXTERNAL:
+ aName = msMonitorExternal->GetText();
+ break;
+ default:
+ case MONITOR_NORMAL:
+ aName = msMonitor->GetText();
+ break;
+ }
const String aNumber( OUString::number( nDisplay ) );
aName.SearchAndReplace( String("%1"), aNumber );
+
return aName;
}
@@ -196,8 +213,8 @@ void SdStartPresentationDlg::InitMonitorSettings()
// Un-conditionally add a version for '0' the default external display
sal_Int32 nInsertedEntry;
- // FIXME: string-freeze this should really be 'External (display %)'
- String aName = GetDisplayName( nExternalIndex + 1, true);
+ // Initial entry - the auto-detected external monitor
+ String aName = GetDisplayName( nExternalIndex + 1, EXTERNAL_IS_NUMBER);
nInsertedEntry = InsertDisplayEntry( aName, 0 );
if( nDefaultSelectedDisplay == 0)
nSelectedIndex = nInsertedEntry;
@@ -205,10 +222,9 @@ void SdStartPresentationDlg::InitMonitorSettings()
// The user data contains the real setting
for( sal_Int32 nDisplay = 0; nDisplay < mnMonitors; nDisplay++ )
{
- bool bIsExternal = nDisplay == nExternalIndex;
- // FIXME: string-freeze, use true to denote external for now
- bIsExternal = false;
- aName = GetDisplayName( nDisplay + 1, bIsExternal );
+ aName = GetDisplayName( nDisplay + 1,
+ nDisplay == nExternalIndex ?
+ MONITOR_IS_EXTERNAL : MONITOR_NORMAL );
nInsertedEntry = InsertDisplayEntry( aName, nDisplay + 1 );
// Remember the index of the default selection.