[Libreoffice-commits] core.git: 2 commits - cui/source cui/uiconfig formula/source sal/qa sal/workben sc/qa scripting/source sc/source sc/workben sfx2/uiconfig svtools/source

Caolán McNamara caolanm at redhat.com
Fri Nov 13 02:17:54 PST 2015


 cui/source/dialogs/SpellDialog.cxx           |   43 +++++++-
 cui/source/inc/SpellDialog.hxx               |    7 +
 cui/uiconfig/ui/spellingdialog.ui            |  143 ++++++++++++++-------------
 formula/source/core/api/FormulaCompiler.cxx  |   12 +-
 formula/source/ui/dlg/structpg.hxx           |    2 
 sal/qa/osl/process/osl_process.cxx           |    2 
 sal/workben/measure_oustrings.cxx            |    2 
 sc/qa/unit/helper/qahelper.hxx               |    2 
 sc/qa/unit/helper/shared_test_impl.hxx       |    2 
 sc/qa/unit/helper/sorthelper.hxx             |    2 
 sc/qa/unit/subsequent_filters-test.cxx       |    2 
 sc/qa/unit/ucalc.cxx                         |    4 
 sc/source/core/data/cellvalues.cxx           |    2 
 sc/source/core/data/colorscale.cxx           |    2 
 sc/source/core/data/column4.cxx              |   14 +-
 sc/source/core/data/columnspanset.cxx        |    2 
 sc/source/core/data/documen6.cxx             |    2 
 sc/source/core/data/documen7.cxx             |    2 
 sc/source/core/data/document.cxx             |    4 
 sc/source/core/data/document10.cxx           |    2 
 sc/source/core/data/documentimport.cxx       |    2 
 sc/source/core/data/documentstreamaccess.cxx |    2 
 sc/source/core/data/dpcache.cxx              |    8 -
 sc/workben/test.cxx                          |    2 
 scripting/source/vbaevents/eventhelper.cxx   |    6 -
 sfx2/uiconfig/ui/templatedlg.ui              |    2 
 svtools/source/contnr/fileview.cxx           |    6 -
 svtools/source/control/ctrltool.cxx          |    2 
 28 files changed, 168 insertions(+), 115 deletions(-)

New commits:
commit b08b76774fbd253cba587207d471f9bf0c0b0a82
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 13 09:56:01 2015 +0000

    Resolves: tdf#95682 spell dialog: add a button to open special character
    
    Change-Id: I0d070dee9e940b93b294c6b2de180005a5c2248e

diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index fbb23b8..d632fd5 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -221,6 +221,8 @@ SpellDialog::SpellDialog(SpellDialogChildWindow* pChildWindow,
     get(m_pOptionsPB, "options");
     get(m_pUndoPB, "undo");
     get(m_pClosePB, "close");
+    get(m_pToolbar, "toolbar");
+    m_pSentenceED->Init(m_pToolbar);
     xSpell = LinguMgr::GetSpellChecker();
     pImpl = new SpellDialog_Impl;
 
@@ -242,8 +244,6 @@ SpellDialog::SpellDialog(SpellDialogChildWindow* pChildWindow,
         LINK( this, SpellDialog, InitHdl ), nullptr, true );
 }
 
-
-
 SpellDialog::~SpellDialog()
 {
     disposeOnce();
@@ -281,6 +281,7 @@ void SpellDialog::dispose()
     m_pOptionsPB.clear();
     m_pUndoPB.clear();
     m_pClosePB.clear();
+    m_pToolbar.clear();
     SfxModelessDialog::dispose();
 }
 
@@ -317,8 +318,6 @@ void SpellDialog::Init_Impl()
     SvxGetChangeAllList()->clear();
 }
 
-
-
 void SpellDialog::UpdateBoxes_Impl()
 {
     sal_Int32 i;
@@ -442,6 +441,7 @@ void SpellDialog::SpellContinue_Impl(bool bUseSavedSentence, bool bIgnoreCurrent
  */
 IMPL_LINK_NOARG_TYPED( SpellDialog, InitHdl, void*, void)
 {
+    m_pToolbar->Disable();
     SetUpdateMode( false );
     //show or hide AutoCorrect depending on the modules abilities
     m_pAutoCorrPB->Show(rParent.HasAutoCorrection());
@@ -1537,9 +1537,44 @@ bool SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt )
         else
             bChange = false;
     }
+    else if (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS && m_xToolbar)
+    {
+        m_xToolbar->Enable();
+    }
+    else if(rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS && m_xToolbar)
+    {
+        m_xToolbar->Disable();
+    }
     return bChange || VclMultiLineEdit::PreNotify(rNEvt);
 }
 
