vcl/inc/textlayout.hxx         |    4 ++--
 vcl/qa/cppunit/textlayout.cxx  |    6 +++---
 vcl/source/text/textlayout.cxx |    8 ++++----
 3 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 7c1a359663355fac356e1eccf76f3f0247d4e3c6
Author:     Chris Sherlock <chris.sherloc...@gmail.com>
AuthorDate: Thu Oct 26 03:27:29 2023 +1100
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Thu Dec 28 02:34:56 2023 +0100

    vcl: BreakLines() -> BreakLine() and BreakLinesSimple() -> BreakLineSimple()
    
    Change-Id: I8cb778a09566c1b7d6c2ba4ac5766a5675e62465
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158465
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/vcl/inc/textlayout.hxx b/vcl/inc/textlayout.hxx
index d05259475d18..7f81fcbeb10a 100644
--- a/vcl/inc/textlayout.hxx
+++ b/vcl/inc/textlayout.hxx
@@ -52,13 +52,13 @@ namespace vcl
     public:
         OUString GetEllipsisString(OUString const& rOrigStr, tools::Long 
nMaxWidth, DrawTextFlags nStyle);
 
-        std::tuple<sal_Int32, sal_Int32> BreakLines(const tools::Long nWidth, 
OUString const& rStr,
+        std::tuple<sal_Int32, sal_Int32> BreakLine(const tools::Long nWidth, 
OUString const& rStr,
                         css::uno::Reference< css::linguistic2::XHyphenator > 
const& xHyph,
                         css::uno::Reference<css::i18n::XBreakIterator>& xBI,
                         const bool bHyphenate, const tools::Long 
nOrigLineWidth,
                         const sal_Int32 nPos, const sal_Int32 nLen);
 
-        std::tuple<sal_Int32, sal_Int32> BreakLinesSimple(const tools::Long 
nWidth, OUString const& rStr,
+        std::tuple<sal_Int32, sal_Int32> BreakLineSimple(const tools::Long 
nWidth, OUString const& rStr,
                                   const sal_Int32 nPos, sal_Int32 nBreakPos, 
const tools::Long nOrigLineWidth);
 
         tools::Long GetTextLines(tools::Rectangle const& rRect, const 
tools::Long nTextHeight,
diff --git a/vcl/qa/cppunit/textlayout.cxx b/vcl/qa/cppunit/textlayout.cxx
index 3ace6a8b836d..36129aec6920 100644
--- a/vcl/qa/cppunit/textlayout.cxx
+++ b/vcl/qa/cppunit/textlayout.cxx
@@ -49,7 +49,7 @@ CPPUNIT_TEST_FIXTURE(VclTextLayoutTest, 
testBreakLines_invalid_softbreak)
     const auto nTextLen = 13;
 
     auto[nBreakPos, nLineWidth]
-        = aTextLayout.BreakLines(nTextWidth, sTestStr, xHyph, xBI, false, 
nTextWidth, nTextLen, 15);
+        = aTextLayout.BreakLine(nTextWidth, sTestStr, xHyph, xBI, false, 
nTextWidth, nTextLen, 15);
 
     const sal_Int32 nExpectedBreakPos = 13;
     CPPUNIT_ASSERT_EQUAL(nExpectedBreakPos, nBreakPos);
@@ -75,7 +75,7 @@ CPPUNIT_TEST_FIXTURE(VclTextLayoutTest, 
testBreakLines_hyphens)
     css::uno::Reference<css::i18n::XBreakIterator> xBI = 
vcl::unohelper::CreateBreakIterator();
 
     auto[nBreakPos, nLineWidth]
-        = aTextLayout.BreakLines(nTextWidth, sTestStr, xHyph, xBI, true, 
nTextWidth, 13, 12);
+        = aTextLayout.BreakLine(nTextWidth, sTestStr, xHyph, xBI, true, 
nTextWidth, 13, 12);
 
     const sal_Int32 nExpectedBreakPos = 13;
     CPPUNIT_ASSERT_EQUAL(nExpectedBreakPos, nBreakPos);
@@ -101,7 +101,7 @@ CPPUNIT_TEST_FIXTURE(VclTextLayoutTest, 
testBreakLines_hyphen_word_under_two_cha
     css::uno::Reference<css::i18n::XBreakIterator> xBI = 
vcl::unohelper::CreateBreakIterator();
 
     auto[nBreakPos, nLineWidth]
-        = aTextLayout.BreakLines(nTextWidth, sTestStr, xHyph, xBI, true, 
nTextWidth, 2, 10);
+        = aTextLayout.BreakLine(nTextWidth, sTestStr, xHyph, xBI, true, 
nTextWidth, 2, 10);
 
     const sal_Int32 nExpectedBreakPos = 2;
     CPPUNIT_ASSERT_EQUAL(nExpectedBreakPos, nBreakPos);
diff --git a/vcl/source/text/textlayout.cxx b/vcl/source/text/textlayout.cxx
index e90c56b6355a..8797689963c0 100644
--- a/vcl/source/text/textlayout.cxx
+++ b/vcl/source/text/textlayout.cxx
@@ -218,7 +218,7 @@ namespace vcl
         return aStr;
     }
 
-    std::tuple<sal_Int32, sal_Int32> TextLayoutCommon::BreakLines(const 
tools::Long nWidth, OUString const& rStr,
+    std::tuple<sal_Int32, sal_Int32> TextLayoutCommon::BreakLine(const 
tools::Long nWidth, OUString const& rStr,
                         css::uno::Reference< css::linguistic2::XHyphenator > 
const& xHyph,
                         css::uno::Reference<css::i18n::XBreakIterator>& xBI,
                         const bool bHyphenate, const tools::Long 
nOrigLineWidth,
@@ -228,7 +228,7 @@ namespace vcl
             xBI = vcl::unohelper::CreateBreakIterator();
 
         if (!xBI.is())
-            return BreakLinesSimple(nWidth, rStr, nPos, nLen, nOrigLineWidth);
+            return BreakLineSimple(nWidth, rStr, nPos, nLen, nOrigLineWidth);
 
         const css::lang::Locale& 
rDefLocale(Application::GetSettings().GetUILanguageTag().getLocale());
 
@@ -338,7 +338,7 @@ namespace vcl
         return { nBreakPos, GetTextWidth(rStr, nPos, nBreakPos - nPos) };
     }
 
-    std::tuple<sal_Int32, sal_Int32> TextLayoutCommon::BreakLinesSimple(const 
tools::Long nWidth, OUString const& rStr,
+    std::tuple<sal_Int32, sal_Int32> TextLayoutCommon::BreakLineSimple(const 
tools::Long nWidth, OUString const& rStr,
                                                  const sal_Int32 nPos, const 
sal_Int32 nLen, const tools::Long nOrigLineWidth)
     {
         sal_Int32 nBreakPos = nLen;
@@ -425,7 +425,7 @@ namespace vcl
 
 
             if (lcl_ShouldBreakWord(nLineWidth, nWidth, nStyle))
-                std::tie(nBreakPos, nLineWidth) = BreakLines(nWidth, rStr, 
xHyph, xBI, bHyphenate, nLineWidth, nPos, nBreakPos);
+                std::tie(nBreakPos, nLineWidth) = BreakLine(nWidth, rStr, 
xHyph, xBI, bHyphenate, nLineWidth, nPos, nBreakPos);
 
             if ( nLineWidth > nMaxLineWidth )
                 nMaxLineWidth = nLineWidth;

Reply via email to