summaryrefslogtreecommitdiff
path: root/sw/inc/doc.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-06-22 22:39:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-06-23 09:55:59 +0200
commit1feb59c3dd9e5f714ce894f8de31bbb6869c9f3b (patch)
treece8f05e8457a1b60ed318b4147054ed030e0bf56 /sw/inc/doc.hxx
parentbc4cea4943c9189b92f51aacf097549023398b2e (diff)
optimised FindFormatByName for SwFrameFormats
by re-arranging the boost::multi_index key, we can re-use that index to find all formats matching a name Change-Id: I3b3b6ceb7137926be3981578a64052f47f279af0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117676 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc/doc.hxx')
-rw-r--r--sw/inc/doc.hxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index b5edfcf39566..f72c2b89cb0d 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -761,13 +761,13 @@ public:
SwFrameFormat *MakeFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom,
bool bBroadcast = false, bool bAuto = true);
void DelFrameFormat( SwFrameFormat *pFormat, bool bBroadcast = false );
- SwFrameFormat* FindFrameFormatByName( std::u16string_view rName ) const;
+ SwFrameFormat* FindFrameFormatByName( const OUString& rName ) const;
SwCharFormat *MakeCharFormat(const OUString &rFormatName, SwCharFormat *pDerivedFrom,
bool bBroadcast = false );
void DelCharFormat(size_t nFormat, bool bBroadcast = false);
void DelCharFormat(SwCharFormat const * pFormat, bool bBroadcast = false);
- SwCharFormat* FindCharFormatByName( std::u16string_view rName ) const
+ SwCharFormat* FindCharFormatByName( const OUString& rName ) const
{ return mpCharFormatTable->FindFormatByName(rName); }
// Formatcollections (styles)
@@ -795,7 +795,7 @@ public:
const bool bReset = true,
const bool bResetListAttrs = false,
SwRootFrame const* pLayout = nullptr);
- SwTextFormatColl* FindTextFormatCollByName( std::u16string_view rName ) const
+ SwTextFormatColl* FindTextFormatCollByName( const OUString& rName ) const
{ return mpTextFormatCollTable->FindFormatByName(rName); }
void ChkCondColls();
@@ -813,7 +813,7 @@ public:
SwFrameFormat& GetTableFrameFormat(size_t nFormat, bool bUsed ) const;
SwTableFormat* MakeTableFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom);
void DelTableFrameFormat( SwTableFormat* pFormat );
- SwTableFormat* FindTableFormatByName( std::u16string_view rName, bool bAll = false ) const;
+ SwTableFormat* FindTableFormatByName( const OUString& rName, bool bAll = false ) const;
/** Access to frames.
Iterate over Flys - for Basic-Collections. */
@@ -1269,7 +1269,7 @@ public:
const SwTable* pCpyTable, bool bCpyName = false,
bool bCorrPos = false );
- void UnProtectCells( std::u16string_view rTableName );
+ void UnProtectCells( const OUString& rTableName );
bool UnProtectCells( const SwSelBoxes& rBoxes );
void UnProtectTables( const SwPaM& rPam );
bool HasTableAnyProtection( const SwPosition* pPos,
@@ -1286,7 +1286,7 @@ public:
sal_uInt16 nMode = 0 );
// Make charts of given table update.
- void UpdateCharts( std::u16string_view rName ) const;
+ void UpdateCharts( const OUString& rName ) const;
// Update all charts, for that exists any table.
void UpdateAllCharts() { DoUpdateAllCharts(); }