[Libreoffice-commits] core.git: desktop/source filter/source framework/source include/svx include/vcl registry/source sal/rtl sc/inc sc/qa sc/source svx/source sw/inc sw/source vcl/source

Noel Grandin noel.grandin at collabora.co.uk
Fri Apr 27 08:11:48 UTC 2018


 desktop/source/deployment/inc/dp_update.hxx                  |    3 
 desktop/source/deployment/manager/dp_informationprovider.cxx |    4 
 desktop/source/deployment/misc/dp_update.cxx                 |    4 
 filter/source/msfilter/eschesdo.cxx                          |    9 -
 filter/source/msfilter/eschesdo.hxx                          |    3 
 framework/source/uielement/statusbarmerger.cxx               |    5 
 include/svx/txencbox.hxx                                     |    4 
 include/vcl/toolbox.hxx                                      |    2 
 registry/source/reflread.cxx                                 |    8 -
 sal/rtl/alloc_arena.cxx                                      |    4 
 sal/rtl/alloc_arena.hxx                                      |    4 
 sal/rtl/alloc_cache.cxx                                      |    4 
 sal/rtl/strimp.cxx                                           |    2 
 sc/inc/postit.hxx                                            |    9 -
 sc/qa/unit/helper/qahelper.cxx                               |    4 
 sc/qa/unit/helper/qahelper.hxx                               |    2 
 sc/qa/unit/ucalc_formula.cxx                                 |    2 
 sc/source/core/data/postit.cxx                               |    4 
 sc/source/filter/excel/xiescher.cxx                          |    3 
 sc/source/filter/xml/xmlcelli.cxx                            |    2 
 sc/source/ui/attrdlg/scdlgfact.cxx                           |    2 
 sc/source/ui/inc/delcodlg.hxx                                |    2 
 sc/source/ui/miscdlgs/delcodlg.cxx                           |    8 -
 svx/source/dialog/txencbox.cxx                               |   22 ----
 sw/inc/ndgrf.hxx                                             |    1 
 sw/source/core/doc/DocumentContentOperationsManager.cxx      |    2 
 sw/source/core/graphic/ndgrf.cxx                             |   26 -----
 sw/source/ui/chrdlg/numpara.cxx                              |    9 -
 sw/source/uibase/dbui/dbmgr.cxx                              |    8 -
 sw/source/uibase/inc/numpara.hxx                             |    2 
 vcl/source/control/longcurr.cxx                              |   57 ++++-------
 vcl/source/window/menuitemlist.cxx                           |    2 
 vcl/source/window/menuitemlist.hxx                           |    4 
 vcl/source/window/toolbox.cxx                                |    4 
 34 files changed, 76 insertions(+), 155 deletions(-)

New commits:
commit f3049f68584811bb897873f35e0c302898af2d31
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Apr 25 18:56:17 2018 +0200

    loplugin:constantparam
    
    Change-Id: I966dcf87be021520e7cc394338b9c0574bb8afee
    Reviewed-on: https://gerrit.libreoffice.org/53541
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/desktop/source/deployment/inc/dp_update.hxx b/desktop/source/deployment/inc/dp_update.hxx
index 390fb0c6ee87..107857dbeb31 100644
--- a/desktop/source/deployment/inc/dp_update.hxx
+++ b/desktop/source/deployment/inc/dp_update.hxx
@@ -125,11 +125,10 @@ UpdateInfoMap getOnlineUpdateInfos(
     std::vector< std::pair< css::uno::Reference<
     css::deployment::XPackage>, css::uno::Any> > & out_errors);
 
-/* retunrs the highest version from the provided arguments.
+/* returns the highest version from the provided arguments.
 */
 DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
 OUString getHighestVersion(
-    OUString const & userVersion,
     OUString const & sharedVersion,
     OUString const & bundledVersion,
     OUString const & onlineVersion);
diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx
index c95fc229973d..5088c2e63e95 100644
--- a/desktop/source/deployment/manager/dp_informationprovider.cxx
+++ b/desktop/source/deployment/manager/dp_informationprovider.cxx
@@ -237,10 +237,10 @@ PackageInformationProvider::isUpdateAvailable( const OUString& _sExtensionId )
         OUString updateVersionShared;
         if (sourceUser != dp_misc::UPDATE_SOURCE_NONE)
             updateVersionUser = dp_misc::getHighestVersion(
-                OUString(), sVersionShared, sVersionBundled, sOnlineVersion);
+                sVersionShared, sVersionBundled, sOnlineVersion);
         if (sourceShared  != dp_misc::UPDATE_SOURCE_NONE)
             updateVersionShared = dp_misc::getHighestVersion(
-                OUString(), OUString(), sVersionBundled, sOnlineVersion);
+                OUString(), sVersionBundled, sOnlineVersion);
         OUString updateVersion;
         if (dp_misc::compareVersions(updateVersionUser, updateVersionShared) == dp_misc::GREATER)
             updateVersion = updateVersionUser;
