[Libreoffice-commits] core.git: Branch 'feature/RotGrfFlyFrame' - sw/source
Armin Le Grand
Armin.Le.Grand at cib.de
Thu Oct 5 13:25:10 UTC 2017
sw/source/core/draw/dflyobj.cxx | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
New commits:
commit 44205c3aa386479a48fc5d3ebd086b985a731222
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date: Wed Oct 4 17:44:24 2017 +0200
RotGrfFlyFrame: Added interactive rotation mode
The FlyFrames containing a graphic now support an
interactive rotation mode. Added a rotation icon to the
Toolbar close to right/left 90degree rotation. When
activated, works as similar to draw object mode as
possible. Shear and move of the rotation center is
deactivated since not supported. It uses as much of the
existing interaction stuff as possible.
Change-Id: Ia1a4e5c064d8576b114c3fcf3a96ccb42c9372bb
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 59380eb52939..b2fa11b95159 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -362,10 +362,14 @@ bool SwVirtFlyDrawObj::ContainsSwGrfNode() const
if(nullptr != pFlyFrame && pFlyFrame->Lower() && pFlyFrame->Lower()->IsNoTextFrame())
{
- const SwContentFrame* pCntFr = const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(pFlyFrame->Lower()));
- const SwGrfNode* pGrfNd(pCntFr->GetNode()->GetGrfNode());
+ const SwContentFrame* pCntFr(static_cast<const SwContentFrame*>(pFlyFrame->Lower());
- return nullptr != pGrfNd;
+ if(nullptr != pCntFr)
+ {
+ const SwGrfNode* pGrfNd(pCntFr->GetNode()->GetGrfNode());
+
+ return nullptr != pGrfNd;
+ }
}
return false;
More information about the Libreoffice-commits
mailing list