[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 5 commits - cui/source editeng/source include/vcl sd/source solenv/bin vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Jan 22 15:29:16 UTC 2019


 cui/source/dialogs/SpellDialog.cxx       |    7 ++++---
 cui/source/inc/SpellDialog.hxx           |    2 +-
 editeng/source/editeng/editeng.cxx       |    2 +-
 include/vcl/edit.hxx                     |    2 +-
 sd/source/ui/sidebar/SlideBackground.cxx |   25 +++++++++++++++++++------
 solenv/bin/pack_images.py                |   14 ++++++--------
 vcl/source/control/edit.cxx              |   15 ++-------------
 7 files changed, 34 insertions(+), 33 deletions(-)

New commits:
commit 73ab85e5a7e9200ad8000da4a6f5c873794259ca
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Jan 21 11:20:19 2019 +0100
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Tue Jan 22 16:01:30 2019 +0100

    tdf#122748 Don't restore previous language selection
    
    Change-Id: I8688c65695080804bae22209ed5d4890ced1a8dc

diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index c99efacc7217..b1ec6932acc3 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -297,7 +297,7 @@ void SpellDialog::Init_Impl()
     LinguMgr::GetChangeAllList()->clear();
 }
 
-void SpellDialog::UpdateBoxes_Impl()
+void SpellDialog::UpdateBoxes_Impl(bool bCallFromSelectHdl)
 {
     sal_Int32 i;
     m_pSuggestionLB->Clear();
@@ -324,7 +324,8 @@ void SpellDialog::UpdateBoxes_Impl()
     }
     else
         SetTitle_Impl( nAltLanguage );
-    m_pLanguageLB->SelectLanguage( nAltLanguage );
+    if( !bCallFromSelectHdl )
+        m_pLanguageLB->SelectLanguage( nAltLanguage );
     int nDicts = InitUserDicts();
 
     // enter alternatives
@@ -764,7 +765,7 @@ IMPL_LINK(SpellDialog, LanguageSelectHdl, ListBox&, rBox, void)
 
          m_pSentenceED->AddUndoAction(new SpellUndoAction_Impl(SPELLUNDO_CHANGE_LANGUAGE, aDialogUndoLink));
     }
-    SpellDialog::UpdateBoxes_Impl();
+    SpellDialog::UpdateBoxes_Impl(true);
 }
 
 
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx
index 41d68d99ba68..08e61bbc7b4e 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -197,7 +197,7 @@ private:
     void            AddToDictionaryExecute( sal_uInt16 ItemId, PopupMenu const *pMenu );
     void            StartSpellOptDlg_Impl();
     int             InitUserDicts();
-    void            UpdateBoxes_Impl();
+    void            UpdateBoxes_Impl(bool bCallFromSelectHdl = false);
     void            Init_Impl();
     void            SpellContinue_Impl(bool UseSavedSentence = false, bool bIgnoreCurrentError = false );
     void            LockFocusChanges( bool bLock ) {bFocusLocked = bLock;}
commit 50731e73a5e6103ba68b8f5a9143cc223d830410
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun Jan 20 12:06:07 2019 -0500
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Tue Jan 22 16:01:16 2019 +0100

    LOK: sd: notify LOK of page size/orientation change
    
    Change-Id: I2eb92d83f50b91b39a10e22298d496668c1cbf72

diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx
index ead02f86eb4e..9f464dd97928 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -70,6 +70,7 @@
 #include <editeng/lrspitem.hxx>
 #include <svl/itemset.hxx>
 #include <comphelper/lok.hxx>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
 
 using namespace ::com::sun::star;
 
@@ -998,20 +999,32 @@ IMPL_LINK_NOARG(SlideBackground, FillStyleModifyHdl, ListBox&, void)
 
 IMPL_LINK_NOARG(SlideBackground, PaperSizeModifyHdl, ListBox&, void)
 {
-    Paper ePaper =  mpPaperSizeBox->GetSelection();
-    Size  aSize(SvxPaperInfo::GetPaperSize(ePaper, meUnit));
+    const Paper ePaper = mpPaperSizeBox->GetSelection();
+    Size aSize(SvxPaperInfo::GetPaperSize(ePaper, meUnit));
 
-    if(mpPaperOrientation->GetSelectedEntryPos() == 0)
+    if (mpPaperOrientation->GetSelectedEntryPos() == 0)
         Swap(aSize);
 
     mpPageItem->SetLandscape(mpPaperOrientation->GetSelectedEntryPos() == 0);
-    SvxSizeItem aSizeItem(SID_ATTR_PAGE_SIZE, aSize);
+    const SvxSizeItem aSizeItem(SID_ATTR_PAGE_SIZE, aSize);
     // Page/slide properties dialog (FuPage::ExecuteDialog and ::ApplyItemSet) misuses
     // SID_ATTR_PAGE_EXT1 to distinguish between Impress and Draw, as for whether to fit
     // objects to paper size. Until that is handled somehow better, we do the same here
-    SfxBoolItem aFitObjs(SID_ATTR_PAGE_EXT1, IsImpress());
+    const SfxBoolItem aFitObjs(SID_ATTR_PAGE_EXT1, IsImpress());
 
-    GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_SIZE, SfxCallMode::RECORD, { &aSizeItem, mpPageItem.get(), &aFitObjs});
+    GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_PAGE_SIZE, SfxCallMode::RECORD,
+                                                { &aSizeItem, mpPageItem.get(), &aFitObjs });
+
+    // Notify LOK clients of the page size chagne.
+    if (comphelper::LibreOfficeKit::isActive())
+    {
+        SfxViewShell* pViewShell = SfxViewShell::GetFirst();
+        while (pViewShell)
+        {
+            pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, "");
+            pViewShell = SfxViewShell::GetNext(*pViewShell);
+        }
+    }
 }
 
 IMPL_LINK_NOARG(SlideBackground, FillColorHdl, SvxColorListBox&, void)
commit 85843ff92db37a63081a3fed9ff583f7e4d67cb6
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sat Jan 19 07:43:46 2019 -0500
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Tue Jan 22 16:00:35 2019 +0100

    editeng: vcl: fix warnings
    
    warning: local variable 'aFont' will be copied despite being returned by
    name [-Wreturn-std-move]
                   note: call 'std::move' explicitly to avoid copying
    
    And remove unused local variable.
    
    Change-Id: I485b690beff33db769866358c69391465bc44fcd

diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index a3679f5809b1..6116d702242b 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2624,7 +2624,7 @@ vcl::Font EditEngine::CreateFontFromItemSet( const SfxItemSet& rItemSet, SvtScri
 {
     SvxFont aFont;
     CreateFont( aFont, rItemSet, true, nScriptType );
-    return aFont;
+    return std::move(aFont);
 }
 
 SvxFont EditEngine::CreateSvxFontFromItemSet( const SfxItemSet& rItemSet )
commit d09ca3697bfbff8c6851a1088c594d7d6426bd93
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Mon Jan 7 07:29:03 2019 -0500
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Tue Jan 22 15:27:33 2019 +0100

    Revert "lok: custom widgets: render editbox borders"
    
    Looks like this is no longer needed to correctly render
    editbox borders. Not clear what fixed the issue.
    
    This reverts commit 9c5bc82fdfa67d0149806a0b55962edc7925dd0f.

diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx
index 45006a407414..9588da8b6fe6 100644
--- a/include/vcl/edit.hxx
+++ b/include/vcl/edit.hxx
@@ -111,7 +111,7 @@ private:
     SAL_DLLPRIVATE void        ImplInsertText( const OUString& rStr, const Selection* pNewSelection = nullptr, bool bIsUserInput = false );
     SAL_DLLPRIVATE static OUString ImplGetValidString( const OUString& rString );
     SAL_DLLPRIVATE void        ImplClearBackground(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRectangle, long nXStart, long nXEnd);
-    SAL_DLLPRIVATE void        ImplPaintBorder(vcl::RenderContext& rRenderContext, long nXStart, long nXEnd);
+    SAL_DLLPRIVATE void        ImplPaintBorder(vcl::RenderContext const & rRenderContext, long nXStart, long nXEnd);
     SAL_DLLPRIVATE void        ImplShowCursor( bool bOnlyIfVisible = true );
     SAL_DLLPRIVATE void        ImplAlign();
     SAL_DLLPRIVATE void        ImplAlignAndPaint();
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 38797d68c783..7560860de9de 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -57,7 +57,6 @@
 
 #include <comphelper/processfactory.hxx>
 #include <comphelper/string.hxx>
-#include <comphelper/lok.hxx>
 
 #include <sot/exchange.hxx>
 #include <sot/formats.hxx>
@@ -1001,7 +1000,7 @@ void Edit::ImplClearBackground(vcl::RenderContext& rRenderContext, const tools::
     }
 }
 
