diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-12-01 17:30:38 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-12-01 17:30:38 +0000 |
commit | b5d79ba0c2c3a07331406eb0f3bbb3d40986320f (patch) | |
tree | 316e92b8935ce9711ca450c054511b9a0bca764f /sw/source/ui/shells | |
parent | eb1e977a36bfeebf17c57a167238c610c74be783 (diff) | |
parent | 5edc2d8ffaf658b05e4b044e44bd360697c3d08c (diff) |
chartshapes: merge with DEV300 m50
Diffstat (limited to 'sw/source/ui/shells')
-rwxr-xr-x | sw/source/ui/shells/annotsh.cxx | 54 | ||||
-rw-r--r-- | sw/source/ui/shells/basesh.cxx | 17 | ||||
-rw-r--r-- | sw/source/ui/shells/drwbassh.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/shells/drwtxtsh.cxx | 57 | ||||
-rw-r--r-- | sw/source/ui/shells/tabsh.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/shells/textfld.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/shells/textsh.cxx | 47 | ||||
-rw-r--r-- | sw/source/ui/shells/textsh1.cxx | 14 | ||||
-rw-r--r-- | sw/source/ui/shells/txtattr.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/shells/txtcrsr.cxx | 1 |
10 files changed, 125 insertions, 77 deletions
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index 9dc28b6e442a..b4a4491c220d 100755 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -351,7 +351,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) rReq.Done(); break; } - case FN_INSERT_SYMBOL: + case SID_CHARMAP: { if (pPostItMgr->GetActivePostIt()->GetStatus()!=SwPostItHelper::DELETED) InsertSymbol(rReq); @@ -1505,7 +1505,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = 0; if( pArgs ) - pArgs->GetItemState(GetPool().GetWhich(FN_INSERT_SYMBOL), FALSE, &pItem); + pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem); String sSym; String sFontName; @@ -1513,7 +1513,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) { sSym = ((const SfxStringItem*)pItem)->GetValue(); const SfxPoolItem* pFtItem = NULL; - pArgs->GetItemState( GetPool().GetWhich(FN_PARAM_1), FALSE, &pFtItem); + pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem); const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem ); if ( pFontItem ) sFontName = pFontItem->GetValue(); @@ -1532,36 +1532,50 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) aSetDlgFont = (SvxFontItem&)aSet.Get( GetWhichOfScript( SID_ATTR_CHAR_FONT, GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) )); + if (!sFontName.Len()) + sFontName = aSetDlgFont.GetFamilyName(); } - Font aFont(sFontName, Size(1,1)); - if(!sSym.Len()) + if( !sSym.Len() ) { - //CHINA001 SvxCharacterMap* pDlg = new SvxCharacterMap( NULL, FALSE ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "Dialogdiet fail!");//CHINA001 - AbstractSvxCharacterMap* pDlg = pFact->CreateSvxCharacterMap( NULL, RID_SVXDLG_CHARMAP, FALSE ); - DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 - Font aDlgFont( pDlg->GetCharFont() ); + SfxAllItemSet aAllSet( GetPool() ); + aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) ); + SwViewOption aOpt(*rView.GetWrtShell().GetViewOptions()); String sSymbolFont = aOpt.GetSymbolFont(); - if(sSymbolFont.Len()) - aDlgFont.SetName(sSymbolFont); + if( sSymbolFont.Len() ) + aAllSet.Put( SfxStringItem( SID_FONT_NAME, sSymbolFont ) ); else - aDlgFont.SetName( aSetDlgFont.GetFamilyName() ); + aAllSet.Put( SfxStringItem( SID_FONT_NAME, aSetDlgFont.GetFamilyName() ) ); // Wenn Zeichen selektiert ist kann es angezeigt werden - pDlg->SetFont( aDlgFont ); + SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet, + rView.GetViewFrame()->GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP ); + USHORT nResult = pDlg->Execute(); if( nResult == RET_OK ) { - aFont = pDlg->GetCharFont(); - sSym = pDlg->GetCharacters(); - aOpt.SetSymbolFont(aFont.GetName()); - SW_MOD()->ApplyUsrPref(aOpt, &rView); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE ); + if ( pFontItem ) + { + aFont.SetName( pFontItem->GetFamilyName() ); + aFont.SetStyleName( pFontItem->GetStyleName() ); + aFont.SetCharSet( pFontItem->GetCharSet() ); + aFont.SetPitch( pFontItem->GetPitch() ); + } + + if ( pCItem ) + { + sSym = pCItem->GetValue(); + aOpt.SetSymbolFont(aFont.GetName()); + SW_MOD()->ApplyUsrPref(aOpt, &rView); + } } + delete( pDlg ); } @@ -1611,9 +1625,9 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) pOutliner->SetUpdateMode(TRUE); pOLV->ShowCursor(); - rReq.AppendItem( SfxStringItem( GetPool().GetWhich(FN_INSERT_SYMBOL), sSym ) ); + rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), sSym ) ); if(aFont.GetName().Len()) - rReq.AppendItem( SfxStringItem( FN_PARAM_1, aFont.GetName() ) ); + rReq.AppendItem( SfxStringItem( SID_ATTR_SPECIALCHAR, aFont.GetName() ) ); rReq.Done(); } } diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index e46fbe523f77..66276be3e4ff 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -102,7 +102,6 @@ #endif #include <viewopt.hxx> #include <fontcfg.hxx> -#include <bookmrk.hxx> #include <docstat.hxx> #include <usrfld.hxx> #include <expfld.hxx> @@ -2439,7 +2438,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) RES_BOX , RES_SHADOW, SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0 ); - AbstractSfxSingleTabDialog * pDlg = 0; + SfxAbstractDialog * pDlg = 0; // Tabellenzelle(n) selektiert? if ( rSh.IsTableMode() ) { @@ -2505,7 +2504,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) SfxItemSet aSet( rSh.GetAttrPool(), RES_BACKGROUND, RES_BACKGROUND ); - AbstractSfxSingleTabDialog * pDlg = 0; + SfxAbstractDialog * pDlg = 0; SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); @@ -2516,7 +2515,9 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) //Hintergrundattribute der Tabelle holen und in den Set packen SvxBrushItem aBrush(RES_BACKGROUND); rSh.GetBoxBackground( aBrush ); - pDlg = pFact->CreateSfxSingleTabDialog( pMDI, aSet, RC_SWDLG_BACKGROUND ); + pDlg = pFact->CreateSfxDialog( pMDI, aSet, + rView.GetViewFrame()->GetFrame()->GetFrameInterface(), + RC_SWDLG_BACKGROUND ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); aSet.Put( aBrush ); if ( pDlg->Execute() == RET_OK ) @@ -2533,7 +2534,9 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) rSh.GetFlyFrmAttr( aSet ); - pDlg = pFact->CreateSfxSingleTabDialog( pMDI, aSet, RC_SWDLG_BACKGROUND ); + pDlg = pFact->CreateSfxDialog( pMDI, aSet, + rView.GetViewFrame()->GetFrame()->GetFrameInterface(), + RC_SWDLG_BACKGROUND ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if ( pDlg->Execute() == RET_OK ) { @@ -2546,7 +2549,9 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) // Umrandungsattribute ganz normal ueber Shell setzen rSh.GetCurAttr( aSet ); - pDlg = pFact->CreateSfxSingleTabDialog( pMDI, aSet, RC_SWDLG_BACKGROUND ); + pDlg = pFact->CreateSfxDialog( pMDI, aSet, + rView.GetViewFrame()->GetFrame()->GetFrameInterface(), + RC_SWDLG_BACKGROUND ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if ( pDlg->Execute() == RET_OK ) { diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx index 1e9ea6189d97..725d5239e6fe 100644 --- a/sw/source/ui/shells/drwbassh.cxx +++ b/sw/source/ui/shells/drwbassh.cxx @@ -193,7 +193,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); - AbstractSfxSingleTabDialog* pDlg = pFact->CreateSwWrapDlg( GetView().GetWindow(), aSet, pSh, TRUE, RC_DLG_SWWRAPDLG ); + SfxAbstractDialog* pDlg = pFact->CreateSwWrapDlg( GetView().GetWindow(), aSet, pSh, TRUE, RC_DLG_SWWRAPDLG ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if (pDlg->Execute() == RET_OK) diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx index e033f7c7c3f7..a0f38300fba2 100644 --- a/sw/source/ui/shells/drwtxtsh.cxx +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -38,7 +38,6 @@ #include <svx/langitem.hxx> #include <svx/svdview.hxx> #include <vcl/msgbox.hxx> -#include <svx/charmap.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/objface.hxx> #include <svx/svdotext.hxx> @@ -140,6 +139,9 @@ void SwDrawTextShell::Init() SwWrtShell &rSh = GetShell(); pSdrView = rSh.GetDrawView(); SdrOutliner * pOutliner = pSdrView->GetTextEditOutliner(); + //#97471# mouse click _and_ key input at the same time + if( !pOutliner ) + return ; OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView(); ULONG nCtrl = pOutliner->GetControlWord(); nCtrl |= EE_CNTRL_AUTOCORRECT; @@ -526,7 +528,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq) rReq.Done(); } break; - case FN_INSERT_SYMBOL: + case SID_CHARMAP: { // Sonderzeichen einfuegen InsertSymbol(rReq); break; @@ -776,7 +778,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = 0; if( pArgs ) - pArgs->GetItemState(GetPool().GetWhich(FN_INSERT_SYMBOL), FALSE, &pItem); + pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem); String sSym; String sFontName; @@ -784,7 +786,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) { sSym = ((const SfxStringItem*)pItem)->GetValue(); const SfxPoolItem* pFtItem = NULL; - pArgs->GetItemState( GetPool().GetWhich(FN_PARAM_1), FALSE, &pFtItem); + pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem); const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem ); if ( pFontItem ) sFontName = pFontItem->GetValue(); @@ -803,35 +805,48 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) aSetDlgFont = (SvxFontItem&)aSet.Get( GetWhichOfScript( SID_ATTR_CHAR_FONT, GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) )); + if (!sFontName.Len()) + sFontName = aSetDlgFont.GetFamilyName(); } - Font aFont(sFontName, Size(1,1)); if(!sSym.Len()) { - SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxCharacterMap* pDlg = pFact->CreateSvxCharacterMap( NULL, RID_SVXDLG_CHARMAP, FALSE ); - DBG_ASSERT(pDlg, "Dialogdiet fail!"); + SfxAllItemSet aAllSet( GetPool() ); + aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) ); - Font aDlgFont( pDlg->GetCharFont() ); - SwViewOption aOpt(*GetShell().GetViewOptions()); + SwViewOption aOpt(*rView.GetWrtShell().GetViewOptions()); String sSymbolFont = aOpt.GetSymbolFont(); - if(sSymbolFont.Len()) - aDlgFont.SetName(sSymbolFont); + if( sSymbolFont.Len() ) + aAllSet.Put( SfxStringItem( SID_FONT_NAME, sSymbolFont ) ); else - aDlgFont.SetName( aSetDlgFont.GetFamilyName() ); + aAllSet.Put( SfxStringItem( SID_FONT_NAME, aSetDlgFont.GetFamilyName() ) ); // Wenn Zeichen selektiert ist kann es angezeigt werden - pDlg->SetFont( aDlgFont ); + SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); + SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet, + rView.GetViewFrame()->GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP ); USHORT nResult = pDlg->Execute(); if( nResult == RET_OK ) { - aFont = pDlg->GetCharFont(); - sSym = pDlg->GetCharacters(); - aOpt.SetSymbolFont(aFont.GetName()); - SW_MOD()->ApplyUsrPref(aOpt, &GetView()); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE ); + if ( pFontItem ) + { + aFont.SetName( pFontItem->GetFamilyName() ); + aFont.SetStyleName( pFontItem->GetStyleName() ); + aFont.SetCharSet( pFontItem->GetCharSet() ); + aFont.SetPitch( pFontItem->GetPitch() ); + } + + if ( pCItem ) + { + sSym = pCItem->GetValue(); + aOpt.SetSymbolFont(aFont.GetName()); + SW_MOD()->ApplyUsrPref(aOpt, &rView); + } } + delete( pDlg ); } @@ -881,9 +896,9 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) pOutliner->SetUpdateMode(TRUE); pOLV->ShowCursor(); - rReq.AppendItem( SfxStringItem( GetPool().GetWhich(FN_INSERT_SYMBOL), sSym ) ); + rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), sSym ) ); if(aFont.GetName().Len()) - rReq.AppendItem( SfxStringItem( FN_PARAM_1, aFont.GetName() ) ); + rReq.AppendItem( SfxStringItem( SID_ATTR_SPECIALCHAR, aFont.GetName() ) ); rReq.Done(); } } diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx index 9ef066f81953..3c1d84666c7a 100644 --- a/sw/source/ui/shells/tabsh.cxx +++ b/sw/source/ui/shells/tabsh.cxx @@ -749,7 +749,9 @@ void SwTableShell::Execute(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); - AbstractSfxSingleTabDialog* pDlg = pFact->CreateSfxSingleTabDialog( GetView().GetWindow(),aCoreSet, RC_DLG_SWNUMFMTDLG ); + SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( GetView().GetWindow(),aCoreSet, + pView->GetViewFrame()->GetFrame()->GetFrameInterface(), + RC_DLG_SWNUMFMTDLG ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if (RET_OK == pDlg->Execute()) diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx index b64170ca89e8..599be5f1f1e1 100644 --- a/sw/source/ui/shells/textfld.cxx +++ b/sw/source/ui/shells/textfld.cxx @@ -156,7 +156,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); - AbstractSfxSingleTabDialog* pDlg = pFact->CreateSwFldEditDlg( GetView(),RC_DLG_SWFLDEDITDLG ); + SfxAbstractDialog* pDlg = pFact->CreateSwFldEditDlg( GetView(),RC_DLG_SWFLDEDITDLG ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); pDlg->Execute(); delete pDlg; diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 415011de4d89..f0874a954b97 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -52,7 +52,6 @@ #include <sfx2/fcontnr.hxx> #include <svx/hlnkitem.hxx> #include <svx/srchitem.hxx> -#include <svx/charmap.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/docfile.hxx> #include <svtools/urihelper.hxx> @@ -1107,14 +1106,14 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = 0; if( pArgs ) - pArgs->GetItemState(GetPool().GetWhich(FN_INSERT_SYMBOL), FALSE, &pItem); + pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem); String aChars, aFontName; if ( pItem ) { aChars = ((const SfxStringItem*)pItem)->GetValue(); const SfxPoolItem* pFtItem = NULL; - pArgs->GetItemState( GetPool().GetWhich(FN_PARAM_1), FALSE, &pFtItem); + pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem); const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem ); if ( pFontItem ) aFontName = pFontItem->GetValue(); @@ -1139,33 +1138,45 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) aFont = (SvxFontItem&)aSet.Get( GetWhichOfScript( RES_CHRATR_FONT, GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) )); + if (!aFontName.Len()) + aFontName = aFont.GetFamilyName(); } Font aNewFont(aFontName, Size(1,1)); // Size nur wg. CTOR if( !aChars.Len() ) { // Eingestellten Font als Default - SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxCharacterMap* pDlg = pFact->CreateSvxCharacterMap( &GetView().GetViewFrame()->GetWindow(), RID_SVXDLG_CHARMAP, FALSE ); - DBG_ASSERT(pDlg, "Dialogdiet fail!"); + SfxAllItemSet aAllSet( rSh.GetAttrPool() ); + aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) ); - Font aDlgFont( pDlg->GetCharFont() ); SwViewOption aOpt(*GetShell().GetViewOptions()); String sSymbolFont = aOpt.GetSymbolFont(); if( !aFontName.Len() && sSymbolFont.Len() ) - aDlgFont.SetName(sSymbolFont); + aAllSet.Put( SfxStringItem( SID_FONT_NAME, sSymbolFont ) ); else - aDlgFont.SetName( aFont.GetFamilyName() ); - - pDlg->SetCharFont( aDlgFont ); + aAllSet.Put( SfxStringItem( SID_FONT_NAME, aFont.GetFamilyName() ) ); + SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); + SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( GetView().GetWindow(), aAllSet, + GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), RID_SVXDLG_CHARMAP ); if( RET_OK == pDlg->Execute() ) { - aChars = pDlg->GetCharacters(); - aNewFont = pDlg->GetCharFont(); - aOpt.SetSymbolFont(aNewFont.GetName()); - SW_MOD()->ApplyUsrPref(aOpt, &GetView()); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE ); + if ( pFontItem ) + { + aNewFont.SetName( pFontItem->GetFamilyName() ); + aNewFont.SetStyleName( pFontItem->GetStyleName() ); + aNewFont.SetCharSet( pFontItem->GetCharSet() ); + aNewFont.SetPitch( pFontItem->GetPitch() ); + } + + if ( pCItem ) + { + aChars = pCItem->GetValue(); + aOpt.SetSymbolFont(aNewFont.GetName()); + SW_MOD()->ApplyUsrPref(aOpt, &GetView()); + } } delete pDlg; @@ -1257,8 +1268,8 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) if ( aChars.Len() ) { - rReq.AppendItem( SfxStringItem( GetPool().GetWhich(FN_INSERT_SYMBOL), aChars ) ); - rReq.AppendItem( SfxStringItem( FN_PARAM_1, aNewFont.GetName() ) ); + rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), aChars ) ); + rReq.AppendItem( SfxStringItem( SID_ATTR_SPECIALCHAR, aNewFont.GetName() ) ); rReq.Done(); } } diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index 92fee69b7bb6..8928a505dd87 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -78,7 +78,7 @@ #include <fmthdft.hxx> #include <pagedesc.hxx> #include <textsh.hxx> -#include <bookmrk.hxx> +#include <IMark.hxx> #include <swdtflvr.hxx> #include <docstat.hxx> #include <outline.hxx> @@ -399,7 +399,7 @@ void SwTextShell::Execute(SfxRequest &rReq) break; } - case FN_INSERT_SYMBOL: + case SID_CHARMAP: { InsertSymbol( rReq ); } @@ -567,8 +567,7 @@ void SwTextShell::Execute(SfxRequest &rReq) { if ( pItem ) { - String sName = ((SfxStringItem*)pItem)->GetValue(); - rWrtSh.MakeUniqueBookmarkName(sName); + ::rtl::OUString sName = ((SfxStringItem*)pItem)->GetValue(); rWrtSh.SetBookmark( KeyCode(), sName, aEmptyStr ); } else @@ -587,7 +586,10 @@ void SwTextShell::Execute(SfxRequest &rReq) case FN_DELETE_BOOKMARK: { if ( pItem ) - rWrtSh.DelBookmark( ((SfxStringItem*)pItem)->GetValue() ); + { + IDocumentMarkAccess* const pMarkAccess = rWrtSh.getIDocumentMarkAccess(); + pMarkAccess->deleteMark( pMarkAccess->findMark(((SfxStringItem*)pItem)->GetValue()) ); + } break; } case FN_AUTOFORMAT_REDLINE_APPLY: @@ -1376,7 +1378,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) rSh.IsNumRuleStart())); break; case FN_EDIT_FORMULA: - case FN_INSERT_SYMBOL: + case SID_CHARMAP: { const int nType = rSh.GetSelectionType(); if (!(nType & nsSelectionType::SEL_TXT) && diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx index 3e6f7eed80b6..8e30123a192b 100644 --- a/sw/source/ui/shells/txtattr.cxx +++ b/sw/source/ui/shells/txtattr.cxx @@ -54,7 +54,6 @@ #include <svx/frmdiritem.hxx> #include "paratr.hxx" - #include <fmtinfmt.hxx> #ifndef _DOCSH_HXX #include <docsh.hxx> @@ -564,7 +563,8 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); - AbstractSfxSingleTabDialog* pDlg = pFact->CreateSfxSingleTabDialog( GetView().GetWindow(), aSet,DLG_SWDROPCAPS ); + SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( GetView().GetWindow(), aSet, + rSh.GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), DLG_SWDROPCAPS ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if (pDlg->Execute() == RET_OK) { diff --git a/sw/source/ui/shells/txtcrsr.cxx b/sw/source/ui/shells/txtcrsr.cxx index f7247baf0255..19b36367d49f 100644 --- a/sw/source/ui/shells/txtcrsr.cxx +++ b/sw/source/ui/shells/txtcrsr.cxx @@ -48,7 +48,6 @@ #include <textsh.hxx> #endif #include <num.hxx> -#include <bookmrk.hxx> #include <edtwin.hxx> #include <crsskip.hxx> |