sw/source/core/unocore/unostyle.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
New commits: commit 76a413aaf978cfa2b672299ea030ca96088ca786 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sat Apr 8 09:58:25 2023 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sat Apr 8 14:02:54 2023 +0200 Drop duplicated search Since commit f3909d4114ab54fd2ee3b71da0777fad9a4a3ee8 (#90968# use SwStyleNameMapper methods which disambiguate user defined styles which clash with programmatic names, 2001-08-16) Change-Id: Ic7708242d004af9e183147e044f93211b108ed91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150143 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 8de642fcc034..81f74230b6de 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1076,8 +1076,7 @@ void XStyleFamily::insertByName(const OUString& rName, const uno::Any& rElement) OUString sStyleName; SwStyleNameMapper::FillUIName(rName, sStyleName, m_rEntry.poolId()); SfxStyleSheetBase* pBase = m_pBasePool->Find(sStyleName, m_rEntry.family()); - SfxStyleSheetBase* pUINameBase = m_pBasePool->Find(sStyleName, m_rEntry.family()); - if(pBase || pUINameBase) + if (pBase) throw container::ElementExistException(); if(rElement.getValueType().getTypeClass() != uno::TypeClass_INTERFACE) throw lang::IllegalArgumentException();