summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/source/core/stlpool.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index ad4733f96189..738279e8a440 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -553,7 +553,7 @@ void SdStyleSheetPool::CopyTableStyles(SdStyleSheetPool const & rSourcePool)
const OUString sName(Reference<XStyle>(xSourceTableStyle, UNO_QUERY_THROW)->getName());
if( xTarget->hasByName( sName ) )
- xTarget->replaceByName( sName, Any( xNewTableStyle ) );
+ Reference<XComponent>(xNewTableStyle, UNO_QUERY_THROW)->dispose();
else
xTarget->insertByName( sName, Any( xNewTableStyle ) );
}