Kaydet (Commit) e8d3dfd9 authored tarafından Caolán McNamara's avatar Caolán McNamara

Revert "merge these two selection changing hunks of code"

This reverts commit bef9cc01.
üst 78a5c5dc
...@@ -49,28 +49,6 @@ ...@@ -49,28 +49,6 @@
#include <boost/scoped_ptr.hpp> #include <boost/scoped_ptr.hpp>
#include <swuiexp.hxx> #include <swuiexp.hxx>
void SwFldEditDlg::EnsureSelection(SwField *pCurFld)
{
if (pSh->CrsrInsideInputFld())
{
// move cursor to start of Input Field
SwInputField* pInputFld = dynamic_cast<SwInputField*>(pCurFld);
if (pInputFld && pInputFld->GetFmtFld())
{
pSh->GotoField( *(pInputFld->GetFmtFld()) );
}
}
/* Only create selection if there is none already.
Normalize PaM instead of swapping. */
if (!pSh->HasSelection())
{
//Note that after this, it is possible that rMgr.GetCurFld() != pCurFld
pSh->Right(CRSR_SKIP_CHARS, true, 1, false );
}
pSh->NormalizePam();
}
SwFldEditDlg::SwFldEditDlg(SwView& rVw) SwFldEditDlg::SwFldEditDlg(SwView& rVw)
: SfxSingleTabDialog(&rVw.GetViewFrame()->GetWindow(), 0, : SfxSingleTabDialog(&rVw.GetViewFrame()->GetWindow(), 0,
...@@ -84,12 +62,28 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) ...@@ -84,12 +62,28 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw)
SwFldMgr aMgr(pSh); SwFldMgr aMgr(pSh);
SwField *pCurFld = aMgr.GetCurFld(); SwField *pCurFld = aMgr.GetCurFld();
if (!pCurFld) if(!pCurFld)
return; return;
SwViewShell::SetCareWin(this); SwViewShell::SetCareWin(this);
EnsureSelection(pCurFld); if ( pSh->CrsrInsideInputFld() )
{
// move cursor to start of Input Field
SwInputField* pInputFld = dynamic_cast<SwInputField*>(pCurFld);
if ( pInputFld != NULL
&& pInputFld->GetFmtFld() != NULL )
{
pSh->GotoField( *(pInputFld->GetFmtFld()) );
}
}
if ( ! pSh->HasSelection() )
{
pSh->Right(CRSR_SKIP_CHARS, true, 1, false);
}
pSh->NormalizePam();
sal_uInt16 nGroup = aMgr.GetGroup(false, pCurFld->GetTypeId(), pCurFld->GetSubType()); sal_uInt16 nGroup = aMgr.GetGroup(false, pCurFld->GetTypeId(), pCurFld->GetSubType());
...@@ -260,7 +254,12 @@ IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton ) ...@@ -260,7 +254,12 @@ IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton )
rMgr.GoNextPrev( bNext, pOldTyp ); rMgr.GoNextPrev( bNext, pOldTyp );
pCurFld = rMgr.GetCurFld(); pCurFld = rMgr.GetCurFld();
EnsureSelection(pCurFld); /* #108536# Only create selection if there is none
already. Normalize PaM instead of swapping. */
if ( ! pSh->HasSelection() )
pSh->Right(CRSR_SKIP_CHARS, true, 1, false );
pSh->NormalizePam();
sal_uInt16 nGroup = rMgr.GetGroup(false, pCurFld->GetTypeId(), pCurFld->GetSubType()); sal_uInt16 nGroup = rMgr.GetGroup(false, pCurFld->GetTypeId(), pCurFld->GetSubType());
......
...@@ -37,10 +37,9 @@ class SwFldEditDlg : public SfxSingleTabDialog ...@@ -37,10 +37,9 @@ class SwFldEditDlg : public SfxSingleTabDialog
void Init(); void Init();
SfxTabPage* CreatePage(sal_uInt16 nGroup); SfxTabPage* CreatePage(sal_uInt16 nGroup);
void EnsureSelection(SwField *pCurFld);
public: public:
SwFldEditDlg(SwView& rVw); SwFldEditDlg(SwView& rVw);
virtual ~SwFldEditDlg(); virtual ~SwFldEditDlg();
DECL_LINK(OKHdl, void *); DECL_LINK(OKHdl, void *);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment