diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2019-08-15 12:08:06 +0300 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2019-08-19 11:15:22 +0200 |
commit | 09228fabe88f3457105cf26d83c003719a793114 (patch) | |
tree | 7a3c75f27de075dba58932fe328c7bac1961719c /sw/inc | |
parent | 92d1b0d10ec04f17d116bc54aada652f1c2cac4a (diff) |
sw undo/redo: avoid usage of pointers as a style references
Style can be created on previous undo steps and so after undo/redo
pointer can became invalid. Style name as a reference looks like
a good alternative to pointers.
Change-Id: Ia099a717eaec1f1a23296b2c1273b8c1983a2b96
Reviewed-on: https://gerrit.libreoffice.org/77495
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/doc.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index e5f7808bd83f..b5a5d3bb1139 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -336,7 +336,6 @@ private: FNCopyFormat fnCopyFormat, SwFormat& rDfltFormat ); void CopyPageDescHeaderFooterImpl( bool bCpyHeader, const SwFrameFormat& rSrcFormat, SwFrameFormat& rDestFormat ); - static SwFormat* FindFormatByName( const SwFormatsBase& rFormatArr, const OUString& rName ); SwDoc( const SwDoc &) = delete; @@ -753,6 +752,8 @@ public: // Remove all language dependencies from all existing formats void RemoveAllFormatLanguageDependencies(); + static SwFormat* FindFormatByName(const SwFormatsBase& rFormatArr, const OUString& rName); + SwFrameFormat *MakeFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom, bool bBroadcast = false, bool bAuto = true); void DelFrameFormat( SwFrameFormat *pFormat, bool bBroadcast = false ); |