+void SentenceEditWindow_Impl::Init(VclPtr<ToolBox> &rToolbar)
+{
+    m_xToolbar = rToolbar;
+    m_xToolbar->SetSelectHdl(LINK(this,SentenceEditWindow_Impl,ToolbarHdl));
+}
+
+IMPL_LINK_NOARG_TYPED(SentenceEditWindow_Impl, ToolbarHdl, ToolBox *, void)
+{
+    const sal_uInt16 nCurItemId = m_xToolbar->GetCurItemId();
+    if (nCurItemId == m_xToolbar->GetItemId("paste"))
+        Paste();
+    else if (nCurItemId == m_xToolbar->GetItemId("insert"))
+    {
+        if (Edit::GetGetSpecialCharsFunction())
+        {
+            OUString aChars = Edit::GetGetSpecialCharsFunction()( this, GetFont() );
+            if (!aChars.isEmpty())
+                ReplaceSelected(aChars);
+        }
+    }
+}
+
+void SentenceEditWindow_Impl::dispose()
+{
+    m_xToolbar.clear();
+    VclMultiLineEdit::dispose();
+}
 
 bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError, css::uno::Reference<css::linguistic2::XSpellChecker1> xSpell )
 {
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx
index 449271d..c6b5ef8 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -29,6 +29,7 @@
 #include <vcl/group.hxx>
 #include <vcl/decoview.hxx>
 #include <vcl/image.hxx>
+#include <vcl/toolbox.hxx>
 #include <com/sun/star/uno/Reference.hxx>
 
 
@@ -62,6 +63,7 @@ class SentenceEditWindow_Impl : public VclMultiLineEdit
 
 private:
     std::set< sal_uInt16 >      m_aIgnoreErrorsAt;
+    VclPtr<ToolBox>     m_xToolbar;
     sal_uInt16          m_nErrorStart;
     sal_uInt16          m_nErrorEnd;
     bool                m_bIsUndoEditMode;
@@ -71,12 +73,15 @@ private:
     void            CallModifyLink() {m_aModifyLink.Call(*this);}
 
     inline SpellDialog* GetSpellDialog() const;
+
+    DECL_LINK_TYPED(ToolbarHdl, ToolBox*, void);
 protected:
     virtual bool    PreNotify( NotifyEvent& rNEvt ) override;
 
 public:
     SentenceEditWindow_Impl(vcl::Window* pParent, WinBits nBits);
 
+    void            Init(VclPtr<ToolBox> &rToolbar);
     void            SetModifyHdl(const Link<Edit&,void>& rLink) override { m_aModifyLink = rLink;}
 
     void            SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd );
@@ -96,6 +101,7 @@ public:
 
     void            ResetModified()   { GetTextEngine()->SetModified(false); m_bIsUndoEditMode = false;}
     virtual bool    IsModified() const override { return GetTextEngine()->IsModified(); }
+    virtual void    dispose() override;
 
     bool            IsUndoEditMode() const { return m_bIsUndoEditMode;}
     void            SetUndoEditMode(bool bSet);
@@ -151,6 +157,7 @@ private:
     VclPtr<PushButton>     m_pOptionsPB;
     VclPtr<PushButton>     m_pUndoPB;
     VclPtr<CloseButton>    m_pClosePB;
+    VclPtr<ToolBox>        m_pToolbar;
 
     OUString        m_sResumeST;
     OUString        m_sIgnoreOnceST;
diff --git a/cui/uiconfig/ui/spellingdialog.ui b/cui/uiconfig/ui/spellingdialog.ui
index 5d89284..94b5307 100644
--- a/cui/uiconfig/ui/spellingdialog.ui
+++ b/cui/uiconfig/ui/spellingdialog.ui
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.1 -->
+<!-- Generated with glade 3.19.0 -->
 <interface>
   <requires lib="gtk+" version="3.0"/>
