Kaydet (Commit) 0d13d04d authored tarafından Miklos Vajna's avatar Miklos Vajna Kaydeden (comit) Andras Timar

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>
(cherry picked from commit 226804c8)
üst 301e38b6
...@@ -122,6 +122,22 @@ void setFont(const SvxFont& rNewFont, SvxFont& rImplFont) ...@@ -122,6 +122,22 @@ void setFont(const SvxFont& rNewFont, SvxFont& rImplFont)
rImplFont.SetAlignment(ALIGN_BASELINE); 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 } // end anonymous namespace
class FontPrevWin_Impl class FontPrevWin_Impl
...@@ -612,24 +628,6 @@ void SvxFontPrevWindow::UseResourceText() ...@@ -612,24 +628,6 @@ void SvxFontPrevWindow::UseResourceText()
pImpl->mbUseResText = true; 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&) void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{ {
ApplySettings(rRenderContext); 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