diff options
author | Noel Power <noel.power@novell.com> | 2010-10-13 15:18:03 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2010-10-13 15:18:03 +0100 |
commit | b3dd1e3106014589e7c771d49abb6e53a4f80c2d (patch) | |
tree | 8fd197c8bf445ea04d3cb25617f0b070201bf697 /sw/source/ui | |
parent | d497f3203639a51b5f4dce4d52f0f59ffdbb32d9 (diff) | |
parent | 34c875edd7035494c707d5297158f97271728bc7 (diff) |
Merge branch 'master' of ssh://noelp@git.freedesktop.org/git/libreoffice/writer
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/docvw/edtwin.cxx | 47 | ||||
-rw-r--r-- | sw/source/ui/uno/unotxdoc.cxx | 6 |
2 files changed, 48 insertions, 5 deletions
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 29e93b55690e..736ea43f6b19 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -191,15 +191,51 @@ class SwAnchorMarker SdrHdl* pHdl; Point aHdlPos; Point aLastPos; + // --> OD 2010-09-16 #i114522# + bool bTopRightHandle; + // <-- public: - SwAnchorMarker( SdrHdl* pH ) : - pHdl( pH ), aHdlPos( pH->GetPos() ), aLastPos( pH->GetPos() ) {} + SwAnchorMarker( SdrHdl* pH ) + : pHdl( pH ) + , aHdlPos( pH->GetPos() ) + , aLastPos( pH->GetPos() ) + // --> OD 2010-09-16 #i114522# + , bTopRightHandle( pH->GetKind() == HDL_ANCHOR_TR ) + // <-- + {} const Point& GetLastPos() const { return aLastPos; } void SetLastPos( const Point& rNew ) { aLastPos = rNew; } void SetPos( const Point& rNew ) { pHdl->SetPos( rNew ); } const Point& GetPos() { return pHdl->GetPos(); } const Point& GetHdlPos() { return aHdlPos; } - void ChgHdl( SdrHdl* pNew ) { pHdl = pNew; } + void ChgHdl( SdrHdl* pNew ) + { + pHdl = pNew; + // --> OD 2010-09-16 #i114522# + if ( pHdl ) + { + bTopRightHandle = (pHdl->GetKind() == HDL_ANCHOR_TR); + } + // <-- + } + // --> OD 2010-09-16 #i114522# + const Point GetPosForHitTest( const OutputDevice& rOut ) + { + Point aHitTestPos( GetPos() ); + aHitTestPos = rOut.LogicToPixel( aHitTestPos ); + if ( bTopRightHandle ) + { + aHitTestPos += Point( -1, 1 ); + } + else + { + aHitTestPos += Point( 1, 1 ); + } + aHitTestPos = rOut.PixelToLogic( aHitTestPos ); + + return aHitTestPos; + } + // <-- }; struct QuickHelpData @@ -3607,7 +3643,10 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) // So the pAnchorMarker has to find the right SdrHdl, if it's // the old one, it will find it with position aOld, if this one // is destroyed, it will find a new one at position GetHdlPos(). - Point aOld = pAnchorMarker->GetPos(); + // --> OD 2010-09-16 #i114522# +// const Point aOld = pAnchorMarker->GetPos(); + const Point aOld = pAnchorMarker->GetPosForHitTest( *(rSh.GetOut()) ); + // <-- Point aNew = rSh.FindAnchorPos( aDocPt ); SdrHdl* pHdl; if( (0!=( pHdl = pSdrView->PickHandle( aOld ) )|| diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 2bf5e645c007..20e6fbcd034d 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2694,7 +2694,11 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( { // --> TL, OD 2010-09-07 #i114210# // determine the correct page number from the renderer index - const USHORT nPage = m_pRenderData->GetPagesToPrint()[ nRenderer ]; + // --> OD 2010-10-01 #i114875 + // consider brochure print + const USHORT nPage = bPrintProspect + ? nRenderer + 1 + : m_pRenderData->GetPagesToPrint()[ nRenderer ]; // <-- // get paper tray to use ... |