-  <!-- interface-requires LibreOffice 1.0 -->
+  <requires lib="LibreOffice" version="1.0"/>
   <object class="GtkDialog" id="SpellingDialog">
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
@@ -103,24 +103,6 @@
               <packing>
                 <property name="left_attach">1</property>
                 <property name="top_attach">0</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="notindictft">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">_Not in dictionary</property>
-                <property name="use_underline">True</property>
-                <property name="mnemonic_widget">sentence</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
-                <property name="width">3</property>
-                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -135,8 +117,6 @@
               <packing>
                 <property name="left_attach">2</property>
                 <property name="top_attach">3</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -154,22 +134,6 @@
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="suggestionsft">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">_Suggestions</property>
-                <property name="use_underline">True</property>
-                <property name="mnemonic_widget">suggestionslb</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">8</property>
-                <property name="width">3</property>
-                <property name="height">1</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkButton" id="change">
                 <property name="label" translatable="yes">Co_rrect</property>
                 <property name="visible">True</property>
@@ -181,8 +145,6 @@
               <packing>
                 <property name="left_attach">2</property>
                 <property name="top_attach">9</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -197,8 +159,6 @@
               <packing>
                 <property name="left_attach">2</property>
                 <property name="top_attach">10</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -213,8 +173,6 @@
               <packing>
                 <property name="left_attach">2</property>
                 <property name="top_attach">11</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -231,7 +189,6 @@
                 <property name="left_attach">0</property>
                 <property name="top_attach">12</property>
                 <property name="width">3</property>
-                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -246,8 +203,6 @@
               <packing>
                 <property name="left_attach">2</property>
                 <property name="top_attach">4</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -262,39 +217,34 @@
               <packing>
                 <property name="left_attach">2</property>
                 <property name="top_attach">5</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
               </packing>
             </child>
             <child>
               <object class="GtkLabel" id="languageft">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
                 <property name="label" translatable="yes">Text languag_e:</property>
                 <property name="use_underline">True</property>
                 <property name="mnemonic_widget">languagelb</property>
+                <property name="xalign">0</property>
               </object>
               <packing>
                 <property name="left_attach">0</property>
                 <property name="top_attach">0</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
               </packing>
             </child>
             <child>
               <object class="GtkLabel" id="explain">
                 <property name="can_focus">False</property>
                 <property name="no_show_all">True</property>
-                <property name="xalign">0</property>
                 <property name="use_underline">True</property>
                 <property name="wrap">True</property>
+                <property name="xalign">0</property>
               </object>
               <packing>
                 <property name="left_attach">0</property>
                 <property name="top_attach">1</property>
                 <property name="width">2</property>
-                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -309,8 +259,6 @@
               <packing>
                 <property name="left_attach">2</property>
                 <property name="top_attach">1</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -323,8 +271,6 @@
               <packing>
                 <property name="left_attach">0</property>
                 <property name="top_attach">13</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -337,8 +283,6 @@
               <packing>
                 <property name="left_attach">1</property>
                 <property name="top_attach">13</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -351,8 +295,6 @@
               <packing>
                 <property name="left_attach">2</property>
                 <property name="top_attach">13</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -384,8 +326,6 @@
               <packing>
                 <property name="left_attach">2</property>
                 <property name="top_attach">6</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -400,11 +340,82 @@
               <packing>
                 <property name="left_attach">2</property>
                 <property name="top_attach">7</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
               </packing>
             </child>
             <child>
+              <object class="GtkLabel" id="suggestionsft">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">_Suggestions</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">suggestionslb</property>
+                <property name="xalign">0</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">8</property>
+                <property name="width">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="notindictft">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="label" translatable="yes">_Not in dictionary</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">sentence</property>
+                <property name="xalign">0</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToolbar" id="toolbar">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">end</property>
+                <property name="toolbar_style">icons</property>
+                <child>
+                  <object class="GtkToolButton" id="paste">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="action_name">paste</property>
+                    <property name="label" translatable="yes">Paste</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">cmd/sc_paste.png</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkToolButton" id="insert">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="action_name">insert</property>
+                    <property name="label" translatable="yes">Special Character</property>
+                    <property name="use_underline">True</property>
+                    <property name="icon_name">cmd/sc_insertsymbol.png</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">2</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
               <placeholder/>
             </child>
           </object>