-void Edit::ImplPaintBorder(vcl::RenderContext& rRenderContext, long nXStart, long nXEnd)
+void Edit::ImplPaintBorder(vcl::RenderContext const & rRenderContext, long nXStart, long nXEnd)
 {
     // this is not needed when double-buffering
     if (SupportsDoubleBuffering())
@@ -1063,17 +1062,7 @@ void Edit::ImplPaintBorder(vcl::RenderContext& rRenderContext, long nXStart, lon
             }
             else
             {
-                // For some mysterious reaon, in headless/svp rendering,
-                // pBorder has bad clipping region (shows as 1x1 at 0,0),
-                // and therefore doesn't render anything at all.
-                // In the case that we know we're in headless/svp, we
-                // render directly on the current context (the edit control).
-                // But if we (the editbox) are part of a more complex control
-                // (e.g. spinbox), we render not (i.e. we let pBorder pretend).
-                if (!mbIsSubEdit && comphelper::LibreOfficeKit::isActive())
-                    pBorder->Paint(rRenderContext, tools::Rectangle());
-                else
-                    pBorder->Paint(*pBorder, tools::Rectangle());
+                pBorder->Paint(*pBorder, tools::Rectangle());
             }
         }
     }
commit d7b4166fb90828411bb2ff54130ffff9ba04fa9a
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Mon Dec 17 12:24:53 2018 +0100
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Tue Jan 22 15:25:39 2019 +0100

    postprocess: Some .svg images were missing previously.
    
    Change-Id: I6c42b1f94f6510e42049bc7c7fc040f17e6edae6

diff --git a/solenv/bin/pack_images.py b/solenv/bin/pack_images.py
index 8e707a08bd11..10d40205b598 100755
--- a/solenv/bin/pack_images.py
+++ b/solenv/bin/pack_images.py
@@ -519,18 +519,16 @@ def parse_image_list(imagelist_filenames):
 
                     if line.startswith('%GLOBALRES%'):
                         key = "res/%s" % line.replace('%GLOBALRES%/', '')
-                        if key in global_image_list:
-                            global_image_list[key] += 1
-                        else:
-                            global_image_list[key] = 0
+                        global_image_list[key] = True
+                        if key.endswith('.png'):
+                            global_image_list[key[:-4] + '.svg'] = True
                         continue
 
                     if line.startswith('%MODULE%'):
                         key = line.replace('%MODULE%/', '')
-                        if key in global_image_list:
-                            module_image_list[key] += 1
-                        else:
-                            module_image_list[key] = 0
+                        module_image_list[key] = True
+                        if key.endswith('.png'):
+                            module_image_list[key[:-4] + '.svg'] = True
                         continue
 
                     LOGGER.error("Cannot parse line %s:%d", imagelist_filename, line_count)


More information about the Libreoffice-commits mailing list