diff --git a/desktop/source/deployment/misc/dp_update.cxx b/desktop/source/deployment/misc/dp_update.cxx
index 605ace6a5f44..05b23c9cd3f5 100644
--- a/desktop/source/deployment/misc/dp_update.cxx
+++ b/desktop/source/deployment/misc/dp_update.cxx
@@ -387,15 +387,13 @@ UpdateInfoMap getOnlineUpdateInfos(
     return infoMap;
 }
 OUString getHighestVersion(
-    OUString const & userVersion,
     OUString const & sharedVersion,
     OUString const & bundledVersion,
     OUString const & onlineVersion)
 {
-    int index = determineHighestVersion(userVersion, sharedVersion, bundledVersion, onlineVersion);
+    int index = determineHighestVersion(OUString(), sharedVersion, bundledVersion, onlineVersion);
     switch (index)
     {
-    case 0: return userVersion;
     case 1: return sharedVersion;
     case 2: return bundledVersion;
     case 3: return onlineVersion;
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index 19fb9483eed7..db2c64d8b4f9 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -697,7 +697,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
         if( bAdditionalText )
         {
             mpEscherEx->EndShape( nShapeType, nShapeID );
-            ImplWriteAdditionalText( rObj, Point() );
+            ImplWriteAdditionalText( rObj );
         }
 
     } while ( false );
@@ -709,8 +709,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
     return nShapeID;
 }
 
-void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj,
-                                                const Point& rTextRefPoint )
+void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj )
 {
     sal_uInt32 nShapeID = 0;
     sal_uInt16 nShapeType = 0;
@@ -733,8 +732,8 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj,
 //2do: this does not work right
             double fDist = hypot( rObj.GetRect().GetWidth(),
                                     rObj.GetRect().GetHeight() );
-            rObj.SetRect( tools::Rectangle( rTextRefPoint,
-                            Point( static_cast<sal_Int32>( rTextRefPoint.X() + fDist ), rTextRefPoint.Y() - 1 ) ) );
+            rObj.SetRect( tools::Rectangle( Point(),
+                            Point( static_cast<sal_Int32>( fDist ), -1 ) ) );
 
             mpEscherEx->OpenContainer( ESCHER_SpContainer );
             mpEscherEx->AddShape( ESCHER_ShpInst_TextBox, ShapeFlag::HaveShapeProperty | ShapeFlag::HaveAnchor );
diff --git a/filter/source/msfilter/eschesdo.hxx b/filter/source/msfilter/eschesdo.hxx
index 431c4520b762..3cdb9ef430f8 100644
--- a/filter/source/msfilter/eschesdo.hxx
+++ b/filter/source/msfilter/eschesdo.hxx
@@ -124,8 +124,7 @@ class ImplEESdrWriter
                             const bool bOOxmlExport = false );  // returns ShapeID
     static void         ImplFlipBoundingBox( ImplEESdrObject& rObj, EscherPropertyContainer& rPropOpt );
     void                ImplWriteAdditionalText(
-                            ImplEESdrObject& rObj,
-                            const Point& rTextRefPoint );
+                            ImplEESdrObject& rObj );
     sal_uInt32          ImplEnterAdditionalTextGroup(
                             const css::uno::Reference< css::drawing::XShape >& rShape,
                             const tools::Rectangle* pBoundRect );
diff --git a/framework/source/uielement/statusbarmerger.cxx b/framework/source/uielement/statusbarmerger.cxx
index 2680a63076bd..4810152c02df 100644
--- a/framework/source/uielement/statusbarmerger.cxx
+++ b/framework/source/uielement/statusbarmerger.cxx
@@ -126,11 +126,10 @@ bool lcl_MergeItems( StatusBar* pStatusbar,
 bool lcl_ReplaceItem( StatusBar* pStatusbar,
                              sal_uInt16 nPos,
                              sal_uInt16& rItemId,
-                            const ::rtl::OUString& rModuleIdentifier,
                              const AddonStatusbarItemContainer& rAddonToolbarItems )
 {
     pStatusbar->RemoveItem( pStatusbar->GetItemId( nPos ) );
-    return lcl_MergeItems( pStatusbar, nPos, 0, rItemId, rModuleIdentifier, rAddonToolbarItems );
+    return lcl_MergeItems( pStatusbar, nPos, 0, rItemId, OUString(), rAddonToolbarItems );
 }
 
 bool lcl_RemoveItems( StatusBar* pStatusbar,
@@ -199,7 +198,7 @@ bool StatusbarMerger::ProcessMergeOperation(
     else if ( rMergeCommand == MERGECOMMAND_ADDBEFORE )
         return lcl_MergeItems( pStatusbar, nPos, 0, rItemId, "", rItems );
     else if ( rMergeCommand == MERGECOMMAND_REPLACE )
-        return lcl_ReplaceItem( pStatusbar, nPos, rItemId, "", rItems );
+        return lcl_ReplaceItem( pStatusbar, nPos, rItemId, rItems );
     else if ( rMergeCommand == MERGECOMMAND_REMOVE )
         return lcl_RemoveItems( pStatusbar, nPos, rMergeCommandParameter );
 
diff --git a/include/svx/txencbox.hxx b/include/svx/txencbox.hxx
index e8e193e73da3..f7db496394f8 100644
--- a/include/svx/txencbox.hxx
+++ b/include/svx/txencbox.hxx
@@ -115,9 +115,7 @@ public:
             RTL_TEXTENCODING_GB_18030. Normally, this flag should be set to
             <TRUE/> whenever the box is used in import dialogs. */
     void                FillFromTextEncodingTable(
-                            bool bExcludeImportSubsets,
-                            sal_uInt32 nExcludeInfoFlags = 0,
-                            sal_uInt32 nButIncludeInfoFlags = 0
+                            bool bExcludeImportSubsets
                             );
 
     void                InsertTextEncoding( const rtl_TextEncoding nEnc );
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 74db39f4af55..7944fd950a82 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -512,7 +512,7 @@ public:
     static Size         GetDefaultImageSize(ToolBoxButtonSize eToolBoxButtonSize);
     Size                GetDefaultImageSize() const;
     void                ChangeHighlight( ImplToolItems::size_type nPos );
-    bool                ChangeHighlightUpDn( bool bUp, bool bNoCyle = false );
+    bool                ChangeHighlightUpDn( bool bUp );
 
 
     void SetToolbarLayoutMode( ToolBoxLayoutMode eLayout );
diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx
index c99ebe33ad49..7ed943afae36 100644
--- a/registry/source/reflread.cxx
+++ b/registry/source/reflread.cxx
@@ -1109,15 +1109,15 @@ public:
     sal_uInt32      m_offset_SUPERTYPES;
 
     TypeRegistryEntry(
-        const sal_uInt8* buffer, sal_uInt32 len, bool copyBuffer);
+        const sal_uInt8* buffer, sal_uInt32 len);
         // throws std::bad_alloc
 
     typereg_Version getVersion() const;
 };
 
 TypeRegistryEntry::TypeRegistryEntry(
-    const sal_uInt8* buffer, sal_uInt32 len, bool copyBuffer):
-    BlopObject(buffer, len, copyBuffer), m_refCount(1), m_nSuperTypes(0),
+    const sal_uInt8* buffer, sal_uInt32 len):
+    BlopObject(buffer, len, /*copyBuffer*/false), m_refCount(1), m_nSuperTypes(0),
     m_offset_SUPERTYPES(0)
 {
     std::size_t const entrySize = sizeof(sal_uInt16);
@@ -1195,7 +1195,7 @@ bool TYPEREG_CALLTYPE typereg_reader_create(
         try {
             entry.reset(
                 new TypeRegistryEntry(
-                    static_cast< sal_uInt8 const * >(buffer), length, false/*copy*/));
+                    static_cast< sal_uInt8 const * >(buffer), length));
         } catch (std::bad_alloc &) {
             return false;
         }
diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx
index c6e6a9a2ae93..721df266f442 100644
--- a/sal/rtl/alloc_arena.cxx
+++ b/sal/rtl/alloc_arena.cxx
@@ -1002,7 +1002,7 @@ void rtl_arena_foreach (rtl_arena_type *arena, ArenaForeachFn foreachFn)
         {
             if (arena->m_qcache_ptr[i - 1] != nullptr)
                 rtl_cache_foreach (arena->m_qcache_ptr[i - 1],
-                                   foreachFn, nullptr);
+                                   foreachFn);
         }
     }
 
@@ -1013,7 +1013,7 @@ void rtl_arena_foreach (rtl_arena_type *arena, ArenaForeachFn foreachFn)
              segment != nullptr; segment = segment->m_fnext)
         {
             foreachFn(reinterpret_cast<void *>(segment->m_addr),
-                      segment->m_size, nullptr);
+                      segment->m_size);
         }
     }
 }
diff --git a/sal/rtl/alloc_arena.hxx b/sal/rtl/alloc_arena.hxx
index e3d3d0e292fc..30eac16840a6 100644
--- a/sal/rtl/alloc_arena.hxx
+++ b/sal/rtl/alloc_arena.hxx
@@ -112,10 +112,10 @@ struct rtl_arena_st
  */
 extern rtl_arena_type * gp_default_arena;
 
-typedef void (*ArenaForeachFn)(void *addr, sal_Size size, void *user_data);
+typedef void (*ArenaForeachFn)(void *addr, sal_Size size);
 
 void rtl_arena_foreach(rtl_arena_type *arena, ArenaForeachFn fn);
-void rtl_cache_foreach(rtl_cache_type *arena, ArenaForeachFn foreachFn, void *user_data);
+void rtl_cache_foreach(rtl_cache_type *arena, ArenaForeachFn foreachFn);
 
 #endif // INCLUDED_SAL_RTL_ALLOC_ARENA_HXX
 
diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx
index 56357d25ac38..a24f8661cb8f 100644
--- a/sal/rtl/alloc_cache.cxx
+++ b/sal/rtl/alloc_cache.cxx
@@ -1153,7 +1153,7 @@ void SAL_CALL rtl_cache_free(
 }
 
 // FIXME: foreachFn called for free'd blocks and will break free-chains.
-void rtl_cache_foreach(rtl_cache_type *cache, ArenaForeachFn foreachFn, void *user_data)
+void rtl_cache_foreach(rtl_cache_type *cache, ArenaForeachFn foreachFn)
 {
     for (rtl_cache_slab_type *cur = &(cache->m_used_head);
          cur && cur->m_slab_next != &(cache->m_used_head);
@@ -1163,7 +1163,7 @@ void rtl_cache_foreach(rtl_cache_type *cache, ArenaForeachFn foreachFn, void *us
              item < reinterpret_cast<char *>(cur->m_bp);
              item += cache->m_type_size)
         {
-            foreachFn(item, cache->m_type_size, user_data);
+            foreachFn(item, cache->m_type_size);
         }
     }
 
diff --git a/sal/rtl/strimp.cxx b/sal/rtl/strimp.cxx
index 63466a0a88f0..c590fbcc4d52 100644
--- a/sal/rtl/strimp.cxx
+++ b/sal/rtl/strimp.cxx
@@ -87,7 +87,7 @@ static void pre_freeStringFn(void *data)
 }
 } // extern "C"
 