commit 8325fcb56d014c12f35808ae6ad17f68b7a1cdd2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 13 09:56:41 2015 +0000

    cppcheck: noExplicitConstructor
    
    Change-Id: Ife26f55c28c4631aec4ba4105225bfca72da8bff

diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index cafab24..e32a6f9 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -45,12 +45,12 @@ namespace {
 
 class FormulaCompilerRecursionGuard
 {
-private:
-            short&              rRecursion;
-public:
-                                FormulaCompilerRecursionGuard( short& rRec )
-                                    : rRecursion( rRec ) { ++rRecursion; }
-                                ~FormulaCompilerRecursionGuard() { --rRecursion; }
+    private:
+        short& rRecursion;
+    public:
+        explicit FormulaCompilerRecursionGuard( short& rRec )
+            : rRecursion( rRec ) { ++rRecursion; }
+        ~FormulaCompilerRecursionGuard() { --rRecursion; }
 };
 
 short lcl_GetRetFormat( OpCode eOpCode )
diff --git a/formula/source/ui/dlg/structpg.hxx b/formula/source/ui/dlg/structpg.hxx
index cb8642c..c2a6690 100644
--- a/formula/source/ui/dlg/structpg.hxx
+++ b/formula/source/ui/dlg/structpg.hxx
@@ -88,7 +88,7 @@ protected:
 
 public:
 
-                    StructPage( vcl::Window* pParent);
+    explicit StructPage(vcl::Window* pParent);
     virtual         ~StructPage();
     virtual void    dispose() override;
 
diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx
index 7b29a84..59bd74f 100644
--- a/sal/qa/osl/process/osl_process.cxx
+++ b/sal/qa/osl/process/osl_process.cxx
@@ -99,7 +99,7 @@ class exclude : public std::unary_function<OString, bool>
 {
 public:
 
-    exclude(const string_container_t& exclude_list)
+    explicit exclude(const string_container_t& exclude_list)
     {
         string_container_t::const_iterator iter     = exclude_list.begin();
         string_container_t::const_iterator iter_end = exclude_list.end();
diff --git a/sal/workben/measure_oustrings.cxx b/sal/workben/measure_oustrings.cxx
index 0a4eb45..eeca8cc 100644
--- a/sal/workben/measure_oustrings.cxx
+++ b/sal/workben/measure_oustrings.cxx
@@ -54,7 +54,7 @@ private:
     const char *m_pMessage;
     sal_uInt32 m_nStartTime, m_nEndTime;
 public:
-    TimerMeasure(const char *pMessage)
+    explicit TimerMeasure(const char *pMessage)
     : m_pMessage(pMessage)
     {
         m_nStartTime = osl_getGlobalTimer();
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index 2a33b65..1dd1b9c 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -218,7 +218,7 @@ protected:
 public:
     static const FileFormat* getFileFormats() { return aFileFormats; }
 
-    ScBootstrapFixture( const OUString& rsBaseString );
+    explicit ScBootstrapFixture( const OUString& rsBaseString );
     virtual ~ScBootstrapFixture();
 
     void createFileURL(const OUString& aFileBase, const OUString& aFileExtension, OUString& rFilePath);
diff --git a/sc/qa/unit/helper/shared_test_impl.hxx b/sc/qa/unit/helper/shared_test_impl.hxx
index 7a92c4e..0c27481 100644
--- a/sc/qa/unit/helper/shared_test_impl.hxx
+++ b/sc/qa/unit/helper/shared_test_impl.hxx
@@ -17,7 +17,7 @@
 
 struct FindCondFormatByEnclosingRange
 {
-    FindCondFormatByEnclosingRange(const ScRange& rRange):
+    explicit FindCondFormatByEnclosingRange(const ScRange& rRange):
         mrRange(rRange) {}
 
     bool operator()(const std::unique_ptr<ScConditionalFormat>& pFormat)
diff --git a/sc/qa/unit/helper/sorthelper.hxx b/sc/qa/unit/helper/sorthelper.hxx
index 2e81107..d094e0b 100644
--- a/sc/qa/unit/helper/sorthelper.hxx
+++ b/sc/qa/unit/helper/sorthelper.hxx
@@ -20,7 +20,7 @@
 class SortTypeSetter {
     bool mbSortRefUpdate;
 public:
-    SortTypeSetter(bool bSortRefUpdate)
+    explicit SortTypeSetter(bool bSortRefUpdate)
     {
         mbSortRefUpdate = changeTo(bSortRefUpdate);
     }
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index cdb0aed..f3abf7d 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -1738,7 +1738,7 @@ class FindDimByName : std::unary_function<const ScDPSaveDimension*, bool>
 {
     OUString maName;
 public:
-    FindDimByName(const OUString& rName) : maName(rName) {}
+    explicit FindDimByName(const OUString& rName) : maName(rName) {}
 
     bool operator() (const ScDPSaveDimension* p) const
     {
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index f5871f7..4700c6c 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -116,7 +116,7 @@ class MeasureTimeSwitch
     double& mrDiff;
     TimeValue maTimeBefore;
 public:
-    MeasureTimeSwitch(double& rDiff) : mrDiff(rDiff)
+    explicit MeasureTimeSwitch(double& rDiff) : mrDiff(rDiff)
     {
         mrDiff = 9999.0;
         osl_getSystemTime(&maTimeBefore);
@@ -3489,7 +3489,7 @@ void Test::testCopyPasteSkipEmpty()
     {
         ScDocument* mpDoc;
 
-        TestRange( ScDocument* pDoc ) : mpDoc(pDoc) {}
+        explicit TestRange( ScDocument* pDoc ) : mpDoc(pDoc) {}
 
         bool checkRange( const ScAddress& rPos, const Check* p, const Check* pEnd )
         {
diff --git a/sc/source/core/data/cellvalues.cxx b/sc/source/core/data/cellvalues.cxx
index ca319ee..5056be8 100644
--- a/sc/source/core/data/cellvalues.cxx
+++ b/sc/source/core/data/cellvalues.cxx
@@ -275,7 +275,7 @@ struct TableValues::Impl
     ScRange maRange;
     TablesType m_Tables;
 
-    Impl( const ScRange& rRange ) : maRange(rRange)
+    explicit Impl( const ScRange& rRange ) : maRange(rRange)
     {
         size_t nTabs = rRange.aEnd.Tab() - rRange.aStart.Tab() + 1;
         size_t nCols = rRange.aEnd.Col() - rRange.aStart.Col() + 1;
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 50cecc2..2fc9a64 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -31,7 +31,7 @@ private:
     void startListening(ScTokenArray* pTokens, const ScAddress& rPos);
 
 public:
-    ScFormulaListener(ScFormulaCell* pCell);
+    explicit ScFormulaListener(ScFormulaCell* pCell);
     virtual ~ScFormulaListener();
 
     void Notify( const SfxHint& rHint ) override;
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index dc42d74..6134eef 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -403,7 +403,7 @@ class StartListeningHandler
     sc::StartListeningContext& mrCxt;
 
 public:
-    StartListeningHandler( sc::StartListeningContext& rCxt ) :
+    explicit StartListeningHandler( sc::StartListeningContext& rCxt ) :
         mrCxt(rCxt) {}
 
     void operator() (size_t /*nRow*/, ScFormulaCell* pCell)
@@ -417,7 +417,7 @@ class EndListeningHandler
     sc::EndListeningContext& mrCxt;
 
 public:
-    EndListeningHandler( sc::EndListeningContext& rCxt ) :
+    explicit EndListeningHandler( sc::EndListeningContext& rCxt ) :
         mrCxt(rCxt) {}
 
     void operator() (size_t /*nRow*/, ScFormulaCell* pCell)
@@ -931,7 +931,7 @@ private:
     }
 
 public:
-    ScriptTypeUpdater( ScColumn& rCol ) :
+    explicit ScriptTypeUpdater( ScColumn& rCol ) :
         mrCol(rCol),
         mrTextAttrs(rCol.GetCellAttrStore()),
         miPosAttr(mrTextAttrs.begin()),
@@ -1053,7 +1053,7 @@ class RelativeRefBoundChecker
     ScRange maBoundRange;
 
 public:
-    RelativeRefBoundChecker( const ScRange& rBoundRange ) :
+    explicit RelativeRefBoundChecker( const ScRange& rBoundRange ) :
         maBoundRange(rBoundRange) {}
 
     void operator() ( size_t /*nRow*/, ScFormulaCell* pCell )
@@ -1100,7 +1100,7 @@ class ListenerCollector
 {
     std::vector<SvtListener*>& mrListeners;
 public:
-    ListenerCollector( std::vector<SvtListener*>& rListener ) :
+    explicit ListenerCollector( std::vector<SvtListener*>& rListener ) :
         mrListeners(rListener) {}
 
     void operator() ( size_t /*nRow*/, SvtBroadcaster* p )
@@ -1114,7 +1114,7 @@ class FormulaCellCollector
 {
     std::vector<ScFormulaCell*>& mrCells;
 public:
-    FormulaCellCollector( std::vector<ScFormulaCell*>& rCells ) : mrCells(rCells) {}
+    explicit FormulaCellCollector( std::vector<ScFormulaCell*>& rCells ) : mrCells(rCells) {}
 
     void operator() ( size_t /*nRow*/, ScFormulaCell* p )
     {
@@ -1273,7 +1273,7 @@ class EndListeningFormulaCellsHandler
     SCROW mnEndRow;
 
 public:
-    EndListeningFormulaCellsHandler( sc::EndListeningContext& rEndCxt ) :
+    explicit EndListeningFormulaCellsHandler( sc::EndListeningContext& rEndCxt ) :
         mrEndCxt(rEndCxt), mnStartRow(-1), mnEndRow(-1) {}
 
     void operator() ( const sc::CellStoreType::value_type& node, size_t nOffset, size_t nDataSize )
diff --git a/sc/source/core/data/columnspanset.cxx b/sc/source/core/data/columnspanset.cxx
index 6c19bd9..d5d4403 100644
--- a/sc/source/core/data/columnspanset.cxx
+++ b/sc/source/core/data/columnspanset.cxx
@@ -276,7 +276,7 @@ class Scanner
 {
     SingleColumnSpanSet::ColumnSpansType& mrRanges;
 public:
-    Scanner(SingleColumnSpanSet::ColumnSpansType& rRanges) : mrRanges(rRanges) {}
+    explicit Scanner(SingleColumnSpanSet::ColumnSpansType& rRanges) : mrRanges(rRanges) {}
 
     void operator() (const sc::CellStoreType::value_type& node, size_t nOffset, size_t nDataSize)
     {
diff --git a/sc/source/core/data/documen6.cxx b/sc/source/core/data/documen6.cxx
index e8a80ff..e7713e1 100644
--- a/sc/source/core/data/documen6.cxx
+++ b/sc/source/core/data/documen6.cxx
@@ -158,7 +158,7 @@ class ScriptTypeAggregator : public sc::ColumnSpanSet::Action
     SvtScriptType mnScriptType;
 
 public:
-    ScriptTypeAggregator(ScDocument& rDoc) : mrDoc(rDoc), mnScriptType(SvtScriptType::NONE) {}
+    explicit ScriptTypeAggregator(ScDocument& rDoc) : mrDoc(rDoc), mnScriptType(SvtScriptType::NONE) {}
 
     virtual void startColumn(SCTAB nTab, SCCOL nCol) override
     {
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index b4c1367..447a688 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -175,7 +175,7 @@ class RefMovedNotifier : std::unary_function<SvtListener*, void>
 {
     const sc::RefMovedHint& mrHint;
 public:
-    RefMovedNotifier( const sc::RefMovedHint& rHint ) : mrHint(rHint) {}
+    explicit RefMovedNotifier( const sc::RefMovedHint& rHint ) : mrHint(rHint) {}
 
     void operator() ( SvtListener* p )
     {
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index ba750bc..5225443 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -143,7 +143,7 @@ struct ScDefaultAttr
     const ScPatternAttr*    pAttr;
     SCROW                   nFirst;
     SCSIZE                  nCount;
-    ScDefaultAttr(const ScPatternAttr* pPatAttr) : pAttr(pPatAttr), nFirst(0), nCount(0) {}
+    explicit ScDefaultAttr(const ScPatternAttr* pPatAttr) : pAttr(pPatAttr), nFirst(0), nCount(0) {}
 };
 
 struct ScLessDefaultAttr
@@ -2649,7 +2649,7 @@ class BroadcastAction : public sc::ColumnSpanSet::ColumnAction
     ScColumn* mpCol;
 
 public:
-    BroadcastAction( ScDocument& rDoc ) : mrDoc(rDoc), mpCol(nullptr) {}
+    explicit BroadcastAction( ScDocument& rDoc ) : mrDoc(rDoc), mpCol(nullptr) {}
 
     virtual void startColumn( ScColumn* pCol ) override
     {
diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx
index c09b7c4..d3303ed 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -395,7 +395,7 @@ class StartNeededListenersHandler : std::unary_function<ScTable*, void>
 {
     std::shared_ptr<sc::StartListeningContext> mpCxt;
 public:
-    StartNeededListenersHandler( ScDocument& rDoc ) : mpCxt(new sc::StartListeningContext(rDoc)) {}
+    explicit StartNeededListenersHandler( ScDocument& rDoc ) : mpCxt(new sc::StartListeningContext(rDoc)) {}
 
     void operator() (ScTable* p)
     {
diff --git a/sc/source/core/data/documentimport.cxx b/sc/source/core/data/documentimport.cxx
index 792e132..2af6fdb 100644
--- a/sc/source/core/data/documentimport.cxx
+++ b/sc/source/core/data/documentimport.cxx
@@ -52,7 +52,7 @@ struct ScDocumentImportImpl
     SvtScriptType mnDefaultScriptNumeric;
     std::vector<TabAttr> maTabAttrs;
 
-    ScDocumentImportImpl(ScDocument& rDoc) :
+    explicit ScDocumentImportImpl(ScDocument& rDoc) :
         mrDoc(rDoc),
         maListenCxt(rDoc),
         maBlockPosSet(rDoc),
diff --git a/sc/source/core/data/documentstreamaccess.cxx b/sc/source/core/data/documentstreamaccess.cxx
index 1eacfc9..cca6861 100644
--- a/sc/source/core/data/documentstreamaccess.cxx
+++ b/sc/source/core/data/documentstreamaccess.cxx
@@ -22,7 +22,7 @@ struct DocumentStreamAccessImpl
     ScDocument& mrDoc;
     ColumnBlockPositionSet maBlockPosSet;
 
-    DocumentStreamAccessImpl( ScDocument& rDoc ) :
+    explicit DocumentStreamAccessImpl( ScDocument& rDoc ) :
         mrDoc(rDoc),
         maBlockPosSet(rDoc)
     {}
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index 01e3326..da4d08f 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -93,7 +93,7 @@ namespace {
 class MacroInterpretIncrementer
 {
 public:
-    MacroInterpretIncrementer(ScDocument* pDoc) :
+    explicit MacroInterpretIncrementer(ScDocument* pDoc) :
         mpDoc(pDoc)
     {
         mpDoc->IncMacroInterpretLevel();
@@ -211,7 +211,7 @@ class PushBackValue : std::unary_function<Bucket, void>
 {
     ScDPCache::ScDPItemDataVec& mrItems;
 public:
-    PushBackValue(ScDPCache::ScDPItemDataVec& _items) : mrItems(_items) {}
+    explicit PushBackValue(ScDPCache::ScDPItemDataVec& _items) : mrItems(_items) {}
     void operator() (const Bucket& v)
     {
         mrItems.push_back(v.maValue);
@@ -222,7 +222,7 @@ class PushBackOrderIndex : std::unary_function<Bucket, void>
 {
     ScDPCache::IndexArrayType& mrData;
 public:
-    PushBackOrderIndex(ScDPCache::IndexArrayType& _items) : mrData(_items) {}
+    explicit PushBackOrderIndex(ScDPCache::IndexArrayType& _items) : mrData(_items) {}
     void operator() (const Bucket& v)
     {
         mrData.push_back(v.mnOrderIndex);
@@ -701,7 +701,7 @@ class InsertLabel : public std::unary_function<OUString, void>
 {
     LabelSet& mrNames;
 public:
-    InsertLabel(LabelSet& rNames) : mrNames(rNames) {}
+    explicit InsertLabel(LabelSet& rNames) : mrNames(rNames) {}
     void operator() (const OUString& r)
     {
         mrNames.insert(r);
diff --git a/sc/workben/test.cxx b/sc/workben/test.cxx
index a3ebd59..a97442b 100644
--- a/sc/workben/test.cxx
+++ b/sc/workben/test.cxx
@@ -89,7 +89,7 @@ private:
     FixedText*  pFixedText;
 
 public:
-    expliciti               ScTestListener(FixedText* pF);
+    explicit                ScTestListener(FixedText* pF);
     virtual                 ~ScTestListener();
 
                             SMART_UNO_DECLARATION( ScTestListener, UsrObject );
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx
index 1f8a3db..3c1fc46 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -306,8 +306,8 @@ EventInfoHash& getEventTransInfo()
 class ScriptEventHelper
 {
 public:
-    ScriptEventHelper( const Reference< XInterface >& xControl );
-    ScriptEventHelper( const OUString& sCntrlServiceName );
+    explicit ScriptEventHelper( const Reference< XInterface >& xControl );
+    explicit ScriptEventHelper( const OUString& sCntrlServiceName );
     ~ScriptEventHelper();
     Sequence< ScriptEventDescriptor > createEvents( const OUString& sCodeName );
     Sequence< OUString > getEventListeners();
@@ -570,7 +570,7 @@ class EventListener : public EventListener_BASE
 {
 
 public:
-    EventListener( const Reference< XComponentContext >& rxContext );
+    explicit EventListener( const Reference< XComponentContext >& rxContext );
     // XEventListener
     virtual void SAL_CALL disposing(const lang::EventObject& Source) throw( RuntimeException, std::exception ) override;
     using cppu::OPropertySetHelper::disposing;
diff --git a/sfx2/uiconfig/ui/templatedlg.ui b/sfx2/uiconfig/ui/templatedlg.ui
index 6ed0172..836c884 100644
--- a/sfx2/uiconfig/ui/templatedlg.ui
+++ b/sfx2/uiconfig/ui/templatedlg.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.19.0 -->
 <interface>
   <requires lib="gtk+" version="3.6"/>
   <requires lib="LibreOffice" version="1.0"/>
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 8ec8c37..720b48b 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -121,7 +121,7 @@ namespace
         SvtFileView_Impl* m_pTimeoutHandler;
 
     public:
-        CallbackTimer( SvtFileView_Impl* _pHandler ) : m_pTimeoutHandler( _pHandler ) { }
+        explicit CallbackTimer( SvtFileView_Impl* _pHandler ) : m_pTimeoutHandler( _pHandler ) { }
 
     protected:
         virtual void SAL_CALL onShot() override;
@@ -221,7 +221,7 @@ private:
     void                        Init();         // reads the translation file and fills the (internal) list
 
 public:
-                                NameTranslationList( const INetURLObject& rBaseURL );
+                                explicit NameTranslationList( const INetURLObject& rBaseURL );
                                             // rBaseURL: path to folder for which the translation of the entries
                                             //  should be done
 
@@ -293,7 +293,7 @@ class NameTranslator_Impl : public ::svt::IContentTitleTranslation
 private:
     NameTranslationList*    mpActFolder;
 public:
-                            NameTranslator_Impl( const INetURLObject& rActualFolder );
+                            explicit NameTranslator_Impl( const INetURLObject& rActualFolder );
                             virtual ~NameTranslator_Impl();
 
      // IContentTitleTranslation
diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx
index de4c215..70b30c1 100644
--- a/svtools/source/control/ctrltool.cxx
+++ b/svtools/source/control/ctrltool.cxx
@@ -108,7 +108,7 @@ private:
     ImplFontListFontInfo*   mpFirst;
     FontListFontNameType    mnType;
 
-    ImplFontListNameInfo(const OUString& rSearchName)
+    explicit ImplFontListNameInfo(const OUString& rSearchName)
         : maSearchName(rSearchName)
         , mpFirst(nullptr)
         , mnType(FontListFontNameType::NONE)


More information about the Libreoffice-commits mailing list