diff options
123 files changed, 1357 insertions, 1359 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 89b8df411f87..1a92832b26b1 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -618,7 +618,7 @@ class SfxAccCfgLBoxString_Impl : public SvLBoxString public: SfxAccCfgLBoxString_Impl( SvTreeListEntry* pEntry, sal_uInt16 nFlags, - const String& sText ); + const OUString& sText ); virtual ~SfxAccCfgLBoxString_Impl(); @@ -629,7 +629,7 @@ class SfxAccCfgLBoxString_Impl : public SvLBoxString //----------------------------------------------- SfxAccCfgLBoxString_Impl::SfxAccCfgLBoxString_Impl( SvTreeListEntry* pEntry, sal_uInt16 nFlags, - const String& sText ) + const OUString& sText ) : SvLBoxString(pEntry, nFlags, sText) { } @@ -745,7 +745,7 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( Window* pParent, const SfxIt { FreeResource(); - aFilterAllStr = String( SfxResId( STR_SFX_FILTERNAME_ALL ) ); + aFilterAllStr = SfxResId( STR_SFX_FILTERNAME_ALL ); // install handler functions aChangeButton.SetClickHdl( LINK( this, SfxAcceleratorConfigPage, ChangeHdl )); @@ -870,8 +870,8 @@ void SfxAcceleratorConfigPage::InitAccCfg() original SvTabListBox! */ void SfxAcceleratorConfigPage::CreateCustomItems( SvTreeListEntry* pEntry, - const String& sCol1 , - const String& sCol2 ) + const OUString& sCol1 , + const OUString& sCol2 ) { SfxAccCfgLBoxString_Impl* pStringItem = new SfxAccCfgLBoxString_Impl(pEntry, 0, sCol1); pEntry->ReplaceItem(pStringItem, 1); @@ -910,8 +910,8 @@ void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceler for (i1=0; i1<c1; ++i1) { KeyCode aKey = KEYCODE_ARRAY[i1]; - String sKey = aKey.GetName(); - if (!sKey.Len()) + OUString sKey = aKey.GetName(); + if (sKey.isEmpty()) continue; TAccInfo* pEntry = new TAccInfo(i1, nListPos, aKey); SvTreeListEntry* pLBEntry = aEntriesBox.InsertEntryToColumn(sKey, 0L, LIST_APPEND, 0xFFFF); @@ -928,7 +928,7 @@ void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceler { const css::awt::KeyEvent& aAWTKey = lKeys[i2]; OUString sCommand = xAccMgr->getCommandByKeyEvent(aAWTKey); - String sLabel = GetLabel4Command(sCommand); + OUString sLabel = GetLabel4Command(sCommand); KeyCode aKeyCode = ::svt::AcceleratorExecute::st_AWTKey2VCLKey(aAWTKey); sal_uInt16 nPos = MapKeyCodeToPos(aKeyCode); @@ -961,7 +961,7 @@ void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceler TAccInfo* pEntry = (TAccInfo*)pLBEntry->GetUserData(); pEntry->m_bIsConfigurable = sal_False; - CreateCustomItems(pLBEntry, aEntriesBox.GetEntryText(pLBEntry, 0), String()); + CreateCustomItems(pLBEntry, aEntriesBox.GetEntryText(pLBEntry, 0), OUString()); } } @@ -1046,9 +1046,9 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, ChangeHdl) { sal_uInt16 nPos = (sal_uInt16) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() ); TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData(); - String sNewCommand = pFunctionBox->GetCurCommand(); - String sLabel = pFunctionBox->GetCurLabel(); - if (!sLabel.Len()) + OUString sNewCommand = pFunctionBox->GetCurCommand(); + OUString sLabel = pFunctionBox->GetCurLabel(); + if (sLabel.isEmpty()) sLabel = GetLabel4Command(sNewCommand); pEntry->m_sCommand = sNewCommand; @@ -1068,7 +1068,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, RemoveHdl) // remove function name from selected entry sal_uInt16 nCol = aEntriesBox.TabCount() - 1; - aEntriesBox.SetEntryText( String(), nPos, nCol ); + aEntriesBox.SetEntryText( OUString(), nPos, nCol ); pEntry->m_sCommand = OUString(); ((Link &) pFunctionBox->GetSelectHdl()).Call( pFunctionBox ); @@ -1079,7 +1079,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, RemoveHdl) IMPL_LINK( SfxAcceleratorConfigPage, SelectHdl, Control*, pListBox ) { // disable help - Help::ShowBalloon( this, Point(), String() ); + Help::ShowBalloon( this, Point(), OUString() ); if ( pListBox == &aEntriesBox ) { sal_uInt16 nPos = (sal_uInt16) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() ); @@ -1384,7 +1384,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, SaveHdl) } //----------------------------------------------- -void SfxAcceleratorConfigPage::StartFileDialog( WinBits nBits, const String& rTitle ) +void SfxAcceleratorConfigPage::StartFileDialog( WinBits nBits, const OUString& rTitle ) { bool bSave = ( ( nBits & WB_SAVEAS ) == WB_SAVEAS ); short nDialogType = bSave ? css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION @@ -1429,8 +1429,8 @@ void SfxAcceleratorConfigPage::Reset( const SfxItemSet& rSet ) // change te description of the radio button, which switch to the module // dependend accelerator configuration - String sButtonText = aModuleButton.GetText(); - sButtonText.SearchAndReplace(OUString("$(MODULE)"), m_sModuleUIName); + OUString sButtonText = aModuleButton.GetText(); + sButtonText = sButtonText.replaceFirst("$(MODULE)", m_sModuleUIName); aModuleButton.SetText(sButtonText); if (m_xModule.is()) @@ -1495,8 +1495,8 @@ OUString SfxAcceleratorConfigPage::GetLabel4Command(const OUString& sCommand) if (xModuleConf.is()) { ::comphelper::SequenceAsHashMap lProps(xModuleConf->getByName(sCommand)); - String sLabel = String(lProps.getUnpackedValueOrDefault(CMDPROP_UINAME, OUString())); - if (sLabel.Len()) + OUString sLabel = lProps.getUnpackedValueOrDefault(CMDPROP_UINAME, OUString()); + if (!sLabel.isEmpty()) return sLabel; } } @@ -1515,7 +1515,7 @@ OUString SfxAcceleratorConfigPage::GetLabel4Command(const OUString& sCommand) } else { - String aRet(OUString("Symbols: ")); + OUString aRet("Symbols: "); sal_Int32 nPos = sCommand.indexOf(".uno:InsertSymbol?Symbols:string="); if ( nPos == 0 ) { @@ -1533,7 +1533,7 @@ SfxTabPage* SfxAcceleratorConfigPage::Create( Window* pParent, const SfxItemSet& } //----------------------------------------------- -css::uno::Reference< css::frame::XModel > SfxAcceleratorConfigPage::SearchForAlreadyLoadedDoc(const String& /*sName*/) +css::uno::Reference< css::frame::XModel > SfxAcceleratorConfigPage::SearchForAlreadyLoadedDoc(const OUString& /*sName*/) { return css::uno::Reference< css::frame::XModel >(); } diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 6277eaf82fba..acb3c7be5b8a 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1067,12 +1067,12 @@ MenuSaveInData::GetEntries() if ( m_xMenuSettings.is() ) { - LoadSubMenus( m_xMenuSettings, String(), pRootEntry ); + LoadSubMenus( m_xMenuSettings, OUString(), pRootEntry ); } else if ( GetDefaultData() != NULL ) { // If the doc has no config settings use module config settings - LoadSubMenus( GetDefaultData()->m_xMenuSettings, String(), pRootEntry ); + LoadSubMenus( GetDefaultData()->m_xMenuSettings, OUString(), pRootEntry ); } } @@ -1349,7 +1349,7 @@ MenuSaveInData::Reset() class PopupPainter : public SvLBoxString { public: - PopupPainter( SvTreeListEntry* pEntry, const String& rStr ) + PopupPainter( SvTreeListEntry* pEntry, const OUString& rStr ) : SvLBoxString( pEntry, 0, rStr ) { } @@ -1560,11 +1560,11 @@ SvxDescriptionEdit::SvxDescriptionEdit( Window* pParent, const ResId& _rId ) : // ----------------------------------------------------------------------- -void SvxDescriptionEdit::SetNewText( const String& _rText ) +void SvxDescriptionEdit::SetNewText( const OUString& _rText ) { - String sTemp( _rText ); + OUString sTemp( _rText ); sal_Bool bShow = sal_False; - if ( sTemp.Len() > 0 ) + if ( !sTemp.isEmpty() ) { // detect if a scrollbar is necessary Rectangle aRect = GetTextRect( m_aRealRect, sTemp, TEXT_DRAW_WORDBREAK | TEXT_DRAW_MULTILINE ); @@ -1575,7 +1575,7 @@ void SvxDescriptionEdit::SetNewText( const String& _rText ) GetVScrollBar()->Show( bShow ); if ( bShow ) - sTemp += '\n'; + sTemp += "\n"; SetText( sTemp ); } @@ -1615,8 +1615,8 @@ SvxConfigPage::SvxConfigPage( aDescriptionField.SetAutoScroll( sal_True ); aDescriptionField.EnableCursor( sal_False ); - aMoveUpButton.SetAccessibleName(String(CUI_RES(BUTTON_STR_UP))); - aMoveDownButton.SetAccessibleName(String(CUI_RES(BUTTON_STR_DOWN))); + aMoveUpButton.SetAccessibleName(CUI_RES(BUTTON_STR_UP)); + aMoveDownButton.SetAccessibleName(CUI_RES(BUTTON_STR_DOWN)); aMoveUpButton.SetAccessibleRelationMemberOf(&aContentsSeparator); aMoveDownButton.SetAccessibleRelationMemberOf(&aContentsSeparator); aNewTopLevelButton.SetAccessibleRelationMemberOf(&aTopLevelSeparator); @@ -2000,7 +2000,7 @@ void SvxConfigPage::ReloadTopLevelListBox( SvxConfigEntry* pToSelect ) } void SvxConfigPage::AddSubMenusToUI( - const String& rBaseTitle, SvxConfigEntry* pParentData ) + const OUString& rBaseTitle, SvxConfigEntry* pParentData ) { SvxEntries::const_iterator iter = pParentData->GetEntries()->begin(); SvxEntries::const_iterator end = pParentData->GetEntries()->end(); @@ -2054,10 +2054,10 @@ SvxEntries* SvxConfigPage::FindParentForChild( SvTreeListEntry* SvxConfigPage::AddFunction( SvTreeListEntry* pTarget, bool bFront, bool bAllowDuplicates ) { - String aDisplayName = pSelectorDlg->GetSelectedDisplayName(); - String aURL = pSelectorDlg->GetScriptURL(); + OUString aDisplayName = pSelectorDlg->GetSelectedDisplayName(); + OUString aURL = pSelectorDlg->GetScriptURL(); - if ( !aURL.Len() ) + if ( aURL.isEmpty() ) { return NULL; } @@ -2192,7 +2192,7 @@ SvTreeListEntry* SvxConfigPage::InsertEntryIntoUI( return pNewEntry; } -IMPL_LINK( SvxConfigPage, AsyncInfoMsg, String*, pMsg ) +IMPL_LINK( SvxConfigPage, AsyncInfoMsg, OUString*, pMsg ) { (void)pMsg; @@ -2479,10 +2479,9 @@ bool SvxMenuConfigPage::DeleteSelectedContent() short SvxMenuConfigPage::QueryReset() { - String msg = - String( CUI_RES( RID_SVXSTR_CONFIRM_MENU_RESET ) ); + OUString msg = CUI_RES( RID_SVXSTR_CONFIRM_MENU_RESET ); - String saveInName = aSaveInListBox.GetEntry( + OUString saveInName = aSaveInListBox.GetEntry( aSaveInListBox.GetSelectEntryPos() ); OUString label = replaceSaveInName( msg, saveInName ); @@ -2536,7 +2535,7 @@ IMPL_LINK( SvxMenuConfigPage, MenuSelectHdl, MenuButton *, pButton ) SvxConfigEntry* pMenuData = GetTopLevelSelection(); OUString aNewName( stripHotKey( pMenuData->GetName() ) ); - String aDesc = CUI_RESSTR( RID_SVXSTR_LABEL_NEW_NAME ); + OUString aDesc = CUI_RESSTR( RID_SVXSTR_LABEL_NEW_NAME ); SvxNameDialog* pNameDialog = new SvxNameDialog( this, aNewName, aDesc ); pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_MENU ); @@ -2594,7 +2593,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton ) case ID_ADD_SUBMENU: { OUString aNewName; - String aDesc = CUI_RESSTR( RID_SVXSTR_SUBMENU_NAME ); + OUString aDesc = CUI_RESSTR( RID_SVXSTR_SUBMENU_NAME ); SvxNameDialog* pNameDialog = new SvxNameDialog( this, aNewName, aDesc ); pNameDialog->SetHelpId( HID_SVX_CONFIG_NAME_SUBMENU ); @@ -2640,7 +2639,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton ) (SvxConfigEntry*) pActEntry->GetUserData(); OUString aNewName( stripHotKey( pEntry->GetName() ) ); - String aDesc = CUI_RESSTR( RID_SVXSTR_LABEL_NEW_NAME ); + OUString aDesc = CUI_RESSTR( RID_SVXSTR_LABEL_NEW_NAME ); SvxNameDialog* pNameDialog = new SvxNameDialog( this, aNewName, aDesc ); pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_MENU_ITEM ); @@ -2719,8 +2718,7 @@ IMPL_LINK( SvxMenuConfigPage, AddCommandsHdl, Button *, pButton ) pSelectorDlg->SetAddHdl( LINK( this, SvxMenuConfigPage, AddFunctionHdl ) ); - pSelectorDlg->SetDialogDescription( String( - CUI_RES( RID_SVXSTR_MENU_ADDCOMMANDS_DESCRIPTION ) ) ); + pSelectorDlg->SetDialogDescription( CUI_RES( RID_SVXSTR_MENU_ADDCOMMANDS_DESCRIPTION ) ); } // Position the Script Selector over the Add button so it is @@ -2790,8 +2788,7 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog( if ( bCreateMenu ) { // Generate custom name for new menu - String prefix = - String( CUI_RES( RID_SVXSTR_NEW_MENU ) ); + OUString prefix = CUI_RES( RID_SVXSTR_NEW_MENU ); OUString newname = generateCustomName( prefix, entries ); OUString newurl = generateCustomMenuURL( pEntries ); @@ -2857,8 +2854,8 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog( aMoveDownButton.SetClickHdl ( LINK( this, SvxMainMenuOrganizerDialog, MoveHdl) ); - aMoveUpButton.SetAccessibleName(String(CUI_RES(BUTTON_STR_UP))); - aMoveDownButton.SetAccessibleName(String(CUI_RES(BUTTON_STR_DOWN))); + aMoveUpButton.SetAccessibleName(CUI_RES(BUTTON_STR_UP)); + aMoveDownButton.SetAccessibleName(CUI_RES(BUTTON_STR_DOWN)); } IMPL_LINK(SvxMainMenuOrganizerDialog, ModifyHdl, Edit*, pEdit) @@ -3273,7 +3270,7 @@ IMPL_LINK( SvxToolbarConfigPage, ToolbarSelectHdl, MenuButton *, pButton ) case ID_RENAME: { OUString aNewName( stripHotKey( pToolbar->GetName() ) ); - String aDesc = CUI_RESSTR( RID_SVXSTR_LABEL_NEW_NAME ); + OUString aDesc = CUI_RESSTR( RID_SVXSTR_LABEL_NEW_NAME ); SvxNameDialog* pNameDialog = new SvxNameDialog( this, aNewName, aDesc ); pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_TOOLBAR ); @@ -3364,7 +3361,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) (SvxConfigEntry*) pActEntry->GetUserData(); OUString aNewName( stripHotKey( pEntry->GetName() ) ); - String aDesc = CUI_RESSTR( RID_SVXSTR_LABEL_NEW_NAME ); + OUString aDesc = CUI_RESSTR( RID_SVXSTR_LABEL_NEW_NAME ); SvxNameDialog* pNameDialog = new SvxNameDialog( this, aNewName, aDesc ); pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_TOOLBAR_ITEM ); @@ -4539,10 +4536,9 @@ void SvxToolbarConfigPage::UpdateButtonStates() short SvxToolbarConfigPage::QueryReset() { - String msg = - String( CUI_RES( RID_SVXSTR_CONFIRM_TOOLBAR_RESET ) ); + OUString msg = CUI_RES( RID_SVXSTR_CONFIRM_TOOLBAR_RESET ); - String saveInName = aSaveInListBox.GetEntry( + OUString saveInName = aSaveInListBox.GetEntry( aSaveInListBox.GetSelectEntryPos() ); OUString label = replaceSaveInName( msg, saveInName ); @@ -4630,8 +4626,7 @@ IMPL_LINK( SvxToolbarConfigPage, NewToolbarHdl, Button *, pButton ) { (void)pButton; - String prefix = - String( CUI_RES( RID_SVXSTR_NEW_TOOLBAR ) ); + OUString prefix = CUI_RES( RID_SVXSTR_NEW_TOOLBAR ); OUString aNewName = generateCustomName( prefix, GetSaveInData()->GetEntries() ); @@ -5261,7 +5256,7 @@ IMPL_LINK( SvxIconSelectorDialog, DeleteHdl, PushButton *, pButton ) { (void)pButton; - OUString message = String( CUI_RES( RID_SVXSTR_DELETE_ICON_CONFIRM ) ); + OUString message = CUI_RES( RID_SVXSTR_DELETE_ICON_CONFIRM ); bool ret = WarningBox( this, WinBits(WB_OK_CANCEL), message ).Execute(); if ( ret == RET_OK ) @@ -5560,14 +5555,14 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL ) SvxIconReplacementDialog :: SvxIconReplacementDialog( Window *pWindow, const OUString& aMessage, bool /*bYestoAll*/ ) : -MessBox( pWindow, WB_DEF_YES, String( CUI_RES( RID_SVXSTR_REPLACE_ICON_CONFIRM ) ), String( CUI_RES( RID_SVXSTR_REPLACE_ICON_WARNING ) ) ) +MessBox( pWindow, WB_DEF_YES, CUI_RES( RID_SVXSTR_REPLACE_ICON_CONFIRM ), CUI_RES( RID_SVXSTR_REPLACE_ICON_WARNING ) ) { SetImage( WarningBox::GetStandardImage() ); SetMessText( ReplaceIconName( aMessage ) ); RemoveButton( 1 ); AddButton( BUTTON_YES, 2, 0 ); - AddButton( String( CUI_RES( RID_SVXSTR_YESTOALL ) ), 5, 0 ); + AddButton( CUI_RES( RID_SVXSTR_YESTOALL ), 5, 0 ); AddButton( BUTTON_NO, 3, 0 ); AddButton( BUTTON_CANCEL, 4, 0 ); } @@ -5575,7 +5570,7 @@ MessBox( pWindow, WB_DEF_YES, String( CUI_RES( RID_SVXSTR_REPLACE_ICON_CONFIRM ) SvxIconReplacementDialog :: SvxIconReplacementDialog( Window *pWindow, const OUString& aMessage ) : -MessBox( pWindow, WB_YES_NO_CANCEL, String( CUI_RES( RID_SVXSTR_REPLACE_ICON_CONFIRM ) ), String( CUI_RES( RID_SVXSTR_REPLACE_ICON_WARNING ) ) ) +MessBox( pWindow, WB_YES_NO_CANCEL, CUI_RES( RID_SVXSTR_REPLACE_ICON_CONFIRM ), CUI_RES( RID_SVXSTR_REPLACE_ICON_WARNING ) ) { SetImage( WarningBox::GetStandardImage() ); SetMessText( ReplaceIconName( aMessage )); @@ -5584,7 +5579,7 @@ MessBox( pWindow, WB_YES_NO_CANCEL, String( CUI_RES( RID_SVXSTR_REPLACE_ICON_CON OUString SvxIconReplacementDialog :: ReplaceIconName( const OUString& rMessage ) { OUString name; - OUString message = String( CUI_RES( RID_SVXSTR_REPLACE_ICON_WARNING ) ); + OUString message = CUI_RES( RID_SVXSTR_REPLACE_ICON_WARNING ); OUString placeholder("%ICONNAME" ); sal_Int32 pos = message.indexOf( placeholder ); if ( pos != -1 ) diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 28b3ee4ae9a9..509a3728d7d3 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -295,7 +295,7 @@ void SfxConfigFunctionListBox_Impl::ClearAll() if ( pData->nKind == SFX_CFGFUNCTION_SCRIPT ) { - String* pScriptURI = (String*)pData->pObject; + OUString* pScriptURI = (OUString*)pData->pObject; delete pScriptURI; } @@ -313,38 +313,38 @@ void SfxConfigFunctionListBox_Impl::ClearAll() Clear(); } -String SfxConfigFunctionListBox_Impl::GetSelectedScriptURI() +OUString SfxConfigFunctionListBox_Impl::GetSelectedScriptURI() { SvTreeListEntry *pEntry = FirstSelected(); if ( pEntry ) { SfxGroupInfo_Impl *pData = (SfxGroupInfo_Impl*) pEntry->GetUserData(); if ( pData && ( pData->nKind == SFX_CFGFUNCTION_SCRIPT ) ) - return *(String*)pData->pObject; + return *(OUString*)pData->pObject; } - return String(); + return OUString(); } -String SfxConfigFunctionListBox_Impl::GetCurCommand() +OUString SfxConfigFunctionListBox_Impl::GetCurCommand() { SvTreeListEntry *pEntry = FirstSelected(); if (!pEntry) - return String(); + return OUString(); SfxGroupInfo_Impl *pData = (SfxGroupInfo_Impl*) pEntry->GetUserData(); if (!pData) - return String(); + return OUString(); return pData->sCommand; } -String SfxConfigFunctionListBox_Impl::GetCurLabel() +OUString SfxConfigFunctionListBox_Impl::GetCurLabel() { SvTreeListEntry *pEntry = FirstSelected(); if (!pEntry) - return String(); + return OUString(); SfxGroupInfo_Impl *pData = (SfxGroupInfo_Impl*) pEntry->GetUserData(); if (!pData) - return String(); - if (pData->sLabel.Len()) + return OUString(); + if (!pData->sLabel.isEmpty()) return pData->sLabel; return pData->sCommand; } @@ -370,10 +370,10 @@ struct SvxConfigGroupBoxResource_Impl : public Resource Image m_docImage; OUString m_sMyMacros; OUString m_sProdMacros; - String m_sMacros; - String m_sDlgMacros; - String m_aHumanAppName; - String m_aStrGroupStyles; + OUString m_sMacros; + OUString m_sDlgMacros; + OUString m_aHumanAppName; + OUString m_aStrGroupStyles; Image m_collapsedImage; Image m_expandedImage; @@ -590,7 +590,7 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::uno::XComp new SfxGroupInfo_Impl( SFX_CFGGROUP_SCRIPTCONTAINER, 0, static_cast<void *>(rootNode.get())); - String aTitle(pImp->m_sDlgMacros); + OUString aTitle(pImp->m_sDlgMacros); SvTreeListEntry *pNewEntry = InsertEntry( aTitle, NULL ); pNewEntry->SetUserData( pInfo ); pNewEntry->EnableChildrenOnDemand( sal_True ); @@ -697,7 +697,7 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::uno::XComp // add styles if ( m_xContext.is() ) { - String sStyle( pImp->m_aStrGroupStyles ); + OUString sStyle( pImp->m_aStrGroupStyles ); SvTreeListEntry *pEntry = InsertEntry( sStyle, 0 ); SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_STYLES, 0, 0 ); // TODO last parameter should contain user data aArr.push_back( pInfo ); @@ -901,7 +901,7 @@ void SfxConfigGroupListBox_Impl::GroupSelected() xPropSet->getPropertyValue("URI"); value >>= uri; - String* pScriptURI = new String( uri ); + OUString* pScriptURI = new OUString( uri ); SfxGroupInfo_Impl* pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGFUNCTION_SCRIPT, 0, pScriptURI ); Image aImage = GetImage( children[n], Reference< XComponentContext >(), sal_False ); @@ -1125,39 +1125,39 @@ void SfxConfigGroupListBox_Impl::SelectMacro( const SfxMacroInfoItem *pItem ) pItem->GetQualifiedName() ); } -void SfxConfigGroupListBox_Impl::SelectMacro( const String& rBasic, - const String& rMacro ) +void SfxConfigGroupListBox_Impl::SelectMacro( const OUString& rBasic, + const OUString& rMacro ) { - String aBasicName( rBasic ); - aBasicName += ' '; + OUString aBasicName( rBasic ); + aBasicName += " "; aBasicName += pImp->m_sMacros; - String aLib, aModule, aMethod; + OUString aLib, aModule, aMethod; sal_uInt16 nCount = comphelper::string::getTokenCount(rMacro, '.'); - aMethod = rMacro.GetToken( nCount-1, '.' ); + aMethod = rMacro.getToken( nCount-1, '.' ); if ( nCount > 2 ) { - aLib = rMacro.GetToken( 0, '.' ); - aModule = rMacro.GetToken( nCount-2, '.' ); + aLib = rMacro.getToken( 0, '.' ); + aModule = rMacro.getToken( nCount-2, '.' ); } SvTreeListEntry *pEntry = FirstChild(0); while ( pEntry ) { - String aEntryBas = GetEntryText( pEntry ); + OUString aEntryBas = GetEntryText( pEntry ); if ( aEntryBas == aBasicName ) { Expand( pEntry ); SvTreeListEntry *pLib = FirstChild( pEntry ); while ( pLib ) { - String aEntryLib = GetEntryText( pLib ); + OUString aEntryLib = GetEntryText( pLib ); if ( aEntryLib == aLib ) { Expand( pLib ); SvTreeListEntry *pMod = FirstChild( pLib ); while ( pMod ) { - String aEntryMod = GetEntryText( pMod ); + OUString aEntryMod = GetEntryText( pMod ); if ( aEntryMod == aModule ) { Expand( pMod ); @@ -1166,7 +1166,7 @@ void SfxConfigGroupListBox_Impl::SelectMacro( const String& rBasic, SvTreeListEntry *pMethod = pFunctionListBox->First(); while ( pMethod ) { - String aEntryMethod = GetEntryText( pMethod ); + OUString aEntryMethod = GetEntryText( pMethod ); if ( aEntryMethod == aMethod ) { pFunctionListBox->Select( pMethod ); diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx index 54c8f847995d..e3563ee8a5fd 100644 --- a/cui/source/customize/eventdlg.cxx +++ b/cui/source/customize/eventdlg.cxx @@ -61,8 +61,8 @@ SvxEventConfigPage::SvxEventConfigPage( Window *pParent, const SfxItemSet& rSet, aSaveInListBox( this, CUI_RES( LB_SAVEIN ) ), bAppConfig ( sal_True ) { - mpImpl->pStrEvent = new String( CUI_RES( STR_EVENT )); - mpImpl->pAssignedMacro = new String( CUI_RES( STR_ASSMACRO )); + mpImpl->pStrEvent = new OUString( CUI_RES( STR_EVENT )); + mpImpl->pAssignedMacro = new OUString( CUI_RES( STR_ASSMACRO )); mpImpl->pEventLB = new _HeaderTabListBox( this, CUI_RES( LB_EVENT )); mpImpl->pAssignFT = new FixedText( this, CUI_RES( FT_ASSIGN )); mpImpl->pAssignPB = new PushButton( this, CUI_RES( PB_ASSIGN )); diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index b5b7566eb162..acffd8374cfe 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -434,14 +434,14 @@ class IconLBoxString : public SvLBoxString int m_nxImageOffset; public: - IconLBoxString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const String& sText, + IconLBoxString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& sText, Image* pMacroImg, Image* pComponentImg ); virtual void Paint( const Point& rPos, SvTreeListBox& rOutDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry); }; -IconLBoxString::IconLBoxString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const String& sText, +IconLBoxString::IconLBoxString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& sText, Image* pMacroImg, Image* pComponentImg ) : SvLBoxString( pEntry, nFlags, sText ) , m_pMacroImg( pMacroImg ) @@ -455,8 +455,8 @@ void IconLBoxString::Paint( const Point& aPos, SvTreeListBox& aDevice, const SvViewDataEntry* /*pView*/, const SvTreeListEntry* /*pEntry*/) { - String aTxt( GetText() ); - if( aTxt.Len() ) + OUString aTxt( GetText() ); + if( !aTxt.isEmpty() ) { OUString aURL( aTxt ); sal_Int32 nIndex = aURL.indexOf( aVndSunStarUNO ); @@ -538,13 +538,13 @@ void _SvxMacroTabPage::DisplayAppEvents( bool appEvents) } OUString eventURL = h_it->second.second; - String displayName( CUI_RES( displayableEvent->nEventResourceID ) ); + OUString displayName( CUI_RES( displayableEvent->nEventResourceID ) ); - displayName += '\t'; + displayName += "\t"; SvTreeListEntry* _pE = rListBox.InsertEntry( displayName ); OUString* pEventName = new OUString( sEventName ); _pE->SetUserData( (void*)pEventName ); - String sNew( eventURL ); + OUString sNew( eventURL ); _pE->ReplaceItem( new IconLBoxString( _pE, 0, sNew, mpImpl->pMacroImg, mpImpl->pComponentImg ), LB_MACROS_ITEMPOS ); rListBox.GetModel()->InvalidateEntry( _pE ); @@ -811,8 +811,8 @@ Any _SvxMacroTabPage::GetPropsByName( const OUString& eventName, EventsHash& eve SvxMacroTabPage::SvxMacroTabPage( Window* pParent, const Reference< frame::XFrame >& _rxDocumentFrame, const SfxItemSet& rSet, Reference< container::XNameReplace > xNameReplace, sal_uInt16 nSelectedIndex ) : _SvxMacroTabPage( pParent, CUI_RES( RID_SVXPAGE_MACROASSIGN ), rSet ) { - mpImpl->pStrEvent = new String( CUI_RES( STR_EVENT ) ); - mpImpl->pAssignedMacro = new String( CUI_RES( STR_ASSMACRO ) ); + mpImpl->pStrEvent = new OUString( CUI_RES( STR_EVENT ) ); + mpImpl->pAssignedMacro = new OUString( CUI_RES( STR_ASSMACRO ) ); mpImpl->pEventLB = new _HeaderTabListBox( this, CUI_RES( LB_EVENT ) ); mpImpl->pAssignFT = new FixedText( this, CUI_RES( FT_ASSIGN ) ); mpImpl->pAssignPB = new PushButton( this, CUI_RES( PB_ASSIGN ) ); @@ -965,7 +965,7 @@ void SvxMacroAssignSingleTabDialog::SetTabPage( SfxTabPage* pTabPage ) if ( pPage ) { - String sUserData; + OUString sUserData; pPage->SetUserData( sUserData ); pPage->Reset( *pOptions ); pPage->Show(); diff --git a/cui/source/customize/macropg_impl.hxx b/cui/source/customize/macropg_impl.hxx index 2c8f59dbc1c2..5d71ccfb7044 100644 --- a/cui/source/customize/macropg_impl.hxx +++ b/cui/source/customize/macropg_impl.hxx @@ -32,8 +32,8 @@ public: PushButton* pDeletePB; Image* pMacroImg; Image* pComponentImg; - String* pStrEvent; - String* pAssignedMacro; + OUString* pStrEvent; + OUString* pAssignedMacro; _HeaderTabListBox* pEventLB; sal_Bool bReadOnly; sal_Bool bIDEDialogMode; diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index 0d9a5327253b..61e87d3351b0 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -117,7 +117,7 @@ void SvxConfigFunctionListBox::MouseMove( const MouseEvent& rMEvt ) aTimer.Start(); else { - Help::ShowBalloon( this, aMousePos, String() ); + Help::ShowBalloon( this, aMousePos, OUString() ); aTimer.Stop(); } } @@ -139,7 +139,7 @@ void SvxConfigFunctionListBox::ClearAll() Clear(); } -String SvxConfigFunctionListBox::GetHelpText( SvTreeListEntry *pEntry ) +OUString SvxConfigFunctionListBox::GetHelpText( SvTreeListEntry *pEntry ) { SvxGroupInfo_Impl *pInfo = pEntry ? (SvxGroupInfo_Impl*) pEntry->GetUserData(): 0; @@ -160,12 +160,12 @@ String SvxConfigFunctionListBox::GetHelpText( SvTreeListEntry *pEntry ) } } - return String(); + return OUString(); } void SvxConfigFunctionListBox::FunctionSelected() { - Help::ShowBalloon( this, Point(), String() ); + Help::ShowBalloon( this, Point(), OUString() ); } // drag and drop support @@ -500,7 +500,7 @@ void SvxConfigGroupListBox::Init(bool bShowSlots, const Reference< frame::XFrame SvxGroupInfo_Impl *pInfo = new SvxGroupInfo_Impl( SVX_CFGGROUP_SCRIPTCONTAINER, 0, rootNode ); - String aTitle = CUI_RESSTR(RID_SVXSTR_PRODMACROS); + OUString aTitle = CUI_RESSTR(RID_SVXSTR_PRODMACROS); SvTreeListEntry *pNewEntry = InsertEntry( aTitle, NULL ); pNewEntry->SetUserData( pInfo ); @@ -987,12 +987,12 @@ SvxScriptSelectorDialog::SetRunLabel() } void -SvxScriptSelectorDialog::SetDialogDescription( const String& rDescription ) +SvxScriptSelectorDialog::SetDialogDescription( const OUString& rDescription ) { m_pDialogDescription->SetText( rDescription ); } -String +OUString SvxScriptSelectorDialog::GetScriptURL() const { OUString result; @@ -1012,7 +1012,7 @@ SvxScriptSelectorDialog::GetScriptURL() const return result; } -String +OUString SvxScriptSelectorDialog::GetSelectedDisplayName() { return m_pCommands->GetEntryText( m_pCommands->GetLastSelectedEntry() ); diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 506c11eed0dc..0686caf04833 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -333,7 +333,7 @@ void SpellDialog::UpdateBoxes_Impl() const sal_Int32 nSize = aNewWords.getLength(); for ( i = 0; i < nSize; ++i ) { - String aTmp( pNewWords[i] ); + OUString aTmp( pNewWords[i] ); if ( LISTBOX_ENTRY_NOTFOUND == m_pSuggestionLB->GetEntryPos( aTmp ) ) { m_pSuggestionLB->InsertEntry( aTmp ); @@ -458,7 +458,7 @@ IMPL_LINK( SpellDialog, ExtClickHdl, Button *, pBtn ) else if (m_pAutoCorrPB == pBtn) { //get the currently selected wrong word - String sCurrentErrorText = m_pSentenceED->GetErrorText(); + OUString sCurrentErrorText = m_pSentenceED->GetErrorText(); //get the wrong word from the XSpellAlternative const SpellErrorDescription* pSpellErrorDescription = m_pSentenceED->GetAlternatives(); if( pSpellErrorDescription ) @@ -519,28 +519,28 @@ void SpellDialog::StartSpellOptDlg_Impl() namespace { - String getDotReplacementString(const String &rErrorText, const String &rSuggestedReplacement) + OUString getDotReplacementString(const OUString &rErrorText, const OUString &rSuggestedReplacement) { - String aString = rErrorText; + OUString aString = rErrorText; //dots are sometimes part of the spelled word but they are not necessarily part of the replacement - bool bDot = aString.Len() && aString.GetChar(aString.Len() - 1 ) == '.'; + bool bDot = !aString.isEmpty() && aString[aString.getLength() - 1] == '.'; aString = rSuggestedReplacement; - if(bDot && (!aString.Len() || aString.GetChar(aString.Len() - 1 ) != '.')) - aString += '.'; + if(bDot && (aString.isEmpty() || aString[aString.getLength() - 1] != '.')) + aString += "."; return aString; } } -String SpellDialog::getReplacementString() const +OUString SpellDialog::getReplacementString() const { - String sOrigString = m_pSentenceED->GetErrorText(); + OUString sOrigString = m_pSentenceED->GetErrorText(); - String sReplacement(sOrigString); + OUString sReplacement(sOrigString); if(m_pSuggestionLB->IsEnabled() && m_pSuggestionLB->GetSelectEntryCount()>0 && @@ -561,7 +561,7 @@ IMPL_LINK_NOARG(SpellDialog, ChangeHdl) else { m_pSentenceED->UndoActionStart( SPELLUNDO_CHANGE_GROUP ); - String aString = getReplacementString(); + OUString aString = getReplacementString(); m_pSentenceED->ChangeMarkedWord(aString, GetSelectedLang_Impl()); SpellContinue_Impl(); bModified = false; @@ -577,7 +577,7 @@ IMPL_LINK_NOARG(SpellDialog, ChangeHdl) IMPL_LINK_NOARG(SpellDialog, ChangeAllHdl) { m_pSentenceED->UndoActionStart( SPELLUNDO_CHANGE_GROUP ); - String aString = getReplacementString(); + OUString aString = getReplacementString(); LanguageType eLang = GetSelectedLang_Impl(); // add new word to ChangeAll list @@ -629,7 +629,7 @@ IMPL_LINK( SpellDialog, IgnoreAllHdl, Button *, pButton ) } else { - String sErrorText(m_pSentenceED->GetErrorText()); + OUString sErrorText(m_pSentenceED->GetErrorText()); sal_uInt8 nAdded = linguistic::AddEntryToDic( aXDictionary, sErrorText, sal_False, OUString(), LANGUAGE_NONE ); @@ -769,9 +769,9 @@ IMPL_LINK(SpellDialog, LanguageSelectHdl, SvxLanguageBox*, pBox) //if currently an error is selected then search for alternatives for //this word and fill the alternatives ListBox accordingly - String sError = m_pSentenceED->GetErrorText(); + OUString sError = m_pSentenceED->GetErrorText(); m_pSuggestionLB->Clear(); - if(sError.Len()) + if(!sError.isEmpty()) { LanguageType eLanguage = pBox->GetSelectLanguage(); Reference <XSpellAlternatives> xAlt = xSpell->spell( sError, eLanguage, @@ -808,7 +808,7 @@ static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl ) OUString aTmp; osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp ); Graphic aGraphic; - const String aFilterName( RTL_CONSTASCII_USTRINGPARAM( IMP_PNG ) ); + const OUString aFilterName( IMP_PNG ); if( GRFILTER_OK == GraphicFilter::LoadGraphic( aTmp, aFilterName, aGraphic ) ) { aRes = Image( aGraphic.GetBitmapEx() ); @@ -817,8 +817,8 @@ static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl ) } void SpellDialog::SetTitle_Impl(LanguageType nLang) { - String sTitle = rParent.HasGrammarChecking() ? m_sTitleSpellingGrammar : m_sTitleSpelling; - sTitle.SearchAndReplaceAscii( "$LANGUAGE ($LOCATION)", SvtLanguageTable::GetLanguageString(nLang) ); + OUString sTitle = rParent.HasGrammarChecking() ? m_sTitleSpellingGrammar : m_sTitleSpelling; + sTitle = sTitle.replaceFirst( "$LANGUAGE ($LOCATION)", SvtLanguageTable::GetLanguageString(nLang) ); SetText( sTitle ); } @@ -914,9 +914,9 @@ int SpellDialog::AddToDictionaryExecute( sal_uInt16 nItemId, PopupMenu *pMenu ) //GetErrorText() returns the current error even if the text is already //manually changed - const String aNewWord= m_pSentenceED->GetErrorText(); + const OUString aNewWord = m_pSentenceED->GetErrorText(); - String aDicName ( pMenu->GetItemText( nItemId ) ); + OUString aDicName ( pMenu->GetItemText( nItemId ) ); uno::Reference< linguistic2::XDictionary > xDic; uno::Reference< linguistic2::XSearchableDictionaryList > xDicList( SvxGetDictionaryList() ); @@ -1603,7 +1603,7 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError ) m_nErrorStart = pNextError->GetStart(); m_nErrorEnd = pNextError->GetEnd(); - String sReplacement(getDotReplacementString(GetErrorText(), xEntry->getReplacementText())); + OUString sReplacement(getDotReplacementString(GetErrorText(), xEntry->getReplacementText())); ChangeMarkedWord(sReplacement, LanguageTag::convertToLanguageType( pSpellErrorDescription->aLocale )); @@ -1657,10 +1657,10 @@ void SentenceEditWindow_Impl::MoveErrorMarkTo(sal_uInt16 nStart, sal_uInt16 nEnd } //----------------------------------------------------------------------- -void SentenceEditWindow_Impl::ChangeMarkedWord(const String& rNewWord, LanguageType eLanguage) +void SentenceEditWindow_Impl::ChangeMarkedWord(const OUString& rNewWord, LanguageType eLanguage) { //calculate length changes - long nDiffLen = rNewWord.Len() - m_nErrorEnd + m_nErrorStart; + long nDiffLen = rNewWord.getLength() - m_nErrorEnd + m_nErrorStart; TextSelection aSel(TextPaM(0, m_nErrorStart), TextPaM(0, m_nErrorEnd)); //Remove spell errror attribute ExtTextEngine* pTextEngine = GetTextEngine(); @@ -1720,7 +1720,7 @@ void SentenceEditWindow_Impl::ChangeMarkedWord(const String& rNewWord, LanguageT } //------------------------------------------------- -String SentenceEditWindow_Impl::GetErrorText() const +OUString SentenceEditWindow_Impl::GetErrorText() const { return GetTextEngine()->GetText(TextSelection(TextPaM(0, m_nErrorStart), TextPaM(0, m_nErrorEnd) )); } diff --git a/cui/source/dialogs/commonlingui.hxx b/cui/source/dialogs/commonlingui.hxx index 90c3f4ec8644..3ba6857e5921 100644 --- a/cui/source/dialogs/commonlingui.hxx +++ b/cui/source/dialogs/commonlingui.hxx @@ -133,11 +133,11 @@ public: void Enlarge( sal_Int32 _nX, sal_Int32 _nY ); // control access methods - inline void SetCurrentText( const String& _rText ) { aAktWord.SetText( _rText ); } - inline String GetCurrentText( ) const { return aAktWord.GetText(); } + inline void SetCurrentText( const OUString& _rText ) { aAktWord.SetText( _rText ); } + inline OUString GetCurrentText( ) const { return aAktWord.GetText(); } - inline void SetStatusText( const String& _rText ) { aStatusText.SetText( _rText ); } - inline String GetStatusText( ) const { return aStatusText.GetText(); } + inline void SetStatusText( const OUString& _rText ) { aStatusText.SetText( _rText ); } + inline OUString GetStatusText( ) const { return aStatusText.GetText(); } inline Edit& GetWordInputControl() { return aNewWordED; } inline const Edit& GetWordInputControl() const { return aNewWordED; } diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index c22a16d5e82b..1b90b53d9689 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -132,7 +132,7 @@ sal_UCS4 SvxCharacterMap::GetChar() const // ----------------------------------------------------------------------- -String SvxCharacterMap::GetCharacters() const +OUString SvxCharacterMap::GetCharacters() const { return m_pShowText->GetText(); } @@ -190,7 +190,7 @@ void SvxShowText::Paint( const Rectangle& ) const Color aWindowTextColor( rStyleSettings.GetDialogTextColor() ); SetTextColor( aWindowTextColor ); - const String aText = GetText(); + const OUString aText = GetText(); const Size aSize = GetOutputSizePixel(); long nAvailWidth = aSize.Width(); @@ -326,11 +326,11 @@ void SvxCharacterMap::init() } OUString aDefStr( aFont.GetName() ); - String aLastName; + OUString aLastName; int nCount = GetDevFontCount(); for ( int i = 0; i < nCount; i++ ) { - String aFontName( GetDevFont( i ).GetName() ); + OUString aFontName( GetDevFont( i ).GetName() ); if ( aFontName != aLastName ) { aLastName = aFontName; @@ -403,13 +403,13 @@ void SvxCharacterMap::SetCharFont( const Font& rFont ) IMPL_LINK_NOARG(SvxCharacterMap, OKHdl) { - String aStr = m_pShowText->GetText(); + OUString aStr = m_pShowText->GetText(); - if ( !aStr.Len() ) + if ( aStr.isEmpty() ) { sal_UCS4 cChar = m_pShowSet->GetSelectCharacter(); // using the new UCS4 constructor - OUString aOUStr( &cChar, 1 ); + OUString aOUStr( &cChar, 1 ); m_pShowText->SetText( aOUStr ); } EndDialog( sal_True ); @@ -517,9 +517,9 @@ IMPL_LINK_NOARG(SvxCharacterMap, CharSelectHdl) { if ( !bOne ) { - String aText = m_pShowText->GetText(); + OUString aText = m_pShowText->GetText(); - if ( aText.Len() != CHARMAP_MAXLEN ) + if ( aText.getLength() != CHARMAP_MAXLEN ) { sal_UCS4 cChar = m_pShowSet->GetSelectCharacter(); // using the new UCS4 constructor @@ -537,7 +537,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, CharSelectHdl) IMPL_LINK_NOARG(SvxCharacterMap, CharHighlightHdl) { - String aText; + OUString aText; sal_UCS4 cChar = m_pShowSet->GetSelectCharacter(); sal_Bool bSelect = (cChar > 0); @@ -605,7 +605,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, DeleteLastHdl) IMPL_LINK_NOARG(SvxCharacterMap, DeleteHdl) { - m_pShowText->SetText( String() ); + m_pShowText->SetText( OUString() ); m_pOKBtn->Disable(); m_pDeleteLastBtn->Disable(); return 0; diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index ef25d65e30f4..a13345a3d083 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -77,7 +77,7 @@ void FmSearchDialog::initCommon( const Reference< XResultSet >& _rxCursor ) // some initial record texts m_ftRecord.SetText( OUString::number(_rxCursor->getRow()) ); - m_pbClose.SetHelpText(String()); + m_pbClose.SetHelpText(OUString()); } FmSearchDialog::FmSearchDialog(Window* pParent, const OUString& sInitialText, const ::std::vector< OUString >& _rContexts, sal_Int16 nInitialContext, @@ -260,7 +260,7 @@ void FmSearchDialog::Init(const OUString& strVisibleFields, const OUString& sIni RID_STR_SEARCH_WHOLE }; for ( size_t i=0; i<SAL_N_ELEMENTS(nResIds); ++i ) - m_lbPosition.InsertEntry( String( CUI_RES( nResIds[i] ) ) ); + m_lbPosition.InsertEntry( OUString( CUI_RES( nResIds[i] ) ) ); m_lbPosition.SelectEntryPos(MATCHING_ANYWHERE); // the field listbox @@ -568,7 +568,7 @@ void FmSearchDialog::InitContext(sal_Int16 nContext) m_lbField.InsertEntry(comphelper::string::getToken(fmscContext.strUsedFields, i, ';')); } - if (nContext < (sal_Int32)m_arrContextFields.size() && m_arrContextFields[nContext].Len()) + if (nContext < (sal_Int32)m_arrContextFields.size() && !m_arrContextFields[nContext].isEmpty()) { m_lbField.SelectEntry(m_arrContextFields[nContext]); } @@ -807,7 +807,7 @@ void FmSearchDialog::LoadParams() // that way the data is handed on to the SearchEngine and all dependent settings are done // current field - sal_uInt16 nInitialField = m_lbField.GetEntryPos( String( aParams.sSingleSearchField ) ); + sal_uInt16 nInitialField = m_lbField.GetEntryPos( OUString( aParams.sSingleSearchField ) ); if (nInitialField == COMBOBOX_ENTRY_NOTFOUND) nInitialField = 0; m_lbField.SelectEntryPos(nInitialField); diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 11c3d0a4c584..e5d4cbc8a353 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -89,13 +89,13 @@ SearchThread::~SearchThread() void SearchThread::execute() { - const String aFileType( mpBrowser->aCbbFileType.GetText() ); + const OUString aFileType( mpBrowser->aCbbFileType.GetText() ); - if( aFileType.Len() ) + if( !aFileType.isEmpty() ) { const sal_uInt16 nFileNumber = mpBrowser->aCbbFileType.GetEntryPos( aFileType ); sal_uInt16 nBeginFormat, nEndFormat; - ::std::vector< String > aFormats; + ::std::vector< OUString > aFormats; if( !nFileNumber || ( nFileNumber >= mpBrowser->aCbbFileType.GetEntryCount() ) ) { @@ -117,7 +117,7 @@ void SearchThread::execute() // ------------------------------------------------------------------------ void SearchThread::ImplSearch( const INetURLObject& rStartURL, - const ::std::vector< String >& rFormats, + const ::std::vector< OUString >& rFormats, sal_Bool bRecursive ) { { @@ -172,7 +172,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL, != rFormats.end() ) || ::std::find( rFormats.begin(), rFormats.end(), - String(aFoundURL.GetExtension().toAsciiLowerCase()) ) + aFoundURL.GetExtension().toAsciiLowerCase() ) != rFormats.end() ) { SolarMutexGuard aGuard; @@ -373,7 +373,7 @@ IMPL_LINK_NOARG(TakeProgress, CleanUpHdl) { TPGalleryThemeProperties* mpBrowser = (TPGalleryThemeProperties*) GetParent(); ::std::vector<bool, std::allocator<bool> > aRemoveEntries( mpBrowser->aFoundList.size(), false ); - ::std::vector< String > aRemainingVector; + ::std::vector< OUString > aRemainingVector; sal_uInt32 i, nCount; GetParent()->EnterWait(); @@ -524,7 +524,7 @@ IMPL_LINK( ActualizeProgress, ActualizeHdl, INetURLObject*, pURL ) // - TitleDialog - // --------------- -TitleDialog::TitleDialog( Window* pParent, const String& rOldTitle ) : +TitleDialog::TitleDialog( Window* pParent, const OUString& rOldTitle ) : ModalDialog ( pParent, CUI_RES( RID_SVXDLG_GALLERY_TITLE ) ), maOk ( this, CUI_RES( BTN_OK ) ), maCancel ( this, CUI_RES( BTN_CANCEL ) ), @@ -551,7 +551,7 @@ GalleryIdDialog::GalleryIdDialog( Window* pParent, GalleryTheme* _pThm ) : { FreeResource(); - aLbResName.InsertEntry( String( RTL_CONSTASCII_USTRINGPARAM( "!!! No Id !!!" ) ) ); + aLbResName.InsertEntry( OUString( "!!! No Id !!!" ) ); GalleryTheme::InsertAllThemes( aLbResName ); @@ -575,11 +575,11 @@ IMPL_LINK_NOARG(GalleryIdDialog, ClickOkHdl) if( ( pInfo->GetId() == nId ) && ( pInfo->GetThemeName() != pThm->GetName() ) ) { - String aStr( CUI_RES( RID_SVXSTR_GALLERY_ID_EXISTS ) ); + OUString aStr( CUI_RES( RID_SVXSTR_GALLERY_ID_EXISTS ) ); - aStr += String( RTL_CONSTASCII_USTRINGPARAM( " (" ) ); + aStr += " ("; aStr += pInfo->GetThemeName(); - aStr += ')'; + aStr += ")"; InfoBox aBox( this, aStr ); aBox.Execute(); @@ -611,12 +611,12 @@ GalleryThemeProperties::GalleryThemeProperties( Window* pParent, ExchangeData* _ if( pData->pTheme->IsReadOnly() ) RemoveTabPage( RID_SVXTABPAGE_GALLERYTHEME_FILES ); - String aText( GetText() ); + OUString aText( GetText() ); aText += pData->pTheme->GetName(); if( pData->pTheme->IsReadOnly() ) - aText += String( CUI_RES( RID_SVXSTR_GALLERY_READONLY ) ); + aText += CUI_RES( RID_SVXSTR_GALLERY_READONLY ); SetText( aText ); } @@ -652,7 +652,7 @@ TPGalleryThemeGeneral::TPGalleryThemeGeneral( Window* pParent, const SfxItemSet& { FreeResource(); - String aAccName(SVX_RES(RID_SVXSTR_GALLERY_THEMENAME)); + OUString aAccName(SVX_RES(RID_SVXSTR_GALLERY_THEMENAME)); aEdtMSName.SetAccessibleName(aAccName); aFiMSImage.SetAccessibleName(aAccName); aEdtMSName.SetAccessibleRelationLabeledBy( &aFiMSImage ); @@ -666,7 +666,7 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData ) GalleryTheme* pThm = pData->pTheme; OUString aOutStr( OUString::number(pThm->GetObjectCount()) ); - String aObjStr( CUI_RES( RID_SVXSTR_GALLERYPROPS_OBJECT ) ); + OUString aObjStr( CUI_RES( RID_SVXSTR_GALLERYPROPS_OBJECT ) ); OUString aAccess; OUString aType( SVX_RES( RID_SVXSTR_GALLERYPROPS_GALTHEME ) ); sal_Bool bReadOnly = pThm->IsReadOnly(); @@ -688,9 +688,9 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData ) // singular or plural? if ( 1 == pThm->GetObjectCount() ) - aObjStr = aObjStr.GetToken( 0 ); + aObjStr = aObjStr.getToken( 0, ';' ); else - aObjStr = aObjStr.GetToken( 1 ); + aObjStr = aObjStr.getToken( 1, ';' ); aOutStr += " " + aObjStr; @@ -756,7 +756,7 @@ TPGalleryThemeProperties::TPGalleryThemeProperties( Window* pWindow, const SfxIt FreeResource(); xDialogListener->SetDialogClosedLink( LINK( this, TPGalleryThemeProperties, DialogClosedHdl ) ); - aLbxFound.SetAccessibleName(String(SVX_RES(RID_SVXSTR_GALLERY_FILESFOUND))); + aLbxFound.SetAccessibleName(OUString(SVX_RES(RID_SVXSTR_GALLERY_FILESFOUND))); aWndPreview.SetAccessibleName(aCbxPreview.GetText()); aLbxFound.SetAccessibleRelationLabeledBy(&aLbxFound); } @@ -777,7 +777,7 @@ void TPGalleryThemeProperties::SetXChgData( ExchangeData* _pData ) aCbbFileType.EnableDDAutoWidth( sal_False ); aLbxFound.SetDoubleClickHdl(LINK(this, TPGalleryThemeProperties, DClickFoundHdl)); aLbxFound.SetSelectHdl(LINK(this, TPGalleryThemeProperties, SelectFoundHdl)); - aLbxFound.InsertEntry(String(CUI_RES(RID_SVXSTR_GALLERY_NOFILES))); + aLbxFound.InsertEntry(OUString(CUI_RES(RID_SVXSTR_GALLERY_NOFILES))); aLbxFound.Show(); FillFilterList(); @@ -789,7 +789,7 @@ void TPGalleryThemeProperties::SetXChgData( ExchangeData* _pData ) // ------------------------------------------------------------------------ -void TPGalleryThemeProperties::StartSearchFiles( const String& _rFolderURL, short _nDlgResult ) +void TPGalleryThemeProperties::StartSearchFiles( const OUString& _rFolderURL, short _nDlgResult ) { if ( RET_OK == _nDlgResult ) { @@ -831,7 +831,7 @@ OUString TPGalleryThemeProperties::addExtension( const OUString& _rDisplayText, if ( sRet.indexOf( sAllFilter ) == -1 ) { - String sExt = _rExtension; + OUString sExt = _rExtension; sRet += sOpenBracket; sRet += sExt; sRet += sCloseBracket; @@ -844,8 +844,8 @@ OUString TPGalleryThemeProperties::addExtension( const OUString& _rDisplayText, void TPGalleryThemeProperties::FillFilterList() { GraphicFilter &rFilter = GraphicFilter::GetGraphicFilter(); - String aExt; - String aName; + OUString aExt; + OUString aName; FilterEntry* pFilterEntry; FilterEntry* pTestEntry; sal_uInt16 i, nKeyCount; @@ -860,18 +860,18 @@ void TPGalleryThemeProperties::FillFilterList() pTestEntry = aFilterEntryList.empty() ? NULL : aFilterEntryList[ entryIndex ]; bInList = sal_False; - String aExtensions; + OUString aExtensions; int j = 0; - String sWildcard; + OUString sWildcard; while( true ) { sWildcard = rFilter.GetImportWildcard( i, j++ ); - if ( !sWildcard.Len() ) + if ( sWildcard.isEmpty() ) break; - if ( aExtensions.Search( sWildcard ) == STRING_NOTFOUND ) + if ( aExtensions.indexOf( sWildcard ) == -1 ) { - if ( aExtensions.Len() ) - aExtensions += sal_Unicode(';'); + if ( !aExtensions.isEmpty() ) + aExtensions += ";"; aExtensions += sWildcard; } } @@ -931,22 +931,22 @@ void TPGalleryThemeProperties::FillFilterList() } // 'All' filters - String aExtensions; + OUString aExtensions; // graphic filters for ( i = 0; i < nKeyCount; ++i ) { int j = 0; - String sWildcard; + OUString sWildcard; while( true ) { sWildcard = rFilter.GetImportWildcard( i, j++ ); - if ( !sWildcard.Len() ) + if ( sWildcard.isEmpty() ) break; - if ( aExtensions.Search( sWildcard ) == STRING_NOTFOUND ) + if ( aExtensions.indexOf( sWildcard ) == -1 ) { - if ( aExtensions.Len() ) - aExtensions += sal_Unicode( ';' ); + if ( !aExtensions.isEmpty() ) + aExtensions += ";"; aExtensions += sWildcard; } @@ -958,9 +958,9 @@ void TPGalleryThemeProperties::FillFilterList() { for( sal_Int32 nIndex = 0; nIndex >= 0; ) { - if ( aExtensions.Len() ) - aExtensions += sal_Unicode( ';' ); - ( aExtensions += String( aWildcard ) ) += String( aFilters[ k ].second.getToken( 0, ';', nIndex ) ); + if ( !aExtensions.isEmpty() ) + aExtensions += ";"; + aExtensions += aWildcard + aFilters[ k ].second.getToken( 0, ';', nIndex ); } } @@ -985,13 +985,13 @@ void TPGalleryThemeProperties::FillFilterList() IMPL_LINK_NOARG(TPGalleryThemeProperties, SelectFileTypeHdl) { - String aText( aCbbFileType.GetText() ); + OUString aText( aCbbFileType.GetText() ); if( bInputAllowed && ( aLastFilterName != aText ) ) { aLastFilterName = aText; - if( QueryBox( this, WB_YES_NO, String( CUI_RES( RID_SVXSTR_GALLERY_SEARCH ) ) ).Execute() == RET_YES ) + if( QueryBox( this, WB_YES_NO, OUString( CUI_RES( RID_SVXSTR_GALLERY_SEARCH ) ) ).Execute() == RET_YES ) SearchFiles(); } @@ -1026,7 +1026,7 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, ClickSearchHdl) com::sun::star::uno::Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); xFolderPicker = FolderPicker::create(xContext); - String aDlgPathName( SvtPathOptions().GetGraphicPath() ); + OUString aDlgPathName( SvtPathOptions().GetGraphicPath() ); xFolderPicker->setDisplayDirectory(aDlgPathName); aPreviewTimer.Stop(); @@ -1077,7 +1077,7 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, ClickPreviewHdl) if ( bInputAllowed ) { aPreviewTimer.Stop(); - aPreviewString.Erase(); + aPreviewString = ""; if( !aCbxPreview.IsChecked() ) { @@ -1096,7 +1096,7 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, ClickPreviewHdl) void TPGalleryThemeProperties::DoPreview() { - String aString( aLbxFound.GetSelectEntry() ); + OUString aString( aLbxFound.GetSelectEntry() ); if( aString != aPreviewString ) { @@ -1131,7 +1131,7 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, ClickTakeHdl) if( !aLbxFound.GetSelectEntryCount() || !bEntriesFound ) { - SvxOpenGraphicDialog aDlg(String( RTL_CONSTASCII_USTRINGPARAM( "Gallery" ) ) ); + SvxOpenGraphicDialog aDlg("Gallery"); aDlg.EnableLink(sal_False); aDlg.AsLink(sal_False); @@ -1232,7 +1232,7 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, EndSearchProgressHdl) } else { - aLbxFound.InsertEntry( String( CUI_RES( RID_SVXSTR_GALLERY_NOFILES ) ) ); + aLbxFound.InsertEntry( OUString( CUI_RES( RID_SVXSTR_GALLERY_NOFILES ) ) ); aBtnTakeAll.Disable(); aCbxPreview.Disable(); bEntriesFound = sal_False; @@ -1246,7 +1246,7 @@ IMPL_LINK( TPGalleryThemeProperties, DialogClosedHdl, ::com::sun::star::ui::dial { DBG_ASSERT( xFolderPicker.is() == sal_True, "TPGalleryThemeProperties::DialogClosedHdl(): no folder picker" ); - String sURL = String( xFolderPicker->getDirectory() ); + OUString sURL = xFolderPicker->getDirectory(); StartSearchFiles( sURL, pEvt->DialogResult ); return 0L; diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index e8c33f5ebb46..e0bb226d95ee 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -99,7 +99,7 @@ SvxHpLinkDlg::SvxHpLinkDlg (Window* pParent, SfxBindings* pBindings) mbGrabFocus = sal_True; // insert pages Image aImage; - String aStrTitle; + OUString aStrTitle; SvxIconChoiceCtrlEntry* pEntry = NULL; aStrTitle = CUI_RESSTR( RID_SVXSTR_HYPERDLG_HLINETTP ); @@ -238,7 +238,7 @@ IMPL_LINK_NOARG(SvxHpLinkDlg, ClickApplyHdl_Impl) SvxHyperlinkItem *aItem = (SvxHyperlinkItem *) aItemSet.GetItem (SID_HYPERLINK_SETLINK); - String aStrEmpty; + OUString aStrEmpty; if ( aItem->GetURL() != aStrEmpty ) GetDispatcher()->Execute( SID_HYPERLINK_SETLINK, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, aItem, 0L); diff --git a/cui/source/dialogs/cuiimapwnd.cxx b/cui/source/dialogs/cuiimapwnd.cxx index 7f1455d921f8..2eeacbdaa459 100644 --- a/cui/source/dialogs/cuiimapwnd.cxx +++ b/cui/source/dialogs/cuiimapwnd.cxx @@ -48,7 +48,7 @@ |* \************************************************************************/ -URLDlg::URLDlg( Window* pWindow, const String& rURL, const String& rAlternativeText, const String& rDescription, const String& rTarget, const String& rName, TargetList& rTargetList ) +URLDlg::URLDlg( Window* pWindow, const OUString& rURL, const OUString& rAlternativeText, const OUString& rDescription, const OUString& rTarget, const OUString& rName, TargetList& rTargetList ) : ModalDialog(pWindow, "IMapDialog", "cui/ui/cuiimapdlg.ui") { get(m_pEdtURL, "urlentry"); @@ -67,8 +67,8 @@ URLDlg::URLDlg( Window* pWindow, const String& rURL, const String& rAlternativeT for( size_t i = 0, n = rTargetList.size(); i < n; ++i ) m_pCbbTargets->InsertEntry( rTargetList[ i ] ); - if( !rTarget.Len() ) - m_pCbbTargets->SetText( OUString("_self") ); + if( rTarget.isEmpty() ) + m_pCbbTargets->SetText( "_self"); else m_pCbbTargets->SetText( rTarget ); } diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx index 650e39a53297..2be4c1847a78 100644 --- a/cui/source/dialogs/dlgname.cxx +++ b/cui/source/dialogs/dlgname.cxx @@ -32,7 +32,7 @@ |* \************************************************************************/ -SvxNameDialog::SvxNameDialog( Window* pWindow, const String& rName, const String& rDesc ) : +SvxNameDialog::SvxNameDialog( Window* pWindow, const OUString& rName, const OUString& rDesc ) : ModalDialog ( pWindow, "NameDialog", "cui/ui/namedialog.ui" ) { get(pBtnOK, "ok"); @@ -60,7 +60,7 @@ IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl) SvxObjectNameDialog::SvxObjectNameDialog( Window* pWindow, - const String& rName) : + const OUString& rName) : ModalDialog ( pWindow, "ObjectNameDialog", "cui/ui/objectnamedialog.ui" ) { get(pBtnOK, "ok"); @@ -90,8 +90,8 @@ IMPL_LINK_NOARG(SvxObjectNameDialog, ModifyHdl) SvxObjectTitleDescDialog::SvxObjectTitleDescDialog( Window* pWindow, - const String& rTitle, - const String& rDescription) : + const OUString& rTitle, + const OUString& rDescription) : ModalDialog ( pWindow, "ObjectTitleDescDialog", "cui/ui/objecttitledescdialog.ui" ) { get(pEdtTitle, "object_title_entry"); @@ -114,7 +114,7 @@ SvxObjectTitleDescDialog::SvxObjectTitleDescDialog( |* \************************************************************************/ -SvxMessDialog::SvxMessDialog( Window* pWindow, const String& rText, const String& rDesc, Image* pImg ) +SvxMessDialog::SvxMessDialog( Window* pWindow, const OUString& rText, const OUString& rDesc, Image* pImg ) : ModalDialog(pWindow, "MessBox", "cui/ui/messbox.ui") , pImage(NULL) { @@ -162,7 +162,7 @@ IMPL_LINK_NOARG_INLINE_END(SvxMessDialog, Button2Hdl) /*************************************************************************/ -void SvxMessDialog::SetButtonText( sal_uInt16 nBtnId, const String& rNewTxt ) +void SvxMessDialog::SetButtonText( sal_uInt16 nBtnId, const OUString& rNewTxt ) { switch ( nBtnId ) { diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 39bcbf72abdf..2ca94d9838c3 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -90,12 +90,12 @@ namespace svx }; protected: - const String m_sPrimaryText; - const String m_sSecondaryText; + const OUString m_sPrimaryText; + const OUString m_sSecondaryText; const RubyPosition m_ePosition; public: - PseudoRubyText( const String& _rPrimary, const String& _rSecondary, const RubyPosition _ePosition ); + PseudoRubyText( const OUString& _rPrimary, const OUString& _rSecondary, const RubyPosition _ePosition ); public: void Paint( OutputDevice& _rDevice, const Rectangle& _rRect, sal_uInt16 _nTextStyle, @@ -104,7 +104,7 @@ namespace svx }; //------------------------------------------------------------------------- - PseudoRubyText::PseudoRubyText( const String& _rPrimary, const String& _rSecondary, const RubyPosition _ePosition ) + PseudoRubyText::PseudoRubyText( const OUString& _rPrimary, const OUString& _rSecondary, const RubyPosition _ePosition ) :m_sPrimaryText( _rPrimary ) ,m_sSecondaryText( _rSecondary ) ,m_ePosition( _ePosition ) @@ -213,7 +213,7 @@ namespace svx RubyRadioButton( Window* _pParent, const ResId& _rId, // the text in the resource will be taken as primary text - const String& _rSecondary, // this will be the secondary text which will be printed somewhat smaller + const OUString& _rSecondary, // this will be the secondary text which will be printed somewhat smaller const PseudoRubyText::RubyPosition _ePosition ); protected: @@ -222,7 +222,7 @@ namespace svx //------------------------------------------------------------------------- RubyRadioButton::RubyRadioButton( Window* _pParent, const ResId& _rId, - const String& _rSecondary, const PseudoRubyText::RubyPosition _ePosition ) + const OUString& _rSecondary, const PseudoRubyText::RubyPosition _ePosition ) :RadioButton( _pParent, _rId ) ,PseudoRubyText( RadioButton::GetText(), _rSecondary, _ePosition ) { @@ -319,7 +319,7 @@ namespace svx Rectangle aRect = rUDEvt.GetRect(); sal_uInt16 nItemId = rUDEvt.GetItemId(); - String sText = *static_cast< String* >( GetItemData( nItemId ) ); + OUString sText = *static_cast< OUString* >( GetItemData( nItemId ) ); pDev->DrawText( aRect, sText, TEXT_DRAW_CENTER | TEXT_DRAW_VCENTER ); } @@ -327,7 +327,7 @@ namespace svx { sal_uInt16 i, nCount = GetItemCount(); for ( i = 0; i < nCount; ++i ) - delete static_cast< String* >( GetItemData(i) ); + delete static_cast< OUString* >( GetItemData(i) ); Clear(); } @@ -349,7 +349,7 @@ namespace svx m_aValueSet.SetLineCount( LINE_CNT ); m_aValueSet.SetStyle( m_aValueSet.GetStyle() | WB_ITEMBORDER | WB_FLATVALUESET | WB_VSCROLL ); m_aValueSet.SetBorderStyle( WINDOW_BORDER_MONO ); - String aOneCharacter(RTL_CONSTASCII_USTRINGPARAM("AU")); + OUString aOneCharacter("AU"); long nItemWidth = 2*GetTextWidth( aOneCharacter ); m_aValueSet.SetItemWidth( nItemWidth ); @@ -468,7 +468,7 @@ namespace svx { sal_uInt16 nItemId = m_aListBox.InsertEntry( rStr ) + 1; //itemid == pos+1 (id 0 has special meaning) m_aValueSet.InsertItem( nItemId ); - String* pItemData = new String(rStr); + OUString* pItemData = new OUString(rStr); m_aValueSet.SetItemData( nItemId, pItemData ); } void SuggestionDisplay::SelectEntryPos( sal_uInt16 nPos ) @@ -516,8 +516,8 @@ namespace svx ,m_bDocumentMode( true ) { // special creation of the 4 pseudo-ruby radio buttons - String sSecondaryHangul( CUI_RES( STR_HANGUL ) ); - String sSecondaryHanja( CUI_RES( STR_HANJA ) ); + OUString sSecondaryHangul( CUI_RES( STR_HANGUL ) ); + OUString sSecondaryHanja( CUI_RES( STR_HANJA ) ); m_pHanjaAbove.reset( new RubyRadioButton( m_pPlayground.get(), CUI_RES( RB_HANGUL_HANJA_ABOVE ), sSecondaryHanja, PseudoRubyText::eAbove ) ); m_pHanjaBelow.reset( new RubyRadioButton( m_pPlayground.get(), CUI_RES( RB_HANGUL_HANJA_BELOW ), sSecondaryHanja, PseudoRubyText::eBelow ) ); m_pHangulAbove.reset( new RubyRadioButton( m_pPlayground.get(), CUI_RES( RB_HANJA_HANGUL_ABOVE ), sSecondaryHangul, PseudoRubyText::eAbove ) ); @@ -623,7 +623,7 @@ namespace svx m_aSuggestions.InsertEntry( *pSuggestions++ ); // select the first suggestion, and fill in the suggestion edit field - String sFirstSuggestion; + OUString sFirstSuggestion; if ( m_aSuggestions.GetEntryCount() ) { sFirstSuggestion = m_aSuggestions.GetEntry( 0 ); @@ -701,7 +701,7 @@ namespace svx { m_aFind.Enable( m_pPlayground->GetWordInputControl().GetSavedValue() != m_pPlayground->GetWordInputControl().GetText() ); - bool bSameLen = m_pPlayground->GetWordInputControl().GetText().getLength() == m_pPlayground->GetCurrentText().Len(); + bool bSameLen = m_pPlayground->GetWordInputControl().GetText().getLength() == m_pPlayground->GetCurrentText().getLength(); m_pPlayground->EnableButton( SvxCommonLinguisticControl::eChange, m_bDocumentMode && bSameLen ); m_pPlayground->EnableButton( SvxCommonLinguisticControl::eChangeAll, m_bDocumentMode && bSameLen ); @@ -754,7 +754,7 @@ namespace svx } //------------------------------------------------------------------------- - String HangulHanjaConversionDialog::GetCurrentString( ) const + OUString HangulHanjaConversionDialog::GetCurrentString( ) const { return m_pPlayground->GetCurrentText( ); } @@ -777,7 +777,7 @@ namespace svx } //------------------------------------------------------------------------- - void HangulHanjaConversionDialog::SetCurrentString( const String& _rNewString, + void HangulHanjaConversionDialog::SetCurrentString( const OUString& _rNewString, const Sequence< OUString >& _rSuggestions, bool _bOriginatesFromDocument ) { m_pPlayground->SetCurrentText( _rNewString ); @@ -822,7 +822,7 @@ namespace svx } //------------------------------------------------------------------------- - String HangulHanjaConversionDialog::GetCurrentSuggestion( ) const + OUString HangulHanjaConversionDialog::GetCurrentSuggestion( ) const { return m_pPlayground->GetWordInputControl().GetText(); } @@ -1154,10 +1154,10 @@ namespace svx HangulHanjaOptionsDialog::~HangulHanjaOptionsDialog() { SvTreeListEntry* pEntry = m_aDictsLB.First(); - String* pDel; + OUString* pDel; while( pEntry ) { - pDel = ( String* ) pEntry->GetUserData(); + pDel = ( OUString* ) pEntry->GetUserData(); if( pDel ) delete pDel; pEntry = m_aDictsLB.Next( pEntry ); @@ -1167,11 +1167,11 @@ namespace svx delete m_pCheckButtonData; } - void HangulHanjaOptionsDialog::AddDict( const String& _rName, bool _bChecked ) + void HangulHanjaOptionsDialog::AddDict( const OUString& _rName, bool _bChecked ) { SvTreeListEntry* pEntry = m_aDictsLB.SvTreeListBox::InsertEntry( _rName ); m_aDictsLB.SetCheckButtonState( pEntry, _bChecked? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED ); - pEntry->SetUserData( new String( _rName ) ); + pEntry->SetUserData( new OUString( _rName ) ); } //========================================================================= @@ -1181,9 +1181,9 @@ namespace svx IMPL_LINK_NOARG(HangulHanjaNewDictDialog, OKHdl) { - String aName(comphelper::string::stripEnd(m_aDictNameED.GetText(), ' ')); + OUString aName(comphelper::string::stripEnd(m_aDictNameED.GetText(), ' ')); - m_bEntered = aName.Len() > 0; + m_bEntered = !aName.isEmpty(); if( m_bEntered ) m_aDictNameED.SetText( aName ); // do this in case of trailing chars have been deleted @@ -1193,9 +1193,9 @@ namespace svx IMPL_LINK_NOARG(HangulHanjaNewDictDialog, ModifyHdl) { - String aName(comphelper::string::stripEnd(m_aDictNameED.GetText(), ' ')); + OUString aName(comphelper::string::stripEnd(m_aDictNameED.GetText(), ' ')); - m_aOkBtn.Enable( aName.Len() > 0 ); + m_aOkBtn.Enable( !aName.isEmpty() ); return 0; } @@ -1240,22 +1240,22 @@ namespace svx private: protected: sal_uInt16 m_nSize; - String** m_ppElements; + OUString** m_ppElements; sal_uInt16 m_nNumOfEntries; sal_uInt16 m_nAct; - const String* _Next( void ); + const OUString* _Next( void ); public: SuggestionList( sal_uInt16 _nNumOfElements ); virtual ~SuggestionList(); - bool Set( const String& _rElement, sal_uInt16 _nNumOfElement ); + bool Set( const OUString& _rElement, sal_uInt16 _nNumOfElement ); bool Reset( sal_uInt16 _nNumOfElement ); - const String* Get( sal_uInt16 _nNumOfElement ) const; + const OUString* Get( sal_uInt16 _nNumOfElement ) const; void Clear( void ); - const String* First( void ); - const String* Next( void ); + const OUString* First( void ); + const OUString* Next( void ); inline sal_uInt16 GetCount( void ) const; }; @@ -1272,10 +1272,10 @@ namespace svx m_nSize = _nNumOfElements; - m_ppElements = new String*[ m_nSize ]; + m_ppElements = new OUString*[ m_nSize ]; m_nAct = m_nNumOfEntries = 0; - String** ppNull = m_ppElements; + OUString** ppNull = m_ppElements; sal_uInt16 n = _nNumOfElements; while( n ) { @@ -1291,17 +1291,17 @@ namespace svx delete[] m_ppElements; } - bool SuggestionList::Set( const String& _rElement, sal_uInt16 _nNumOfElement ) + bool SuggestionList::Set( const OUString& _rElement, sal_uInt16 _nNumOfElement ) { bool bRet = _nNumOfElement < m_nSize; if( bRet ) { - String** ppElem = m_ppElements + _nNumOfElement; + OUString** ppElem = m_ppElements + _nNumOfElement; if( *ppElem ) **ppElem = _rElement; else { - *ppElem = new String( _rElement ); + *ppElem = new OUString( _rElement ); ++m_nNumOfEntries; } } @@ -1314,7 +1314,7 @@ namespace svx bool bRet = _nNumOfElement < m_nSize; if( bRet ) { - String** ppElem = m_ppElements + _nNumOfElement; + OUString** ppElem = m_ppElements + _nNumOfElement; if( *ppElem ) { delete *ppElem; @@ -1326,9 +1326,9 @@ namespace svx return bRet; } - const String* SuggestionList::Get( sal_uInt16 _nNumOfElement ) const + const OUString* SuggestionList::Get( sal_uInt16 _nNumOfElement ) const { - const String* pRet; + const OUString* pRet; if( _nNumOfElement < m_nSize ) pRet = m_ppElements[ _nNumOfElement ]; @@ -1342,7 +1342,7 @@ namespace svx { if( m_nNumOfEntries ) { - String** ppDel = m_ppElements; + OUString** ppDel = m_ppElements; sal_uInt16 nCnt = m_nSize; while( nCnt ) { @@ -1360,9 +1360,9 @@ namespace svx } } - const String* SuggestionList::_Next( void ) + const OUString* SuggestionList::_Next( void ) { - const String* pRet = NULL; + const OUString* pRet = NULL; while( m_nAct < m_nSize && !pRet ) { pRet = m_ppElements[ m_nAct ]; @@ -1373,15 +1373,15 @@ namespace svx return pRet; } - const String* SuggestionList::First( void ) + const OUString* SuggestionList::First( void ) { m_nAct = 0; return _Next(); } - const String* SuggestionList::Next( void ) + const OUString* SuggestionList::Next( void ) { - const String* pRet; + const OUString* pRet; if( m_nAct < m_nNumOfEntries ) { @@ -1572,7 +1572,7 @@ namespace svx bool bRemovedSomething = DeleteEntryFromDictionary( m_aOriginal, xDict ); OUString aLeft( m_aOriginal ); - const String* pRight = m_pSuggestions->First(); + const OUString* pRight = m_pSuggestions->First(); bool bAddedSomething = false; while( pRight ) { @@ -1635,7 +1635,7 @@ namespace svx { if( DeleteEntryFromDictionary( m_aOriginal, m_rDictList[ m_nCurrentDict ] ) ) { - m_aOriginal.Erase(); + m_aOriginal = ""; m_bModifiedOriginal = true; InitEditDictDialog( m_nCurrentDict ); } @@ -1650,13 +1650,13 @@ namespace svx if( m_nCurrentDict != _nSelDict ) { m_nCurrentDict = _nSelDict; - m_aOriginal.Erase(); + m_aOriginal = ""; m_bModifiedOriginal = true; } UpdateOriginalLB(); - m_aOriginalLB.SetText( m_aOriginal.Len()? m_aOriginal : m_aEditHintText, Selection( 0, SELECTION_MAX ) ); + m_aOriginalLB.SetText( !m_aOriginal.isEmpty() ? m_aOriginal : m_aEditHintText, Selection( 0, SELECTION_MAX ) ); m_aOriginalLB.GrabFocus(); UpdateSuggestions(); @@ -1688,7 +1688,7 @@ namespace svx void HangulHanjaEditDictDialog::UpdateButtonStates() { - bool bHaveValidOriginalString = m_aOriginal.Len() && m_aOriginal != m_aEditHintText; + bool bHaveValidOriginalString = !m_aOriginal.isEmpty() && m_aOriginal != m_aEditHintText; bool bNew = bHaveValidOriginalString && m_pSuggestions && m_pSuggestions->GetCount() > 0; bNew = bNew && (m_bModifiedSuggestions || m_bModifiedOriginal); @@ -1732,10 +1732,10 @@ namespace svx void HangulHanjaEditDictDialog::SetEditText( Edit& _rEdit, sal_uInt16 _nEntryNum ) { - String aStr; + OUString aStr; if( m_pSuggestions ) { - const String* p = m_pSuggestions->Get( _nEntryNum ); + const OUString* p = m_pSuggestions->Get( _nEntryNum ); if( p ) aStr = *p; } @@ -1747,9 +1747,9 @@ namespace svx { m_bModifiedSuggestions = true; - String aTxt( _pEdit->GetText() ); + OUString aTxt( _pEdit->GetText() ); sal_uInt16 nEntryNum = m_nTopPos + _nEntryOffset; - if( aTxt.Len() == 0 ) + if( aTxt.isEmpty() ) { //reset suggestion if( m_pSuggestions ) @@ -1821,7 +1821,7 @@ namespace svx for( sal_uInt32 n = 0 ; n < nDictCnt ; ++n ) { Reference< XConversionDictionary > xDic( m_rDictList[n] ); - String aName; + OUString aName; if(xDic.is()) aName = xDic->getName(); m_aBookLB.InsertEntry( aName ); diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index ca83ae3658c8..c5ac9ff1640a 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -54,15 +54,15 @@ using namespace ::com::sun::star; struct DocumentTypeData { - String aStrURL; - String aStrExt; - DocumentTypeData (String aURL, String aExt) : aStrURL(aURL), aStrExt(aExt) + OUString aStrURL; + OUString aStrExt; + DocumentTypeData (OUString aURL, OUString aExt) : aStrURL(aURL), aStrExt(aExt) {} }; -sal_Bool SvxHyperlinkNewDocTp::ImplGetURLObject( const String& rPath, const String& rBase, INetURLObject& aURLObject ) const +sal_Bool SvxHyperlinkNewDocTp::ImplGetURLObject( const OUString& rPath, const OUString& rBase, INetURLObject& aURLObject ) const { - sal_Bool bIsValidURL = rPath.Len() != 0; + sal_Bool bIsValidURL = !rPath.isEmpty(); if ( bIsValidURL ) { aURLObject.SetURL( rPath ); @@ -78,8 +78,8 @@ sal_Bool SvxHyperlinkNewDocTp::ImplGetURLObject( const String& rPath, const Stri bIsValidURL = aURLObject.GetProtocol() != INET_PROT_NOT_VALID; if ( bIsValidURL ) { - String aBase( aURLObject.getName( INetURLObject::LAST_SEGMENT, sal_False ) ); - if ( ( aBase.Len() == 0 ) || ( aBase.GetChar( 0 ) == '.' ) ) + OUString aBase( aURLObject.getName( INetURLObject::LAST_SEGMENT, sal_False ) ); + if ( aBase.isEmpty() || ( aBase[0] == '.' ) ) bIsValidURL = sal_False; } if ( bIsValidURL ) @@ -190,19 +190,19 @@ void SvxHyperlinkNewDocTp::FillDocumentList () if ( !aDocumentUrl.isEmpty() ) { if ( aDocumentUrl == "private:factory/simpress?slot=6686" ) // SJ: #106216# do not start - aDocumentUrl = String( RTL_CONSTASCII_USTRINGPARAM( "private:factory/simpress" ) ); // the AutoPilot for impress + aDocumentUrl = "private:factory/simpress"; // the AutoPilot for impress // insert private-url and default-extension as user-data const SfxFilter* pFilter = SfxFilter::GetDefaultFilterFromFactory( aDocumentUrl ); if ( pFilter ) { // insert doc-name and image - String aTitleName( aTitle ); - aTitleName.Erase( aTitleName.Search( (sal_Unicode)'~' ), 1 ); + OUString aTitleName( aTitle ); + aTitleName = aTitleName.replaceFirst( "~", "" ); sal_Int16 nPos = maLbDocTypes.InsertEntry ( aTitleName ); - String aStrDefExt( pFilter->GetDefaultExtension () ); - DocumentTypeData *pTypeData = new DocumentTypeData ( aDocumentUrl, aStrDefExt.Copy( 2, aStrDefExt.Len() ) ); + OUString aStrDefExt( pFilter->GetDefaultExtension () ); + DocumentTypeData *pTypeData = new DocumentTypeData ( aDocumentUrl, aStrDefExt.copy( 2 ) ); maLbDocTypes.SetEntryData ( nPos, pTypeData ); } } @@ -218,8 +218,8 @@ void SvxHyperlinkNewDocTp::FillDocumentList () |* |************************************************************************/ -void SvxHyperlinkNewDocTp::GetCurentItemData ( OUString& rStrURL, String& aStrName, - String& aStrIntName, String& aStrFrame, +void SvxHyperlinkNewDocTp::GetCurentItemData ( OUString& rStrURL, OUString& aStrName, + OUString& aStrIntName, OUString& aStrFrame, SvxLinkInsertMode& eMode ) { // get data from dialog-controls @@ -284,7 +284,7 @@ void SvxHyperlinkNewDocTp::DoApply () EnterWait(); // get data from dialog-controls - String aStrNewName = maCbbPath.GetText(); + OUString aStrNewName = maCbbPath.GetText(); if ( aStrNewName == aEmptyStr ) aStrNewName = maStrInitURL; @@ -333,7 +333,7 @@ void SvxHyperlinkNewDocTp::DoApply () sal_uInt16 nPos = maLbDocTypes.GetSelectEntryPos(); if( nPos == LISTBOX_ENTRY_NOTFOUND ) nPos=0; - String aStrDocName ( ( ( DocumentTypeData* ) + OUString aStrDocName ( ( ( DocumentTypeData* ) maLbDocTypes.GetEntryData( nPos ) )->aStrURL ); // create items @@ -406,8 +406,8 @@ IMPL_LINK_NOARG(SvxHyperlinkNewDocTp, ClickNewHdl_Impl) OUString aTempStrURL( maCbbPath.GetText() ); utl::LocalFileHelper::ConvertSystemPathToURL( aTempStrURL, maCbbPath.GetBaseURL(), aStrURL ); - String aStrPath = aStrURL; - sal_Bool bZeroPath = ( aStrPath.Len() == 0 ); + OUString aStrPath = aStrURL; + sal_Bool bZeroPath = aStrPath.isEmpty(); sal_Bool bHandleFileName = bZeroPath; // when path has length of 0, then the rest should always be handled // as file name, otherwise we do not yet know @@ -425,7 +425,7 @@ IMPL_LINK_NOARG(SvxHyperlinkNewDocTp, ClickNewHdl_Impl) sal_Char const sSlash[] = "/"; INetURLObject aURL( aStrURL, INET_PROT_FILE ); - String aStrName; + OUString aStrName; if( bHandleFileName ) aStrName = bZeroPath? aTempStrURL : OUString(aURL.getName()); @@ -441,7 +441,7 @@ IMPL_LINK_NOARG(SvxHyperlinkNewDocTp, ClickNewHdl_Impl) INetURLObject aNewURL( aStrTmp ); - if( aStrName.Len() > 0 && !aNewURL.getExtension().isEmpty() && + if( !aStrName.isEmpty() && !aNewURL.getExtension().isEmpty() && maLbDocTypes.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND ) { // get private-url diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx index e8e9275e579f..5aa56981fcc2 100644 --- a/cui/source/dialogs/hldoctp.cxx +++ b/cui/source/dialogs/hldoctp.cxx @@ -61,7 +61,7 @@ SvxHyperlinkDocTp::SvxHyperlinkDocTp ( Window *pParent, const SfxItemSet& rItemS maCbbPath.SetPosSizePixel ( LogicToPixel( Point( COL_2, 15 ), MAP_APPFONT ), LogicToPixel( Size ( 176 - COL_DIFF, 60), MAP_APPFONT ) ); maCbbPath.Show(); - String aFileScheme( INET_FILE_SCHEME, RTL_TEXTENCODING_ASCII_US ); + OUString aFileScheme( INET_FILE_SCHEME ); maCbbPath.SetBaseURL(aFileScheme); maCbbPath.SetHelpId( HID_HYPERDLG_DOC_PATH ); @@ -115,13 +115,13 @@ void SvxHyperlinkDocTp::FillDlgFields(const OUString& rStrURL) |* |************************************************************************/ -String SvxHyperlinkDocTp::GetCurrentURL () +OUString SvxHyperlinkDocTp::GetCurrentURL () { // get data from dialog-controls OUString aStrURL; - String aStrPath ( maCbbPath.GetText() ); - const String aBaseURL ( maCbbPath.GetBaseURL() ); - String aStrMark( maEdTarget.GetText() ); + OUString aStrPath ( maCbbPath.GetText() ); + const OUString aBaseURL ( maCbbPath.GetBaseURL() ); + OUString aStrMark( maEdTarget.GetText() ); if ( aStrPath != aEmptyStr ) { @@ -151,15 +151,15 @@ String SvxHyperlinkDocTp::GetCurrentURL () |* |************************************************************************/ -void SvxHyperlinkDocTp::GetCurentItemData ( OUString& rStrURL, String& aStrName, - String& aStrIntName, String& aStrFrame, +void SvxHyperlinkDocTp::GetCurentItemData ( OUString& rStrURL, OUString& aStrName, + OUString& aStrIntName, OUString& aStrFrame, SvxLinkInsertMode& eMode ) { // get data from standard-fields rStrURL = GetCurrentURL(); if( rStrURL.equalsIgnoreAsciiCase( sFileScheme ) ) - rStrURL=""; + rStrURL = ""; GetDataFromCommonFields( aStrName, aStrIntName, aStrFrame, eMode ); } @@ -210,7 +210,7 @@ IMPL_LINK_NOARG(SvxHyperlinkDocTp, ClickFileopenHdl_Impl) if ( ERRCODE_NONE == nError ) { - String aURL( aDlg.GetPath() ); + OUString aURL( aDlg.GetPath() ); OUString aPath; utl::LocalFileHelper::ConvertURLToSystemPath( aURL, aPath ); @@ -339,7 +339,7 @@ IMPL_LINK_NOARG(SvxHyperlinkDocTp, LostFocusPathHdl_Impl) |* |************************************************************************/ -void SvxHyperlinkDocTp::SetMarkStr ( const String& aStrMark ) +void SvxHyperlinkDocTp::SetMarkStr ( const OUString& aStrMark ) { maEdTarget.SetText ( aStrMark ); diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 01470e57ee1b..6809ed634313 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -153,7 +153,7 @@ void SvxHyperlinkInternetTp::setAnonymousFTPUser() maCbAnonymous.Check(); } -void SvxHyperlinkInternetTp::setFTPUser(const String& rUser, const String& rPassword) +void SvxHyperlinkInternetTp::setFTPUser(const OUString& rUser, const OUString& rPassword) { maEdLogin.SetText ( rUser ); maEdPassword.SetText ( rPassword ); @@ -171,8 +171,8 @@ void SvxHyperlinkInternetTp::setFTPUser(const String& rUser, const String& rPass |* |************************************************************************/ -void SvxHyperlinkInternetTp::GetCurentItemData ( OUString& rStrURL, String& aStrName, - String& aStrIntName, String& aStrFrame, +void SvxHyperlinkInternetTp::GetCurentItemData ( OUString& rStrURL, OUString& aStrName, + OUString& aStrIntName, OUString& aStrFrame, SvxLinkInsertMode& eMode ) { rStrURL = CreateAbsoluteURL(); @@ -231,8 +231,8 @@ void SvxHyperlinkInternetTp::SetInitFocus() IMPL_LINK_NOARG(SvxHyperlinkInternetTp, ModifiedTargetHdl_Impl) { - String aScheme = GetSchemeFromURL( maCbbTarget.GetText() ); - if(aScheme.Len()!=0) + OUString aScheme = GetSchemeFromURL( maCbbTarget.GetText() ); + if( !aScheme.isEmpty() ) SetScheme( aScheme ); // start timer @@ -320,19 +320,19 @@ void SvxHyperlinkInternetTp::SetScheme(const OUString& rScheme) void SvxHyperlinkInternetTp::RemoveImproperProtocol(const OUString& aProperScheme) { - String aStrURL ( maCbbTarget.GetText() ); + OUString aStrURL ( maCbbTarget.GetText() ); if ( aStrURL != aEmptyStr ) { OUString aStrScheme(GetSchemeFromURL(aStrURL)); if ( !aStrScheme.isEmpty() && aStrScheme != aProperScheme ) { - aStrURL.Erase ( 0, aStrScheme.getLength() ); + aStrURL = aStrURL.copy( aStrScheme.getLength() ); maCbbTarget.SetText ( aStrURL ); } } } -String SvxHyperlinkInternetTp::GetSchemeFromButtons() const +OUString SvxHyperlinkInternetTp::GetSchemeFromButtons() const { if( maRbtLinktypFTP.IsChecked() ) return OUString(INET_FTP_SCHEME); @@ -448,7 +448,7 @@ void SvxHyperlinkInternetTp::RefreshMarkWindow() if ( maRbtLinktypInternet.IsChecked() && IsMarkWndVisible() ) { EnterWait(); - String aStrURL( CreateAbsoluteURL() ); + OUString aStrURL( CreateAbsoluteURL() ); if ( aStrURL != aEmptyStr ) mpMarkWnd->RefreshTree ( aStrURL ); else @@ -464,7 +464,7 @@ void SvxHyperlinkInternetTp::RefreshMarkWindow() |* |************************************************************************/ -void SvxHyperlinkInternetTp::SetMarkStr ( const String& aStrMark ) +void SvxHyperlinkInternetTp::SetMarkStr ( const OUString& aStrMark ) { OUString aStrURL ( maCbbTarget.GetText() ); diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx index fed79ae034ab..0fa2688dde00 100644 --- a/cui/source/dialogs/hlmailtp.cxx +++ b/cui/source/dialogs/hlmailtp.cxx @@ -136,17 +136,17 @@ void SvxHyperlinkMailTp::FillDlgFields(const OUString& rStrURL) |* |************************************************************************/ -void SvxHyperlinkMailTp::GetCurentItemData ( OUString& rStrURL, String& aStrName, - String& aStrIntName, String& aStrFrame, +void SvxHyperlinkMailTp::GetCurentItemData ( OUString& rStrURL, OUString& aStrName, + OUString& aStrIntName, OUString& aStrFrame, SvxLinkInsertMode& eMode ) { rStrURL = CreateAbsoluteURL(); GetDataFromCommonFields( aStrName, aStrIntName, aStrFrame, eMode ); } -String SvxHyperlinkMailTp::CreateAbsoluteURL() const +OUString SvxHyperlinkMailTp::CreateAbsoluteURL() const { - String aStrURL = maCbbReceiver.GetText(); + OUString aStrURL = maCbbReceiver.GetText(); INetURLObject aURL(aStrURL); if( aURL.GetProtocol() == INET_PROT_NOT_VALID ) @@ -160,8 +160,8 @@ String SvxHyperlinkMailTp::CreateAbsoluteURL() const { if ( maEdSubject.GetText() != OUString(aEmptyStr) ) { - String aQuery = OUString("subject="); - aQuery.Append( maEdSubject.GetText() ); + OUString aQuery("subject="); + aQuery += maEdSubject.GetText(); aURL.SetParam(aQuery); } } @@ -223,21 +223,21 @@ void SvxHyperlinkMailTp::SetScheme(const OUString& rScheme) |* |************************************************************************/ -void SvxHyperlinkMailTp::RemoveImproperProtocol(const String& aProperScheme) +void SvxHyperlinkMailTp::RemoveImproperProtocol(const OUString& aProperScheme) { - String aStrURL ( maCbbReceiver.GetText() ); + OUString aStrURL ( maCbbReceiver.GetText() ); if ( aStrURL != aEmptyStr ) { - String aStrScheme = GetSchemeFromURL( aStrURL ); + OUString aStrScheme = GetSchemeFromURL( aStrURL ); if ( aStrScheme != aEmptyStr && aStrScheme != aProperScheme ) { - aStrURL.Erase ( 0, aStrScheme.Len() ); + aStrURL = aStrURL.copy( aStrScheme.getLength() ); maCbbReceiver.SetText ( aStrURL ); } } } -String SvxHyperlinkMailTp::GetSchemeFromButtons() const +OUString SvxHyperlinkMailTp::GetSchemeFromButtons() const { if( maRbtNews.IsChecked() ) return OUString(INET_NEWS_SCHEME); @@ -261,7 +261,7 @@ INetProtocol SvxHyperlinkMailTp::GetSmartProtocolFromButtons() const IMPL_LINK_NOARG(SvxHyperlinkMailTp, Click_SmartProtocol_Impl) { - String aScheme = GetSchemeFromButtons(); + OUString aScheme = GetSchemeFromButtons(); SetScheme( aScheme ); return( 0L ); } @@ -274,8 +274,8 @@ IMPL_LINK_NOARG(SvxHyperlinkMailTp, Click_SmartProtocol_Impl) IMPL_LINK_NOARG(SvxHyperlinkMailTp, ModifiedReceiverHdl_Impl) { - String aScheme = GetSchemeFromURL( maCbbReceiver.GetText() ); - if(aScheme.Len()!=0) + OUString aScheme = GetSchemeFromURL( maCbbReceiver.GetText() ); + if(!aScheme.isEmpty()) SetScheme( aScheme ); return( 0L ); diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx index 8366fa6aa77e..e957e3940626 100644 --- a/cui/source/dialogs/hlmarkwn.cxx +++ b/cui/source/dialogs/hlmarkwn.cxx @@ -90,7 +90,7 @@ void SvxHlmarkTreeLBox::Paint( const Rectangle& rRect ) Rectangle aDrawRect( Point( 0, 0 ), GetSizePixel() ); - String aStrMessage; + OUString aStrMessage; switch( mpParentWnd->mnError ) { @@ -139,7 +139,7 @@ SvxHlinkDlgMarkWnd::SvxHlinkDlgMarkWnd( SvxHyperlinkTabPageBase *pParent ) WB_HASBUTTONS | //WB_HASLINESATROOT | WB_HSCROLL | WB_HASBUTTONSATROOT ); - maLbTree.SetAccessibleName(String(CUI_RES(STR_MARK_TREE))); + maLbTree.SetAccessibleName(CUI_RES(STR_MARK_TREE)); } SvxHlinkDlgMarkWnd::~SvxHlinkDlgMarkWnd() @@ -411,7 +411,7 @@ int SvxHlinkDlgMarkWnd::FillTree( uno::Reference< container::XNameAccess > xLink aAny = xTarget->getPropertyValue( aProp_LinkDisplayName ); OUString aDisplayName; aAny >>= aDisplayName; - String aStrDisplayname ( aDisplayName ); + OUString aStrDisplayname ( aDisplayName ); // is it a target ? uno::Reference< lang::XServiceInfo > xSI( xTarget, uno::UNO_QUERY ); diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index 762a58110fca..f4673edb3a10 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -260,8 +260,8 @@ void SvxHyperlinkTabPageBase::FillStandardDlgFields ( SvxHyperlinkItem* pHyperli mpCbbFrame->SetText ( pHyperlinkItem->GetTargetFrame() ); // Form - String aStrFormText = CUI_RESSTR( RID_SVXSTR_HYPERDLG_FROM_TEXT ); - String aStrFormButton = CUI_RESSTR( RID_SVXSTR_HYPERDLG_FORM_BUTTON ); + OUString aStrFormText = CUI_RESSTR( RID_SVXSTR_HYPERDLG_FROM_TEXT ); + OUString aStrFormButton = CUI_RESSTR( RID_SVXSTR_HYPERDLG_FORM_BUTTON ); if( pHyperlinkItem->GetInsertMode() & HLINK_HTMLMODE ) { @@ -304,7 +304,7 @@ sal_Bool SvxHyperlinkTabPageBase::AskApply () } // This method would be called from bookmark-window to set new mark-string -void SvxHyperlinkTabPageBase::SetMarkStr ( const String& /*aStrMark*/ ) +void SvxHyperlinkTabPageBase::SetMarkStr ( const OUString& /*aStrMark*/ ) { // default-implemtation : do nothing } @@ -367,13 +367,13 @@ IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, ClickScriptHdl_Impl) SfxMacroTabPage *pMacroPage = (SfxMacroTabPage*) aDlg.GetTabPage(); if ( pHyperlinkItem->GetMacroEvents() & HYPERDLG_EVENT_MOUSEOVER_OBJECT ) - pMacroPage->AddEvent( String( CUI_RESSTR(RID_SVXSTR_HYPDLG_MACROACT1) ), + pMacroPage->AddEvent( OUString( CUI_RESSTR(RID_SVXSTR_HYPDLG_MACROACT1) ), SFX_EVENT_MOUSEOVER_OBJECT ); if ( pHyperlinkItem->GetMacroEvents() & HYPERDLG_EVENT_MOUSECLICK_OBJECT ) - pMacroPage->AddEvent( String( CUI_RESSTR(RID_SVXSTR_HYPDLG_MACROACT2) ), + pMacroPage->AddEvent( OUString( CUI_RESSTR(RID_SVXSTR_HYPDLG_MACROACT2) ), SFX_EVENT_MOUSECLICK_OBJECT); if ( pHyperlinkItem->GetMacroEvents() & HYPERDLG_EVENT_MOUSEOUT_OBJECT ) - pMacroPage->AddEvent( String( CUI_RESSTR(RID_SVXSTR_HYPDLG_MACROACT3) ), + pMacroPage->AddEvent( OUString( CUI_RESSTR(RID_SVXSTR_HYPDLG_MACROACT3) ), SFX_EVENT_MOUSEOUT_OBJECT); if ( bIsInputEnabled ) @@ -417,7 +417,7 @@ SvxMacroTableDtor* SvxHyperlinkTabPageBase::GetMacroTable() // try to detect the current protocol that is used in rStrURL OUString SvxHyperlinkTabPageBase::GetSchemeFromURL( const OUString& rStrURL ) { - String aStrScheme; + OUString aStrScheme; INetURLObject aURL( rStrURL ); INetProtocol aProtocol = aURL.GetProtocol(); @@ -454,8 +454,8 @@ OUString SvxHyperlinkTabPageBase::GetSchemeFromURL( const OUString& rStrURL ) } -void SvxHyperlinkTabPageBase::GetDataFromCommonFields( String& aStrName, - String& aStrIntName, String& aStrFrame, +void SvxHyperlinkTabPageBase::GetDataFromCommonFields( OUString& aStrName, + OUString& aStrIntName, OUString& aStrFrame, SvxLinkInsertMode& eMode ) { aStrIntName = mpEdText->GetText(); @@ -482,7 +482,7 @@ void SvxHyperlinkTabPageBase::Reset( const SfxItemSet& rItemSet) FillStandardDlgFields (pHyperlinkItem); // set all other fields - FillDlgFields ( (String&)pHyperlinkItem->GetURL() ); + FillDlgFields ( (OUString&)pHyperlinkItem->GetURL() ); // Store initial URL maStrInitURL = pHyperlinkItem->GetURL(); @@ -492,12 +492,11 @@ void SvxHyperlinkTabPageBase::Reset( const SfxItemSet& rItemSet) // Fill output-ItemSet sal_Bool SvxHyperlinkTabPageBase::FillItemSet( SfxItemSet& rOut) { - OUString aStrURL; - String aStrName, aStrIntName, aStrFrame; + OUString aStrURL, aStrName, aStrIntName, aStrFrame; SvxLinkInsertMode eMode; GetCurentItemData ( aStrURL, aStrName, aStrIntName, aStrFrame, eMode); - if ( !aStrName.Len() ) //automatically create a visible name if the link is created without name + if ( aStrName.isEmpty() ) //automatically create a visible name if the link is created without name aStrName = CreateUiNameFromURL(aStrURL); sal_uInt16 nEvents = GetMacroEvents(); @@ -510,7 +509,7 @@ sal_Bool SvxHyperlinkTabPageBase::FillItemSet( SfxItemSet& rOut) return sal_True; } -String SvxHyperlinkTabPageBase::CreateUiNameFromURL( const String& aStrURL ) +OUString SvxHyperlinkTabPageBase::CreateUiNameFromURL( const OUString& aStrURL ) { OUString aStrUiURL; INetURLObject aURLObj( aStrURL ); @@ -564,8 +563,7 @@ int SvxHyperlinkTabPageBase::DeactivatePage( SfxItemSet* _pSet) HideMarkWnd (); // retrieve data of dialog - OUString aStrURL; - String aStrName, aStrIntName, aStrFrame; + OUString aStrURL, aStrName, aStrIntName, aStrFrame; SvxLinkInsertMode eMode; GetCurentItemData ( aStrURL, aStrName, aStrIntName, aStrFrame, eMode); diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx index 6572614f75eb..6bddeb3e24b2 100644 --- a/cui/source/dialogs/hyphen.cxx +++ b/cui/source/dialogs/hyphen.cxx @@ -75,27 +75,27 @@ void HyphenEdit::KeyInput( const KeyEvent& rKEvt ) void SvxHyphenWordDialog::EnableLRBtn_Impl() { - String aTxt( aEditWord ); - xub_StrLen nLen = aTxt.Len(); + OUString aTxt( aEditWord ); + xub_StrLen nLen = aTxt.getLength(); xub_StrLen i; m_pRightBtn->Disable(); for ( i = nOldPos + 2; i < nLen; ++i ) { - if ( aTxt.GetChar( i ) == sal_Unicode( HYPH_POS_CHAR ) ) + if ( aTxt[ i ] == sal_Unicode( HYPH_POS_CHAR ) ) { m_pRightBtn->Enable(); break; } } - DBG_ASSERT(nOldPos < aTxt.Len(), "nOldPos out of range"); - if (nOldPos >= aTxt.Len()) - nOldPos = aTxt.Len() - 1; + DBG_ASSERT(nOldPos < aTxt.getLength(), "nOldPos out of range"); + if (nOldPos >= aTxt.getLength()) + nOldPos = aTxt.getLength() - 1; m_pLeftBtn->Disable(); for ( i = nOldPos; i-- > 0; ) { - if ( aTxt.GetChar( i ) == sal_Unicode( HYPH_POS_CHAR ) ) + if ( aTxt[ i ] == sal_Unicode( HYPH_POS_CHAR ) ) { m_pLeftBtn->Enable(); break; @@ -104,7 +104,7 @@ void SvxHyphenWordDialog::EnableLRBtn_Impl() } -String SvxHyphenWordDialog::EraseUnusableHyphens_Impl( +OUString SvxHyphenWordDialog::EraseUnusableHyphens_Impl( uno::Reference< linguistic2::XPossibleHyphens > &rxPossHyph, sal_uInt16 _nMaxHyphenationPos ) { @@ -135,13 +135,13 @@ String SvxHyphenWordDialog::EraseUnusableHyphens_Impl( // Thus rule 2) just eliminates those positions which will not be used by the core at all // even if the user were to select one of them. - String aTxt; + OUString aTxt; DBG_ASSERT(rxPossHyph.is(), "missing possible hyphens"); if (rxPossHyph.is()) { - DBG_ASSERT( aActWord == String( rxPossHyph->getWord() ), "word mismatch" ); + DBG_ASSERT( aActWord == rxPossHyph->getWord(), "word mismatch" ); - aTxt = String( rxPossHyph->getPossibleHyphens() ); + aTxt = rxPossHyph->getPossibleHyphens(); nHyphenationPositionsOffset = 0; uno::Sequence< sal_Int16 > aHyphenationPositions( @@ -150,11 +150,11 @@ String SvxHyphenWordDialog::EraseUnusableHyphens_Impl( const sal_Int16 *pHyphenationPos = aHyphenationPositions.getConstArray(); // find position nIdx after which all hyphen positions are unusable - xub_StrLen nIdx = STRING_NOTFOUND; - xub_StrLen nPos = 0, nPos1 = 0; + sal_Int32 nIdx = -1; + sal_Int32 nPos = 0, nPos1 = 0; if (nLen) { - xub_StrLen nStart = 0; + sal_Int32 nStart = 0; for (sal_Int32 i = 0; i < nLen; ++i) { if (pHyphenationPos[i] > _nMaxHyphenationPos) @@ -162,9 +162,9 @@ String SvxHyphenWordDialog::EraseUnusableHyphens_Impl( else { // find corresponding hyphen pos in string - nPos = aTxt.Search( sal_Unicode( HYPH_POS_CHAR ), nStart ); + nPos = aTxt.indexOf( sal_Unicode( HYPH_POS_CHAR ), nStart ); - if (nStart == STRING_NOTFOUND) + if (nStart == -1) break; else { @@ -174,30 +174,34 @@ String SvxHyphenWordDialog::EraseUnusableHyphens_Impl( } } } - DBG_ASSERT(nIdx != STRING_NOTFOUND, "no usable hyphenation position"); + DBG_ASSERT(nIdx != -1, "no usable hyphenation position"); // 1) remove all not usable hyphenation positions from the end of the string - nPos = nIdx == STRING_NOTFOUND ? 0 : nIdx + 1; + nPos = nIdx == -1 ? 0 : nIdx + 1; nPos1 = nPos; //save for later use in 2) below const OUString aTmp( sal_Unicode( HYPH_POS_CHAR ) ); const OUString aEmpty; - while (nPos != STRING_NOTFOUND) - nPos = aTxt.SearchAndReplace( aTmp, aEmpty, nPos + 1 ); + while (nPos != -1) + { + nPos++; + aTxt = aTxt.replaceFirst( aTmp, aEmpty, &nPos); + } // 2) remove all hyphenation positions from the start that are not considered by the core - const OUString aSearchRange( aTxt.Copy( 0, nPos1 ) ); + const OUString aSearchRange( aTxt.copy( 0, nPos1 ) ); sal_Int32 nPos2 = aSearchRange.lastIndexOf( '-' ); // the '-' position the core will use by default if (nPos2 != -1 ) { - String aLeft( aSearchRange.copy( 0, nPos2 ) ); + OUString aLeft( aSearchRange.copy( 0, nPos2 ) ); nPos = 0; - while (nPos != STRING_NOTFOUND) + while (nPos != -1) { - nPos = aLeft.SearchAndReplace( aTmp, aEmpty, nPos + 1 ); - if (nPos != STRING_NOTFOUND) + nPos++; + aLeft = aLeft.replaceFirst( aTmp, aEmpty, &nPos ); + if (nPos != -1) ++nHyphenationPositionsOffset; } - aTxt.Replace( 0, nPos2, aLeft ); + aTxt = aTxt.replaceAt( 0, nPos2, aLeft ); } } return aTxt; @@ -217,7 +221,7 @@ void SvxHyphenWordDialog::InitControls_Impl() } m_pWordEdit->SetText( aEditWord ); - nOldPos = aEditWord.Len(); + nOldPos = aEditWord.getLength(); SelLeft(); EnableLRBtn_Impl(); } @@ -229,13 +233,13 @@ void SvxHyphenWordDialog::ContinueHyph_Impl( sal_uInt16 nInsPos ) { if (nInsPos) { - String aTmp( aEditWord ); - DBG_ASSERT(nInsPos <= aTmp.Len() - 2, "wrong hyphen position"); + OUString aTmp( aEditWord ); + DBG_ASSERT(nInsPos <= aTmp.getLength() - 2, "wrong hyphen position"); sal_Int16 nIdxPos = -1; for (sal_uInt16 i = 0; i <= nInsPos; ++i) { - if (HYPH_POS_CHAR == aTmp.GetChar( i )) + if (HYPH_POS_CHAR == aTmp[ i ]) nIdxPos++; } // take the possible hyphenation positions that got removed from the @@ -266,7 +270,7 @@ void SvxHyphenWordDialog::ContinueHyph_Impl( sal_uInt16 nInsPos ) // adapt actual word and language to new found hyphenation result if(xHyphWord.is()) { - aActWord = String( xHyphWord->getWord() ); + aActWord = xHyphWord->getWord(); nActLanguage = LanguageTag( xHyphWord->getLocale() ).getLanguageType(); nMaxHyphenationPos = xHyphWord->getHyphenationPos(); InitControls_Impl(); @@ -281,11 +285,11 @@ void SvxHyphenWordDialog::ContinueHyph_Impl( sal_uInt16 nInsPos ) sal_uInt16 SvxHyphenWordDialog::GetHyphIndex_Impl() { sal_uInt16 nPos = 0; - String aTxt( m_pWordEdit->GetText() ); + OUString aTxt( m_pWordEdit->GetText() ); - for ( sal_uInt16 i=0 ; i < aTxt.Len(); ++i ) + for ( sal_Int32 i=0; i < aTxt.getLength(); ++i ) { - sal_Unicode cChar = aTxt.GetChar( i ); + sal_Unicode cChar = aTxt[ i ]; if ( cChar == CUR_HYPH_POS_CHAR ) break; if ( cChar != HYPH_POS_CHAR ) @@ -300,13 +304,13 @@ void SvxHyphenWordDialog::SelLeft() DBG_ASSERT( nOldPos > 0, "invalid hyphenation position" ); if (nOldPos > 0) { - String aTxt( aEditWord ); + OUString aTxt( aEditWord ); for ( xub_StrLen i = nOldPos - 1; i > 0; --i) { - DBG_ASSERT(i <= aTxt.Len(), "index out of range"); - if (aTxt.GetChar( i ) == sal_Unicode( HYPH_POS_CHAR )) + DBG_ASSERT(i <= aTxt.getLength(), "index out of range"); + if (aTxt[ i ] == sal_Unicode( HYPH_POS_CHAR )) { - aTxt.SetChar( i, sal_Unicode( CUR_HYPH_POS_CHAR ) ); + aTxt = aTxt.replaceAt( i, 1, OUString( CUR_HYPH_POS_CHAR ) ); nOldPos = i; m_pWordEdit->SetText( aTxt ); @@ -323,12 +327,12 @@ void SvxHyphenWordDialog::SelLeft() void SvxHyphenWordDialog::SelRight() { - String aTxt( aEditWord ); - for ( xub_StrLen i = nOldPos + 1; i < aTxt.Len(); ++i ) + OUString aTxt( aEditWord ); + for ( xub_StrLen i = nOldPos + 1; i < aTxt.getLength(); ++i ) { - if (aTxt.GetChar( i ) == sal_Unicode( HYPH_POS_CHAR )) + if (aTxt[ i ] == sal_Unicode( HYPH_POS_CHAR )) { - aTxt.SetChar( i, sal_Unicode( CUR_HYPH_POS_CHAR ) ); + aTxt = aTxt.replaceAt( i, 1, OUString( CUR_HYPH_POS_CHAR ) ); nOldPos = i; m_pWordEdit->SetText( aTxt ); @@ -451,7 +455,7 @@ IMPL_LINK_NOARG(SvxHyphenWordDialog, GetFocusHdl_Impl) // class SvxHyphenWordDialog --------------------------------------------- SvxHyphenWordDialog::SvxHyphenWordDialog( - const String &rWord, LanguageType nLang, + const OUString &rWord, LanguageType nLang, Window* pParent, uno::Reference< linguistic2::XHyphenator > &xHyphen, SvxSpellWrapper* pWrapper) @@ -486,7 +490,7 @@ SvxHyphenWordDialog::SvxHyphenWordDialog( DBG_ASSERT( xHyphWord.is(), "hyphenation result missing" ); if (xHyphWord.is()) { - DBG_ASSERT( aActWord == String( xHyphWord->getWord() ), "word mismatch" ); + DBG_ASSERT( aActWord == xHyphWord->getWord(), "word mismatch" ); DBG_ASSERT( nActLanguage == LanguageTag( xHyphWord->getLocale() ).getLanguageType(), "language mismatch" ); nMaxHyphenationPos = xHyphWord->getHyphenationPos(); } @@ -518,7 +522,7 @@ SvxHyphenWordDialog::~SvxHyphenWordDialog() void SvxHyphenWordDialog::SetWindowTitle( LanguageType nLang ) { - String aLangStr( SvtLanguageTable::GetLanguageString( nLang ) ); + OUString aLangStr( SvtLanguageTable::GetLanguageString( nLang ) ); OUString aTmp( aLabel ); aTmp += " ("; aTmp += aLangStr; diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index 1f853ff62483..18ffc57cc35b 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -38,18 +38,18 @@ using ::std::vector; static const sal_Char* pViewOptDataName = "dialog data"; #define VIEWOPT_DATANAME OUString::createFromAscii( pViewOptDataName ) -static inline void SetViewOptUserItem( SvtViewOptions& rOpt, const String& rData ) +static inline void SetViewOptUserItem( SvtViewOptions& rOpt, const OUString& rData ) { - rOpt.SetUserItem( VIEWOPT_DATANAME, ::com::sun::star::uno::makeAny( OUString( rData ) ) ); + rOpt.SetUserItem( VIEWOPT_DATANAME, css::uno::makeAny( rData ) ); } -static inline String GetViewOptUserItem( const SvtViewOptions& rOpt ) +static inline OUString GetViewOptUserItem( const SvtViewOptions& rOpt ) { ::com::sun::star::uno::Any aAny( rOpt.GetUserItem( VIEWOPT_DATANAME ) ); OUString aUserData; aAny >>= aUserData; - return String( aUserData ); + return aUserData; } @@ -264,8 +264,8 @@ IconChoiceDialog ::~IconChoiceDialog () if ( pData->pPage ) { pData->pPage->FillUserData(); - String aPageData(pData->pPage->GetUserData()); - if ( aPageData.Len() ) + OUString aPageData(pData->pPage->GetUserData()); + if ( !aPageData.isEmpty() ) { SvtViewOptions aTabPageOpt( E_TABPAGE, OUString::number(pData->nId) ); @@ -302,7 +302,7 @@ IconChoiceDialog ::~IconChoiceDialog () SvxIconChoiceCtrlEntry* IconChoiceDialog::AddTabPage( sal_uInt16 nId, - const String& rIconText, + const OUString& rIconText, const Image& rChoiceIcon, CreatePage pCreateFunc /* != 0 */, GetPageRanges pRangesFunc /* darf 0 sein */, diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index 3d53af241edb..1be69603b484 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -68,13 +68,13 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::ui::dialogs; -static String impl_getSvtResString( sal_uInt32 nId ) +static OUString impl_getSvtResString( sal_uInt32 nId ) { - String aRet; + OUString aRet; ResMgr* pMgr = ResMgr::CreateResMgr( "svt", Application::GetSettings().GetUILanguageTag() ); if( pMgr ) { - aRet = String( ResId( nId, *pMgr ) ); + aRet = ResId( nId, *pMgr ); delete pMgr; } return aRet; @@ -213,13 +213,13 @@ short SvInsertOleDlg::Execute() DBG_ASSERT( m_xStorage.is(), "No storage!"); if ( m_xStorage.is() && ( nRet = Dialog::Execute() ) == RET_OK ) { - String aFileName; + OUString aFileName; sal_Bool bLink = sal_False; sal_Bool bCreateNew = IsCreateNew(); if ( bCreateNew ) { // create and insert new embedded object - String aServerName = rBox.GetSelectEntry(); + OUString aServerName = rBox.GetSelectEntry(); const SvObjectServer* pS = m_pServers->Get( aServerName ); if ( pS ) { @@ -272,20 +272,20 @@ short SvInsertOleDlg::Execute() if ( !m_xObj.is() ) { - if( aFileName.Len() ) // from OLE Dialog + if( !aFileName.isEmpty() ) // from OLE Dialog { // object couldn't be created from file // global Resource from svtools (former so3 resource) - String aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE_FROM_FILE ) ); - aErr.SearchAndReplace( OUString( '%' ), aFileName ); + OUString aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE_FROM_FILE ) ); + aErr = aErr.replaceFirst( "%", aFileName ); ErrorBox( this, WB_3DLOOK | WB_OK, aErr ).Execute(); } else { // object couldn't be created // global Resource from svtools (former so3 resource) - String aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE ) ); - aErr.SearchAndReplace( OUString( '%' ), aServerName ); + OUString aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE ) ); + aErr = aErr.replaceFirst( "%", aServerName ); ErrorBox( this, WB_3DLOOK | WB_OK, aErr ).Execute(); } } @@ -300,7 +300,7 @@ short SvInsertOleDlg::Execute() aFileName = aURL.GetMainURL( INetURLObject::NO_DECODE ); bLink = IsLinked(); - if ( aFileName.Len() ) + if ( !aFileName.isEmpty() ) { // create MediaDescriptor for file to create object from uno::Sequence < beans::PropertyValue > aMedium( 2 ); @@ -325,8 +325,8 @@ short SvInsertOleDlg::Execute() { // object couldn't be created from file // global Resource from svtools (former so3 resource) - String aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE_FROM_FILE ) ); - aErr.SearchAndReplace( OUString( '%' ), aFileName ); + OUString aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE_FROM_FILE ) ); + aErr = aErr.replaceFirst( "%", aFileName ); ErrorBox( this, WB_3DLOOK | WB_OK, aErr ).Execute(); } } @@ -401,7 +401,7 @@ SvInsertPlugInDialog::~SvInsertPlugInDialog() // ----------------------------------------------------------------------- -static void Plugin_ImplFillCommandSequence( const String& aCommands, uno::Sequence< beans::PropertyValue >& aCommandSequence ) +static void Plugin_ImplFillCommandSequence( const OUString& aCommands, uno::Sequence< beans::PropertyValue >& aCommandSequence ) { sal_Int32 nEaten; SvCommandList aLst; @@ -431,11 +431,11 @@ short SvInsertPlugInDialog::Execute() *m_pURL = INetURLObject(); m_aCommands = GetPlugInOptions(); - String aURL = GetPlugInFile(); + OUString aURL = GetPlugInFile(); // URL can be a valid and absolute URL or a system file name m_pURL->SetSmartProtocol( INET_PROT_FILE ); - if ( !aURL.Len() || m_pURL->SetSmartURL( aURL ) ) + if ( aURL.isEmpty() || m_pURL->SetSmartURL( aURL ) ) { // create a plugin object OUString aName; @@ -463,8 +463,8 @@ short SvInsertPlugInDialog::Execute() { // PlugIn couldn't be created // global Resource from svtools (former so3 resource) - String aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE_PLUGIN ) ); - aErr.SearchAndReplace( OUString('%'), aURL ); + OUString aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE_PLUGIN ) ); + aErr = aErr.replaceFirst( "%", aURL ); ErrorBox( this, WB_3DLOOK | WB_OK, aErr ).Execute(); } } @@ -723,7 +723,7 @@ IMPL_STATIC_LINK( SfxInsertFloatingFrameDialog, OpenHdl, PushButton*, EMPTYARG ) // create the file dialog sfx2::FileDialogHelper aFileDlg( - ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0, String() ); + ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0, OUString() ); // set the title aFileDlg.SetTitle(CUI_RESSTR(RID_SVXSTR_SELECT_FILE_IFRAME)); diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 887eb90ca82a..d3938c39e41c 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -488,7 +488,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) ChangeSource().Disable(); BreakLink().Disable(); - String aEmpty; + OUString aEmpty; SourceName().SetText( aEmpty ); TypeName().SetText( aEmpty ); } @@ -509,7 +509,7 @@ IMPL_LINK( SvBaseLinksDlg, UpdateWaitingHdl, Timer*, pTimer ) SvBaseLinkRef xLink( (SvBaseLink*)pBox->GetUserData() ); if( xLink.Is() ) { - String sCur( ImplGetStateStr( *xLink ) ), + OUString sCur( ImplGetStateStr( *xLink ) ), sOld( Links().GetEntryText( pBox, 3 ) ); if( sCur != sOld ) Links().SetEntryText( sCur, pBox, 3 ); @@ -560,9 +560,9 @@ IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink ) return 0; } -String SvBaseLinksDlg::ImplGetStateStr( const SvBaseLink& rLnk ) +OUString SvBaseLinksDlg::ImplGetStateStr( const SvBaseLink& rLnk ) { - String sRet; + OUString sRet; if( !rLnk.GetObj() ) sRet = Brokenlink(); else if( rLnk.GetObj()->IsPending() ) @@ -631,12 +631,12 @@ void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, sal_uInt16 nPos, sal_ nWidthPixel -= SV_TAB_BORDER; OUString aTxt = Links().GetEllipsisString( sFileNm, nWidthPixel, TEXT_DRAW_PATHELLIPSIS ); INetURLObject aPath( sFileNm, INET_PROT_FILE ); - String aFileName = aPath.getName(); + OUString aFileName = aPath.getName(); aFileName = INetURLObject::decode(aFileName, INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS); - if( aFileName.Len() > aTxt.getLength() ) + if( aFileName.getLength() > aTxt.getLength() ) aTxt = aFileName; - else if( aTxt.indexOf( aFileName, aTxt.getLength() - aFileName.Len() ) == -1 ) + else if( aTxt.indexOf( aFileName, aTxt.getLength() - aFileName.getLength() ) == -1 ) // filename not in string aTxt = aFileName; diff --git a/cui/source/dialogs/multifil.cxx b/cui/source/dialogs/multifil.cxx index cbd785e3f7cd..3a29b8784a63 100644 --- a/cui/source/dialogs/multifil.cxx +++ b/cui/source/dialogs/multifil.cxx @@ -58,7 +58,7 @@ IMPL_LINK( SvxMultiFileDialog, AddHdl_Impl, PushButton *, pBtn ) { // #97807# URL content comparison of entries ----------- INetURLObject aFile( aDlg.GetPath() ); - String sInsFile = aFile.getFSysPath( INetURLObject::FSYS_DETECT ); + OUString sInsFile = aFile.getFSysPath( INetURLObject::FSYS_DETECT ); ::ucbhelper::Content aContent( aFile.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() ); Reference< XContent > xContent = aContent.get(); OSL_ENSURE( xContent.is(), "AddHdl_Impl: invalid content interface!" ); @@ -78,8 +78,8 @@ IMPL_LINK( SvxMultiFileDialog, AddHdl_Impl, PushButton *, pBtn ) Reference< XContentIdentifier > xVID; for( i = 0; i < nCount; i++ ) { - String sVFile = aPathLB.GetEntry( i ); - std::map< String, ::ucbhelper::Content >::iterator aCur = aFileContentMap.find( sVFile ); + OUString sVFile = aPathLB.GetEntry( i ); + std::map< OUString, ::ucbhelper::Content >::iterator aCur = aFileContentMap.find( sVFile ); if( aCur == aFileContentMap.end() ) // look for File Content in aFileContentMap, but not find it. { INetURLObject aVFile( sVFile, INetURLObject::FSYS_DETECT ); @@ -110,14 +110,14 @@ IMPL_LINK( SvxMultiFileDialog, AddHdl_Impl, PushButton *, pBtn ) if ( bDuplicated ) // #97807# -------------------- { - String sMsg( CUI_RES( RID_SVXSTR_MULTIFILE_DBL_ERR ) ); - sMsg.SearchAndReplaceAscii( "%1", sInsFile ); + OUString sMsg( CUI_RES( RID_SVXSTR_MULTIFILE_DBL_ERR ) ); + sMsg = sMsg.replaceFirst( "%1", sInsFile ); InfoBox( pBtn, sMsg ).Execute(); } else { sal_uInt16 nPos = aPathLB.InsertEntry( sInsFile, LISTBOX_APPEND ); - aPathLB.SetEntryData( nPos, (void*) new String( sInsFile ) ); + aPathLB.SetEntryData( nPos, (void*) new OUString( sInsFile ) ); } } // end of if ( aDlg.Execute() == ERRCODE_NONE ) diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index 183c56f27535..fc24c308edff 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -87,7 +87,7 @@ IMPL_LINK_NOARG(SvxMultiPathDialog, AddHdl_Impl) { INetURLObject aPath( xFolderPicker->getDirectory() ); aPath.removeFinalSlash(); - String aURL = aPath.GetMainURL( INetURLObject::NO_DECODE ); + OUString aURL = aPath.GetMainURL( INetURLObject::NO_DECODE ); OUString sInsPath; ::utl::LocalFileHelper::ConvertURLToSystemPath( aURL, sInsPath ); @@ -99,13 +99,13 @@ IMPL_LINK_NOARG(SvxMultiPathDialog, AddHdl_Impl) OUString sNewEntry( '\t' ); sNewEntry += sInsPath; SvTreeListEntry* pEntry = aRadioLB.InsertEntry( sNewEntry ); - String* pData = new String( aURL ); + OUString* pData = new OUString( aURL ); pEntry->SetUserData( pData ); } else { - String sMsg( CUI_RES( RID_MULTIPATH_DBL_ERR ) ); - sMsg.SearchAndReplaceAscii( "%1", sInsPath ); + OUString sMsg( CUI_RES( RID_MULTIPATH_DBL_ERR ) ); + sMsg = sMsg.replaceFirst( "%1", sInsPath ); InfoBox( this, sMsg ).Execute(); } } @@ -113,14 +113,14 @@ IMPL_LINK_NOARG(SvxMultiPathDialog, AddHdl_Impl) { if ( LISTBOX_ENTRY_NOTFOUND != aPathLB.GetEntryPos( sInsPath ) ) { - String sMsg( CUI_RES( RID_MULTIPATH_DBL_ERR ) ); - sMsg.SearchAndReplaceAscii( "%1", sInsPath ); + OUString sMsg( CUI_RES( RID_MULTIPATH_DBL_ERR ) ); + sMsg = sMsg.replaceFirst( "%1", sInsPath ); InfoBox( this, sMsg ).Execute(); } else { sal_uInt16 nPos = aPathLB.InsertEntry( sInsPath, LISTBOX_APPEND ); - aPathLB.SetEntryData( nPos, (void*)new String( aURL ) ); + aPathLB.SetEntryData( nPos, (void*)new OUString( aURL ) ); } } SelectHdl_Impl( NULL ); @@ -135,7 +135,7 @@ IMPL_LINK_NOARG(SvxMultiPathDialog, DelHdl_Impl) if ( pImpl->bIsRadioButtonMode ) { SvTreeListEntry* pEntry = aRadioLB.FirstSelected(); - delete (String*)pEntry->GetUserData(); + delete (OUString*)pEntry->GetUserData(); bool bChecked = aRadioLB.GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED; sal_uLong nPos = aRadioLB.GetEntryPos( pEntry ); aRadioLB.RemoveEntry( pEntry ); @@ -195,9 +195,9 @@ SvxMultiPathDialog::SvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed { static long aStaticTabs[]= { 2, 0, 12 }; aRadioLB.SvSimpleTable::SetTabs( aStaticTabs ); - String sHeader( CUI_RES( STR_HEADER_PATHS ) ); + OUString sHeader( CUI_RES( STR_HEADER_PATHS ) ); aRadioLB.SetQuickHelpText( sHeader ); - sHeader.Insert( '\t', 0 ); + sHeader = "\t" + sHeader; aRadioLB.InsertHeaderEntry( sHeader, HEADERBAR_APPEND, HIB_LEFT ); FreeResource(); @@ -220,49 +220,49 @@ SvxMultiPathDialog::~SvxMultiPathDialog() { sal_uInt16 nPos = aPathLB.GetEntryCount(); while ( nPos-- ) - delete (String*)aPathLB.GetEntryData(nPos); + delete (OUString*)aPathLB.GetEntryData(nPos); nPos = (sal_uInt16)aRadioLB.GetEntryCount(); while ( nPos-- ) { SvTreeListEntry* pEntry = aRadioLB.GetEntry( nPos ); - delete (String*)pEntry->GetUserData(); + delete (OUString*)pEntry->GetUserData(); } delete pImpl; } // ----------------------------------------------------------------------- -String SvxMultiPathDialog::GetPath() const +OUString SvxMultiPathDialog::GetPath() const { - String sNewPath; + OUString sNewPath; sal_Unicode cDelim = pImpl->bIsClassPathMode ? CLASSPATH_DELIMITER : SVT_SEARCHPATH_DELIMITER; if ( pImpl->bIsRadioButtonMode ) { - String sWritable; + OUString sWritable; for ( sal_uInt16 i = 0; i < aRadioLB.GetEntryCount(); ++i ) { SvTreeListEntry* pEntry = aRadioLB.GetEntry(i); if ( aRadioLB.GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED ) - sWritable = *(String*)pEntry->GetUserData(); + sWritable = *(OUString*)pEntry->GetUserData(); else { - if ( sNewPath.Len() > 0 ) - sNewPath += cDelim; - sNewPath += *(String*)pEntry->GetUserData(); + if ( !sNewPath.isEmpty() ) + sNewPath += OUString(cDelim); + sNewPath += *(OUString*)pEntry->GetUserData(); } } - if ( sNewPath.Len() > 0 ) - sNewPath += cDelim; + if ( !sNewPath.isEmpty() ) + sNewPath += OUString(cDelim); sNewPath += sWritable; } else { for ( sal_uInt16 i = 0; i < aPathLB.GetEntryCount(); ++i ) { - if ( sNewPath.Len() > 0 ) - sNewPath += cDelim; - sNewPath += *(String*)aPathLB.GetEntryData(i); + if ( !sNewPath.isEmpty() ) + sNewPath += OUString(cDelim); + sNewPath += *(OUString*)aPathLB.GetEntryData(i); } } return sNewPath; @@ -270,14 +270,14 @@ String SvxMultiPathDialog::GetPath() const // ----------------------------------------------------------------------- -void SvxMultiPathDialog::SetPath( const String& rPath ) +void SvxMultiPathDialog::SetPath( const OUString& rPath ) { sal_Unicode cDelim = pImpl->bIsClassPathMode ? CLASSPATH_DELIMITER : SVT_SEARCHPATH_DELIMITER; sal_uInt16 nPos, nCount = comphelper::string::getTokenCount(rPath, cDelim); for ( sal_uInt16 i = 0; i < nCount; ++i ) { - String sPath = rPath.GetToken( i, cDelim ); + OUString sPath = rPath.getToken( i, cDelim ); OUString sSystemPath; sal_Bool bIsSystemPath = ::utl::LocalFileHelper::ConvertURLToSystemPath( sPath, sSystemPath ); @@ -287,7 +287,7 @@ void SvxMultiPathDialog::SetPath( const String& rPath ) OUString sEntry( '\t' ); sEntry += (bIsSystemPath ? sSystemPath : OUString(sPath)); SvTreeListEntry* pEntry = aRadioLB.InsertEntry( sEntry ); - String* pURL = new String( sPath ); + OUString* pURL = new OUString( sPath ); pEntry->SetUserData( pURL ); } else @@ -296,7 +296,7 @@ void SvxMultiPathDialog::SetPath( const String& rPath ) nPos = aPathLB.InsertEntry( sSystemPath, LISTBOX_APPEND ); else nPos = aPathLB.InsertEntry( sPath, LISTBOX_APPEND ); - aPathLB.SetEntryData( nPos, (void*)new String( sPath ) ); + aPathLB.SetEntryData( nPos, (void*)new OUString( sPath ) ); } } diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx index 9c7ce0cfb4ff..a7645088fe27 100644 --- a/cui/source/dialogs/passwdomdlg.cxx +++ b/cui/source/dialogs/passwdomdlg.cxx @@ -36,7 +36,7 @@ class PasswordReenterEdit_Impl : public Edit { - String m_aDefaultTxt; + OUString m_aDefaultTxt; // disallow use of copy c-tor and assignment operator PasswordReenterEdit_Impl( const PasswordReenterEdit_Impl & ); @@ -100,10 +100,10 @@ struct PasswordToOpenModifyDialog_Impl FixedText m_aReenterPasswdToModifyFT; PasswordReenterEdit_Impl m_aReenterPasswdToModifyED; - String m_aOneMismatch; - String m_aTwoMismatch; - String m_aInvalidStateForOkButton; - String m_aInvalidStateForOkButton_v2; + OUString m_aOneMismatch; + OUString m_aTwoMismatch; + OUString m_aInvalidStateForOkButton; + OUString m_aInvalidStateForOkButton_v2; bool m_bIsPasswordToModify; @@ -144,8 +144,8 @@ PasswordToOpenModifyDialog_Impl::PasswordToOpenModifyDialog_Impl( m_aInvalidStateForOkButton_v2( CUI_RES( STR_INVALID_STATE_FOR_OK_BUTTON_V2 ) ), m_bIsPasswordToModify( bIsPasswordToModify ) { - m_aMoreFewerOptionsBTN.SetMoreText( String( CUI_RES( STR_MORE_OPTIONS ) ) ); - m_aMoreFewerOptionsBTN.SetLessText( String( CUI_RES( STR_FEWER_OPTIONS ) ) ); + m_aMoreFewerOptionsBTN.SetMoreText( CUI_RES( STR_MORE_OPTIONS ) ); + m_aMoreFewerOptionsBTN.SetLessText( CUI_RES( STR_FEWER_OPTIONS ) ); m_aOk.SetClickHdl( LINK( this, PasswordToOpenModifyDialog_Impl, OkBtnClickHdl ) ); @@ -194,7 +194,7 @@ IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG Edit &rEdit = !bToOpenMatch? m_aPasswdToOpenED : m_aPasswdToModifyED; PasswordReenterEdit_Impl &rRepeatEdit = !bToOpenMatch? m_aReenterPasswdToOpenED : m_aReenterPasswdToModifyED; - String aEmpty; + OUString aEmpty; if (nMismatch == 1) { rEdit.SetText( aEmpty ); @@ -240,7 +240,7 @@ PasswordToOpenModifyDialog::~PasswordToOpenModifyDialog() } -String PasswordToOpenModifyDialog::GetPasswordToOpen() const +OUString PasswordToOpenModifyDialog::GetPasswordToOpen() const { const bool bPasswdOk = !m_pImpl->m_aPasswdToOpenED.GetText().isEmpty() && @@ -249,7 +249,7 @@ String PasswordToOpenModifyDialog::GetPasswordToOpen() const } -String PasswordToOpenModifyDialog::GetPasswordToModify() const +OUString PasswordToOpenModifyDialog::GetPasswordToModify() const { const bool bPasswdOk = !m_pImpl->m_aPasswdToModifyED.GetText().isEmpty() && diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx index 3b4ffb73cb82..87c672cb5061 100644 --- a/cui/source/dialogs/pastedlg.cxx +++ b/cui/source/dialogs/pastedlg.cxx @@ -84,7 +84,7 @@ SvPasteObjectDialog::~SvPasteObjectDialog() /************************************************************************* |* SvPasteObjectDialog::Insert() *************************************************************************/ -void SvPasteObjectDialog::Insert( SotFormatStringId nFormat, const String& rFormatName ) +void SvPasteObjectDialog::Insert( SotFormatStringId nFormat, const OUString& rFormatName ) { aSupplementMap.insert( ::std::make_pair( nFormat, rFormatName ) ); } @@ -177,7 +177,7 @@ sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, ResMgr* pMgr = ResMgr::CreateResMgr( "svt", Application::GetSettings().GetUILanguageTag() ); // global resource from svtools (former so3 resource) if( pMgr ) - aSourceName = String( ResId( STR_UNKNOWN_SOURCE, *pMgr ) ); + aSourceName = OUString( ResId( STR_UNKNOWN_SOURCE, *pMgr ) ); delete pMgr; } } @@ -204,7 +204,7 @@ sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, return nSelFormat; } -void SvPasteObjectDialog::SetObjName( const SvGlobalName & rClass, const String & rObjName ) +void SvPasteObjectDialog::SetObjName( const SvGlobalName & rClass, const OUString & rObjName ) { aObjClassName = rClass; aObjName = rObjName; diff --git a/cui/source/dialogs/plfilter.cxx b/cui/source/dialogs/plfilter.cxx index 66a68a1cf0d8..34653e130dca 100644 --- a/cui/source/dialogs/plfilter.cxx +++ b/cui/source/dialogs/plfilter.cxx @@ -38,14 +38,14 @@ using namespace com::sun::star::plugin; struct ltstr { - bool operator()( const String& s1, const String& s2 ) const + bool operator()( const OUString& s1, const OUString& s2 ) const { - return ( s1.CompareTo( s2 ) == COMPARE_LESS ); + return s1.compareTo( s2 ) < 0; } }; -typedef set< String, ltstr > StrSet; -typedef map< String, StrSet, ltstr > FilterMap; +typedef set< OUString, ltstr > StrSet; +typedef map< OUString, StrSet, ltstr > FilterMap; //================================================================================================== @@ -65,13 +65,13 @@ void fillNetscapePluginFilters( Sequence< OUString >& rPluginNames, Sequence< OU const PluginDescription & rDescr = pDescriptions[nPos]; StrSet& rTypes = aMap[ rDescr.Description ]; - String aExtension( rDescr.Extension ); + OUString aExtension( rDescr.Extension ); for ( sal_uInt16 nCnt = comphelper::string::getTokenCount(aExtension, ';'); nCnt--; ) { // no default plugins anymore - String aExt( aExtension.GetToken( nCnt, ';' ) ); - if ( aExt.CompareToAscii( "*.*" ) != COMPARE_EQUAL ) + OUString aExt( aExtension.getToken( nCnt, ';' ) ); + if ( aExt == "*.*" ) rTypes.insert( aExt ); } } @@ -83,8 +83,8 @@ void fillNetscapePluginFilters( Sequence< OUString >& rPluginNames, Sequence< OU int nIndex = 0; for ( FilterMap::iterator iPos = aMap.begin(); iPos != aMap.end(); ++iPos ) { - String aText( (*iPos).first ); - String aType; + OUString aText( (*iPos).first ); + OUString aType; StrSet& rTypes = (*iPos).second; StrSet::iterator i = rTypes.begin(); while ( i != rTypes.end() ) @@ -92,14 +92,14 @@ void fillNetscapePluginFilters( Sequence< OUString >& rPluginNames, Sequence< OU aType += (*i); ++i; if ( i != rTypes.end() ) - aType += ';'; + aType += ";"; } - if ( aType.Len() ) + if ( !aType.isEmpty() ) { - aText += OUString( " (" ); + aText += " ("; aText += aType; - aText += ')'; + aText += ")"; pPluginNames[nIndex] = aText; pPluginTypes[nIndex] = aType; nIndex++; diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx index ae786c3c118e..ca8aa20f925a 100644 --- a/cui/source/dialogs/postdlg.cxx +++ b/cui/source/dialogs/postdlg.cxx @@ -71,7 +71,7 @@ SvxPostItDialog::SvxPostItDialog(Window* pParent, const SfxItemSet& rCoreSet, } nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR ); - String aAuthorStr, aDateStr; + OUString aAuthorStr, aDateStr; if ( rSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE ) { @@ -130,7 +130,7 @@ SvxPostItDialog::~SvxPostItDialog() // ----------------------------------------------------------------------- -void SvxPostItDialog::ShowLastAuthor(const String& rAuthor, const String& rDate) +void SvxPostItDialog::ShowLastAuthor(const OUString& rAuthor, const OUString& rDate) { OUString sTxt( rAuthor ); sTxt += ", "; @@ -183,12 +183,12 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp) { Date aDate( Date::SYSTEM ); Time aTime( Time::SYSTEM ); - String aTmp( SvtUserOptions().GetID() ); + OUString aTmp( SvtUserOptions().GetID() ); const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() ); OUString aStr( m_pEditED->GetText() ); aStr += "\n---- "; - if ( aTmp.Len() > 0 ) + if ( !aTmp.isEmpty() ) { aStr += aTmp; aStr += ", "; diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index f6b26ff5bc3f..e5ffda851925 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -350,7 +350,7 @@ void SFTreeListBox::ExpandAllTrees() SAL_WNODEPRECATED_DECLARATIONS_PUSH SvTreeListEntry * SFTreeListBox::insertEntry( - String const & rText, sal_uInt16 nBitmap, SvTreeListEntry * pParent, + OUString const & rText, sal_uInt16 nBitmap, SvTreeListEntry * pParent, bool bChildrenOnDemand, std::auto_ptr< SFEntry > aUserData, OUString factoryURL ) { SvTreeListEntry * p; @@ -371,7 +371,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP SAL_WNODEPRECATED_DECLARATIONS_PUSH SvTreeListEntry * SFTreeListBox::insertEntry( - String const & rText, sal_uInt16 nBitmap, SvTreeListEntry * pParent, + OUString const & rText, sal_uInt16 nBitmap, SvTreeListEntry * pParent, bool bChildrenOnDemand, std::auto_ptr< SFEntry > aUserData ) { Image aImage; @@ -435,17 +435,17 @@ CuiInputDialog::CuiInputDialog(Window * pParent, sal_uInt16 nMode ) aEdit.GrabFocus(); if ( nMode == INPUTMODE_NEWLIB ) { - SetText( String( CUI_RES( STR_NEWLIB ) ) ); + SetText( OUString( CUI_RES( STR_NEWLIB ) ) ); } else if ( nMode == INPUTMODE_NEWMACRO ) { - SetText( String( CUI_RES( STR_NEWMACRO ) ) ); - aText.SetText( String( CUI_RES( STR_FT_NEWMACRO ) ) ); + SetText( OUString( CUI_RES( STR_NEWMACRO ) ) ); + aText.SetText( OUString( CUI_RES( STR_FT_NEWMACRO ) ) ); } else if ( nMode == INPUTMODE_RENAME ) { - SetText( String( CUI_RES( STR_RENAME ) ) ); - aText.SetText( String( CUI_RES( STR_FT_RENAME ) ) ); + SetText( OUString( CUI_RES( STR_RENAME ) ) ); + aText.SetText( OUString( CUI_RES( STR_FT_RENAME ) ) ); } FreeResource(); @@ -508,8 +508,8 @@ SvxScriptOrgDialog::SvxScriptOrgDialog( Window* pParent, OUString language ) get(m_pDelButton, "delete"); // must be a neater way to deal with the strings than as above // append the language to the dialog title - String winTitle( GetText() ); - winTitle.SearchAndReplace( OUString( "%MACROLANG" ), m_sLanguage ); + OUString winTitle( GetText() ); + winTitle = winTitle.replaceFirst( "%MACROLANG", m_sLanguage ); SetText( winTitle ); m_pScriptsBox->SetSelectHdl( LINK( this, SvxScriptOrgDialog, ScriptSelectHdl ) ); @@ -738,7 +738,7 @@ IMPL_LINK( SvxScriptOrgDialog, ButtonHdl, Button *, pButton ) pParent = m_pScriptsBox->GetParent( pParent ); } xProp->getPropertyValue("URI") >>= tmpString; - const String scriptURL( tmpString ); + const OUString scriptURL( tmpString ); if ( mspNode.is() ) { @@ -929,7 +929,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry ) do { - if ( xNewDlg->Execute() && xNewDlg->GetObjectName().Len() ) + if ( xNewDlg->Execute() && !xNewDlg->GetObjectName().isEmpty() ) { OUString aUserSuppliedName = xNewDlg->GetObjectName(); bValid = sal_True; @@ -938,8 +938,8 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry ) if (aUserSuppliedName+extn == childNodes[index]->getName()) { bValid = sal_False; - String aError( m_createErrStr ); - aError.Append( m_createDupStr ); + OUString aError( m_createErrStr ); + aError += m_createDupStr; ErrorBox aErrorBox( static_cast<Window*>(this), WB_OK | RET_OK, aError ); aErrorBox.SetText( m_createErrTitleStr ); aErrorBox.Execute(); @@ -983,7 +983,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry ) } if ( aChildNode.is() ) { - String aChildName = aChildNode->getName(); + OUString aChildName = aChildNode->getName(); SvTreeListEntry* pNewEntry = NULL; Reference<XModel> xDocumentModel = getModel( pEntry ); @@ -1060,7 +1060,7 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry ) sal_Bool bValid; do { - if ( xNewDlg->Execute() && xNewDlg->GetObjectName().Len() ) + if ( xNewDlg->Execute() && !xNewDlg->GetObjectName().isEmpty() ) { OUString aUserSuppliedName = xNewDlg->GetObjectName(); bValid = sal_True; @@ -1104,7 +1104,7 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry ) else { //ISSUE L10N & message from exception? - String aError( m_renameErrStr ); + OUString aError( m_renameErrStr ); ErrorBox aErrorBox( static_cast<Window*>(this), WB_OK | RET_OK, aError ); aErrorBox.SetText( m_renameErrTitleStr ); aErrorBox.Execute(); @@ -1226,14 +1226,14 @@ void SvxScriptOrgDialog::StoreCurrentSelection() void SvxScriptOrgDialog::RestorePreviousSelection() { - String aStoredEntry = String( m_lastSelection[ m_sLanguage ] ); - if( aStoredEntry.Len() <= 0 ) + OUString aStoredEntry = m_lastSelection[ m_sLanguage ]; + if( aStoredEntry.isEmpty() ) return; SvTreeListEntry* pEntry = 0; sal_Int32 nIndex = 0; while ( nIndex != -1 ) { - String aTmp( aStoredEntry.GetToken( 0, ';', nIndex ) ); + OUString aTmp( aStoredEntry.getToken( 0, ';', nIndex ) ); SvTreeListEntry* pTmpEntry = m_pScriptsBox->FirstChild( pEntry ); while ( pTmpEntry ) { diff --git a/cui/source/dialogs/showcols.cxx b/cui/source/dialogs/showcols.cxx index bb105fa6abeb..2ee0b9149048 100644 --- a/cui/source/dialogs/showcols.cxx +++ b/cui/source/dialogs/showcols.cxx @@ -95,10 +95,10 @@ void FmShowColsDialog::SetColumns(const ::com::sun::star::uno::Reference< ::com: m_aList.Clear(); ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xCurCol; - String sCurName; + OUString sCurName; for (sal_uInt16 i=0; i<xCols->getCount(); ++i) { - sCurName.Erase(); + sCurName = ""; ::cppu::extractInterface(xCurCol, xCols->getByIndex(i)); sal_Bool bIsHidden = sal_False; try diff --git a/cui/source/dialogs/splitcelldlg.cxx b/cui/source/dialogs/splitcelldlg.cxx index f8d37b92bf42..978f06b0735f 100644 --- a/cui/source/dialogs/splitcelldlg.cxx +++ b/cui/source/dialogs/splitcelldlg.cxx @@ -45,7 +45,7 @@ SvxSplitTableDlg::SvxSplitTableDlg( Window *pParent, bool bIsTableVertical, if(bIsTableVertical) { Image aTmpImg(m_pHorzBox->GetModeRadioImage()); - String sTmp(m_pHorzBox->GetText()); + OUString sTmp(m_pHorzBox->GetText()); m_pHorzBox->SetText(m_pVertBox->GetText()); m_pHorzBox->SetModeRadioImage(m_pVertBox->GetModeRadioImage()); m_pVertBox->SetText(sTmp); diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index 7d642c813376..6157c749c414 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -131,7 +131,7 @@ void ReplaceEdit::SetText( const OUString& rStr, const Selection& rNewSelection AlternativesString::AlternativesString( ThesaurusAlternativesCtrl &rControl, - SvTreeListEntry* pEntry, sal_uInt16 nFlags, const String& rStr ) : + SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& rStr ) : SvLBoxString( pEntry, nFlags, rStr ), m_rControlImpl( rControl ) @@ -210,7 +210,7 @@ AlternativesExtraData * ThesaurusAlternativesCtrl::GetExtraData( return pRes; } -SvTreeListEntry * ThesaurusAlternativesCtrl::AddEntry( sal_Int32 nVal, const String &rText, bool bIsHeader ) +SvTreeListEntry * ThesaurusAlternativesCtrl::AddEntry( sal_Int32 nVal, const OUString &rText, bool bIsHeader ) { SvTreeListEntry* pEntry = new SvTreeListEntry; OUString aText; @@ -218,7 +218,7 @@ SvTreeListEntry * ThesaurusAlternativesCtrl::AddEntry( sal_Int32 nVal, const Str { aText = OUString::number( nVal ) + ". "; } - pEntry->AddItem( new SvLBoxString( pEntry, 0, String() ) ); // add empty column + pEntry->AddItem( new SvLBoxString( pEntry, 0, OUString() ) ); // add empty column aText += rText; pEntry->AddItem( new SvLBoxContextBmp( pEntry, 0, Image(), Image(), 0 ) ); // otherwise crash pEntry->AddItem( new AlternativesString( *this, pEntry, 0, aText ) ); @@ -276,7 +276,7 @@ uno::Sequence< uno::Reference< linguistic2::XMeaning > > SvxThesaurusDialog::que { // try again without trailing '.' chars. It may be a word at the // end of a sentence and not an abbreviation... - String aTxt(comphelper::string::stripEnd(rTerm, '.')); + OUString aTxt(comphelper::string::stripEnd(rTerm, '.')); aMeanings = xThesaurus->queryMeanings( aTxt, rLocale, rProperties ); if (aMeanings.getLength()) { @@ -320,7 +320,7 @@ bool SvxThesaurusDialog::UpdateAlternativesBox_Impl() return nMeanings > 0; } -void SvxThesaurusDialog::LookUp( const String &rText ) +void SvxThesaurusDialog::LookUp( const OUString &rText ) { if (OUString(rText) != m_pWordCB->GetText()) // avoid moving of the cursor if the text is the same m_pWordCB->SetText( rText ); @@ -341,7 +341,7 @@ IMPL_LINK( SvxThesaurusDialog, LeftBtnHdl_Impl, Button *, pBtn ) IMPL_LINK( SvxThesaurusDialog, LanguageHdl_Impl, ListBox*, pLB ) { - String aLangText( pLB->GetSelectEntry() ); + OUString aLangText( pLB->GetSelectEntry() ); LanguageType nLang = SvtLanguageTable().GetType( aLangText ); DBG_ASSERT( nLang != LANGUAGE_NONE && nLang != LANGUAGE_DONTKNOW, "failed to get language" ); if (xThesaurus->hasLocale( LanguageTag::convertToLocale( nLang ) )) @@ -353,7 +353,7 @@ IMPL_LINK( SvxThesaurusDialog, LanguageHdl_Impl, ListBox*, pLB ) void SvxThesaurusDialog::LookUp_Impl() { - String aText( m_pWordCB->GetText() ); + OUString aText( m_pWordCB->GetText() ); aLookUpText = OUString( aText ); if (!aLookUpText.isEmpty() && @@ -366,7 +366,7 @@ void SvxThesaurusDialog::LookUp_Impl() if ( m_pWordCB->GetEntryPos( aText ) == LISTBOX_ENTRY_NOTFOUND ) m_pWordCB->InsertEntry( aText ); - m_pReplaceEdit->SetText( String() ); + m_pReplaceEdit->SetText( OUString() ); m_pLeftBtn->Enable( aLookUpHistory.size() > 1 ); } @@ -375,7 +375,7 @@ IMPL_LINK( SvxThesaurusDialog, WordSelectHdl_Impl, ComboBox *, pBox ) if (pBox && !m_pWordCB->IsTravelSelect()) // act only upon return key and not when traveling with cursor keys { sal_uInt16 nPos = pBox->GetSelectEntryPos(); - String aStr( pBox->GetEntry( nPos ) ); + OUString aStr( pBox->GetEntry( nPos ) ); aStr = linguistic::GetThesaurusReplaceText( aStr ); m_pWordCB->SetText( aStr ); LookUp_Impl(); @@ -390,7 +390,7 @@ IMPL_LINK( SvxThesaurusDialog, AlternativesSelectHdl_Impl, SvxCheckListBox *, pB if (pEntry) { AlternativesExtraData * pData = m_pAlternativesCT->GetExtraData( pEntry ); - String aStr; + OUString aStr; if (pData && !pData->IsHeader()) { aStr = pData->GetText(); @@ -407,7 +407,7 @@ IMPL_LINK( SvxThesaurusDialog, AlternativesDoubleClickHdl_Impl, SvxCheckListBox if (pEntry) { AlternativesExtraData * pData = m_pAlternativesCT->GetExtraData( pEntry ); - String aStr; + OUString aStr; if (pData && !pData->IsHeader()) { aStr = pData->GetText(); @@ -415,7 +415,7 @@ IMPL_LINK( SvxThesaurusDialog, AlternativesDoubleClickHdl_Impl, SvxCheckListBox } m_pWordCB->SetText( aStr ); - if (aStr.Len() > 0) + if (!aStr.isEmpty()) LookUp_Impl(); } @@ -438,7 +438,7 @@ IMPL_STATIC_LINK( SvxThesaurusDialog, SelectFirstHdl_Impl, SvxCheckListBox *, pB SvxThesaurusDialog::SvxThesaurusDialog( Window* pParent, uno::Reference< linguistic2::XThesaurus > xThes, - const String &rWord, + const OUString &rWord, LanguageType nLanguage) : SvxStandardDialog(pParent, "ThesaurusDialog", "cui/ui/thesaurus.ui") , m_aErrStr(CUI_RESSTR(RID_SVXSTR_ERR_TEXTNOTFOUND)) @@ -471,13 +471,13 @@ SvxThesaurusDialog::SvxThesaurusDialog( xThesaurus = xThes; aLookUpText = OUString( rWord ); nLookUpLanguage = nLanguage; - if (rWord.Len() > 0) + if (!rWord.isEmpty()) aLookUpHistory.push( rWord ); OUString aTmp( rWord ); linguistic::RemoveHyphens( aTmp ); linguistic::ReplaceControlChars( aTmp ); - String aTmp2( aTmp ); + OUString aTmp2( aTmp ); m_pReplaceEdit->SetText( aTmp2 ); m_pWordCB->InsertEntry( aTmp2 ); @@ -530,15 +530,17 @@ SvxThesaurusDialog::~SvxThesaurusDialog() void SvxThesaurusDialog::SetWindowTitle( LanguageType nLanguage ) { // adjust language - String aStr( GetText() ); - aStr.Erase( aStr.Search( sal_Unicode( '(' ) ) - 1 ); - aStr.Append( OUString(" (") ); + OUString aStr( GetText() ); + sal_Int32 nIndex = aStr.indexOf( '(' ); + if( nIndex != -1 ) + aStr = aStr.copy( 0, nIndex - 1 ); + aStr += " ("; aStr += SvtLanguageTable().GetLanguageString( nLanguage ); - aStr.Append( sal_Unicode( ')' ) ); + aStr += ")"; SetText( aStr ); // set window title } -String SvxThesaurusDialog::GetWord() +OUString SvxThesaurusDialog::GetWord() { return m_pReplaceEdit->GetText(); } diff --git a/cui/source/dialogs/thesdlg_impl.hxx b/cui/source/dialogs/thesdlg_impl.hxx index 8d911b285ad5..b35509df8a42 100644 --- a/cui/source/dialogs/thesdlg_impl.hxx +++ b/cui/source/dialogs/thesdlg_impl.hxx @@ -51,7 +51,7 @@ class AlternativesString : public SvLBoxString public: AlternativesString( ThesaurusAlternativesCtrl &rControl, - SvTreeListEntry* pEntry, sal_uInt16 nFlags, const String& rStr ); + SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& rStr ); virtual void Paint( const Point& rPos, SvTreeListBox& rOutDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry); diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx index 10ce9b28b3fa..079f9f5c18a6 100644 --- a/cui/source/inc/SpellDialog.hxx +++ b/cui/source/inc/SpellDialog.hxx @@ -84,9 +84,9 @@ public: void SetText( const OUString& rStr ); bool MarkNextError( bool bIgnoreCurrentError ); - void ChangeMarkedWord(const String& rNewWord, LanguageType eLanguage); + void ChangeMarkedWord(const OUString& rNewWord, LanguageType eLanguage); void MoveErrorMarkTo(sal_uInt16 nErrorStart, sal_uInt16 nErrorEnd, bool bGrammar); - String GetErrorText() const; + OUString GetErrorText() const; void RestoreCurrentError(); void SetAlternatives( @@ -157,8 +157,8 @@ private: OUString m_sIgnoreOnceST; OUString m_sNoSuggestionsST; - String m_sTitleSpelling; - String m_sTitleSpellingGrammar; + OUString m_sTitleSpelling; + OUString m_sTitleSpellingGrammar; Link aDialogUndoLink; @@ -212,7 +212,7 @@ private: protected: virtual long Notify( NotifyEvent& rNEvt ); - String getReplacementString() const; + OUString getReplacementString() const; public: SpellDialog( diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx index a23c50fcb48d..edd72453cd94 100644 --- a/cui/source/inc/acccfg.hxx +++ b/cui/source/inc/acccfg.hxx @@ -70,7 +70,7 @@ public: m_pAccelConfigPage( pAccelConfigPage ) {} - void ReplaceEntry( sal_uInt16 nPos, const String &rStr ); + void ReplaceEntry( sal_uInt16 nPos, const OUString &rStr ); }; // class SfxAcceleratorConfigPage ---------------------------------------- @@ -131,10 +131,10 @@ private: PushButton aLoadButton; PushButton aSaveButton; PushButton aResetButton; - String aLoadAccelConfigStr; - String aSaveAccelConfigStr; - String aFilterAllStr; - String aFilterCfgStr; + OUString aLoadAccelConfigStr; + OUString aSaveAccelConfigStr; + OUString aFilterAllStr; + OUString aFilterCfgStr; SfxStylesInfo_Impl m_aStylesInfo; sal_Bool m_bStylesInfoInitialized; @@ -163,13 +163,13 @@ private: OUString GetLabel4Command(const OUString& rCommand); void InitAccCfg(); sal_uInt16 MapKeyCodeToPos( const KeyCode &rCode ) const; - css::uno::Reference< css::frame::XModel > SearchForAlreadyLoadedDoc(const String& sName); - void StartFileDialog( WinBits nBits, const String& rTitle ); + css::uno::Reference< css::frame::XModel > SearchForAlreadyLoadedDoc(const OUString& sName); + void StartFileDialog( WinBits nBits, const OUString& rTitle ); void Init(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& pAccMgr); void ResetConfig(); - void CreateCustomItems( SvTreeListEntry* pEntry, const String& aCol1, const String& aCol2 ); + void CreateCustomItems( SvTreeListEntry* pEntry, const OUString& aCol1, const OUString& aCol2 ); public: SfxAcceleratorConfigPage( Window *pParent, const SfxItemSet& rItemSet ); @@ -192,8 +192,8 @@ public: SfxAcceleratorConfigListBox( Window *pParent, ResId &rResId ) : ListBox( pParent, rResId ) {} - void ReplaceEntry( sal_uInt16 nPos, const String &rStr ); - void ExpandEntry ( sal_uInt16 nPos, const String &rStr ); + void ReplaceEntry( sal_uInt16 nPos, const OUString &rStr ); + void ExpandEntry ( sal_uInt16 nPos, const OUString &rStr ); }; class SvxShortcutAssignDlg : public SfxNoLayoutSingleTabDialog diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx index 6e4454bcbd21..e30eaa086f43 100644 --- a/cui/source/inc/autocdlg.hxx +++ b/cui/source/inc/autocdlg.hxx @@ -128,31 +128,31 @@ class OfaSwAutoFmtOptionsPage : public SfxTabPage OfaACorrCheckListBox* m_pCheckLB; PushButton* m_pEditPB; - String sDeleteEmptyPara; - String sUseReplaceTbl; - String sCptlSttWord; - String sCptlSttSent; - String sUserStyle; - String sBullet; - String sByInputBullet; - String sBoldUnder; - String sNoDblSpaces; - String sCorrectCapsLock; - String sDetectURL; - String sDash; - String sNonBrkSpace; - String sOrdinal; - String sRightMargin; - String sNum; - String sBorder; - String sTable; - String sReplaceTemplates; - String sDelSpaceAtSttEnd; - String sDelSpaceBetweenLines; - - String sMargin; - String sBulletChar; - String sByInputBulletChar; + OUString sDeleteEmptyPara; + OUString sUseReplaceTbl; + OUString sCptlSttWord; + OUString sCptlSttSent; + OUString sUserStyle; + OUString sBullet; + OUString sByInputBullet; + OUString sBoldUnder; + OUString sNoDblSpaces; + OUString sCorrectCapsLock; + OUString sDetectURL; + OUString sDash; + OUString sNonBrkSpace; + OUString sOrdinal; + OUString sRightMargin; + OUString sNum; + OUString sBorder; + OUString sTable; + OUString sReplaceTemplates; + OUString sDelSpaceAtSttEnd; + OUString sDelSpaceBetweenLines; + + OUString sMargin; + OUString sBulletChar; + OUString sByInputBulletChar; Font aBulletFont; Font aByInputBulletFont; @@ -162,7 +162,7 @@ class OfaSwAutoFmtOptionsPage : public SfxTabPage DECL_LINK(SelectHdl, OfaACorrCheckListBox*); DECL_LINK(EditHdl, void *); - SvTreeListEntry* CreateEntry(String& rTxt, sal_uInt16 nCol); + SvTreeListEntry* CreateEntry(OUString& rTxt, sal_uInt16 nCol); OfaSwAutoFmtOptionsPage( Window* pParent, @@ -204,8 +204,8 @@ class AutoCorrEdit : public Edit struct DoubleString { - String sShort; - String sLong; + OUString sShort; + OUString sLong; void* pUserData; ///< CheckBox -> form. Text Bool -> selection text }; @@ -271,8 +271,8 @@ public: virtual void Resize(); void SetLanguage(LanguageType eSet); - void DeleteEntry(String sShort, String sLong); - void NewEntry(String sShort, String sLong, bool bKeepSourceFormatting); + void DeleteEntry(OUString sShort, OUString sLong); + void NewEntry(OUString sShort, OUString sLong, bool bKeepSourceFormatting); }; // class OfaAutocorrExceptPage --------------------------------------------- @@ -343,8 +343,8 @@ private: /// Just for writer OfaACorrCheckListBox* m_pSwCheckLB; - String sNonBrkSpace; - String sOrdinal; + OUString sNonBrkSpace; + OUString sOrdinal; SvLBoxButtonData* pCheckButtonData; @@ -377,9 +377,9 @@ private: DECL_LINK( QuoteHdl, PushButton* ); DECL_LINK( StdQuoteHdl, PushButton* ); - String ChangeStringExt_Impl( sal_UCS4 ); + OUString ChangeStringExt_Impl( sal_UCS4 ); - SvTreeListEntry* CreateEntry(String& rTxt, sal_uInt16 nCol); + SvTreeListEntry* CreateEntry(OUString& rTxt, sal_uInt16 nCol); OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet ); public: diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx index cece693bf2bb..be0e8d3451b5 100644 --- a/cui/source/inc/backgrnd.hxx +++ b/cui/source/inc/backgrnd.hxx @@ -129,8 +129,8 @@ private: sal_Bool bColTransparency : 1; sal_Bool bGraphTransparency : 1; Graphic aBgdGraphic; - String aBgdGraphicPath; - String aBgdGraphicFilter; + OUString aBgdGraphicPath; + OUString aBgdGraphicFilter; SvxBackgroundPage_Impl* pPageImpl; SvxOpenGraphicDialog* pImportDlg; @@ -150,7 +150,7 @@ private: void SetGraphicPosition_Impl( SvxGraphicPosition ePos ); SvxGraphicPosition GetGraphicPosition_Impl(); void FillControls_Impl(const SvxBrushItem& rBgdAttr, - const String& rUserData); + const OUString& rUserData); sal_Bool FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, sal_uInt16 nSlot); void ResetFromWallpaperItem( const SfxItemSet& rSet ); diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index 62686df592d4..9b317e651c76 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -256,17 +256,17 @@ public: ~SvxConfigEntry(); const OUString& GetCommand() const { return aCommand; } - void SetCommand( const String& rCmd ) { aCommand = rCmd; } + void SetCommand( const OUString& rCmd ) { aCommand = rCmd; } const OUString& GetName() const { return aLabel; } - void SetName( const String& rStr ) { aLabel = rStr; bStrEdited = sal_True; } + void SetName( const OUString& rStr ) { aLabel = rStr; bStrEdited = sal_True; } bool HasChangedName() const { return bStrEdited; } const OUString& GetHelpText() ; - void SetHelpText( const String& rStr ) { aHelpText = rStr; } + void SetHelpText( const OUString& rStr ) { aHelpText = rStr; } const OUString& GetHelpURL() const { return aHelpURL; } - void SetHelpURL( const String& rStr ) { aHelpURL = rStr; } + void SetHelpURL( const OUString& rStr ) { aHelpURL = rStr; } void SetPopup( bool bOn = sal_True ) { bPopUp = bOn; } bool IsPopup() const { return bPopUp; } @@ -349,8 +349,8 @@ public: SvxDescriptionEdit( Window* pParent, const ResId& _rId ); inline ~SvxDescriptionEdit() {} - void SetNewText( const String& _rText ); - inline void Clear() { SetNewText( String() ); } + void SetNewText( const OUString& _rText ); + inline void Clear() { SetNewText( OUString() ); } }; class SvxConfigPage : public SfxTabPage @@ -361,7 +361,7 @@ private: SaveInData* pCurrentSaveInData; DECL_LINK( SelectSaveInLocation, ListBox * ); - DECL_LINK( AsyncInfoMsg, String* ); + DECL_LINK( AsyncInfoMsg, OUString* ); bool SwapEntryData( SvTreeListEntry* pSourceEntry, SvTreeListEntry* pTargetEntry ); void AlignControls(); @@ -425,7 +425,7 @@ protected: SvTreeListEntry* pTarget = NULL, bool bFront = sal_False ); - void AddSubMenusToUI( const String& rBaseTitle, + void AddSubMenusToUI( const OUString& rBaseTitle, SvxConfigEntry* pParentData ); SvTreeListEntry* InsertEntryIntoUI ( SvxConfigEntry* pNewEntryData, diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx index c7a29c38ee23..2821bf84bd58 100644 --- a/cui/source/inc/cfgutil.hxx +++ b/cui/source/inc/cfgutil.hxx @@ -85,9 +85,9 @@ struct SfxGroupInfo_Impl sal_uInt16 nKind; sal_uInt16 nUniqueID; void* pObject; - sal_Bool bWasOpened; - String sCommand; - String sLabel; + sal_Bool bWasOpened; + OUString sCommand; + OUString sLabel; SfxGroupInfo_Impl( sal_uInt16 n, sal_uInt16 nr, void* pObj = 0 ) : nKind( n ), nUniqueID( nr ), pObject( pObj ), bWasOpened(sal_False) {} @@ -116,10 +116,10 @@ public: void ClearAll(); using Window::GetHelpText; - String GetHelpText( SvTreeListEntry *pEntry ); - String GetCurCommand(); - String GetCurLabel(); - String GetSelectedScriptURI(); + OUString GetHelpText( SvTreeListEntry *pEntry ); + OUString GetCurCommand(); + OUString GetCurLabel(); + OUString GetSelectedScriptURI(); void FunctionSelected(); void SetStylesInfo(SfxStylesInfo_Impl* pStyles); }; @@ -179,7 +179,7 @@ public: void Open( SvTreeListEntry*, sal_Bool ); void GroupSelected(); void SelectMacro( const SfxMacroInfoItem* ); - void SelectMacro( const String&, const String& ); + void SelectMacro( const OUString&, const OUString& ); void SetStylesInfo(SfxStylesInfo_Impl* pStyles); }; diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx index 422ffdff4dfd..7897aaf0dac2 100644 --- a/cui/source/inc/chardlg.hxx +++ b/cui/source/inc/chardlg.hxx @@ -206,9 +206,9 @@ private: FixedText* m_pPositionFT; ListBox* m_pPositionLB; - sal_uInt16 m_nHtmlMode; + sal_uInt16 m_nHtmlMode; - String m_aTransparentColorName; + OUString m_aTransparentColorName; SvxCharEffectsPage( Window* pParent, const SfxItemSet& rSet ); ~SvxCharEffectsPage(); diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx index 410e6aa582ff..041640742559 100644 --- a/cui/source/inc/cuicharmap.hxx +++ b/cui/source/inc/cuicharmap.hxx @@ -108,7 +108,7 @@ public: void SetChar( sal_UCS4 ); sal_UCS4 GetChar() const; - String GetCharacters() const; + OUString GetCharacters() const; virtual short Execute(); }; diff --git a/cui/source/inc/cuifmsearch.hxx b/cui/source/inc/cuifmsearch.hxx index a04f5ed860d8..c663309d45e6 100644 --- a/cui/source/inc/cuifmsearch.hxx +++ b/cui/source/inc/cuifmsearch.hxx @@ -80,8 +80,8 @@ class FmSearchDialog : public ModalDialog PushButton m_pbSearchAgain; CancelButton m_pbClose; HelpButton m_pbHelp; - String m_sSearch; - String m_sCancel; + OUString m_sSearch; + OUString m_sCancel; Window* m_pPreSearchFocus; @@ -91,7 +91,7 @@ class FmSearchDialog : public ModalDialog Link m_lnkContextSupplier; ///< for search in contexts /// memorize the currently selected field for every context - ::std::vector<String> m_arrContextFields; + ::std::vector<OUString> m_arrContextFields; FmSearchEngine* m_pSearchEngine; @@ -135,7 +135,7 @@ public: */ void SetCanceledNotFoundHdl(const Link& lnk) { m_lnkCanceledNotFoundHdl = lnk; } - inline void SetActiveField(const String& strField); + inline void SetActiveField(const OUString& strField); protected: virtual sal_Bool Close(); @@ -186,7 +186,7 @@ private: void initCommon( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& _rxCursor ); }; -inline void FmSearchDialog::SetActiveField(const String& strField) +inline void FmSearchDialog::SetActiveField(const OUString& strField) { sal_uInt16 nInitialField = m_lbField.GetEntryPos(strField); if (nInitialField == COMBOBOX_ENTRY_NOTFOUND) diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx index 1591dab5eec7..b10034d3c1e9 100644 --- a/cui/source/inc/cuigaldlg.hxx +++ b/cui/source/inc/cuigaldlg.hxx @@ -64,7 +64,7 @@ private: INetURLObject maStartURL; void ImplSearch( const INetURLObject& rStartURL, - const ::std::vector< String >& rFormats, + const ::std::vector< OUString >& rFormats, sal_Bool bRecursive ); virtual ~SearchThread(); @@ -101,7 +101,7 @@ public: virtual short Execute(); virtual void StartExecuteModal( const Link& rEndDialogHdl ); - void SetFileType( const String& rType ) { aFtSearchType.SetText( rType ); } + void SetFileType( const OUString& rType ) { aFtSearchType.SetText( rType ); } void SetDirectory( const INetURLObject& rURL ) { aFtSearchDir.SetText( GetReducedString( rURL, 30 ) ); } }; @@ -185,8 +185,8 @@ private: public: - TitleDialog( Window* pParent, const String& rOldText ); - String GetTitle() const { return maEdit.GetText(); } + TitleDialog( Window* pParent, const OUString& rOldText ); + OUString GetTitle() const { return maEdit.GetText(); } }; class GalleryIdDialog : public ModalDialog @@ -276,8 +276,8 @@ class TPGalleryThemeProperties : public SfxTabPage StringList aFoundList; FilterEntryList_impl aFilterEntryList; Timer aPreviewTimer; - String aLastFilterName; - String aPreviewString; + OUString aLastFilterName; + OUString aPreviewString; INetURLObject aURL; sal_uInt16 nCurFilterPos; sal_uInt16 nFirstExtFilterPos; @@ -318,7 +318,7 @@ public: void SetXChgData( ExchangeData* pData ); const ExchangeData* GetXChgData() const { return pData; } - void StartSearchFiles( const String& _rFolderURL, short _nDlgResult ); + void StartSearchFiles( const OUString& _rFolderURL, short _nDlgResult ); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); }; diff --git a/cui/source/inc/cuiimapwnd.hxx b/cui/source/inc/cuiimapwnd.hxx index cf8ec1946ead..bfd961edead5 100644 --- a/cui/source/inc/cuiimapwnd.hxx +++ b/cui/source/inc/cuiimapwnd.hxx @@ -42,15 +42,15 @@ class URLDlg : public ModalDialog public: URLDlg( Window* pWindow, - const String& rURL, const String& rAlternativeText, const String& rDescription, - const String& rTarget, const String& rName, + const OUString& rURL, const OUString& rAlternativeText, const OUString& rDescription, + const OUString& rTarget, const OUString& rName, TargetList& rTargetList ); - String GetURL() const { return m_pEdtURL->GetText(); } - String GetAltText() const { return m_pEdtAlternativeText->GetText(); } - String GetDesc() const { return m_pEdtDescription->GetText(); } - String GetTarget() const { return m_pCbbTargets->GetText(); } - String GetName() const { return m_pEdtName->GetText(); } + OUString GetURL() const { return m_pEdtURL->GetText(); } + OUString GetAltText() const { return m_pEdtAlternativeText->GetText(); } + OUString GetDesc() const { return m_pEdtDescription->GetText(); } + OUString GetTarget() const { return m_pCbbTargets->GetText(); } + OUString GetName() const { return m_pEdtName->GetText(); } }; #endif diff --git a/cui/source/inc/dbregister.hxx b/cui/source/inc/dbregister.hxx index d89560dfaef3..4a52ba07b957 100644 --- a/cui/source/inc/dbregister.hxx +++ b/cui/source/inc/dbregister.hxx @@ -66,7 +66,7 @@ namespace svx DECL_LINK( HeaderSelect_Impl, HeaderBar * ); DECL_LINK( HeaderEndDrag_Impl, HeaderBar * ); - DECL_LINK( NameValidator, String*); + DECL_LINK( NameValidator, OUString*); /** inserts a new entry in the tablistbox @@ -85,7 +85,7 @@ namespace svx @param _pEntry The entry to remove if the entry will be changed */ - void openLinkDialog(const String& _sOldName,const String& _sOldLocation,SvTreeListEntry* _pEntry = NULL); + void openLinkDialog(const OUString& _sOldName,const OUString& _sOldLocation,SvTreeListEntry* _pEntry = NULL); #endif diff --git a/cui/source/inc/dlgname.hxx b/cui/source/inc/dlgname.hxx index 21233707e261..caf6e6605c24 100644 --- a/cui/source/inc/dlgname.hxx +++ b/cui/source/inc/dlgname.hxx @@ -39,7 +39,7 @@ private: DECL_LINK(ModifyHdl, void *); public: - SvxNameDialog( Window* pWindow, const String& rName, const String& rDesc ); + SvxNameDialog( Window* pWindow, const OUString& rName, const OUString& rDesc ); void GetName( OUString& rName ){rName = pEdtName->GetText();} @@ -87,7 +87,7 @@ private: public: // constructor - SvxObjectNameDialog(Window* pWindow, const String& rName); + SvxObjectNameDialog(Window* pWindow, const OUString& rName); // data access void GetName(OUString& rName) {rName = pEdtName->GetText(); } @@ -117,7 +117,7 @@ private: public: // constructor - SvxObjectTitleDescDialog(Window* pWindow, const String& rTitle, const String& rDesc); + SvxObjectTitleDescDialog(Window* pWindow, const OUString& rTitle, const OUString& rDesc); // data access void GetTitle(OUString& rTitle) {rTitle = pEdtTitle->GetText(); } @@ -138,10 +138,10 @@ private: DECL_LINK(Button2Hdl, void *); public: - SvxMessDialog( Window* pWindow, const String& rText, const String& rDesc, Image* pImg = NULL ); + SvxMessDialog( Window* pWindow, const OUString& rText, const OUString& rDesc, Image* pImg = NULL ); ~SvxMessDialog(); - void SetButtonText( sal_uInt16 nBtnId, const String& rNewTxt ); + void SetButtonText( sal_uInt16 nBtnId, const OUString& rNewTxt ); }; diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx index b1e9578c1aa5..625bcb342d69 100644 --- a/cui/source/inc/grfpage.hxx +++ b/cui/source/inc/grfpage.hxx @@ -86,7 +86,7 @@ class SvxGrfCropPage : public SfxTabPage Timer aTimer; - String aGraphicName; + OUString aGraphicName; Size aOrigSize; Size aOrigPixelSize; Size aPageSize; diff --git a/cui/source/inc/hangulhanjadlg.hxx b/cui/source/inc/hangulhanjadlg.hxx index e7c3913c2566..9c1382b35d59 100644 --- a/cui/source/inc/hangulhanjadlg.hxx +++ b/cui/source/inc/hangulhanjadlg.hxx @@ -153,9 +153,9 @@ namespace svx void SetConversionFormatChangedHdl( const Link& _rHdl ); void SetFindHdl( const Link& _rHdl ); - String GetCurrentString( ) const; + OUString GetCurrentString( ) const; void SetCurrentString( - const String& _rNewString, + const OUString& _rNewString, const ::com::sun::star::uno::Sequence< OUString >& _rSuggestions, bool _bOriginatesFromDocument = true ); @@ -163,7 +163,7 @@ namespace svx void FocusSuggestion( ); /// retrieves the current suggestion - String GetCurrentSuggestion( ) const; + OUString GetCurrentSuggestion( ) const; void SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType ); editeng::HangulHanjaConversion::ConversionFormat GetConversionFormat( ) const; @@ -231,7 +231,7 @@ namespace svx HangulHanjaOptionsDialog( Window* _pParent ); virtual ~HangulHanjaOptionsDialog(); - void AddDict( const String& _rName, bool _bChecked ); + void AddDict( const OUString& _rName, bool _bChecked ); }; @@ -281,11 +281,11 @@ namespace svx class HangulHanjaEditDictDialog : public ModalDialog { private: - const String m_aEditHintText; + const OUString m_aEditHintText; HHDictList& m_rDictList; sal_uInt32 m_nCurrentDict; - String m_aOriginal; + OUString m_aOriginal; SuggestionList* m_pSuggestions; FixedText m_aBookFT; diff --git a/cui/source/inc/hldocntp.hxx b/cui/source/inc/hldocntp.hxx index 67ad2c1f48e4..c5392c798a78 100644 --- a/cui/source/inc/hldocntp.hxx +++ b/cui/source/inc/hldocntp.hxx @@ -39,7 +39,7 @@ private: FixedText maFtDocTypes; ListBox maLbDocTypes; - sal_Bool ImplGetURLObject( const String& rPath, const String& rBase, INetURLObject& aURLObject ) const; + sal_Bool ImplGetURLObject( const OUString& rPath, const OUString& rBase, INetURLObject& aURLObject ) const; void FillDocumentList (); DECL_LINK (ClickNewHdl_Impl , void * ); @@ -48,8 +48,8 @@ private: protected: void FillDlgFields(const OUString& rStrURL); - void GetCurentItemData ( OUString& rStrURL, String& aStrName, - String& aStrIntName, String& aStrFrame, + void GetCurentItemData ( OUString& rStrURL, OUString& aStrName, + OUString& aStrIntName, OUString& aStrFrame, SvxLinkInsertMode& eMode ); public: diff --git a/cui/source/inc/hldoctp.hxx b/cui/source/inc/hldoctp.hxx index b263bc5a3068..572f6ebabd69 100644 --- a/cui/source/inc/hldoctp.hxx +++ b/cui/source/inc/hldoctp.hxx @@ -63,12 +63,12 @@ private: protected: void FillDlgFields(const OUString& rStrURL); - void GetCurentItemData ( OUString& rStrURL, String& aStrName, - String& aStrIntName, String& aStrFrame, + void GetCurentItemData ( OUString& rStrURL, OUString& aStrName, + OUString& aStrIntName, OUString& aStrFrame, SvxLinkInsertMode& eMode ); virtual sal_Bool ShouldOpenMarkWnd () {return mbMarkWndOpen;} virtual void SetMarkWndShouldOpen (sal_Bool bOpen) {mbMarkWndOpen=bOpen;} - String GetCurrentURL (); + OUString GetCurrentURL (); public: SvxHyperlinkDocTp ( Window *pParent, const SfxItemSet& rItemSet); @@ -76,7 +76,7 @@ public: static IconChoicePage* Create( Window* pWindow, const SfxItemSet& rItemSet ); - virtual void SetMarkStr ( const String& aStrMark ); + virtual void SetMarkStr ( const OUString& aStrMark ); virtual void SetInitFocus(); }; diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx index ee3c8aa1ce0d..4e6b8673f702 100644 --- a/cui/source/inc/hlinettp.hxx +++ b/cui/source/inc/hlinettp.hxx @@ -45,8 +45,8 @@ private: Edit maEdPassword; CheckBox maCbAnonymous; - String maStrOldUser; - String maStrOldPassword; + OUString maStrOldUser; + OUString maStrOldPassword; sal_Bool mbMarkWndOpen; @@ -63,19 +63,19 @@ private: void SetScheme(const OUString& rScheme); void RemoveImproperProtocol(const OUString& rProperScheme); - String GetSchemeFromButtons() const; + OUString GetSchemeFromButtons() const; INetProtocol GetSmartProtocolFromButtons() const; OUString CreateAbsoluteURL() const; void setAnonymousFTPUser(); - void setFTPUser(const String& rUser, const String& rPassword); + void setFTPUser(const OUString& rUser, const OUString& rPassword); void RefreshMarkWindow(); protected: virtual void FillDlgFields(const OUString& rStrURL); - virtual void GetCurentItemData ( OUString& rStrURL, String& aStrName, - String& aStrIntName, String& aStrFrame, + virtual void GetCurentItemData ( OUString& rStrURL, OUString& aStrName, + OUString& aStrIntName, OUString& aStrFrame, SvxLinkInsertMode& eMode ); virtual sal_Bool ShouldOpenMarkWnd () {return ( mbMarkWndOpen && maRbtLinktypInternet.IsChecked() );} virtual void SetMarkWndShouldOpen (sal_Bool bOpen) {mbMarkWndOpen=bOpen;} @@ -86,7 +86,7 @@ public: static IconChoicePage* Create( Window* pWindow, const SfxItemSet& rItemSet ); - virtual void SetMarkStr ( const String& aStrMark ); + virtual void SetMarkStr ( const OUString& aStrMark ); virtual void SetOnlineMode( sal_Bool bEnable ); virtual void SetInitFocus(); diff --git a/cui/source/inc/hlmailtp.hxx b/cui/source/inc/hlmailtp.hxx index d76799ecc3ad..da69d56aa5cf 100644 --- a/cui/source/inc/hlmailtp.hxx +++ b/cui/source/inc/hlmailtp.hxx @@ -44,16 +44,16 @@ private: DECL_LINK (ModifiedReceiverHdl_Impl, void * ); ///< Combobox "receiver" modified void SetScheme(const OUString& rScheme); - void RemoveImproperProtocol(const String& aProperScheme); - String GetSchemeFromButtons() const; + void RemoveImproperProtocol(const OUString& aProperScheme); + OUString GetSchemeFromButtons() const; INetProtocol GetSmartProtocolFromButtons() const; - String CreateAbsoluteURL() const; + OUString CreateAbsoluteURL() const; protected: virtual void FillDlgFields(const OUString& rStrURL); - virtual void GetCurentItemData ( OUString& rStrURL, String& aStrName, - String& aStrIntName, String& aStrFrame, + virtual void GetCurentItemData ( OUString& rStrURL, OUString& aStrName, + OUString& aStrIntName, OUString& aStrFrame, SvxLinkInsertMode& eMode ); public: diff --git a/cui/source/inc/hltpbase.hxx b/cui/source/inc/hltpbase.hxx index a4b37c9a13ac..26eb00b844d8 100644 --- a/cui/source/inc/hltpbase.hxx +++ b/cui/source/inc/hltpbase.hxx @@ -96,7 +96,7 @@ protected: sal_Bool mbStdControlsInit; - String maStrInitURL; + OUString maStrInitURL; Timer maTimer; @@ -105,18 +105,18 @@ protected: void InitStdControls (); virtual void FillStandardDlgFields ( SvxHyperlinkItem* pHyperlinkItem ); virtual void FillDlgFields(const OUString& rStrURL) = 0; - virtual void GetCurentItemData ( OUString& rStrURL, String& aStrName, - String& aStrIntName, String& aStrFrame, + virtual void GetCurentItemData ( OUString& rStrURL, OUString& aStrName, + OUString& aStrIntName, OUString& aStrFrame, SvxLinkInsertMode& eMode ) = 0; - virtual String CreateUiNameFromURL( const String& aStrURL ); + virtual OUString CreateUiNameFromURL( const OUString& aStrURL ); - void GetDataFromCommonFields( String& aStrName, - String& aStrIntName, String& aStrFrame, + void GetDataFromCommonFields( OUString& aStrName, + OUString& aStrIntName, OUString& aStrFrame, SvxLinkInsertMode& eMode ); DECL_LINK (ClickScriptHdl_Impl, void * ); ///< Button : Script - String aEmptyStr; + OUString aEmptyStr; static OUString GetSchemeFromURL( const OUString& rStrURL ); @@ -140,7 +140,7 @@ public: virtual void DoApply (); virtual void SetOnlineMode( sal_Bool bEnable ); virtual void SetInitFocus(); - virtual void SetMarkStr ( const String& aStrMark ); + virtual void SetMarkStr ( const OUString& aStrMark ); virtual void Reset( const SfxItemSet& ); virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void ActivatePage( const SfxItemSet& rItemSet ); diff --git a/cui/source/inc/hyphen.hxx b/cui/source/inc/hyphen.hxx index c1924d7c0b77..744fa73c0a63 100644 --- a/cui/source/inc/hyphen.hxx +++ b/cui/source/inc/hyphen.hxx @@ -50,12 +50,12 @@ class SvxHyphenWordDialog : public SfxModalDialog PushButton* m_pDelBtn; PushButton* m_pHyphAll; CloseButton* m_pCloseBtn; - String aLabel; + OUString aLabel; SvxSpellWrapper* pHyphWrapper; css::uno::Reference< css::linguistic2::XHyphenator > xHyphenator; css::uno::Reference< css::linguistic2::XPossibleHyphens > xPossHyph; - String aEditWord; // aEditWord and aWordEdit.GetText() differ only by the character for the current selected hyphenation position - String aActWord; // actual word to be hyphenated + OUString aEditWord; // aEditWord and aWordEdit.GetText() differ only by the character for the current selected hyphenation position + OUString aActWord; // actual word to be hyphenated LanguageType nActLanguage; // and its language sal_uInt16 nMaxHyphenationPos; // right most valid hyphenation pos sal_uInt16 nHyphPos; @@ -65,7 +65,7 @@ class SvxHyphenWordDialog : public SfxModalDialog void EnableLRBtn_Impl(); - String EraseUnusableHyphens_Impl( css::uno::Reference< css::linguistic2::XPossibleHyphens > &rxPossHyph, sal_uInt16 nMaxHyphenationPos ); + OUString EraseUnusableHyphens_Impl( css::uno::Reference< css::linguistic2::XPossibleHyphens > &rxPossHyph, sal_uInt16 nMaxHyphenationPos ); void InitControls_Impl(); void ContinueHyph_Impl( sal_uInt16 nInsPos = 0 ); @@ -81,7 +81,7 @@ class SvxHyphenWordDialog : public SfxModalDialog DECL_LINK(GetFocusHdl_Impl, void *); public: - SvxHyphenWordDialog( const String &rWord, LanguageType nLang, + SvxHyphenWordDialog( const OUString &rWord, LanguageType nLang, Window* pParent, css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen, SvxSpellWrapper* pWrapper ); diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx index 84dee6977a6a..ffe2b85ca3f6 100644 --- a/cui/source/inc/iconcdlg.hxx +++ b/cui/source/inc/iconcdlg.hxx @@ -74,7 +74,7 @@ class IconChoicePage : public TabPage private : const SfxItemSet* pSet; - String aUserString; + OUString aUserString; sal_Bool bHasExchangeSupport; IconChoiceDialog* pDialog; @@ -113,8 +113,8 @@ public : virtual void ActivatePage( const SfxItemSet& ); virtual int DeactivatePage( SfxItemSet* pSet = 0 ); - void SetUserData(const String& rString) { aUserString = rString; } - String GetUserData() { return aUserString; } + void SetUserData(const OUString& rString) { aUserString = rString; } + OUString GetUserData() { return aUserString; } virtual void FillUserData(); virtual sal_Bool IsReadOnly() const; virtual sal_Bool QueryClose(); @@ -197,7 +197,7 @@ public : // interface SvxIconChoiceCtrlEntry* AddTabPage( - sal_uInt16 nId, const String& rIconText, const Image& rChoiceIcon, + sal_uInt16 nId, const OUString& rIconText, const Image& rChoiceIcon, CreatePage pCreateFunc /* != NULL */, GetPageRanges pRangesFunc = NULL /* NULL allowed*/, sal_Bool bItemsOnDemand = sal_False, sal_uLong nPos = LIST_APPEND ); diff --git a/cui/source/inc/labdlg.hxx b/cui/source/inc/labdlg.hxx index 8b35b8ef416e..d87a303acce8 100644 --- a/cui/source/inc/labdlg.hxx +++ b/cui/source/inc/labdlg.hxx @@ -50,8 +50,8 @@ private: Image* mpBmpCapTypes[CAPTYPE_BITMAPS_COUNT]; - String aStrHorzList; - String aStrVertList; + OUString aStrHorzList; + OUString aStrVertList; short nCaptionType; sal_Bool bFixedAngle; diff --git a/cui/source/inc/linkdlg.hxx b/cui/source/inc/linkdlg.hxx index e5d928d7c253..78bdeb09e69d 100644 --- a/cui/source/inc/linkdlg.hxx +++ b/cui/source/inc/linkdlg.hxx @@ -61,14 +61,14 @@ class SvBaseLinksDlg : public ModalDialog PushButton aPbOpenSource; PushButton aPbChangeSource; PushButton aPbBreakLink; - String aStrAutolink; - String aStrManuallink; - String aStrBrokenlink; - String aStrGraphiclink; - String aStrButtonclose; - String aStrCloselinkmsg; - String aStrCloselinkmsgMulti; - String aStrWaitinglink; + OUString aStrAutolink; + OUString aStrManuallink; + OUString aStrBrokenlink; + OUString aStrGraphiclink; + OUString aStrButtonclose; + OUString aStrCloselinkmsg; + OUString aStrCloselinkmsgMulti; + OUString aStrWaitinglink; sfx2::LinkManager* pLinkMgr; sal_Bool bHtmlMode; Timer aUpdateTimer; @@ -84,7 +84,7 @@ class SvBaseLinksDlg : public ModalDialog DECL_LINK( UpdateWaitingHdl, Timer * ); DECL_LINK( EndEditHdl, sfx2::SvBaseLink* ); sfx2::SvBaseLink* GetSelEntry( sal_uInt16* pPos ); - String ImplGetStateStr( const sfx2::SvBaseLink& ); + OUString ImplGetStateStr( const sfx2::SvBaseLink& ); void SetType( sfx2::SvBaseLink& rLink, sal_uInt16 nPos, sal_uInt16 nType ); void InsertEntry( const sfx2::SvBaseLink& rLink, sal_uInt16 nPos = LISTBOX_APPEND, sal_Bool bSelect = sal_False); @@ -101,14 +101,14 @@ class SvBaseLinksDlg : public ModalDialog PushButton& ChangeSource() { return aPbChangeSource; } PushButton& BreakLink() { return aPbBreakLink; } - String& Autolink() { return aStrAutolink; } - String& Manuallink() { return aStrManuallink; } - String& Brokenlink() { return aStrBrokenlink; } - String& Graphiclink() { return aStrGraphiclink; } - String& Buttonclose() { return aStrButtonclose; } - String& Closelinkmsg() { return aStrCloselinkmsg; } - String& CloselinkmsgMulti() { return aStrCloselinkmsgMulti; } - String& Waitinglink() { return aStrWaitinglink; } + OUString& Autolink() { return aStrAutolink; } + OUString& Manuallink() { return aStrManuallink; } + OUString& Brokenlink() { return aStrBrokenlink; } + OUString& Graphiclink() { return aStrGraphiclink; } + OUString& Buttonclose() { return aStrButtonclose; } + OUString& Closelinkmsg() { return aStrCloselinkmsg; } + OUString& CloselinkmsgMulti() { return aStrCloselinkmsgMulti; } + OUString& Waitinglink() { return aStrWaitinglink; } void SetManager( sfx2::LinkManager* ); public: diff --git a/cui/source/inc/macroass.hxx b/cui/source/inc/macroass.hxx index a5a311276892..31ce0aa5c19c 100644 --- a/cui/source/inc/macroass.hxx +++ b/cui/source/inc/macroass.hxx @@ -58,7 +58,7 @@ public: virtual ~_SfxMacroTabPage(); - void AddEvent( const String & rEventName, sal_uInt16 nEventId ); + void AddEvent( const OUString & rEventName, sal_uInt16 nEventId ); const SvxMacroTableDtor& GetMacroTbl() const; void SetMacroTbl( const SvxMacroTableDtor& rTbl ); diff --git a/cui/source/inc/multifil.hxx b/cui/source/inc/multifil.hxx index 4e65a918801c..f67852158e31 100644 --- a/cui/source/inc/multifil.hxx +++ b/cui/source/inc/multifil.hxx @@ -31,7 +31,7 @@ class SvxMultiFileDialog : public SvxMultiPathDialog { private: // #97807# ------------------------------------- - std::map< String, ::ucbhelper::Content > aFileContentMap; + std::map< OUString, ::ucbhelper::Content > aFileContentMap; DECL_LINK( AddHdl_Impl, PushButton * ); DECL_LINK(DelHdl_Impl, void *); @@ -40,8 +40,8 @@ public: SvxMultiFileDialog( Window* pParent, sal_Bool bEmptyAllowed = sal_False ); ~SvxMultiFileDialog(); - String GetFiles() const { return SvxMultiPathDialog::GetPath(); } - void SetFiles( const String& rPath ) { SvxMultiPathDialog::SetPath(rPath); aDelBtn.Enable(); } + OUString GetFiles() const { return SvxMultiPathDialog::GetPath(); } + void SetFiles( const OUString& rPath ) { SvxMultiPathDialog::SetPath(rPath); aDelBtn.Enable(); } }; diff --git a/cui/source/inc/multipat.hxx b/cui/source/inc/multipat.hxx index d5dead1e26b7..31cc4479f309 100644 --- a/cui/source/inc/multipat.hxx +++ b/cui/source/inc/multipat.hxx @@ -67,8 +67,8 @@ public: SvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed = sal_False ); ~SvxMultiPathDialog(); - String GetPath() const; - void SetPath( const String& rPath ); + OUString GetPath() const; + void SetPath( const OUString& rPath ); void SetClassPathMode(); sal_Bool IsClassPathMode() const; void EnableRadioButtonMode(); diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx index 57dd1d72f150..3795fedd65ef 100644 --- a/cui/source/inc/numfmt.hxx +++ b/cui/source/inc/numfmt.hxx @@ -44,7 +44,7 @@ class vector; class SvxNumberPreview : public Window { private: - String aPrevStr; + OUString aPrevStr; Color aPrevCol; sal_Int32 mnPos; sal_Unicode mnChar; @@ -58,7 +58,7 @@ protected: public: SvxNumberPreview(Window* pParent, WinBits nStyle = WB_BORDER); - void NotifyChange( const String& rPrevStr, const Color* pColor = NULL ); + void NotifyChange( const OUString& rPrevStr, const Color* pColor = NULL ); }; // ----------------------------------------------------------------------- @@ -126,7 +126,7 @@ private: sal_Bool bOneAreaFlag; short nFixedCategory; - String sAutomaticEntry; + OUString sAutomaticEntry; Window* pLastActivWindow; @@ -138,8 +138,8 @@ private: void Obstructing(); void EnableBySourceFormat_Impl(); void SetCategory( sal_uInt16 nPos ); - String GetExpColorString( Color*& rpPreviewColor, const String& aFormatStr, short nTmpCatPos ); - void MakePreviewText( const String& rFormat ); + OUString GetExpColorString( Color*& rpPreviewColor, const OUString& aFormatStr, short nTmpCatPos ); + void MakePreviewText( const OUString& rFormat ); void ChangePreviewText( sal_uInt16 nPos ); void AddAutomaticLanguage_Impl(LanguageType eAutoLang, sal_Bool bSelect); // Handler diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index b9cbbbf27922..5ceb746411f1 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -43,7 +43,7 @@ class SvxNumberingPreview : public Window const SvxNumRule* pActNum; Font aStdFont; long nPageWidth; - const String* pOutlineNames; + const OUString* pOutlineNames; sal_Bool bPosition; sal_uInt16 nActLevel; @@ -57,7 +57,7 @@ class SvxNumberingPreview : public Window {pActNum = pNum; Invalidate();}; void SetPageWidth(long nPgWidth) {nPageWidth = nPgWidth;} - void SetOutlineNames(const String* pNames) + void SetOutlineNames(const OUString* pNames) {pOutlineNames = pNames;} void SetPositionMode() { bPosition = sal_True;} @@ -98,7 +98,7 @@ class SvxSingleNumPickTabPage : public SfxTabPage sal_Bool bModified : 1; sal_Bool bPreset : 1; - String sNumCharFmtName; + OUString sNumCharFmtName; sal_uInt16 nNumItemId; protected: @@ -118,7 +118,7 @@ class SvxSingleNumPickTabPage : public SfxTabPage virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); - void SetNumCharFmtName(const String& rName){sNumCharFmtName = rName;} + void SetNumCharFmtName(const OUString& rName){sNumCharFmtName = rName;} }; @@ -137,7 +137,7 @@ class SvxBulletPickTabPage : public SfxTabPage sal_Bool bPreset : 1; sal_uInt16 nNumItemId; - String sBulletCharFmtName; + OUString sBulletCharFmtName; protected: DECL_LINK(NumSelectHdl_Impl, void *); DECL_LINK(DoubleClickHdl_Impl, void *); @@ -154,7 +154,7 @@ class SvxBulletPickTabPage : public SfxTabPage virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); - void SetCharFmtName(const String& rName){sBulletCharFmtName = rName;} + void SetCharFmtName(const OUString& rName){sBulletCharFmtName = rName;} virtual void PageCreated(SfxAllItemSet aSet); }; @@ -167,8 +167,8 @@ class SvxNumPickTabPage : public SfxTabPage using TabPage::DeactivatePage; SvxNumValueSet* m_pExamplesVS; - String sNumCharFmtName; - String sBulletCharFmtName; + OUString sNumCharFmtName; + OUString sBulletCharFmtName; SvxNumSettingsArr_Impl aNumSettingsArrays[NUM_VALUSET_COUNT]; // is initialized with the five formats @@ -197,7 +197,7 @@ class SvxNumPickTabPage : public SfxTabPage virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); - void SetCharFmtNames(const String& rCharName, const String& rBulName) + void SetCharFmtNames(const OUString& rCharName, const OUString& rBulName) { sNumCharFmtName = rCharName; sBulletCharFmtName = rBulName;} virtual void PageCreated(SfxAllItemSet aSet); @@ -214,7 +214,7 @@ class SvxBitmapPickTabPage : public SfxTabPage SvxBmpNumValueSet* m_pExamplesVS; std::vector<OUString> aGrfNames; - String sNumCharFmtName; + OUString sNumCharFmtName; SvxNumRule* pActNum; SvxNumRule* pSaveNum; @@ -242,7 +242,7 @@ class SvxBitmapPickTabPage : public SfxTabPage virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); - void SetNumCharFmtName(const String& rName){sNumCharFmtName = rName;} + void SetNumCharFmtName(const OUString& rName){sNumCharFmtName = rName;} }; //------------------------------------------------ diff --git a/cui/source/inc/optdict.hxx b/cui/source/inc/optdict.hxx index 51682ee4302b..63a6de447c99 100644 --- a/cui/source/inc/optdict.hxx +++ b/cui/source/inc/optdict.hxx @@ -111,8 +111,8 @@ private: PushButton* pNewReplacePB; PushButton* pDeletePB; - String sModify; - String sNew; + OUString sModify; + OUString sNew; DecorationView aDecoView; ::com::sun::star::uno::Sequence< @@ -141,7 +141,7 @@ private: ::com::sun::star::linguistic2::XDictionary > &xDic ); void RemoveDictEntry(SvTreeListEntry* pEntry); - sal_uInt16 GetLBInsertPos(const String &rDicWord); + sal_uInt16 GetLBInsertPos(const OUString &rDicWord); protected: @@ -149,7 +149,7 @@ protected: public: SvxEditDictionaryDialog( Window* pParent, - const String& rName, + const OUString& rName, ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1> &xSpl ); ~SvxEditDictionaryDialog(); diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx index 387b276d6db3..3e2e4e536c92 100644 --- a/cui/source/inc/optlingu.hxx +++ b/cui/source/inc/optlingu.hxx @@ -66,17 +66,17 @@ class SvxEditModulesDlg : public ModalDialog HelpButton aHelpPB; OKButton aClosePB; - String sSpell; - String sHyph; - String sThes; - String sGrammar; + OUString sSpell; + OUString sHyph; + OUString sThes; + OUString sGrammar; SvxLinguData_Impl* pDefaultLinguData; SvxLinguData_Impl& rLinguData; SvLBoxButtonData* pCheckButtonData; - SvTreeListEntry* CreateEntry(String& rTxt, sal_uInt16 nCol); + SvTreeListEntry* CreateEntry(OUString& rTxt, sal_uInt16 nCol); DECL_LINK( SelectHdl_Impl, SvxCheckListBox * ); DECL_LINK( UpDownHdl_Impl, PushButton * ); @@ -109,17 +109,17 @@ private: PushButton* m_pLinguOptionsEditPB; FixedHyperlink* m_pMoreDictsLink; - String sCapitalWords; - String sWordsWithDigits; - String sCapitalization; - String sSpellSpecial; - String sSpellAuto; - String sGrammarAuto; - String sNumMinWordlen; - String sNumPreBreak; - String sNumPostBreak; - String sHyphAuto; - String sHyphSpecial; + OUString sCapitalWords; + OUString sWordsWithDigits; + OUString sCapitalization; + OUString sSpellSpecial; + OUString sSpellAuto; + OUString sGrammarAuto; + OUString sNumMinWordlen; + OUString sNumPreBreak; + OUString sNumPostBreak; + OUString sHyphAuto; + OUString sHyphSpecial; com::sun::star::uno::Reference< com::sun::star::linguistic2::XLinguProperties > xProp; @@ -135,7 +135,7 @@ private: SvxLinguData_Impl* pLinguData; SvxLinguTabPage( Window* pParent, const SfxItemSet& rCoreSet ); - SvTreeListEntry* CreateEntry(String& rTxt, sal_uInt16 nCol); + SvTreeListEntry* CreateEntry(OUString& rTxt, sal_uInt16 nCol); void AddDicBoxEntry( const com::sun::star::uno::Reference< com::sun::star::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx ); sal_uLong GetDicUserData( const com::sun::star::uno::Reference< com::sun::star::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx ); diff --git a/cui/source/inc/optpath.hxx b/cui/source/inc/optpath.hxx index 3b5d2ea618c4..835517bd088f 100644 --- a/cui/source/inc/optpath.hxx +++ b/cui/source/inc/optpath.hxx @@ -52,7 +52,7 @@ private: ::com::sun::star::uno::Reference< ::svt::DialogClosedListener > xDialogListener; ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFolderPicker2 > xFolderPicker; - void ChangeCurrentEntry( const String& _rFolder ); + void ChangeCurrentEntry( const OUString& _rFolder ); DECL_LINK(PathHdl_Impl, void *); DECL_LINK(StandardHdl_Impl, void *); @@ -63,10 +63,10 @@ private: DECL_LINK( DialogClosedHdl, ::com::sun::star::ui::dialogs::DialogClosedEvent* ); - void GetPathList( sal_uInt16 _nPathHandle, String& _rInternalPath, - String& _rUserPath, String& _rWritablePath, sal_Bool& _rReadOnly ); + void GetPathList( sal_uInt16 _nPathHandle, OUString& _rInternalPath, + OUString& _rUserPath, OUString& _rWritablePath, sal_Bool& _rReadOnly ); void SetPathList( sal_uInt16 _nPathHandle, - const String& _rUserPath, const String& _rWritablePath ); + const OUString& _rUserPath, const OUString& _rWritablePath ); public: SvxPathTabPage( Window* pParent, const SfxItemSet& rSet ); diff --git a/cui/source/inc/passwdomdlg.hxx b/cui/source/inc/passwdomdlg.hxx index daa6dea81d04..98161e950b39 100644 --- a/cui/source/inc/passwdomdlg.hxx +++ b/cui/source/inc/passwdomdlg.hxx @@ -43,8 +43,8 @@ public: virtual ~PasswordToOpenModifyDialog(); // AbstractPasswordToOpenModifyDialog - virtual String GetPasswordToOpen() const; - virtual String GetPasswordToModify() const; + virtual OUString GetPasswordToOpen() const; + virtual OUString GetPasswordToModify() const; virtual bool IsRecommendToOpenReadonly() const; }; diff --git a/cui/source/inc/pastedlg.hxx b/cui/source/inc/pastedlg.hxx index 7cd13f620eab..3de81da85a09 100644 --- a/cui/source/inc/pastedlg.hxx +++ b/cui/source/inc/pastedlg.hxx @@ -44,7 +44,7 @@ class SvPasteObjectDialog : public ModalDialog OKButton* m_pOKButton; ::std::map< SotFormatStringId, OUString > aSupplementMap; SvGlobalName aObjClassName; - String aObjName; + OUString aObjName; ListBox& ObjectLB() { return *m_pLbInsertList; } FixedText& ObjectSource() { return *m_pFtObjectSource; } @@ -57,8 +57,8 @@ public: SvPasteObjectDialog( Window* pParent ); ~SvPasteObjectDialog(); - void Insert( SotFormatStringId nFormat, const String & rFormatName ); - void SetObjName( const SvGlobalName & rClass, const String & rObjName ); + void Insert( SotFormatStringId nFormat, const OUString & rFormatName ); + void SetObjName( const SvGlobalName & rClass, const OUString & rObjName ); sal_uLong GetFormat( const TransferableDataHelper& aHelper, const DataFlavorExVector* pFormats=0, const TransferableObjectDescriptor* pDesc=0 ); diff --git a/cui/source/inc/postdlg.hxx b/cui/source/inc/postdlg.hxx index 4ae9b7d3f666..49184687ca95 100644 --- a/cui/source/inc/postdlg.hxx +++ b/cui/source/inc/postdlg.hxx @@ -58,7 +58,7 @@ public: { aNextHdlLink = rLink; } void EnableTravel(sal_Bool bNext, sal_Bool bPrev); - String GetNote() + OUString GetNote() { return m_pEditED->GetText(); } @@ -66,7 +66,7 @@ public: { m_pEditED->SetText(rTxt); } - void ShowLastAuthor(const String& rAuthor, const String& rDate); + void ShowLastAuthor(const OUString& rAuthor, const OUString& rDate); void DontChangeAuthor() { m_pAuthorBtn->Enable(false); diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx index d9ff490f55ab..7fe757d4953b 100644 --- a/cui/source/inc/scriptdlg.hxx +++ b/cui/source/inc/scriptdlg.hxx @@ -85,12 +85,12 @@ public: - SvTreeListEntry * insertEntry(String const & rText, sal_uInt16 nBitmap, + SvTreeListEntry * insertEntry(OUString const & rText, sal_uInt16 nBitmap, SvTreeListEntry * pParent, bool bChildrenOnDemand, std::auto_ptr< SFEntry > aUserData, OUString factoryURL ); - SvTreeListEntry * insertEntry(String const & rText, sal_uInt16 nBitmap, + SvTreeListEntry * insertEntry(OUString const & rText, sal_uInt16 nBitmap, SvTreeListEntry * pParent, bool bChildrenOnDemand, std::auto_ptr< SFEntry > aUserData ); @@ -110,8 +110,8 @@ public: CuiInputDialog( Window * pParent, sal_uInt16 nMode ); ~CuiInputDialog(); - String GetObjectName() const { return aEdit.GetText(); } - void SetObjectName( const String& rName ) { aEdit.SetText( rName ); aEdit.SetSelection( Selection( 0, rName.Len() ) );} + OUString GetObjectName() const { return aEdit.GetText(); } + void SetObjectName( const OUString& rName ) { aEdit.SetText( rName ); aEdit.SetSelection( Selection( 0, rName.getLength() ) );} }; class SFEntry @@ -150,16 +150,16 @@ protected: OUString m_sLanguage; static Selection_hash m_lastSelection; - const String m_delErrStr; - const String m_delErrTitleStr; - const String m_delQueryStr; - const String m_delQueryTitleStr; - const String m_createErrStr; - const String m_createDupStr; - const String m_createErrTitleStr; - const String m_renameErrStr; - const String m_renameDupStr; - const String m_renameErrTitleStr; + const OUString m_delErrStr; + const OUString m_delErrTitleStr; + const OUString m_delQueryStr; + const OUString m_delQueryTitleStr; + const OUString m_createErrStr; + const OUString m_createDupStr; + const OUString m_createErrTitleStr; + const OUString m_renameErrStr; + const OUString m_renameDupStr; + const OUString m_renameErrTitleStr; DECL_LINK( MacroSelectHdl, SvTreeListBox * ); DECL_LINK( ScriptSelectHdl, SvTreeListBox * ); diff --git a/cui/source/inc/selector.hxx b/cui/source/inc/selector.hxx index 40c8a64d0a7f..aedca2a81801 100644 --- a/cui/source/inc/selector.hxx +++ b/cui/source/inc/selector.hxx @@ -103,7 +103,7 @@ public: SvxConfigFunctionListBox(Window* pParent); ~SvxConfigFunctionListBox(); void ClearAll(); - String GetHelpText( SvTreeListEntry *pEntry ); + OUString GetHelpText( SvTreeListEntry *pEntry ); using Window::GetHelpText; SvTreeListEntry* GetLastSelectedEntry(); void FunctionSelected(); @@ -215,10 +215,10 @@ public: m_pCategories->SetImageProvider(provider); } - String GetScriptURL() const; - String GetSelectedDisplayName(); + OUString GetScriptURL() const; + OUString GetSelectedDisplayName(); void SetRunLabel(); - void SetDialogDescription(const String& rDescription); + void SetDialogDescription(const OUString& rDescription); }; #endif diff --git a/cui/source/inc/thesdlg.hxx b/cui/source/inc/thesdlg.hxx index a3b36dcb0fcf..e72568ad1177 100644 --- a/cui/source/inc/thesdlg.hxx +++ b/cui/source/inc/thesdlg.hxx @@ -60,7 +60,7 @@ class AlternativesExtraData public: AlternativesExtraData() : bHeader( false ) {} - AlternativesExtraData( const String &rText, bool bIsHeader ) : + AlternativesExtraData( const OUString &rText, bool bIsHeader ) : sText(rText), bHeader(bIsHeader) { @@ -89,7 +89,7 @@ public: virtual ~ThesaurusAlternativesCtrl(); - SvTreeListEntry * AddEntry( sal_Int32 nVal, const String &rText, bool bIsHeader ); + SvTreeListEntry * AddEntry( sal_Int32 nVal, const OUString &rText, bool bIsHeader ); void ClearExtraData(); void SetExtraData( const SvTreeListEntry *pEntry, const AlternativesExtraData &rData ); @@ -154,18 +154,18 @@ public: queryMeanings_Impl( OUString& rTerm, const css::lang::Locale& rLocale, const css::beans::PropertyValues& rProperties ) throw(css::lang::IllegalArgumentException, css::uno::RuntimeException); bool UpdateAlternativesBox_Impl(); - void LookUp( const String &rText ); + void LookUp( const OUString &rText ); void LookUp_Impl(); virtual void Apply(); public: SvxThesaurusDialog( Window* pParent, css::uno::Reference< css::linguistic2::XThesaurus > xThesaurus, - const String &rWord, LanguageType nLanguage ); + const OUString &rWord, LanguageType nLanguage ); ~SvxThesaurusDialog(); void SetWindowTitle( LanguageType nLanguage ); - String GetWord(); + OUString GetWord(); sal_uInt16 GetLanguage() const; }; diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx index adf6563a630e..9709cac5bb58 100644 --- a/cui/source/inc/treeopt.hxx +++ b/cui/source/inc/treeopt.hxx @@ -154,8 +154,8 @@ private: SvTreeListBox aTreeLB; - String sTitle; - String sNotLoadedError; + OUString sTitle; + OUString sNotLoadedError; // for the ColorTabPage SfxItemSet* pColorPageItemSet; @@ -207,13 +207,13 @@ public: OfaTreeOptionsDialog( Window* pParent, const OUString& rExtensionId ); ~OfaTreeOptionsDialog(); - OptionsPageInfo* AddTabPage( sal_uInt16 nId, const String& rPageName, sal_uInt16 nGroup ); - sal_uInt16 AddGroup( const String& rGroupName, SfxShell* pCreateShell, + OptionsPageInfo* AddTabPage( sal_uInt16 nId, const OUString& rPageName, sal_uInt16 nGroup ); + sal_uInt16 AddGroup( const OUString& rGroupName, SfxShell* pCreateShell, SfxModule* pCreateModule, sal_uInt16 nDialogId ); void ActivateLastSelection(); void ActivatePage( sal_uInt16 nResId ); - void ActivatePage( const String& rPageURL ); + void ActivatePage( const OUString& rPageURL ); void ApplyItemSets(); // helper functions to call the language settings TabPage from the SpellDialog diff --git a/cui/source/options/cfgchart.cxx b/cui/source/options/cfgchart.cxx index faac1b594979..182c0f10488e 100644 --- a/cui/source/options/cfgchart.cxx +++ b/cui/source/options/cfgchart.cxx @@ -122,7 +122,7 @@ void SvxChartColorTable::useDefault() } } -String SvxChartColorTable::getDefaultName( size_t _nIndex ) +OUString SvxChartColorTable::getDefaultName( size_t _nIndex ) { OUString aName; diff --git a/cui/source/options/cfgchart.hxx b/cui/source/options/cfgchart.hxx index 03f7a78a1c95..71ec42f68e63 100644 --- a/cui/source/options/cfgchart.hxx +++ b/cui/source/options/cfgchart.hxx @@ -55,7 +55,7 @@ public: void remove( size_t _nIndex ); void replace( size_t _nIndex, const XColorEntry & _rEntry ); void useDefault(); - String getDefaultName(size_t _nIndex); + OUString getDefaultName(size_t _nIndex); // comparison bool operator==( const SvxChartColorTable & _rOther ) const; diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx index f2b6509e36a6..b92e271df7c9 100644 --- a/cui/source/options/connpooloptions.cxx +++ b/cui/source/options/connpooloptions.cxx @@ -39,8 +39,8 @@ namespace offapp DriverPoolingSettings m_aSettings; DriverPoolingSettings::const_iterator m_aSeekRow; - String m_sYes; - String m_sNo; + OUString m_sYes; + OUString m_sNo; Link m_aRowChangeHandler; @@ -85,7 +85,7 @@ namespace offapp private: - String implGetCellText(DriverPoolingSettings::const_iterator _rPos, sal_uInt16 _nColId) const; + OUString implGetCellText(DriverPoolingSettings::const_iterator _rPos, sal_uInt16 _nColId) const; }; //-------------------------------------------------------------------- @@ -136,11 +136,11 @@ namespace offapp EditBrowseBox::Init(); Size aColWidth = LogicToPixel(Size(160, 0), MAP_APPFONT); - InsertDataColumn(1, String(CUI_RES(RID_SVXSTR_DRIVER_NAME)), aColWidth.Width()); + InsertDataColumn(1, OUString(CUI_RES(RID_SVXSTR_DRIVER_NAME)), aColWidth.Width()); aColWidth = LogicToPixel(Size(30, 0), MAP_APPFONT); - InsertDataColumn(2, String(CUI_RES(RID_SVXSTR_POOLED_FLAG)), aColWidth.Width()); + InsertDataColumn(2, OUString(CUI_RES(RID_SVXSTR_POOLED_FLAG)), aColWidth.Width()); aColWidth = LogicToPixel(Size(60, 0), MAP_APPFONT); - InsertDataColumn(3, String(CUI_RES(RID_SVXSTR_POOL_TIMEOUT)), aColWidth.Width()); + InsertDataColumn(3, OUString(CUI_RES(RID_SVXSTR_POOL_TIMEOUT)), aColWidth.Width()); // Attention: the resource of the string is local to the resource of the enclosing dialog! } @@ -209,11 +209,11 @@ namespace offapp } //-------------------------------------------------------------------- - String DriverListControl::implGetCellText(DriverPoolingSettings::const_iterator _rPos, sal_uInt16 _nColId) const + OUString DriverListControl::implGetCellText(DriverPoolingSettings::const_iterator _rPos, sal_uInt16 _nColId) const { OSL_ENSURE(_rPos < m_aSettings.end(), "DriverListControl::implGetCellText: invalid position!"); - String sReturn; + OUString sReturn; switch (_nColId) { case 1: @@ -427,7 +427,7 @@ namespace offapp if (!bValidRow) { // positioned on an invalid row - m_pDriver->SetText(String()); + m_pDriver->SetText(OUString()); } else { diff --git a/cui/source/options/connpoolsettings.cxx b/cui/source/options/connpoolsettings.cxx index 89753ae934b7..12e1b16d0a37 100644 --- a/cui/source/options/connpoolsettings.cxx +++ b/cui/source/options/connpoolsettings.cxx @@ -28,7 +28,7 @@ namespace offapp //= DriverPooling //==================================================================== //-------------------------------------------------------------------- - DriverPooling::DriverPooling( const String& _rName, sal_Bool _bEnabled, const sal_Int32 _nTimeout ) + DriverPooling::DriverPooling( const OUString& _rName, sal_Bool _bEnabled, const sal_Int32 _nTimeout ) :sName(_rName) ,bEnabled(_bEnabled) ,nTimeoutSeconds(_nTimeout) diff --git a/cui/source/options/connpoolsettings.hxx b/cui/source/options/connpoolsettings.hxx index a93f6aacf509..01ffccf654de 100644 --- a/cui/source/options/connpoolsettings.hxx +++ b/cui/source/options/connpoolsettings.hxx @@ -35,11 +35,11 @@ namespace offapp //==================================================================== struct DriverPooling { - String sName; + OUString sName; sal_Bool bEnabled; sal_Int32 nTimeoutSeconds; - DriverPooling( const String& _rName, sal_Bool _bEnabled, const sal_Int32 _nTimeout ); + DriverPooling( const OUString& _rName, sal_Bool _bEnabled, const sal_Int32 _nTimeout ); sal_Bool operator == (const DriverPooling& _rR) const; sal_Bool operator != (const DriverPooling& _rR) const { return !operator ==(_rR); } diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index 4701c7d0eb4b..269e33a74b92 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -229,16 +229,16 @@ void DbRegistrationOptionsPage::Reset( const SfxItemSet& rSet ) insertNewEntry( aIter->first, aTransformer.get( OFileNotation::N_SYSTEM ), aIter->second.bReadOnly ); } - String aUserData = GetUserData(); - if ( aUserData.Len() ) + OUString aUserData = GetUserData(); + if ( !aUserData.isEmpty() ) { HeaderBar &rBar = pPathBox->GetTheHeaderBar(); // restore column width - rBar.SetItemSize( ITEMID_TYPE, aUserData.GetToken(0).ToInt32() ); + rBar.SetItemSize( ITEMID_TYPE, aUserData.getToken(0, ';').toInt32() ); HeaderEndDrag_Impl( &rBar ); // restore sort direction - sal_Bool bUp = (sal_Bool)(sal_uInt16)aUserData.GetToken(1).ToInt32(); + sal_Bool bUp = (sal_Bool)(sal_uInt16)aUserData.getToken(1, ';').toInt32(); HeaderBarItemBits nBits = rBar.GetItemBits(ITEMID_TYPE); if ( bUp ) @@ -284,7 +284,7 @@ IMPL_LINK_NOARG(DbRegistrationOptionsPage, DeleteHdl) // ----------------------------------------------------------------------- IMPL_LINK_NOARG(DbRegistrationOptionsPage, NewHdl) { - String sNewName,sNewLocation; + OUString sNewName,sNewLocation; openLinkDialog(sNewName,sNewLocation); return 0; } @@ -301,7 +301,7 @@ IMPL_LINK_NOARG(DbRegistrationOptionsPage, EditHdl) if ( !pOldRegistration || pOldRegistration->bReadOnly ) return 0L; - String sOldName = pPathBox->GetEntryText(pEntry,0); + OUString sOldName = pPathBox->GetEntryText(pEntry,0); m_pCurEntry = pEntry; openLinkDialog( sOldName, pOldRegistration->sLocation, pEntry ); m_pCurEntry = NULL; @@ -392,9 +392,9 @@ IMPL_LINK_NOARG(DbRegistrationOptionsPage, PathSelect_Impl) // ----------------------------------------------------------------------------- void DbRegistrationOptionsPage::insertNewEntry( const OUString& _sName,const OUString& _sLocation, const bool _bReadOnly ) { - String aStr( _sName ); - aStr += '\t'; - aStr += String(_sLocation); + OUString aStr( _sName ); + aStr += "\t"; + aStr += _sLocation; SvTreeListEntry* pEntry = NULL; if ( _bReadOnly ) @@ -411,7 +411,7 @@ void DbRegistrationOptionsPage::insertNewEntry( const OUString& _sName,const OUS } // ----------------------------------------------------------------------------- -void DbRegistrationOptionsPage::openLinkDialog(const String& _sOldName,const String& _sOldLocation,SvTreeListEntry* _pEntry) +void DbRegistrationOptionsPage::openLinkDialog(const OUString& _sOldName,const OUString& _sOldLocation,SvTreeListEntry* _pEntry) { ODocumentLinkDialog aDlg(this,_pEntry == NULL); @@ -420,7 +420,7 @@ void DbRegistrationOptionsPage::openLinkDialog(const String& _sOldName,const Str if ( aDlg.Execute() == RET_OK ) { - String sNewName,sNewLocation; + OUString sNewName,sNewLocation; aDlg.get(sNewName,sNewLocation); if ( _pEntry == NULL || sNewName != _sOldName || sNewLocation != _sOldLocation ) { @@ -435,7 +435,7 @@ void DbRegistrationOptionsPage::openLinkDialog(const String& _sOldName,const Str } } // ----------------------------------------------------------------------------- -IMPL_LINK( DbRegistrationOptionsPage, NameValidator, String*, _pName ) +IMPL_LINK( DbRegistrationOptionsPage, NameValidator, OUString*, _pName ) { if ( _pName ) { diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx index 8302799b480a..e4e5879a7cdd 100644 --- a/cui/source/options/doclinkdialog.cxx +++ b/cui/source/options/doclinkdialog.cxx @@ -57,7 +57,7 @@ namespace svx ,m_aHelp (this, CUI_RES(BTN_HELP)) ,m_bCreatingNew(_bCreateNew) { - String sText = String( CUI_RES( m_bCreatingNew ? STR_NEW_LINK : STR_EDIT_LINK ) ); + OUString sText = CUI_RES( m_bCreatingNew ? STR_NEW_LINK : STR_EDIT_LINK ); SetText(sText); FreeResource(); @@ -78,7 +78,7 @@ namespace svx } //------------------------------------------------------------------ - void ODocumentLinkDialog::set( const String& _rName, const String& _rURL ) + void ODocumentLinkDialog::set( const OUString& _rName, const OUString& _rURL ) { m_aName.SetText(_rName); m_aURL.SetText(_rURL); @@ -86,7 +86,7 @@ namespace svx } //------------------------------------------------------------------ - void ODocumentLinkDialog::get( String& _rName, String& _rURL ) const + void ODocumentLinkDialog::get( OUString& _rName, OUString& _rURL ) const { _rName = m_aName.GetText(); _rURL = m_aURL.GetText(); @@ -121,8 +121,8 @@ namespace svx if (!bFileExists) { - String sMsg = String(CUI_RES(STR_LINKEDDOC_DOESNOTEXIST)); - sMsg.SearchAndReplaceAscii("$file$", m_aURL.GetText()); + OUString sMsg = CUI_RES(STR_LINKEDDOC_DOESNOTEXIST); + sMsg = sMsg.replaceFirst("$file$", m_aURL.GetText()); ErrorBox aError(this, WB_OK , sMsg); aError.Execute(); return 0L; @@ -130,24 +130,24 @@ namespace svx INetURLObject aURL( sURL ); if ( aURL.GetProtocol() != INET_PROT_FILE ) { - String sMsg = String(CUI_RES(STR_LINKEDDOC_NO_SYSTEM_FILE)); - sMsg.SearchAndReplaceAscii("$file$", m_aURL.GetText()); + OUString sMsg = CUI_RES(STR_LINKEDDOC_NO_SYSTEM_FILE); + sMsg = sMsg.replaceFirst("$file$", m_aURL.GetText()); ErrorBox aError(this, WB_OK , sMsg); aError.Execute(); return 0L; } - String sCurrentText = m_aName.GetText(); + OUString sCurrentText = m_aName.GetText(); if ( m_aNameValidator.IsSet() ) { if ( !m_aNameValidator.Call( &sCurrentText ) ) { - String sMsg = String(CUI_RES(STR_NAME_CONFLICT)); - sMsg.SearchAndReplaceAscii("$file$", sCurrentText); + OUString sMsg = CUI_RES(STR_NAME_CONFLICT); + sMsg = sMsg.replaceFirst("$file$", sCurrentText); InfoBox aError(this, sMsg); aError.Execute(); - m_aName.SetSelection(Selection(0,sCurrentText.Len())); + m_aName.SetSelection(Selection(0,sCurrentText.getLength())); m_aName.GrabFocus(); return 0L; } @@ -169,8 +169,8 @@ namespace svx aFileDlg.SetCurrentFilter(pFilter->GetUIName()); } - String sPath = m_aURL.GetText(); - if (sPath.Len()) + OUString sPath = m_aURL.GetText(); + if (!sPath.isEmpty()) { OFileNotation aTransformer( sPath, OFileNotation::N_SYSTEM ); aFileDlg.SetDisplayDirectory( aTransformer.get( OFileNotation::N_URL ) ); diff --git a/cui/source/options/doclinkdialog.hxx b/cui/source/options/doclinkdialog.hxx index 17b1af513d94..bff0d340c33b 100644 --- a/cui/source/options/doclinkdialog.hxx +++ b/cui/source/options/doclinkdialog.hxx @@ -64,8 +64,8 @@ namespace svx void setNameValidator( const Link& _rValidator ) { m_aNameValidator = _rValidator; } Link getNameValidator( ) const { return m_aNameValidator; } - void set( const String& _rName, const String& _rURL ); - void get( String& _rName, String& _rURL ) const; + void set( const OUString& _rName, const OUString& _rURL ); + void get( OUString& _rName, OUString& _rURL ) const; protected: DECL_LINK(OnTextModified, void *); diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index 230ab855dc9b..06afeb592f8d 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -115,7 +115,7 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( Window* pParent, m_pFontHeightLB->InsertEntry(OUString::number(nHeight)); } -SvTreeListEntry* SvxFontSubstTabPage::CreateEntry(String& rFont1, String& rFont2) +SvTreeListEntry* SvxFontSubstTabPage::CreateEntry(OUString& rFont1, OUString& rFont2) { SvTreeListEntry* pEntry = new SvTreeListEntry; @@ -208,8 +208,8 @@ void SvxFontSubstTabPage::Reset( const SfxItemSet& ) for (sal_Int32 i = 0; i < nCount; ++i) { const SubstitutionStruct* pSubs = pConfig->GetSubstitution(i); - String aTmpStr1(pSubs->sFont); - String aTmpStr2(pSubs->sReplaceBy); + OUString aTmpStr1(pSubs->sFont); + OUString aTmpStr2(pSubs->sReplaceBy); SvTreeListEntry* pEntry = CreateEntry(aTmpStr1, aTmpStr2); m_pCheckLB->Insert(pEntry); m_pCheckLB->CheckEntry(pEntry, 0, pSubs->bReplaceAlways); @@ -259,8 +259,8 @@ IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin) else { // new entry - String sFont1 = m_pFont1CB->GetText(); - String sFont2 = m_pFont2CB->GetText(); + OUString sFont1 = m_pFont1CB->GetText(); + OUString sFont2 = m_pFont2CB->GetText(); pEntry = CreateEntry(sFont1, sFont2); m_pCheckLB->Insert(pEntry); @@ -318,7 +318,7 @@ IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin) //-------------------------------------------------------------------------- IMPL_LINK(SvxFontSubstTabPage, NonPropFontsHdl, CheckBox*, pBox) { - String sFontName = m_pFontNameLB->GetSelectEntry(); + OUString sFontName = m_pFontNameLB->GetSelectEntry(); sal_Bool bNonPropOnly = pBox->IsChecked(); m_pFontNameLB->Clear(); FontList aFntLst( Application::GetDefaultDevice() ); @@ -344,8 +344,8 @@ void SvxFontSubstTabPage::CheckEnable() SvTreeListEntry* pEntry = m_pCheckLB->FirstSelected(); - String sEntry = m_pFont1CB->GetText(); - sEntry += '\t'; + OUString sEntry = m_pFont1CB->GetText(); + sEntry += "\t"; sEntry += m_pFont2CB->GetText(); // because of OS/2 optimization error (Bug #56267) a bit more intricate: diff --git a/cui/source/options/fontsubs.hxx b/cui/source/options/fontsubs.hxx index d5fb69ac150b..b5c88a214f7d 100644 --- a/cui/source/options/fontsubs.hxx +++ b/cui/source/options/fontsubs.hxx @@ -87,7 +87,7 @@ class SvxFontSubstTabPage : public SfxTabPage DECL_LINK(SelectHdl, Window *pWin = 0); DECL_LINK(NonPropFontsHdl, CheckBox* pBox); - SvTreeListEntry* CreateEntry(String& rFont1, String& rFont2); + SvTreeListEntry* CreateEntry(OUString& rFont1, OUString& rFont2); void CheckEnable(); diff --git a/cui/source/options/optHeaderTabListbox.cxx b/cui/source/options/optHeaderTabListbox.cxx index 5d8db124a66b..74ed49469ecc 100644 --- a/cui/source/options/optHeaderTabListbox.cxx +++ b/cui/source/options/optHeaderTabListbox.cxx @@ -30,7 +30,7 @@ namespace svx class OptLBoxString_Impl : public SvLBoxString { public: - OptLBoxString_Impl( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const String& rTxt ) : + OptLBoxString_Impl( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& rTxt ) : SvLBoxString( pEntry, nFlags, rTxt ) {} virtual void Paint( diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index c6f50c712151..d09fd7798b27 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -1111,9 +1111,9 @@ void SvxColorOptionsTabPage::Reset( const SfxItemSet& ) pExtColorConfig = new EditableExtendedColorConfig; m_pColorConfigCT->SetExtendedConfig(*pExtColorConfig); - String sUser = GetUserData(); + OUString sUser = GetUserData(); //has to be called always to speed up accessibility tools - m_pColorConfigCT->SetScrollPosition(sUser.ToInt32()); + m_pColorConfigCT->SetScrollPosition(sUser.toInt32()); m_pColorSchemeLB->Clear(); uno::Sequence< OUString > aSchemes = pColorConfig->GetSchemeNames(); const OUString* pSchemes = aSchemes.getConstArray(); @@ -1155,10 +1155,10 @@ IMPL_LINK(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, PushButton*, pButton ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); AbstractSvxNameDialog* aNameDlg = pFact->CreateSvxNameDialog( pButton, - sName, String(CUI_RES(RID_SVXSTR_COLOR_CONFIG_SAVE2)) ); + sName, CUI_RES(RID_SVXSTR_COLOR_CONFIG_SAVE2) ); DBG_ASSERT(aNameDlg, "Dialogdiet fail!"); aNameDlg->SetCheckNameHdl( LINK(this, SvxColorOptionsTabPage, CheckNameHdl_Impl)); - aNameDlg->SetText(String(CUI_RES(RID_SVXSTR_COLOR_CONFIG_SAVE1))); + aNameDlg->SetText(CUI_RES(RID_SVXSTR_COLOR_CONFIG_SAVE1)); aNameDlg->SetHelpId(HID_OPTIONS_COLORCONFIG_SAVE_SCHEME); aNameDlg->SetCheckNameHdl( LINK(this, SvxColorOptionsTabPage, CheckNameHdl_Impl)); if(RET_OK == aNameDlg->Execute()) @@ -1176,7 +1176,7 @@ IMPL_LINK(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, PushButton*, pButton ) { DBG_ASSERT(m_pColorSchemeLB->GetEntryCount() > 1, "don't delete the last scheme"); QueryBox aQuery(pButton, CUI_RES(RID_SVXQB_DELETE_COLOR_CONFIG)); - aQuery.SetText(String(CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE))); + aQuery.SetText(CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE)); if(RET_YES == aQuery.Execute()) { OUString sDeleteScheme(m_pColorSchemeLB->GetSelectEntry()); diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index f30a69d6e44e..722a4834e0f2 100644 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -51,7 +51,7 @@ static long nStaticTabs[]= // static function ------------------------------------------------------- -static String getNormDicEntry_Impl(const OUString &rText) +static OUString getNormDicEntry_Impl(const OUString &rText) { OUString aTmp(comphelper::string::stripEnd(rText, '.')); return comphelper::string::remove(aTmp, '='); @@ -60,7 +60,7 @@ static String getNormDicEntry_Impl(const OUString &rText) // Compare Dictionary Entry result enum CDE_RESULT { CDE_EQUAL, CDE_SIMILAR, CDE_DIFFERENT }; -static CDE_RESULT cmpDicEntry_Impl( const String &rText1, const String &rText2 ) +static CDE_RESULT cmpDicEntry_Impl( const OUString &rText1, const OUString &rText2 ) { CDE_RESULT eRes = CDE_DIFFERENT; @@ -139,7 +139,7 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl) if (xDicList.is()) { lang::Locale aLocale( LanguageTag::convertToLocale(nLang) ); - String aURL( linguistic::GetWritableDictionaryURL( sDict ) ); + OUString aURL( linguistic::GetWritableDictionaryURL( sDict ) ); xNewDic = Reference< XDictionary > ( xDicList->createDictionary( sDict, aLocale, eType, aURL ) , UNO_QUERY ); xNewDic->setActive( sal_True ); @@ -151,7 +151,7 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl) xNewDic = NULL; // error: couldn't create new dictionary - SfxErrorContext aContext( ERRCTX_SVX_LINGU_DICTIONARY, String(), + SfxErrorContext aContext( ERRCTX_SVX_LINGU_DICTIONARY, OUString(), this, RID_SVXERRCTX, &CUI_MGR() ); ErrorHandler::HandleError( *new StringErrorInfo( ERRCODE_SVX_LINGU_DICT_NOTWRITEABLE, sDict ) ); @@ -202,7 +202,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxDictEdit(Window *pParent SvxEditDictionaryDialog::SvxEditDictionaryDialog( Window* pParent, - const String& rName, + const OUString& rName, Reference< XSpellChecker1 > &xSpl ) : ModalDialog( pParent, "EditDictionaryDialog" ,"cui/ui/editdictionarydialog.ui" ), @@ -259,15 +259,15 @@ SvxEditDictionaryDialog::SvxEditDictionaryDialog( const Reference< XDictionary > *pDic = aDics.getConstArray(); sal_Int32 nCount = aDics.getLength(); - String aLookUpEntry; + OUString aLookUpEntry; for ( sal_Int32 i = 0; i < nCount; ++i ) { Reference< XDictionary > xDic( pDic[i], UNO_QUERY ); if (xDic.is()) { bool bNegative = xDic->getDictionaryType() == DictionaryType_NEGATIVE; - String aDicName( xDic->getName() ); - const String aTxt( ::GetDicInfoStr( aDicName, + OUString aDicName( xDic->getName() ); + const OUString aTxt( ::GetDicInfoStr( aDicName, LanguageTag( xDic->getLocale() ).getLanguageType(), bNegative ) ); pAllDictsLB->InsertEntry( aTxt ); @@ -359,7 +359,7 @@ void SvxEditDictionaryDialog::SetLanguage_Impl( util::Language nLanguage ) pLangLB->SelectLanguage( nLanguage ); } -sal_uInt16 SvxEditDictionaryDialog::GetLBInsertPos(const String &rDicWord) +sal_uInt16 SvxEditDictionaryDialog::GetLBInsertPos(const OUString &rDicWord) { sal_uInt16 nPos = USHRT_MAX; @@ -370,7 +370,7 @@ sal_uInt16 SvxEditDictionaryDialog::GetLBInsertPos(const String &rDicWord) { SvTreeListEntry* pEntry = pWordsLB->GetEntry(j); DBG_ASSERT( pEntry, "NULL pointer"); - String aNormEntry( getNormDicEntry_Impl( rDicWord ) ); + OUString aNormEntry( getNormDicEntry_Impl( rDicWord ) ); StringCompare eCmpRes = (StringCompare)pCollator-> compareString( aNormEntry, getNormDicEntry_Impl( pWordsLB->GetEntryText(pEntry, 0) ) ); if( COMPARE_LESS == eCmpRes ) @@ -388,7 +388,7 @@ void SvxEditDictionaryDialog::RemoveDictEntry(SvTreeListEntry* pEntry) if ( pEntry != NULL && nLBPos != LISTBOX_ENTRY_NOTFOUND ) { - String sTmpShort(pWordsLB->GetEntryText(pEntry, 0)); + OUString sTmpShort(pWordsLB->GetEntryText(pEntry, 0)); Reference< XDictionary > xDic = aDics.getConstArray()[ nLBPos ]; if (xDic->remove( sTmpShort )) // sal_True on success @@ -435,8 +435,8 @@ IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectLangHdl_Impl) if ( nLang != nOldLang ) { QueryBox aBox( this, CUI_RES( RID_SFXQB_SET_LANGUAGE ) ); - String sTxt( aBox.GetMessText() ); - sTxt.SearchAndReplaceAscii( "%1", pAllDictsLB->GetSelectEntry() ); + OUString sTxt( aBox.GetMessText() ); + sTxt = sTxt.replaceFirst( "%1", pAllDictsLB->GetSelectEntry() ); aBox.SetMessText( sTxt ); if ( aBox.Execute() == RET_YES ) @@ -444,7 +444,7 @@ IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectLangHdl_Impl) xDic->setLocale( LanguageTag::convertToLocale( nLang ) ); bool bNegativ = xDic->getDictionaryType() == DictionaryType_NEGATIVE; - const String sName( + const OUString sName( ::GetDicInfoStr( xDic->getName(), LanguageTag( xDic->getLocale() ).getLanguageType(), bNegativ ) ); @@ -467,7 +467,7 @@ void SvxEditDictionaryDialog::ShowWords_Impl( sal_uInt16 nId ) nOld = nId; EnterWait(); - String aStr; + OUString aStr; pWordED->SetText(aStr); pReplaceED->SetText(aStr); @@ -511,12 +511,12 @@ void SvxEditDictionaryDialog::ShowWords_Impl( sal_uInt16 nId ) for (sal_Int32 i = 0; i < nCount; i++) { - aStr = String(pEntry[i]->getDictionaryWord()); + aStr = pEntry[i]->getDictionaryWord(); sal_uInt16 nPos = GetLBInsertPos( aStr ); if(pEntry[i]->isNegative()) { - aStr += '\t'; - aStr += String(pEntry[i]->getReplacementText()); + aStr += "\t"; + aStr += pEntry[i]->getReplacementText(); } pWordsLB->InsertEntry(aStr, 0, sal_False, nPos == USHRT_MAX ? LIST_APPEND : nPos); } @@ -566,7 +566,7 @@ IMPL_LINK(SvxEditDictionaryDialog, NewDelHdl, PushButton*, pBtn) if(pBtn == pDeletePB) { DBG_ASSERT(pEntry, "keine Eintrag selektiert"); - String aStr; + OUString aStr; pWordED->SetText(aStr); pReplaceED->SetText(aStr); @@ -660,14 +660,14 @@ IMPL_LINK(SvxEditDictionaryDialog, NewDelHdl, PushButton*, pBtn) IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt) { SvTreeListEntry* pFirstSel = pWordsLB->FirstSelected(); - String rEntry = pEdt->GetText(); + OUString rEntry = pEdt->GetText(); - xub_StrLen nWordLen=rEntry.Len(); - const String& rRepString = pReplaceED->GetText(); + sal_Int32 nWordLen = rEntry.getLength(); + const OUString& rRepString = pReplaceED->GetText(); sal_Bool bEnableNewReplace = sal_False; sal_Bool bEnableDelete = sal_False; - String aNewReplaceText = sNew; + OUString aNewReplaceText = sNew; if(pEdt == pWordED) { @@ -680,11 +680,11 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt) for(sal_uInt16 i = 0; i < pWordsLB->GetEntryCount(); i++) { SvTreeListEntry* pEntry = pWordsLB->GetEntry( i ); - String aTestStr( pWordsLB->GetEntryText(pEntry, 0) ); + OUString aTestStr( pWordsLB->GetEntryText(pEntry, 0) ); eCmpRes = cmpDicEntry_Impl( rEntry, aTestStr ); if(CDE_DIFFERENT != eCmpRes) { - if(rRepString.Len()) + if(!rRepString.isEmpty()) bFirstSelect = sal_True; bDoNothing=sal_True; pWordsLB->SetCurEntry(pEntry); @@ -700,7 +700,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt) bFound= sal_True; break; } - else if(getNormDicEntry_Impl(aTestStr).Search( + else if(getNormDicEntry_Impl(aTestStr).indexOf( getNormDicEntry_Impl( rEntry ) ) == 0 && !bTmpSelEntry) { @@ -734,12 +734,12 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt) } else if(pEdt == pReplaceED) { - String aReplaceText; - String aWordText; + OUString aReplaceText; + OUString aWordText; if (pFirstSel) // a pWordsLB entry is selected { aWordText = pWordsLB->GetEntryText( pFirstSel, 0 ); - aReplaceText = pWordsLB->GetEntryText( pFirstSel, 1 ); + aReplaceText = pWordsLB->GetEntryText( pFirstSel, 1 ); aNewReplaceText = sModify; bEnableDelete = sal_True; diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx index 653448c88afd..dc5440e79ac4 100644 --- a/cui/source/options/optfltr.cxx +++ b/cui/source/options/optfltr.cxx @@ -149,8 +149,7 @@ OfaMSFilterTabPage2::OfaMSFilterTabPage2( Window* pParent, const SfxItemSet& rSe static long aStaticTabs[] = { 3, 0, 20, 40 }; m_pCheckLB->SvSimpleTable::SetTabs( aStaticTabs ); - String sHeader( sHeader1 ); - (( sHeader += '\t' ) += sHeader2 ) += '\t'; + OUString sHeader = sHeader1 + "\t" + sHeader2 + "\t"; m_pCheckLB->InsertHeaderEntry( sHeader, HEADERBAR_APPEND, HIB_CENTER | HIB_VCENTER | HIB_FIXEDPOS | HIB_FIXED ); diff --git a/cui/source/options/optfltr.hxx b/cui/source/options/optfltr.hxx index a8a70130c660..5d2bc064f841 100644 --- a/cui/source/options/optfltr.hxx +++ b/cui/source/options/optfltr.hxx @@ -75,8 +75,8 @@ class OfaMSFilterTabPage2 : public SfxTabPage SvSimpleTableContainer* m_pCheckLBContainer; MSFltrSimpleTable* m_pCheckLB; - String sHeader1, sHeader2; - String sChgToFromMath, + OUString sHeader1, sHeader2; + OUString sChgToFromMath, sChgToFromWriter, sChgToFromCalc, sChgToFromImpress; diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx index 7651a1e8db58..a034c26f1b7a 100644 --- a/cui/source/options/opthtml.cxx +++ b/cui/source/options/opthtml.cxx @@ -64,16 +64,16 @@ SfxTabPage( pParent, "OptHtmlPage" , "cui/ui/opthtmlpage.ui", rSet ) aCharSetLB->SetStyle(aCharSetLB->GetStyle() | WB_SORT); // replace placeholder with UI string from language list - String aText( aNumbersEnglishUSCB->GetText()); - String aPlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%ENGLISHUSLOCALE")); - xub_StrLen nPos; - if ((nPos = aText.Search( aPlaceholder)) != STRING_NOTFOUND) + OUString aText( aNumbersEnglishUSCB->GetText()); + OUString aPlaceholder("%ENGLISHUSLOCALE"); + sal_Int32 nPos; + if ((nPos = aText.indexOf( aPlaceholder)) != -1) { SvtLanguageTable aLangTab; - const String& rStr = aLangTab.GetString( LANGUAGE_ENGLISH_US); - if (rStr.Len()) + const OUString& rStr = aLangTab.GetString( LANGUAGE_ENGLISH_US); + if (!rStr.isEmpty()) { - aText.Replace( nPos, aPlaceholder.Len(), rStr); + aText = aText.replaceAt( nPos, aPlaceholder.getLength(), rStr); aNumbersEnglishUSCB->SetText( aText); } } diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index 0396de23ae7e..e1dca0dd95bf 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -238,9 +238,9 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, SelectHdl_Impl) // set installation directory info SvTreeListEntry* pEntry = m_pJavaList->FirstSelected(); DBG_ASSERT( pEntry, "SvxJavaOptionsPage::SelectHdl_Impl(): no entry" ); - String* pLocation = static_cast< String* >( pEntry->GetUserData() ); + OUString* pLocation = static_cast< OUString* >( pEntry->GetUserData() ); DBG_ASSERT( pLocation, "invalid location string" ); - String sInfo = m_sInstallText; + OUString sInfo = m_sInstallText; if ( pLocation ) sInfo += *pLocation; m_pJavaPathText->SetText(sInfo); @@ -256,7 +256,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, AddHdl_Impl) Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); xFolderPicker = FolderPicker::create(xContext); - String sWorkFolder = SvtPathOptions().GetWorkPath(); + OUString sWorkFolder = SvtPathOptions().GetWorkPath(); xFolderPicker->setDisplayDirectory( sWorkFolder ); xFolderPicker->setDescription( m_sAddDialogText ); @@ -328,7 +328,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ParameterHdl_Impl) IMPL_LINK_NOARG(SvxJavaOptionsPage, ClassPathHdl_Impl) { #if HAVE_FEATURE_JAVA - String sClassPath; + OUString sClassPath; if ( !m_pPathDlg ) { @@ -336,7 +336,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ClassPathHdl_Impl) javaFrameworkError eErr = jfw_getUserClassPath( &m_pClassPath ); if ( JFW_E_NONE == eErr && m_pClassPath ) { - sClassPath = String( OUString( m_pClassPath ) ); + sClassPath = m_pClassPath; m_pPathDlg->SetClassPath( sClassPath ); } } @@ -437,7 +437,7 @@ void SvxJavaOptionsPage::ClearJavaList() SvTreeListEntry* pEntry = m_pJavaList->First(); while ( pEntry ) { - String* pLocation = static_cast< String* >( pEntry->GetUserData() ); + OUString* pLocation = static_cast< OUString* >( pEntry->GetUserData() ); delete pLocation; pEntry = m_pJavaList->Next( pEntry ); } @@ -505,7 +505,7 @@ void SvxJavaOptionsPage::AddJRE( JavaInfo* _pInfo ) sEntry.append(m_sAccessibilityText); SvTreeListEntry* pEntry = m_pJavaList->InsertEntry(sEntry.makeStringAndClear()); INetURLObject aLocObj( OUString( _pInfo->sLocation ) ); - String* pLocation = new String( aLocObj.getFSysPath( INetURLObject::FSYS_DETECT ) ); + OUString* pLocation = new OUString( aLocObj.getFSysPath( INetURLObject::FSYS_DETECT ) ); pEntry->SetUserData( pLocation ); #else (void)_pInfo; @@ -658,7 +658,7 @@ sal_Bool SvxJavaOptionsPage::FillItemSet( SfxItemSet& /*rCoreSet*/ ) if ( m_pPathDlg ) { OUString sPath( m_pPathDlg->GetClassPath() ); - if ( m_pPathDlg->GetOldPath() != String( sPath ) ) + if ( m_pPathDlg->GetOldPath() != sPath ) { eErr = jfw_setUserClassPath( sPath.pData ); DBG_ASSERT( JFW_E_NONE == eErr, @@ -756,7 +756,7 @@ void SvxJavaOptionsPage::Reset( const SfxItemSet& /*rSet*/ ) void SvxJavaOptionsPage::FillUserData() { - String aUserData; + OUString aUserData; SetUserData( aUserData ); } @@ -811,7 +811,7 @@ IMPL_LINK_NOARG(SvxJavaParameterDlg, AssignHdl_Impl) if ( LISTBOX_ENTRY_NOTFOUND == nPos ) nPos = m_pAssignedList->InsertEntry( sParam ); m_pAssignedList->SelectEntryPos( nPos ); - m_pParameterEdit->SetText( String() ); + m_pParameterEdit->SetText( OUString() ); ModifyHdl_Impl( m_pParameterEdit ); EnableRemoveButton(); } @@ -888,7 +888,7 @@ void SvxJavaParameterDlg::SetParameters( Sequence< OUString >& rParams ) const OUString* pArray = rParams.getConstArray(); for ( i = 0; i < nCount; ++i ) { - String sParam = String( *pArray++ ); + OUString sParam = OUString( *pArray++ ); m_pAssignedList->InsertEntry( sParam ); } } @@ -920,7 +920,7 @@ SvxJavaClassPathDlg::~SvxJavaClassPathDlg() { sal_uInt16 i, nCount = m_pPathList->GetEntryCount(); for ( i = 0; i < nCount; ++i ) - delete static_cast< String* >( m_pPathList->GetEntryData(i) ); + delete static_cast< OUString* >( m_pPathList->GetEntryData(i) ); } // ----------------------------------------------------------------------- @@ -930,7 +930,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl) sfx2::FileDialogHelper aDlg( TemplateDescription::FILEOPEN_SIMPLE, 0 ); aDlg.SetTitle( CUI_RES( RID_SVXSTR_ARCHIVE_TITLE ) ); aDlg.AddFilter( CUI_RES( RID_SVXSTR_ARCHIVE_HEADLINE ), OUString("*.jar;*.zip") ); - String sFolder; + OUString sFolder; if ( m_pPathList->GetSelectEntryCount() > 0 ) { INetURLObject aObj( m_pPathList->GetSelectEntry(), INetURLObject::FSYS_DETECT ); @@ -941,9 +941,9 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl) aDlg.SetDisplayDirectory( sFolder ); if ( aDlg.Execute() == ERRCODE_NONE ) { - String sURL = aDlg.GetPath(); + OUString sURL = aDlg.GetPath(); INetURLObject aURL( sURL ); - String sFile = aURL.getFSysPath( INetURLObject::FSYS_DETECT ); + OUString sFile = aURL.getFSysPath( INetURLObject::FSYS_DETECT ); if ( !IsPathDuplicate( sURL ) ) { sal_uInt16 nPos = m_pPathList->InsertEntry( sFile, SvFileInformationManager::GetImage( aURL, false ) ); @@ -951,8 +951,8 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl) } else { - String sMsg( CUI_RES( RID_SVXSTR_MULTIFILE_DBL_ERR ) ); - sMsg.SearchAndReplaceAscii( "%1", sFile ); + OUString sMsg( CUI_RES( RID_SVXSTR_MULTIFILE_DBL_ERR ) ); + sMsg = sMsg.replaceFirst( "%1", sFile ); ErrorBox( this, WB_OK, sMsg ).Execute(); } } @@ -967,7 +967,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddPathHdl_Impl) Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); Reference < XFolderPicker2 > xFolderPicker = FolderPicker::create(xContext);; - String sOldFolder; + OUString sOldFolder; if ( m_pPathList->GetSelectEntryCount() > 0 ) { INetURLObject aObj( m_pPathList->GetSelectEntry(), INetURLObject::FSYS_DETECT ); @@ -978,9 +978,9 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddPathHdl_Impl) xFolderPicker->setDisplayDirectory( sOldFolder ); if ( xFolderPicker->execute() == ExecutableDialogResults::OK ) { - String sFolderURL( xFolderPicker->getDirectory() ); + OUString sFolderURL( xFolderPicker->getDirectory() ); INetURLObject aURL( sFolderURL ); - String sNewFolder = aURL.getFSysPath( INetURLObject::FSYS_DETECT ); + OUString sNewFolder = aURL.getFSysPath( INetURLObject::FSYS_DETECT ); if ( !IsPathDuplicate( sFolderURL ) ) { sal_uInt16 nPos = m_pPathList->InsertEntry( sNewFolder, SvFileInformationManager::GetImage( aURL, false ) ); @@ -988,8 +988,8 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddPathHdl_Impl) } else { - String sMsg( CUI_RES( RID_SVXSTR_MULTIFILE_DBL_ERR ) ); - sMsg.SearchAndReplaceAscii( "%1", sNewFolder ); + OUString sMsg( CUI_RES( RID_SVXSTR_MULTIFILE_DBL_ERR ) ); + sMsg = sMsg.replaceFirst( "%1", sNewFolder ); ErrorBox( this, WB_OK, sMsg ).Execute(); } } @@ -1028,7 +1028,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, SelectHdl_Impl) // ----------------------------------------------------------------------- -bool SvxJavaClassPathDlg::IsPathDuplicate( const String& _rPath ) +bool SvxJavaClassPathDlg::IsPathDuplicate( const OUString& _rPath ) { bool bRet = false; INetURLObject aFileObj( _rPath ); @@ -1048,15 +1048,15 @@ bool SvxJavaClassPathDlg::IsPathDuplicate( const String& _rPath ) // ----------------------------------------------------------------------- -String SvxJavaClassPathDlg::GetClassPath() const +OUString SvxJavaClassPathDlg::GetClassPath() const { - String sPath; + OUString sPath; sal_uInt16 nCount = m_pPathList->GetEntryCount(); for ( sal_uInt16 i = 0; i < nCount; ++i ) { - if ( sPath.Len() > 0 ) - sPath += CLASSPATH_DELIMITER; - String* pFullPath = static_cast< String* >( m_pPathList->GetEntryData(i) ); + if ( !sPath.isEmpty() ) + sPath += OUString(CLASSPATH_DELIMITER); + OUString* pFullPath = static_cast< OUString* >( m_pPathList->GetEntryData(i) ); if ( pFullPath ) sPath += *pFullPath; else @@ -1067,9 +1067,9 @@ String SvxJavaClassPathDlg::GetClassPath() const // ----------------------------------------------------------------------- -void SvxJavaClassPathDlg::SetClassPath( const String& _rPath ) +void SvxJavaClassPathDlg::SetClassPath( const OUString& _rPath ) { - if ( m_sOldPath.Len() == 0 ) + if ( m_sOldPath.isEmpty() ) m_sOldPath = _rPath; m_pPathList->Clear(); xub_StrLen i; @@ -1077,9 +1077,9 @@ void SvxJavaClassPathDlg::SetClassPath( const String& _rPath ) xub_StrLen nCount = comphelper::string::getTokenCount(_rPath, CLASSPATH_DELIMITER); for ( i = 0; i < nCount; ++i ) { - String sToken = _rPath.GetToken( 0, CLASSPATH_DELIMITER, nIdx ); + OUString sToken = _rPath.getToken( 0, CLASSPATH_DELIMITER, nIdx ); INetURLObject aURL( sToken, INetURLObject::FSYS_DETECT ); - String sPath = aURL.getFSysPath( INetURLObject::FSYS_DETECT ); + OUString sPath = aURL.getFSysPath( INetURLObject::FSYS_DETECT ); m_pPathList->InsertEntry( sPath, SvFileInformationManager::GetImage( aURL, false ) ); } // select first entry diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx index a2724d7a2e9d..bb8debe1ad1f 100644 --- a/cui/source/options/optjava.hxx +++ b/cui/source/options/optjava.hxx @@ -68,9 +68,9 @@ private: sal_Int32 m_nInfoSize; sal_Int32 m_nParamSize; #endif - String m_sInstallText; - String m_sAccessibilityText; - String m_sAddDialogText; + OUString m_sInstallText; + OUString m_sAccessibilityText; + OUString m_sAddDialogText; Timer m_aResetTimer; CheckBox* m_pExperimentalCB; @@ -154,14 +154,14 @@ private: PushButton* m_pAddPathBtn; PushButton* m_pRemoveBtn; - String m_sOldPath; + OUString m_sOldPath; DECL_LINK(AddArchiveHdl_Impl, void *); DECL_LINK(AddPathHdl_Impl, void *); DECL_LINK(RemoveHdl_Impl, void *); DECL_LINK(SelectHdl_Impl, void *); - bool IsPathDuplicate( const String& _rPath ); + bool IsPathDuplicate( const OUString& _rPath ); inline void EnableRemoveButton() { m_pRemoveBtn->Enable( m_pPathList->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND ); } @@ -170,11 +170,11 @@ public: SvxJavaClassPathDlg( Window* pParent ); ~SvxJavaClassPathDlg(); - inline const String& GetOldPath() const { return m_sOldPath; } + inline const OUString& GetOldPath() const { return m_sOldPath; } inline void SetFocus() { m_pPathList->GrabFocus(); } - String GetClassPath() const; - void SetClassPath( const String& _rPath ); + OUString GetClassPath() const; + void SetClassPath( const OUString& _rPath ); }; #endif // #ifndef _SVX_OPTJAVA_HXX diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 84c2e77cecdf..8bbda6a2a8ea 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -158,7 +158,7 @@ static sal_uInt16 pRanges[] = 0 }; -sal_Bool KillFile_Impl( const String& rURL ) +sal_Bool KillFile_Impl( const OUString& rURL ) { sal_Bool bRet = sal_True; try @@ -197,10 +197,10 @@ class ModuleUserData_Impl sal_Bool bIsChecked; sal_uInt8 nType; sal_uInt8 nIndex; - String sImplName; + OUString sImplName; public: - ModuleUserData_Impl( String sImpName, sal_Bool bIsParent, sal_Bool bChecked, sal_uInt8 nSetType, sal_uInt8 nSetIndex ) : + ModuleUserData_Impl( OUString sImpName, sal_Bool bIsParent, sal_Bool bChecked, sal_uInt8 nSetType, sal_uInt8 nSetIndex ) : bParent(bIsParent), bIsChecked(bChecked), nType(nSetType), @@ -213,7 +213,7 @@ public: sal_Bool IsChecked() const {return bIsChecked;} sal_uInt8 GetIndex() const {return nIndex;} void SetIndex(sal_uInt8 nSet) {nIndex = nSet;} - const String& GetImplName() const {return sImplName;} + const OUString& GetImplName() const {return sImplName;} }; @@ -280,7 +280,7 @@ class BrwStringDic_Impl : public SvLBoxString public: BrwStringDic_Impl( SvTreeListEntry* pEntry, sal_uInt16 nFlags, - const String& rStr ) : SvLBoxString( pEntry, nFlags, rStr ) {} + const OUString& rStr ) : SvLBoxString( pEntry, nFlags, rStr ) {} virtual void Paint( const Point& rPos, SvTreeListBox& rOutDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry); @@ -460,7 +460,7 @@ class BrwString_Impl : public SvLBoxString public: BrwString_Impl( SvTreeListEntry* pEntry, sal_uInt16 nFlags, - const String& rStr ) : SvLBoxString( pEntry, nFlags, rStr ) {} + const OUString& rStr ) : SvLBoxString( pEntry, nFlags, rStr ) {} virtual void Paint( const Point& rPos, SvTreeListBox& rOutDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry); @@ -1113,16 +1113,16 @@ SvxLinguTabPage::SvxLinguTabPage( Window* pParent, const SfxItemSet& rSet ) : if ( SvtExtendedSecurityOptions().GetOpenHyperlinkMode() != SvtExtendedSecurityOptions::OPEN_NEVER ) { - m_pMoreDictsLink->SetURL( String( + m_pMoreDictsLink->SetURL( OUString( "http://extensions.libreoffice.org/dictionaries/" ) ); m_pMoreDictsLink->SetClickHdl( LINK( this, SvxLinguTabPage, OpenURLHdl_Impl ) ); } else m_pMoreDictsLink->Hide(); - String sAccessibleNameModuleEdit(CUI_RES(RID_SVXSTR_LINGU_MODULES_EDIT)); - String sAccessibleNameDicsEdit (CUI_RES(RID_SVXSTR_LINGU_DICS_EDIT_DIC)); - String sAccessibleNameOptionEdit(CUI_RES(RID_SVXSTR_LINGU_OPTIONS_EDIT)); + OUString sAccessibleNameModuleEdit(CUI_RES(RID_SVXSTR_LINGU_MODULES_EDIT)); + OUString sAccessibleNameDicsEdit (CUI_RES(RID_SVXSTR_LINGU_DICS_EDIT_DIC)); + OUString sAccessibleNameOptionEdit(CUI_RES(RID_SVXSTR_LINGU_OPTIONS_EDIT)); m_pLinguModulesEditPB->SetAccessibleName(sAccessibleNameModuleEdit); m_pLinguDicsEditPB->SetAccessibleName(sAccessibleNameDicsEdit); @@ -1284,7 +1284,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) if (bChecked) { - String aDicName( xDic->getName() ); + OUString aDicName( xDic->getName() ); pActiveDic[ nActiveDics++ ] = aDicName; } } @@ -1305,7 +1305,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) SvTreeListEntry *pEntry = m_pLinguOptionsCLB->GetEntry( j ); OptionsUserData aData( (sal_uLong)pEntry->GetUserData() ); - String aPropName( lcl_GetPropertyName( (EID_OPTIONS) aData.GetEntryId() ) ); + OUString aPropName( lcl_GetPropertyName( (EID_OPTIONS) aData.GetEntryId() ) ); Any aAny; if (aData.IsCheckable()) @@ -1382,7 +1382,7 @@ void SvxLinguTabPage::AddDicBoxEntry( { m_pLinguDicsCLB->SetUpdateMode(sal_False); - String aTxt( ::GetDicInfoStr( rxDic->getName(), + OUString aTxt( ::GetDicInfoStr( rxDic->getName(), LanguageTag( rxDic->getLocale() ).getLanguageType(), DictionaryType_NEGATIVE == rxDic->getDictionaryType() ) ); m_pLinguDicsCLB->InsertEntry( aTxt, (sal_uInt16)LISTBOX_APPEND ); // append at end @@ -1734,7 +1734,7 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) uno::Reference< frame::XStorable > xStor( xDic, UNO_QUERY ); if ( xStor->hasLocation() && !xStor->isReadonly() ) { - String sURL = xStor->getLocation(); + OUString sURL = xStor->getLocation(); INetURLObject aObj(sURL); DBG_ASSERT( aObj.GetProtocol() == INET_PROT_FILE, "non-file URLs cannot be deleted" ); @@ -1840,14 +1840,14 @@ IMPL_LINK( SvxLinguTabPage, SelectHdl_Impl, SvxCheckListBox *, pBox ) // ----------------------------------------------------------------------- -SvTreeListEntry* SvxLinguTabPage::CreateEntry( String& rTxt, sal_uInt16 nCol ) +SvTreeListEntry* SvxLinguTabPage::CreateEntry( OUString& rTxt, sal_uInt16 nCol ) { SvTreeListEntry* pEntry = new SvTreeListEntry; if( !pCheckButtonData ) pCheckButtonData = new SvLBoxButtonData(m_pLinguOptionsCLB); - String sEmpty; + OUString sEmpty; if (CBCOL_FIRST == nCol) pEntry->AddItem( new SvLBoxButton( pEntry, SvLBoxButtonKind_enabledCheckbox, 0, pCheckButtonData ) ); if (CBCOL_SECOND == nCol) @@ -1917,7 +1917,7 @@ SvxEditModulesDlg::SvxEditModulesDlg(Window* pParent, SvxLinguData_Impl& rData) if ( SvtExtendedSecurityOptions().GetOpenHyperlinkMode() != SvtExtendedSecurityOptions::OPEN_NEVER ) { - aMoreDictsLink.SetURL( String( + aMoreDictsLink.SetURL( OUString( "http://extensions.libreoffice.org/dictionaries/" ) ); aMoreDictsLink.SetClickHdl( LINK( this, SvxEditModulesDlg, OpenURLHdl_Impl ) ); } @@ -1964,7 +1964,7 @@ SvxEditModulesDlg::~SvxEditModulesDlg() } -SvTreeListEntry* SvxEditModulesDlg::CreateEntry( String& rTxt, sal_uInt16 nCol ) +SvTreeListEntry* SvxEditModulesDlg::CreateEntry( OUString& rTxt, sal_uInt16 nCol ) { SvTreeListEntry* pEntry = new SvTreeListEntry; if( !pCheckButtonData ) @@ -1973,7 +1973,7 @@ SvTreeListEntry* SvxEditModulesDlg::CreateEntry( String& rTxt, sal_uInt16 nCol ) pCheckButtonData->SetLink( aModulesCLB.GetCheckButtonHdl() ); } - String sEmpty; + OUString sEmpty; if (CBCOL_FIRST == nCol) pEntry->AddItem( new SvLBoxButton( pEntry, SvLBoxButtonKind_enabledCheckbox, 0, pCheckButtonData ) ); if (CBCOL_SECOND == nCol) @@ -2129,7 +2129,7 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) // SvTreeListEntry* pEntry = CreateEntry( sSpell, CBCOL_SECOND ); ModuleUserData_Impl* pUserData = new ModuleUserData_Impl( - String(), sal_True, sal_False, TYPE_SPELL, 0 ); + OUString(), sal_True, sal_False, TYPE_SPELL, 0 ); pEntry->SetUserData( (void *)pUserData ); pModel->Insert( pEntry ); @@ -2151,7 +2151,7 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) } if (!aImplName.isEmpty() && bIsSuppLang) { - String aTxt( pInfo->sDisplayName ); + OUString aTxt( pInfo->sDisplayName ); SvTreeListEntry* pNewEntry = CreateEntry( aTxt, CBCOL_FIRST ); LangImplNameTable &rTable = rLinguData.GetSpellTable(); @@ -2173,7 +2173,7 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) // grammar checker entries // pEntry = CreateEntry( sGrammar, CBCOL_SECOND ); - pUserData = new ModuleUserData_Impl( String(), sal_True, sal_False, TYPE_GRAMMAR, 0 ); + pUserData = new ModuleUserData_Impl( OUString(), sal_True, sal_False, TYPE_GRAMMAR, 0 ); pEntry->SetUserData( (void *)pUserData ); pModel->Insert( pEntry ); @@ -2195,7 +2195,7 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) } if (!aImplName.isEmpty() && bIsSuppLang) { - String aTxt( pInfo->sDisplayName ); + OUString aTxt( pInfo->sDisplayName ); SvTreeListEntry* pNewEntry = CreateEntry( aTxt, CBCOL_FIRST ); LangImplNameTable &rTable = rLinguData.GetGrammarTable(); @@ -2217,7 +2217,7 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) // hyphenator entries // pEntry = CreateEntry( sHyph, CBCOL_SECOND ); - pUserData = new ModuleUserData_Impl( String(), sal_True, sal_False, TYPE_HYPH, 0 ); + pUserData = new ModuleUserData_Impl( OUString(), sal_True, sal_False, TYPE_HYPH, 0 ); pEntry->SetUserData( (void *)pUserData ); pModel->Insert( pEntry ); @@ -2239,7 +2239,7 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) } if (!aImplName.isEmpty() && bIsSuppLang) { - String aTxt( pInfo->sDisplayName ); + OUString aTxt( pInfo->sDisplayName ); SvTreeListEntry* pNewEntry = CreateEntry( aTxt, CBCOL_FIRST ); LangImplNameTable &rTable = rLinguData.GetHyphTable(); @@ -2261,7 +2261,7 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) // thesaurus entries // pEntry = CreateEntry( sThes, CBCOL_SECOND ); - pUserData = new ModuleUserData_Impl( String(), sal_True, sal_False, TYPE_THES, 0 ); + pUserData = new ModuleUserData_Impl( OUString(), sal_True, sal_False, TYPE_THES, 0 ); pEntry->SetUserData( (void *)pUserData ); pModel->Insert( pEntry ); @@ -2283,7 +2283,7 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) } if (!aImplName.isEmpty() && bIsSuppLang) { - String aTxt( pInfo->sDisplayName ); + OUString aTxt( pInfo->sDisplayName ); SvTreeListEntry* pNewEntry = CreateEntry( aTxt, CBCOL_FIRST ); LangImplNameTable &rTable = rLinguData.GetThesTable(); @@ -2317,7 +2317,7 @@ IMPL_LINK( SvxEditModulesDlg, UpDownHdl_Impl, PushButton *, pBtn ) SvTreeList *pModel = aModulesCLB.GetModel(); ModuleUserData_Impl* pData = (ModuleUserData_Impl*)pEntry->GetUserData(); - String aStr(aModulesCLB.GetEntryText(pEntry)); + OUString aStr(aModulesCLB.GetEntryText(pEntry)); SvTreeListEntry* pToInsert = CreateEntry( aStr, CBCOL_FIRST ); pToInsert->SetUserData( (void *)pData); sal_Bool bIsChecked = aModulesCLB.IsChecked(nCurPos); diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index e0b5b08acfee..f33dde62c335 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -90,10 +90,10 @@ struct OptPath_Impl struct PathUserData_Impl { - sal_uInt16 nRealId; + sal_uInt16 nRealId; SfxItemState eState; - String sUserPath; - String sWritablePath; + OUString sUserPath; + OUString sWritablePath; PathUserData_Impl( sal_uInt16 nId ) : nRealId( nId ), eState( SFX_ITEM_UNKNOWN ) {} @@ -122,9 +122,9 @@ static Handle2CfgNameMapping_Impl const Hdl2CfgMap_Impl[] = { USHRT_MAX, NULL } }; -static String getCfgName_Impl( sal_uInt16 _nHandle ) +static OUString getCfgName_Impl( sal_uInt16 _nHandle ) { - String sCfgName; + OUString sCfgName; sal_uInt16 nIndex = 0; while ( Hdl2CfgMap_Impl[ nIndex ].m_nHandle != USHRT_MAX ) { @@ -142,21 +142,21 @@ static String getCfgName_Impl( sal_uInt16 _nHandle ) #define MULTIPATH_DELIMITER ';' -String Convert_Impl( const String& rValue ) +OUString Convert_Impl( const OUString& rValue ) { char cDelim = MULTIPATH_DELIMITER; sal_uInt16 nCount = comphelper::string::getTokenCount(rValue, cDelim); - String aReturn; + OUString aReturn; for ( sal_uInt16 i=0; i<nCount ; ++i ) { - String aValue = rValue.GetToken( i, cDelim ); + OUString aValue = rValue.getToken( i, cDelim ); INetURLObject aObj( aValue ); if ( aObj.GetProtocol() == INET_PROT_FILE ) - aReturn += String(aObj.PathToFileName()); + aReturn += aObj.PathToFileName(); else if ( ::utl::LocalFileHelper::IsFileContent( aValue ) ) - aReturn += String(aObj.GetURLPath( INetURLObject::DECODE_WITH_CHARSET )); + aReturn += aObj.GetURLPath( INetURLObject::DECODE_WITH_CHARSET ); if ( i+1 < nCount) - aReturn += MULTIPATH_DELIMITER; + aReturn += OUString(MULTIPATH_DELIMITER); } return aReturn; @@ -308,17 +308,17 @@ void SvxPathTabPage::Reset( const SfxItemSet& ) #endif case SvtPathOptions::PATH_WORK: { - String aStr( CUI_RES( RID_SVXSTR_PATH_NAME_START + i ) ); + OUString aStr( CUI_RES( RID_SVXSTR_PATH_NAME_START + i ) ); nWidth1 = std::max(nWidth1, pPathBox->GetTextWidth(aStr)); - aStr += '\t'; - String sInternal, sUser, sWritable; + aStr += "\t"; + OUString sInternal, sUser, sWritable; sal_Bool bReadOnly = sal_False; GetPathList( i, sInternal, sUser, sWritable, bReadOnly ); - String sTmpPath = sUser; - if ( sTmpPath.Len() > 0 && sWritable.Len() > 0 ) - sTmpPath += MULTIPATH_DELIMITER; + OUString sTmpPath = sUser; + if ( !sTmpPath.isEmpty() && !sWritable.isEmpty() ) + sTmpPath += OUString(MULTIPATH_DELIMITER); sTmpPath += sWritable; - String aValue( sTmpPath ); + OUString aValue( sTmpPath ); aValue = Convert_Impl( aValue ); nWidth2 = std::max(nWidth2, pPathBox->GetTextWidth(aValue)); aStr += aValue; @@ -376,10 +376,10 @@ void SvxPathTabPage::FillUserData() { HeaderBar &rBar = pPathBox->GetTheHeaderBar(); - String aUserData = OUString::number( rBar.GetItemSize( ITEMID_TYPE ) ) + ";"; + OUString aUserData = OUString::number( rBar.GetItemSize( ITEMID_TYPE ) ) + ";"; HeaderBarItemBits nBits = rBar.GetItemBits( ITEMID_TYPE ); sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); - aUserData += bUp ? '1' : '0'; + aUserData += bUp ? OUString("1") : OUString("0"); SetUserData( aUserData ); } @@ -414,11 +414,11 @@ IMPL_LINK_NOARG(SvxPathTabPage, StandardHdl_Impl) while ( pEntry ) { PathUserData_Impl* pPathImpl = (PathUserData_Impl*)pEntry->GetUserData(); - String aOldPath = pImpl->m_aDefOpt.GetDefaultPath( pPathImpl->nRealId ); + OUString aOldPath = pImpl->m_aDefOpt.GetDefaultPath( pPathImpl->nRealId ); - if ( aOldPath.Len() ) + if ( !aOldPath.isEmpty() ) { - String sInternal, sUser, sWritable, sTemp; + OUString sInternal, sUser, sWritable, sTemp; sal_Bool bReadOnly = sal_False; GetPathList( pPathImpl->nRealId, sInternal, sUser, sWritable, bReadOnly ); @@ -428,29 +428,29 @@ IMPL_LINK_NOARG(SvxPathTabPage, StandardHdl_Impl) for ( i = 0; i < nOldCount; ++i ) { bool bFound = false; - String sOnePath = aOldPath.GetToken( i, MULTIPATH_DELIMITER ); + OUString sOnePath = aOldPath.getToken( i, MULTIPATH_DELIMITER ); for ( sal_uInt16 j = 0; !bFound && j < nIntCount; ++j ) { - if ( sInternal.GetToken( i, MULTIPATH_DELIMITER ) == sOnePath ) + if ( sInternal.getToken( i, MULTIPATH_DELIMITER ) == sOnePath ) bFound = true; } if ( !bFound ) { - if ( sTemp.Len() > 0 ) - sTemp += MULTIPATH_DELIMITER; + if ( !sTemp.isEmpty() ) + sTemp += OUString(MULTIPATH_DELIMITER); sTemp += sOnePath; } } - String sUserPath, sWritablePath; + OUString sUserPath, sWritablePath; nOldCount = comphelper::string::getTokenCount(sTemp, MULTIPATH_DELIMITER); for ( i = 0; nOldCount > 0 && i < nOldCount - 1; ++i ) { - if ( sUserPath.Len() > 0 ) - sUserPath += MULTIPATH_DELIMITER; - sUserPath += sTemp.GetToken( i, MULTIPATH_DELIMITER ); + if ( !sUserPath.isEmpty() ) + sUserPath += OUString(MULTIPATH_DELIMITER); + sUserPath += sTemp.getToken( i, MULTIPATH_DELIMITER ); } - sWritablePath = sTemp.GetToken( nOldCount - 1, MULTIPATH_DELIMITER ); + sWritablePath = sTemp.getToken( nOldCount - 1, MULTIPATH_DELIMITER ); pPathBox->SetEntryText( Convert_Impl( sTemp ), pEntry, 1 ); pPathImpl->eState = SFX_ITEM_SET; @@ -464,7 +464,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, StandardHdl_Impl) // ----------------------------------------------------------------------- -void SvxPathTabPage::ChangeCurrentEntry( const String& _rFolder ) +void SvxPathTabPage::ChangeCurrentEntry( const OUString& _rFolder ) { SvTreeListEntry* pEntry = pPathBox->GetCurEntry(); if ( !pEntry ) @@ -473,7 +473,7 @@ void SvxPathTabPage::ChangeCurrentEntry( const String& _rFolder ) return; } - String sInternal, sUser, sWritable; + OUString sInternal, sUser, sWritable; PathUserData_Impl* pPathImpl = (PathUserData_Impl*)pEntry->GetUserData(); sal_Bool bReadOnly = sal_False; GetPathList( pPathImpl->nRealId, sInternal, sUser, sWritable, bReadOnly ); @@ -533,7 +533,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl) { SvTreeListEntry* pEntry = pPathBox->GetCurEntry(); sal_uInt16 nPos = ( pEntry != NULL ) ? ( (PathUserData_Impl*)pEntry->GetUserData() )->nRealId : 0; - String sInternal, sUser, sWritable; + OUString sInternal, sUser, sWritable; if ( pEntry ) { PathUserData_Impl* pPathImpl = (PathUserData_Impl*)pEntry->GetUserData(); @@ -556,23 +556,23 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl) DBG_ASSERT( pMultiDlg, "Dialogdiet fail!" ); pMultiDlg->EnableRadioButtonMode(); - String sPath( sUser ); - if ( sPath.Len() > 0 ) - sPath += MULTIPATH_DELIMITER; + OUString sPath( sUser ); + if ( !sPath.isEmpty() ) + sPath += OUString(MULTIPATH_DELIMITER); sPath += sWritable; pMultiDlg->SetPath( sPath ); - String sPathName = pPathBox->GetEntryText( pEntry, 0 ); - String sNewTitle( pImpl->m_sMultiPathDlg ); - sNewTitle.SearchAndReplace( VAR_ONE, sPathName ); + OUString sPathName = pPathBox->GetEntryText( pEntry, 0 ); + OUString sNewTitle( pImpl->m_sMultiPathDlg ); + sNewTitle = sNewTitle.replaceFirst( VAR_ONE, sPathName ); pMultiDlg->SetTitle( sNewTitle ); if ( pMultiDlg->Execute() == RET_OK && pEntry ) { - sUser.Erase(); - sWritable.Erase(); - String sFullPath; - String sNewPath = pMultiDlg->GetPath(); + sUser = ""; + sWritable = ""; + OUString sFullPath; + OUString sNewPath = pMultiDlg->GetPath(); char cDelim = MULTIPATH_DELIMITER; sal_uInt16 nCount = comphelper::string::getTokenCount(sNewPath, cDelim); if ( nCount > 0 ) @@ -580,16 +580,16 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl) sal_uInt16 i = 0; for ( ; i < nCount - 1; ++i ) { - if ( sUser.Len() > 0 ) - sUser += cDelim; - sUser += sNewPath.GetToken( i, cDelim ); + if ( !sUser.isEmpty() ) + sUser += OUString(cDelim); + sUser += sNewPath.getToken( i, cDelim ); } - if ( sFullPath.Len() > 0 ) - sFullPath += cDelim; + if ( !sFullPath.isEmpty() ) + sFullPath += OUString(cDelim); sFullPath += sUser; - sWritable += sNewPath.GetToken( i, cDelim ); - if ( sFullPath.Len() > 0 ) - sFullPath += cDelim; + sWritable += sNewPath.getToken( i, cDelim ); + if ( !sFullPath.isEmpty() ) + sFullPath += OUString(cDelim); sFullPath += sWritable; } @@ -622,7 +622,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl) if ( ExecutableDialogResults::OK != nRet ) return 0; - String sFolder( xFolderPicker->getDirectory() ); + OUString sFolder( xFolderPicker->getDirectory() ); ChangeCurrentEntry( sFolder ); } } @@ -702,7 +702,7 @@ IMPL_LINK( SvxPathTabPage, DialogClosedHdl, DialogClosedEvent*, pEvt ) { DBG_ASSERT( xFolderPicker.is() == sal_True, "SvxPathTabPage::DialogClosedHdl(): no folder picker" ); - String sURL = String( xFolderPicker->getDirectory() ); + OUString sURL = xFolderPicker->getDirectory(); ChangeCurrentEntry( sURL ); } return 0L; @@ -711,10 +711,10 @@ IMPL_LINK( SvxPathTabPage, DialogClosedHdl, DialogClosedEvent*, pEvt ) // ----------------------------------------------------------------------- void SvxPathTabPage::GetPathList( - sal_uInt16 _nPathHandle, String& _rInternalPath, - String& _rUserPath, String& _rWritablePath, sal_Bool& _rReadOnly ) + sal_uInt16 _nPathHandle, OUString& _rInternalPath, + OUString& _rUserPath, OUString& _rWritablePath, sal_Bool& _rReadOnly ) { - String sCfgName = getCfgName_Impl( _nPathHandle ); + OUString sCfgName = getCfgName_Impl( _nPathHandle ); try { @@ -726,7 +726,7 @@ void SvxPathTabPage::GetPathList( } // load internal paths - String sProp( sCfgName ); + OUString sProp( sCfgName ); sProp += POSTFIX_INTERNAL; Any aAny = pImpl->m_xPathSettings->getPropertyValue( sProp ); Sequence< OUString > aPathSeq; @@ -737,9 +737,9 @@ void SvxPathTabPage::GetPathList( for ( i = 0; i < nCount; ++i ) { - if ( _rInternalPath.Len() > 0 ) - _rInternalPath += ';'; - _rInternalPath += String( pPaths[i] ); + if ( !_rInternalPath.isEmpty() ) + _rInternalPath += ";"; + _rInternalPath += pPaths[i]; } } // load user paths @@ -753,9 +753,9 @@ void SvxPathTabPage::GetPathList( for ( i = 0; i < nCount; ++i ) { - if ( _rUserPath.Len() > 0 ) - _rUserPath += ';'; - _rUserPath += String( pPaths[i] ); + if ( !_rUserPath.isEmpty() ) + _rUserPath += ";"; + _rUserPath += pPaths[i]; } } // then the writable path @@ -764,7 +764,7 @@ void SvxPathTabPage::GetPathList( aAny = pImpl->m_xPathSettings->getPropertyValue( sProp ); OUString sWritablePath; if ( aAny >>= sWritablePath ) - _rWritablePath = String( sWritablePath ); + _rWritablePath = sWritablePath; // and the readonly flag sProp = sCfgName; @@ -781,9 +781,9 @@ void SvxPathTabPage::GetPathList( // ----------------------------------------------------------------------- void SvxPathTabPage::SetPathList( - sal_uInt16 _nPathHandle, const String& _rUserPath, const String& _rWritablePath ) + sal_uInt16 _nPathHandle, const OUString& _rUserPath, const OUString& _rWritablePath ) { - String sCfgName = getCfgName_Impl( _nPathHandle ); + OUString sCfgName = getCfgName_Impl( _nPathHandle ); try { @@ -800,8 +800,8 @@ void SvxPathTabPage::SetPathList( Sequence< OUString > aPathSeq( nCount ); OUString* pArray = aPathSeq.getArray(); for ( sal_uInt16 i = 0; i < nCount; ++i ) - pArray[i] = OUString( _rUserPath.GetToken( i, cDelim ) ); - String sProp( sCfgName ); + pArray[i] = _rUserPath.getToken( i, cDelim ); + OUString sProp( sCfgName ); sProp += POSTFIX_USER; Any aValue = makeAny( aPathSeq ); pImpl->m_xPathSettings->setPropertyValue( sProp, aValue ); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 01c9f22a2276..8adb5c356b9b 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -122,18 +122,18 @@ static const sal_Char* pViewOptDataName = "page data"; static XOutdevItemPool* mpStaticXOutdevItemPool = 0L; -static inline void SetViewOptUserItem( SvtViewOptions& rOpt, const String& rData ) +static inline void SetViewOptUserItem( SvtViewOptions& rOpt, const OUString& rData ) { rOpt.SetUserItem( VIEWOPT_DATANAME, makeAny( OUString( rData ) ) ); } -static inline String GetViewOptUserItem( const SvtViewOptions& rOpt ) +static inline OUString GetViewOptUserItem( const SvtViewOptions& rOpt ) { Any aAny( rOpt.GetUserItem( VIEWOPT_DATANAME ) ); OUString aUserData; aAny >>= aUserData; - return String( aUserData ); + return aUserData; } struct ModuleToGroupNameMap_Impl @@ -163,7 +163,7 @@ static ModuleToGroupNameMap_Impl ModuleMap[] = { NULL, OUString(), 0xFFFF } }; -static void setGroupName( const OUString& rModule, const String& rGroupName ) +static void setGroupName( const OUString& rModule, const OUString& rGroupName ) { sal_uInt16 nIndex = 0; while ( ModuleMap[ nIndex ].m_pModule ) @@ -179,9 +179,9 @@ static void setGroupName( const OUString& rModule, const String& rGroupName ) } } -static String getGroupName( const OUString& rModule, bool bForced ) +static OUString getGroupName( const OUString& rModule, bool bForced ) { - String sGroupName; + OUString sGroupName; sal_uInt16 nIndex = 0; while ( ModuleMap[ nIndex ].m_pModule ) { @@ -195,7 +195,7 @@ static String getGroupName( const OUString& rModule, bool bForced ) ++nIndex; } - if ( sGroupName.Len() == 0 && bForced ) + if ( sGroupName.isEmpty() && bForced ) { if ( !pPageRes ) pPageRes = new OfaPageResource; @@ -423,7 +423,7 @@ static OptionsMapping_Impl const OptionsMap_Impl[] = { NULL, NULL, 0 } }; -static sal_Bool lcl_getStringFromID( sal_uInt16 _nPageId, String& _rGroupName, String& _rPageName ) +static sal_Bool lcl_getStringFromID( sal_uInt16 _nPageId, OUString& _rGroupName, OUString& _rPageName ) { sal_Bool bRet = sal_False; @@ -433,9 +433,9 @@ static sal_Bool lcl_getStringFromID( sal_uInt16 _nPageId, String& _rGroupName, S if ( _nPageId == OptionsMap_Impl[nIdx].m_nPageId ) { bRet = sal_True; - _rGroupName = String( OptionsMap_Impl[nIdx].m_pGroupName, RTL_TEXTENCODING_ASCII_US ); + _rGroupName = OUString::createFromAscii( OptionsMap_Impl[nIdx].m_pGroupName ); if ( OptionsMap_Impl[nIdx].m_pPageName != NULL ) - _rPageName = String( OptionsMap_Impl[nIdx].m_pPageName, RTL_TEXTENCODING_ASCII_US ); + _rPageName = OUString::createFromAscii( OptionsMap_Impl[nIdx].m_pPageName ); break; } ++nIdx; @@ -447,10 +447,10 @@ static sal_Bool lcl_getStringFromID( sal_uInt16 _nPageId, String& _rGroupName, S static sal_Bool lcl_isOptionHidden( sal_uInt16 _nPageId, const SvtOptionsDialogOptions& _rOptOptions ) { sal_Bool bIsHidden = sal_False; - String sGroupName, sPageName; + OUString sGroupName, sPageName; if ( lcl_getStringFromID( _nPageId, sGroupName, sPageName ) ) { - if ( sPageName.Len() == 0 ) + if ( sPageName.isEmpty() ) bIsHidden = _rOptOptions.IsGroupHidden( sGroupName ); else bIsHidden = _rOptOptions.IsPageHidden( sPageName, sGroupName ); @@ -558,8 +558,8 @@ OfaTreeOptionsDialog::~OfaTreeOptionsDialog() if(pPageInfo->m_pPage) { pPageInfo->m_pPage->FillUserData(); - String aPageData(pPageInfo->m_pPage->GetUserData()); - if ( aPageData.Len() ) + OUString aPageData(pPageInfo->m_pPage->GetUserData()); + if ( !aPageData.isEmpty() ) { SvtViewOptions aTabPageOpt( E_TABPAGE, OUString::number( pPageInfo->m_nPageId) ); SetViewOptUserItem( aTabPageOpt, aPageData ); @@ -603,7 +603,7 @@ OfaTreeOptionsDialog::~OfaTreeOptionsDialog() } OptionsPageInfo* OfaTreeOptionsDialog::AddTabPage( - sal_uInt16 nId, const String& rPageName, sal_uInt16 nGroup ) + sal_uInt16 nId, const OUString& rPageName, sal_uInt16 nGroup ) { OptionsPageInfo* pPageInfo = new OptionsPageInfo( nId ); SvTreeListEntry* pParent = aTreeLB.GetEntry( 0, nGroup ); @@ -614,7 +614,7 @@ OptionsPageInfo* OfaTreeOptionsDialog::AddTabPage( } // the ItemSet* is passed on to the dialog's ownership -sal_uInt16 OfaTreeOptionsDialog::AddGroup(const String& rGroupName, +sal_uInt16 OfaTreeOptionsDialog::AddGroup(const OUString& rGroupName, SfxShell* pCreateShell, SfxModule* pCreateModule, sal_uInt16 nDialogId ) @@ -804,7 +804,7 @@ void OfaTreeOptionsDialog::ActivatePage( sal_uInt16 nResId ) pLastPageSaver->m_nLastPageId = nTemp; } -void OfaTreeOptionsDialog::ActivatePage( const String& rPageURL ) +void OfaTreeOptionsDialog::ActivatePage( const OUString& rPageURL ) { DBG_ASSERT( !bIsFromExtensionManager, "OfaTreeOptionsDialog::ActivatePage(): call from extension manager" ); if ( !pLastPageSaver ) @@ -821,9 +821,9 @@ void OfaTreeOptionsDialog::ActivateLastSelection() if ( pLastPageSaver ) { OUString sExpand( EXPAND_PROTOCOL ); - String sLastURL = bIsFromExtensionManager ? pLastPageSaver->m_sLastPageURL_ExtMgr + OUString sLastURL = bIsFromExtensionManager ? pLastPageSaver->m_sLastPageURL_ExtMgr : pLastPageSaver->m_sLastPageURL_Tools; - if ( sLastURL.Len() == 0 ) + if ( sLastURL.isEmpty() ) { sLastURL = !bIsFromExtensionManager ? pLastPageSaver->m_sLastPageURL_ExtMgr : pLastPageSaver->m_sLastPageURL_Tools; @@ -1549,7 +1549,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) for ( i = 1; i < nEnd; ++i ) { - String sNewTitle = rGeneralArray.GetString(i); + OUString sNewTitle = rGeneralArray.GetString(i); nPageId = (sal_uInt16)rGeneralArray.GetValue(i); if ( lcl_isOptionHidden( nPageId, aOptionsDlgOpt ) ) continue; @@ -1906,7 +1906,7 @@ bool isNodeActive( OptionsNode* pNode, Module* pModule ) return true; // OOo-Nodes (Writer, Calc, Impress...) are active if node is already inserted - if ( getGroupName( pNode->m_sId, false ).Len() > 0 ) + if ( !getGroupName( pNode->m_sId, false ).isEmpty() ) return true; // no module -> not active @@ -2047,7 +2047,7 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes( for ( int i = 0; i < seqNames.getLength(); ++i ) { - String sGroupName( seqNames[i] ); + OUString sGroupName( seqNames[i] ); Reference< XNameAccess > xNodeAccess; xSet->getByName( seqNames[i] ) >>= xNodeAccess; @@ -2066,8 +2066,8 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes( if ( sLabel.isEmpty() ) sLabel = sGroupName; - String sTemp = getGroupName( sLabel, !rExtensionId.isEmpty() ); - if ( sTemp.Len() > 0 ) + OUString sTemp = getGroupName( sLabel, !rExtensionId.isEmpty() ); + if ( !sTemp.isEmpty() ) sLabel = sTemp; OptionsNode* pNode = new OptionsNode( sNodeId, sLabel, sPageURL, bAllModules, sGroupId, nGroupIndex ); @@ -2181,14 +2181,14 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes( static sal_uInt16 lcl_getGroupId( const OUString& rGroupName, const SvTreeListBox& rTreeLB ) { - String sGroupName( rGroupName ); + OUString sGroupName( rGroupName ); sal_uInt16 nRet = 0; SvTreeListEntry* pEntry = rTreeLB.First(); while( pEntry ) { if ( !rTreeLB.GetParent( pEntry ) ) { - String sTemp( rTreeLB.GetEntryText( pEntry ) ); + OUString sTemp( rTreeLB.GetEntryText( pEntry ) ); if ( sTemp == sGroupName ) return nRet; nRet++; diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx index 189ead276ab0..03a7a79fe6b0 100644 --- a/cui/source/options/webconninfo.cxx +++ b/cui/source/options/webconninfo.cxx @@ -278,7 +278,7 @@ IMPL_LINK_NOARG(WebConnectionInfoDialog, ChangePasswordHdl) if ( pPasswordRequest->isPassword() ) { - String aNewPass = pPasswordRequest->getPassword(); + OUString aNewPass = pPasswordRequest->getPassword(); uno::Sequence< OUString > aPasswd( 1 ); aPasswd[0] = aNewPass; diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 839b1f0a4fec..04a314ba5b2b 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -139,7 +139,7 @@ void OfaAutoCorrDlg::EnableLanguage(bool bEnable) m_pLanguageBox->Enable(bEnable); } -static sal_Bool lcl_FindEntry( ListBox& rLB, const String& rEntry, +static sal_Bool lcl_FindEntry( ListBox& rLB, const OUString& rEntry, CollatorWrapper& rCmpClass ) { sal_uInt16 nCount = rLB.GetEntryCount(); @@ -263,10 +263,10 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet& ) struct ImpUserData { - String *pString; - Font* pFont; + OUString *pString; + Font *pFont; - ImpUserData(String* pText, Font* pFnt) + ImpUserData(OUString* pText, Font* pFnt) { pString = pText; pFont = pFnt;} }; @@ -303,7 +303,7 @@ class OfaImpBrwString : public SvLBoxString public: OfaImpBrwString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, - const String& rStr ) : SvLBoxString(pEntry,nFlags,rStr){} + const OUString& rStr ) : SvLBoxString(pEntry,nFlags,rStr){} virtual void Paint( const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* pView, @@ -333,7 +333,7 @@ void OfaImpBrwString::Paint( sal_Bool bFett = sal_True; sal_Int32 nPos = 0; do { - String sTxt( pUserData->pString->GetToken( 0, 1, nPos )); + OUString sTxt( pUserData->pString->getToken( 0, 1, nPos )); if( bFett ) rDev.SetFont( aFont ); @@ -437,7 +437,7 @@ OfaSwAutoFmtOptionsPage::OfaSwAutoFmtOptionsPage( Window* pParent, m_pEditPB->SetClickHdl(LINK(this, OfaSwAutoFmtOptionsPage, EditHdl)); } -SvTreeListEntry* OfaSwAutoFmtOptionsPage::CreateEntry(String& rTxt, sal_uInt16 nCol) +SvTreeListEntry* OfaSwAutoFmtOptionsPage::CreateEntry(OUString& rTxt, sal_uInt16 nCol) { SvTreeListEntry* pEntry = new SvTreeListEntry; @@ -449,7 +449,7 @@ SvTreeListEntry* OfaSwAutoFmtOptionsPage::CreateEntry(String& rTxt, sal_uInt16 n pEntry->AddItem( new SvLBoxContextBmp( pEntry, 0, Image(), Image(), 0)); - String sEmpty; + OUString sEmpty; if (nCol == CBCOL_SECOND) pEntry->AddItem( new SvLBoxString( pEntry, 0, sEmpty) ); else @@ -536,12 +536,12 @@ sal_Bool OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& ) bModified |= aBulletFont != pOpt->aBulletFont; pOpt->aBulletFont = aBulletFont; bModified |= !comphelper::string::equals(sBulletChar, pOpt->cBullet); - pOpt->cBullet = sBulletChar.GetChar(0); + pOpt->cBullet = sBulletChar[0]; bModified |= aByInputBulletFont != pOpt->aByInputBulletFont; bModified |= !comphelper::string::equals(sByInputBulletChar, pOpt->cByInputBullet); pOpt->aByInputBulletFont = aByInputBulletFont; - pOpt->cByInputBullet = sByInputBulletChar.GetChar(0); + pOpt->cByInputBullet = sByInputBulletChar[0]; bCheck = m_pCheckLB->IsChecked(MERGE_SINGLE_LINE_PARA, CBCOL_FIRST); bModified |= pOpt->bRightMargin != bCheck; @@ -654,7 +654,7 @@ void OfaSwAutoFmtOptionsPage::Reset( const SfxItemSet& ) m_pCheckLB->CheckEntryPos( REPLACE_BULLETS, CBCOL_FIRST, pOpt->bChgEnumNum ); aBulletFont = pOpt->aBulletFont; - sBulletChar = pOpt->cBullet; + sBulletChar = OUString(pOpt->cBullet); ImpUserData* pUserData = new ImpUserData(&sBulletChar, &aBulletFont); m_pCheckLB->SetUserData( REPLACE_BULLETS, pUserData ); @@ -666,7 +666,7 @@ void OfaSwAutoFmtOptionsPage::Reset( const SfxItemSet& ) m_pCheckLB->CheckEntryPos( APPLY_NUMBERING, CBCOL_SECOND, pOpt->bSetNumRule ); aByInputBulletFont = pOpt->aByInputBulletFont; - sByInputBulletChar = pOpt->cByInputBullet; + sByInputBulletChar = OUString( pOpt->cByInputBullet ); ImpUserData* pUserData2 = new ImpUserData(&sByInputBulletChar, &aByInputBulletFont); m_pCheckLB->SetUserData( APPLY_NUMBERING , pUserData2 ); @@ -693,7 +693,7 @@ IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, EditHdl) SvxCharacterMap *pMapDlg = new SvxCharacterMap(this); ImpUserData* pUserData = (ImpUserData*)m_pCheckLB->FirstSelected()->GetUserData(); pMapDlg->SetCharFont(*pUserData->pFont); - pMapDlg->SetChar( pUserData->pString->GetChar(0) ); + pMapDlg->SetChar( (*pUserData->pString)[0] ); if(RET_OK == pMapDlg->Execute()) { Font aFont(pMapDlg->GetCharFont()); @@ -993,8 +993,8 @@ void OfaAutocorrReplacePage::RefillReplaceBox(sal_Bool bFromReset, // formatted text is only in Writer if(bSWriter || bTextOnly) { - String sEntry(rDouble.sShort); - sEntry += '\t'; + OUString sEntry(rDouble.sShort); + sEntry += "\t"; sEntry += rDouble.sLong; SvTreeListEntry* pEntry = m_pReplaceTLB->InsertEntry(sEntry); m_pTextOnlyCB->Check(bTextOnly); @@ -1021,8 +1021,8 @@ void OfaAutocorrReplacePage::RefillReplaceBox(sal_Bool bFromReset, // formatted text is only in Writer if(bSWriter || bTextOnly) { - String sEntry(pWordPtr->GetShort()); - sEntry += '\t'; + OUString sEntry(pWordPtr->GetShort()); + sEntry += "\t"; sEntry += pWordPtr->GetLong(); SvTreeListEntry* pEntry = m_pReplaceTLB->InsertEntry(sEntry); m_pTextOnlyCB->Check(pWordPtr->IsTextOnly()); @@ -1111,7 +1111,7 @@ IMPL_LINK(OfaAutocorrReplacePage, SelectHdl, SvTabListBox*, pBox) return 0; }; -void OfaAutocorrReplacePage::NewEntry(String sShort, String sLong, bool bKeepSourceFormatting) +void OfaAutocorrReplacePage::NewEntry(OUString sShort, OUString sLong, bool bKeepSourceFormatting) { DoubleStringArray& rNewArray = aChangesTable[eLang].aNewEntries; for (sal_uInt32 i = 0; i < rNewArray.size(); i++) @@ -1141,7 +1141,7 @@ void OfaAutocorrReplacePage::NewEntry(String sShort, String sLong, bool bKeepSou rNewArray.back().pUserData = &bHasSelectionText; } -void OfaAutocorrReplacePage::DeleteEntry(String sShort, String sLong) +void OfaAutocorrReplacePage::DeleteEntry(OUString sShort, OUString sLong) { DoubleStringArray& rNewArray = aChangesTable[eLang].aNewEntries; for (sal_uInt32 i = 0; i < rNewArray.size(); i++) @@ -1186,8 +1186,8 @@ IMPL_LINK(OfaAutocorrReplacePage, NewDelHdl, PushButton*, pBtn) if(pBtn == m_pNewReplacePB || m_pNewReplacePB->IsEnabled()) { SvTreeListEntry* _pNewEntry = m_pReplaceTLB->FirstSelected(); - String sEntry(m_pShortED->GetText()); - if(sEntry.Len() && ( !m_pReplaceED->GetText().isEmpty() || + OUString sEntry(m_pShortED->GetText()); + if(!sEntry.isEmpty() && ( !m_pReplaceED->GetText().isEmpty() || ( bHasSelectionText && bSWriter ) )) { bool bKeepSourceFormatting = !bReplaceEditChanged && !m_pTextOnlyCB->IsChecked(); @@ -1195,7 +1195,7 @@ IMPL_LINK(OfaAutocorrReplacePage, NewDelHdl, PushButton*, pBtn) NewEntry(m_pShortED->GetText(), m_pReplaceED->GetText(), bKeepSourceFormatting); m_pReplaceTLB->SetUpdateMode(sal_False); sal_uInt32 nPos = UINT_MAX; - sEntry += '\t'; + sEntry += "\t"; sEntry += m_pReplaceED->GetText(); if(_pNewEntry) { @@ -1244,13 +1244,13 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) { SvTreeListEntry* pFirstSel = m_pReplaceTLB->FirstSelected(); sal_Bool bShort = pEdt == m_pShortED; - const String rEntry = pEdt->GetText(); - const String rRepString = m_pReplaceED->GetText(); - String aWordStr( pCharClass->lowercase( rEntry )); + const OUString rEntry = pEdt->GetText(); + const OUString rRepString = m_pReplaceED->GetText(); + OUString aWordStr( pCharClass->lowercase( rEntry )); if(bShort) { - if(rEntry.Len()) + if(!rEntry.isEmpty()) { sal_Bool bFound = sal_False; sal_Bool bTmpSelEntry=sal_False; @@ -1258,10 +1258,10 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) for(sal_uInt32 i = 0; i < m_pReplaceTLB->GetEntryCount(); i++) { SvTreeListEntry* pEntry = m_pReplaceTLB->GetEntry( i ); - String aTestStr=m_pReplaceTLB->GetEntryText(pEntry, 0); + OUString aTestStr = m_pReplaceTLB->GetEntryText(pEntry, 0); if( pCompareClass->compareString(rEntry, aTestStr ) == 0 ) { - if( rRepString.Len() ) + if( !rRepString.isEmpty() ) { bFirstSelect = sal_True; } @@ -1274,7 +1274,7 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) else { aTestStr = pCharClass->lowercase( aTestStr ); - if( aTestStr.Search(aWordStr) == 0 && !bTmpSelEntry ) + if( aTestStr.indexOf(aWordStr) == 0 && !bTmpSelEntry ) { m_pReplaceTLB->MakeVisible( pEntry ); bTmpSelEntry = sal_True; @@ -1307,9 +1307,9 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) } } - const String& rShortTxt = m_pShortED->GetText(); - sal_Bool bEnableNew = rShortTxt.Len() && - ( rRepString.Len() || + const OUString& rShortTxt = m_pShortED->GetText(); + sal_Bool bEnableNew = !rShortTxt.isEmpty() && + ( !rRepString.isEmpty() || ( bHasSelectionText && bSWriter )) && ( !pFirstSel || rRepString != m_pReplaceTLB->GetEntryText( pFirstSel, 1 ) ); @@ -1329,7 +1329,7 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) return 0; } -static sal_Bool lcl_FindInArray(std::vector<OUString>& rStrings, const String& rString) +static sal_Bool lcl_FindInArray(std::vector<OUString>& rStrings, const OUString& rString) { for(std::vector<OUString>::iterator i = rStrings.begin(); i != rStrings.end(); ++i) { @@ -1558,7 +1558,7 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(sal_Bool bFromReset, } m_pDoubleCapsLB->Clear(); m_pAbbrevLB->Clear(); - String sTemp; + OUString sTemp; m_pAbbrevED->SetText(sTemp); m_pDoubleCapsED->SetText(sTemp); @@ -1645,8 +1645,8 @@ IMPL_LINK(OfaAutocorrExceptPage, SelectHdl, ListBox*, pBox) IMPL_LINK(OfaAutocorrExceptPage, ModifyHdl, Edit*, pEdt) { // sal_Bool bSame = pEdt->GetText() == ->GetSelectEntry(); - const String& sEntry = pEdt->GetText(); - sal_Bool bEntryLen = 0!= sEntry.Len(); + const OUString& sEntry = pEdt->GetText(); + sal_Bool bEntryLen = !sEntry.isEmpty(); if(pEdt == m_pAbbrevED) { sal_Bool bSame = lcl_FindEntry(*m_pAbbrevLB, sEntry, *pCompareClass); @@ -1693,7 +1693,7 @@ enum OfaQuoteOptions REPLACE_1ST }; -SvTreeListEntry* OfaQuoteTabPage::CreateEntry(String& rTxt, sal_uInt16 nCol) +SvTreeListEntry* OfaQuoteTabPage::CreateEntry(OUString& rTxt, sal_uInt16 nCol) { SvTreeListEntry* pEntry = new SvTreeListEntry; @@ -1705,7 +1705,7 @@ SvTreeListEntry* OfaQuoteTabPage::CreateEntry(String& rTxt, sal_uInt16 nCol) pEntry->AddItem( new SvLBoxContextBmp( pEntry, 0, Image(), Image(), 0)); - String sEmpty; + OUString sEmpty; if (nCol == CBCOL_SECOND) pEntry->AddItem( new SvLBoxString( pEntry, 0, sEmpty) ); else @@ -1772,10 +1772,10 @@ OfaQuoteTabPage::OfaQuoteTabPage(Window* pParent, const SfxItemSet& rSet) m_pSwCheckLB->SetStyle(m_pSwCheckLB->GetStyle() | WB_HSCROLL| WB_VSCROLL); m_pSwCheckLB->SvSimpleTable::SetTabs(aStaticTabs); - String sHeader(get<Window>("m")->GetText()); - sHeader += '\t'; + OUString sHeader(get<Window>("m")->GetText()); + sHeader += "\t"; sHeader += get<Window>("t")->GetText(); - sHeader += '\t'; + sHeader += "\t"; m_pSwCheckLB->InsertHeaderEntry( sHeader, HEADERBAR_APPEND, HIB_CENTER | HIB_VCENTER | HIB_FIXEDPOS | HIB_FIXED); m_pCheckLB->Hide(true); @@ -2038,7 +2038,7 @@ IMPL_LINK( OfaQuoteTabPage, StdQuoteHdl, PushButton*, pBtn ) // -------------------------------------------------- -String OfaQuoteTabPage::ChangeStringExt_Impl( sal_UCS4 cChar ) +OUString OfaQuoteTabPage::ChangeStringExt_Impl( sal_UCS4 cChar ) { if (!cChar) return m_sStandard; diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 8c17e5b4ebbc..c52b4bad4557 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -484,8 +484,8 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) } // condition of the preview button is persistent due to UserData - String aUserData = GetUserData(); - m_pBtnPreview->Check( aUserData.Len() && sal_Unicode('1') == aUserData.GetChar( 0 ) ); + OUString aUserData = GetUserData(); + m_pBtnPreview->Check( !aUserData.isEmpty() && '1' == aUserData[0] ); // don't be allowed to call ShowSelector() after reset anymore bAllowShowSelector = sal_False; @@ -652,8 +652,8 @@ void SvxBackgroundTabPage::ResetFromWallpaperItem( const SfxItemSet& rSet ) ShowSelector(); // condition of the preview button is persistent due to UserData - String aUserData = GetUserData(); - m_pBtnPreview->Check( aUserData.Len() && sal_Unicode('1') == aUserData.GetChar( 0 ) ); + OUString aUserData = GetUserData(); + m_pBtnPreview->Check( !aUserData.isEmpty() && '1' == aUserData[0] ); // get and evaluate Input-BrushItem const SvxBrushItem* pBgdAttr = NULL; @@ -1140,7 +1140,7 @@ void SvxBackgroundTabPage::ShowSelector() void SvxBackgroundTabPage::RaiseLoadError_Impl() { SfxErrorContext aContext( ERRCTX_SVX_BACKGROUND, - String(), + OUString(), this, RID_SVXERRCTX, &CUI_MGR() ); @@ -1154,7 +1154,7 @@ void SvxBackgroundTabPage::RaiseLoadError_Impl() sal_Bool SvxBackgroundTabPage::LoadLinkedGraphic_Impl() { - sal_Bool bResult = ( aBgdGraphicPath.Len() > 0 ) && + sal_Bool bResult = ( !aBgdGraphicPath.isEmpty() ) && ( GRFILTER_OK == GraphicFilter::LoadGraphic( aBgdGraphicPath, aBgdGraphicFilter, aBgdGraphic ) ); @@ -1416,7 +1416,7 @@ IMPL_LINK( SvxBackgroundTabPage, FileClickHdl_Impl, CheckBox*, pBox ) { m_pFtUnlinked->Hide(); INetURLObject aObj( aBgdGraphicPath ); - String aFilePath; + OUString aFilePath; if ( aObj.GetProtocol() == INET_PROT_FILE ) aFilePath = aObj.getFSysPath( INetURLObject::FSYS_DETECT ); else @@ -1444,7 +1444,7 @@ IMPL_LINK( SvxBackgroundTabPage, FileClickHdl_Impl, CheckBox*, pBox ) } else { - if ( aBgdGraphicPath.Len() > 0 ) // only for linked bitmap + if ( !aBgdGraphicPath.isEmpty() ) // only for linked bitmap RaiseLoadError_Impl(); m_pPreviewWin2->NotifyChange( NULL ); } @@ -1552,7 +1552,7 @@ IMPL_LINK( SvxBackgroundTabPage, LoadTimerHdl_Impl, Timer* , pTimer ) { INetURLObject aOld( aBgdGraphicPath ); INetURLObject aNew( pImportDlg->GetPath() ); - if ( !aBgdGraphicPath.Len() || aNew != aOld ) + if ( aBgdGraphicPath.isEmpty() || aNew != aOld ) { // new file chosen aBgdGraphicPath = pImportDlg->GetPath(); @@ -1569,8 +1569,8 @@ IMPL_LINK( SvxBackgroundTabPage, LoadTimerHdl_Impl, Timer* , pTimer ) } else { - aBgdGraphicFilter.Erase(); - aBgdGraphicPath.Erase(); + aBgdGraphicFilter = ""; + aBgdGraphicPath = ""; bIsGraphicValid = sal_False; } } @@ -1703,7 +1703,7 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox ) pActItem = NULL; break; } - String aUserData = GetUserData(); + OUString aUserData = GetUserData(); if(!pActItem) { pActItem = new SvxBrushItem(nWhich); @@ -1774,7 +1774,7 @@ IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox ) } break; } - String aUserData = GetUserData(); + OUString aUserData = GetUserData(); FillControls_Impl(*pActItem, aUserData); } return 0; @@ -1783,7 +1783,7 @@ IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox ) //----------------------------------------------------------------------- void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, - const String& rUserData ) + const OUString& rUserData ) { SvxGraphicPosition ePos = rBgdAttr.GetGraphicPos(); const Color& rColor = rBgdAttr.GetColor(); @@ -1833,10 +1833,10 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, } if ( m_pLbSelect->IsVisible() ) // initialize graphic part { - aBgdGraphicFilter.Erase(); - aBgdGraphicPath.Erase(); + aBgdGraphicFilter = ""; + aBgdGraphicPath = ""; - if ( !rUserData.Len() ) + if ( rUserData.isEmpty() ) m_pBtnPreview->Check( sal_False ); m_pBtnLink->Check( sal_False ); m_pBtnLink->Disable(); @@ -1864,7 +1864,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, } else { - aBgdGraphicPath.Erase(); + aBgdGraphicPath = ""; m_pBtnLink->Check( sal_False ); m_pBtnLink->Disable(); } @@ -1897,7 +1897,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, aBgdGraphic = *pGraphic; bIsGraphicValid = sal_True; - if ( !rUserData.Len() ) + if ( rUserData.isEmpty() ) m_pBtnPreview->Check(); } else @@ -1905,7 +1905,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, RaiseLoadError_Impl(); bIsGraphicValid = sal_False; - if ( !rUserData.Len() ) + if ( rUserData.isEmpty() ) m_pBtnPreview->Check( sal_False ); } } diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index bceaed1f9680..7c2251703c12 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -425,10 +425,10 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) else { // #106224# different margins -> do not fill the edits - m_pLeftMF->SetText( String() ); - m_pRightMF->SetText( String() ); - m_pTopMF->SetText( String() ); - m_pBottomMF->SetText( String() ); + m_pLeftMF->SetText( OUString() ); + m_pRightMF->SetText( OUString() ); + m_pTopMF->SetText( OUString() ); + m_pBottomMF->SetText( OUString() ); } } m_pLeftMF->SaveValue(); diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 4996fd9d2538..f7e3f0a3cbd5 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -235,7 +235,7 @@ void SvxCharBasePage::SetPrevFontEscapement( sal_uInt8 nProp, sal_uInt8 nEscProp struct SvxCharNamePage_Impl { Timer m_aUpdateTimer; - String m_aNoStyleText; + OUString m_aNoStyleText; const FontList* m_pFontList; sal_uInt16 m_nExtraEntryPos; sal_Bool m_bMustDelete; @@ -265,7 +265,7 @@ SvxCharNamePage::SvxCharNamePage( Window* pParent, const SfxItemSet& rInSet ) : SvxCharBasePage(pParent, "CharNamePage", "cui/ui/charnamepage.ui", rInSet) , m_pImpl(new SvxCharNamePage_Impl) { - m_pImpl->m_aNoStyleText = String( CUI_RES( RID_SVXSTR_CHARNAME_NOSTYLE ) ); + m_pImpl->m_aNoStyleText = CUI_RES( RID_SVXSTR_CHARNAME_NOSTYLE ); SvtLanguageOptions aLanguageOptions; sal_Bool bShowCJK = aLanguageOptions.IsCJKFontEnabled(); @@ -330,18 +330,18 @@ SvxCharNamePage::SvxCharNamePage( Window* pParent, const SfxItemSet& rInSet ) //In Windows the standard dialogs name font-name, font-style as //Font, Style #ifdef WNT - String sFontFamilyString(CUI_RES(RID_SVXSTR_CHARNAME_FONT)); + OUString sFontFamilyString(CUI_RES(RID_SVXSTR_CHARNAME_FONT)); #else - String sFontFamilyString(CUI_RES(RID_SVXSTR_CHARNAME_FAMILY)); + OUString sFontFamilyString(CUI_RES(RID_SVXSTR_CHARNAME_FAMILY)); #endif m_pWestFontNameFT->SetText(sFontFamilyString); m_pEastFontNameFT->SetText(sFontFamilyString); m_pCTLFontNameFT->SetText(sFontFamilyString); #ifdef MACOSX - String sFontStyleString(CUI_RES(RID_SVXSTR_CHARNAME_TYPEFACE)); + OUString sFontStyleString(CUI_RES(RID_SVXSTR_CHARNAME_TYPEFACE)); #else - String sFontStyleString(CUI_RES(RID_SVXSTR_CHARNAME_STYLE)); + OUString sFontStyleString(CUI_RES(RID_SVXSTR_CHARNAME_STYLE)); #endif m_pWestFontStyleFT->SetText(sFontStyleString); m_pEastFontStyleFT->SetText(sFontStyleString); @@ -448,7 +448,7 @@ namespace Size aSize = _rFont.GetSize(); aSize.Width() = 0; FontInfo aFontInfo; - String sFontName(_pFontNameLB->GetText()); + OUString sFontName(_pFontNameLB->GetText()); sal_Bool bFontAvailable = _pFontList->IsAvailable( sFontName ); if (bFontAvailable || _pFontNameLB->GetSavedValue() != sFontName) aFontInfo = _pFontList->Get( sFontName, _pFontStyleLB->GetText() ); @@ -568,12 +568,12 @@ void SvxCharNamePage::FillStyleBox_Impl( const FontNameBox* pNameBox ) { // additional entries for the search: // "not bold" and "not italic" - String aEntry = m_pImpl->m_aNoStyleText; + OUString aEntry = m_pImpl->m_aNoStyleText; const sal_Char sS[] = "%1"; - aEntry.SearchAndReplaceAscii( sS, pFontList->GetBoldStr() ); + aEntry = aEntry.replaceFirst( sS, pFontList->GetBoldStr() ); m_pImpl->m_nExtraEntryPos = pStyleBox->InsertEntry( aEntry ); aEntry = m_pImpl->m_aNoStyleText; - aEntry.SearchAndReplaceAscii( sS, pFontList->GetItalicStr() ); + aEntry = aEntry.replaceFirst( sS, pFontList->GetItalicStr() ); pStyleBox->InsertEntry( aEntry ); } } @@ -675,7 +675,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp } else { - pNameBox->SetText( String() ); + pNameBox->SetText( OUString() ); } FillStyleBox_Impl( pNameBox ); @@ -725,11 +725,11 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp } else if ( !m_pImpl->m_bInSearchMode || !bStyle ) { - pStyleBox->SetText( String() ); + pStyleBox->SetText( OUString() ); } else if ( bStyle ) { - FontInfo aInfo = pFontList->Get( String(), eWeight, eItalic ); + FontInfo aInfo = pFontList->Get( OUString(), eWeight, eItalic ); pStyleBox->SetText( pFontList->GetStyleName( aInfo ) ); } if (!bStyleAvailable) @@ -772,7 +772,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp } else { - pSizeBox->SetText( String() ); + pSizeBox->SetText( OUString() ); if ( eState <= SFX_ITEM_READONLY ) { pSizeBox->Disable( ); @@ -885,12 +885,12 @@ sal_Bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLan const SfxItemSet* pExampleSet = GetTabDialog() ? GetTabDialog()->GetExampleSet() : NULL; bool bChanged = true; - const String& rFontName = pNameBox->GetText(); + const OUString& rFontName = pNameBox->GetText(); const FontList* pFontList = GetFontList(); - String aStyleBoxText =pStyleBox->GetText(); + OUString aStyleBoxText =pStyleBox->GetText(); sal_uInt16 nEntryPos = pStyleBox->GetEntryPos( aStyleBoxText ); if ( nEntryPos >= m_pImpl->m_nExtraEntryPos ) - aStyleBoxText.Erase(); + aStyleBoxText = ""; FontInfo aInfo( pFontList->Get( rFontName, aStyleBoxText ) ); SvxFontItem aFontItem( aInfo.GetFamily(), aInfo.GetName(), aInfo.GetStyleName(), aInfo.GetPitch(), aInfo.GetCharSet(), nWhich ); @@ -912,7 +912,7 @@ sal_Bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLan ( (SvxFontItem*)pItem )->GetFamilyName() != aFontItem.GetFamilyName() ) bChanged = true; - if ( bChanged && rFontName.Len() ) + if ( bChanged && !rFontName.isEmpty() ) { rSet.Put( aFontItem ); bModified = sal_True; @@ -960,9 +960,9 @@ sal_Bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLan if ( nEntryPos >= m_pImpl->m_nExtraEntryPos ) bChanged = ( nEntryPos == m_pImpl->m_nExtraEntryPos ); - String aText( pStyleBox->GetText() ); // Tristate, then text empty + OUString aText( pStyleBox->GetText() ); // Tristate, then text empty - if ( bChanged && aText.Len() ) + if ( bChanged && !aText.isEmpty() ) { rSet.Put( aWeightItem ); bModified = sal_True; @@ -1009,7 +1009,7 @@ sal_Bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLan if ( nEntryPos >= m_pImpl->m_nExtraEntryPos ) bChanged = ( nEntryPos == ( m_pImpl->m_nExtraEntryPos + 1 ) ); - if ( bChanged && aText.Len() ) + if ( bChanged && !aText.isEmpty() ) { rSet.Put( aPostureItem ); bModified = sal_True; @@ -1558,7 +1558,7 @@ void SvxCharEffectsPage::ResetColor_Impl( const SfxItemSet& rSet ) m_pFontColorLB->SelectEntryPos( nSelPos ); else m_pFontColorLB->SelectEntryPos( - m_pFontColorLB->InsertEntry( aColor, String( SVX_RES( RID_SVXSTR_COLOR_USER ) ) ) ); + m_pFontColorLB->InsertEntry( aColor, OUString( SVX_RES( RID_SVXSTR_COLOR_USER ) ) ) ); } break; } @@ -1768,7 +1768,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) else m_pUnderlineColorLB->SelectEntryPos( m_pUnderlineColorLB->InsertEntry( aColor, - String( SVX_RES( RID_SVXSTR_COLOR_USER ) ) ) ); + OUString( SVX_RES( RID_SVXSTR_COLOR_USER ) ) ) ); } } else @@ -1825,7 +1825,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) else m_pOverlineColorLB->SelectEntryPos( m_pOverlineColorLB->InsertEntry( aColor, - String( SVX_RES( RID_SVXSTR_COLOR_USER ) ) ) ); + OUString( SVX_RES( RID_SVXSTR_COLOR_USER ) ) ) ); } } else @@ -2889,14 +2889,14 @@ sal_uInt16* SvxCharPositionPage::GetRanges() // ----------------------------------------------------------------------- void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) { - String sUser = GetUserData(); + OUString sUser = GetUserData(); - if ( sUser.Len() ) + if ( !sUser.isEmpty() ) { - m_nSuperEsc = (short)sUser.GetToken( 0 ).ToInt32(); - m_nSubEsc = (short)sUser.GetToken( 1 ).ToInt32(); - m_nSuperProp = (sal_uInt8)sUser.GetToken( 2 ).ToInt32(); - m_nSubProp = (sal_uInt8)sUser.GetToken( 3 ).ToInt32(); + m_nSuperEsc = (short)sUser.getToken( 0, ';' ).toInt32(); + m_nSubEsc = (short)sUser.getToken( 1, ';' ).toInt32(); + m_nSuperProp = (sal_uInt8)sUser.getToken( 2, ';' ).toInt32(); + m_nSubProp = (sal_uInt8)sUser.getToken( 3, ';' ).toInt32(); } short nEsc = 0; @@ -3022,7 +3022,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) m_pKerningMF->SetValue( nKerning ); } else - m_pKerningMF->SetText( String() ); + m_pKerningMF->SetText( OUString() ); // Pair kerning nWhich = GetWhich( SID_ATTR_CHAR_AUTOKERN ); diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx index 79d99995c7b2..9ceb12c310ce 100644 --- a/cui/source/tabpages/connect.cxx +++ b/cui/source/tabpages/connect.cxx @@ -500,7 +500,7 @@ void SvxConnectionPage::FillTypeLB() { const SdrEdgeKindItem* pEdgeKindItem = (const SdrEdgeKindItem*) pItem; sal_uInt16 nCount = pEdgeKindItem->GetValueCount(); - String aStr; + OUString aStr; for( sal_uInt16 i = 0; i < nCount; i++ ) { diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx index 0f3720a3c455..51ed6a224dac 100644 --- a/cui/source/tabpages/labdlg.cxx +++ b/cui/source/tabpages/labdlg.cxx @@ -127,9 +127,9 @@ SvxCaptionTabPage::SvxCaptionTabPage(Window* pParent, const SfxItemSet& rInAttrs aCT_CAPTTYPE.SetSelectHdl(LINK( this, SvxCaptionTabPage, SelectCaptTypeHdl_Impl)); Image aImage; - aCT_CAPTTYPE.InsertItem(BMP_CAPTTYPE_1, aImage, String(CUI_RES(STR_CAPTTYPE_1))); - aCT_CAPTTYPE.InsertItem(BMP_CAPTTYPE_2, aImage, String(CUI_RES(STR_CAPTTYPE_2))); - aCT_CAPTTYPE.InsertItem(BMP_CAPTTYPE_3, aImage, String(CUI_RES(STR_CAPTTYPE_3))); + aCT_CAPTTYPE.InsertItem(BMP_CAPTTYPE_1, aImage, OUString(CUI_RES(STR_CAPTTYPE_1))); + aCT_CAPTTYPE.InsertItem(BMP_CAPTTYPE_2, aImage, OUString(CUI_RES(STR_CAPTTYPE_2))); + aCT_CAPTTYPE.InsertItem(BMP_CAPTTYPE_3, aImage, OUString(CUI_RES(STR_CAPTTYPE_3))); FillValueSet(); @@ -419,7 +419,7 @@ void SvxCaptionTabPage::SetupAnsatz_Impl( sal_uInt16 nType ) aLB_ANSATZ_REL.Clear(); nCnt = comphelper::string::getTokenCount(aStrHorzList, ';'); for( nIdx=0 ; nIdx<nCnt ; nIdx++ ) - aLB_ANSATZ_REL.InsertEntry( aStrHorzList.GetToken(nIdx) ); + aLB_ANSATZ_REL.InsertEntry( aStrHorzList.getToken(nIdx, ';') ); aLB_ANSATZ_REL.SelectEntryPos( nAnsatzRelPos ); aMF_ANSATZ.Hide(); @@ -433,7 +433,7 @@ void SvxCaptionTabPage::SetupAnsatz_Impl( sal_uInt16 nType ) aLB_ANSATZ_REL.Clear(); nCnt = comphelper::string::getTokenCount(aStrVertList, ';'); for( nIdx=0 ; nIdx<nCnt ; nIdx++ ) - aLB_ANSATZ_REL.InsertEntry( aStrVertList.GetToken(nIdx) ); + aLB_ANSATZ_REL.InsertEntry( aStrVertList.getToken(nIdx, ';') ); aLB_ANSATZ_REL.SelectEntryPos( nAnsatzRelPos ); aMF_ANSATZ.Hide(); diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index fede730be3c3..2bc3630cb431 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -45,18 +45,18 @@ public: _SfxMacroTabPage_Impl( void ); ~_SfxMacroTabPage_Impl(); - String maStaticMacroLBLabel; + OUString maStaticMacroLBLabel; PushButton* pAssignPB; PushButton* pDeletePB; - String* pStrEvent; - String* pAssignedMacro; + OUString* pStrEvent; + OUString* pAssignedMacro; _HeaderTabListBox* pEventLB; SfxConfigGroupListBox_Impl* pGroupLB; FixedText* pFT_MacroLBLabel; SfxConfigFunctionListBox_Impl* pMacroLB; FixedText* pMacroFT; - String* pMacroStr; + OUString* pMacroStr; sal_Bool bReadOnly; Timer maFillGroupTimer; @@ -115,21 +115,21 @@ static long nTabs[] = #define LB_MACROS_ITEMPOS 2 -String ConvertToUIName_Impl( SvxMacro *pMacro ) +OUString ConvertToUIName_Impl( SvxMacro *pMacro ) { - String aName( pMacro->GetMacName() ); - String aEntry; + OUString aName( pMacro->GetMacName() ); + OUString aEntry; if ( pMacro->GetLanguage() != "JavaScript" ) { sal_uInt16 nCount = comphelper::string::getTokenCount(aName, '.'); - aEntry = aName.GetToken( nCount-1, '.' ); + aEntry = aName.getToken( nCount-1, '.' ); if ( nCount > 2 ) { - aEntry += '('; - aEntry += aName.GetToken( 0, '.' ); - aEntry += '.'; - aEntry += aName.GetToken( nCount-2, '.' ); - aEntry += ')'; + aEntry += "("; + aEntry += aName.getToken( 0, '.' ); + aEntry += "."; + aEntry += aName.getToken( nCount-2, '.' ); + aEntry += ")"; } return aEntry; } @@ -147,7 +147,7 @@ void _SfxMacroTabPage::EnableButtons() const SvxMacro* pM = aTbl.Get( (sal_uInt16)(sal_uLong) pE->GetUserData() ); mpImpl->pDeletePB->Enable( 0 != pM && !mpImpl->bReadOnly ); - String sEventMacro; + OUString sEventMacro; sEventMacro = ((SvLBoxString*)pE->GetItem( LB_MACROS_ITEMPOS ))->GetText(); OUString sScriptURI = mpImpl->pMacroLB->GetSelectedScriptURI(); @@ -169,16 +169,16 @@ _SfxMacroTabPage::~_SfxMacroTabPage() DELETEZ( mpImpl ); } -void _SfxMacroTabPage::AddEvent( const String & rEventName, sal_uInt16 nEventId ) +void _SfxMacroTabPage::AddEvent( const OUString & rEventName, sal_uInt16 nEventId ) { - String sTmp( rEventName ); - sTmp += '\t'; + OUString sTmp( rEventName ); + sTmp += "\t"; // if the table is valid already SvxMacro* pM = aTbl.Get( nEventId ); if( pM ) { - String sNew( ConvertToUIName_Impl( pM ) ); + OUString sNew( ConvertToUIName_Impl( pM ) ); sTmp += sNew; } @@ -303,9 +303,9 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectGroup_Impl, ListBox*, EMPTYARG ) { _SfxMacroTabPage_Impl* pImpl = pThis->mpImpl; pImpl->pGroupLB->GroupSelected(); - const String sScriptURI = pImpl->pMacroLB->GetSelectedScriptURI(); - String aLabelText; - if( sScriptURI.Len() > 0 ) + const OUString sScriptURI = pImpl->pMacroLB->GetSelectedScriptURI(); + OUString aLabelText; + if( !sScriptURI.isEmpty() ) aLabelText = pImpl->maStaticMacroLBLabel; pImpl->pFT_MacroLBLabel->SetText( aLabelText ); @@ -340,11 +340,11 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton*, pBtn ) sal_uInt16 nEvent = (sal_uInt16)(sal_uLong)pE->GetUserData(); pThis->aTbl.Erase( nEvent ); - String sScriptURI; + OUString sScriptURI; if( bAssEnabled ) { sScriptURI = pImpl->pMacroLB->GetSelectedScriptURI(); - if( sScriptURI.CompareToAscii( "vnd.sun.star.script:", 20 ) == COMPARE_EQUAL ) + if( sScriptURI.startsWith( "vnd.sun.star.script:" ) ) { pThis->aTbl.Insert( nEvent, SvxMacro( sScriptURI, OUString( SVX_MACRO_LANGUAGE_SF ) ) ); @@ -444,8 +444,8 @@ void _SfxMacroTabPage::FillEvents() SvLBoxString* pLItem = ( SvLBoxString* ) pE->GetItem( LB_MACROS_ITEMPOS ); DBG_ASSERT( pLItem && SV_ITEM_ID_LBOXSTRING == pLItem->GetType(), "_SfxMacroTabPage::FillEvents(): no LBoxString" ); - String sOld( pLItem->GetText() ); - String sNew; + OUString sOld( pLItem->GetText() ); + OUString sNew; sal_uInt16 nEventId = ( sal_uInt16 ) ( sal_uLong ) pE->GetUserData(); if( aTbl.IsKeyValid( nEventId ) ) sNew = ConvertToUIName_Impl( aTbl.Get( nEventId ) ); @@ -462,8 +462,8 @@ void _SfxMacroTabPage::FillEvents() SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet ) : _SfxMacroTabPage( pParent, rResId, rSet ) { - mpImpl->pStrEvent = new String( CUI_RES( STR_EVENT ) ); - mpImpl->pAssignedMacro = new String( CUI_RES( STR_ASSMACRO ) ); + mpImpl->pStrEvent = new OUString( CUI_RES( STR_EVENT ) ); + mpImpl->pAssignedMacro = new OUString( CUI_RES( STR_ASSMACRO ) ); mpImpl->pEventLB = new _HeaderTabListBox( this, CUI_RES( LB_EVENT ) ); mpImpl->pAssignPB = new PushButton( this, CUI_RES( PB_ASSIGN ) ); mpImpl->pDeletePB = new PushButton( this, CUI_RES( PB_DELETE ) ); @@ -472,7 +472,7 @@ SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Re mpImpl->pFT_MacroLBLabel = new FixedText( this, CUI_RES( FT_LABEL4LB_MACROS ) ); mpImpl->maStaticMacroLBLabel= mpImpl->pFT_MacroLBLabel->GetText(); mpImpl->pMacroLB = new SfxConfigFunctionListBox_Impl( this, CUI_RES( LB_MACROS ) ); - mpImpl->pMacroStr = new String( CUI_RES( STR_MACROS ) ); + mpImpl->pMacroStr = new OUString( CUI_RES( STR_MACROS ) ); FreeResource(); diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx index 18e1103838e0..9f1c1af3f73c 100644 --- a/cui/source/tabpages/measure.cxx +++ b/cui/source/tabpages/measure.cxx @@ -191,7 +191,7 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) } else { - m_pMtrFldLineDist->SetText( String() ); + m_pMtrFldLineDist->SetText( OUString() ); } m_pMtrFldLineDist->SaveValue(); @@ -206,7 +206,7 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) } else { - m_pMtrFldHelplineOverhang->SetText( String() ); + m_pMtrFldHelplineOverhang->SetText( OUString() ); } m_pMtrFldHelplineOverhang->SaveValue(); @@ -221,7 +221,7 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) } else { - m_pMtrFldHelplineDist->SetText( String() ); + m_pMtrFldHelplineDist->SetText( OUString() ); } m_pMtrFldHelplineDist->SaveValue(); @@ -236,7 +236,7 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) } else { - m_pMtrFldHelpline1Len->SetText( String() ); + m_pMtrFldHelpline1Len->SetText( OUString() ); } m_pMtrFldHelpline1Len->SaveValue(); @@ -251,7 +251,7 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) } else { - m_pMtrFldHelpline2Len->SetText( String() ); + m_pMtrFldHelpline2Len->SetText( OUString() ); } m_pMtrFldHelpline2Len->SaveValue(); @@ -279,7 +279,7 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) } else { - m_pMtrFldDecimalPlaces->SetText( String() ); + m_pMtrFldDecimalPlaces->SetText( OUString() ); } m_pMtrFldDecimalPlaces->SaveValue(); diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 320db9fcb985..042d052f6784 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -102,17 +102,17 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxNumberPreview(Window *pP #* #************************************************************************/ -void SvxNumberPreview::NotifyChange( const String& rPrevStr, +void SvxNumberPreview::NotifyChange( const OUString& rPrevStr, const Color* pColor ) { // detect and strip out '*' related placeholders aPrevStr = rPrevStr; - mnPos = aPrevStr.Search( 0x1B ); - if ( mnPos != STRING_NOTFOUND ) + mnPos = aPrevStr.indexOf( 0x1B ); + if ( mnPos != -1 ) { - mnChar = aPrevStr.GetChar( mnPos + 1 ); + mnChar = aPrevStr[ mnPos + 1 ]; // delete placeholder and char to repeat - aPrevStr.Erase( mnPos, 2 ); + aPrevStr = aPrevStr.replaceAt( mnPos, 2, "" ); } svtools::ColorConfig aColorConfig; Color aWindowTextColor( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor ); @@ -136,13 +136,13 @@ void SvxNumberPreview::Paint( const Rectangle& ) { Font aDrawFont = GetFont(); Size aSzWnd = GetOutputSizePixel(); - String aTmpStr( aPrevStr ); + OUString aTmpStr( aPrevStr ); long nLeadSpace = (aSzWnd.Width() - GetTextWidth( aTmpStr )) /2; aDrawFont.SetColor( aPrevCol ); SetFont( aDrawFont ); - if ( mnPos != STRING_NOTFOUND ) + if ( mnPos != -1 ) { long nCharWidth = GetTextWidth( OUString( mnChar ) ); @@ -152,10 +152,10 @@ void SvxNumberPreview::Paint( const Rectangle& ) if ( nNumCharsToInsert > 0) { for ( int i = 0; i < nNumCharsToInsert; ++i ) - aTmpStr.Insert( mnChar, mnPos ); + aTmpStr = aTmpStr.replaceAt( mnPos, 0, OUString(mnChar) ); } } - Point aPosText = Point( ( mnPos != STRING_NOTFOUND ) ? 0 : nLeadSpace, + Point aPosText = Point( ( mnPos != -1 ) ? 0 : nLeadSpace, (aSzWnd.Height() - GetTextHeight())/2 ); DrawText( aPosText, aTmpStr ); } @@ -534,7 +534,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) nFixedCategory=nCatLbSelPos; if(bOneAreaFlag) { - String sFixedCategory=m_pLbCategory->GetEntry(nFixedCategory); + OUString sFixedCategory = m_pLbCategory->GetEntry(nFixedCategory); m_pLbCategory->Clear(); m_pLbCategory->InsertEntry(sFixedCategory); SetCategory(0); @@ -611,15 +611,15 @@ void SvxNumberFormatTabPage::Obstructing() m_pEdLeadZeroes->Disable(); m_pEdDecimals->Disable(); m_pFtOptions->Disable(); - m_pEdDecimals->SetText( String() ); - m_pEdLeadZeroes->SetText( String() ); + m_pEdDecimals->SetText( OUString() ); + m_pEdLeadZeroes->SetText( OUString() ); m_pBtnNegRed->Check( sal_False ); m_pBtnThousand->Check( sal_False ); - m_pWndPreview->NotifyChange( String() ); + m_pWndPreview->NotifyChange( OUString() ); m_pLbCategory->SelectEntryPos( 0 ); - m_pEdFormat->SetText( String() ); - m_pFtComment->SetText( String() ); + m_pEdFormat->SetText( OUString() ); + m_pFtComment->SetText( OUString() ); m_pEdComment->SetText(m_pLbCategory->GetEntry(1)); // string for user defined m_pEdFormat->GrabFocus(); @@ -695,7 +695,7 @@ sal_Bool SvxNumberFormatTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) // OK chosen - Is format code input entered already taken over? // If not, simulate Add. Upon syntax error ignore input and prevent Put. - String aFormat = m_pEdFormat->GetText(); + OUString aFormat = m_pEdFormat->GetText(); sal_uInt32 nCurKey = pNumFmtShell->GetCurNumFmtKey(); if ( m_pIbAdd->IsEnabled() || pNumFmtShell->IsTmpCurrencyFormat(aFormat) ) @@ -804,7 +804,7 @@ void SvxNumberFormatTabPage::SetInfoItem( const SvxNumberInfoItem& rItem ) void SvxNumberFormatTabPage::FillFormatListBox_Impl( std::vector<OUString>& rEntries ) { OUString aEntry; - String aTmpString; + OUString aTmpString; Font aFont=m_pLbCategory->GetFont(); size_t i = 0; short nTmpCatPos; @@ -851,7 +851,7 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( std::vector<OUString>& rEnt if(aPrivCat!=CAT_TEXT) { Color* pPreviewColor = NULL; - String aPreviewString( GetExpColorString( pPreviewColor, aEntry, aPrivCat ) ); + OUString aPreviewString( GetExpColorString( pPreviewColor, aEntry, aPrivCat ) ); Font aEntryFont( m_pLbFormat->GetFont() ); m_pLbFormat->InsertFontEntry( aPreviewString, aEntryFont, pPreviewColor ); } @@ -879,7 +879,7 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( std::vector<OUString>& rEnt void SvxNumberFormatTabPage::UpdateOptions_Impl( sal_Bool bCheckCatChange /*= sal_False*/ ) { - String theFormat = m_pEdFormat->GetText(); + OUString theFormat = m_pEdFormat->GetText(); sal_uInt16 nCurCategory = m_pLbCategory->GetSelectEntryPos(); sal_uInt16 nCategory = nCurCategory; sal_uInt16 nDecimals = 0; @@ -1075,8 +1075,8 @@ void SvxNumberFormatTabPage::UpdateFormatListBox_Impl if ( bUpdateEdit ) { - m_pEdFormat->SetText( String() ); - m_pWndPreview->NotifyChange( String() ); + m_pEdFormat->SetText( OUString() ); + m_pWndPreview->NotifyChange( OUString() ); } } @@ -1174,8 +1174,8 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) if (pLb == m_pLbFormat) { sal_uInt16 nSelPos = (sal_uInt16) m_pLbFormat->GetSelectEntryPos(); - String aFormat = m_pLbFormat->GetSelectEntry(); - String aComment; + OUString aFormat = m_pLbFormat->GetSelectEntry(); + OUString aComment; short nFmtLbSelPos = nSelPos; @@ -1189,7 +1189,7 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) } } - if ( aFormat.Len() > 0 ) + if ( !aFormat.isEmpty() ) { if(!m_pEdFormat->HasFocus()) m_pEdFormat->SetText( aFormat ); m_pFtComment->SetText(aComment); @@ -1331,7 +1331,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB) else { pNumFmtShell->SetComment4Entry(nFmtLbSelPos, - String()); + OUString()); } m_pLbFormat->SelectEntryPos( (sal_uInt16)nFmtLbSelPos ); m_pEdFormat->SetText( aFormat ); @@ -1443,7 +1443,7 @@ IMPL_LINK( SvxNumberFormatTabPage, EditHdl_Impl, Edit*, pEdFormat ) } else { - String aFormat = m_pEdFormat->GetText(); + OUString aFormat = m_pEdFormat->GetText(); MakePreviewText( aFormat ); if ( pNumFmtShell->FindEntry( aFormat, &nCurKey ) ) @@ -1592,8 +1592,8 @@ IMPL_LINK( SvxNumberFormatTabPage, LostFocusHdl_Impl, Edit *, pEd) #* #************************************************************************/ -String SvxNumberFormatTabPage::GetExpColorString( - Color*& rpPreviewColor, const String& rFormatStr, short nTmpCatPos) +OUString SvxNumberFormatTabPage::GetExpColorString( + Color*& rpPreviewColor, const OUString& rFormatStr, short nTmpCatPos) { double nVal = 0; switch (nTmpCatPos) @@ -1623,7 +1623,7 @@ String SvxNumberFormatTabPage::GetExpColorString( return aPreviewString; } -void SvxNumberFormatTabPage::MakePreviewText( const String& rFormat ) +void SvxNumberFormatTabPage::MakePreviewText( const OUString& rFormat ) { OUString aPreviewString; Color* pPreviewColor = NULL; diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 8bf2cb5bcfcb..143d5866722a 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -168,7 +168,7 @@ static Font& lcl_GetDefaultBulletFont() { static sal_Bool bInit = 0; static Font aDefBulletFont( OUString("StarSymbol"), - String(), Size( 0, 14 ) ); + OUString(), Size( 0, 14 ) ); if(!bInit) { aDefBulletFont.SetCharSet( RTL_TEXTENCODING_SYMBOL ); @@ -340,7 +340,7 @@ IMPL_LINK_NOARG(SvxSingleNumPickTabPage, NumSelectHdl_Impl) { SvxNumberFormat aFmt(pActNum->GetLevel(i)); aFmt.SetNumberingType(eNewType); - String aEmptyStr; + OUString aEmptyStr; if(cLocalPrefix == ' ') aFmt.SetPrefix( aEmptyStr ); else @@ -727,7 +727,7 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl) { //if it cannot be found then create a new one Font aCreateFont( pLevelSettings->sBulletFont, - String(), Size( 0, 14 ) ); + OUString(), Size( 0, 14 ) ); aCreateFont.SetCharSet( RTL_TEXTENCODING_DONTKNOW ); aCreateFont.SetFamily( FAMILY_DONTKNOW ); aCreateFont.SetPitch( PITCH_DONTKNOW ); @@ -930,7 +930,7 @@ IMPL_LINK_NOARG(SvxBitmapPickTabPage, NumSelectHdl_Impl) sal_uInt16 nIdx = m_pExamplesVS->GetSelectItemId() - 1; sal_uInt16 nMask = 1; - String aEmptyStr; + OUString aEmptyStr; sal_uInt16 nSetNumberingType = SVX_NUM_BITMAP; for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { @@ -1399,13 +1399,13 @@ void SvxNumOptionsTabPage::InitControls() bool bSameAdjust = true; const SvxNumberFormat* aNumFmtArr[SVX_MAX_NUM]; - String sFirstCharFmt; + OUString sFirstCharFmt; sal_Int16 eFirstOrient = text::VertOrientation::NONE; Size aFirstSize(0,0); sal_uInt16 nMask = 1; sal_uInt16 nLvl = USHRT_MAX; sal_uInt16 nHighestLevel = 0; - String aEmptyStr; + OUString aEmptyStr; sal_Bool bBullColor = pActNum->IsFeatureSupported(NUM_BULLET_COLOR); sal_Bool bBullRelSize = pActNum->IsFeatureSupported(NUM_BULLET_REL_SIZE); @@ -1560,7 +1560,7 @@ void SvxNumOptionsTabPage::InitControls() if(bSameCharFmt) { - if(sFirstCharFmt.Len()) + if(!sFirstCharFmt.isEmpty()) m_pCharFmtLB->SelectEntry(sFirstCharFmt); else m_pCharFmtLB->SelectEntryPos( 0 ); @@ -1702,10 +1702,10 @@ IMPL_LINK( SvxNumOptionsTabPage, AllLevelHdl_Impl, NumericField*, pBox ) IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox *, pBox ) { - String sSelectStyle; + OUString sSelectStyle; sal_Bool bShowOrient = sal_False; sal_Bool bBmp = sal_False; - String aEmptyStr; + OUString aEmptyStr; sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { @@ -1774,7 +1774,7 @@ IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox *, pBox ) m_pOrientLB->Hide(); } SetModified(); - if(sSelectStyle.Len()) + if(!sSelectStyle.isEmpty()) { m_pCharFmtLB->SelectEntry(sSelectStyle); CharFmtHdl_Impl(m_pCharFmtLB); @@ -1881,7 +1881,7 @@ IMPL_LINK( SvxNumOptionsTabPage, BulRelSizeHdl_Impl, MetricField *, pField) IMPL_LINK( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton ) { sal_uInt16 nItemId = pButton->GetCurItemId(); - String aGrfName; + OUString aGrfName; Size aSize; sal_Bool bSucc(sal_False); SvxOpenGraphicDialog aGrfDlg( CUI_RES(RID_SVXSTR_EDIT_GRAPHIC) ); @@ -2157,9 +2157,9 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, CharFmtHdl_Impl) { bAutomaticCharStyles = sal_False; sal_uInt16 nEntryPos = m_pCharFmtLB->GetSelectEntryPos(); - String sEntry = m_pCharFmtLB->GetSelectEntry(); + OUString sEntry = m_pCharFmtLB->GetSelectEntry(); sal_uInt16 nMask = 1; - String aEmptyStr; + OUString aEmptyStr; for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) @@ -2413,7 +2413,7 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) aNum.SetLevel( nLevel ); if(pActNum->IsContinuousNumbering()) aNum.GetLevelVal()[nLevel] = nPreNum; - String aText(pActNum->MakeNumString( aNum )); + OUString aText(pActNum->MakeNumString( aNum )); Font aSaveFont = pVDev->GetFont(); Font aColorFont(aSaveFont); Color aTmpBulletColor = rFmt.GetBulletColor(); @@ -2548,7 +2548,7 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) aNum.SetLevel( nLevel ); if(pActNum->IsContinuousNumbering()) aNum.GetLevelVal()[nLevel] = nPreNum; - String aText(pActNum->MakeNumString( aNum )); + OUString aText(pActNum->MakeNumString( aNum )); pVDev->DrawText( Point(nXStart, nYStart), aText ); pVDev->SetFont(aStdFont); nTextOffset = (sal_uInt16)pVDev->GetTextWidth(aText); @@ -2710,7 +2710,7 @@ void lcl_PrintDebugOutput(FixedText& rFixed, const SvxNumberFormat& rNumFmt) } else if ( rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) { - String sDebugText( OUString::number( TWIP_TO_MM100(rNumFmt.GetListtabPos() ) ) ); + OUString sDebugText( OUString::number( TWIP_TO_MM100(rNumFmt.GetListtabPos() ) ) ); sDebugText += sHash; sDebugText += OUString::number( TWIP_TO_MM100(rNumFmt.GetFirstLineIndent() ) ); sDebugText += sHash; @@ -2822,7 +2822,7 @@ void SvxNumPositionTabPage::InitControls() else bSetDistEmpty = true; - const String aEmptyStr; + const OUString aEmptyStr; if(bSameDist) SetMetricValue(*m_pDistNumMF, aNumFmtArr[nLvl]->GetCharTextDistance(), eCoreUnit); else @@ -3261,7 +3261,7 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, MetricField *, pFld ) SetModified(); if(!m_pDistBorderMF->IsEnabled()) { - String aEmptyStr; + OUString aEmptyStr; m_pDistBorderMF->SetText(aEmptyStr); } @@ -3300,7 +3300,7 @@ IMPL_LINK( SvxNumPositionTabPage, RelativeHdl_Impl, CheckBox *, pBox ) } } - String aEmptyStr; + OUString aEmptyStr; if(bSetValue) SetMetricValue(*m_pDistBorderMF, nValue, eCoreUnit); else @@ -3362,7 +3362,7 @@ IMPL_LINK_NOARG(SvxNumPositionTabPage, LabelFollowedByHdl_Impl) } else { - m_pListtabMF->SetText( String() ); + m_pListtabMF->SetText( OUString() ); } SetModified(); diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index e1a387dcbe66..18b8e5e1ca09 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -473,7 +473,7 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) nPaperBin = PAPERBIN_PRINTER_SETTINGS; } - String aBinName; + OUString aBinName; if ( PAPERBIN_PRINTER_SETTINGS == nPaperBin ) aBinName = EE_RESSTR( RID_SVXSTR_PAPERBIN_SETTINGS ); @@ -532,7 +532,7 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) sal_uInt16 nUserPos = LISTBOX_ENTRY_NOTFOUND; for ( sal_uInt32 i = 0; i < nCnt; ++i ) { - String aStr = aPaperAry.GetString(i); + OUString aStr = aPaperAry.GetString(i); Paper eSize = (Paper)aPaperAry.GetValue(i); sal_uInt16 nPos = m_pPaperSizeBox->InsertEntry( aStr ); m_pPaperSizeBox->SetEntryData( nPos, (void*)(sal_uLong)eSize ); @@ -917,25 +917,25 @@ IMPL_LINK_NOARG(SvxPageDescPage, PaperBinHdl_Impl) // already filled return 0; - String aOldName = m_pPaperTrayBox->GetSelectEntry(); + OUString aOldName = m_pPaperTrayBox->GetSelectEntry(); m_pPaperTrayBox->SetUpdateMode( sal_False ); m_pPaperTrayBox->Clear(); sal_uInt16 nEntryPos = m_pPaperTrayBox->InsertEntry( EE_RESSTR( RID_SVXSTR_PAPERBIN_SETTINGS ) ); m_pPaperTrayBox->SetEntryData( nEntryPos, (void*)(sal_uLong)PAPERBIN_PRINTER_SETTINGS ); - String aPaperBin( EditResId( RID_SVXSTR_PAPERBIN ) ); + OUString aPaperBin( EditResId( RID_SVXSTR_PAPERBIN ) ); sal_uInt16 nBinCount = pImpl->mpDefPrinter->GetPaperBinCount(); for ( sal_uInt16 i = 0; i < nBinCount; ++i ) { - String aName = pImpl->mpDefPrinter->GetPaperBinName(i); + OUString aName = pImpl->mpDefPrinter->GetPaperBinName(i); - if ( !aName.Len() ) + if ( aName.isEmpty() ) { aName = aPaperBin; - aName.Append( sal_Unicode(' ') ); - aName.Append( OUString::number( i+1 ) ); + aName += " "; + aName += OUString::number( i+1 ); } nEntryPos = m_pPaperTrayBox->InsertEntry( aName ); m_pPaperTrayBox->SetEntryData( nEntryPos, (void*)(sal_uLong)i ); diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index f9ab85f59ba9..9aa06087a7c2 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1422,7 +1422,7 @@ sal_Bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) bool bIsPageModel = false; _nWhich = GetWhich( SID_ATTR_PARA_MODEL ); - String sPage; + OUString sPage; if ( eState != m_pApplyCollBtn->GetSavedValue() || ( STATE_CHECK == eState && m_pApplyCollBox->GetSelectEntryPos() != m_pApplyCollBox->GetSavedValue() ) ) @@ -1430,7 +1430,7 @@ sal_Bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) if ( eState == STATE_CHECK ) { sPage = m_pApplyCollBox->GetSelectEntry(); - bIsPageModel = 0 != sPage.Len(); + bIsPageModel = !sPage.isEmpty(); } pOld = GetOldItem( rOutSet, SID_ATTR_PARA_MODEL ); @@ -1631,9 +1631,9 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) const SvxPageModelItem& rModel = (const SvxPageModelItem&)rSet.Get( _nWhich ); - String aStr( rModel.GetValue() ); + OUString aStr( rModel.GetValue() ); - if ( aStr.Len() && + if ( !aStr.isEmpty() && m_pApplyCollBox->GetEntryPos( aStr ) != LISTBOX_ENTRY_NOTFOUND ) { m_pApplyCollBox->SelectEntry( aStr ); @@ -1921,7 +1921,7 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage( Window* pParent, const SfxItemSe get(m_pWidowRowLabel,"labelWidow"); m_pApplyCollBox->SetAccessibleRelationLabeledBy(m_pApplyCollBtn); - m_pApplyCollBox->SetAccessibleName(String(CUI_RES(STR_PAGE_STYLE))); + m_pApplyCollBox->SetAccessibleName(CUI_RES(STR_PAGE_STYLE)); m_pOrphanRowNo->SetAccessibleRelationLabeledBy(m_pOrphanBox); m_pWidowRowNo->SetAccessibleRelationLabeledBy(m_pWidowBox); @@ -1944,11 +1944,11 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage( Window* pParent, const SfxItemSe SfxStyleSheetBasePool* pPool = pSh->GetStyleSheetPool(); pPool->SetSearchMask( SFX_STYLE_FAMILY_PAGE ); SfxStyleSheetBase* pStyle = pPool->First(); - String aStdName; + OUString aStdName; while( pStyle ) { - if ( aStdName.Len() == 0 ) + if ( aStdName.isEmpty() ) // first style == standard style aStdName = pStyle->GetName(); m_pApplyCollBox->InsertEntry( pStyle->GetName() ); diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index 9fc706763b25..69d97bfbc6dd 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -950,7 +950,7 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) pItem = GetItem( rSet, SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT ); if(pItem && static_cast<const SfxBoolItem*>(pItem)->GetValue()) { - String sHLabel = m_pHoriFT->GetText(); + OUString sHLabel = m_pHoriFT->GetText(); m_pHoriFT->SetText(m_pVertFT->GetText()); m_pVertFT->SetText(sHLabel); m_bIsVerticalFrame = true; @@ -1439,13 +1439,13 @@ sal_uInt16 SvxSwPosSizeTabPage::GetMapPos(FrmMap *pMap, ListBox &rAlignLB) if (pMap == aVAsCharHtmlMap || pMap == aVAsCharMap) { std::size_t nMapCount = ::lcl_GetFrmMapCount(pMap); - String sSelEntry(rAlignLB.GetSelectEntry()); + OUString sSelEntry(rAlignLB.GetSelectEntry()); for (std::size_t i = 0; i < nMapCount; i++) { SvxSwFramePosString::StringId eResId = pMap[i].eStrId; - String sEntry = m_aFramePosString.GetString(eResId); + OUString sEntry = m_aFramePosString.GetString(eResId); if (sEntry == sSelEntry) { @@ -1647,7 +1647,7 @@ void SvxSwPosSizeTabPage::UpdateExample() sal_uLong SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, sal_uInt16 nMapPos, sal_uInt16 nAlign, sal_uInt16 nRel, ListBox &rLB, FixedText &rFT) { - String sSelEntry; + OUString sSelEntry; sal_uLong nLBRelations = 0; std::size_t nMapCount = ::lcl_GetFrmMapCount(pMap); @@ -1657,7 +1657,7 @@ sal_uLong SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, sal_uInt16 nMapPos, sal_u { if (pMap == aVAsCharHtmlMap || pMap == aVAsCharMap) { - String sOldEntry(rLB.GetSelectEntry()); + OUString sOldEntry(rLB.GetSelectEntry()); sal_uInt16 nRelCount = SAL_N_ELEMENTS(aAsCharRelationMap); SvxSwFramePosString::StringId eStrId = pMap[nMapPos].eStrId; @@ -1673,7 +1673,7 @@ sal_uLong SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, sal_uInt16 nMapPos, sal_u SvxSwFramePosString::StringId sStrId1 = aAsCharRelationMap[nRelPos].eStrId; sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, m_bIsVerticalFrame, m_bIsInRightToLeft); - String sEntry = m_aFramePosString.GetString(sStrId1); + OUString sEntry = m_aFramePosString.GetString(sStrId1); sal_uInt16 nPos = rLB.InsertEntry(sEntry); rLB.SetEntryData(nPos, &aAsCharRelationMap[nRelPos]); if (pMap[_nMapPos].nAlign == nAlign) @@ -1683,7 +1683,7 @@ sal_uLong SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, sal_uInt16 nMapPos, sal_u } } } - if (sSelEntry.Len()) + if (!sSelEntry.isEmpty()) rLB.SelectEntry(sSelEntry); else { @@ -1732,16 +1732,16 @@ sal_uLong SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, sal_uInt16 nMapPos, sal_u { SvxSwFramePosString::StringId sStrId1 = m_pHoriMirrorCB->IsChecked() ? aRelationMap[nRelPos].eMirrorStrId : aRelationMap[nRelPos].eStrId; sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, m_bIsVerticalFrame, m_bIsInRightToLeft); - String sEntry = m_aFramePosString.GetString(sStrId1); + OUString sEntry = m_aFramePosString.GetString(sStrId1); sal_uInt16 nPos = rLB.InsertEntry(sEntry); rLB.SetEntryData(nPos, &aRelationMap[nRelPos]); - if (!sSelEntry.Len() && aRelationMap[nRelPos].nRelation == nRel) + if (sSelEntry.isEmpty() && aRelationMap[nRelPos].nRelation == nRel) sSelEntry = sEntry; } } } } - if (sSelEntry.Len()) + if (!sSelEntry.isEmpty()) rLB.SelectEntry(sSelEntry); else { @@ -1795,7 +1795,7 @@ sal_uInt16 SvxSwPosSizeTabPage::FillPosLB(FrmMap *_pMap, const sal_uInt16 _nRel, ListBox &_rLB) { - String sSelEntry, sOldEntry; + OUString sSelEntry, sOldEntry; sOldEntry = _rLB.GetSelectEntry(); _rLB.Clear(); @@ -1815,7 +1815,7 @@ sal_uInt16 SvxSwPosSizeTabPage::FillPosLB(FrmMap *_pMap, { SvxSwFramePosString::StringId eStrId = m_pHoriMirrorCB->IsChecked() ? _pMap[i].eMirrorStrId : _pMap[i].eStrId; eStrId = lcl_ChangeResIdToVerticalOrRTL(eStrId, m_bIsVerticalFrame, m_bIsInRightToLeft); - String sEntry(m_aFramePosString.GetString(eStrId)); + OUString sEntry(m_aFramePosString.GetString(eStrId)); if (_rLB.GetEntryPos(sEntry) == LISTBOX_ENTRY_NOTFOUND) { // don't insert duplicate entries at character wrapped borders diff --git a/cui/source/tabpages/tabline.cxx b/cui/source/tabpages/tabline.cxx index fdc2cbe47ce9..b712d27629a6 100644 --- a/cui/source/tabpages/tabline.cxx +++ b/cui/source/tabpages/tabline.cxx @@ -139,7 +139,7 @@ void SvxLineTabDialog::SavePalettes() // Save the tables when they have been changed - const String aPath( SvtPathOptions().GetPalettePath() ); + const OUString aPath( SvtPathOptions().GetPalettePath() ); if( nDashListState & CT_MODIFIED ) { diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index 31410815bce8..93e543eeba8c 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -654,10 +654,10 @@ IMPL_LINK( SvxTabulatorTabPage, FillTypeCheckHdl_Impl, RadioButton *, pBox ) IMPL_LINK( SvxTabulatorTabPage, GetFillCharHdl_Impl, Edit *, pEdit ) { - String aChar( pEdit->GetText() ); + OUString aChar( pEdit->GetText() ); - if ( aChar.Len() > 0) - aAktTab.GetFill() = aChar.GetChar( 0 ); + if ( !aChar.isEmpty() ) + aAktTab.GetFill() = aChar[0]; const sal_uInt16 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue( eDefUnit ), eDefUnit); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) @@ -672,9 +672,9 @@ IMPL_LINK( SvxTabulatorTabPage, GetFillCharHdl_Impl, Edit *, pEdit ) IMPL_LINK( SvxTabulatorTabPage, GetDezCharHdl_Impl, Edit *, pEdit ) { - String aChar( pEdit->GetText() ); - if ( aChar.Len() > 0 && ( aChar.GetChar( 0 ) >= ' ')) - aAktTab.GetDecimal() = aChar.GetChar( 0 ); + OUString aChar( pEdit->GetText() ); + if ( !aChar.isEmpty() && ( aChar[0] >= ' ')) + aAktTab.GetDecimal() = aChar[0]; sal_uInt16 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue( eDefUnit ), eDefUnit ); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx index 02edafe950aa..a0120ea107ec 100644 --- a/cui/source/tabpages/textanim.cxx +++ b/cui/source/tabpages/textanim.cxx @@ -376,7 +376,7 @@ sal_Bool SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) // quantity eState = m_pTsbEndless->GetState(); - String aStr = m_pNumFldCount->GetText(); + OUString aStr = m_pNumFldCount->GetText(); if( eState != m_pTsbEndless->GetSavedValue() || aStr != m_pNumFldCount->GetSavedValue() ) { diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 0a281b4f1b62..5363cb9bd62d 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -699,7 +699,7 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : // setting the output device rXFSet.Put( XFillStyleItem( XFILL_SOLID ) ); - rXFSet.Put( XFillColorItem( String(), COL_BLACK ) ); + rXFSet.Put( XFillColorItem( OUString(), COL_BLACK ) ); m_pCtlXRectPreview->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlBitmapPreview->SetAttributes( aXFillAttr.GetItemSet() ); @@ -1031,7 +1031,7 @@ sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) _nPos != m_pLbGradient->GetSavedValue() ) { XGradient aGradient = pGradientList->GetGradient( _nPos )->GetGradient(); - String aString = m_pLbGradient->GetSelectEntry(); + OUString aString = m_pLbGradient->GetSelectEntry(); XFillGradientItem aItem( aString, aGradient ); pOld = GetOldItem( rAttrs, XATTR_FILLGRADIENT ); if ( !pOld || !( *(const XFillGradientItem*)pOld == aItem ) ) @@ -1062,7 +1062,7 @@ sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) _nPos != m_pLbHatching->GetSavedValue() ) { XHatch aHatching = pHatchingList->GetHatch( _nPos )->GetHatch(); - String aString = m_pLbHatching->GetSelectEntry(); + OUString aString = m_pLbHatching->GetSelectEntry(); XFillHatchItem aItem( aString, aHatching ); pOld = GetOldItem( rAttrs, XATTR_FILLHATCH ); if ( !pOld || !( *(const XFillHatchItem*)pOld == aItem ) ) @@ -1108,7 +1108,7 @@ sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) nPos != m_pLbBitmap->GetSavedValue() ) { const XBitmapEntry* pXBitmapEntry = pBitmapList->GetBitmap(nPos); - const String aString(m_pLbBitmap->GetSelectEntry()); + const OUString aString(m_pLbBitmap->GetSelectEntry()); const XFillBitmapItem aFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject()); pOld = GetOldItem( rAttrs, XATTR_FILLBITMAP ); if ( !pOld || !( *(const XFillBitmapItem*)pOld == aFillBitmapItem ) ) @@ -1229,13 +1229,13 @@ sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) } //aMtrFldXSize - String aStr = m_pMtrFldXSize->GetText(); + OUString aStr = m_pMtrFldXSize->GetText(); { XFillBmpSizeXItem* pItem = NULL; TriState eScaleState = m_pTsbScale->GetState(); if( m_pMtrFldXSize->IsEnabled() && - aStr.Len() > 0 && + !aStr.isEmpty() && aStr != m_pMtrFldXSize->GetSavedValue() ) { if( eScaleState == STATE_NOCHECK ) @@ -1271,7 +1271,7 @@ sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) TriState eScaleState = m_pTsbScale->GetState(); if( m_pMtrFldYSize->IsEnabled() && - aStr.Len() > 0 && + !aStr.isEmpty() && aStr != m_pMtrFldYSize->GetSavedValue() ) { if( eScaleState == STATE_NOCHECK ) @@ -1306,8 +1306,8 @@ sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) //aMtrFldOffset if( m_pMtrFldOffset->IsEnabled() ) { - String aMtrString = m_pMtrFldOffset->GetText(); - if( ( aMtrString.Len() > 0 && + OUString aMtrString = m_pMtrFldOffset->GetText(); + if( ( !aMtrString.isEmpty() && aMtrString != m_pMtrFldOffset->GetSavedValue() ) || m_pRbtRow->GetSavedValue() != m_pRbtRow->IsChecked() || m_pRbtColumn->GetSavedValue() != m_pRbtColumn->IsChecked() ) @@ -1366,8 +1366,8 @@ sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) //aMtrFldXOffset if( m_pMtrFldXOffset->IsEnabled() ) { - String sMtrXOffset = m_pMtrFldXOffset->GetText(); - if( sMtrXOffset.Len() > 0 && + OUString sMtrXOffset = m_pMtrFldXOffset->GetText(); + if( !sMtrXOffset.isEmpty() && sMtrXOffset != m_pMtrFldXOffset->GetSavedValue() ) { XFillBmpPosOffsetXItem aFillBmpPosOffsetXItem( (sal_uInt16) m_pMtrFldXOffset->GetValue() ); @@ -1383,8 +1383,8 @@ sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) //aMtrFldYOffset if( m_pMtrFldYOffset->IsEnabled() ) { - String sMtrYOffset = m_pMtrFldYOffset->GetText(); - if( sMtrYOffset.Len() > 0 && + OUString sMtrYOffset = m_pMtrFldYOffset->GetText(); + if( !sMtrYOffset.isEmpty() && sMtrYOffset != m_pMtrFldYOffset->GetSavedValue() ) { XFillBmpPosOffsetYItem aFillBmpPosOffsetYItem( (sal_uInt16) m_pMtrFldYOffset->GetValue() ); @@ -1437,7 +1437,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) { XFillGradientItem aGradientItem( ( ( const XFillGradientItem& ) rAttrs.Get( XATTR_FILLGRADIENT ) ) ); - String aString( aGradientItem.GetName() ); + OUString aString( aGradientItem.GetName() ); XGradient aGradient( aGradientItem.GetGradientValue() ); m_pLbGradient->SelectEntryByList( pGradientList, aString, aGradient ); @@ -1475,7 +1475,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) XFillBitmapItem aBitmapItem( ( const XFillBitmapItem& ) rAttrs.Get( XATTR_FILLBITMAP ) ); - String aString( aBitmapItem.GetName() ); + OUString aString( aBitmapItem.GetName() ); m_pLbBitmap->SelectEntry( aString ); } ClickBitmapHdl_Impl(); @@ -1806,14 +1806,14 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyColorHdl_Impl) if( _nPos != LISTBOX_ENTRY_NOTFOUND ) { rXFSet.Put( XFillStyleItem( XFILL_SOLID ) ); - rXFSet.Put( XFillColorItem( String(), m_pLbColor->GetSelectEntryColor() ) ); + rXFSet.Put( XFillColorItem( OUString(), m_pLbColor->GetSelectEntryColor() ) ); } // NEW else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), sal_True, &pPoolItem ) ) { rXFSet.Put( XFillStyleItem( XFILL_SOLID ) ); Color aColor( ( ( const XFillColorItem* ) pPoolItem )->GetColorValue() ); - rXFSet.Put( XFillColorItem( String(), aColor ) ); + rXFSet.Put( XFillColorItem( OUString(), aColor ) ); } else rXFSet.Put( XFillStyleItem( XFILL_NONE ) ); @@ -1879,12 +1879,12 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyGradientHdl_Impl) XGradientEntry* pEntry = pGradientList->GetGradient( _nPos ); rXFSet.Put( XFillStyleItem( XFILL_GRADIENT ) ); - rXFSet.Put( XFillGradientItem( String(), pEntry->GetGradient() ) ); + rXFSet.Put( XFillGradientItem( OUString(), pEntry->GetGradient() ) ); } else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), sal_True, &pPoolItem ) ) { rXFSet.Put( XFillStyleItem( XFILL_GRADIENT ) ); - rXFSet.Put( XFillGradientItem( String(), ( ( const XFillGradientItem* ) pPoolItem )->GetGradientValue() ) ); + rXFSet.Put( XFillGradientItem( OUString(), ( ( const XFillGradientItem* ) pPoolItem )->GetGradientValue() ) ); } else rXFSet.Put( XFillStyleItem( XFILL_NONE ) ); @@ -1950,12 +1950,12 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyHatchingHdl_Impl) XHatchEntry* pEntry = pHatchingList->GetHatch( _nPos ); rXFSet.Put( XFillStyleItem( XFILL_HATCH ) ); - rXFSet.Put( XFillHatchItem( String(), pEntry->GetHatch() ) ); + rXFSet.Put( XFillHatchItem( OUString(), pEntry->GetHatch() ) ); } else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), sal_True, &pPoolItem ) ) { rXFSet.Put( XFillStyleItem( XFILL_HATCH ) ); - rXFSet.Put( XFillHatchItem( String(), ( ( const XFillHatchItem* ) pPoolItem )->GetHatchValue() ) ); + rXFSet.Put( XFillHatchItem( OUString(), ( ( const XFillHatchItem* ) pPoolItem )->GetHatchValue() ) ); } else rXFSet.Put( XFillStyleItem( XFILL_NONE ) ); @@ -1975,12 +1975,12 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyHatchBckgrdColorHdl_Impl) m_pLbColor->SelectEntryPos( _nPos ); if( _nPos != LISTBOX_ENTRY_NOTFOUND ) { - rXFSet.Put( XFillColorItem( String(), m_pLbHatchBckgrdColor->GetSelectEntryColor() ) ); + rXFSet.Put( XFillColorItem( OUString(), m_pLbHatchBckgrdColor->GetSelectEntryColor() ) ); } else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), sal_True, &pPoolItem ) ) { Color aColor( ( ( const XFillColorItem* ) pPoolItem )->GetColorValue() ); - rXFSet.Put( XFillColorItem( String(), aColor ) ); + rXFSet.Put( XFillColorItem( OUString(), aColor ) ); } else rXFSet.Put( XFillStyleItem( XFILL_NONE ) ); @@ -2074,12 +2074,12 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyBitmapHdl_Impl) const XBitmapEntry* pEntry = pBitmapList->GetBitmap(_nPos); rXFSet.Put(XFillStyleItem(XFILL_BITMAP)); - rXFSet.Put(XFillBitmapItem(String(), pEntry->GetGraphicObject())); + rXFSet.Put(XFillBitmapItem(OUString(), pEntry->GetGraphicObject())); } else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), sal_True, &pPoolItem ) ) { rXFSet.Put(XFillStyleItem(XFILL_BITMAP)); - rXFSet.Put(XFillBitmapItem(String(), ((const XFillBitmapItem*)pPoolItem)->GetGraphicObject())); + rXFSet.Put(XFillBitmapItem(OUString(), ((const XFillBitmapItem*)pPoolItem)->GetGraphicObject())); } else rXFSet.Put( XFillStyleItem( XFILL_NONE ) ); diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index bee9e6b74717..6aff2bce1e47 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -65,7 +65,7 @@ SvxBitmapTabPage::SvxBitmapTabPage( Window* pParent, const SfxItemSet& rInAttrs pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ), aXFStyleItem ( XFILL_BITMAP ), - aXBitmapItem ( String(), Graphic() ), + aXBitmapItem ( OUString(), Graphic() ), aXFillAttr ( pXPool ), rXFSet ( aXFillAttr.GetItemSet() ) { @@ -235,7 +235,7 @@ sal_Bool SvxBitmapTabPage::FillItemSet( SfxItemSet& _rOutAttrs ) if(LISTBOX_ENTRY_NOTFOUND != nPos) { const XBitmapEntry* pXBitmapEntry = pBitmapList->GetBitmap(nPos); - const String aString(m_pLbBitmaps->GetSelectEntry()); + const OUString aString(m_pLbBitmaps->GetSelectEntry()); _rOutAttrs.Put(XFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject())); } @@ -243,7 +243,7 @@ sal_Bool SvxBitmapTabPage::FillItemSet( SfxItemSet& _rOutAttrs ) { const BitmapEx aBitmapEx(m_pBitmapCtl->GetBitmapEx()); - _rOutAttrs.Put(XFillBitmapItem(String(), Graphic(aBitmapEx))); + _rOutAttrs.Put(XFillBitmapItem(OUString(), Graphic(aBitmapEx))); } } } @@ -368,13 +368,13 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ChangeBitmapHdl_Impl) m_pLbColor->SelectEntry( aPixelColor ); if( m_pLbColor->GetSelectEntryCount() == 0 ) { - m_pLbColor->InsertEntry( aPixelColor, String() ); + m_pLbColor->InsertEntry( aPixelColor, OUString() ); m_pLbColor->SelectEntry( aPixelColor ); } m_pLbBackgroundColor->SelectEntry( aBackColor ); if( m_pLbBackgroundColor->GetSelectEntryCount() == 0 ) { - m_pLbBackgroundColor->InsertEntry( aBackColor, String() ); + m_pLbBackgroundColor->InsertEntry( aBackColor, OUString() ); m_pLbBackgroundColor->SelectEntry( aBackColor ); } } @@ -390,7 +390,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ChangeBitmapHdl_Impl) m_pCtlPixel->Invalidate(); // display bitmap - const XFillBitmapItem aXBmpItem(String(), *pGraphicObject); + const XFillBitmapItem aXBmpItem(OUString(), *pGraphicObject); rXFSet.Put( aXBmpItem ); m_pCtlPreview->SetAttributes( aXFillAttr.GetItemSet() ); @@ -415,12 +415,12 @@ long SvxBitmapTabPage::CheckChanges_Impl() ResMgr& rMgr = CUI_MGR(); Image aWarningBoxImage = WarningBox::GetStandardImage(); SvxMessDialog* aMessDlg = new SvxMessDialog(GetParentDialog(), - String( SVX_RES( RID_SVXSTR_BITMAP ) ), - String( CUI_RES( RID_SVXSTR_ASK_CHANGE_BITMAP ) ), + SVX_RES( RID_SVXSTR_BITMAP ), + CUI_RES( RID_SVXSTR_ASK_CHANGE_BITMAP ), &aWarningBoxImage ); DBG_ASSERT(aMessDlg, "Dialogdiet fail!"); - aMessDlg->SetButtonText( MESS_BTN_1, String( ResId( RID_SVXSTR_CHANGE, rMgr ) ) ); - aMessDlg->SetButtonText( MESS_BTN_2, String( ResId( RID_SVXSTR_ADD, rMgr ) ) ); + aMessDlg->SetButtonText( MESS_BTN_1, ResId( RID_SVXSTR_CHANGE, rMgr ) ); + aMessDlg->SetButtonText( MESS_BTN_2, ResId( RID_SVXSTR_ADD, rMgr ) ); short nRet = aMessDlg->Execute(); @@ -456,8 +456,8 @@ long SvxBitmapTabPage::CheckChanges_Impl() IMPL_LINK_NOARG(SvxBitmapTabPage, ClickAddHdl_Impl) { - String aNewName( SVX_RES( RID_SVXSTR_BITMAP ) ); - String aDesc( CUI_RES( RID_SVXSTR_DESC_NEW_BITMAP ) ); + OUString aNewName( SVX_RES( RID_SVXSTR_BITMAP ) ); + OUString aDesc( CUI_RES( RID_SVXSTR_DESC_NEW_BITMAP ) ); OUString aName; long nCount = pBitmapList->Count(); @@ -579,7 +579,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl_Impl) if( !nError ) { - String aDesc( ResId(RID_SVXSTR_DESC_EXT_BITMAP, rMgr) ); + OUString aDesc( ResId(RID_SVXSTR_DESC_EXT_BITMAP, rMgr) ); MessageDialog* pWarnBox = NULL; // convert file URL to UI name @@ -587,7 +587,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl_Impl) INetURLObject aURL( aDlg.GetPath() ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), String(aURL.GetName()).GetToken( 0, '.' ), aDesc ); + AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), aURL.GetName().getToken( 0, '.' ), aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); nError = 1; @@ -654,7 +654,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickModifyHdl_Impl) if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { ResMgr& rMgr = CUI_MGR(); - String aDesc( ResId( RID_SVXSTR_DESC_NEW_BITMAP, rMgr ) ); + OUString aDesc( ResId( RID_SVXSTR_DESC_NEW_BITMAP, rMgr ) ); OUString aName( pBitmapList->GetBitmap( nPos )->GetName() ); OUString aOldName = aName; @@ -716,7 +716,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickDeleteHdl_Impl) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { QueryBox aQueryBox( GetParentDialog(), WinBits( WB_YES_NO | WB_DEF_NO ), - String( CUI_RES( RID_SVXSTR_ASK_DEL_BITMAP ) ) ); + OUString( CUI_RES( RID_SVXSTR_ASK_DEL_BITMAP ) ) ); if( aQueryBox.Execute() == RET_YES ) { @@ -762,7 +762,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickLoadHdl_Impl) if ( nReturn != RET_CANCEL ) { ::sfx2::FileDialogHelper aDlg( com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 ); - String aStrFilterType( "*.sob" ); + OUString aStrFilterType( "*.sob" ); aDlg.AddFilter( aStrFilterType, aStrFilterType ); INetURLObject aFile( SvtPathOptions().GetPalettePath() ); aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -839,7 +839,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickLoadHdl_Impl) IMPL_LINK_NOARG(SvxBitmapTabPage, ClickSaveHdl_Impl) { ::sfx2::FileDialogHelper aDlg( com::sun::star::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 ); - String aStrFilterType( "*.sob" ); + OUString aStrFilterType( "*.sob" ); aDlg.AddFilter( aStrFilterType, aStrFilterType ); INetURLObject aFile( SvtPathOptions().GetPalettePath() ); @@ -904,7 +904,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ChangePixelColorHdl_Impl) m_pBitmapCtl->SetPixelColor( m_pLbColor->GetSelectEntryColor() ); // get bitmap and display it - rXFSet.Put(XFillBitmapItem(String(), Graphic(m_pBitmapCtl->GetBitmapEx()))); + rXFSet.Put(XFillBitmapItem(OUString(), Graphic(m_pBitmapCtl->GetBitmapEx()))); m_pCtlPreview->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlPreview->Invalidate(); @@ -923,7 +923,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ChangeBackgrndColorHdl_Impl) m_pBitmapCtl->SetBackgroundColor( m_pLbBackgroundColor->GetSelectEntryColor() ); // get bitmap and display it - rXFSet.Put(XFillBitmapItem(String(), Graphic(m_pBitmapCtl->GetBitmapEx()))); + rXFSet.Put(XFillBitmapItem(OUString(), Graphic(m_pBitmapCtl->GetBitmapEx()))); m_pCtlPreview->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlPreview->Invalidate(); @@ -941,7 +941,7 @@ void SvxBitmapTabPage::PointChanged( Window* pWindow, RECT_POINT ) m_pBitmapCtl->SetBmpArray( m_pCtlPixel->GetBitmapPixelPtr() ); // get bitmap and display it - rXFSet.Put(XFillBitmapItem(String(), Graphic(m_pBitmapCtl->GetBitmapEx()))); + rXFSet.Put(XFillBitmapItem(OUString(), Graphic(m_pBitmapCtl->GetBitmapEx()))); m_pCtlPreview->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlPreview->Invalidate(); diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index c7aea5c72bf0..65bfec74c450 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -147,7 +147,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickLoadHdl_Impl) if ( nReturn != RET_CANCEL ) { ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 ); - String aStrFilterType( XPropertyList::GetDefaultExtFilter( meType ) ); + OUString aStrFilterType( XPropertyList::GetDefaultExtFilter( meType ) ); aDlg.AddFilter( aStrFilterType, aStrFilterType ); INetURLObject aFile( SvtPathOptions().GetPalettePath() ); @@ -204,7 +204,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickSaveHdl_Impl) ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 ); - String aStrFilterType( XPropertyList::GetDefaultExtFilter( meType ) ); + OUString aStrFilterType( XPropertyList::GetDefaultExtFilter( meType ) ); aDlg.AddFilter( aStrFilterType, aStrFilterType ); INetURLObject aFile( SvtPathOptions().GetPalettePath() ); @@ -307,7 +307,7 @@ SvxColorTabPage::SvxColorTabPage(Window* pParent, const SfxItemSet& rInAttrs) , pPos( NULL ) , pbAreaTP( NULL ) , aXFStyleItem( XFILL_SOLID ) - , aXFillColorItem( String(), Color( COL_BLACK ) ) + , aXFillColorItem( OUString(), Color( COL_BLACK ) ) , aXFillAttr( (XOutdevItemPool*) rInAttrs.GetPool() ) , rXFSet( aXFillAttr.GetItemSet() ) , eCM( CM_RGB ) @@ -450,7 +450,7 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& ) m_pB->SetValue( ColorToPercent_Impl( aAktuellColor.GetBlue() ) ); // fill ItemSet and pass it on to XOut - rXFSet.Put( XFillColorItem( String(), aAktuellColor ) ); + rXFSet.Put( XFillColorItem( OUString(), aAktuellColor ) ); m_pCtlPreviewOld->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlPreviewNew->SetAttributes( aXFillAttr.GetItemSet() ); @@ -511,12 +511,12 @@ long SvxColorTabPage::CheckChanges_Impl() Image aWarningBoxImage = WarningBox::GetStandardImage(); SvxMessDialog* aMessDlg = new SvxMessDialog(GetParentDialog(), SVX_RESSTR( RID_SVXSTR_COLOR ), - String( ResId( RID_SVXSTR_ASK_CHANGE_COLOR, rMgr ) ), + ResId( RID_SVXSTR_ASK_CHANGE_COLOR, rMgr ), &aWarningBoxImage ); aMessDlg->SetButtonText( MESS_BTN_1, - String( ResId( RID_SVXSTR_CHANGE, rMgr ) ) ); + ResId( RID_SVXSTR_CHANGE, rMgr ) ); aMessDlg->SetButtonText( MESS_BTN_2, - String( ResId( RID_SVXSTR_ADD, rMgr ) ) ); + ResId( RID_SVXSTR_ADD, rMgr ) ); short nRet = aMessDlg->Execute(); @@ -561,7 +561,7 @@ sal_Bool SvxColorTabPage::FillItemSet( SfxItemSet& rSet ) if( ( *pDlgType != 0 ) || ( *pPageType == PT_COLOR && *pbAreaTP == sal_False ) ) { - String aString; + OUString aString; Color aColor; sal_uInt16 nPos = m_pLbColor->GetSelectEntryPos(); @@ -607,8 +607,8 @@ void SvxColorTabPage::Reset( const SfxItemSet& rSet ) } // set color model - String aStr = GetUserData(); - m_pLbColorModel->SelectEntryPos( (sal_uInt16) aStr.ToInt32() ); + OUString aStr = GetUserData(); + m_pLbColorModel->SelectEntryPos( (sal_uInt16) aStr.toInt32() ); ChangeColorHdl_Impl( this ); SelectColorModelHdl_Impl( this ); @@ -653,7 +653,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ModifiedHdl_Impl) if (eCM != CM_RGB) ConvertColorValues (aTmpColor, CM_RGB); - rXFSet.Put( XFillColorItem( String(), aTmpColor ) ); + rXFSet.Put( XFillColorItem( OUString(), aTmpColor ) ); m_pCtlPreviewNew->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlPreviewNew->Invalidate(); @@ -672,7 +672,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl) } ResMgr& rMgr = CUI_MGR(); - String aDesc( ResId( RID_SVXSTR_DESC_COLOR, rMgr ) ); + OUString aDesc( ResId( RID_SVXSTR_DESC_COLOR, rMgr ) ); OUString aName( m_pEdtName->GetText() ); XColorEntry* pEntry; long nCount = pColorList->Count(); @@ -747,7 +747,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickModifyHdl_Impl) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { ResMgr& rMgr = CUI_MGR(); - String aDesc( ResId( RID_SVXSTR_DESC_COLOR, rMgr ) ); + OUString aDesc( ResId( RID_SVXSTR_DESC_COLOR, rMgr ) ); OUString aName( m_pEdtName->GetText() ); long nCount = pColorList->Count(); sal_Bool bDifferent = sal_True; @@ -845,7 +845,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickWorkOnHdl_Impl) } // fill ItemSet and pass it on to XOut - rXFSet.Put( XFillColorItem( String(), aPreviewColor ) ); + rXFSet.Put( XFillColorItem( OUString(), aPreviewColor ) ); //m_pCtlPreviewOld->SetAttributes( aXFillAttr ); m_pCtlPreviewNew->SetAttributes( aXFillAttr.GetItemSet() ); @@ -865,7 +865,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickDeleteHdl_Impl) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { QueryBox aQueryBox( GetParentDialog(), WinBits( WB_YES_NO | WB_DEF_NO ), - String( CUI_RES( RID_SVXSTR_ASK_DEL_COLOR ) ) ); + OUString( CUI_RES( RID_SVXSTR_ASK_DEL_COLOR ) ) ); if( aQueryBox.Execute() == RET_YES ) { @@ -904,7 +904,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, SelectColorLBHdl_Impl) m_pValSetColorList->SelectItem( nPos + 1 ); m_pEdtName->SetText( m_pLbColor->GetSelectEntry() ); - rXFSet.Put( XFillColorItem( String(), + rXFSet.Put( XFillColorItem( OUString(), m_pLbColor->GetSelectEntryColor() ) ); m_pCtlPreviewOld->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlPreviewNew->SetAttributes( aXFillAttr.GetItemSet() ); @@ -927,7 +927,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, SelectValSetHdl_Impl) m_pLbColor->SelectEntryPos( nPos - 1 ); m_pEdtName->SetText( m_pLbColor->GetSelectEntry() ); - rXFSet.Put( XFillColorItem( String(), + rXFSet.Put( XFillColorItem( OUString(), m_pLbColor->GetSelectEntryColor() ) ); m_pCtlPreviewOld->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlPreviewNew->SetAttributes( aXFillAttr.GetItemSet() ); @@ -1036,7 +1036,7 @@ long SvxColorTabPage::ChangeColorHdl_Impl( void* ) } // fill ItemSet and pass it on to XOut - rXFSet.Put( XFillColorItem( String(), pEntry->GetColor() ) ); + rXFSet.Put( XFillColorItem( OUString(), pEntry->GetColor() ) ); m_pCtlPreviewOld->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlPreviewNew->SetAttributes( aXFillAttr.GetItemSet() ); diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index cf3c043c45ee..ca003637601c 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -60,7 +60,7 @@ SvxGradientTabPage::SvxGradientTabPage pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ), aXFStyleItem ( XFILL_GRADIENT ), - aXGradientItem ( String(), XGradient( COL_BLACK, COL_WHITE ) ), + aXGradientItem ( OUString(), XGradient( COL_BLACK, COL_WHITE ) ), aXFillAttr ( pXPool ), rXFSet ( aXFillAttr.GetItemSet() ) { @@ -267,9 +267,9 @@ long SvxGradientTabPage::CheckChanges_Impl() &aWarningBoxImage ); DBG_ASSERT(aMessDlg, "Dialogdiet fail!"); aMessDlg->SetButtonText( MESS_BTN_1, - String( ResId( RID_SVXSTR_CHANGE, rMgr ) ) ); + OUString( ResId( RID_SVXSTR_CHANGE, rMgr ) ) ); aMessDlg->SetButtonText( MESS_BTN_2, - String( ResId( RID_SVXSTR_ADD, rMgr ) ) ); + OUString( ResId( RID_SVXSTR_ADD, rMgr ) ) ); short nRet = aMessDlg->Execute(); @@ -313,7 +313,7 @@ sal_Bool SvxGradientTabPage::FillItemSet( SfxItemSet& rSet ) // CheckChanges(); <-- duplicate inquiry ? XGradient* pXGradient = NULL; - String aString; + OUString aString; sal_uInt16 nPos = m_pLbGradients->GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -394,7 +394,7 @@ IMPL_LINK( SvxGradientTabPage, ModifiedHdl_Impl, void *, pControl ) SetControlState_Impl( eXGS ); // displaying in XOutDev - rXFSet.Put( XFillGradientItem( String(), aXGradient ) ); + rXFSet.Put( XFillGradientItem( OUString(), aXGradient ) ); m_pCtlPreview->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlPreview->Invalidate(); @@ -406,8 +406,8 @@ IMPL_LINK( SvxGradientTabPage, ModifiedHdl_Impl, void *, pControl ) IMPL_LINK_NOARG(SvxGradientTabPage, ClickAddHdl_Impl) { - String aNewName( SVX_RES( RID_SVXSTR_GRADIENT ) ); - String aDesc( CUI_RES( RID_SVXSTR_DESC_GRADIENT ) ); + OUString aNewName( SVX_RES( RID_SVXSTR_GRADIENT ) ); + OUString aDesc( CUI_RES( RID_SVXSTR_DESC_GRADIENT ) ); OUString aName; long nCount = pGradientList->Count(); @@ -513,7 +513,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickModifyHdl_Impl) if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { - String aDesc( CUI_RES( RID_SVXSTR_DESC_GRADIENT ) ); + OUString aDesc( CUI_RES( RID_SVXSTR_DESC_GRADIENT ) ); OUString aName( pGradientList->GetGradient( nPos )->GetName() ); OUString aOldName = aName; @@ -584,7 +584,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickDeleteHdl_Impl) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { QueryBox aQueryBox( GetParentDialog(), WinBits( WB_YES_NO | WB_DEF_NO ), - String( CUI_RES( RID_SVXSTR_ASK_DEL_GRADIENT ) ) ); + OUString( CUI_RES( RID_SVXSTR_ASK_DEL_GRADIENT ) ) ); if ( aQueryBox.Execute() == RET_YES ) { @@ -629,7 +629,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickLoadHdl_Impl) if ( nReturn != RET_CANCEL ) { ::sfx2::FileDialogHelper aDlg( com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 ); - String aStrFilterType( "*.sog" ); + OUString aStrFilterType( "*.sog" ); aDlg.AddFilter( aStrFilterType, aStrFilterType ); INetURLObject aFile( SvtPathOptions().GetPalettePath() ); aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -710,7 +710,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickSaveHdl_Impl) { ::sfx2::FileDialogHelper aDlg( com::sun::star::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 ); - String aStrFilterType( "*.sog" ); + OUString aStrFilterType( "*.sog" ); aDlg.AddFilter( aStrFilterType, aStrFilterType ); INetURLObject aFile( SvtPathOptions().GetPalettePath() ); @@ -808,7 +808,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ChangeGradientHdl_Impl) if ( m_pLbColorFrom->GetSelectEntryCount() == 0 ) { m_pLbColorFrom->InsertEntry( pGradient->GetStartColor(), - String() ); + OUString() ); m_pLbColorFrom->SelectEntry( pGradient->GetStartColor() ); } m_pLbColorTo->SetNoSelection(); @@ -816,7 +816,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ChangeGradientHdl_Impl) if ( m_pLbColorTo->GetSelectEntryCount() == 0 ) { - m_pLbColorTo->InsertEntry( pGradient->GetEndColor(), String() ); + m_pLbColorTo->InsertEntry( pGradient->GetEndColor(), OUString() ); m_pLbColorTo->SelectEntry( pGradient->GetEndColor() ); } @@ -831,7 +831,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ChangeGradientHdl_Impl) SetControlState_Impl( eXGS ); // fill ItemSet and pass it on to aCtlPreview - rXFSet.Put( XFillGradientItem( String(), *pGradient ) ); + rXFSet.Put( XFillGradientItem( OUString(), *pGradient ) ); m_pCtlPreview->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlPreview->Invalidate(); diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index 7a665ccc1540..1021f629120a 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -62,7 +62,7 @@ SvxHatchTabPage::SvxHatchTabPage pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ), aXFStyleItem ( XFILL_HATCH ), - aXHatchItem ( String(), XHatch() ), + aXHatchItem ( OUString(), XHatch() ), aXFillAttr ( pXPool ), rXFSet ( aXFillAttr.GetItemSet() ) @@ -243,9 +243,9 @@ long SvxHatchTabPage::CheckChanges_Impl() &aWarningBoxImage ); DBG_ASSERT(aMessDlg, "Dialogdiet fail!"); aMessDlg->SetButtonText( MESS_BTN_1, - String( ResId( RID_SVXSTR_CHANGE, rMgr ) ) ); + OUString( ResId( RID_SVXSTR_CHANGE, rMgr ) ) ); aMessDlg->SetButtonText( MESS_BTN_2, - String( ResId( RID_SVXSTR_ADD, rMgr ) ) ); + OUString( ResId( RID_SVXSTR_ADD, rMgr ) ) ); short nRet = aMessDlg->Execute(); @@ -286,7 +286,7 @@ sal_Bool SvxHatchTabPage::FillItemSet( SfxItemSet& rSet ) // CheckChanges(); <-- duplicate inquiry ? XHatch* pXHatch = NULL; - String aString; + OUString aString; sal_uInt16 nPos = m_pLbHatchings->GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -370,7 +370,7 @@ IMPL_LINK( SvxHatchTabPage, ModifiedHdl_Impl, void *, p ) GetCoreValue( *m_pMtrDistance, ePoolUnit ), static_cast<long>(m_pMtrAngle->GetValue() * 10) ); - rXFSet.Put( XFillHatchItem( String(), aXHatch ) ); + rXFSet.Put( XFillHatchItem( OUString(), aXHatch ) ); m_pCtlPreview->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlPreview->Invalidate(); @@ -416,7 +416,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ChangeHatchHdl_Impl) m_pLbLineColor->SelectEntry( pHatch->GetColor() ); if( m_pLbLineColor->GetSelectEntryCount() == 0 ) { - m_pLbLineColor->InsertEntry( pHatch->GetColor(), String() ); + m_pLbLineColor->InsertEntry( pHatch->GetColor(), OUString() ); m_pLbLineColor->SelectEntry( pHatch->GetColor() ); } SetMetricValue( *m_pMtrDistance, pHatch->GetDistance(), ePoolUnit ); @@ -436,7 +436,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ChangeHatchHdl_Impl) } // fill ItemSet and pass it on to m_pCtlPreview - rXFSet.Put( XFillHatchItem( String(), *pHatch ) ); + rXFSet.Put( XFillHatchItem( OUString(), *pHatch ) ); m_pCtlPreview->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlPreview->Invalidate(); @@ -455,8 +455,8 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ChangeHatchHdl_Impl) IMPL_LINK_NOARG(SvxHatchTabPage, ClickAddHdl_Impl) { - String aNewName( SVX_RES( RID_SVXSTR_HATCH ) ); - String aDesc( CUI_RES( RID_SVXSTR_DESC_HATCH ) ); + OUString aNewName( SVX_RES( RID_SVXSTR_HATCH ) ); + OUString aDesc( CUI_RES( RID_SVXSTR_DESC_HATCH ) ); OUString aName; long nCount = pHatchingList->Count(); @@ -556,7 +556,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickModifyHdl_Impl) if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { - String aDesc( CUI_RES( RID_SVXSTR_DESC_HATCH ) ); + OUString aDesc( CUI_RES( RID_SVXSTR_DESC_HATCH ) ); OUString aName( pHatchingList->GetHatch( nPos )->GetName() ); OUString aOldName = aName; @@ -627,7 +627,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickDeleteHdl_Impl) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { QueryBox aQueryBox( GetParentDialog(), WinBits( WB_YES_NO | WB_DEF_NO ), - String( CUI_RES( RID_SVXSTR_ASK_DEL_HATCH ) ) ); + OUString( CUI_RES( RID_SVXSTR_ASK_DEL_HATCH ) ) ); if( aQueryBox.Execute() == RET_YES ) { @@ -672,7 +672,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickLoadHdl_Impl) if ( nReturn != RET_CANCEL ) { ::sfx2::FileDialogHelper aDlg( com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 ); - String aStrFilterType( "*.soh" ); + OUString aStrFilterType( "*.soh" ); aDlg.AddFilter( aStrFilterType, aStrFilterType ); INetURLObject aFile( SvtPathOptions().GetPalettePath() ); aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -743,7 +743,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickLoadHdl_Impl) IMPL_LINK_NOARG(SvxHatchTabPage, ClickSaveHdl_Impl) { ::sfx2::FileDialogHelper aDlg( com::sun::star::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 ); - String aStrFilterType( "*.soh" ); + OUString aStrFilterType( "*.soh" ); aDlg.AddFilter( aStrFilterType, aStrFilterType ); INetURLObject aFile( SvtPathOptions().GetPalettePath() ); diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index b490bd440f06..57d612f1d9e7 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -60,8 +60,8 @@ SvxLineDefTabPage::SvxLineDefTabPage pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ), aXLStyle ( XLINE_DASH ), aXWidth ( XOUT_WIDTH ), - aXDash ( String(), XDash( XDASH_RECT, 3, 7, 2, 40, 15 ) ), - aXColor ( String(), COL_BLACK ), + aXDash ( OUString(), XDash( XDASH_RECT, 3, 7, 2, 40, 15 ) ), + aXColor ( OUString(), COL_BLACK ), aXLineAttr ( pXPool ), rXLSet ( aXLineAttr.GetItemSet() ) { @@ -217,11 +217,11 @@ void SvxLineDefTabPage::CheckChanges_Impl() Image aWarningBoxImage = WarningBox::GetStandardImage(); SvxMessDialog* aMessDlg = new SvxMessDialog(GetParentDialog(), SVX_RESSTR( RID_SVXSTR_LINESTYLE ), - String( ResId( RID_SVXSTR_ASK_CHANGE_LINESTYLE, rMgr ) ), + OUString( ResId( RID_SVXSTR_ASK_CHANGE_LINESTYLE, rMgr ) ), &aWarningBoxImage ); DBG_ASSERT(aMessDlg, "Dialogdiet fail!"); - aMessDlg->SetButtonText( MESS_BTN_1, String( ResId( RID_SVXSTR_CHANGE, rMgr ) ) ); - aMessDlg->SetButtonText( MESS_BTN_2, String( ResId( RID_SVXSTR_ADD, rMgr ) ) ); + aMessDlg->SetButtonText( MESS_BTN_1, OUString( ResId( RID_SVXSTR_CHANGE, rMgr ) ) ); + aMessDlg->SetButtonText( MESS_BTN_2, OUString( ResId( RID_SVXSTR_ADD, rMgr ) ) ); short nRet = aMessDlg->Execute(); @@ -264,7 +264,7 @@ sal_Bool SvxLineDefTabPage::FillItemSet( SfxItemSet& rAttrs ) { FillDash_Impl(); - String aString( m_pLbLineStyles->GetSelectEntry() ); + OUString aString( m_pLbLineStyles->GetSelectEntry() ); rAttrs.Put( XLineStyleItem( XLINE_DASH ) ); rAttrs.Put( XLineDashItem( aString, aDash ) ); } @@ -343,7 +343,7 @@ IMPL_LINK( SvxLineDefTabPage, SelectLinestyleHdl_Impl, void *, p ) FillDialog_Impl(); - rXLSet.Put( XLineDashItem( String(), aDash ) ); + rXLSet.Put( XLineDashItem( OUString(), aDash ) ); // #i34740# m_pCtlPreview->SetLineAttributes(aXLineAttr.GetItemSet()); @@ -522,8 +522,8 @@ IMPL_LINK( SvxLineDefTabPage, SelectTypeHdl_Impl, void *, p ) IMPL_LINK_NOARG(SvxLineDefTabPage, ClickAddHdl_Impl) { ResMgr& rMgr = CUI_MGR(); - String aNewName( SVX_RES( RID_SVXSTR_LINESTYLE ) ); - String aDesc( ResId( RID_SVXSTR_DESC_LINESTYLE, rMgr ) ); + OUString aNewName( SVX_RES( RID_SVXSTR_LINESTYLE ) ); + OUString aDesc( ResId( RID_SVXSTR_DESC_LINESTYLE, rMgr ) ); OUString aName; XDashEntry* pEntry; @@ -617,7 +617,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickModifyHdl_Impl) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { ResMgr& rMgr = CUI_MGR(); - String aDesc( ResId( RID_SVXSTR_DESC_LINESTYLE, rMgr ) ); + OUString aDesc( ResId( RID_SVXSTR_DESC_LINESTYLE, rMgr ) ); OUString aName( pDashList->GetDash( nPos )->GetName() ); OUString aOldName = aName; @@ -736,7 +736,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl) if ( nReturn != RET_CANCEL ) { ::sfx2::FileDialogHelper aDlg( com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 ); - String aStrFilterType( "*.sod" ); + OUString aStrFilterType( "*.sod" ); aDlg.AddFilter( aStrFilterType, aStrFilterType ); INetURLObject aFile( SvtPathOptions().GetPalettePath() ); aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -795,7 +795,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl) IMPL_LINK_NOARG(SvxLineDefTabPage, ClickSaveHdl_Impl) { ::sfx2::FileDialogHelper aDlg( com::sun::star::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 ); - String aStrFilterType( "*.sod" ); + OUString aStrFilterType( "*.sod" ); aDlg.AddFilter( aStrFilterType, aStrFilterType ); INetURLObject aFile( SvtPathOptions().GetPalettePath() ); @@ -855,7 +855,7 @@ void SvxLineDefTabPage::FillDash_Impl() aDash.SetDashLen( m_pLbType2->GetSelectEntryPos() == 0 ? 0 : GetCoreValue( *m_pMtrLength2, ePoolUnit ) ); aDash.SetDistance( GetCoreValue( *m_pMtrDistance, ePoolUnit ) ); - rXLSet.Put( XLineDashItem( String(), aDash ) ); + rXLSet.Put( XLineDashItem( OUString(), aDash ) ); // #i34740# m_pCtlPreview->SetLineAttributes(aXLineAttr.GetItemSet()); diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index f3ee496b4ba3..570eca909429 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -63,7 +63,7 @@ SvxLineEndDefTabPage::SvxLineEndDefTabPage pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ), aXLStyle ( XLINE_SOLID ), aXWidth ( XOUT_WIDTH ), - aXColor ( String(), COL_BLACK ), + aXColor ( OUString(), COL_BLACK ), aXLineAttr ( pXPool ), rXLSet ( aXLineAttr.GetItemSet() ), pLineEndList ( NULL ) diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index fb730ff5dfb6..19e88c882429 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -141,7 +141,7 @@ SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs } else { - rXFSet.Put( XFillColorItem( String(), COL_LIGHTRED ) ); + rXFSet.Put( XFillColorItem( OUString(), COL_LIGHTRED ) ); } if(XFILL_NONE == eXFS) @@ -500,7 +500,7 @@ IMPL_LINK_NOARG(SvxShadowTabPage, ModifyShadowHdl_Impl) sal_uInt16 nPos = m_pLbShadowColor->GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - rXFSet.Put( XFillColorItem( String(), m_pLbShadowColor->GetSelectEntryColor() ) ); + rXFSet.Put( XFillColorItem( OUString(), m_pLbShadowColor->GetSelectEntryColor() ) ); } sal_uInt16 nVal = (sal_uInt16)m_pMtrTransparent->GetValue(); XFillTransparenceItem aItem( nVal ); diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index 5e64bd9dc4c8..45f224f929f0 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -307,7 +307,7 @@ void SvxAngleTabPage::Reset(const SfxItemSet& rAttrs) } else { - m_pMtrPosX->SetText( String() ); + m_pMtrPosX->SetText( OUString() ); } pItem = GetItem(rAttrs, SID_ATTR_TRANSFORM_ROT_Y); @@ -318,7 +318,7 @@ void SvxAngleTabPage::Reset(const SfxItemSet& rAttrs) } else { - m_pMtrPosY->SetText( String() ); + m_pMtrPosY->SetText( OUString() ); } pItem = GetItem( rAttrs, SID_ATTR_TRANSFORM_ANGLE ); @@ -479,7 +479,7 @@ void SvxSlantTabPage::Construct() sal_Bool SvxSlantTabPage::FillItemSet(SfxItemSet& rAttrs) { sal_Bool bModified = sal_False; - String aStr = m_pMtrRadius->GetText(); + OUString aStr = m_pMtrRadius->GetText(); if( aStr != m_pMtrRadius->GetSavedValue() ) { @@ -999,8 +999,8 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet& ) m_pTsbAutoGrowHeight->SetState( STATE_DONTKNOW ); // Is matching set? - String aStr = GetUserData(); - m_pCbxScale->Check( (sal_Bool)aStr.ToInt32() ); + OUString aStr = GetUserData(); + m_pCbxScale->Check( (sal_Bool)aStr.toInt32() ); m_pTsbSizeProtect->SaveValue(); m_pTsbAutoGrowWidth->SaveValue(); |