[Libreoffice-commits] core.git: basctl/source basegfx/source include/basegfx include/registry include/svx include/tools registry/source sal/rtl sdext/source sd/source svx/source sw/inc sw/qa sw/source tools/source

Noel Grandin noel.grandin at collabora.co.uk
Fri Apr 20 11:39:49 UTC 2018


 basctl/source/basicide/moduldl2.cxx                     |    2 
 basegfx/source/polygon/b2dpolygoncutandtouch.cxx        |   26 ---
 basegfx/source/polygon/b2dpolygontools.cxx              |   18 --
 basegfx/source/polygon/b2dpolypolygontools.cxx          |    5 
 include/basegfx/polygon/b2dpolygoncutandtouch.hxx       |    3 
 include/basegfx/polygon/b2dpolygontools.hxx             |    6 
 include/registry/reader.hxx                             |    2 
 include/registry/typereg_reader.hxx                     |   15 -
 include/svx/galmisc.hxx                                 |    2 
 include/svx/passwd.hxx                                  |    3 
 include/tools/urlobj.hxx                                |    4 
 registry/source/reflread.cxx                            |   10 -
 sal/rtl/alloc_arena.cxx                                 |    6 
 sal/rtl/alloc_arena.hxx                                 |    2 
 sal/rtl/strimp.cxx                                      |    2 
 sd/source/ui/inc/SlideSorter.hxx                        |    1 
 sd/source/ui/slidesorter/shell/SlideSorter.cxx          |    4 
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx   |   36 +---
 svx/source/dialog/passwd.cxx                            |   13 -
 svx/source/gallery2/galmisc.cxx                         |    3 
 svx/source/gallery2/galtheme.cxx                        |    2 
 sw/inc/IDocumentContentOperations.hxx                   |    4 
 sw/inc/editsh.hxx                                       |    2 
 sw/inc/swunohelper.hxx                                  |    5 
 sw/qa/extras/uiwriter/uiwriter.cxx                      |    6 
 sw/source/core/doc/DocumentContentOperationsManager.cxx |   11 -
 sw/source/core/edit/eddel.cxx                           |    2 
 sw/source/core/edit/edfcol.cxx                          |    7 
 sw/source/core/edit/editsh.cxx                          |    2 
 sw/source/core/inc/DocumentContentOperationsManager.hxx |    4 
 sw/source/core/unocore/swunohelper.cxx                  |    4 
 sw/source/core/unocore/unoframe.cxx                     |    4 
 sw/source/uibase/misc/glosdoc.cxx                       |    2 
 tools/source/fsys/urlobj.cxx                            |  121 +++++++---------
 34 files changed, 137 insertions(+), 202 deletions(-)

New commits:
commit 56775815a39c2ee4a0f711738947d2fb234c4923
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri Apr 20 10:20:00 2018 +0200

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

diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 56a490a7721b..0722118559be 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -659,7 +659,7 @@ IMPL_LINK( LibPage, ButtonHdl, Button *, pButton, void )
                 bool const bProtected = xPasswd->isLibraryPasswordProtected( aLibName );
 
                 // change password dialog
-                SvxPasswordDialog aDlg(GetFrameWeld(), true, !bProtected);
+                SvxPasswordDialog aDlg(GetFrameWeld(), !bProtected);
                 aDlg.SetCheckPasswordHdl(LINK(this, LibPage, CheckPasswordHdl));
 
                 if (aDlg.run() == RET_OK)
diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
index d99b246b8ad6..f34c7bb3a4a2 100644
--- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
+++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
@@ -861,7 +861,7 @@ namespace basegfx
             }
         }
 
-        B2DPolyPolygon addPointsAtCutsAndTouches(const B2DPolyPolygon& rCandidate, bool bSelfIntersections)
+        B2DPolyPolygon addPointsAtCutsAndTouches(const B2DPolyPolygon& rCandidate)
         {
             const sal_uInt32 nCount(rCandidate.count());
 
@@ -871,16 +871,8 @@ namespace basegfx
 
                 if(nCount == 1)
                 {
-                    if(bSelfIntersections)
-                    {
-                        // remove self intersections
-                        aRetval.append(addPointsAtCutsAndTouches(rCandidate.getB2DPolygon(0)));
-                    }
-                    else
-                    {
-                        // copy source
-                        aRetval = rCandidate;
-                    }
+                    // remove self intersections
+                    aRetval.append(addPointsAtCutsAndTouches(rCandidate.getB2DPolygon(0)));
                 }
                 else
                 {
@@ -890,16 +882,8 @@ namespace basegfx
 
                     for(a = 0; a < nCount; a++)
                     {
-                        if(bSelfIntersections)
-                        {
-                            // use polygons with solved self intersections
-                            pTempData[a].setPolygon(addPointsAtCutsAndTouches(rCandidate.getB2DPolygon(a)));
-                        }
-                        else
-                        {
-                            // copy given polygons
-                            pTempData[a].setPolygon(rCandidate.getB2DPolygon(a));
-                        }
+                        // use polygons with solved self intersections
+                        pTempData[a].setPolygon(addPointsAtCutsAndTouches(rCandidate.getB2DPolygon(a)));
                     }
 
                     // now cuts and touches between the polygons
diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx
index 8457ff3044b9..db3365eee313 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -3204,8 +3204,7 @@ namespace basegfx
         // converters for css::drawing::PointSequence
 
         B2DPolygon UnoPointSequenceToB2DPolygon(
-            const css::drawing::PointSequence& rPointSequenceSource,
-            bool bCheckClosed)
+            const css::drawing::PointSequence& rPointSequenceSource)
         {
             B2DPolygon aRetval;
             const sal_uInt32 nLength(rPointSequenceSource.getLength());
@@ -3221,11 +3220,8 @@ namespace basegfx
                     aRetval.append(B2DPoint(pArray->X, pArray->Y));
                 }
 
-                if(bCheckClosed)
-                {
-                    // check for closed state flag
-                    utils::checkClosed(aRetval);
-                }
+                // check for closed state flag
+                utils::checkClosed(aRetval);
             }
 
             return aRetval;
@@ -3281,8 +3277,7 @@ namespace basegfx
 
         B2DPolygon UnoPolygonBezierCoordsToB2DPolygon(
             const css::drawing::PointSequence& rPointSequenceSource,
-            const css::drawing::FlagSequence& rFlagSequenceSource,
-            bool bCheckClosed)
+            const css::drawing::FlagSequence& rFlagSequenceSource)
         {
             const sal_uInt32 nCount(static_cast<sal_uInt32>(rPointSequenceSource.getLength()));
             OSL_ENSURE(nCount == static_cast<sal_uInt32>(rFlagSequenceSource.getLength()),
@@ -3373,10 +3368,7 @@ namespace basegfx
 
             // #i72807# API import uses old line start/end-equal definition for closed,
             // so we need to correct this to closed state here
-            if(bCheckClosed)
-            {
-                checkClosed(aRetval);
-            }
+            checkClosed(aRetval);
 
             return aRetval;
         }
diff --git a/basegfx/source/polygon/b2dpolypolygontools.cxx b/basegfx/source/polygon/b2dpolypolygontools.cxx
index e32101ffc02c..a02373616a50 100644
--- a/basegfx/source/polygon/b2dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolypolygontools.cxx
@@ -599,7 +599,7 @@ namespace basegfx
 
             for(;pPointSequence != pPointSeqEnd; pPointSequence++)
             {
-                const B2DPolygon aNewPolygon = UnoPointSequenceToB2DPolygon(*pPointSequence, true/*bCheckClosed*/);
+                const B2DPolygon aNewPolygon = UnoPointSequenceToB2DPolygon(*pPointSequence);
                 aRetval.append(aNewPolygon);
             }
 
@@ -650,8 +650,7 @@ namespace basegfx
                 {
                     const B2DPolygon aNewPolygon(UnoPolygonBezierCoordsToB2DPolygon(
                         *pPointSequence,
-                        *pFlagSequence,
-                        true/*bCheckClosed*/));
+                        *pFlagSequence));
 
                     pPointSequence++;
                     pFlagSequence++;
