diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-03-29 09:53:19 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-03-29 09:54:03 +0200 |
commit | 15cb0bbd4b4c9871f6fb2d24013fb9d4fe4a2a34 (patch) | |
tree | a57fc760467f3d05d7741f4672221cefadf1ee6a | |
parent | 0884201aa51b12e5f363d2e2c3f81da2426411ee (diff) |
fix constness compile error
-rw-r--r-- | editeng/inc/editeng/editview.hxx | 1 | ||||
-rw-r--r-- | editeng/inc/editeng/outliner.hxx | 1 | ||||
-rw-r--r-- | editeng/source/editeng/editview.cxx | 11 | ||||
-rw-r--r-- | editeng/source/outliner/outlvw.cxx | 6 |
4 files changed, 16 insertions, 3 deletions
diff --git a/editeng/inc/editeng/editview.hxx b/editeng/inc/editeng/editview.hxx index aa9864f749b3..8e034c84c83b 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 ee7edecdea1c..da3b9c28d94a 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 6d78cf53b116..36bafa09a2c5 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 26f0494361a9..23a9775601b3 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); |