editeng/inc/editeng/editview.hxx | 1 + editeng/inc/editeng/outliner.hxx | 1 + editeng/source/editeng/editview.cxx | 11 ++++++++--- editeng/source/outliner/outlvw.cxx | 6 ++++++ 4 files changed, 16 insertions(+), 3 deletions(-)
New commits: commit 15cb0bbd4b4c9871f6fb2d24013fb9d4fe4a2a34 Author: LuboÅ¡ LuÅák <[email protected]> Date: Thu Mar 29 09:53:19 2012 +0200 fix constness compile error diff --git a/editeng/inc/editeng/editview.hxx b/editeng/inc/editeng/editview.hxx index aa9864f..8e034c8 100644 --- a/editeng/inc/editeng/editview.hxx +++ b/editeng/inc/editeng/editview.hxx @@ -184,6 +184,7 @@ public: void ForceUpdate(); const SfxStyleSheet* GetStyleSheet() const; + SfxStyleSheet* GetStyleSheet(); void SetAnchorMode( EVAnchorMode eMode ); EVAnchorMode GetAnchorMode() const; diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx index ee7edec..da3b9c2 100644 --- a/editeng/inc/editeng/outliner.hxx +++ b/editeng/inc/editeng/outliner.hxx @@ -309,6 +309,7 @@ public: void PasteSpecial(); const SfxStyleSheet* GetStyleSheet() const; + SfxStyleSheet* GetStyleSheet(); void SetControlWord( sal_uLong nWord ); sal_uLong GetControlWord() const; diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 6d78cf5..36bafa0 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -730,7 +730,7 @@ void EditView::ForceUpdate() PIMPEE->SetUpdateMode( sal_True, this, sal_True ); } -const SfxStyleSheet* EditView::GetStyleSheet() const +SfxStyleSheet* EditView::GetStyleSheet() { DBG_CHKTHIS( EditView, 0 ); DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 ); @@ -741,10 +741,10 @@ const SfxStyleSheet* EditView::GetStyleSheet() const sal_uInt16 nStartPara = PIMPEE->GetEditDoc().GetPos( aSel.Min().GetNode() ); sal_uInt16 nEndPara = PIMPEE->GetEditDoc().GetPos( aSel.Max().GetNode() ); - const SfxStyleSheet* pStyle = NULL; + SfxStyleSheet* pStyle = NULL; for ( sal_uInt16 n = nStartPara; n <= nEndPara; n++ ) { - const SfxStyleSheet* pTmpStyle = PIMPEE->GetStyleSheet( n ); + SfxStyleSheet* pTmpStyle = PIMPEE->GetStyleSheet( n ); if ( ( n != nStartPara ) && ( pStyle != pTmpStyle ) ) return NULL; // Not unique. pStyle = pTmpStyle; @@ -752,6 +752,11 @@ const SfxStyleSheet* EditView::GetStyleSheet() const return pStyle; } +const SfxStyleSheet* EditView::GetStyleSheet() const +{ + return const_cast< EditView* >( this )->GetStyleSheet(); +} + sal_Bool EditView::IsInsertMode() const { DBG_CHKTHIS( EditView, 0 ); diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index 26f0494..23a9775 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -786,6 +786,12 @@ const SfxStyleSheet* OutlinerView::GetStyleSheet() const return pEditView->GetStyleSheet(); } +SfxStyleSheet* OutlinerView::GetStyleSheet() +{ + DBG_CHKTHIS(OutlinerView,0); + return pEditView->GetStyleSheet(); +} + Pointer OutlinerView::GetPointer( const Point& rPosPixel ) { DBG_CHKTHIS(OutlinerView,0);
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