diff --git a/include/basegfx/polygon/b2dpolygoncutandtouch.hxx b/include/basegfx/polygon/b2dpolygoncutandtouch.hxx
index 61a5c5a7a7da..536f11a693b0 100644
--- a/include/basegfx/polygon/b2dpolygoncutandtouch.hxx
+++ b/include/basegfx/polygon/b2dpolygoncutandtouch.hxx
@@ -36,8 +36,7 @@ namespace basegfx
         // look for polypolygon-intersections and polypolygon-touches (point of poly A on an edge of poly B) in given tools::PolyPolygon and add
         // extra points there. Result will have no touches or intersections between contained polygons on an edge, only on points. For
         // convenience, the correction for self-intersections for each member polygon will be used, too.
-        // Changed: Self intersections are searched by default, but may be switched off by 2nd parameter.
-        BASEGFX_DLLPUBLIC B2DPolyPolygon addPointsAtCutsAndTouches(const B2DPolyPolygon& rCandidate, bool bSelfIntersections = true);
+        BASEGFX_DLLPUBLIC B2DPolyPolygon addPointsAtCutsAndTouches(const B2DPolyPolygon& rCandidate);
 
         // look for intersections of rCandidate with the edge from rStart to rEnd and add extra points there.
         // Points are only added in the range of the edge, not on the endless vector.
diff --git a/include/basegfx/polygon/b2dpolygontools.hxx b/include/basegfx/polygon/b2dpolygontools.hxx
index 8b5ee03c96e1..039000f053d1 100644
--- a/include/basegfx/polygon/b2dpolygontools.hxx
+++ b/include/basegfx/polygon/b2dpolygontools.hxx
@@ -448,8 +448,7 @@ namespace basegfx
 
         /// converters for css::drawing::PointSequence
         BASEGFX_DLLPUBLIC B2DPolygon UnoPointSequenceToB2DPolygon(
-            const css::drawing::PointSequence& rPointSequenceSource,
-            bool bCheckClosed = true);
+            const css::drawing::PointSequence& rPointSequenceSource);
         BASEGFX_DLLPUBLIC void B2DPolygonToUnoPointSequence(
             const B2DPolygon& rPolygon,
             css::drawing::PointSequence& rPointSequenceRetval);
@@ -459,8 +458,7 @@ namespace basegfx
          */
         B2DPolygon UnoPolygonBezierCoordsToB2DPolygon(
             const css::drawing::PointSequence& rPointSequenceSource,
-            const css::drawing::FlagSequence& rFlagSequenceSource,
-            bool bCheckClosed);
+            const css::drawing::FlagSequence& rFlagSequenceSource);
         void B2DPolygonToUnoPolygonBezierCoords(
             const B2DPolygon& rPolyPolygon,
             css::drawing::PointSequence& rPointSequenceRetval,
diff --git a/include/registry/reader.hxx b/include/registry/reader.hxx
index 54b6a12f9541..d25e719119ed 100644
--- a/include/registry/reader.hxx
+++ b/include/registry/reader.hxx
@@ -58,7 +58,7 @@ public:
      */
     Reader(void const * buffer, sal_uInt32 length)
     {
-        if (!typereg_reader_create(buffer, length, false/*copy*/, TYPEREG_VERSION_1, &m_handle))
+        if (!typereg_reader_create(buffer, length, &m_handle))
         {
             throw std::bad_alloc();
         }
diff --git a/include/registry/typereg_reader.hxx b/include/registry/typereg_reader.hxx
index 3d5a2cfd830d..f6aa5f59b61c 100644
--- a/include/registry/typereg_reader.hxx
+++ b/include/registry/typereg_reader.hxx
@@ -34,19 +34,14 @@
    reference count will be one.  Operations on a non-null handle are not
    multi-thread–safe.</p>
 
+   The type reader works directly on the given buffer, which must remain
+   available unmodified until the type reader is destroyed
+
    @param buffer the binary blob representing the type; must point to at least
    <code>length</code> bytes, and need only be byte-aligned
 
    @param length the size in bytes of the binary blob representing the type
 
-   @param copy if true, the type reader creates an internal copy of the given
-   buffer, and the given buffer is not accessed after this function returns; if
-   false, the type reader works directly on the given buffer, which must remain
-   available unmodified until the type reader is destroyed
-
-   @param maxVersion the maximum binary blob version the client is prepared to
-   handle; must not be negative
-
    @param result an out-parameter obtaining a handle on the type reader; must
    not be null; if the given binary blob is malformed, or of a version larger
    than <code>maxVersion</code>, null is returned
@@ -57,8 +52,8 @@
    @since UDK 3.2.0
  */
 REG_DLLPUBLIC bool typereg_reader_create(
-    void const * buffer, sal_uInt32 length, bool copy,
-    typereg_Version maxVersion, void ** result);
+    void const * buffer, sal_uInt32 length,
+    void ** result);
 
 /**
    Increments the reference count of a type reader.
diff --git a/include/svx/galmisc.hxx b/include/svx/galmisc.hxx
index 5605c8a093f0..0bdcbffa86d3 100644
--- a/include/svx/galmisc.hxx
+++ b/include/svx/galmisc.hxx
@@ -81,7 +81,7 @@ class FmFormModel;
 class ImageMap;
 class Gallery;
 
-GalleryGraphicImportRet  GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic, OUString& rFilterName, bool bShowProgress = false );
+GalleryGraphicImportRet  GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic, OUString& rFilterName );
 bool                GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel );
 bool                CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap& rImageMap );
 SVX_DLLPUBLIC OUString
diff --git a/include/svx/passwd.hxx b/include/svx/passwd.hxx
index 227d1288f813..ef9bfca867fd 100644
--- a/include/svx/passwd.hxx
+++ b/include/svx/passwd.hxx
@@ -30,7 +30,6 @@ private:
     OUString m_aOldPasswdErrStr;
     OUString m_aRepeatPasswdErrStr;
     Link<SvxPasswordDialog*,bool> m_aCheckPasswordHdl;
-    bool m_bEmpty;
 
     std::unique_ptr<weld::Label> m_xOldFL;
     std::unique_ptr<weld::Label> m_xOldPasswdFT;
@@ -43,7 +42,7 @@ private:
     DECL_LINK(EditModifyHdl, weld::Entry&, void);
 
 public:
-    SvxPasswordDialog(weld::Window* pParent, bool bAllowEmptyPasswords, bool bDisableOldPassword);
+    SvxPasswordDialog(weld::Window* pParent, bool bDisableOldPassword);
     virtual ~SvxPasswordDialog() override;
 
     OUString        GetOldPassword() const { return m_xOldPasswdED->get_text(); }
diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index 3624d2f89122..6abb875ff18f 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -866,11 +866,11 @@ public:
     static void appendUCS4Escape(OUStringBuffer & rTheText, sal_uInt32 nUCS4);
 
     static void appendUCS4(OUStringBuffer & rTheText, sal_uInt32 nUCS4,
-                           EscapeType eEscapeType, bool bOctets, Part ePart,
+                           EscapeType eEscapeType, Part ePart,
                            rtl_TextEncoding eCharset, bool bKeepVisibleEscapes);
 
     static sal_uInt32 getUTF32(sal_Unicode const *& rBegin,
-                               sal_Unicode const * pEnd, bool bOctets,
+                               sal_Unicode const * pEnd,
                                EncodeMechanism eMechanism,
                                rtl_TextEncoding eCharset,
                                EscapeType & rEscapeType);
diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx
index c434d903d0d4..c99ebe33ad49 100644
--- a/registry/source/reflread.cxx
+++ b/registry/source/reflread.cxx
@@ -1183,8 +1183,8 @@ typereg_Version TypeRegistryEntry::getVersion() const {
 **************************************************************************/
 
 bool TYPEREG_CALLTYPE typereg_reader_create(
-    void const * buffer, sal_uInt32 length, bool copy,
-    typereg_Version maxVersion, void ** result)
+    void const * buffer, sal_uInt32 length,
+    void ** result)
 {
     if (length < OFFSET_CP || length > SAL_MAX_UINT32) {
         *result = nullptr;
@@ -1195,7 +1195,7 @@ bool TYPEREG_CALLTYPE typereg_reader_create(
         try {
             entry.reset(
                 new TypeRegistryEntry(
-                    static_cast< sal_uInt8 const * >(buffer), length, copy));
+                    static_cast< sal_uInt8 const * >(buffer), length, false/*copy*/));
         } catch (std::bad_alloc &) {
             return false;
         }
@@ -1204,7 +1204,7 @@ bool TYPEREG_CALLTYPE typereg_reader_create(
             return true;
         }
         typereg_Version version = entry->getVersion();
-        if (version < TYPEREG_VERSION_0 || version > maxVersion) {
+        if (version < TYPEREG_VERSION_0 || version > TYPEREG_VERSION_1) {
             *result = nullptr;
             return true;
         }
@@ -1219,7 +1219,7 @@ bool TYPEREG_CALLTYPE typereg_reader_create(
 static TypeReaderImpl TYPEREG_CALLTYPE createEntry(const sal_uInt8* buffer, sal_uInt32 len)
 {
     void * handle;
-    typereg_reader_create(buffer, len, false/*copyBuffer*/, TYPEREG_VERSION_1, &handle);
+    typereg_reader_create(buffer, len, &handle);
     return handle;
 }
 
diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx
index 0ea1a39167ea..c6e6a9a2ae93 100644
--- a/sal/rtl/alloc_arena.cxx
+++ b/sal/rtl/alloc_arena.cxx
@@ -992,7 +992,7 @@ void SAL_CALL rtl_arena_free (
     }
 }
 
-void rtl_arena_foreach (rtl_arena_type *arena, ArenaForeachFn foreachFn, void *user_data)
+void rtl_arena_foreach (rtl_arena_type *arena, ArenaForeachFn foreachFn)
 {
     // quantum caches
     if ((arena->m_qcache_max > 0) && (arena->m_qcache_ptr != nullptr))
@@ -1002,7 +1002,7 @@ void rtl_arena_foreach (rtl_arena_type *arena, ArenaForeachFn foreachFn, void *u
         {
             if (arena->m_qcache_ptr[i - 1] != nullptr)
                 rtl_cache_foreach (arena->m_qcache_ptr[i - 1],
-                                   foreachFn, user_data);
+                                   foreachFn, nullptr);
         }
     }
 
@@ -1013,7 +1013,7 @@ void rtl_arena_foreach (rtl_arena_type *arena, ArenaForeachFn foreachFn, void *u
              segment != nullptr; segment = segment->m_fnext)
         {
             foreachFn(reinterpret_cast<void *>(segment->m_addr),
-                      segment->m_size, user_data);
+                      segment->m_size, nullptr);
         }
     }
 }
