svx: CleanAndCheckEmpty() can be in the anonymous namespace

Change-Id: I51c636559aee10791102e70b5507fdab3c9a4e11
Reviewed-on: https://gerrit.libreoffice.org/46819
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index f41889f..39e0444 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -122,6 +122,22 @@ void setFont(const SvxFont& rNewFont, SvxFont& rImplFont)
    rImplFont.SetAlignment(ALIGN_BASELINE);
}

/*
 * removes line feeds and carriage returns from string
 * returns if param is empty
 */
bool CleanAndCheckEmpty(OUString& rText)
{
    bool bEmpty = true;
    for (sal_Int32 i = 0; i < rText.getLength(); ++i)
    {
        if (0xa == rText[i] || 0xd == rText[i])
            rText = rText.replaceAt(i, 1, " ");
        else
            bEmpty = false;
    }
    return bEmpty;
}
} // end anonymous namespace

class FontPrevWin_Impl
@@ -612,24 +628,6 @@ void SvxFontPrevWindow::UseResourceText()
    pImpl->mbUseResText = true;
}

/*
 * removes line feeds and carriage returns from string
 * returns if param is empty
 */
bool CleanAndCheckEmpty(OUString& rText)
{
    bool bEmpty = true;
    for (sal_Int32 i = 0; i < rText.getLength(); ++i)
    {
        if (0xa == rText[i] || 0xd == rText[i])
            rText = rText.replaceAt(i, 1, " ");
        else
            bEmpty = false;
    }
    return bEmpty;
}


void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
    ApplySettings(rRenderContext);