diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-27 19:19:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-28 12:34:05 +0200 |
commit | 23046111d01ab0ec5feb570d428aea5ed4ece5fc (patch) | |
tree | 889185d202fb1d2d129d02d2d13f752af1c02223 | |
parent | 08c09017bfa5c72ba2b9614237fcf0c0f9738037 (diff) |
remove dead code in SwDoc::CloneSdrObj
Dead because
isType<SdrObject>(pObj.get()
is unconditionally true, which renders the entire if statement dead.
Ever since it was introduced in
commit 68428bf17441dc0ec9dfcffd7cc6073660e552f0
Author: Vladimir Glazounov <vg@openoffice.org>
Date: Fri Jul 4 12:19:41 2003 +0000
INTEGRATION: CWS aig02 (1.12.32); FILE MERGED
2003/07/03 13:29:21 od 1.12.32.4: #108784# further adjustments for
support of drawing objects in header/footer
<SwDoc::CopyLayoutFmt(..)> - do *not* connect draw frame
format to
layout, if its corresponding <MakeFrms> will not be called.
2003/07/02 16:04:01 od 1.12.32.3: #108784# - consider 'invisible'
layer at drawing page for support of
drawing objects in header/footer
2003/06/26 18:17:53 od 1.12.32.2: #108784# - further adjustments for
support of drawing objects in header/footer
2003/06/26 17:02:11 dvo 1.12.32.1: #108784# copy shapes (but not
controls) into header/footers
Change-Id: Idca3d73ac5b790f93e56214ce1aaa3e99a173a6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151141
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sw/source/core/doc/doclay.cxx | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 4ec0f8922da2..d37c5dc59d3c 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -137,19 +137,6 @@ rtl::Reference<SdrObject> SwDoc::CloneSdrObj( const SdrObject& rObj, bool bMoveW else if( bInsInPage ) pPg->InsertObjectThenMakeNameUnique( pObj.get() ); - // For drawing objects: set layer of cloned object to invisible layer - SdrLayerID nLayerIdForClone = rObj.GetLayer(); - if ( dynamic_cast<const SwFlyDrawObj*>( pObj.get() ) == nullptr && - dynamic_cast<const SwVirtFlyDrawObj*>( pObj.get() ) == nullptr && - !isType<SdrObject>(pObj.get()) ) - { - if ( getIDocumentDrawModelAccess().IsVisibleLayerId( nLayerIdForClone ) ) - { - nLayerIdForClone = getIDocumentDrawModelAccess().GetInvisibleLayerIdByVisibleOne( nLayerIdForClone ); - } - } - pObj->SetLayer( nLayerIdForClone ); - return pObj; } |