[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - chart2/source cui/source include/svx sc/source sd/source svx/source sw/source

Caolán McNamara caolanm at redhat.com
Wed Mar 7 12:20:45 UTC 2018


 chart2/source/controller/main/ChartController_TextEdit.cxx |    2 -
 cui/source/dialogs/cuicharmap.cxx                          |   15 +++++++++++++
 cui/source/factory/dlgfact.cxx                             |    5 +---
 cui/source/factory/dlgfact.hxx                             |    2 -
 include/svx/svxdlg.hxx                                     |    3 +-
 sc/source/ui/drawfunc/drawsh.cxx                           |    2 -
 sc/source/ui/view/cellsh1.cxx                              |    2 -
 sc/source/ui/view/viewutil.cxx                             |    2 -
 sd/source/ui/func/fubullet.cxx                             |    2 -
 svx/source/dialog/imapwnd.cxx                              |    2 -
 sw/source/ui/dialog/macassgn.cxx                           |    2 -
 sw/source/ui/misc/glossary.cxx                             |    2 -
 sw/source/ui/misc/insfnote.cxx                             |    2 -
 sw/source/ui/misc/srtdlg.cxx                               |    2 -
 sw/source/uibase/shells/annotsh.cxx                        |    2 -
 sw/source/uibase/shells/drwtxtsh.cxx                       |    2 -
 sw/source/uibase/shells/textsh.cxx                         |    2 -
 17 files changed, 33 insertions(+), 18 deletions(-)

New commits:
commit 80dafc57786b6e342468cea227e25fd17ac6dd10
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 5 17:13:12 2018 +0000

    Resolves: tdf#113805 insert special character fails in insert footnote...
    
    etc. dialogs
    
    i.e. since
    
    commit 710a39414569995bd5a8631a948c939dc73bcef9
    Date:   Thu May 11 13:27:38 2017 +0530
    
        GSoC: Glyph View and Recent Characters Control in Special Characters dialog
    
        Change-Id: Ia55f3fefe7c14327cff2e996ab0038dc52f9b017
    
    it inserts into the document, extend the fix of
    
    commit 4020945651b4f3c636980e2103db440b5c55459c
    Author: Daniel <danielfaleirosilva at gmail.com>
    Date:   Sun Sep 24 17:55:19 2017 -0300
    
        tdf#111739 fix Selecting a custom character as a bullet symbol insertion
    
    to do the old thing that existing code depends on if this is not an
    "insert" dialog, and bubble that setting around from the callers
    
    Change-Id: Id8acf16955d0167beffae43e3b201e500ee7a929
    Reviewed-on: https://gerrit.libreoffice.org/50781
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-on: https://gerrit.libreoffice.org/50799
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx
index 9c129617fc6a..75bacdb8c316 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -167,7 +167,7 @@ void ChartController::executeDispatch_InsertSpecialCharacter()
     vcl::Font aCurFont = m_pDrawViewWrapper->getOutliner()->GetRefDevice()->GetFont();
     aSet.Put( SvxFontItem( aCurFont.GetFamilyType(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), SID_ATTR_CHAR_FONT ) );
 
-    ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( GetChartWindow(), aSet, getFrame(), RID_SVXDLG_CHARMAP ));
+    ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( GetChartWindow(), aSet, getFrame(), RID_SVXDLG_CHARMAP, false ));
     OSL_ENSURE( pDlg, "Couldn't create SvxCharacterMap dialog" );
     if( pDlg->Execute() == RET_OK )
     {
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index 1058b70a795d..0bc4db911c28 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -43,6 +43,7 @@
 #include <sfx2/request.hxx>
 #include <sfx2/sfxsids.hrc>
 #include <sfx2/app.hxx>
+#include <svx/svxids.hrc>
 #include <editeng/editids.hrc>
 #include <editeng/fontitem.hxx>
 #include <strings.hrc>
@@ -629,6 +630,20 @@ void SvxCharacterMap::insertCharToDoc(const OUString& sGlyph)
         aArgs[1].Name = "FontName";
         aArgs[1].Value <<= aFont.GetFamilyName();
         comphelper::dispatchCommand(".uno:InsertSymbol", aArgs);
+
+    } else {
+        SfxItemSet* pSet = GetOutputSetImpl();
+        if ( pSet )
+        {
+            sal_Int32 tmp = 0;
+            sal_UCS4 cChar = sGlyph.iterateCodePoints(&tmp);
+            const SfxItemPool* pPool = pSet->GetPool();
+            pSet->Put( SfxStringItem( pPool->GetWhich(SID_CHARMAP), sGlyph ) );
+            pSet->Put( SvxFontItem( aFont.GetFamilyType(), aFont.GetFamilyName(),
+                aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(), pPool->GetWhich(SID_ATTR_CHAR_FONT) ) );
+            pSet->Put( SfxStringItem( pPool->GetWhich(SID_FONT_NAME), aFont.GetFamilyName() ) );
+            pSet->Put( SfxInt32Item( pPool->GetWhich(SID_ATTR_CHAR), cChar ) );
+        }
     }
 
     updateRecentCharacterList(sGlyph, aFont.GetFamilyName());
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index ca9fb47b02b6..c903cc3b4d76 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1221,8 +1221,7 @@ VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxLineTabDialog(
 VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateSfxDialog( vcl::Window* pParent,
                                                                         const SfxItemSet& rAttr,
                                                                         const Reference< XFrame >& _rxDocumentFrame,
-                                                                        sal_uInt32 nResId
-                                                                        )
+                                                                        sal_uInt32 nResId, bool bInsert )
 {
     SfxModalDialog* pDlg=nullptr;
     switch ( nResId )
@@ -1231,7 +1230,7 @@ VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateSfxDialog( vcl::Wind
             pDlg = VclPtr<SfxMacroAssignDlg>::Create( pParent, _rxDocumentFrame, rAttr );
             break;
         case RID_SVXDLG_CHARMAP :
-            pDlg = VclPtr<SvxCharacterMap>::Create( pParent, &rAttr );
+            pDlg = VclPtr<SvxCharacterMap>::Create( pParent, &rAttr, bInsert );
             break;
         default:
             break;
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index e9d61e3bcf93..39e4b54379bd 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -464,7 +464,7 @@ public:
     virtual VclPtr<SfxAbstractDialog>    CreateSfxDialog( vcl::Window* pParent,
                                                              const SfxItemSet& rAttr,
                                                              const css::uno::Reference< css::frame::XFrame >& _rxFrame,
-                                                             sal_uInt32 nResId ) override;
+                                                             sal_uInt32 nResId, bool bInsert ) override;
     virtual VclPtr<VclAbstractDialog>    CreateFrameDialog( const css::uno::Reference< css::frame::XFrame >& rxFrame,
                                                            sal_uInt32 nResId,
                                                            const OUString& rParameter ) override;
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 63b1190df9a5..aeb384a48515 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -442,7 +442,8 @@ public:
     virtual VclPtr<SfxAbstractDialog>       CreateSfxDialog( vcl::Window* pParent,
                                                                         const SfxItemSet& rAttr,
                                     const css::uno::Reference< css::frame::XFrame >& _rxFrame,
-                                                                        sal_uInt32 nResId
+                                                                        sal_uInt32 nResId,
+                                                                        bool bInsert
                                                                         )=0;
     virtual VclPtr<AbstractSvxPostItDialog>    CreateSvxPostItDialog( vcl::Window* pParent,
                                                                         const SfxItemSet& rCoreSet,
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 0e9850637f10..6fbbabae8315 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -347,7 +347,7 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, vcl::Window* pWin )
         xFrame = GetViewShell()->GetViewFrame()->GetFrame().GetFrameInterface();
 
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-    ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateSfxDialog( pWin, *pItemSet, xFrame, SID_EVENTCONFIG ));
+    ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateSfxDialog( pWin, *pItemSet, xFrame, SID_EVENTCONFIG, false ));
     if ( pMacroDlg && pMacroDlg->Execute() == RET_OK )
     {
         const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 41d74671b5f4..d3c6b6aad0e2 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2518,7 +2518,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                 aSet.Put( SvxFontItem( aCurFont.GetFamilyType(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), GetPool().GetWhich(SID_ATTR_CHAR_FONT) ) );
 
                 ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( pTabViewShell->GetDialogParent(), aSet,
-                    pTabViewShell->GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ));
+                    pTabViewShell->GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP, true ));
 
                 if ( pDlg->Execute() == RET_OK )
                 {
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index a2ceeb944800..3d1fdddf17bd 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -338,7 +338,7 @@ bool ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont,
         SfxAllItemSet aSet( rFrame.GetObjectShell()->GetPool() );
         aSet.Put( SfxBoolItem( FN_PARAM_1, false ) );
         aSet.Put( SvxFontItem( rOldFont.GetFamily(), rOldFont.GetFamilyName(), rOldFont.GetStyleName(), rOldFont.GetPitch(), rOldFont.GetCharSet(), aSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT ) ) );
