diff options
Diffstat (limited to 'cui/source/customize')
-rw-r--r-- | cui/source/customize/acccfg.cxx | 42 | ||||
-rw-r--r-- | cui/source/customize/cfg.cxx | 71 | ||||
-rw-r--r-- | cui/source/customize/cfgutil.cxx | 60 | ||||
-rw-r--r-- | cui/source/customize/eventdlg.cxx | 4 | ||||
-rw-r--r-- | cui/source/customize/macropg.cxx | 20 | ||||
-rw-r--r-- | cui/source/customize/macropg_impl.hxx | 4 | ||||
-rw-r--r-- | cui/source/customize/selector.cxx | 16 |
7 files changed, 106 insertions, 111 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() ); |