summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2013-08-21 15:25:35 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2013-08-21 15:52:46 +0400
commit4802bf2da3439cfddde79a4193e642dac58eab9d (patch)
tree17bdcd421fd5a528c81dc29b73c8cfae45af1729
parent64b315df9b7f90621db92062c6ce62f487325388 (diff)
String->OUString
Change-Id: Ifb3a2f8ef959baec38fe0168a9e88e85da0d9744
-rw-r--r--sd/inc/sdabstdlg.hxx6
-rw-r--r--sd/source/ui/dlg/dlgassim.cxx10
-rw-r--r--sd/source/ui/dlg/dlgassim.hxx4
-rw-r--r--sd/source/ui/dlg/dlgctrls.cxx2
-rw-r--r--sd/source/ui/dlg/dlgfield.cxx16
-rw-r--r--sd/source/ui/dlg/dlgolbul.cxx3
-rw-r--r--sd/source/ui/dlg/dlgsnap.cxx4
-rw-r--r--sd/source/ui/dlg/filedlg.cxx34
-rw-r--r--sd/source/ui/dlg/gluectrl.cxx27
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.cxx11
-rw-r--r--sd/source/ui/dlg/inspagob.cxx4
-rw-r--r--sd/source/ui/dlg/navigatr.cxx41
-rw-r--r--sd/source/ui/dlg/present.cxx15
-rw-r--r--sd/source/ui/dlg/prltempl.cxx3
-rw-r--r--sd/source/ui/dlg/sddlgfact.cxx6
-rw-r--r--sd/source/ui/dlg/sddlgfact.hxx6
-rw-r--r--sd/source/ui/func/fusldlg.cxx9
-rw-r--r--sd/source/ui/inc/filedlg.hxx4
-rw-r--r--sd/source/ui/inc/inspagob.hxx4
-rw-r--r--sd/source/ui/inc/navigatr.hxx6
-rw-r--r--sd/source/ui/inc/present.hxx4
21 files changed, 106 insertions, 113 deletions
diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index 4d5111fe5e9a..f100c1734d46 100644
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -183,14 +183,14 @@ public:
virtual AbstractAssistentDlg* CreateAssistentDlg( ::Window* pParent, sal_Bool bAutoPilot) = 0;
virtual AbstractSdModifyFieldDlg* CreateSdModifyFieldDlg( ::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet ) = 0;
virtual AbstractSdSnapLineDlg* CreateSdSnapLineDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView) = 0;
- virtual AbstractSdInsertLayerDlg* CreateSdInsertLayerDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, bool bDeletable, String aStr ) = 0;
+ virtual AbstractSdInsertLayerDlg* CreateSdInsertLayerDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr ) = 0;
virtual AbstractSdInsertPasteDlg* CreateSdInsertPasteDlg( ::Window* pWindow ) = 0;
- virtual AbstractSdInsertPagesObjsDlg* CreateSdInsertPagesObjsDlg( ::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const String& rFileName ) = 0;
+ virtual AbstractSdInsertPagesObjsDlg* CreateSdInsertPagesObjsDlg( ::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName ) = 0;
virtual AbstractMorphDlg* CreateMorphDlg( ::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) = 0;
virtual SfxAbstractTabDialog* CreateSdOutlineBulletTabDlg ( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = NULL ) = 0;
virtual SfxAbstractTabDialog* CreateSdParagraphTabDlg ( ::Window* pParent, const SfxItemSet* pAttr ) = 0;
virtual AbstractSdStartPresDlg* CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs,
- const std::vector<String> &rPageNames, SdCustomShowList* pCSList ) = 0;
+ const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList ) = 0;
virtual VclAbstractDialog* CreateRemoteDialog( ::Window* pWindow ) = 0;
virtual SfxAbstractTabDialog* CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) = 0;
virtual AbstractSdPresLayoutDlg* CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, ::Window* pWindow, const SfxItemSet& rInAttrs) = 0;
diff --git a/sd/source/ui/dlg/dlgassim.cxx b/sd/source/ui/dlg/dlgassim.cxx
index 809266998d79..9eff528aaa0b 100644
--- a/sd/source/ui/dlg/dlgassim.cxx
+++ b/sd/source/ui/dlg/dlgassim.cxx
@@ -76,7 +76,7 @@ void SdPageListControl::Clear()
SvTreeListBox::Clear();
}
-SvTreeListEntry* SdPageListControl::InsertPage( const String& rPageName )
+SvTreeListEntry* SdPageListControl::InsertPage( const OUString& rPageName )
{
SvTreeListEntry* pEntry = new SvTreeListEntry;
@@ -90,10 +90,10 @@ SvTreeListEntry* SdPageListControl::InsertPage( const String& rPageName )
return pEntry;
}
-void SdPageListControl::InsertTitle( SvTreeListEntry* pParent, const String& rTitle )
+void SdPageListControl::InsertTitle( SvTreeListEntry* pParent, const OUString& rTitle )
{
SvTreeListEntry* pEntry = new SvTreeListEntry;
- pEntry->AddItem( new SvLBoxString( pEntry, 0, String() ) );
+ pEntry->AddItem( new SvLBoxString( pEntry, 0, OUString() ) );
pEntry->AddItem( new SvLBoxContextBmp( pEntry, 0, Image(), Image(), 0)); // otherwise boom!
pEntry->AddItem( new SvLBoxString( pEntry, 0, rTitle ) );
GetModel()->Insert( pEntry,pParent );
@@ -146,8 +146,8 @@ void SdPageListControl::Fill( SdDrawDocument* pDoc )
pPara = pOutliner->GetParagraph(nPara);
if(pPara && pOutliner->GetDepth( nPara ) == 0 )
{
- String aParaText = pOutliner->GetText(pPara);
- if(aParaText.Len() != 0)
+ OUString aParaText = pOutliner->GetText(pPara);
+ if (!aParaText.isEmpty())
InsertTitle( pEntry, aParaText );
}
}
diff --git a/sd/source/ui/dlg/dlgassim.hxx b/sd/source/ui/dlg/dlgassim.hxx
index 061ab56de6d6..f9918e713edd 100644
--- a/sd/source/ui/dlg/dlgassim.hxx
+++ b/sd/source/ui/dlg/dlgassim.hxx
@@ -29,8 +29,8 @@ class SdPageListControl : public SvTreeListBox
private:
SvLBoxButtonData* m_pCheckButton;
- SvTreeListEntry* InsertPage( const String& rPageName );
- void InsertTitle( SvTreeListEntry* pEntry, const String& rTitle );
+ SvTreeListEntry* InsertPage( const OUString& rPageName );
+ void InsertTitle( SvTreeListEntry* pEntry, const OUString& rTitle );
public:
SdPageListControl( Window* pParent, const ResId& rResId );
diff --git a/sd/source/ui/dlg/dlgctrls.cxx b/sd/source/ui/dlg/dlgctrls.cxx
index 28a5273d02ea..fd21be04ffd9 100644
--- a/sd/source/ui/dlg/dlgctrls.cxx
+++ b/sd/source/ui/dlg/dlgctrls.cxx
@@ -47,7 +47,7 @@ void FadeEffectLB::Fill()
{
TransitionPresetPtr pPreset;
- InsertEntry( String( SdResId( STR_EFFECT_NONE ) ) );
+ InsertEntry( SD_RESSTR( STR_EFFECT_NONE ) );
mpImpl->maPresets.push_back( pPreset );
const TransitionPresetList& rPresetList = TransitionPreset::getTransitionPresetList();
diff --git a/sd/source/ui/dlg/dlgfield.cxx b/sd/source/ui/dlg/dlgfield.cxx
index ac42f45854c4..3281d364c35f 100644
--- a/sd/source/ui/dlg/dlgfield.cxx
+++ b/sd/source/ui/dlg/dlgfield.cxx
@@ -127,7 +127,7 @@ SvxFieldData* SdModifyFieldDlg::GetField()
{
SvxExtFileField aFileField( *pFileField );
- String aName;
+ OUString aName;
if( pDocSh->HasName() )
aName = pDocSh->GetMedium()->GetName();
@@ -173,8 +173,8 @@ void SdModifyFieldDlg::FillFormatList()
//SVXDATEFORMAT_APPDEFAULT, // not used
//SVXDATEFORMAT_SYSTEM, // not used
- aLbFormat.InsertEntry( String( SdResId( STR_STANDARD_SMALL ) ) );
- aLbFormat.InsertEntry( String( SdResId( STR_STANDARD_BIG ) ) );
+ aLbFormat.InsertEntry( SD_RESSTR( STR_STANDARD_SMALL ) );
+ aLbFormat.InsertEntry( SD_RESSTR( STR_STANDARD_BIG ) );
SvNumberFormatter* pNumberFormatter = SD_MOD()->GetNumberFormatter();
aDateField.SetFormat( SVXDATEFORMAT_A ); // 13.02.96
@@ -199,7 +199,7 @@ void SdModifyFieldDlg::FillFormatList()
//SVXTIMEFORMAT_APPDEFAULT, // not used
//SVXTIMEFORMAT_SYSTEM, // not used
- aLbFormat.InsertEntry( String( SdResId( STR_STANDARD_NORMAL ) ) );
+ aLbFormat.InsertEntry( SD_RESSTR( STR_STANDARD_NORMAL ) );
SvNumberFormatter* pNumberFormatter = SD_MOD()->GetNumberFormatter();
aTimeField.SetFormat( SVXTIMEFORMAT_24_HM ); // 13:49
@@ -225,10 +225,10 @@ void SdModifyFieldDlg::FillFormatList()
const SvxExtFileField* pFileField = (const SvxExtFileField*) pField;
SvxExtFileField aFileField( *pFileField );
- aLbFormat.InsertEntry( String( SdResId( STR_FILEFORMAT_NAME_EXT ) ) );
- aLbFormat.InsertEntry( String( SdResId( STR_FILEFORMAT_FULLPATH ) ) );
- aLbFormat.InsertEntry( String( SdResId( STR_FILEFORMAT_PATH ) ) );
- aLbFormat.InsertEntry( String( SdResId( STR_FILEFORMAT_NAME ) ) );
+ aLbFormat.InsertEntry( SD_RESSTR( STR_FILEFORMAT_NAME_EXT ) );
+ aLbFormat.InsertEntry( SD_RESSTR( STR_FILEFORMAT_FULLPATH ) );
+ aLbFormat.InsertEntry( SD_RESSTR( STR_FILEFORMAT_PATH ) );
+ aLbFormat.InsertEntry( SD_RESSTR( STR_FILEFORMAT_NAME ) );
aLbFormat.SelectEntryPos( (sal_uInt16) ( pFileField->GetFormat() ) );
}
diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx
index 36826713d2c6..a09b92e80ab8 100644
--- a/sd/source/ui/dlg/dlgolbul.cxx
+++ b/sd/source/ui/dlg/dlgolbul.cxx
@@ -97,8 +97,7 @@ OutlineBulletDlg::OutlineBulletDlg(
if(bOutliner)
{
SfxStyleSheetBasePool* pSSPool = pView->GetDocSh()->GetStyleSheetPool();
- String aStyleName((SdResId(STR_LAYOUT_OUTLINE)));
- aStyleName.AppendAscii( " 1" );
+ OUString aStyleName(SD_RESSTR(STR_LAYOUT_OUTLINE) + " 1");
SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( aStyleName, SD_STYLE_FAMILY_PSEUDO);
if( pFirstStyleSheet )
pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, sal_False, (const SfxPoolItem**)&pItem);
diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx
index 9540be122a3e..af0c14d76086 100644
--- a/sd/source/ui/dlg/dlgsnap.cxx
+++ b/sd/source/ui/dlg/dlgsnap.cxx
@@ -164,7 +164,7 @@ void SdSnapLineDlg::SetInputFields(sal_Bool bEnableX, sal_Bool bEnableY)
else if ( m_pMtrFldX->IsEnabled() )
{
nXValue = static_cast<long>(m_pMtrFldX->GetValue());
- m_pMtrFldX->SetText(String());
+ m_pMtrFldX->SetText(OUString());
m_pMtrFldX->Disable();
m_pFtX->Disable();
}
@@ -178,7 +178,7 @@ void SdSnapLineDlg::SetInputFields(sal_Bool bEnableX, sal_Bool bEnableY)
else if ( m_pMtrFldY->IsEnabled() )
{
nYValue = static_cast<long>(m_pMtrFldY->GetValue());
- m_pMtrFldY->SetText(String());
+ m_pMtrFldY->SetText(OUString());
m_pMtrFldY->Disable();
m_pFtY->Disable();
}
diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx
index 2c16005c715e..731fe7d37ae8 100644
--- a/sd/source/ui/dlg/filedlg.cxx
+++ b/sd/source/ui/dlg/filedlg.cxx
@@ -121,7 +121,7 @@ IMPL_LINK_NOARG(SdFileDialog_Imp, PlayMusicHdl)
try
{
mxControlAccess->setLabel( css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY,
- String( SdResId( STR_PLAY ) ) );
+ SD_RESSTR( STR_PLAY ) );
mbLabelPlaying = sal_False;
}
@@ -154,7 +154,7 @@ IMPL_LINK_NOARG(SdFileDialog_Imp, PlayMusicHdl)
try
{
mxControlAccess->setLabel( css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY,
- String( SdResId( STR_STOP ) ) );
+ SD_RESSTR( STR_STOP ) );
mbLabelPlaying = sal_True;
}
@@ -191,7 +191,7 @@ IMPL_LINK_NOARG(SdFileDialog_Imp, IsMusicStoppedHdl)
try
{
mxControlAccess->setLabel( css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY,
- String( SdResId( STR_PLAY ) ) );
+ SD_RESSTR( STR_PLAY ) );
mbLabelPlaying = sal_False;
}
catch (const css::lang::IllegalArgumentException&)
@@ -210,11 +210,11 @@ void SdFileDialog_Imp::CheckSelectionState()
{
if( mbUsableSelection && mxControlAccess.is() )
{
- String aCurrFilter( GetCurrentFilter() );
+ OUString aCurrFilter( GetCurrentFilter() );
try
{
- if( !aCurrFilter.Len() || ( aCurrFilter == String( SdResId( STR_EXPORT_HTML_NAME ) ) ) )
+ if( aCurrFilter.isEmpty() || ( aCurrFilter == SD_RESSTR( STR_EXPORT_HTML_NAME ) ) )
mxControlAccess->enableControl( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION, sal_False );
else
mxControlAccess->enableControl( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION, sal_True );
@@ -251,7 +251,7 @@ SdFileDialog_Imp::SdFileDialog_Imp( const short nDialogType,
try
{
mxControlAccess->setLabel( css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY,
- String( SdResId( STR_PLAY ) ) );
+ SD_RESSTR( STR_PLAY ) );
}
catch (const css::lang::IllegalArgumentException&)
{
@@ -303,26 +303,26 @@ SdOpenSoundFileDialog::SdOpenSoundFileDialog() :
new SdFileDialog_Imp(
css::ui::dialogs::TemplateDescription::FILEOPEN_PLAY, sal_False ) )
{
- String aDescr;
- aDescr = String(SdResId(STR_ALL_FILES));
+ OUString aDescr;
+ aDescr = SD_RESSTR(STR_ALL_FILES);
mpImpl->AddFilter( aDescr, OUString("*.*"));
// setup filter
#if defined UNX
- aDescr = String(SdResId(STR_AU_FILE));
+ aDescr = SD_RESSTR(STR_AU_FILE);
mpImpl->AddFilter( aDescr, OUString("*.au;*.snd" ));
- aDescr = String(SdResId(STR_VOC_FILE));
+ aDescr = SD_RESSTR(STR_VOC_FILE);
mpImpl->AddFilter( aDescr, OUString("*.voc" ));
- aDescr = String(SdResId(STR_WAV_FILE));
+ aDescr = SD_RESSTR(STR_WAV_FILE);
mpImpl->AddFilter( aDescr, OUString("*.wav" ));
- aDescr = String(SdResId(STR_AIFF_FILE));
+ aDescr = SD_RESSTR(STR_AIFF_FILE);
mpImpl->AddFilter( aDescr, OUString("*.aiff" ));
- aDescr = String(SdResId(STR_SVX_FILE));
+ aDescr = SD_RESSTR(STR_SVX_FILE);
mpImpl->AddFilter( aDescr, OUString("*.svx" ));
#else
- aDescr = String(SdResId(STR_WAV_FILE));
+ aDescr = SD_RESSTR(STR_WAV_FILE);
mpImpl->AddFilter( aDescr, OUString("*.wav;*.mp3;*.ogg" ));
- aDescr = String(SdResId(STR_MIDI_FILE));
+ aDescr = SD_RESSTR(STR_MIDI_FILE);
mpImpl->AddFilter( aDescr, OUString("*.mid" ));
#endif
}
@@ -339,13 +339,13 @@ ErrCode SdOpenSoundFileDialog::Execute()
}
// ------------------------------------------------------------------------
-String SdOpenSoundFileDialog::GetPath() const
+OUString SdOpenSoundFileDialog::GetPath() const
{
return mpImpl->GetPath();
}
// ------------------------------------------------------------------------
-void SdOpenSoundFileDialog::SetPath( const String& rPath )
+void SdOpenSoundFileDialog::SetPath( const OUString& rPath )
{
mpImpl->SetDisplayDirectory( rPath );
}
diff --git a/sd/source/ui/dlg/gluectrl.cxx b/sd/source/ui/dlg/gluectrl.cxx
index e0d09bac1708..a4ed47daf630 100644
--- a/sd/source/ui/dlg/gluectrl.cxx
+++ b/sd/source/ui/dlg/gluectrl.cxx
@@ -65,8 +65,7 @@ GlueEscDirLB::GlueEscDirLB( Window* pParent, const Reference< XFrame >& rFrame )
ListBox( pParent, WinBits( WB_BORDER | WB_DROPDOWN ) ),
m_xFrame( rFrame )
{
- String aStr; aStr += sal_Unicode('X');
- Size aXSize( GetTextWidth( aStr ), GetTextHeight() );
+ Size aXSize( GetTextWidth( "X" ), GetTextHeight() );
SetSizePixel( Size( aXSize.Width() * 12, aXSize.Height() * 10 ) );
Fill();
Show();
@@ -102,19 +101,19 @@ void GlueEscDirLB::Select()
*/
void GlueEscDirLB::Fill()
{
- InsertEntry( String( SdResId( STR_GLUE_ESCDIR_SMART ) ) );
- InsertEntry( String( SdResId( STR_GLUE_ESCDIR_LEFT ) ) );
- InsertEntry( String( SdResId( STR_GLUE_ESCDIR_RIGHT ) ) );
- InsertEntry( String( SdResId( STR_GLUE_ESCDIR_TOP ) ) );
- InsertEntry( String( SdResId( STR_GLUE_ESCDIR_BOTTOM ) ) );
+ InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_SMART ) );
+ InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_LEFT ) );
+ InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_RIGHT ) );
+ InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_TOP ) );
+ InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_BOTTOM ) );
/*
- InsertEntry( String( SdResId( STR_GLUE_ESCDIR_LO ) ) );
- InsertEntry( String( SdResId( STR_GLUE_ESCDIR_LU ) ) );
- InsertEntry( String( SdResId( STR_GLUE_ESCDIR_RO ) ) );
- InsertEntry( String( SdResId( STR_GLUE_ESCDIR_RU ) ) );
- InsertEntry( String( SdResId( STR_GLUE_ESCDIR_HORZ ) ) );
- InsertEntry( String( SdResId( STR_GLUE_ESCDIR_VERT ) ) );
- InsertEntry( String( SdResId( STR_GLUE_ESCDIR_ALL ) ) );
+ InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_LO ) );
+ InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_LU ) );
+ InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_RO ) );
+ InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_RU ) );
+ InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_HORZ ) );
+ InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_VERT ) );
+ InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_ALL ) );
*/
}
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index 518dd26d5932..5f6a88ea16a8 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -487,11 +487,8 @@ HeaderFooterTabPage::HeaderFooterTabPage( HeaderFooterDialog* pDialog, ::Window*
moveY( maPBCancel, deltaY );
moveY( maPBHelp, deltaY );
- String aPageNumberStr( SdResId( STR_PAGE_NUMBER ) );
- maCBSlideNumber.SetText( aPageNumberStr );
-
- String aIncludeOnPageStr( SdResId( STR_INCLUDE_ON_PAGE ) );
- maFLIncludeOnPage.SetText( aIncludeOnPageStr );
+ maCBSlideNumber.SetText( SD_RESSTR( STR_PAGE_NUMBER ) );
+ maFLIncludeOnPage.SetText( SD_RESSTR( STR_INCLUDE_ON_PAGE ) );
}
FreeResource();
@@ -568,7 +565,9 @@ void HeaderFooterTabPage::FillFormatList( int eFormat )
int nFormat;
for( nFormat = 0; nFormat < nDateTimeFormatsCount; nFormat++ )
{
- String aStr( SvxDateTimeField::GetFormatted( aDate, aTime, nDateTimeFormats[nFormat], *(SD_MOD()->GetNumberFormatter()), eLanguage ) );
+ OUString aStr( SvxDateTimeField::GetFormatted(
+ aDate, aTime, nDateTimeFormats[nFormat],
+ *(SD_MOD()->GetNumberFormatter()), eLanguage ) );
sal_uInt16 nEntry = maCBDateTimeFormat.InsertEntry( aStr );
maCBDateTimeFormat.SetEntryData( nEntry, (void*)(sal_IntPtr)nDateTimeFormats[nFormat] );
if( nDateTimeFormats[nFormat] == eFormat )
diff --git a/sd/source/ui/dlg/inspagob.cxx b/sd/source/ui/dlg/inspagob.cxx
index 9ffe406f5293..813c54356bb5 100644
--- a/sd/source/ui/dlg/inspagob.cxx
+++ b/sd/source/ui/dlg/inspagob.cxx
@@ -32,7 +32,7 @@ SdInsertPagesObjsDlg::SdInsertPagesObjsDlg(
::Window* pWindow,
const SdDrawDocument* pInDoc,
SfxMedium* pSfxMedium,
- const String& rFileName )
+ const OUString& rFileName )
: ModalDialog ( pWindow, SdResId( DLG_INSERT_PAGES_OBJS ) ),
aLbTree ( this, SdResId( LB_TREE ) ),
aCbxLink ( this, SdResId( CBX_LINK ) ),
@@ -52,7 +52,7 @@ SdInsertPagesObjsDlg::SdInsertPagesObjsDlg(
// insert text
if( !pMedium )
- SetText( String( SdResId( STR_INSERT_TEXT ) ) );
+ SetText( SD_RESSTR( STR_INSERT_TEXT ) );
Reset();
}
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 37ca47b63bc7..fc6a5682f9bf 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -80,7 +80,7 @@ SdNavigatorWin::SdNavigatorWin(
FreeResource();
- maTlbObjects.SetAccessibleName(String(SdResId(STR_OBJECTS_TREE)));
+ maTlbObjects.SetAccessibleName(SD_RESSTR(STR_OBJECTS_TREE));
mpNavigatorCtrlItem = new SdNavigatorControllerItem( SID_NAVIGATOR_STATE, this, mpBindings, rUpdateRequest);
mpPageNameCtrlItem = new SdPageNameControllerItem( SID_NAVIGATOR_PAGENAME, this, mpBindings, rUpdateRequest);
@@ -161,7 +161,7 @@ void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc )
{
SdDrawDocument* pNonConstDoc = (SdDrawDocument*) pDoc; // const as const can...
::sd::DrawDocShell* pDocShell = pNonConstDoc->GetDocSh();
- String aDocShName( pDocShell->GetName() );
+ OUString aDocShName( pDocShell->GetName() );
::sd::ViewShell* pViewShell = pDocShell->GetViewShell();
// Restore the 'ShowAllShapes' flag from the last time (in this session)
@@ -182,7 +182,7 @@ void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc )
if( !maTlbObjects.IsEqualToDoc( pDoc ) )
{
- String aDocName = pDocShell->GetMedium()->GetName();
+ OUString aDocName = pDocShell->GetMedium()->GetName();
maTlbObjects.Clear();
maTlbObjects.Fill( pDoc, (sal_Bool) sal_False, aDocName ); // only normal pages
@@ -312,7 +312,7 @@ IMPL_LINK( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox )
if( nRId > 0 )
{
DBG_ASSERT(aHIDs[nID-NAVIGATOR_DRAGTYPE_URL],"HelpId not added!");
- pMenu->InsertItem( nID, String( SdResId( nRId ) ) );
+ pMenu->InsertItem( nID, SD_RESSTR( nRId ) );
pMenu->SetHelpId( nID, aHIDs[nID - NAVIGATOR_DRAGTYPE_URL] );
}
@@ -341,10 +341,10 @@ IMPL_LINK( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox )
pMenu->InsertItem(
nShowNamedShapesFilter,
- String(SdResId(STR_NAVIGATOR_SHOW_NAMED_SHAPES)));
+ SD_RESSTR(STR_NAVIGATOR_SHOW_NAMED_SHAPES));
pMenu->InsertItem(
nShowAllShapesFilter,
- String(SdResId(STR_NAVIGATOR_SHOW_ALL_SHAPES)));
+ SD_RESSTR(STR_NAVIGATOR_SHOW_ALL_SHAPES));
if (maTlbObjects.GetShowAllShapes())
pMenu->CheckItem(nShowAllShapesFilter);
@@ -372,9 +372,9 @@ IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl)
// if it is the active window, we jump to the page
if( pInfo && pInfo->IsActive() )
{
- String aStr( maTlbObjects.GetSelectEntry() );
+ OUString aStr( maTlbObjects.GetSelectEntry() );
- if( aStr.Len() > 0 )
+ if( !aStr.isEmpty() )
{
SfxStringItem aItem( SID_NAVIGATOR_OBJECT, aStr );
mpBindings->GetDispatcher()->Execute(
@@ -401,7 +401,7 @@ IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl)
IMPL_LINK_NOARG(SdNavigatorWin, SelectDocumentHdl)
{
- String aStrLb = maLbDocs.GetSelectEntry();
+ OUString aStrLb = maLbDocs.GetSelectEntry();
long nPos = maLbDocs.GetSelectEntryPos();
sal_Bool bFound = sal_False;
::sd::DrawDocShell* pDocShell = NULL;
@@ -427,7 +427,7 @@ IMPL_LINK_NOARG(SdNavigatorWin, SelectDocumentHdl)
{
SdDrawDocument* pNonConstDoc = (SdDrawDocument*) pDoc; // const as const can...
::sd::DrawDocShell* pNCDocShell = pNonConstDoc->GetDocSh();
- String aDocName = pNCDocShell->GetMedium()->GetName();
+ OUString aDocName = pNCDocShell->GetMedium()->GetName();
maTlbObjects.Clear();
maTlbObjects.Fill( pDoc, (sal_Bool) sal_False, aDocName ); // only normal pages
}
@@ -569,10 +569,9 @@ void SdNavigatorWin::Resize()
// -----------------------------------------------------------------------
-sal_Bool SdNavigatorWin::InsertFile(const String& rFileName)
+bool SdNavigatorWin::InsertFile(const OUString& rFileName)
{
INetURLObject aURL( rFileName );
- sal_Bool bReturn = sal_True;
if( aURL.GetProtocol() == INET_PROT_NOT_VALID )
{
@@ -582,9 +581,9 @@ sal_Bool SdNavigatorWin::InsertFile(const String& rFileName)
}
// get adjusted FileName
- String aFileName( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aFileName( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
- if (!aFileName.Len())
+ if (aFileName.isEmpty())
{
// show actual document again
maDropFileName = aFileName;
@@ -632,22 +631,22 @@ sal_Bool SdNavigatorWin::InsertFile(const String& rFileName)
}
else
{
- bReturn = sal_False;
delete pMedium;
+ return false;
}
}
else
{
- bReturn = sal_False;
+ return false;
}
}
- return (bReturn);
+ return true;
}
// -----------------------------------------------------------------------
-void SdNavigatorWin::RefreshDocumentLB( const String* pDocName )
+void SdNavigatorWin::RefreshDocumentLB( const OUString* pDocName )
{
sal_uInt16 nPos = 0;
@@ -665,7 +664,7 @@ void SdNavigatorWin::RefreshDocumentLB( const String* pDocName )
if( nPos == LISTBOX_ENTRY_NOTFOUND )
nPos = 0;
- String aStr;
+ OUString aStr;
if( mbDocImported )
aStr = maLbDocs.GetEntry( 0 );
@@ -690,7 +689,7 @@ void SdNavigatorWin::RefreshDocumentLB( const String* pDocName )
SfxMedium *pMedium = pDocShell->GetMedium();
aStr = pMedium ? pMedium->GetName() : OUString();
- if( aStr.Len() )
+ if( !aStr.isEmpty() )
aInfo.SetName();
else
aInfo.SetName( sal_False );
@@ -957,7 +956,7 @@ void SdPageNameControllerItem::StateChanged( sal_uInt16 nSId,
{
const SfxStringItem* pStateItem = PTR_CAST( SfxStringItem, pItem );
DBG_ASSERT( pStateItem, "SfxStringItem expected");
- String aPageName = pStateItem->GetValue();
+ OUString aPageName = pStateItem->GetValue();
if( !pNavigatorWin->maTlbObjects.HasSelectedChildren( aPageName ) )
{
diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx
index 8264101a614d..7c1e1d04b924 100644
--- a/sd/source/ui/dlg/present.cxx
+++ b/sd/source/ui/dlg/present.cxx
@@ -38,7 +38,7 @@ using namespace ::com::sun::star::beans;
SdStartPresentationDlg::SdStartPresentationDlg( Window* pWindow,
const SfxItemSet& rInAttrs,
- const std::vector<String> &rPageNames, SdCustomShowList* pCSList ) :
+ const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList ) :
ModalDialog ( pWindow, "PresentationDialog", "modules/simpress/ui/presentationdialog.ui" ),
pCustomShowList ( pCSList ),
rOutAttrs ( rInAttrs ),
@@ -88,7 +88,7 @@ SdStartPresentationDlg::SdStartPresentationDlg( Window* pWindow,
aTmfPause->SetFormat( TIMEF_SEC );
// fill Listbox with page names
- for (std::vector<String>::const_iterator pIter = rPageNames.begin(); pIter != rPageNames.end(); ++pIter)
+ for (std::vector<OUString>::const_iterator pIter = rPageNames.begin(); pIter != rPageNames.end(); ++pIter)
aLbDias->InsertEntry(*pIter);
if( pCustomShowList )
@@ -151,10 +151,10 @@ SdStartPresentationDlg::SdStartPresentationDlg( Window* pWindow,
ChangePauseHdl( NULL );
}
-String SdStartPresentationDlg::GetDisplayName( sal_Int32 nDisplay,
- DisplayType eType )
+OUString SdStartPresentationDlg::GetDisplayName( sal_Int32 nDisplay,
+ DisplayType eType )
{
- String aName;
+ OUString aName;
switch ( eType )
{
@@ -169,8 +169,7 @@ String SdStartPresentationDlg::GetDisplayName( sal_Int32 nDisplay,
aName = msMonitor->GetText();
break;
}
- const String aNumber( OUString::number( nDisplay ) );
- aName.SearchAndReplace( String("%1"), aNumber );
+ aName = aName.replaceFirst( "%1", OUString::number( nDisplay ) );
return aName;
}
@@ -214,7 +213,7 @@ void SdStartPresentationDlg::InitMonitorSettings()
sal_Int32 nInsertedEntry;
// Initial entry - the auto-detected external monitor
- String aName = GetDisplayName( nExternalIndex + 1, EXTERNAL_IS_NUMBER);
+ OUString aName = GetDisplayName( nExternalIndex + 1, EXTERNAL_IS_NUMBER);
nInsertedEntry = InsertDisplayEntry( aName, 0 );
if( nDefaultSelectedDisplay == 0)
nSelectedIndex = nInsertedEntry;
diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx
index ff8f9a9554d1..9313cb26d161 100644
--- a/sd/source/ui/dlg/prltempl.cxx
+++ b/sd/source/ui/dlg/prltempl.cxx
@@ -96,8 +96,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh,
// from 'Outline 1' style sheet.
if( SFX_ITEM_SET != aInputSet.GetItemState(EE_PARA_NUMBULLET, sal_False, &pItem ))
{
- String aStyleName((SdResId(STR_PSEUDOSHEET_OUTLINE)));
- aStyleName.AppendAscii( " 1" );
+ OUString aStyleName(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE) + " 1");
SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( aStyleName, SD_STYLE_FAMILY_PSEUDO);
if(pFirstStyleSheet)
diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx
index 24ef7403c35a..ee0154eb7caf 100644
--- a/sd/source/ui/dlg/sddlgfact.cxx
+++ b/sd/source/ui/dlg/sddlgfact.cxx
@@ -448,7 +448,7 @@ AbstractSdSnapLineDlg * SdAbstractDialogFactory_Impl::CreateSdSnapLineDlg( ::Win
//add for SdSnapLineDlg end
//add for SdInsertLayerDlg begin
-AbstractSdInsertLayerDlg * SdAbstractDialogFactory_Impl::CreateSdInsertLayerDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, bool bDeletable, String aStr ) //add for SdInsertLayerDlg
+AbstractSdInsertLayerDlg * SdAbstractDialogFactory_Impl::CreateSdInsertLayerDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr ) //add for SdInsertLayerDlg
{
return new AbstractSdInsertLayerDlg_Impl( new SdInsertLayerDlg( pWindow, rInAttrs, bDeletable, aStr ) );
}
@@ -462,7 +462,7 @@ AbstractSdInsertPasteDlg * SdAbstractDialogFactory_Impl::CreateSdInsertPasteDlg(
//add for SdInsertPasteDlg end
//add for SdInsertPagesObjsDlg begin
-AbstractSdInsertPagesObjsDlg * SdAbstractDialogFactory_Impl::CreateSdInsertPagesObjsDlg( ::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const String& rFileName )
+AbstractSdInsertPagesObjsDlg * SdAbstractDialogFactory_Impl::CreateSdInsertPagesObjsDlg( ::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName )
{
return new AbstractSdInsertPagesObjsDlg_Impl( new SdInsertPagesObjsDlg( pParent, pDoc, pSfxMedium, rFileName ) );
}
@@ -489,7 +489,7 @@ SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdParagraphTabDlg( :
// add for SdStartPresentationDlg begin
AbstractSdStartPresDlg * SdAbstractDialogFactory_Impl::CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs,
- const std::vector<String> &rPageNames, SdCustomShowList* pCSList )
+ const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList )
{
return new AbstractSdStartPresDlg_Impl( new SdStartPresentationDlg( pWindow, rInAttrs, rPageNames, pCSList ) );
}
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index d4d2049ce2e8..63308bae098b 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -261,14 +261,14 @@ public:
virtual AbstractAssistentDlg* CreateAssistentDlg( ::Window* pParent, sal_Bool bAutoPilot);
virtual AbstractSdModifyFieldDlg* CreateSdModifyFieldDlg( ::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet );
virtual AbstractSdSnapLineDlg* CreateSdSnapLineDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView);
- virtual AbstractSdInsertLayerDlg* CreateSdInsertLayerDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, bool bDeletable, String aStr );
+ virtual AbstractSdInsertLayerDlg* CreateSdInsertLayerDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr );
virtual AbstractSdInsertPasteDlg* CreateSdInsertPasteDlg( ::Window* pWindow );
- virtual AbstractSdInsertPagesObjsDlg* CreateSdInsertPagesObjsDlg( ::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const String& rFileName );
+ virtual AbstractSdInsertPagesObjsDlg* CreateSdInsertPagesObjsDlg( ::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName );
virtual AbstractMorphDlg* CreateMorphDlg( ::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2);
virtual SfxAbstractTabDialog* CreateSdOutlineBulletTabDlg ( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = NULL );
virtual SfxAbstractTabDialog* CreateSdParagraphTabDlg ( ::Window* pParent, const SfxItemSet* pAttr );
virtual AbstractSdStartPresDlg* CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs,
- const std::vector<String> &rPageNames, SdCustomShowList* pCSList );
+ const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList );
virtual VclAbstractDialog* CreateRemoteDialog( ::Window* pWindow ); // ad for RemoteDialog
virtual SfxAbstractTabDialog* CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool );
virtual AbstractSdPresLayoutDlg* CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, ::Window* pWindow, const SfxItemSet& rInAttrs);
diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx
index 93db40368f92..4ee6a2f9b809 100644
--- a/sd/source/ui/func/fusldlg.cxx
+++ b/sd/source/ui/func/fusldlg.cxx
@@ -62,7 +62,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
PresentationSettings& rPresentationSettings = mpDoc->getPresentationSettings();
SfxItemSet aDlgSet( mpDoc->GetPool(), ATTR_PRESENT_START, ATTR_PRESENT_END );
- std::vector<String> aPageNameList(mpDoc->GetSdPageCount( PK_STANDARD ));
+ std::vector<OUString> aPageNameList(mpDoc->GetSdPageCount( PK_STANDARD ));
const String& rPresPage = rPresentationSettings.maPresPage;
String aFirstPage;
SdPage* pPage = NULL;
@@ -71,12 +71,11 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
for( nPage = mpDoc->GetSdPageCount( PK_STANDARD ) - 1L; nPage >= 0L; nPage-- )
{
pPage = mpDoc->GetSdPage( (sal_uInt16) nPage, PK_STANDARD );
- String aStr( pPage->GetName() );
+ OUString aStr( pPage->GetName() );
- if ( !aStr.Len() )
+ if ( aStr.isEmpty() )
{
- aStr = String( SdResId( STR_PAGE ) );
- aStr.Append( OUString::valueOf( nPage + 1 ) );
+ aStr = SD_RESSTR( STR_PAGE ) + OUString::number( nPage + 1 );
}
aPageNameList[ nPage ] = aStr;
diff --git a/sd/source/ui/inc/filedlg.hxx b/sd/source/ui/inc/filedlg.hxx
index fdfffdc24694..d6fab5e6919e 100644
--- a/sd/source/ui/inc/filedlg.hxx
+++ b/sd/source/ui/inc/filedlg.hxx
@@ -52,8 +52,8 @@ public:
~SdOpenSoundFileDialog();
ErrCode Execute();
- String GetPath() const;
- void SetPath( const String& rPath );
+ OUString GetPath() const;
+ void SetPath( const OUString& rPath );
String ReqDisplayDirectory() const;
};
diff --git a/sd/source/ui/inc/inspagob.hxx b/sd/source/ui/inc/inspagob.hxx
index 16bd9b88e123..038b464fe675 100644
--- a/sd/source/ui/inc/inspagob.hxx
+++ b/sd/source/ui/inc/inspagob.hxx
@@ -40,7 +40,7 @@ private:
SfxMedium* pMedium;
const SdDrawDocument* mpDoc;
- const String& rName;
+ const OUString& rName;
void Reset();
DECL_LINK( SelectObjectHdl, void * );
@@ -49,7 +49,7 @@ public:
SdInsertPagesObjsDlg( Window* pParent,
const SdDrawDocument* pDoc,
SfxMedium* pSfxMedium,
- const String& rFileName );
+ const OUString& rFileName );
~SdInsertPagesObjsDlg();
/** returns the list
diff --git a/sd/source/ui/inc/navigatr.hxx b/sd/source/ui/inc/navigatr.hxx
index 4c5b8250bf46..0ab2f7c33bb7 100644
--- a/sd/source/ui/inc/navigatr.hxx
+++ b/sd/source/ui/inc/navigatr.hxx
@@ -101,9 +101,9 @@ public:
virtual void KeyInput( const KeyEvent& rKEvt );
void InitTreeLB( const SdDrawDocument* pDoc );
- void RefreshDocumentLB( const String* pDocName = NULL );
+ void RefreshDocumentLB( const OUString* pDocName = NULL );
- sal_Bool InsertFile(const String& rFileName);
+ bool InsertFile(const OUString& rFileName);
NavigatorDragType GetNavigatorDragType();
void SetNavigatorDragType(NavigatorDragType eType) { meDragType = eType; }
@@ -126,7 +126,7 @@ private:
Size maSize;
Size maMinSize;
sal_Bool mbDocImported;
- String maDropFileName;
+ OUString maDropFileName;
NavigatorDragType meDragType;
std::vector<NavDocInfo> maDocList;
SfxBindings* mpBindings;
diff --git a/sd/source/ui/inc/present.hxx b/sd/source/ui/inc/present.hxx
index c49aab9a2983..081000d491fa 100644
--- a/sd/source/ui/inc/present.hxx
+++ b/sd/source/ui/inc/present.hxx
@@ -82,12 +82,12 @@ private:
};
sal_Int32 InsertDisplayEntry(const rtl::OUString &aName,
sal_Int32 nDisplay);
- String GetDisplayName( sal_Int32 nDisplay,
+ OUString GetDisplayName( sal_Int32 nDisplay,
DisplayType eType );
public:
SdStartPresentationDlg( Window* pWindow,
const SfxItemSet& rInAttrs,
- const std::vector<String> &rPageNames,
+ const std::vector<OUString> &rPageNames,
SdCustomShowList* pCSList );
void GetAttr( SfxItemSet& rOutAttrs );