diff --git a/sal/rtl/alloc_arena.hxx b/sal/rtl/alloc_arena.hxx
index 3c04173b4ab0..e3d3d0e292fc 100644
--- a/sal/rtl/alloc_arena.hxx
+++ b/sal/rtl/alloc_arena.hxx
@@ -114,7 +114,7 @@ extern rtl_arena_type * gp_default_arena;
 
 typedef void (*ArenaForeachFn)(void *addr, sal_Size size, void *user_data);
 
-void rtl_arena_foreach(rtl_arena_type *arena, ArenaForeachFn fn, void *user_data);
+void rtl_arena_foreach(rtl_arena_type *arena, ArenaForeachFn fn);
 void rtl_cache_foreach(rtl_cache_type *arena, ArenaForeachFn foreachFn, void *user_data);
 
 #endif // INCLUDED_SAL_RTL_ALLOC_ARENA_HXX
diff --git a/sal/rtl/strimp.cxx b/sal/rtl/strimp.cxx
index e760de186417..63466a0a88f0 100644
--- a/sal/rtl/strimp.cxx
+++ b/sal/rtl/strimp.cxx
@@ -114,7 +114,7 @@ void SAL_CALL rtl_alloc_preInit (rtl_alloc_preInit_phase_t phase) SAL_THROW_EXTE
         case rtlAllocPreInitEnd:
         // back to normal
         {
-            rtl_arena_foreach(pre_arena, mark_static, nullptr);
+            rtl_arena_foreach(pre_arena, mark_static);
             rtl_allocateString = rtl_allocateMemory;
             rtl_freeString = rtl_freeMemory;
 
diff --git a/sd/source/ui/inc/SlideSorter.hxx b/sd/source/ui/inc/SlideSorter.hxx
index fae76ff19fdd..de9af17357fd 100644
--- a/sd/source/ui/inc/SlideSorter.hxx
+++ b/sd/source/ui/inc/SlideSorter.hxx
@@ -234,7 +234,6 @@ private:
         ScrollBarBox* pScrollBarBox);
     SlideSorter (
         ViewShellBase& rBase,
-        ViewShell* pViewShell,
         vcl::Window& rParentWindow);
 
     void Init();
diff --git a/sd/source/ui/slidesorter/shell/SlideSorter.cxx b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
index ecfb9ad50ad9..edac934f62bd 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorter.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
@@ -94,7 +94,6 @@ std::shared_ptr<SlideSorter> SlideSorter::CreateSlideSorter (
     std::shared_ptr<SlideSorter> pSlideSorter(
         new SlideSorter(
             rBase,
-            nullptr,
             rParentWindow),
         o3tl::default_delete<SlideSorter>());
     pSlideSorter->Init();
@@ -125,14 +124,13 @@ SlideSorter::SlideSorter (
 
 SlideSorter::SlideSorter (
     ViewShellBase& rBase,
-    ViewShell* pViewShell,
     vcl::Window& rParentWindow)
     : mbIsValid(false),
       mpSlideSorterController(),
       mpSlideSorterModel(),
       mpSlideSorterView(),
       mxControllerWeak(),
-      mpViewShell(pViewShell),
+      mpViewShell(nullptr),
       mpViewShellBase(&rBase),
       mpContentWindow(VclPtr<ContentWindow>::Create(rParentWindow,*this )),
       mpHorizontalScrollBar(VclPtr<ScrollBar>::Create(&rParentWindow,WinBits(WB_HSCROLL | WB_DRAG))),
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 0e12aaede331..48a735ba54a5 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -204,7 +204,7 @@ bool ExtractJpegData(Stream* str, OutputBuffer& outBuf)
     }
 }
 
-void writeJpeg_( OutputBuffer& o_rOutputBuf, Stream* str, bool bWithLinefeed )
+void writeJpeg_( OutputBuffer& o_rOutputBuf, Stream* str )
 {
     // dump JPEG file as-is
 #if POPPLER_CHECK_VERSION(0, 17, 3)
@@ -218,13 +218,12 @@ void writeJpeg_( OutputBuffer& o_rOutputBuf, Stream* str, bool bWithLinefeed )
     ExtractJpegData(str, o_rOutputBuf);
 
     printf( " JPEG %d", static_cast<int>(o_rOutputBuf.size()) );
-    if( bWithLinefeed )
-        printf("\n");
+    printf("\n");
 
     str->close();
 }
 
