summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/notxtfrm.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 27beaa0dfb60..5ac99b8da9be 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -270,11 +270,23 @@ void SwNoTextFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRec
// In case the picture fly frm was clipped, render it with the origin
// size instead of scaling it
- if ( rNoTNd.getIDocumentSettingAccess()->get( DocumentSettingId::CLIPPED_PICTURES ) )
+ if ( pGrfNd && rNoTNd.getIDocumentSettingAccess()->get( DocumentSettingId::CLIPPED_PICTURES ) )
{
const SwFlyFreeFrame *pFly = dynamic_cast< const SwFlyFreeFrame* >( FindFlyFrame() );
if( pFly )
- aGrfArea = SwRect( Frame().Pos( ), pFly->GetUnclippedFrame( ).SSize( ) );
+ {
+ bool bGetUnclippedFrame=true;
+ const SfxPoolItem* pItem;
+ if( pFly->GetFormat() && SfxItemState::SET == pFly->GetFormat()->GetItemState(RES_BOX, false, &pItem) )
+ {
+ const SvxBoxItem& rBox = *static_cast<const SvxBoxItem*>(pItem);
+ if( rBox.HasBorder( /*bTreatPaddingAsBorder*/true) )
+ bGetUnclippedFrame = false;
+ }
+
+ if( bGetUnclippedFrame )
+ aGrfArea = SwRect( Frame().Pos( ), pFly->GetUnclippedFrame( ).SSize( ) );
+ }
}
aPaintArea.Intersection_( aOrigPaint );