-        ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( &rFrame.GetWindow(), aSet, rFrame.GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ));
+        ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( &rFrame.GetWindow(), aSet, rFrame.GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP, true ));
         if ( pDlg->Execute() == RET_OK )
         {
             const SfxStringItem* pItem = SfxItemSet::GetItem<SfxStringItem>(pDlg->GetOutputItemSet(), SID_CHARMAP, false);
diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx
index c06749548586..72b79a8c774e 100644
--- a/sd/source/ui/func/fubullet.cxx
+++ b/sd/source/ui/func/fubullet.cxx
@@ -192,7 +192,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest const & rReq )
         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
         ScopedVclPtr<SfxAbstractDialog> pDlg(pFact ? pFact->CreateSfxDialog( &mpView->GetViewShell()->GetViewFrame()->GetWindow(), aSet,
             mpView->GetViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(),
-            RID_SVXDLG_CHARMAP ) : nullptr);
+            RID_SVXDLG_CHARMAP, true ) : nullptr);
         if( !pDlg )
             return;
 
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index 693df0354491..3b4e1af4a827 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -648,7 +648,7 @@ void IMapWindow::DoMacroAssign()
     aSet.Put( aMacroItem );
 
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-    ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateSfxDialog( this, aSet, mxDocumentFrame, SID_EVENTCONFIG ));
+    ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateSfxDialog( this, aSet, mxDocumentFrame, SID_EVENTCONFIG, false ));
 
     if ( pMacroDlg && pMacroDlg->Execute() == RET_OK )
     {
diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx
index 735752aacf78..043cd248c00e 100644
--- a/sw/source/ui/dialog/macassgn.cxx
+++ b/sw/source/ui/dialog/macassgn.cxx
@@ -122,7 +122,7 @@ bool SwMacroAssignDlg::INetFormatDlg( vcl::Window* pParent, SwWrtShell& rSh,
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
     VclPtr<SfxAbstractDialog> pMacroDlg = pFact->CreateSfxDialog( pParent, aSet,
         rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(),
-        SID_EVENTCONFIG );
+        SID_EVENTCONFIG, false );
     if ( pMacroDlg && pMacroDlg->Execute() == RET_OK )
     {
         const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index b32b06f1adae..a0d95507feef 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -542,7 +542,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool )
         const SfxPoolItem* pItem;
         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
         ScopedVclPtr<SfxAbstractDialog> pMacroDlg(pFact->CreateSfxDialog( this, aSet,
-            pSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(), SID_EVENTCONFIG ));
+            pSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(), SID_EVENTCONFIG, false ));
         if ( pMacroDlg && pMacroDlg->Execute() == RET_OK &&
             SfxItemState::SET == pMacroDlg->GetOutputItemSet()->GetItemState( RES_FRMMACRO, false, &pItem ) )
         {
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index 0cd368d5eb98..ede1751111ce 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -111,7 +111,7 @@ IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberExtCharHdl, Button*, void)
 
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
     ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( this, aAllSet,
-        rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ));
+        rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP, false ));
     if (RET_OK == pDlg->Execute())
     {
         const SfxStringItem* pItem = SfxItemSet::GetItem<SfxStringItem>(pDlg->GetOutputItemSet(), SID_CHARMAP, false);
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index d3195845daff..a9e20fc030b8 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -384,7 +384,7 @@ IMPL_LINK_NOARG(SwSortDlg, DelimCharHdl, Button*, void)
         SfxAllItemSet aSet( rSh.GetAttrPool() );
         aSet.Put( SfxInt32Item( SID_ATTR_CHAR, GetDelimChar() ) );
         ScopedVclPtr<SfxAbstractDialog> pMap(pFact->CreateSfxDialog( m_pDelimPB, aSet,
-            rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ));
+            rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP, false ));
         if( RET_OK == pMap->Execute() )
         {
             const SfxInt32Item* pItem = SfxItemSet::GetItem<SfxInt32Item>(pMap->GetOutputItemSet(), SID_ATTR_CHAR, false);
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index 1f8f1d775f11..c4b0252fb4d3 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -1754,7 +1754,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
 
         // If character is selected then it can be shown.
         ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( rView.GetWindow(), aAllSet,
-            rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ));
+            rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP, true ));
 
         sal_uInt16 nResult = pDlg->Execute();
         if( nResult == RET_OK )
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index 782560af5aee..7a83bd2ae52e 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -730,7 +730,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
         // If character is selected, it can be shown
         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
         ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( rView.GetWindow(), aAllSet,
-            rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ));
+            rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP, true ));
         sal_uInt16 nResult = pDlg->Execute();
         if( nResult == RET_OK )
         {
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index f321650318e2..e61436d47bd2 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -933,7 +933,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
 
         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
         ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( GetView().GetWindow(), aAllSet,
-            GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ));
+            GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP, true ));
         if( RET_OK == pDlg->Execute() )
         {
             const SfxStringItem* pCItem = SfxItemSet::GetItem<SfxStringItem>(pDlg->GetOutputItemSet(), SID_CHARMAP, false);


More information about the Libreoffice-commits mailing list