summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/access/accpara.cxx2
-rw-r--r--sw/source/core/doc/doctxm.cxx11
-rw-r--r--sw/source/core/tox/ToxTextGenerator.cxx2
-rw-r--r--sw/source/core/tox/tox.cxx2
-rw-r--r--sw/source/core/unocore/unodraw.cxx4
-rw-r--r--sw/source/core/unocore/unomap.cxx2
6 files changed, 12 insertions, 11 deletions
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index e90f428898c7..1a543581f253 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1782,7 +1782,7 @@ void SwAccessibleParagraph::_getSupplementalAttributesImpl(
{
const SfxItemPropertyMapEntry* pPropMap(
aSwMapProvider.GetPropertyMapEntries( PROPERTY_MAP_ACCESSIBILITY_TEXT_ATTRIBUTE ) );
- while ( pPropMap->aName.getLength() )
+ while ( !pPropMap->aName.empty() )
{
const SfxPoolItem* pItem = pSet->GetItem( pPropMap->nWID );
if ( pItem )
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index d5d16626650e..2b1e63c995b3 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1721,7 +1721,8 @@ void SwTOXBaseSection::UpdatePageNum_( SwTextNode* pNd,
// collect starts end ends of main entry character style
std::unique_ptr< std::vector<sal_uInt16> > xCharStyleIdx(pMainEntryNums ? new std::vector<sal_uInt16> : nullptr);
- OUString sSrchStr = OUStringChar(C_NUM_REPL) + S_PAGE_DELI + OUStringChar(C_NUM_REPL);
+ OUString sSrchStr
+ = OUStringChar(C_NUM_REPL) + SwTOXMark::S_PAGE_DELI + OUStringChar(C_NUM_REPL);
sal_Int32 nStartPos = pNd->GetText().indexOf(sSrchStr);
sSrchStr = OUStringChar(C_NUM_REPL) + OUStringChar(C_END_PAGE_NUM);
sal_Int32 nEndPos = pNd->GetText().indexOf(sSrchStr);
@@ -1786,7 +1787,7 @@ void SwTOXBaseSection::UpdatePageNum_( SwTextNode* pNd,
else if (nCount) //#58127# If nCount == 0, then the only PageNumber is already in aNumStr!
{
if (nCount == 1 )
- aNumStr += S_PAGE_DELI;
+ aNumStr += SwTOXMark::S_PAGE_DELI;
else
aNumStr += "-";
@@ -1795,7 +1796,7 @@ void SwTOXBaseSection::UpdatePageNum_( SwTextNode* pNd,
// Create new String
nBeg = rNums[i];
- aNumStr += S_PAGE_DELI;
+ aNumStr += SwTOXMark::S_PAGE_DELI;
//the change of the character style must apply after sPageDeli is appended
if (xCharStyleIdx && bMainEntryChanges)
{
@@ -1810,7 +1811,7 @@ void SwTOXBaseSection::UpdatePageNum_( SwTextNode* pNd,
{ // Insert all Numbers
aNumStr += aType.GetNumStr( rNums[i] );
if (i+1 != rNums.size())
- aNumStr += S_PAGE_DELI;
+ aNumStr += SwTOXMark::S_PAGE_DELI;
}
}
// Flush when ending and the following old values
@@ -1826,7 +1827,7 @@ void SwTOXBaseSection::UpdatePageNum_( SwTextNode* pNd,
if(nCount >= 2)
aNumStr += "-";
else if(nCount == 1)
- aNumStr += S_PAGE_DELI;
+ aNumStr += SwTOXMark::S_PAGE_DELI;
//#58127# If nCount == 0, then the only PageNumber is already in aNumStr!
if(nCount)
aNumStr += rDescs[i-1]->GetNumType().GetNumStr( nBeg+nCount );
diff --git a/sw/source/core/tox/ToxTextGenerator.cxx b/sw/source/core/tox/ToxTextGenerator.cxx
index cfef4d3561f5..11ced0144d8f 100644
--- a/sw/source/core/tox/ToxTextGenerator.cxx
+++ b/sw/source/core/tox/ToxTextGenerator.cxx
@@ -414,7 +414,7 @@ ToxTextGenerator::ConstructPageNumberPlaceholder(size_t numberOfToxSources)
// Place holder for the PageNumber; we only respect the first one
retval.append(C_NUM_REPL);
for (size_t i = 1; i < numberOfToxSources; ++i) {
- retval.append(S_PAGE_DELI);
+ retval.append(SwTOXMark::S_PAGE_DELI);
retval.append(C_NUM_REPL);
}
retval.append(C_END_PAGE_NUM);
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index 27288881d76e..149a305a348a 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -45,8 +45,6 @@ using namespace std;
const sal_Unicode C_NUM_REPL = '@';
const sal_Unicode C_END_PAGE_NUM = '~';
-const OUStringLiteral S_PAGE_DELI(u", ");
-
namespace
{
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 8e280ea7179a..5a3fdbb38736 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -21,6 +21,8 @@
#include <initializer_list>
#include <memory>
+#include <string_view>
+
#include <sal/log.hxx>
#include <cmdid.h>
@@ -2184,7 +2186,7 @@ uno::Sequence< OUString > SwXShape::getSupportedServiceNames()
if (SvxShape* pSvxShape = GetSvxShape())
aSeq = pSvxShape->getSupportedServiceNames();
return comphelper::concatSequences(
- aSeq, std::initializer_list<OUStringLiteral>{ u"com.sun.star.drawing.Shape" });
+ aSeq, std::initializer_list<std::u16string_view>{ u"com.sun.star.drawing.Shape" });
}
SvxShape* SwXShape::GetSvxShape()
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index c29bb8a7fa6f..a609da4d53d9 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -697,7 +697,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
SfxItemPropertyMapEntry* aTextDefaultMap_Impl = GetTextDefaultPropertyMap();
m_aMapEntriesArr[nPropertyId] = aTextDefaultMap_Impl;
for( SfxItemPropertyMapEntry * pMap = aTextDefaultMap_Impl;
- pMap->aName.getLength(); ++pMap )
+ !pMap->aName.empty(); ++pMap )
{
// UNO_NAME_PAGE_DESC_NAME should keep its MAYBEVOID flag
if (RES_PAGEDESC != pMap->nWID || MID_PAGEDESC_PAGEDESCNAME != pMap->nMemberId)