[Libreoffice-commits] core.git: sw/source

Mike Kaganski mike.kaganski at collabora.com
Sat Oct 7 06:37:21 UTC 2017


 sw/source/core/unocore/unofield.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 053827916ea927ade09bf5856b61f30ba7deea9e
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Fri Oct 6 22:22:12 2017 +0200

    Replace a magic number with its syntactic meaning
    
    Change-Id: I535a7317f0797ef63294df05463a88e9e8d7aa10
    Reviewed-on: https://gerrit.libreoffice.org/43213
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 0b0d8d0859a1..8902c0ea8c27 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -2652,7 +2652,7 @@ SwXTextFieldMasters::~SwXTextFieldMasters()
 static SwFieldIds lcl_GetIdByName( OUString& rName, OUString& rTypeName )
 {
     if (rName.startsWithIgnoreAsciiCase(COM_TEXT_FLDMASTER_CC))
-        rName = rName.copy(30);
+        rName = rName.copy(RTL_CONSTASCII_LENGTH(COM_TEXT_FLDMASTER_CC));
 
     SwFieldIds nResId = SwFieldIds::Unknown;
     sal_Int32 nFound = 0;


More information about the Libreoffice-commits mailing list