-void writePbm_(OutputBuffer& o_rOutputBuf, Stream* str, int width, int height, bool bWithLinefeed, bool bInvert )
+void writePbm_(OutputBuffer& o_rOutputBuf, Stream* str, int width, int height, bool bInvert )
 {
     // write as PBM (char by char, to avoid stdlib lineend messing)
     o_rOutputBuf.clear();
@@ -243,8 +242,7 @@ void writePbm_(OutputBuffer& o_rOutputBuf, Stream* str, int width, int height, b
     const int size = height * ((width + 7) / 8);
 
     printf( " PBM %d", size + header_size );
-    if( bWithLinefeed )
-        printf("\n");
+    printf("\n");
 
     // trim buffer to exact header length
     o_rOutputBuf.resize(header_size);
@@ -271,8 +269,7 @@ void writePpm_( OutputBuffer&     o_rOutputBuf,
                 Stream*           str,
                 int               width,
                 int               height,
-                GfxImageColorMap* colorMap,
-                bool              bWithLinefeed )
+                GfxImageColorMap* colorMap )
 {
     // write as PPM (char by char, to avoid stdlib lineend messing)
     o_rOutputBuf.clear();
@@ -295,8 +292,7 @@ void writePpm_( OutputBuffer&     o_rOutputBuf,
     const int size = width*height*3 + header_size;
 
     printf( " PPM %d", size );
-    if( bWithLinefeed )
-        printf("\n");
+    printf("\n");
 
     // trim buffer to exact header size
     o_rOutputBuf.resize(header_size);
@@ -333,8 +329,7 @@ void writePng_( OutputBuffer&     o_rOutputBuf,
                 int               height,
                 GfxRGB const &    zeroColor,
                 GfxRGB const &    oneColor,
-                bool              bIsMask,
-                bool              bWithLinefeed )
+                bool              bIsMask )
 {
     o_rOutputBuf.clear();
 
@@ -342,8 +337,7 @@ void writePng_( OutputBuffer&     o_rOutputBuf,
     PngHelper::createPng( o_rOutputBuf, str, width, height, zeroColor, oneColor, bIsMask );
 
     printf( " PNG %d", static_cast<int>(o_rOutputBuf.size()) );
-    if( bWithLinefeed )
-        printf("\n");
+    printf("\n");
 }
 
 void writePng_( OutputBuffer& o_rOutputBuf,
@@ -380,9 +374,9 @@ void writePng_( OutputBuffer& o_rOutputBuf,
 void writeMask_( OutputBuffer& o_rOutputBuf, Stream* str, int width, int height, bool bInvert )
 {
     if( str->getKind() == strDCT )
-        writeJpeg_(o_rOutputBuf, str, true/*bWithLinefeed*/);
+        writeJpeg_(o_rOutputBuf, str);
     else
-        writePbm_(o_rOutputBuf, str, width, height, true/*bWithLinefeed*/, bInvert );
+        writePbm_(o_rOutputBuf, str, width, height, bInvert );
 }
 
 void writeImage_( OutputBuffer&     o_rOutputBuf,
@@ -396,7 +390,7 @@ void writeImage_( OutputBuffer&     o_rOutputBuf,
         (colorMap->getNumPixelComps() == 1 ||
          colorMap->getNumPixelComps() == 3) )
     {
-        writeJpeg_(o_rOutputBuf, str, true/*bWithLinefeed*/);
+        writeJpeg_(o_rOutputBuf, str);
     }
     else if (colorMap->getNumPixelComps() == 1 &&
              colorMap->getBits() == 1)
@@ -412,10 +406,10 @@ void writeImage_( OutputBuffer&     o_rOutputBuf,
             nIndex = 1;
             colorMap->getRGB( &nIndex, &oneColor );
         }
-        writePng_( o_rOutputBuf, str, width, height, zeroColor, oneColor, false, true/*bWithLinefeed*/ );
+        writePng_( o_rOutputBuf, str, width, height, zeroColor, oneColor, false);
     }
     else
-        writePpm_( o_rOutputBuf, str, width, height, colorMap, true/*bWithLinefeed*/ );
+        writePpm_( o_rOutputBuf, str, width, height, colorMap );
 }
 
 // forwarders
@@ -956,9 +950,9 @@ void PDFOutDev::drawImageMask(GfxState* pState, Object*, Stream* str,
         GfxRGB zeroColor = { dblToCol( 0.0 ), dblToCol( 0.0 ), dblToCol( 0.0 ) };
         pState->getFillColorSpace()->getRGB( pState->getFillColor(), &zeroColor );
         if( invert )
-            writePng_( aBuf, str, width, height, oneColor, zeroColor, true, true );
+            writePng_( aBuf, str, width, height, oneColor, zeroColor, true );
         else
-            writePng_( aBuf, str, width, height, zeroColor, oneColor, true, true );
+            writePng_( aBuf, str, width, height, zeroColor, oneColor, true );
     }
     else
         writeMaskLF(aBuf, str, width, height, invert);
diff --git a/svx/source/dialog/passwd.cxx b/svx/source/dialog/passwd.cxx
index 45b6a1f284fb..2a66b031bec4 100644
--- a/svx/source/dialog/passwd.cxx
+++ b/svx/source/dialog/passwd.cxx
@@ -57,23 +57,14 @@ IMPL_LINK_NOARG(SvxPasswordDialog, ButtonHdl, weld::Button&, void)
 
 IMPL_LINK_NOARG(SvxPasswordDialog, EditModifyHdl, weld::Entry&, void)
 {
-    if (!m_bEmpty)
-    {
-        OUString aPasswd = comphelper::string::strip(m_xRepeatPasswdED->get_text(), ' ');
-        if (aPasswd.isEmpty() && m_xOKBtn->get_sensitive())
-            m_xOKBtn->set_sensitive(false);
-        else if (!aPasswd.isEmpty() && !m_xOKBtn->get_sensitive())
-            m_xOKBtn->set_sensitive(true);
-    }
-    else if (!m_xOKBtn->get_sensitive())
+    if (!m_xOKBtn->get_sensitive())
         m_xOKBtn->set_sensitive(true);
 }
 
-SvxPasswordDialog::SvxPasswordDialog(weld::Window* pParent, bool bAllowEmptyPasswords, bool bDisableOldPassword)
+SvxPasswordDialog::SvxPasswordDialog(weld::Window* pParent, bool bDisableOldPassword)
     : GenericDialogController(pParent, "svx/ui/passwd.ui", "PasswordDialog")
     , m_aOldPasswdErrStr(SvxResId(RID_SVXSTR_ERR_OLD_PASSWD))
     , m_aRepeatPasswdErrStr(SvxResId(RID_SVXSTR_ERR_REPEAT_PASSWD ))
-    , m_bEmpty(bAllowEmptyPasswords)
     , m_xOldFL(m_xBuilder->weld_label("oldpass"))
     , m_xOldPasswdFT(m_xBuilder->weld_label("oldpassL"))
     , m_xOldPasswdED(m_xBuilder->weld_entry("oldpassEntry"))
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx
index 147a0551a54b..6469a4a5bea9 100644
--- a/svx/source/gallery2/galmisc.cxx
+++ b/svx/source/gallery2/galmisc.cxx
@@ -65,7 +65,7 @@ BitmapEx GalleryResGetBitmapEx(const OUString &rId)
 }
 
 GalleryGraphicImportRet GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic,
-                             OUString& rFilterName, bool bShowProgress )
+                             OUString& rFilterName )
 {
     GalleryGraphicImportRet  nRet = GalleryGraphicImportRet::IMPORT_NONE;
     SfxMedium   aMedium( rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ );
@@ -77,7 +77,6 @@ GalleryGraphicImportRet GalleryGraphicImport( const INetURLObject& rURL, Graphic
     if( pIStm )
     {
         GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
-        std::unique_ptr<GalleryProgress> pProgress(bShowProgress ? new GalleryProgress( &rGraphicFilter ) : nullptr);
         sal_uInt16              nFormat;
 
         if( !rGraphicFilter.ImportGraphic( rGraphic, rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), *pIStm, GRFILTER_FORMAT_DONTKNOW, &nFormat ) )
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 2bd3be8f315e..1d0760fcf516 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -781,7 +781,7 @@ bool GalleryTheme::GetGraphic(sal_uInt32 nPos, Graphic& rGraphic)
             case SgaObjKind::Inet:
             {
                 OUString aFilterDummy;
-                bRet = ( GalleryGraphicImport( aURL, rGraphic, aFilterDummy, /*bProgress*/false ) != GalleryGraphicImportRet::IMPORT_NONE );
+                bRet = ( GalleryGraphicImport( aURL, rGraphic, aFilterDummy ) != GalleryGraphicImportRet::IMPORT_NONE );
             }
             break;
 
diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx
index 5ba9b1a6d3fc..fb4006334a15 100644
--- a/sw/inc/IDocumentContentOperations.hxx
+++ b/sw/inc/IDocumentContentOperations.hxx
@@ -162,11 +162,11 @@ public:
     virtual SwFlyFrameFormat* InsertGraphicObject(
         const SwPaM& rRg, const GraphicObject& rGrfObj,
         const SfxItemSet* pFlyAttrSet,
-        const SfxItemSet* pGrfAttrSet, SwFrameFormat*) = 0;
+        const SfxItemSet* pGrfAttrSet) = 0;
 
     /** Transpose graphic (with undo)
      */
-    virtual void ReRead(SwPaM&, const OUString& rGrfName, const OUString& rFltName, const Graphic* pGraphic, const GraphicObject* pGrfObj) = 0;
+    virtual void ReRead(SwPaM&, const OUString& rGrfName, const OUString& rFltName, const Graphic* pGraphic) = 0;
 
     /** Insert a DrawObject. The object must be already registered
         in DrawModel.
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 6ecf2ce5e75b..91bbf131e0e0 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -388,7 +388,7 @@ public:
     /// Removes the paragraph metadata field at the current cursor, if any.
     /// Returns true iff a paragraph metadata field was removed.
     /// Currently there are two variants: signature and classification.
-    bool RemoveParagraphMetadataFieldAtCursor(const bool bBackspaceNotDel);
+    bool RemoveParagraphMetadataFieldAtCursor();
 
     void Insert2(SwField const &, const bool bForceExpandHints);
 
diff --git a/sw/inc/swunohelper.hxx b/sw/inc/swunohelper.hxx
index 79ad3c47a295..35459bdcfa31 100644
--- a/sw/inc/swunohelper.hxx
+++ b/sw/inc/swunohelper.hxx
@@ -43,9 +43,8 @@ sal_Int32 GetEnumAsInt32( const css::uno::Any& rVal );
     // delete the file under this URL
 SW_DLLPUBLIC bool UCB_DeleteFile( const OUString& rURL );
 
-    // copy/move the file to a new location
-bool UCB_CopyFile( const OUString& rURL, const OUString& rNewURL,
-                    bool bCopyIsMove );
+    // move the file to a new location
+bool UCB_MoveFile( const OUString& rURL, const OUString& rNewURL );
 
     // is the URL on the current system case sensitive?
 SW_DLLPUBLIC bool UCB_IsCaseSensitiveFileName( const OUString& rURL );
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 339b7f5b4ef6..05478b782488 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -3612,9 +3612,9 @@ void SwUiWriterTest::testUndoDelAsCharTdf107512()
     frameSet.Put(anchor);
     GraphicObject grf;
     pShell->SttEndDoc(true);
-    CPPUNIT_ASSERT(rIDCO.InsertGraphicObject(*pShell->GetCursor(), grf, &frameSet, &grfSet, nullptr));
+    CPPUNIT_ASSERT(rIDCO.InsertGraphicObject(*pShell->GetCursor(), grf, &frameSet, &grfSet));
     pShell->SttEndDoc(false);
-    CPPUNIT_ASSERT(rIDCO.InsertGraphicObject(*pShell->GetCursor(), grf, &frameSet, &grfSet, nullptr));
+    CPPUNIT_ASSERT(rIDCO.InsertGraphicObject(*pShell->GetCursor(), grf, &frameSet, &grfSet));
     CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
     SvxCharHiddenItem hidden(true, RES_CHRATR_HIDDEN);
     pShell->SelectText(1, 4);
@@ -3763,7 +3763,7 @@ void SwUiWriterTest::testUndoDelAsChar()
     SwFormatAnchor anchor(RndStdIds::FLY_AS_CHAR);
     frameSet.Put(anchor);
     GraphicObject grf;
-    CPPUNIT_ASSERT(rIDCO.InsertGraphicObject(*pShell->GetCursor(), grf, &frameSet, &grfSet, nullptr));
+    CPPUNIT_ASSERT(rIDCO.InsertGraphicObject(*pShell->GetCursor(), grf, &frameSet, &grfSet));
     CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
     pShell->SetMark();
     pShell->Left(1, CRSR_SKIP_CHARS);
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 5bba95739fa4..4044019605d1 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -2640,11 +2640,9 @@ SwFlyFrameFormat* DocumentContentOperationsManager::InsertGraphic(
 SwFlyFrameFormat* DocumentContentOperationsManager::InsertGraphicObject(
         const SwPaM &rRg, const GraphicObject& rGrfObj,
                             const SfxItemSet* pFlyAttrSet,
-                            const SfxItemSet* pGrfAttrSet,
-                            SwFrameFormat* pFrameFormat )
+                            const SfxItemSet* pGrfAttrSet )
 {
-    if( !pFrameFormat )
-        pFrameFormat = m_rDoc.getIDocumentStylePoolAccess().GetFrameFormatFromPool( RES_POOLFRM_GRAPHIC );
+    SwFrameFormat* pFrameFormat = m_rDoc.getIDocumentStylePoolAccess().GetFrameFormatFromPool( RES_POOLFRM_GRAPHIC );
     SwGrfNode* pSwGrfNode = SwNodes::MakeGrfNode(
                             SwNodeIndex( m_rDoc.GetNodes().GetEndOfAutotext() ),
                             rGrfObj, m_rDoc.GetDfltGrfFormatColl() );
@@ -2694,8 +2692,7 @@ SwFlyFrameFormat* DocumentContentOperationsManager::InsertOLE(const SwPaM &rRg,
 }
 
 void DocumentContentOperationsManager::ReRead( SwPaM& rPam, const OUString& rGrfName,
-                    const OUString& rFltName, const Graphic* pGraphic,
-                    const GraphicObject* pGrafObj )
+                    const OUString& rFltName, const Graphic* pGraphic )
 {
     SwGrfNode *pGrfNd;
     if( ( !rPam.HasMark()
@@ -2712,7 +2709,7 @@ void DocumentContentOperationsManager::ReRead( SwPaM& rPam, const OUString& rGrf
                                                 GetMirrorGrf().GetValue() )
             pGrfNd->SetAttr( SwMirrorGrf() );
 
-        pGrfNd->ReRead( rGrfName, rFltName, pGraphic, pGrafObj );
+        pGrfNd->ReRead( rGrfName, rFltName, pGraphic, /*pGrafObj*/nullptr );
         m_rDoc.getIDocumentState().SetModified();
     }
 }
diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx
index a0e1c4bd6646..bcd0f9d7b34e 100644
--- a/sw/source/core/edit/eddel.cxx
+++ b/sw/source/core/edit/eddel.cxx
@@ -144,7 +144,7 @@ long SwEditShell::Delete()
     }
     else
     {
-        nRet = RemoveParagraphMetadataFieldAtCursor(true) ? 1 : 0;
+        nRet = RemoveParagraphMetadataFieldAtCursor() ? 1 : 0;
     }
 
     return nRet;
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 696ec27507e9..a9e7d1d05ad1 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -2023,7 +2023,7 @@ bool SwEditShell::IsCursorInParagraphMetadataField() const
     return false;
 }
 
-bool SwEditShell::RemoveParagraphMetadataFieldAtCursor(const bool bBackspaceNotDel)
+bool SwEditShell::RemoveParagraphMetadataFieldAtCursor()
 {
     if (GetCursor() && GetCursor()->Start())
     {
@@ -2034,10 +2034,7 @@ bool SwEditShell::RemoveParagraphMetadataFieldAtCursor(const bool bBackspaceNotD
         {
             // Try moving the cursor to see if we're _facing_ a metafield or not,
             // as opposed to being within one.
-            if (bBackspaceNotDel)
-                index--; // Backspace moves left
-            else
-                index++; // Delete moves right
+            index--; // Backspace moves left
 
             xField = lcl_GetParagraphMetadataFieldAtIndex(GetDoc()->GetDocShell(), pNode, index);
         }
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 7d3dd51265b7..08248c57373c 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -291,7 +291,7 @@ void SwEditShell::ReRead( const OUString& rGrfName, const OUString& rFltName,
                     const Graphic* pGraphic )
 {
     StartAllAction();
-    mxDoc->getIDocumentContentOperations().ReRead( *GetCursor(), rGrfName, rFltName, pGraphic, nullptr );
+    mxDoc->getIDocumentContentOperations().ReRead( *GetCursor(), rGrfName, rFltName, pGraphic );
     EndAllAction();
 }
 
diff --git a/sw/source/core/inc/DocumentContentOperationsManager.hxx b/sw/source/core/inc/DocumentContentOperationsManager.hxx
index a56971f2ecc0..c60676617b78 100644
--- a/sw/source/core/inc/DocumentContentOperationsManager.hxx
+++ b/sw/source/core/inc/DocumentContentOperationsManager.hxx
@@ -67,9 +67,9 @@ public:
                         const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrameFormat*) override;
 
     SwFlyFrameFormat* InsertGraphicObject(const SwPaM& rRg, const GraphicObject& rGrfObj, const SfxItemSet* pFlyAttrSet,
-        const SfxItemSet* pGrfAttrSet, SwFrameFormat*) override;
+        const SfxItemSet* pGrfAttrSet) override;
 
-    void ReRead(SwPaM&, const OUString& rGrfName, const OUString& rFltName, const Graphic* pGraphic, const GraphicObject* pGrfObj) override;
+    void ReRead(SwPaM&, const OUString& rGrfName, const OUString& rFltName, const Graphic* pGraphic) override;
 
     SwDrawFrameFormat* InsertDrawObj( const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet& rFlyAttrSet ) override;
 
diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx
index 30dadb978edf..e2fcdcf0724f 100644
--- a/sw/source/core/unocore/swunohelper.cxx
+++ b/sw/source/core/unocore/swunohelper.cxx
@@ -74,7 +74,7 @@ bool UCB_DeleteFile( const OUString& rURL )
     return bRemoved;
 }
 
