Kaydet (Commit) 226804c8 authored tarafından Miklos Vajna's avatar Miklos Vajna

svx: CleanAndCheckEmpty() can be in the anonymous namespace

Change-Id: I51c636559aee10791102e70b5507fdab3c9a4e11
Reviewed-on: https://gerrit.libreoffice.org/46819Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 28ddaf52
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment