[Libreoffice-commits] core.git: sfx2/inc sfx2/source

Noel Grandin noel at peralex.com
Tue Aug 2 06:59:13 UTC 2016


 sfx2/inc/guisaveas.hxx                     |    2 +-
 sfx2/source/appl/fileobj.hxx               |    2 +-
 sfx2/source/appl/shutdownicon.cxx          |    4 ++--
 sfx2/source/appl/workwin.cxx               |    2 +-
 sfx2/source/dialog/filedlghelper.cxx       |    2 +-
 sfx2/source/dialog/filedlgimpl.hxx         |    2 +-
 sfx2/source/dialog/templdlg.cxx            |    8 ++++----
 sfx2/source/doc/DocumentMetadataAccess.cxx |    4 ++--
 sfx2/source/doc/SfxDocumentMetaData.cxx    |    8 ++++----
 sfx2/source/doc/doctempl.cxx               |    8 ++++----
 sfx2/source/doc/doctemplates.cxx           |    4 ++--
 sfx2/source/inc/splitwin.hxx               |    4 ++--
 sfx2/source/inc/statcach.hxx               |    2 +-
 sfx2/source/inc/templdgi.hxx               |    2 +-
 sfx2/source/sidebar/SidebarController.cxx  |    3 ++-
 sfx2/source/toolbox/imgmgr.cxx             |    2 +-
 sfx2/source/view/ipclient.cxx              |    3 ++-
 17 files changed, 32 insertions(+), 30 deletions(-)

New commits:
commit d961af95cdc62565b2e804fedf7221aa8bb4d840
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Aug 1 08:27:30 2016 +0200

    loplugin:countusersofdefaultparams in sfx2
    
    Change-Id: I0a21e2f8069bc698700e97e7c5e4ae508240ff98
    Reviewed-on: https://gerrit.libreoffice.org/27761
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/sfx2/inc/guisaveas.hxx b/sfx2/inc/guisaveas.hxx
index 5ca7743..eb742e0 100644
--- a/sfx2/inc/guisaveas.hxx
+++ b/sfx2/inc/guisaveas.hxx
@@ -63,7 +63,7 @@ public:
                     css::uno::Sequence< css::beans::PropertyValue >& aArgsSequence,
                     bool bPreselectPassword,
                     const OUString& aUserSelectedName,