-bool UCB_CopyFile( const OUString& rURL, const OUString& rNewURL, bool bCopyIsMove )
+bool UCB_MoveFile( const OUString& rURL, const OUString& rNewURL )
 {
     bool bCopyCompleted = true;
     try
@@ -92,7 +92,7 @@ bool UCB_CopyFile( const OUString& rURL, const OUString& rNewURL, bool bCopyIsMo
         aInfo.NameClash = css::ucb::NameClash::ERROR;
         aInfo.NewTitle = sName;
         aInfo.SourceURL = rURL;
-        aInfo.MoveData = bCopyIsMove;
+        aInfo.MoveData = true;
         aTempContent.executeCommand( "transfer", uno::Any(aInfo) );
     }
     catch( css::uno::Exception& )
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 8e29518d5070..a49f49f7d973 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1571,7 +1571,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
                     throw uno::RuntimeException();
                 }
                 SwPaM aGrfPaM(*pGrfNode);
-                pFormat->GetDoc()->getIDocumentContentOperations().ReRead(aGrfPaM, sGrfName, sFltName, nullptr, nullptr);
+                pFormat->GetDoc()->getIDocumentContentOperations().ReRead(aGrfPaM, sGrfName, sFltName, nullptr);
             }
         }
         else if (FN_UNO_GRAPHIC == pEntry->nWID)
@@ -1591,7 +1591,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
                     }
                     SwPaM aGrfPaM(*pGrfNode);
                     Graphic aGraphic( xGraphic );
-                    pFormat->GetDoc()->getIDocumentContentOperations().ReRead( aGrfPaM, OUString(), OUString(), &aGraphic, nullptr );
+                    pFormat->GetDoc()->getIDocumentContentOperations().ReRead( aGrfPaM, OUString(), OUString(), &aGraphic );
                 }
             }
         }
diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx
index ae1b4396b1ec..c23f9d36c127 100644
--- a/sw/source/uibase/misc/glosdoc.cxx
+++ b/sw/source/uibase/misc/glosdoc.cxx
@@ -228,7 +228,7 @@ bool    SwGlossaries::RenameGroupDoc(
         return false;
     }
 
