summaryrefslogtreecommitdiff
path: root/sw/source/filter/basflt/fltini.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/basflt/fltini.cxx')
-rw-r--r--sw/source/filter/basflt/fltini.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index 18de2e807c64..3b6ce6e54469 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -308,9 +308,9 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor,
if( SfxItemState::SET != rFlySet.GetItemState( RES_FRM_SIZE, true, &pItem ) ||
MINFLY > static_cast<const SwFormatFrameSize*>(pItem)->GetWidth() )
{
- SwFormatFrameSize aSz(rFlySet.Get(RES_FRM_SIZE));
+ std::shared_ptr<SwFormatFrameSize> aSz(static_cast<SwFormatFrameSize*>(rFlySet.Get(RES_FRM_SIZE).Clone()));
if (pItem)
- aSz = static_cast<const SwFormatFrameSize&>(*pItem);
+ aSz.reset(static_cast<SwFormatFrameSize*>(pItem->Clone()));
SwTwips nWidth;
// determine the width; if there is a table use the width of the table;
@@ -397,16 +397,16 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor,
if( MINFLY > nWidth )
nWidth = MINFLY;
- aSz.SetWidth( nWidth );
- if( MINFLY > aSz.GetHeight() )
- aSz.SetHeight( MINFLY );
- rFlySet.Put( aSz );
+ aSz->SetWidth( nWidth );
+ if( MINFLY > aSz->GetHeight() )
+ aSz->SetHeight( MINFLY );
+ rFlySet.Put( *aSz );
}
else if( MINFLY > static_cast<const SwFormatFrameSize*>(pItem)->GetHeight() )
{
- SwFormatFrameSize aSz( *static_cast<const SwFormatFrameSize*>(pItem) );
- aSz.SetHeight( MINFLY );
- rFlySet.Put( aSz );
+ std::shared_ptr<SwFormatFrameSize> aSz(static_cast<SwFormatFrameSize*>(pItem->Clone()));
+ aSz->SetHeight( MINFLY );
+ rFlySet.Put( *aSz );
}
}