-                    SignatureState nDocumentSignatureState = SignatureState::NOSIGNATURES );
+                    SignatureState nDocumentSignatureState );
 
     static bool CheckFilterOptionsAppearence(
                     const css::uno::Reference< css::container::XNameAccess >& xFilterCFG,
diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx
index e7907f7..7f91bc6 100644
--- a/sfx2/source/appl/fileobj.hxx
+++ b/sfx2/source/appl/fileobj.hxx
@@ -49,7 +49,7 @@ class SvFileObject : public sfx2::SvLinkSource
     bool bStateChangeCalled : 1;
     bool bInCallDownload : 1;
 
-    bool GetGraphic_Impl( Graphic&, SvStream* pStream = nullptr );
+    bool GetGraphic_Impl( Graphic&, SvStream* pStream );
     bool LoadFile_Impl();
     void SendStateChg_Impl( sfx2::LinkManager::LinkState nState );
 
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 3c6a1d2..a0acb49 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -694,7 +694,7 @@ bool ShutdownIcon::IsQuickstarterInstalled()
 * @param bCreate Create the directory if it does not exist yet.
 * @return OUString containing the autostart directory path.
 */
-static OUString getAutostartDir( bool bCreate = false )
+static OUString getAutostartDir( bool bCreate )
 {
     OUString aShortcut;
     const char *pConfigHome;
@@ -739,7 +739,7 @@ OUString ShutdownIcon::getShortcutName()
     aShortcut += "\\";
     aShortcut += aShortcutName;
 #else // UNX
-    OUString aShortcut = getAutostartDir();
+    OUString aShortcut = getAutostartDir(false);
     aShortcut += "/qstart.desktop";
 #endif // UNX
     return aShortcut;
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 51a4379..0e1e268 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -2401,7 +2401,7 @@ void SfxWorkWindow::EndAutoShow_Impl( Point aPos )
 
     for (VclPtr<SfxSplitWindow> & p : pSplit)
     {
-        if ( p && p->IsAutoHide() )
+        if ( p && p->IsAutoHide(false) )
         {
             Point aLocalPos = p->ScreenToOutputPixel( aPos );
             Point aEmptyPoint;
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index acdd72e..79d48f1 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -289,7 +289,7 @@ void FileDialogHelper_Impl::handleControlStateChanged( const FilePickerEvent& aE
             break;
 
         case ExtendedFilePickerElementIds::CHECKBOX_PREVIEW:
-            updatePreviewState();
+            updatePreviewState(true);
             break;
     }
 }
diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx
index 4e63998..7d4697d 100644
--- a/sfx2/source/dialog/filedlgimpl.hxx
+++ b/sfx2/source/dialog/filedlgimpl.hxx
@@ -109,7 +109,7 @@ namespace sfx2
         void                    updateExportButton();
         void                    updateSelectionBox();
         void                    updateVersions();
-        void                    updatePreviewState( bool _bUpdatePreviewWindow = true );
+        void                    updatePreviewState( bool _bUpdatePreviewWindow );
         void                    dispose();
 
         void                    loadConfig();
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index f0a5369..4096986 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -536,7 +536,7 @@ public:
     StyleTree_Impl(const OUString &rName, const OUString &rParent):
         aName(rName), aParent(rParent), pChildren(0) {}
     ~StyleTree_Impl();
-    void Put(StyleTree_Impl* pIns, sal_uIntPtr lPos=ULONG_MAX);
+    void Put(StyleTree_Impl* pIns, sal_uIntPtr lPos);
     size_t Count();
 
     const OUString& getName() { return aName; }
@@ -621,7 +621,7 @@ SvTreeListEntry* FillBox_Impl(SvTreeListBox* pBox,
                               StyleTree_Impl* pEntry,
                               const ExpandedEntries_t& rEntries,
                               SfxStyleFamily eStyleFamily,
-                              SvTreeListEntry* pParent = nullptr)
+                              SvTreeListEntry* pParent)
 {
     SvTreeListEntry* pTreeListEntry = pBox->InsertEntry(pEntry->getName(), pParent);
 
@@ -1095,7 +1095,7 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox()
 
         for (sal_uInt16 i = 0; i < nCount; ++i)
         {
-            FillBox_Impl(pTreeBox, aArr[i], aEntries, pItem->GetFamily());
+            FillBox_Impl(pTreeBox, aArr[i], aEntries, pItem->GetFamily(), nullptr);
         }
         pTreeBox->Recalc();
 
@@ -2029,7 +2029,7 @@ void SfxCommonTemplateDialog_Impl::EnableDelete()
         OSL_ENSURE(pStyle, "Style not found");
         if(pStyle && pStyle->IsUserDefined())
         {
-            EnableDel();
+            EnableDel(true);
         }
         else
         {
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index 23fea79..a7dcc65 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -288,7 +288,7 @@ static void
 addFile(struct DocumentMetadataAccess_Impl & i_rImpl,
     uno::Reference<rdf::XURI> const& i_xType,
     OUString const & i_rPath,
-    const uno::Sequence < uno::Reference< rdf::XURI > > * i_pTypes = nullptr)
+    const uno::Sequence < uno::Reference< rdf::XURI > > * i_pTypes)
 {
     try {
         const uno::Reference<rdf::XURI> xURI( getURIForStream(
@@ -328,7 +328,7 @@ addContentOrStylesFileImpl(struct DocumentMetadataAccess_Impl & i_rImpl,
     } else {
         return false;
     }
-    addFile(i_rImpl, xType.get(), i_rPath);
+    addFile(i_rImpl, xType.get(), i_rPath, nullptr);
     return true;
 }
 
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index 30d53be..4914aad 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -349,7 +349,7 @@ protected:
     /// set text of a list of standard meta data elements (multiple occ.)
     bool SAL_CALL setMetaList(const char* i_name,
         const css::uno::Sequence< OUString > & i_rValue,
-        AttrVector const* = nullptr);
+        AttrVector const*);
     void createUserDefined();
 };
 
@@ -541,7 +541,7 @@ textToDateTimeDefault(const OUString& i_text) throw ()
 // convert date to string
 OUString SAL_CALL
 dateToText(css::util::Date const& i_rd,
-           sal_Int16 const*const pTimeZone = nullptr) throw ()
+           sal_Int16 const*const pTimeZone) throw ()
 {
     if (isValidDate(i_rd)) {
         OUStringBuffer buf;
@@ -936,7 +936,7 @@ propsToStrings(css::uno::Reference<css::beans::XPropertySet> const & i_xPropSet)
         } else if (type == ::cppu::UnoType<css::util::Date>::get()) {
             css::util::Date d;
             any >>= d;
-            values.push_back(dateToText(d));
+            values.push_back(dateToText(d, nullptr));
             as.push_back(std::make_pair(vt,
                 OUString("date")));
         } else if (type == ::cppu::UnoType<css::util::DateTimeWithTimezone>::get()) {
@@ -1489,7 +1489,7 @@ SfxDocumentMetaData::setKeywords(
         throw (css::uno::RuntimeException, std::exception)
 {
     ::osl::ClearableMutexGuard g(m_aMutex);
-    if (setMetaList("meta:keyword", the_value)) {
+    if (setMetaList("meta:keyword", the_value, nullptr)) {
         g.clear();
         setModified(true);
     }
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index c488a58..8445164 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -176,7 +176,7 @@ public:
 
     void                AddEntry( const OUString& rTitle,
                                   const OUString& rTargetURL,
-                                  size_t *pPos = nullptr );
+                                  size_t *pPos );
     void                DeleteEntry( size_t nIndex );
 
     int                 Compare( RegionData_Impl* pCompareWith ) const;
@@ -228,7 +228,7 @@ public:
     RegionData_Impl*    GetRegion( size_t nIndex ) const;
 
     bool            GetTitleFromURL( const OUString& rURL, OUString& aTitle );
-    bool            InsertRegion( RegionData_Impl *pData, size_t nPos = size_t(-1) );
+    bool            InsertRegion( RegionData_Impl *pData, size_t nPos );
     const OUString& GetRootURL() const { return maRootURL; }
 
     const uno::Reference< XDocumentTemplates >& getDocTemplates() { return mxTemplates; }
@@ -1523,7 +1523,7 @@ void SfxDocTemplate_Impl::AddRegion( const OUString& rTitle,
     RegionData_Impl* pRegion;
     pRegion = new RegionData_Impl( this, rTitle );
 
-    if ( ! InsertRegion( pRegion ) )
+    if ( ! InsertRegion( pRegion, (size_t)-1 ) )
     {
         delete pRegion;
         return;
@@ -1557,7 +1557,7 @@ void SfxDocTemplate_Impl::AddRegion( const OUString& rTitle,
                 OUString aTitle( xRow->getString( 1 ) );
                 OUString aTargetDir( xRow->getString( 2 ) );
 
-                pRegion->AddEntry( aTitle, aTargetDir );
+                pRegion->AddEntry( aTitle, aTargetDir, nullptr );
             }
         }
         catch ( Exception& ) {}
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 3baf402..1245407 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -246,7 +246,7 @@ class SfxDocTplService_Impl
     void                        createFromContent( GroupList_Impl& rList,
                                                    Content &rContent,
                                                    bool bHierarchy,
-                                                   bool bWriteableContent = false );
+                                                   bool bWriteableContent );
     void                        addHierGroup( GroupList_Impl& rList,
                                               const OUString& rTitle,
                                               const OUString& rOwnURL );
@@ -1141,7 +1141,7 @@ void SfxDocTplService_Impl::doUpdate()
     GroupList_Impl  aGroupList;
 
     // get the entries from the hierarchy
-    createFromContent( aGroupList, maRootContent, true );
+    createFromContent( aGroupList, maRootContent, true, false );
 
     // get the entries from the template directories
     sal_Int32   nCountDir = maTemplateDirs.getLength();
diff --git a/sfx2/source/inc/splitwin.hxx b/sfx2/source/inc/splitwin.hxx
index 4ef48c1..b16bb22 100644
--- a/sfx2/source/inc/splitwin.hxx
+++ b/sfx2/source/inc/splitwin.hxx
@@ -97,7 +97,7 @@ public:
                             const Size& rSize,
                             sal_uInt16 nLine,
                             sal_uInt16 nPos,
-                            bool bNewLine=false );
+                            bool bNewLine );
 
     void                RemoveWindow( SfxDockingWindow* pDockWin, bool bHide=true);
 
@@ -119,7 +119,7 @@ public:
 
     bool                IsPinned() const { return bPinned; }
     bool                IsFadeIn() const;
-    bool                IsAutoHide( bool bSelf = false ) const;
+    bool                IsAutoHide( bool bSelf ) const;
     SplitWindow*        GetSplitWindow();
 
     virtual void        AutoHide() override;
diff --git a/sfx2/source/inc/statcach.hxx b/sfx2/source/inc/statcach.hxx
index d55bb2d..fe25e99 100644
--- a/sfx2/source/inc/statcach.hxx
+++ b/sfx2/source/inc/statcach.hxx
@@ -95,7 +95,7 @@ public:
     void                    ClearCache();
 
     void                    SetState( SfxItemState, const SfxPoolItem*, bool bMaybeDirty=false );
-    void                    SetCachedState(bool bAlways = false);
+    void                    SetCachedState(bool bAlways);
     void                    Invalidate( bool bWithSlot );
     void                    SetVisibleState( bool bShow=true );
 
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index 0938658..336d23f 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -293,7 +293,7 @@ public:
     {
         bCanEdit = b;
     }
-    void EnableDel( bool b = true )
+    void EnableDel( bool b )
     {
         bCanDel = b;
     }
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 34c181f..e61cd84 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -1152,7 +1152,8 @@ sal_Int32 SidebarController::SetChildWindowWidth (const sal_Int32 nNewWidth)
         mpParentWindow,
         Size(nNewWidth, aWindowSize.Height()),
         nColumn,
-        nRow);
+        nRow,
+        false);
     static_cast<SplitWindow*>(pSplitWindow)->Split();
 
     return static_cast<sal_Int32>(nColumnWidth);
diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx
index 358328b2..1c883a9 100644
--- a/sfx2/source/toolbox/imgmgr.cxx
+++ b/sfx2/source/toolbox/imgmgr.cxx
@@ -173,7 +173,7 @@ void SfxImageManager_Impl::SetSymbolsSize_Impl( sal_Int16 nNewSymbolsSize )
                         pBox->SetItemImage( nId, GetImage( nId, bLarge ) );
                         SfxStateCache *pCache = SfxViewFrame::Current()->GetBindings().GetStateCache( nId );
                         if ( pCache )
-                            pCache->SetCachedState();
+                            pCache->SetCachedState(false);
                     }
                 }
 
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index 1f2b56b..b1d983e 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -894,7 +894,8 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb )
                                             "SaveAs",
                                             aDispatchArgs,
                                             false,
-                                            "" );
+                                            "",
+                                            SignatureState::NOSIGNATURES );
                 }
                 catch( const task::ErrorCodeIOException& aErrorEx )
                 {


More information about the Libreoffice-commits mailing list