-    if (!SWUnoHelper::UCB_CopyFile(sOldFileURL, sNewFileURL, true ))
+    if (!SWUnoHelper::UCB_MoveFile(sOldFileURL, sNewFileURL ))
         return false;
 
     RemoveFileFromList( rOldGroup );
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index d4860be20849..c8719b6732b3 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -693,7 +693,6 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
                                  bool bSmart,
                                  FSysStyle eStyle)
 {
-    const bool bOctets = false;
     sal_Unicode const * pPos = rTheAbsURIRef.getStr();
     sal_Unicode const * pEnd = pPos + rTheAbsURIRef.getLength();
 
@@ -893,10 +892,10 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
                        && *pPos != nFragmentDelimiter)
                 {
                     EscapeType eEscapeType;
-                    sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, bOctets,
+                    sal_uInt32 nUTF32 = getUTF32(pPos, pEnd,
                                                  eMechanism,
                                                  eCharset, eEscapeType);
-                    appendUCS4(aSynAuthority, nUTF32, eEscapeType, bOctets,
+                    appendUCS4(aSynAuthority, nUTF32, eEscapeType,
                                PART_AUTHORITY, eCharset, false);
                 }
                 m_aHost.set(aSynAbsURIRef,
@@ -920,14 +919,12 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
                         EscapeType eEscapeType;
                         sal_uInt32 nUTF32 = getUTF32(pPos,
                                                      pEnd,
-                                                     bOctets,
                                                      eMechanism,
                                                      eCharset,
                                                      eEscapeType);
                         appendUCS4(aSynAuthority,
                                    nUTF32,
                                    eEscapeType,
-                                   bOctets,
                                    PART_AUTHORITY,
                                    eCharset,
                                    false);
@@ -962,10 +959,10 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
                        && *pPos != nFragmentDelimiter)
                 {
                     EscapeType eEscapeType;
-                    sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, bOctets,
+                    sal_uInt32 nUTF32 = getUTF32(pPos, pEnd,
                                                  eMechanism,
                                                  eCharset, eEscapeType);
-                    appendUCS4(aSynUser, nUTF32, eEscapeType, bOctets,
+                    appendUCS4(aSynUser, nUTF32, eEscapeType,
                                PART_USER_PASSWORD, eCharset, false);
 
                     bHasUser = *pPos == '@';
@@ -989,10 +986,10 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
                            && *pPos != nFragmentDelimiter)
                     {
                         EscapeType eEscapeType;
-                        sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, bOctets,
+                        sal_uInt32 nUTF32 = getUTF32(pPos, pEnd,
                                                      eMechanism,
                                                      eCharset, eEscapeType);
-                        appendUCS4(aSynAuthority, nUTF32, eEscapeType, bOctets,
+                        appendUCS4(aSynAuthority, nUTF32, eEscapeType,
                                    PART_AUTHORITY, eCharset, false);
                     }
                 }
@@ -1261,7 +1258,7 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
             while (p1 < pUserInfoEnd)
             {
                 EscapeType eEscapeType;
-                sal_uInt32 nUTF32 = getUTF32(p1, pUserInfoEnd, bOctets,
+                sal_uInt32 nUTF32 = getUTF32(p1, pUserInfoEnd,
                                              eMechanism, eCharset, eEscapeType);
                 if (eEscapeType == EscapeType::NONE)
                 {
@@ -1283,7 +1280,7 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
                         break;
                     }
                 }
-                appendUCS4(aSynUser, nUTF32, eEscapeType, bOctets, ePart,
+                appendUCS4(aSynUser, nUTF32, eEscapeType, ePart,
                            eCharset, false);
             }
             m_aUser.set(aSynAbsURIRef, aSynUser.makeStringAndClear(),
@@ -1297,10 +1294,10 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
                     while (p1 < pUserInfoEnd)
                     {
                         EscapeType eEscapeType;
-                        sal_uInt32 nUTF32 = getUTF32(p1, pUserInfoEnd, bOctets,
+                        sal_uInt32 nUTF32 = getUTF32(p1, pUserInfoEnd,
                                                      eMechanism, eCharset,
                                                      eEscapeType);
-                        appendUCS4(aSynAuth, nUTF32, eEscapeType, bOctets,
+                        appendUCS4(aSynAuth, nUTF32, eEscapeType,
                                    ePart, eCharset, false);
                     }
                     m_aAuth.set(aSynAbsURIRef, aSynAuth.makeStringAndClear(),
@@ -1313,7 +1310,7 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
                     while (p1 < pUserInfoEnd)
                     {
                         EscapeType eEscapeType;
-                        sal_uInt32 nUTF32 = getUTF32(p1, pUserInfoEnd, bOctets,
+                        sal_uInt32 nUTF32 = getUTF32(p1, pUserInfoEnd,
                                                      eMechanism, eCharset,
                                                      eEscapeType);
                         if (!INetMIME::isIMAPAtomChar(nUTF32))
@@ -1321,7 +1318,7 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
                             setInvalid();
                             return false;
                         }
-                        appendUCS4(aSynAuth, nUTF32, eEscapeType, bOctets,
+                        appendUCS4(aSynAuth, nUTF32, eEscapeType,
                                    ePart, eCharset, false);
                     }
                     m_aAuth.set(aSynAbsURIRef, aSynAuth.makeStringAndClear(),
@@ -1413,9 +1410,9 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
         for (++pPos; pPos < pEnd && *pPos != nFragmentDelimiter;)
         {
             EscapeType eEscapeType;
-            sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, bOctets,
+            sal_uInt32 nUTF32 = getUTF32(pPos, pEnd,
                                          eMechanism, eCharset, eEscapeType);
-            appendUCS4(aSynQuery, nUTF32, eEscapeType, bOctets,
+            appendUCS4(aSynQuery, nUTF32, eEscapeType,
                        PART_URIC, eCharset, true);
         }
         m_aQuery.set(aSynAbsURIRef, aSynQuery.makeStringAndClear(),
@@ -1430,9 +1427,9 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
         for (++pPos; pPos < pEnd;)
         {
             EscapeType eEscapeType;
-            sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, bOctets,
+            sal_uInt32 nUTF32 = getUTF32(pPos, pEnd,
                                          eMechanism, eCharset, eEscapeType);
-            appendUCS4(aSynFragment, nUTF32, eEscapeType, bOctets, PART_URIC,
+            appendUCS4(aSynFragment, nUTF32, eEscapeType, PART_URIC,
                        eCharset, true);
         }
         m_aFragment.set(aSynAbsURIRef, aSynFragment.makeStringAndClear(),
@@ -1670,7 +1667,7 @@ bool INetURLObject::convertRelToAbs(OUString const & rTheRelURIRef,
             {
                 EscapeType eEscapeType;
                 sal_uInt32 nUTF32
-                    = getUTF32(p, pEnd, false/*bOctets*/, eMechanism,
+                    = getUTF32(p, pEnd, eMechanism,
                                eCharset, eEscapeType);
                 if (eEscapeType == EscapeType::NONE)
                 {
@@ -1682,7 +1679,7 @@ bool INetURLObject::convertRelToAbs(OUString const & rTheRelURIRef,
                         break;
                     }
                 }
-                appendUCS4(aSynAbsURIRef, nUTF32, eEscapeType, false/*bOctets*/,
+                appendUCS4(aSynAbsURIRef, nUTF32, eEscapeType,
                            PART_VISIBLE, eCharset, true);
             }
         }
@@ -1725,7 +1722,7 @@ bool INetURLObject::convertRelToAbs(OUString const & rTheRelURIRef,
         {
             EscapeType eEscapeType;
             sal_uInt32 nUTF32
-                = getUTF32(p, pEnd, false/*bOctets*/, eMechanism, eCharset, eEscapeType);
+                = getUTF32(p, pEnd, eMechanism, eCharset, eEscapeType);
             if (eEscapeType == EscapeType::NONE)
             {
                 if (nUTF32 == nFragmentDelimiter)
@@ -1736,7 +1733,7 @@ bool INetURLObject::convertRelToAbs(OUString const & rTheRelURIRef,
                 else if (nUTF32 == nSegmentDelimiter)
                     nUTF32 = '/';
             }
-            appendUCS4(aSynAbsURIRef, nUTF32, eEscapeType, false/*bOctets*/, ePart,
+            appendUCS4(aSynAbsURIRef, nUTF32, eEscapeType, ePart,
                        eCharset, true);
         }
     }
@@ -1818,9 +1815,9 @@ bool INetURLObject::convertRelToAbs(OUString const & rTheRelURIRef,
             {
                 EscapeType eEscapeType;
                 sal_uInt32 nUTF32
-                    = getUTF32(p, pEnd, false/*bOctets*/, eMechanism,
+                    = getUTF32(p, pEnd, eMechanism,
                                eCharset, eEscapeType);
-                appendUCS4(aSynAbsURIRef, nUTF32, eEscapeType, false/*bOctets*/, ePart,
+                appendUCS4(aSynAbsURIRef, nUTF32, eEscapeType, ePart,
                            eCharset, true);
             }
             if (p != pEnd && *p == nSegmentDelimiter)
@@ -1834,8 +1831,8 @@ bool INetURLObject::convertRelToAbs(OUString const & rTheRelURIRef,
         {
             EscapeType eEscapeType;
             sal_uInt32 nUTF32
-                = getUTF32(p, pEnd, false/*bOctets*/, eMechanism, eCharset, eEscapeType);
-            appendUCS4(aSynAbsURIRef, nUTF32, eEscapeType, false/*bOctets*/, ePart,
+                = getUTF32(p, pEnd, eMechanism, eCharset, eEscapeType);
+            appendUCS4(aSynAbsURIRef, nUTF32, eEscapeType, ePart,
                        eCharset, true);
         }
 
@@ -1864,8 +1861,8 @@ bool INetURLObject::convertRelToAbs(OUString const & rTheRelURIRef,
         {
             EscapeType eEscapeType;
             sal_uInt32 nUTF32
-                = getUTF32(p, pEnd, false/*bOctets*/, eMechanism, eCharset, eEscapeType);
-            appendUCS4(aSynAbsURIRef, nUTF32, eEscapeType, false/*bOctets*/,
+                = getUTF32(p, pEnd, eMechanism, eCharset, eEscapeType);
+            appendUCS4(aSynAbsURIRef, nUTF32, eEscapeType,
                        PART_VISIBLE, eCharset, true);
         }
     }
@@ -2800,7 +2797,7 @@ bool INetURLObject::parseHostOrNetBiosName(
                 while (pBegin < pEnd)
                 {
                     EscapeType eEscapeType;
-                    sal_uInt32 nUTF32 = getUTF32(pBegin, pEnd, false,
+                    sal_uInt32 nUTF32 = getUTF32(pBegin, pEnd,
                                                  eMechanism, eCharset,
                                                  eEscapeType);
                     if (!INetMIME::isVisible(nUTF32))
@@ -2828,7 +2825,7 @@ bool INetURLObject::parseHostOrNetBiosName(
                         }
                     if (pCanonic != nullptr) {
                         appendUCS4(
-                            buf, nUTF32, eEscapeType, false, PART_URIC,
+                            buf, nUTF32, eEscapeType, PART_URIC,
                             eCharset, true);
                     }
                 }
@@ -2914,9 +2911,9 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
             while (pPos < pEnd && *pPos != nFragmentDelimiter)
             {
                 EscapeType eEscapeType;
-                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, false, eMechanism,
+                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, eMechanism,
                                              eCharset, eEscapeType);
-                appendUCS4(aTheSynPath, nUTF32, eEscapeType, false,
+                appendUCS4(aTheSynPath, nUTF32, eEscapeType,
                            PART_HTTP_PATH, eCharset, true);
             }
             if (aTheSynPath.isEmpty())
@@ -2934,9 +2931,9 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
                    && *pPos != nFragmentDelimiter)
             {
                 EscapeType eEscapeType;
-                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, false, eMechanism,
+                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, eMechanism,
                                              eCharset, eEscapeType);
-                appendUCS4(aTheSynPath, nUTF32, eEscapeType, false,
+                appendUCS4(aTheSynPath, nUTF32, eEscapeType,
                            PART_HTTP_PATH, eCharset, true);
             }
             if (aTheSynPath.isEmpty())
@@ -2954,7 +2951,7 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
             while (pPos < pEnd && *pPos != nFragmentDelimiter)
             {
                 EscapeType eEscapeType;
-                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, false, eMechanism,
+                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, eMechanism,
                                              eCharset, eEscapeType);
                 if (eEscapeType == EscapeType::NONE)
                 {
@@ -2978,7 +2975,7 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
                         continue;
                     }
                 }
-                appendUCS4(aTheSynPath, nUTF32, eEscapeType, false,
+                appendUCS4(aTheSynPath, nUTF32, eEscapeType,
                            PART_PCHAR, eCharset, true);
             }
             if (aTheSynPath.isEmpty())
@@ -2991,9 +2988,9 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
                    && *pPos != nFragmentDelimiter)
             {
                 EscapeType eEscapeType;
-                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, false, eMechanism,
+                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, eMechanism,
                                              eCharset, eEscapeType);
-                appendUCS4(aTheSynPath, nUTF32, eEscapeType, false,
+                appendUCS4(aTheSynPath, nUTF32, eEscapeType,
                            PART_MAILTO, eCharset, true);
             }
             break;
@@ -3010,9 +3007,9 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
                    && *pPos != nFragmentDelimiter)
             {
                 EscapeType eEscapeType;
-                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, false, eMechanism,
+                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, eMechanism,
                                              eCharset, eEscapeType);
-                appendUCS4(aTheSynPath, nUTF32, eEscapeType, false,
+                appendUCS4(aTheSynPath, nUTF32, eEscapeType,
                            PART_PATH_BEFORE_QUERY, eCharset, true);
             }
             break;
@@ -3030,10 +3027,10 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
                        && *pPos != nFragmentDelimiter)
                 {
                     EscapeType eEscapeType;
-                    sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, false,
+                    sal_uInt32 nUTF32 = getUTF32(pPos, pEnd,
                                                  eMechanism,
                                                  eCharset, eEscapeType);
-                    appendUCS4(aTheSynPath, nUTF32, eEscapeType, false,
+                    appendUCS4(aTheSynPath, nUTF32, eEscapeType,
                                PART_HTTP_PATH, eCharset, true);
                 }
             }
@@ -3046,9 +3043,9 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
             while (pPos < pEnd && *pPos != nFragmentDelimiter)
             {
                 EscapeType eEscapeType;
-                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, false, eMechanism,
+                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, eMechanism,
                                              eCharset, eEscapeType);
-                appendUCS4(aTheSynPath, nUTF32, eEscapeType, false,
+                appendUCS4(aTheSynPath, nUTF32, eEscapeType,
                            PART_URIC, eCharset, true);
             }
             break;
@@ -3062,12 +3059,12 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
                    && *pPos != nFragmentDelimiter)
             {
                 EscapeType eEscapeType;
-                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, false, eMechanism,
+                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, eMechanism,
                                              eCharset, eEscapeType);
                 if (eEscapeType == EscapeType::NONE && nUTF32 == '/')
                     aTheSynPath.append('/');
                 else
-                    appendUCS4(aTheSynPath, nUTF32, eEscapeType, false,
+                    appendUCS4(aTheSynPath, nUTF32, eEscapeType,
                                PART_PCHAR, eCharset, false);
             }
             if (aTheSynPath.isEmpty())
@@ -3083,9 +3080,9 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
             while (pPos != pEnd && *pPos != nFragmentDelimiter)
             {
                 EscapeType eEscapeType;
-                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, false, eMechanism,
+                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, eMechanism,
                                              eCharset, eEscapeType);
-                appendUCS4(aTheSynPath, nUTF32, eEscapeType, false, ePart,
+                appendUCS4(aTheSynPath, nUTF32, eEscapeType, ePart,
                            eCharset, true);
                 ePart = PART_URIC;
             }
@@ -3108,12 +3105,12 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
             while (pPos < pEnd && *pPos != nFragmentDelimiter)
             {
                 EscapeType eEscapeType;
-                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, false, eMechanism,
+                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, eMechanism,
                                              eCharset, eEscapeType);
                 if (eEscapeType == EscapeType::NONE && nUTF32 == '/')
                     aTheSynPath.append('/');
                 else
-                    appendUCS4(aTheSynPath, nUTF32, eEscapeType, false,
+                    appendUCS4(aTheSynPath, nUTF32, eEscapeType,
                                PART_PCHAR, eCharset, false);
             }
             break;
@@ -3123,9 +3120,9 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
             while (pPos < pEnd && *pPos != nFragmentDelimiter)
             {
                 EscapeType eEscapeType;
-                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, false, eMechanism,
+                sal_uInt32 nUTF32 = getUTF32(pPos, pEnd, eMechanism,
                                              eCharset, eEscapeType);
-                appendUCS4(aTheSynPath, nUTF32, eEscapeType, false,
+                appendUCS4(aTheSynPath, nUTF32, eEscapeType,
                            PART_URIC, eCharset, true);
             }
             if (aTheSynPath.isEmpty())
@@ -3393,9 +3390,9 @@ OUString INetURLObject::encodeText(sal_Unicode const * pBegin,
     while (pBegin < pEnd)
     {
         EscapeType eEscapeType;
-        sal_uInt32 nUTF32 = getUTF32(pBegin, pEnd, /*bOctets*/false,
+        sal_uInt32 nUTF32 = getUTF32(pBegin, pEnd,
                                      eMechanism, eCharset, eEscapeType);
-        appendUCS4(aResult, nUTF32, eEscapeType, /*bOctets*/false, ePart,
+        appendUCS4(aResult, nUTF32, eEscapeType, ePart,
                    eCharset, bKeepVisibleEscapes);
     }
     return aResult.makeStringAndClear();
@@ -3423,7 +3420,7 @@ OUString INetURLObject::decode(sal_Unicode const * pBegin,
     while (pBegin < pEnd)
     {
         EscapeType eEscapeType;
-        sal_uInt32 nUTF32 = getUTF32(pBegin, pEnd, false,
+        sal_uInt32 nUTF32 = getUTF32(pBegin, pEnd,
                                      EncodeMechanism::WasEncoded, eCharset, eEscapeType);
         switch (eEscapeType)
         {
@@ -4535,7 +4532,7 @@ OUString INetURLObject::getFSysPath(FSysStyle eStyle,
             while (p < pEnd)
             {
                 EscapeType eEscapeType;
-                sal_uInt32 nUTF32 = getUTF32(p, pEnd, false, EncodeMechanism::WasEncoded,
+                sal_uInt32 nUTF32 = getUTF32(p, pEnd, EncodeMechanism::WasEncoded,
                                              RTL_TEXTENCODING_UTF8,
                                              eEscapeType);
                 if (eEscapeType == EscapeType::NONE && nUTF32 == '/')
@@ -4598,7 +4595,7 @@ void INetURLObject::appendUCS4Escape(OUStringBuffer & rTheText,
 
 // static
 void INetURLObject::appendUCS4(OUStringBuffer& rTheText, sal_uInt32 nUCS4,
-                               EscapeType eEscapeType, bool bOctets,
+                               EscapeType eEscapeType,
                                Part ePart, rtl_TextEncoding eCharset,
                                bool bKeepVisibleEscapes)
 {
@@ -4610,8 +4607,7 @@ void INetURLObject::appendUCS4(OUStringBuffer& rTheText, sal_uInt32 nUCS4,
             if (mustEncode(nUCS4, ePart))
             {
                 bEscape = true;
-                eTargetCharset = bOctets ? RTL_TEXTENCODING_ISO_8859_1 :
-                                           RTL_TEXTENCODING_UTF8;
+                eTargetCharset = RTL_TEXTENCODING_UTF8;
             }
             else
                 bEscape = false;
@@ -4662,14 +4658,13 @@ void INetURLObject::appendUCS4(OUStringBuffer& rTheText, sal_uInt32 nUCS4,
 
 // static
 sal_uInt32 INetURLObject::getUTF32(sal_Unicode const *& rBegin,
-                                   sal_Unicode const * pEnd, bool bOctets,
+                                   sal_Unicode const * pEnd,
                                    EncodeMechanism eMechanism,
                                    rtl_TextEncoding eCharset,
                                    EscapeType & rEscapeType)
 {
     DBG_ASSERT(rBegin < pEnd, "INetURLObject::getUTF32(): Bad sequence");
-    sal_uInt32 nUTF32 = bOctets ? *rBegin++ :
-                                  INetMIME::getUTF32Character(rBegin, pEnd);
+    sal_uInt32 nUTF32 = INetMIME::getUTF32Character(rBegin, pEnd);
     switch (eMechanism)
     {
         case EncodeMechanism::All:


More information about the Libreoffice-commits mailing list