Clean up {osl_,osl::}systemPathEnsureSeparator combo

Change-Id: Iafa953725c1ca8e6f3032945dc0700ae989519b9
Reviewed-on: https://gerrit.libreoffice.org/78671
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
diff --git a/sal/osl/unx/file_path_helper.cxx b/sal/osl/unx/file_path_helper.cxx
index 5ddef58..e848586 100644
--- a/sal/osl/unx/file_path_helper.cxx
+++ b/sal/osl/unx/file_path_helper.cxx
@@ -58,7 +58,9 @@ void osl_systemPathRemoveSeparator(rtl_uString* pustrPath)
    }
}

void osl_systemPathEnsureSeparator(OUString* ppustrPath)
namespace {

void systemPathEnsureSeparator(OUString* ppustrPath)
{
    assert(nullptr != ppustrPath);
    sal_Int32    lp = ppustrPath->getLength();
@@ -71,7 +73,9 @@ void osl_systemPathEnsureSeparator(OUString* ppustrPath)

    SAL_WARN_IF( !ppustrPath->endsWith(FPH_PATH_SEPARATOR),
                 "sal.osl",
                 "osl_systemPathEnsureSeparator: Post condition failed");
                 "systemPathEnsureSeparator: Post condition failed");
}

}

bool osl_systemPathIsRelativePath(const rtl_uString* pustrPath)
@@ -87,7 +91,7 @@ OUString osl::systemPathMakeAbsolutePath(
    OUString base(BasePath);

    if (!base.isEmpty())
        osl_systemPathEnsureSeparator(&base);
        systemPathEnsureSeparator(&base);

    return base + RelPath;
}
@@ -224,7 +228,7 @@ bool osl_searchPath(
    while (!pli.done())
    {
        OUString p = pli.get_current_item();
        osl::systemPathEnsureSeparator(p);
        systemPathEnsureSeparator(&p);
        p += fp;

        if (osl::access(p, F_OK) > -1)
diff --git a/sal/osl/unx/file_path_helper.hxx b/sal/osl/unx/file_path_helper.hxx
index 9fe7c8e..b969cfe 100644
--- a/sal/osl/unx/file_path_helper.hxx
+++ b/sal/osl/unx/file_path_helper.hxx
@@ -39,19 +39,6 @@
void osl_systemPathRemoveSeparator(rtl_uString* pustrPath);

/**
   Adds a trailing path separator to the given system path if not already there
   and if the path is not the root path '/'

   @param  pustrPath [inout]    a system path if the path is not the root path
                                '/' and has no trailing separator a separator
                                will be added ppustrPath must not be NULL

   @returns nothing

*/
void osl_systemPathEnsureSeparator(OUString* ppustrPath);

/**
   Returns true if the given path is a relative path and so starts not with '/'

   @param  pustrPath [in]       a system path - must not be NULL
@@ -165,28 +152,6 @@ namespace osl
 }

 /*******************************************
    systemPathEnsureSeparator
    Adds a trailing path separator to the
    given system path if not already there
    and if the path is not the root path '/'

      @param    pustrPath [inout] a system path
            if the path is not the root path
            '/' and has no trailing separator
            a separator will be added
            ppustrPath must not be NULL and
            must point to a valid rtl_uString

    @returns nothing

  ******************************************/

 inline void systemPathEnsureSeparator(/*inout*/ OUString& Path)
 {
     osl_systemPathEnsureSeparator(&Path);
 }

 /*******************************************
    systemPathIsRelativePath
    Returns true if the given path is a
    relative path and so starts not with '/'