This is an automated email from the ASF dual-hosted git repository. mseidel pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push: new 372e31e892 Maintenance cleanup 372e31e892 is described below commit 372e31e89293e47e50e18ac4e33b09a09d178637 Author: mseidel <msei...@apache.org> AuthorDate: Mon Feb 5 01:09:33 2024 +0100 Maintenance cleanup --- main/sw/source/ui/ribbar/conarc.cxx | 59 ++++++-------------- main/sw/source/ui/ribbar/concustomshape.cxx | 53 +++++++----------- main/sw/source/ui/ribbar/conform.cxx | 83 ++++++++++++----------------- main/sw/source/ui/ribbar/conpoly.cxx | 38 +++---------- main/sw/source/ui/ribbar/conrect.cxx | 81 ++++++++++++---------------- 5 files changed, 113 insertions(+), 201 deletions(-) diff --git a/main/sw/source/ui/ribbar/conarc.cxx b/main/sw/source/ui/ribbar/conarc.cxx index 1cea4a0cbb..9aaa34a85d 100644 --- a/main/sw/source/ui/ribbar/conarc.cxx +++ b/main/sw/source/ui/ribbar/conarc.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,56 +7,42 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ - - // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include <svx/svdobj.hxx> - #include "view.hxx" #include "edtwin.hxx" #include "wrtsh.hxx" #include "drawbase.hxx" #include "conarc.hxx" - - /************************************************************************* -|* -|* Konstruktor -|* +|* C'Tor \************************************************************************/ - - ConstArc::ConstArc(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) : SwDrawBase(pWrtShell, pEditWin, pSwView), nAnzButUp(0) { } /************************************************************************* -|* |* MouseButtonDown-event -|* \************************************************************************/ - - sal_Bool ConstArc::MouseButtonDown( const MouseEvent& rMEvt ) { sal_Bool bReturn; @@ -64,26 +50,22 @@ sal_Bool ConstArc::MouseButtonDown( const MouseEvent& rMEvt ) if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True) { if (!nAnzButUp) - aStartPnt = m_pWin->PixelToLogic(rMEvt.GetPosPixel()); + aStartPnt = m_pWin->PixelToLogic(rMEvt.GetPosPixel()); } return (bReturn); } /************************************************************************* -|* |* MouseButtonUp-event -|* \************************************************************************/ - - sal_Bool ConstArc::MouseButtonUp( const MouseEvent& rMEvt ) { sal_Bool bReturn = sal_False; - if ((m_pSh->IsDrawCreate() || m_pWin->IsDrawAction()) && rMEvt.IsLeft()) + if ((m_pSh->IsDrawCreate() || m_pWin->IsDrawAction()) && rMEvt.IsLeft()) { - Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel())); + Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel())); if (!nAnzButUp && aPnt == aStartPnt) { SwDrawBase::MouseButtonUp(rMEvt); @@ -92,14 +74,14 @@ sal_Bool ConstArc::MouseButtonUp( const MouseEvent& rMEvt ) else { nAnzButUp++; - if (nAnzButUp == 3) // Kreisbogenerzeugung beendet + if (nAnzButUp == 3) // Arc generation completed { SwDrawBase::MouseButtonUp(rMEvt); nAnzButUp = 0; bReturn = sal_True; } else - m_pSh->EndCreate(SDRCREATE_NEXTPOINT); + m_pSh->EndCreate(SDRCREATE_NEXTPOINT); } } /* else if ( pView->IsCreateObj() && rMEvt.IsRight() ) @@ -112,28 +94,24 @@ sal_Bool ConstArc::MouseButtonUp( const MouseEvent& rMEvt ) } /************************************************************************* -|* -|* Function aktivieren -|* +|* activate function \************************************************************************/ - - void ConstArc::Activate(const sal_uInt16 nSlotId) { switch (nSlotId) { case SID_DRAW_ARC: - m_pWin->SetSdrDrawMode(OBJ_CARC); + m_pWin->SetSdrDrawMode(OBJ_CARC); break; case SID_DRAW_PIE: - m_pWin->SetSdrDrawMode(OBJ_SECT); + m_pWin->SetSdrDrawMode(OBJ_SECT); break; case SID_DRAW_CIRCLECUT: - m_pWin->SetSdrDrawMode(OBJ_CCUT); + m_pWin->SetSdrDrawMode(OBJ_CCUT); break; default: - m_pWin->SetSdrDrawMode(OBJ_NONE); + m_pWin->SetSdrDrawMode(OBJ_NONE); break; } @@ -141,9 +119,7 @@ void ConstArc::Activate(const sal_uInt16 nSlotId) } /************************************************************************* -|* -|* Funktion deaktivieren -|* +|* deactivate function \************************************************************************/ void ConstArc::Deactivate() @@ -153,5 +129,4 @@ void ConstArc::Deactivate() SwDrawBase::Deactivate(); } - - +/* vim: set noet sw=4 ts=4: */ diff --git a/main/sw/source/ui/ribbar/concustomshape.cxx b/main/sw/source/ui/ribbar/concustomshape.cxx index 0dde50ae85..6f279afdad 100644 --- a/main/sw/source/ui/ribbar/concustomshape.cxx +++ b/main/sw/source/ui/ribbar/concustomshape.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,24 +7,21 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ - - // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include <sfx2/bindings.hxx> #include <svx/htmlmode.hxx> #include <svx/sdtacitm.hxx> @@ -62,9 +59,7 @@ #include <math.h> /************************************************************************* -|* |* C'Tor -|* \************************************************************************/ ConstCustomShape::ConstCustomShape( SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView, SfxRequest& rReq ) : SwDrawBase( pWrtShell, pEditWin, pSwView ) @@ -78,26 +73,24 @@ ConstCustomShape::ConstCustomShape( SwWrtShell* pWrtShell, SwEditWin* pEditWin, rtl::OUString ConstCustomShape::GetShapeType() const { - return aCustomShape; + return aCustomShape; } -//static +// static rtl::OUString ConstCustomShape::GetShapeTypeFromRequest( SfxRequest& rReq ) { - rtl::OUString aRet; - const SfxItemSet* pArgs = rReq.GetArgs(); + rtl::OUString aRet; + const SfxItemSet* pArgs = rReq.GetArgs(); if ( pArgs ) { const SfxStringItem& rItm = (const SfxStringItem&)pArgs->Get( rReq.GetSlot() ); aRet = rItm.GetValue(); } - return aRet; + return aRet; } /************************************************************************* -|* |* MouseButtonDown-event -|* \************************************************************************/ sal_Bool ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) @@ -105,7 +98,7 @@ sal_Bool ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) sal_Bool bReturn = SwDrawBase::MouseButtonDown(rMEvt); if ( bReturn ) { - SdrView *pSdrView = m_pSh->GetDrawView(); + SdrView *pSdrView = m_pSh->GetDrawView(); if ( pSdrView ) { SdrObject* pObj = pSdrView->GetCreateObj(); @@ -120,7 +113,7 @@ sal_Bool ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) bForceNoFillStyle = sal_True; } - SfxItemSet aAttr( m_pView->GetPool() ); + SfxItemSet aAttr( m_pView->GetPool() ); if ( bForceNoFillStyle ) aAttr.Put( XFillStyleItem( XFILL_NONE ) ); pObj->SetMergedItemSet(aAttr); @@ -131,9 +124,7 @@ sal_Bool ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) } /************************************************************************* -|* |* MouseButtonUp-event -|* \************************************************************************/ sal_Bool ConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt) @@ -142,22 +133,18 @@ sal_Bool ConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt) } /************************************************************************* -|* |* activate function -|* \************************************************************************/ void ConstCustomShape::Activate(const sal_uInt16 nSlotId) { - m_pWin->SetSdrDrawMode( OBJ_CUSTOMSHAPE ); + m_pWin->SetSdrDrawMode( OBJ_CUSTOMSHAPE ); SwDrawBase::Activate(nSlotId); } /************************************************************************* -|* |* applying attributes -|* \************************************************************************/ void ConstCustomShape::SetAttributes( SdrObject* pObj ) @@ -183,7 +170,7 @@ void ConstCustomShape::SetAttributes( SdrObject* pObj ) if( pSourceObj ) { const SfxItemSet& rSource = pSourceObj->GetMergedItemSet(); - SfxItemSet aDest( pObj->GetModel()->GetItemPool(), // ranges from SdrAttrObj + SfxItemSet aDest( pObj->GetModel()->GetItemPool(), // ranges from SdrAttrObj SDRATTR_START, SDRATTR_SHADOW_LAST, SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST, SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION, @@ -215,7 +202,7 @@ void ConstCustomShape::SetAttributes( SdrObject* pObj ) } if ( !bAttributesAppliedFromGallery ) { - pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER, RES_PARATR_ADJUST ) ); + pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER, RES_PARATR_ADJUST ) ); pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) ); pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) ); pObj->SetMergedItem( SdrTextAutoGrowHeightItem( sal_False ) ); @@ -226,16 +213,16 @@ void ConstCustomShape::SetAttributes( SdrObject* pObj ) void ConstCustomShape::CreateDefaultObject() { SwDrawBase::CreateDefaultObject(); - SdrView *pSdrView = m_pSh->GetDrawView(); + SdrView *pSdrView = m_pSh->GetDrawView(); if ( pSdrView ) { - const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList(); - if ( rMarkList.GetMarkCount() == 1 ) - { + const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList(); + if ( rMarkList.GetMarkCount() == 1 ) + { SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); if ( pObj && pObj->ISA( SdrObjCustomShape ) ) SetAttributes( pObj ); - } + } } } @@ -245,4 +232,4 @@ bool ConstCustomShape::doConstructOrthogonal() const return SdrObjCustomShape::doConstructOrthogonal(aCustomShape); } -// eof +/* vim: set noet sw=4 ts=4: */ diff --git a/main/sw/source/ui/ribbar/conform.cxx b/main/sw/source/ui/ribbar/conform.cxx index f3846ab9af..1bdad660bc 100644 --- a/main/sw/source/ui/ribbar/conform.cxx +++ b/main/sw/source/ui/ribbar/conform.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,24 +7,21 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ - - // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include <svx/fmglob.hxx> #include <svx/svdview.hxx> #include <svx/fmshell.hxx> @@ -35,33 +32,27 @@ #include "drawbase.hxx" #include "conform.hxx" -extern sal_Bool bNoInterrupt; // in mainwn.cxx +extern sal_Bool bNoInterrupt; // in mainwn.cxx /************************************************************************* -|* -|* Konstruktor -|* +|* C'Tor \************************************************************************/ - ConstFormControl::ConstFormControl(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) : SwDrawBase(pWrtShell, pEditWin, pSwView) { - m_bInsForm = sal_True; + m_bInsForm = sal_True; } /************************************************************************* -|* |* MouseButtonDown-event -|* \************************************************************************/ - sal_Bool ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt) { sal_Bool bReturn = sal_False; - SdrView *pSdrView = m_pSh->GetDrawView(); + SdrView *pSdrView = m_pSh->GetDrawView(); pSdrView->SetOrtho(rMEvt.IsShift()); pSdrView->SetAngleSnapEnabled(rMEvt.IsShift()); @@ -81,19 +72,19 @@ sal_Bool ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt) SdrHitKind eHit = pSdrView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); // Nur neues Objekt, wenn nicht im Basismode (bzw reinem Selektionsmode) - if (rMEvt.IsLeft() && !m_pWin->IsDrawAction() && - (eHit == SDRHIT_UNMARKEDOBJECT || eHit == SDRHIT_NONE || m_pSh->IsDrawCreate())) + if (rMEvt.IsLeft() && !m_pWin->IsDrawAction() && + (eHit == SDRHIT_UNMARKEDOBJECT || eHit == SDRHIT_NONE || m_pSh->IsDrawCreate())) { bNoInterrupt = sal_True; - m_pWin->CaptureMouse(); + m_pWin->CaptureMouse(); - m_pWin->SetPointer(Pointer(POINTER_DRAW_RECT)); + m_pWin->SetPointer(Pointer(POINTER_DRAW_RECT)); - m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel()); - bReturn = m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, m_aStartPos); + m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel()); + bReturn = m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, m_aStartPos); if (bReturn) - m_pWin->SetDrawAction(sal_True); + m_pWin->SetDrawAction(sal_True); } else bReturn = SwDrawBase::MouseButtonDown(rMEvt); @@ -102,39 +93,35 @@ sal_Bool ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt) } /************************************************************************* -|* -|* Function aktivieren -|* +|* activate function \************************************************************************/ - void ConstFormControl::Activate(const sal_uInt16 nSlotId) { - m_pWin->SetSdrDrawMode( static_cast<SdrObjKind>(nSlotId) ); + m_pWin->SetSdrDrawMode( static_cast<SdrObjKind>(nSlotId) ); SwDrawBase::Activate(nSlotId); - m_pSh->GetDrawView()->SetCurrentObj(nSlotId); + m_pSh->GetDrawView()->SetCurrentObj(nSlotId); - m_pWin->SetPointer(Pointer(POINTER_DRAW_RECT)); + m_pWin->SetPointer(Pointer(POINTER_DRAW_RECT)); } -/* -----------------------------19.04.2002 12:42------------------------------ - ---------------------------------------------------------------------------*/ void ConstFormControl::CreateDefaultObject() { - Point aStartPos(GetDefaultCenterPos()); - Point aEndPos(aStartPos); - aStartPos.X() -= 2 * MM50; - aStartPos.Y() -= MM50; - aEndPos.X() += 2 * MM50; - aEndPos.Y() += MM50; - - if(!m_pSh->HasDrawView()) - m_pSh->MakeDrawView(); - - SdrView *pSdrView = m_pSh->GetDrawView(); - pSdrView->SetDesignMode(sal_True); - m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, aStartPos); - m_pSh->MoveCreate(aEndPos); - m_pSh->EndCreate(SDRCREATE_FORCEEND); + Point aStartPos(GetDefaultCenterPos()); + Point aEndPos(aStartPos); + aStartPos.X() -= 2 * MM50; + aStartPos.Y() -= MM50; + aEndPos.X() += 2 * MM50; + aEndPos.Y() += MM50; + + if(!m_pSh->HasDrawView()) + m_pSh->MakeDrawView(); + + SdrView *pSdrView = m_pSh->GetDrawView(); + pSdrView->SetDesignMode(sal_True); + m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, aStartPos); + m_pSh->MoveCreate(aEndPos); + m_pSh->EndCreate(SDRCREATE_FORCEEND); } +/* vim: set noet sw=4 ts=4: */ diff --git a/main/sw/source/ui/ribbar/conpoly.cxx b/main/sw/source/ui/ribbar/conpoly.cxx index 875b284473..67fe8c85d0 100644 --- a/main/sw/source/ui/ribbar/conpoly.cxx +++ b/main/sw/source/ui/ribbar/conpoly.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,24 +7,21 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ - - // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include <svx/svdmark.hxx> #include <svx/svdview.hxx> #include <svx/svdopath.hxx> @@ -37,26 +34,18 @@ #include <basegfx/polygon/b2dpolygon.hxx> /************************************************************************* -|* -|* Konstruktor -|* +|* C'Tor \************************************************************************/ - - ConstPolygon::ConstPolygon(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) : SwDrawBase(pWrtShell, pEditWin, pSwView) { } /************************************************************************* -|* |* MouseButtonDown-event -|* \************************************************************************/ - - sal_Bool ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt) { sal_Bool bReturn; @@ -68,13 +57,9 @@ sal_Bool ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt) } /************************************************************************* -|* |* MouseMove-event -|* \************************************************************************/ - - sal_Bool ConstPolygon::MouseMove(const MouseEvent& rMEvt) { sal_Bool bReturn = sal_False; @@ -85,13 +70,9 @@ sal_Bool ConstPolygon::MouseMove(const MouseEvent& rMEvt) } /************************************************************************* -|* |* MouseButtonUp-event -|* \************************************************************************/ - - sal_Bool ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) { sal_Bool bReturn = sal_False; @@ -125,13 +106,9 @@ sal_Bool ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) } /************************************************************************* -|* -|* Function aktivieren -|* +|* activate function \************************************************************************/ - - void ConstPolygon::Activate(const sal_uInt16 nSlotId) { switch (nSlotId) @@ -155,5 +132,4 @@ void ConstPolygon::Activate(const sal_uInt16 nSlotId) SwDrawBase::Activate(nSlotId); } - - +/* vim: set noet sw=4 ts=4: */ diff --git a/main/sw/source/ui/ribbar/conrect.cxx b/main/sw/source/ui/ribbar/conrect.cxx index 64474e2824..33fd9ab5cd 100644 --- a/main/sw/source/ui/ribbar/conrect.cxx +++ b/main/sw/source/ui/ribbar/conrect.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,24 +7,21 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ - - // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include <sfx2/bindings.hxx> #include <svx/htmlmode.hxx> #include <svx/sdtacitm.hxx> @@ -44,11 +41,8 @@ #include <drawbase.hxx> #include <conrect.hxx> - /************************************************************************* -|* -|* Konstruktor -|* +|* C'Tor \************************************************************************/ ConstRectangle::ConstRectangle( SwWrtShell* pWrtShell, SwEditWin* pEditWin, @@ -61,9 +55,7 @@ ConstRectangle::ConstRectangle( SwWrtShell* pWrtShell, SwEditWin* pEditWin, } /************************************************************************* -|* |* MouseButtonDown-event -|* \************************************************************************/ sal_Bool ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt) @@ -71,41 +63,39 @@ sal_Bool ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt) sal_Bool bReturn; if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True - && m_pWin->GetSdrDrawMode() == OBJ_CAPTION) + && m_pWin->GetSdrDrawMode() == OBJ_CAPTION) { - m_pView->NoRotate(); - if (m_pView->IsDrawSelMode()) + m_pView->NoRotate(); + if (m_pView->IsDrawSelMode()) { - m_pView->FlipDrawSelMode(); - m_pSh->GetDrawView()->SetFrameDragSingles(m_pView->IsDrawSelMode()); + m_pView->FlipDrawSelMode(); + m_pSh->GetDrawView()->SetFrameDragSingles(m_pView->IsDrawSelMode()); } } return (bReturn); } /************************************************************************* -|* |* MouseButtonUp-event -|* \************************************************************************/ sal_Bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) { - Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel())); + Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel())); sal_Bool bRet = SwDrawBase::MouseButtonUp(rMEvt); if( bRet ) { - SdrView *pSdrView = m_pSh->GetDrawView(); + SdrView *pSdrView = m_pSh->GetDrawView(); const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList(); SdrObject* pObj = rMarkList.GetMark(0) ? rMarkList.GetMark(0)->GetMarkedSdrObj() : 0; - switch( m_pWin->GetSdrDrawMode() ) + switch( m_pWin->GetSdrDrawMode() ) { case OBJ_TEXT: if( bMarquee ) { - m_pSh->ChgAnchor(FLY_AS_CHAR); + m_pSh->ChgAnchor(FLY_AS_CHAR); if( pObj ) { @@ -119,7 +109,7 @@ sal_Bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) aItemSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) ); aItemSet.Put( SdrTextAniCountItem( 0 ) ); aItemSet.Put( SdrTextAniAmountItem( - (sal_Int16)m_pWin->PixelToLogic(Size(2,1)).Width()) ); + (sal_Int16)m_pWin->PixelToLogic(Size(2,1)).Width()) ); pObj->SetMergedItemSetAndBroadcast(aItemSet); } @@ -142,34 +132,32 @@ sal_Bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) if( pObj ) { SdrPageView* pPV = pSdrView->GetSdrPageView(); - m_pView->BeginTextEdit( pObj, pPV, m_pWin, sal_True ); + m_pView->BeginTextEdit( pObj, pPV, m_pWin, sal_True ); } - m_pView->LeaveDrawCreate(); // In Selektionsmode wechseln - m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); + m_pView->LeaveDrawCreate(); // In Selektionsmode wechseln + m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); break; case OBJ_CAPTION: - { - SdrCaptionObj* pCaptObj = dynamic_cast<SdrCaptionObj*>(pObj); - if( bCapVertical && pCaptObj ) + { + SdrCaptionObj* pCaptObj = dynamic_cast<SdrCaptionObj*>(pObj); + if( bCapVertical && pCaptObj ) { pCaptObj->ForceOutlinerParaObject(); OutlinerParaObject* pOPO = pCaptObj->GetOutlinerParaObject(); if( pOPO && !pOPO->IsVertical() ) pOPO->SetVertical( sal_True ); } - } - break; - default:; //prevent warning + } + break; + default:; //prevent warning } } return bRet; } /************************************************************************* -|* -|* Function aktivieren -|* +|* activate function \************************************************************************/ void ConstRectangle::Activate(const sal_uInt16 nSlotId) @@ -180,46 +168,45 @@ void ConstRectangle::Activate(const sal_uInt16 nSlotId) switch (nSlotId) { case SID_DRAW_LINE: - m_pWin->SetSdrDrawMode(OBJ_LINE); + m_pWin->SetSdrDrawMode(OBJ_LINE); break; case SID_DRAW_RECT: - m_pWin->SetSdrDrawMode(OBJ_RECT); + m_pWin->SetSdrDrawMode(OBJ_RECT); break; case SID_DRAW_ELLIPSE: - m_pWin->SetSdrDrawMode(OBJ_CIRC); + m_pWin->SetSdrDrawMode(OBJ_CIRC); break; case SID_DRAW_TEXT_MARQUEE: bMarquee = sal_True; - m_pWin->SetSdrDrawMode(OBJ_TEXT); + m_pWin->SetSdrDrawMode(OBJ_TEXT); break; case SID_DRAW_TEXT_VERTICAL: // #93382# mbVertical = sal_True; - m_pWin->SetSdrDrawMode(OBJ_TEXT); + m_pWin->SetSdrDrawMode(OBJ_TEXT); break; case SID_DRAW_TEXT: - m_pWin->SetSdrDrawMode(OBJ_TEXT); + m_pWin->SetSdrDrawMode(OBJ_TEXT); break; case SID_DRAW_CAPTION_VERTICAL: bCapVertical = sal_True; // no break case SID_DRAW_CAPTION: - m_pWin->SetSdrDrawMode(OBJ_CAPTION); + m_pWin->SetSdrDrawMode(OBJ_CAPTION); break; default: - m_pWin->SetSdrDrawMode(OBJ_NONE); + m_pWin->SetSdrDrawMode(OBJ_NONE); break; } SwDrawBase::Activate(nSlotId); } - - +/* vim: set noet sw=4 ts=4: */