[Libreoffice-commits] core.git: 4 commits - sw/inc sw/source
Caolán McNamara
caolanm at redhat.com
Thu Sep 10 06:15:37 PDT 2015
sw/inc/fesh.hxx | 13 ++-
sw/source/core/access/accframebase.cxx | 2
sw/source/core/access/accmap.cxx | 2
sw/source/core/access/accselectionhelper.cxx | 10 +-
sw/source/core/frmedt/fefly1.cxx | 96 ++++++++++-----------------
sw/source/uibase/app/docst.cxx | 8 +-
sw/source/uibase/ribbar/drawbase.cxx | 2
sw/source/uibase/shells/basesh.cxx | 2
sw/source/uibase/shells/frmsh.cxx | 8 +-
sw/source/uibase/shells/grfsh.cxx | 2
sw/source/uibase/wrtsh/wrtsh1.cxx | 2
11 files changed, 66 insertions(+), 81 deletions(-)
New commits:
commit 4e6194fe8357efc5afa8d094e209ea94335b5923
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Sep 10 13:49:32 2015 +0100
GetCurFrameFormat->GetSelectedFrameFormat
Change-Id: I2f1eb4567b6e073991d95dbcecdc79b24010f2c1
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 89ce3d6..317b2f8 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -391,7 +391,7 @@ public:
- add output parameter <bVertL2R> */
bool IsFrmVertical(const bool bEnvironment, bool& bRightToLeft, bool& bVertL2R) const;
- SwFrameFormat* GetCurFrameFormat() const; ///< If frame then frame style, else 0.
+ SwFrameFormat* GetSelectedFrameFormat() const; ///< If frame then frame style, else 0.
void SetFrameFormat( SwFrameFormat *pFormat, bool bKeepOrient = false, Point* pDocPos = 0 ); ///< If frame then set frame style.
// Get selected fly
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 1f4f421..d814cfd 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -1132,7 +1132,7 @@ bool SwFEShell::ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet )
}
// Returns frame-format if frame, otherwise 0
-SwFrameFormat* SwFEShell::GetCurFrameFormat() const
+SwFrameFormat* SwFEShell::GetSelectedFrameFormat() const
{
SwFrameFormat* pRet = 0;
SwLayoutFrm *pFly = GetSelectedFlyFrm();
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 9815b98..eb33d34 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -129,7 +129,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
// so that this family is being showed
if(pShell->IsFrmSelected())
{
- SwFrameFormat* pFormat = pShell->GetCurFrameFormat();
+ SwFrameFormat* pFormat = pShell->GetSelectedFrameFormat();
if( pFormat )
aName = pFormat->GetName();
}
@@ -195,7 +195,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
rSet.DisableItem( nWhich );
else
{
- SwFrameFormat* pFormat = pShell->GetCurFrameFormat();
+ SwFrameFormat* pFormat = pShell->GetSelectedFrameFormat();
if(pFormat && pShell->IsFrmSelected())
{
aName = pFormat->GetName();
@@ -429,7 +429,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
break;
case SFX_STYLE_FAMILY_FRAME:
{
- SwFrameFormat* pFrm = m_pWrtShell->GetCurFrameFormat();
+ SwFrameFormat* pFrm = m_pWrtShell->GetSelectedFrameFormat();
if( pFrm )
aParam = pFrm->GetName();
}
@@ -1175,7 +1175,7 @@ sal_uInt16 SwDocShell::MakeByExample( const OUString &rName, sal_uInt16 nFamily,
SfxItemSet aSet(GetPool(), aFrameFormatSetRange );
pCurrWrtShell->GetFlyFrmAttr( aSet );
- SwFrameFormat* pFFormat = pCurrWrtShell->GetCurFrameFormat();
+ SwFrameFormat* pFFormat = pCurrWrtShell->GetSelectedFrameFormat();
pFrm->SetDerivedFrom( pFFormat );
pFrm->SetFormatAttr( aSet );
diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx
index aea8dbe..90226cd 100644
--- a/sw/source/uibase/ribbar/drawbase.cxx
+++ b/sw/source/uibase/ribbar/drawbase.cxx
@@ -287,7 +287,7 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
aCol.Init(m_pWin->GetFrmColCount(), aCol.GetGutterWidth(), aCol.GetWishWidth());
aSet.Put(aCol);
// Template AutoUpdate
- SwFrameFormat* pFormat = m_pSh->GetCurFrameFormat();
+ SwFrameFormat* pFormat = m_pSh->GetSelectedFrameFormat();
if(pFormat && pFormat->IsAutoUpdateFormat())
m_pSh->AutoUpdateFrame(pFormat, aSet);
else
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index e3eec1c..66a5072 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2284,7 +2284,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
if((nsSelectionType::SEL_FRM & nSelType) || (nsSelectionType::SEL_GRF & nSelType))
{
// Template autoupdate
- SwFrameFormat* pFormat = rSh.GetCurFrameFormat();
+ SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat();
if(pFormat && pFormat->IsAutoUpdateFormat())
{
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index c6c4391..6757697 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -176,7 +176,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
aCol.Init(nCols, nGutterWidth, aCol.GetWishWidth());
aSet.Put(aCol);
// Template AutoUpdate
- SwFrameFormat* pFormat = rSh.GetCurFrameFormat();
+ SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat();
if(pFormat && pFormat->IsAutoUpdateFormat())
{
rSh.AutoUpdateFrame(pFormat, aSet);
@@ -498,7 +498,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
rSh.SetObjTitle(static_cast<const SfxStringItem*>(pItem)->GetValue());
}
// Template AutoUpdate
- SwFrameFormat* pFormat = rSh.GetCurFrameFormat();
+ SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat();
if(pFormat && pFormat->IsAutoUpdateFormat())
{
rSh.AutoUpdateFrame(pFormat, *pOutSet);
@@ -644,7 +644,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
}
if ( bUpdateMgr )
{
- SwFrameFormat* pFormat = rSh.GetCurFrameFormat();
+ SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat();
if ( bCopyToFormat && pFormat && pFormat->IsAutoUpdateFormat() )
{
rSh.AutoUpdateFrame(pFormat, aMgr.GetAttrSet());
@@ -1111,7 +1111,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
}
aFrameSet.Put( aBoxItem );
// Template AutoUpdate
- SwFrameFormat* pFormat = rSh.GetCurFrameFormat();
+ SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat();
if(pFormat && pFormat->IsAutoUpdateFormat())
{
rSh.AutoUpdateFrame(pFormat, aFrameSet);
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index 5ac6ca9..32aa477 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -380,7 +380,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
}
// Templates AutoUpdate
- SwFrameFormat* pFormat = rSh.GetCurFrameFormat();
+ SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat();
if(pFormat && pFormat->IsAutoUpdateFormat())
{
pFormat->SetFormatAttr(*pSet);
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 76d905c..2213d68 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1711,7 +1711,7 @@ OUString SwWrtShell::GetSelDescr() const
break;
case nsSelectionType::SEL_FRM:
{
- const SwFrameFormat * pFrameFormat = GetCurFrameFormat();
+ const SwFrameFormat * pFrameFormat = GetSelectedFrameFormat();
if (pFrameFormat)
aResult = pFrameFormat->GetDescription();
commit a5aab0cce45309afae81b3ec0be8ace1ca0ca17d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Sep 10 13:47:54 2015 +0100
GetSelectedFlyFrm+GetCurrFlyFrm -> GetSelectedOrCurrFlyFrm
Change-Id: I4348c4cf54dcd5504c52cf8ab550572257eef50b
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 2ae85eb..89ce3d6 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -395,10 +395,13 @@ public:
void SetFrameFormat( SwFrameFormat *pFormat, bool bKeepOrient = false, Point* pDocPos = 0 ); ///< If frame then set frame style.
// Get selected fly
- SwFlyFrm *GetSelectedFlyFrm() const;
+ SwFlyFrm* GetSelectedFlyFrm() const;
// Get current fly in which the cursor is positioned
- SwFlyFrm *GetCurrFlyFrm(const bool bCalcFrm = true) const;
+ SwFlyFrm* GetCurrFlyFrm(const bool bCalcFrm = true) const;
+
+ // Get selected fly, but if none Get current fly in which the cursor is positioned
+ SwFlyFrm* GetSelectedOrCurrFlyFrm(const bool bCalcFrm = true) const;
/// Find/delete fly containing the cursor.
SwFrameFormat* WizardGetFly();
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 59956bb..1f4f421 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -255,7 +255,7 @@ void SwFEShell::SelectFlyFrm( SwFlyFrm& rFrm, bool bNew )
}
// Get selected fly
-SwFlyFrm *SwFEShell::GetSelectedFlyFrm() const
+SwFlyFrm* SwFEShell::GetSelectedFlyFrm() const
{
if ( Imp()->HasDrawView() )
{
@@ -271,12 +271,21 @@ SwFlyFrm *SwFEShell::GetSelectedFlyFrm() const
}
// Get current fly in which the cursor is positioned
-SwFlyFrm *SwFEShell::GetCurrFlyFrm(const bool bCalcFrm) const
+SwFlyFrm* SwFEShell::GetCurrFlyFrm(const bool bCalcFrm) const
{
SwContentFrm *pContent = GetCurrFrm(bCalcFrm);
return pContent ? pContent->FindFlyFrm() : 0;
}
+// Get selected fly, but if none Get current fly in which the cursor is positioned
+SwFlyFrm* SwFEShell::GetSelectedOrCurrFlyFrm(const bool bCalcFrm) const
+{
+ SwFlyFrm *pFly = GetSelectedFlyFrm();
+ if (pFly)
+ return pFly;
+ return GetCurrFlyFrm(bCalcFrm);
+}
+
// Returns non-null pointer, if the current Fly could be anchored to another one (so it is inside)
const SwFrameFormat* SwFEShell::IsFlyInFly()
{
@@ -969,15 +978,11 @@ void SwFEShell::SetPageObjsNewPage( std::vector<SwFrameFormat*>& rFillArr, int n
// wrong place or which are ambiguous (multiple selections) will be removed.
bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const
{
- SwFlyFrm *pFly = GetSelectedFlyFrm();
+ SwFlyFrm *pFly = GetSelectedOrCurrFlyFrm();
if (!pFly)
{
- pFly = GetCurrFlyFrm();
- if (!pFly)
- {
- OSL_ENSURE( false, "GetFlyFrmAttr, no Fly selected." );
- return false;
- }
+ OSL_ENSURE( false, "GetFlyFrmAttr, no Fly selected." );
+ return false;
}
SET_CURR_SHELL( const_cast<SwViewShell*>(static_cast<SwViewShell const *>(this)) );
@@ -1021,12 +1026,8 @@ bool SwFEShell::SetFlyFrmAttr( SfxItemSet& rSet )
if( rSet.Count() )
{
- SwFlyFrm *pFly = GetSelectedFlyFrm();
- if( !pFly )
- {
- pFly = GetCurrFlyFrm();
- OSL_ENSURE( pFly, "SetFlyFrmAttr, no Fly selected." );
- }
+ SwFlyFrm *pFly = GetSelectedOrCurrFlyFrm();
+ OSL_ENSURE( pFly, "SetFlyFrmAttr, no Fly selected." );
if( pFly )
{
StartAllAction();
@@ -1100,13 +1101,8 @@ bool SwFEShell::ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet )
{
SET_CURR_SHELL( this );
- SwFlyFrm *pFly = GetSelectedFlyFrm();
- if( !pFly )
- {
- pFly = GetCurrFlyFrm();
- OSL_ENSURE( pFly, "SetFlyFrmAttr, no Fly selected." );
- }
-
+ SwFlyFrm *pFly = GetSelectedOrCurrFlyFrm();
+ OSL_ENSURE( pFly, "SetFlyFrmAttr, no Fly selected." );
if( pFly )
{
StartAllAction();
@@ -1193,9 +1189,7 @@ void SwFEShell::SetFrameFormat( SwFrameFormat *pNewFormat, bool bKeepOrient, Poi
const SwFrameFormat* SwFEShell::GetFlyFrameFormat() const
{
- const SwFlyFrm* pFly = GetSelectedFlyFrm();
- if (!pFly)
- pFly = GetCurrFlyFrm();
+ const SwFlyFrm* pFly = GetSelectedOrCurrFlyFrm();
if (pFly)
return pFly->GetFormat();
return 0;
@@ -1203,9 +1197,7 @@ const SwFrameFormat* SwFEShell::GetFlyFrameFormat() const
SwFrameFormat* SwFEShell::GetFlyFrameFormat()
{
- SwFlyFrm* pFly = GetSelectedFlyFrm();
- if (!pFly)
- pFly = GetCurrFlyFrm();
+ SwFlyFrm* pFly = GetSelectedOrCurrFlyFrm();
if (pFly)
return pFly->GetFormat();
return 0;
commit 7473aacc73f8572e20f6f2a3a1d10001c5cc477d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Sep 10 13:36:40 2015 +0100
bundle duplicate pattern into a GetCurrFlyFrm method
Change-Id: Ib12b825ef9cc6e2b57e9320d435e3863d319cf0f
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 88bf72a..2ae85eb 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -393,8 +393,13 @@ public:
SwFrameFormat* GetCurFrameFormat() const; ///< If frame then frame style, else 0.
void SetFrameFormat( SwFrameFormat *pFormat, bool bKeepOrient = false, Point* pDocPos = 0 ); ///< If frame then set frame style.
+
+ // Get selected fly
SwFlyFrm *GetSelectedFlyFrm() const;
+ // Get current fly in which the cursor is positioned
+ SwFlyFrm *GetCurrFlyFrm(const bool bCalcFrm = true) const;
+
/// Find/delete fly containing the cursor.
SwFrameFormat* WizardGetFly();
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index defb909..59956bb 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -254,7 +254,7 @@ void SwFEShell::SelectFlyFrm( SwFlyFrm& rFrm, bool bNew )
}
}
-// returns a Fly if one is selected
+// Get selected fly
SwFlyFrm *SwFEShell::GetSelectedFlyFrm() const
{
if ( Imp()->HasDrawView() )
@@ -270,6 +270,13 @@ SwFlyFrm *SwFEShell::GetSelectedFlyFrm() const
return 0;
}
+// Get current fly in which the cursor is positioned
+SwFlyFrm *SwFEShell::GetCurrFlyFrm(const bool bCalcFrm) const
+{
+ SwContentFrm *pContent = GetCurrFrm(bCalcFrm);
+ return pContent ? pContent->FindFlyFrm() : 0;
+}
+
// Returns non-null pointer, if the current Fly could be anchored to another one (so it is inside)
const SwFrameFormat* SwFEShell::IsFlyInFly()
{
@@ -281,11 +288,8 @@ const SwFrameFormat* SwFEShell::IsFlyInFly()
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
if ( !rMrkList.GetMarkCount() )
{
- SwContentFrm *pContent = GetCurrFrm( false );
- if( !pContent )
- return NULL;
- SwFlyFrm *pFly = pContent->FindFlyFrm();
- if ( !pFly )
+ SwFlyFrm *pFly = GetCurrFlyFrm(false);
+ if (!pFly)
return NULL;
return pFly->GetFormat();
}
@@ -332,11 +336,8 @@ void SwFEShell::SetFlyPos( const Point& rAbsPos )
SET_CURR_SHELL( this );
// Determine reference point in document coordinates
- SwContentFrm *pContent = GetCurrFrm( false );
- if( !pContent )
- return;
- SwFlyFrm *pFly = pContent->FindFlyFrm();
- if ( !pFly )
+ SwFlyFrm *pFly = GetCurrFlyFrm(false);
+ if (!pFly)
return;
//SwSaveHdl aSaveX( Imp() );
@@ -969,16 +970,10 @@ void SwFEShell::SetPageObjsNewPage( std::vector<SwFrameFormat*>& rFillArr, int n
bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const
{
SwFlyFrm *pFly = GetSelectedFlyFrm();
- if ( !pFly )
+ if (!pFly)
{
- SwFrm* pCurrFrm( GetCurrFrm() );
- if ( !pCurrFrm )
- {
- OSL_FAIL( "<SwFEShell::GetFlyFrmAttr(..)> - missing current frame. This is a serious defect, please inform OD." );
- return false;
- }
- pFly = GetCurrFrm()->FindFlyFrm();
- if ( !pFly )
+ pFly = GetCurrFlyFrm();
+ if (!pFly)
{
OSL_ENSURE( false, "GetFlyFrmAttr, no Fly selected." );
return false;
@@ -1029,8 +1024,7 @@ bool SwFEShell::SetFlyFrmAttr( SfxItemSet& rSet )
SwFlyFrm *pFly = GetSelectedFlyFrm();
if( !pFly )
{
- OSL_ENSURE( GetCurrFrm(), "Crsr in parking zone" );
- pFly = GetCurrFrm()->FindFlyFrm();
+ pFly = GetCurrFlyFrm();
OSL_ENSURE( pFly, "SetFlyFrmAttr, no Fly selected." );
}
if( pFly )
@@ -1109,8 +1103,7 @@ bool SwFEShell::ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet )
SwFlyFrm *pFly = GetSelectedFlyFrm();
if( !pFly )
{
- OSL_ENSURE( GetCurrFrm(), "Crsr in parking zone" );
- pFly = GetCurrFrm()->FindFlyFrm();
+ pFly = GetCurrFlyFrm();
OSL_ENSURE( pFly, "SetFlyFrmAttr, no Fly selected." );
}
@@ -1201,12 +1194,9 @@ void SwFEShell::SetFrameFormat( SwFrameFormat *pNewFormat, bool bKeepOrient, Poi
const SwFrameFormat* SwFEShell::GetFlyFrameFormat() const
{
const SwFlyFrm* pFly = GetSelectedFlyFrm();
- if ( !pFly )
- {
- SwFrm* pCurrFrm = GetCurrFrm();
- pFly = pCurrFrm ? pCurrFrm->FindFlyFrm() : 0;
- }
- if( pFly )
+ if (!pFly)
+ pFly = GetCurrFlyFrm();
+ if (pFly)
return pFly->GetFormat();
return 0;
}
@@ -1214,21 +1204,17 @@ const SwFrameFormat* SwFEShell::GetFlyFrameFormat() const
SwFrameFormat* SwFEShell::GetFlyFrameFormat()
{
SwFlyFrm* pFly = GetSelectedFlyFrm();
- if ( !pFly )
- {
- SwFrm* pCurrFrm = GetCurrFrm();
- pFly = pCurrFrm ? pCurrFrm->FindFlyFrm() : 0;
- }
- if( pFly )
+ if (!pFly)
+ pFly = GetCurrFlyFrm();
+ if (pFly)
return pFly->GetFormat();
return 0;
}
SwRect SwFEShell::GetFlyRect() const
{
- SwContentFrm *pContent = GetCurrFrm( false );
- SwFlyFrm *pFly = pContent ? pContent->FindFlyFrm() : 0;
- if ( !pFly )
+ SwFlyFrm *pFly = GetCurrFlyFrm(false);
+ if (!pFly)
{
SwRect aRect;
return aRect;
commit 8df51f799bb830db52c7be2d04b575b0443b76ec
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Sep 10 13:22:43 2015 +0100
GetCurrFlyFrm just forwards to GetSelectedFlyFrm
Change-Id: Ia0b83a3aad71a72ae2135c5d7f6ddb6d9644b10b
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 7109a32..88bf72a 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -207,7 +207,6 @@ private:
std::unique_ptr<SdrDropMarkerOverlay> m_pChainFrom;
bool m_bCheckForOLEInCaption;
- SAL_DLLPRIVATE SwFlyFrm *GetSelectedFlyFrm() const;
SAL_DLLPRIVATE SwFlyFrm *FindFlyFrm( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ) const;
/// Terminate actions for all shells and call ChangeLink.
@@ -394,7 +393,7 @@ public:
SwFrameFormat* GetCurFrameFormat() const; ///< If frame then frame style, else 0.
void SetFrameFormat( SwFrameFormat *pFormat, bool bKeepOrient = false, Point* pDocPos = 0 ); ///< If frame then set frame style.
- const SwFlyFrm *GetCurrFlyFrm() const { return GetSelectedFlyFrm(); }
+ SwFlyFrm *GetSelectedFlyFrm() const;
/// Find/delete fly containing the cursor.
SwFrameFormat* WizardGetFly();
diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx
index bfffd2d..bfe07b4 100644
--- a/sw/source/core/access/accframebase.cxx
+++ b/sw/source/core/access/accframebase.cxx
@@ -53,7 +53,7 @@ bool SwAccessibleFrameBase::IsSelected()
if( pVSh->ISA( SwFEShell ) )
{
const SwFEShell *pFESh = static_cast< const SwFEShell * >( pVSh );
- const SwFrm *pFlyFrm = pFESh->GetCurrFlyFrm();
+ const SwFrm *pFlyFrm = pFESh->GetSelectedFlyFrm();
if( pFlyFrm == GetFrm() )
bRet = true;
}
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 39a1c58..dbfa78d 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -2597,7 +2597,7 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm )
else if( pVSh->ISA( SwFEShell ) )
{
const SwFEShell *pFESh = static_cast< const SwFEShell * >( pVSh );
- const SwFrm *pFlyFrm = pFESh->GetCurrFlyFrm();
+ const SwFrm *pFlyFrm = pFESh->GetSelectedFlyFrm();
if( pFlyFrm )
{
OSL_ENSURE( !pFrm || pFrm->FindFlyFrm() == pFlyFrm,
diff --git a/sw/source/core/access/accselectionhelper.cxx b/sw/source/core/access/accselectionhelper.cxx
index 1a95cd8..6e6c7b6 100644
--- a/sw/source/core/access/accselectionhelper.cxx
+++ b/sw/source/core/access/accselectionhelper.cxx
@@ -156,12 +156,12 @@ bool SwAccessibleSelectionHelper::isAccessibleChildSelected(
// ... and compare to the currently selected frame
bool bRet = false;
- SwFEShell* pFEShell = GetFEShell();
+ const SwFEShell* pFEShell = GetFEShell();
if( pFEShell )
{
if ( aChild.GetSwFrm() != 0 )
{
- bRet = (pFEShell->GetCurrFlyFrm() == aChild.GetSwFrm());
+ bRet = (pFEShell->GetSelectedFlyFrm() == aChild.GetSwFrm());
}
else if ( aChild.GetDrawObject() )
{
@@ -218,10 +218,10 @@ sal_Int32 SwAccessibleSelectionHelper::getSelectedAccessibleChildCount( )
sal_Int32 nCount = 0;
// Only one frame can be selected at a time, and we only frames
// for selectable children.
- SwFEShell* pFEShell = GetFEShell();
+ const SwFEShell* pFEShell = GetFEShell();
if( pFEShell != 0 )
{
- const SwFlyFrm* pFlyFrm = pFEShell->GetCurrFlyFrm();
+ const SwFlyFrm* pFlyFrm = pFEShell->GetSelectedFlyFrm();
if( pFlyFrm )
{
nCount = 1;
@@ -290,7 +290,7 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild(
throwIndexOutOfBoundsException();
SwAccessibleChild aChild;
- const SwFlyFrm *pFlyFrm = pFEShell->GetCurrFlyFrm();
+ const SwFlyFrm *pFlyFrm = pFEShell->GetSelectedFlyFrm();
if( pFlyFrm )
{
if( 0 == nSelectedChildIndex )
More information about the Libreoffice-commits
mailing list