-static void mark_static(void *addr, sal_Size /* size */, void *)
+static void mark_static(void *addr, sal_Size /* size */)
 {
     char *inner = static_cast<char*>(addr) + 4;
     rtl_uString *str = reinterpret_cast<rtl_uString *>(inner);
diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx
index 46aa4b0745c6..09f8d77a18e4 100644
--- a/sc/inc/postit.hxx
+++ b/sc/inc/postit.hxx
@@ -329,12 +329,6 @@ public:
             object. The rectangle may be empty, in this case the default
             position and size is used.
 
-        @param bAlwaysCreateCaption  If sal_True is passed, the caption drawing
-            object will be created immediately. If sal_False is passed, the caption
-            drawing object will not be created if the note is not visible
-            (bShown = sal_False), but the cell note will cache the passed data.
-            MUST be set to sal_False outside of import filter implementations!
-
         @return  Pointer to the new cell note object if insertion was
             successful (i.e. the passed cell position was valid), null
             otherwise. The Calc document is the owner of the note object.
@@ -342,8 +336,7 @@ public:
     static ScPostIt*    CreateNoteFromObjectData(
                             ScDocument& rDoc, const ScAddress& rPos,
                             std::unique_ptr<SfxItemSet> pItemSet, OutlinerParaObject* pOutlinerObj,
-                            const tools::Rectangle& rCaptionRect, bool bShown,
-                            bool bAlwaysCreateCaption );
+                            const tools::Rectangle& rCaptionRect, bool bShown );
 
     /** Creates a cell note based on the passed string and inserts it into the
         document.
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 3f7c93198312..8aa9cc883568 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -472,12 +472,10 @@ bool checkFormulaPositions(
 }
 
 ScTokenArray* compileFormula(
-    ScDocument* pDoc, const OUString& rFormula, const ScAddress* pPos,
+    ScDocument* pDoc, const OUString& rFormula,
     formula::FormulaGrammar::Grammar eGram )
 {
     ScAddress aPos(0,0,0);
-    if (pPos)
-        aPos = *pPos;
     ScCompiler aComp(pDoc, aPos, eGram);
     return aComp.CompileString(rFormula);
 }
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index 5f40ba84432a..f8d522e65387 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -140,7 +140,7 @@ SCQAHELPER_DLLPUBLIC bool checkFormulaPositions(
     ScDocument& rDoc, SCTAB nTab, SCCOL nCol, const SCROW* pRows, size_t nRowCount);
 
 SCQAHELPER_DLLPUBLIC ScTokenArray* compileFormula(
-    ScDocument* pDoc, const OUString& rFormula, const ScAddress* pPos = nullptr,
+    ScDocument* pDoc, const OUString& rFormula,
     formula::FormulaGrammar::Grammar eGram = formula::FormulaGrammar::GRAM_NATIVE );
 
 SCQAHELPER_DLLPUBLIC bool checkOutput(
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 352cb4ae1d38..0b375db0dd21 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -1020,7 +1020,7 @@ void Test::testFormulaCompiler()
     {
         std::unique_ptr<ScTokenArray> pArray;
         {
-            pArray.reset(compileFormula(m_pDoc, OUString::createFromAscii(aTests[i].pInput), nullptr, aTests[i].eInputGram));
+            pArray.reset(compileFormula(m_pDoc, OUString::createFromAscii(aTests[i].pInput), aTests[i].eInputGram));
             CPPUNIT_ASSERT_MESSAGE("Token array shouldn't be NULL!", pArray.get());
         }
 
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 50d416077d89..7b51b97431bd 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -1242,7 +1242,7 @@ ScPostIt* ScNoteUtil::CreateNoteFromCaption(
 ScPostIt* ScNoteUtil::CreateNoteFromObjectData(
         ScDocument& rDoc, const ScAddress& rPos, std::unique_ptr<SfxItemSet> pItemSet,
         OutlinerParaObject* pOutlinerObj, const tools::Rectangle& rCaptionRect,
-        bool bShown, bool bAlwaysCreateCaption )
+        bool bShown )
 {
     OSL_ENSURE( pItemSet && pOutlinerObj, "ScNoteUtil::CreateNoteFromObjectData - item set and outliner object expected" );
     ScNoteData aNoteData( bShown );
@@ -1264,7 +1264,7 @@ ScPostIt* ScNoteUtil::CreateNoteFromObjectData(
 
     /*  Create the note and insert it into the document. If the note is
         visible, the caption object will be created automatically. */
-    ScPostIt* pNote = new ScPostIt( rDoc, rPos, aNoteData, bAlwaysCreateCaption, 0/*nPostItId*/ );
+    ScPostIt* pNote = new ScPostIt( rDoc, rPos, aNoteData, /*bAlwaysCreateCaption*/false, 0/*nPostItId*/ );
     pNote->AutoStamp();
 
     rDoc.SetNote(rPos, pNote);
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 989c9b693d0f..c5fbac78f43f 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -1826,8 +1826,7 @@ void XclImpNoteObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject&
             rSdrObj.GetMergedItemSet().Clone(),             // new object on heap expected
             new OutlinerParaObject( *pOutlinerObj ),        // new object on heap expected
             rSdrObj.GetLogicRect(),
-            ::get_flag( mnNoteFlags, EXC_NOTE_VISIBLE ),
-            false );
+            ::get_flag( mnNoteFlags, EXC_NOTE_VISIBLE ) );
     }
 }
 
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index f8095c33eabf..c279deb63993 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -910,7 +910,7 @@ void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos)
                 // create cell note with all data from drawing object
                 pNote = ScNoteUtil::CreateNoteFromObjectData( *pDoc, rPos,
                     std::move(xItemSet), xOutlinerObj.release(),
-                    aCaptionRect, mxAnnotationData->mbShown, false );
+                    aCaptionRect, mxAnnotationData->mbShown );
             }
         }
     }
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index d1035d97a79a..f8d4b8f0d542 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -704,7 +704,7 @@ VclPtr<AbstractScDataFormDlg> ScAbstractDialogFactory_Impl::CreateScDataFormDlg(
 
 VclPtr<AbstractScDeleteContentsDlg> ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(weld::Window* pParent)
 {
-    return VclPtr<AbstractScDeleteContentsDlg_Impl>::Create(new ScDeleteContentsDlg(pParent, InsertDeleteFlags::NONE));
+    return VclPtr<AbstractScDeleteContentsDlg_Impl>::Create(new ScDeleteContentsDlg(pParent));
 }
 
 VclPtr<AbstractScFillSeriesDlg> ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg( vcl::Window*       pParent,
diff --git a/sc/source/ui/inc/delcodlg.hxx b/sc/source/ui/inc/delcodlg.hxx
index 00910bcb2cd9..d2f9e9535d8a 100644
--- a/sc/source/ui/inc/delcodlg.hxx
+++ b/sc/source/ui/inc/delcodlg.hxx
@@ -45,7 +45,7 @@ private:
     DECL_LINK( DelAllHdl, weld::Button&, void );
 
 public:
-    ScDeleteContentsDlg(weld::Window* pParent, InsertDeleteFlags nCheckDefaults );
+    ScDeleteContentsDlg(weld::Window* pParent);
     virtual ~ScDeleteContentsDlg() override;
     void    DisableObjects();
 
diff --git a/sc/source/ui/miscdlgs/delcodlg.cxx b/sc/source/ui/miscdlgs/delcodlg.cxx
index 19d098994c76..28b1169f22e9 100644
--- a/sc/source/ui/miscdlgs/delcodlg.cxx
+++ b/sc/source/ui/miscdlgs/delcodlg.cxx
@@ -26,7 +26,7 @@ InsertDeleteFlags ScDeleteContentsDlg::nPreviousChecks   = (InsertDeleteFlags::D
                                                  InsertDeleteFlags::NOTE     | InsertDeleteFlags::FORMULA |
                                                  InsertDeleteFlags::VALUE);
 
-ScDeleteContentsDlg::ScDeleteContentsDlg(weld::Window* pParent, InsertDeleteFlags nCheckDefaults)
+ScDeleteContentsDlg::ScDeleteContentsDlg(weld::Window* pParent)
     : GenericDialogController(pParent, "modules/scalc/ui/deletecontents.ui", "DeleteContentsDialog")
     , m_bObjectsDisabled(false)
     , m_xBtnDelAll(m_xBuilder->weld_check_button("deleteall"))
@@ -39,12 +39,6 @@ ScDeleteContentsDlg::ScDeleteContentsDlg(weld::Window* pParent, InsertDeleteFlag
     , m_xBtnDelObjects(m_xBuilder->weld_check_button("objects"))
     , m_xBtnOk(m_xBuilder->weld_button("ok"))
 {
-    if ( nCheckDefaults != InsertDeleteFlags::NONE )
-    {
-        ScDeleteContentsDlg::nPreviousChecks = nCheckDefaults;
-        ScDeleteContentsDlg::bPreviousAllCheck = false;
-    }
-
     m_xBtnDelAll->set_active( ScDeleteContentsDlg::bPreviousAllCheck );
     m_xBtnDelStrings->set_active( bool(InsertDeleteFlags::STRING & ScDeleteContentsDlg::nPreviousChecks) );
     m_xBtnDelNumbers->set_active( bool(InsertDeleteFlags::VALUE & ScDeleteContentsDlg::nPreviousChecks) );
diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx
index 4eb656d0746e..448b6aa14912 100644
--- a/svx/source/dialog/txencbox.cxx
+++ b/svx/source/dialog/txencbox.cxx
@@ -233,33 +233,13 @@ TextEncodingBox::~TextEncodingBox()
 }
 
 void TextEncodingBox::FillFromTextEncodingTable(
-        bool bExcludeImportSubsets, sal_uInt32 nExcludeInfoFlags,
-        sal_uInt32 nButIncludeInfoFlags )
+        bool bExcludeImportSubsets )
 {
-    rtl_TextEncodingInfo aInfo;
-    aInfo.StructSize = sizeof(rtl_TextEncodingInfo);
     const sal_uInt32 nCount = SAL_N_ELEMENTS(RID_SVXSTR_TEXTENCODING_TABLE);
     for (sal_uInt32 j = 0; j < nCount; ++j)
     {
         bool bInsert = true;
         rtl_TextEncoding nEnc = RID_SVXSTR_TEXTENCODING_TABLE[j].second;
-        if ( nExcludeInfoFlags )
-        {
-            if ( !rtl_getTextEncodingInfo( nEnc, &aInfo ) )
-                bInsert = false;
-            else
-            {
-                if ( (aInfo.Flags & nExcludeInfoFlags) == 0 )
-                {
-                    if ( (nExcludeInfoFlags & RTL_TEXTENCODING_INFO_UNICODE) &&
-                            ((nEnc == RTL_TEXTENCODING_UCS2) ||
-                            nEnc == RTL_TEXTENCODING_UCS4) )
-                        bInsert = false;    // InfoFlags don't work for Unicode :-(
-                }
-                else if ( (aInfo.Flags & nButIncludeInfoFlags) == 0 )
-                    bInsert = false;
-            }
-        }
         if ( bInsert )
         {
             if ( bExcludeImportSubsets )
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index cadf0ef7d1f4..6e294ca5814c 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -120,7 +120,6 @@ public:
        gets replaced by the new one. */
     bool ReRead( const OUString& rGrfName, const OUString& rFltName,
                  const Graphic* pGraphic = nullptr,
-                 const GraphicObject* pGrfObj = nullptr,
                  bool bModify = true );
 private:
     /// Loading of graphic immediately before displaying.
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 4044019605d1..6cee3d7973e3 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -2709,7 +2709,7 @@ void DocumentContentOperationsManager::ReRead( SwPaM& rPam, const OUString& rGrf
                                                 GetMirrorGrf().GetValue() )
             pGrfNd->SetAttr( SwMirrorGrf() );
 
-        pGrfNd->ReRead( rGrfName, rFltName, pGraphic, /*pGrafObj*/nullptr );
+        pGrfNd->ReRead( rGrfName, rFltName, pGraphic );
         m_rDoc.getIDocumentState().SetModified();
     }
 }
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 030893d63693..a966a29897bf 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -85,7 +85,7 @@ SwGrfNode::SwGrfNode(
         bFrameInPaint = bScaleImageMap = false;
 
     bGraphicArrived = true;
-    ReRead(sURLLink, rFltName, pGraphic, nullptr, false);
+    ReRead(sURLLink, rFltName, pGraphic, false);
 }
 
 SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
@@ -144,7 +144,7 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
 
 bool SwGrfNode::ReRead(
     const OUString& rGrfName, const OUString& rFltName,
-    const Graphic* pGraphic, const GraphicObject* pGrfObj,
+    const Graphic* pGraphic,
     bool bNewGrf )
 {
     bool bReadGrf = false;
@@ -152,7 +152,7 @@ bool SwGrfNode::ReRead(
     delete mpReplacementGraphic;
     mpReplacementGraphic = nullptr;
 
-    OSL_ENSURE( pGraphic || pGrfObj || !rGrfName.isEmpty(),
+    OSL_ENSURE( pGraphic || !rGrfName.isEmpty(),
             "GraphicNode without a name, Graphic or GraphicObject" );
 
     // with name
@@ -196,12 +196,6 @@ bool SwGrfNode::ReRead(
             onGraphicChanged();
             bReadGrf = true;
         }
-        else if( pGrfObj )
-        {
-            maGrfObj = *pGrfObj;
-            onGraphicChanged();
-            bReadGrf = true;
-        }
         else
         {
             // reset data of the old graphic so that the correct placeholder is
@@ -232,12 +226,6 @@ bool SwGrfNode::ReRead(
         onGraphicChanged();
         bReadGrf = true;
     }
-    else if( pGrfObj && rGrfName.isEmpty() )
-    {
-        maGrfObj = *pGrfObj;
-        onGraphicChanged();
-        bReadGrf = true;
-    }
     // Was the graphic already loaded?
     else if( !bNewGrf && GraphicType::NONE != maGrfObj.GetType() )
         return true;
@@ -256,14 +244,6 @@ bool SwGrfNode::ReRead(
                 // create connection without update, as we have the graphic
                 static_cast<SwBaseLink*>( refLink.get() )->Connect();
             }
-            else if( pGrfObj )
-            {
-                maGrfObj = *pGrfObj;
-                onGraphicChanged();
-                bReadGrf = true;
-                // create connection without update, as we have the graphic
-                static_cast<SwBaseLink*>( refLink.get() )->Connect();
-            }
             else
             {
                 Graphic aGrf;
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index 7472c8d04fa0..589e808fe4e7 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -339,25 +339,22 @@ IMPL_LINK_NOARG( SwParagraphNumTabPage, EditNumStyleSelectHdl_Impl, ListBox&, vo
 IMPL_LINK_NOARG(SwParagraphNumTabPage, EditNumStyleHdl_Impl, Button*, void)
 {
     OUString aTemplName(m_pNumberStyleLB->GetSelectedEntry());
-    ExecuteEditNumStyle_Impl( SID_STYLE_EDIT, aTemplName, OUString(), SfxStyleFamily::Pseudo );
+    ExecuteEditNumStyle_Impl( SID_STYLE_EDIT, aTemplName, SfxStyleFamily::Pseudo );
 }
 
 // Internal: Perform functions through the Dispatcher
 bool SwParagraphNumTabPage::ExecuteEditNumStyle_Impl(
-    sal_uInt16 nId, const OUString &rStr, const OUString& rRefStr, SfxStyleFamily nFamily)
+    sal_uInt16 nId, const OUString &rStr, SfxStyleFamily nFamily)
 {
 
     SfxDispatcher &rDispatcher = *SfxViewShell::Current()->GetDispatcher();
     SfxStringItem aItem(nId, rStr);
     SfxUInt16Item aFamily(SID_STYLE_FAMILY, static_cast<sal_uInt16>(nFamily));
-    SfxStringItem aRefName( SID_STYLE_REFERENCE, rRefStr );
-    const SfxPoolItem* pItems[ 6 ];
+    const SfxPoolItem* pItems[ 3 ];
     sal_uInt16 nCount = 0;
     if( !rStr.isEmpty() )
         pItems[ nCount++ ] = &aItem;
     pItems[ nCount++ ] = &aFamily;
-    if( !rRefStr.isEmpty() )
-        pItems[ nCount++ ] = &aRefName;
 
     pItems[ nCount++ ] = nullptr;
 
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 76b2a4adfa04..b8ad0a08c8c5 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -2775,7 +2775,7 @@ In case of success it returns the registered name, otherwise an empty string.
 Optionally add a prefix to the registered DB name.
 */
 OUString LoadAndRegisterDataSource_Impl(DBConnURIType type, const uno::Reference< beans::XPropertySet > *pSettings,
-    const INetURLObject &rURL, const OUString *pPrefix, const OUString *pDestDir, SfxObjectShell* pDocShell)
+    const INetURLObject &rURL, const OUString *pDestDir, SfxObjectShell* pDocShell)
 {
     OUString sExt(rURL.GetExtension());
     uno::Any aTableFilterAny;
@@ -2815,8 +2815,6 @@ OUString LoadAndRegisterDataSource_Impl(DBConnURIType type, const uno::Reference
             INetURLObject::DecodeMechanism::Unambiguous);
         sal_Int32 nExtLen = sExt.getLength();
         sNewName = sNewName.replaceAt(sNewName.getLength() - nExtLen - 1, nExtLen + 1, "");
-        if (pPrefix)
-            sNewName = *pPrefix + sNewName;
 
         //find a unique name if sNewName already exists
         sFind = sNewName;
@@ -2965,7 +2963,7 @@ OUString SwDBManager::LoadAndRegisterDataSource(weld::Window* pParent, SwDocShel
             if( xSettingsDlg->execute() )
                 aSettings.set( uno::Reference < beans::XPropertySet >( xSettingsDlg, uno::UNO_QUERY_THROW ) );
         }
-        sFind = LoadAndRegisterDataSource_Impl( type, DBConnURIType::FLAT == type ? &aSettings : nullptr, aURL, nullptr, nullptr, pDocShell );
+        sFind = LoadAndRegisterDataSource_Impl( type, DBConnURIType::FLAT == type ? &aSettings : nullptr, aURL, nullptr, pDocShell );
 
         m_aUncommitedRegistrations.push_back(std::pair<SwDocShell*, OUString>(pDocShell, sFind));
     }
@@ -2991,7 +2989,7 @@ void SwDBManager::StoreEmbeddedDataSource(const uno::Reference<frame::XStorable>
 
 OUString SwDBManager::LoadAndRegisterDataSource(const OUString &rURI, const OUString *pDestDir)
 {
-    return LoadAndRegisterDataSource_Impl( DBConnURIType::UNKNOWN, nullptr, INetURLObject(rURI), nullptr, pDestDir, nullptr );
+    return LoadAndRegisterDataSource_Impl( DBConnURIType::UNKNOWN, nullptr, INetURLObject(rURI), pDestDir, nullptr );
 }
 
 void SwDBManager::RevokeDataSource(const OUString& rName)
diff --git a/sw/source/uibase/inc/numpara.hxx b/sw/source/uibase/inc/numpara.hxx
index 8f3fc77f1815..f0f78a271361 100644
--- a/sw/source/uibase/inc/numpara.hxx
+++ b/sw/source/uibase/inc/numpara.hxx
@@ -61,7 +61,7 @@ class SwParagraphNumTabPage final : public SfxTabPage
 
     static const sal_uInt16 aPageRg[];
 
-    static bool ExecuteEditNumStyle_Impl( sal_uInt16 nId, const OUString& rStr, const OUString& rRefStr,
+    static bool ExecuteEditNumStyle_Impl( sal_uInt16 nId, const OUString& rStr,
                           SfxStyleFamily nFamily );
 
 public:
diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx
index dc15721dc8fa..183782037716 100644
--- a/vcl/source/control/longcurr.cxx
+++ b/vcl/source/control/longcurr.cxx
@@ -92,9 +92,8 @@ OUString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const BigInt
     return aTemplate.makeStringAndClear();
 }
 
-bool ImplNumericGetValue( const OUString& rStr, BigInt& rValue,
-                                 sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper,
-                                 bool bCurrency )
+bool ImplCurrencyGetValue( const OUString& rStr, BigInt& rValue,
+                                 sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper )
 {
     OUString aStr = rStr;
     OUStringBuffer aStr1;
@@ -123,13 +122,28 @@ bool ImplNumericGetValue( const OUString& rStr, BigInt& rValue,
         aStr1 = aStr;
 
     // Negative?
-    if ( bCurrency )
+    if ( (aStr[ 0 ] == '(') && (aStr[ aStr.getLength()-1 ] == ')') )
+        bNegative = true;
+    if ( !bNegative )
     {
-        if ( (aStr[ 0 ] == '(') && (aStr[ aStr.getLength()-1 ] == ')') )
-            bNegative = true;
-        if ( !bNegative )
+        for (sal_Int32 i=0; i < aStr.getLength(); i++ )
+        {
+            if ( (aStr[ i ] >= '0') && (aStr[ i ] <= '9') )
+                break;
+            else if ( aStr[ i ] == '-' )
+            {
+                bNegative = true;
+                break;
+            }
+        }
+    }
+    if ( !bNegative && !aStr.isEmpty() )
+    {
+        sal_uInt16 nFormat = rLocaleDataWrapper.getCurrNegativeFormat();
+        if ( (nFormat == 3) || (nFormat == 6)  ||
+             (nFormat == 7) || (nFormat == 10) )
         {
-            for (sal_Int32 i=0; i < aStr.getLength(); i++ )
+            for (sal_Int32 i = aStr.getLength()-1; i > 0; i++ )
             {
                 if ( (aStr[ i ] >= '0') && (aStr[ i ] <= '9') )
                     break;
@@ -140,29 +154,6 @@ bool ImplNumericGetValue( const OUString& rStr, BigInt& rValue,
                 }
             }
         }
-        if ( !bNegative && bCurrency && !aStr.isEmpty() )
-        {
-            sal_uInt16 nFormat = rLocaleDataWrapper.getCurrNegativeFormat();
-            if ( (nFormat == 3) || (nFormat == 6)  ||
-                 (nFormat == 7) || (nFormat == 10) )
-            {
-                for (sal_Int32 i = aStr.getLength()-1; i > 0; i++ )
-                {
-                    if ( (aStr[ i ] >= '0') && (aStr[ i ] <= '9') )
-                        break;
-                    else if ( aStr[ i ] == '-' )
-                    {
-                        bNegative = true;
-                        break;
-                    }
-                }
-            }
-        }
-    }
-    else
-    {
-        if ( aStr1[ 0 ] == '-' )
-            bNegative = true;
     }
 
     // delete unwanted characters
@@ -223,7 +214,7 @@ bool ImplNumericGetValue( const OUString& rStr, BigInt& rValue,
 inline bool ImplLongCurrencyGetValue( const OUString& rStr, BigInt& rValue,
                                       sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper )
 {
-    return ImplNumericGetValue( rStr, rValue, nDecDigits, rLocaleDataWrapper, true );
+    return ImplCurrencyGetValue( rStr, rValue, nDecDigits, rLocaleDataWrapper );
 }
 
 bool ImplLongCurrencyReformat( const OUString& rStr, BigInt const & nMin, BigInt const & nMax,
@@ -232,7 +223,7 @@ bool ImplLongCurrencyReformat( const OUString& rStr, BigInt const & nMin, BigInt
                                LongCurrencyFormatter const & rFormatter )
 {
     BigInt nValue;
-    if ( !ImplNumericGetValue( rStr, nValue, nDecDigits, rLocaleDataWrapper, true ) )
+    if ( !ImplCurrencyGetValue( rStr, nValue, nDecDigits, rLocaleDataWrapper ) )
         return true;
     else
     {
diff --git a/vcl/source/window/menuitemlist.cxx b/vcl/source/window/menuitemlist.cxx
index 6eac7de94e56..f9306c864249 100644
--- a/vcl/source/window/menuitemlist.cxx
+++ b/vcl/source/window/menuitemlist.cxx
@@ -53,7 +53,7 @@ MenuItemData* MenuItemList::Insert(
     const OString &rIdent
 )
 {
-    MenuItemData* pData     = new MenuItemData( rStr, Image() );
+    MenuItemData* pData     = new MenuItemData( rStr );
     pData->nId              = nId;
     pData->sIdent           = rIdent;
     pData->eType            = eType;
diff --git a/vcl/source/window/menuitemlist.hxx b/vcl/source/window/menuitemlist.hxx
index 2b086af41212..300908eee447 100644
--- a/vcl/source/window/menuitemlist.hxx
+++ b/vcl/source/window/menuitemlist.hxx
@@ -71,7 +71,7 @@ struct MenuItemData
         , pSalMenuItem(nullptr)
     {
     }
-    MenuItemData( const OUString& rStr, const Image& rImage )
+    MenuItemData( const OUString& rStr )
         : nId(0)
         , eType(MenuItemType::DONTKNOW)
         , nBits(MenuItemBits::NONE)
@@ -79,7 +79,7 @@ struct MenuItemData
         , aText(rStr)
         , nUserValue(nullptr)
         , aUserValueReleaseFunc(nullptr)
-        , aImage(rImage)
+        , aImage()
         , bChecked(false)
         , bEnabled(false)
         , bVisible(false)
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index a90b1d4814e4..9ff745b27dcb 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -4875,9 +4875,9 @@ static bool ImplIsValidItem( const ImplToolItem* pItem, bool bNotClipped )
     return bValid;
 }
 
-bool ToolBox::ChangeHighlightUpDn( bool bUp, bool bNoCyle )
+bool ToolBox::ChangeHighlightUpDn( bool bUp )
 {
-    return ImplChangeHighlightUpDn(bUp, bNoCyle);
+    return ImplChangeHighlightUpDn(bUp, /*bNoCyle*/ false);
 }
 
 bool ToolBox::ImplChangeHighlightUpDn( bool bUp, bool bNoCycle )


More information about the Libreoffice-commits mailing list