diff options
author | Robert Roth <robert.roth.off@gmail.com> | 2010-11-01 02:50:47 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-11-01 20:53:22 +0000 |
commit | 43a36b36986dd2112fc90340e7a8a11ea5369def (patch) | |
tree | 9d20f7db3c4476651295f6f1a92cec36b2ac53dc /sw/source/ui | |
parent | 448bea16df6f21575e9befb5052ad9b4a9e50922 (diff) |
Commented out code, bogus comments removed, some german comments translated.
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/docvw/PostItMgr.cxx | 110 | ||||
-rw-r--r-- | sw/source/ui/docvw/edtwin.cxx | 322 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/frmpage.cxx | 84 |
3 files changed, 91 insertions, 425 deletions
diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index a9e3b86f25fb..613c8e8811b2 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -101,34 +101,10 @@ using namespace sw::sidebarwindows; -/* -bool comp_author( const SwPostItItem* a, const SwPostItItem* b) -{ - return a->pFmtFld->GetFld()->GetPar1() < b->pFmtFld->GetFld()->GetPar1(); -} - -bool comp_date( const SwPostItItem* a, const SwPostItItem* b) -{ - return static_cast<SwPostItField*>(a->pFmtFld->GetFld())->GetDate() < static_cast<SwPostItField*>(b->pFmtFld->GetFld())->GetDate(); -} -*/ - -// bool comp_pos(const SwSidebarItem* a, const SwSidebarItem* b) { - // --> OD 2010-01-19 #i88070# // sort by anchor position -//// if position is on the same line, sort by x (Left) position, otherwise by y(Bottom) position -//// if two notes are at the same position, sort by logical node position -// return (a->maLayoutInfo.mPosition.Bottom() == b->maLayoutInfo.mPosition.Bottom()) -// ? ( ( (a->maLayoutInfo.mPosition.Left() == b->maLayoutInfo.mPosition.Left()) && -// (a->GetBroadCaster()->ISA(SwFmtFld) && b->GetBroadCaster()->ISA(SwFmtFld)) ) -// ? *(static_cast<SwFmtFld*>(a->GetBroadCaster())->GetTxtFld()->GetStart()) < -// *(static_cast<SwFmtFld*>(b->GetBroadCaster())->GetTxtFld()->GetStart()) -// : a->maLayoutInfo.mPosition.Left() < b->maLayoutInfo.mPosition.Left() ) -// : a->maLayoutInfo.mPosition.Bottom() < b->maLayoutInfo.mPosition.Bottom(); return a->GetAnchorPosition() < b->GetAnchorPosition(); - // <-- } SwPostItMgr::SwPostItMgr(SwView* pView) @@ -235,12 +211,7 @@ void SwPostItMgr::InsertItem(SfxBroadcaster* pItem, bool bCheckExistance, bool b mbLayout = bFocus; if (pItem->ISA(SwFmtFld)) mvPostItFlds.push_back(new SwAnnotationItem(static_cast<SwFmtFld*>(pItem), true, bFocus) ); - /* - else - if (pItem->ISA(SwRedline)) - mvPostItFlds.push_back(new SwRedCommentItem( static_cast<SwRedline*>(pItem), true, bFocus)) ; - */ - OSL_ENSURE(pItem->ISA(SwFmtFld) /*|| pItem->ISA(SwRedline)*/,"Mgr::InsertItem: seems like new stuff was added"); + OSL_ENSURE(pItem->ISA(SwFmtFld),"Mgr::InsertItem: seems like new stuff was added"); StartListening(*pItem); } @@ -323,35 +294,6 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) } } } - /* - else if ( rHint.IsA(TYPE(SwRedlineHint) ) ) - { - const SwRedlineHint rRedlineHint = static_cast<const SwRedlineHint&>(rHint); - SwRedline* pRedline = const_cast<SwRedline*>(rRedlineHint.GetRedline()); - switch ( rRedlineHint.Which() ) - { - case SWREDLINE_INSERTED : - { - bool bEmpty = !HasNotes(); - InsertItem( pRedline, true, false ); - if (bEmpty && !mvPostItFlds.empty()) - PrepareView(true); - break; - } - case SWREDLINE_REMOVED: - { - RemoveItem(pRedline); - break; - } - case SWREDLINE_FOCUS: - { - if (rRedlineHint.GetView()== mpView) - Focus(rBC); - break; - } - } - } - */ else if ( rHint.IsA(TYPE(SwFmtFldHint) ) ) { const SwFmtFldHint& rFmtHint = static_cast<const SwFmtFldHint&>(rHint); @@ -1113,7 +1055,6 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons //(*i) is the last visible item SwSidebarWin_iterator aPrevPostIt = i; --aPrevPostIt; - //lTranslatePos = ( (*aPrevPostIt)->VirtualPos().Y() + (*aPrevPostIt)->VirtualSize().Height() + GetSpaceBetween() ) - (*i)->VirtualPos().Y(); lTranslatePos = ( (*aPrevPostIt)->VirtualPos().Y() + (*aPrevPostIt)->VirtualSize().Height() ) - (*i)->VirtualPos().Y(); if (lTranslatePos > 0) { @@ -1168,22 +1109,6 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons return bScrollbars; } -/* -void SwPostItMgr::AddRedlineComments(bool bCheckExistance, bool bFocus) -{ - bool bEmpty = mvPostItFlds.empty(); - const SwRedlineTbl& aTable = mpView->GetDocShell()->GetDoc()->GetRedlineTbl(); - for( USHORT i = 0; i < aTable.Count(); ++i ) - { - SwRedline* pRedline = const_cast<SwRedline*>((aTable)[i]); - if ( pRedline->GetComment() != String(rtl::OUString::createFromAscii("")) ) - InsertItem(pRedline, bCheckExistance, bFocus); - } - if (bEmpty && !mvPostItFlds.empty()) - PrepareView(true); - } - */ - void SwPostItMgr::AddPostIts(bool bCheckExistance, bool bFocus) { bool bEmpty = mvPostItFlds.empty(); @@ -1281,23 +1206,6 @@ void SwPostItMgr::Delete() mpWrtShell->DelRight(); } -/* - for(std::list<SwPostItItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) - { - SwPostItItem* pItem = (*i); - // stop listening, we delete ourselves - EndListening( *(pItem->pFmtFld) ); - // delete the actual SwPostItField - mpWrtShell->GotoField(*pItem->pFmtFld); - mpWrtShell->DelRight(); - // delete visual representation - delete pItem->pPostIt; - // delete struct saving the pointers - delete pItem; - } - mvPostItFlds.clear(); -*/ - mpWrtShell->EndUndo( UNDO_DELETE ); PrepareView(); mpWrtShell->EndAllAction(); @@ -1347,14 +1255,6 @@ void SwPostItMgr::Sort(const short aType) case SORT_POS: mvPostItFlds.sort(comp_pos); break; - /* - case SORT_AUTHOR: - mvPostItFlds.sort(comp_author); - break; - case SORT_DATE: - mvPostItFlds.sort(comp_date); - break; - */ } } } @@ -1506,7 +1406,6 @@ void SwPostItMgr::PrepareView(bool bIgnoreCount) if (!HasNotes() || bIgnoreCount) { mpWrtShell->StartAllAction(); - //mpEditWin->Invalidate(); // really not needed anymore?? SwRootFrm* pLayout = mpWrtShell->GetLayout(); if ( pLayout ) SwPostItHelper::setSidebarChanged( pLayout, @@ -1627,14 +1526,13 @@ void SwPostItMgr::CorrectPositions() return; // yeah, I know, if this is a left page it could be wrong, but finding the page and the note is probably not even faster than just doing it - // --> OD 2010-06-03 #i111964# - check, if anchor overlay object exists. + // check, if anchor overlay object exists. const long aAnchorX = pFirstPostIt->Anchor() ? mpEditWin->LogicToPixel( Point((long)(pFirstPostIt->Anchor()->GetSixthPosition().getX()),0)).X() : 0; const long aAnchorY = pFirstPostIt->Anchor() ? mpEditWin->LogicToPixel( Point(0,(long)(pFirstPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1 : 0; - // <-- if (Point(aAnchorX,aAnchorY) != pFirstPostIt->GetPosPixel()) { long aAnchorPosX = 0; @@ -1643,9 +1541,8 @@ void SwPostItMgr::CorrectPositions() { for(SwSidebarItem_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++) { - // --> OD 2010-06-03 #i111964# - check, if anchor overlay object exists. + // check, if anchor overlay object exists. if ( (*i)->bShow && (*i)->pPostIt && (*i)->pPostIt->Anchor() ) - // <-- { aAnchorPosX = mPages[n]->eSidebarPosition == sw::sidebarwindows::SIDEBAR_LEFT ? mpEditWin->LogicToPixel( Point((long)((*i)->pPostIt->Anchor()->GetSeventhPosition().getX()),0)).X() @@ -1887,7 +1784,6 @@ sal_uInt16 SwPostItMgr::SearchReplace(const SwFmtFld &pFld, const ::com::sun::st void SwPostItMgr::AssureStdModeAtShell() { - //#i103373# #i103645# // deselect any drawing or frame and leave editing mode SdrView* pSdrView = mpWrtShell->GetDrawView(); if ( pSdrView && pSdrView->IsTextEdit() ) diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 8b71b713069e..85df265d50b5 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -29,7 +29,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include <tools/list.hxx> #include <swtypes.hxx> #include <hintids.hxx> @@ -123,13 +122,12 @@ #include <cmdid.h> #include <docvw.hrc> #include <uitool.hxx> -// OD 18.09.2003 #i18732# #include <fmtfollowtextflow.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <charfmt.hxx> #include <numrule.hxx> #include <pagedesc.hxx> -#include <svtools/ruler.hxx> // #i23726# +#include <svtools/ruler.hxx> #include "formatclipboard.hxx" #include <osl/mutex.hxx> #include <vcl/svapp.hxx> @@ -140,10 +138,8 @@ #include <PostItMgr.hxx> -//JP 11.10.2001: enable test code for bug fix 91313 //TODO: This one could most probably be removed #if defined(DBG_UTIL) && (OSL_DEBUG_LEVEL > 1) -//#define TEST_FOR_BUG91313 #endif using namespace sw::mark; @@ -181,7 +177,6 @@ Color SwEditWin::aTextBackColor(COL_YELLOW); Color SwEditWin::aTextColor(COL_RED); BOOL SwEditWin::bTransparentBackColor = FALSE; // Hintergrund nicht transparent - extern BOOL bExecuteDrag; SfxShell* lcl_GetShellFromDispatcher( SwView& rView, TypeId nType ); @@ -193,17 +188,13 @@ class SwAnchorMarker SdrHdl* pHdl; Point aHdlPos; Point aLastPos; - // --> OD 2010-09-16 #i114522# bool bTopRightHandle; - // <-- public: SwAnchorMarker( SdrHdl* pH ) : pHdl( pH ) , aHdlPos( pH->GetPos() ) , aLastPos( pH->GetPos() ) - // --> OD 2010-09-16 #i114522# , bTopRightHandle( pH->GetKind() == HDL_ANCHOR_TR ) - // <-- {} const Point& GetLastPos() const { return aLastPos; } void SetLastPos( const Point& rNew ) { aLastPos = rNew; } @@ -213,14 +204,11 @@ public: void ChgHdl( SdrHdl* pNew ) { pHdl = pNew; - // --> OD 2010-09-16 #i114522# if ( pHdl ) { bTopRightHandle = (pHdl->GetKind() == HDL_ANCHOR_TR); } - // <-- } - // --> OD 2010-09-16 #i114522# const Point GetPosForHitTest( const OutputDevice& rOut ) { Point aHitTestPos( GetPos() ); @@ -237,7 +225,6 @@ public: return aHitTestPos; } - // <-- }; struct QuickHelpData @@ -271,7 +258,6 @@ struct QuickHelpData void FillStrArr( SwWrtShell& rSh, const String& rWord ); }; - /*-------------------------------------------------------------------- Beschreibung: Minimale Bewegung Zittern vermeiden --------------------------------------------------------------------*/ @@ -286,7 +272,7 @@ inline BOOL IsMinMove(const Point &rStartPos, const Point &rLPt) } /*-------------------------------------------------------------------- - JP 30.07.98: fuer MouseButtonDown - feststellen, ob ein DrawObject + fuer MouseButtonDown - feststellen, ob ein DrawObject und KEIN SwgFrame getroffen wurde! Shift/Ctrl sollen nur bei DrawObjecte zum Selektieren fuehren, bei SwgFlys ggfs zum ausloesen von Hyperlinks (DownLoad/NewWindow!) @@ -312,7 +298,6 @@ inline BOOL IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt ) Beschreibung: Pointer umschalten --------------------------------------------------------------------*/ - void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier ) { SwWrtShell &rSh = rView.GetWrtShell(); @@ -326,7 +311,6 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier ) delete pUserMarker; pUserMarker = 0L; } -// rSh.SwCrsrShell::UnSetVisCrsr( rLPt ); eStyle = POINTER_NOTALLOWED; } else @@ -568,7 +552,6 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier ) Beschreibung: Timer fuer Selektion vergroessern --------------------------------------------------------------------*/ - IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG ) { DBG_PROFSTART(edithdl); @@ -604,14 +587,14 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG ) else (rSh.*rSh.fnSetCrsr)( &aModPt, FALSE ); - //fix(24138): Es kann sein, dass der "Sprung" ueber eine Tabelle so + // Es kann sein, dass der "Sprung" ueber eine Tabelle so //nicht geschafft wird. Deshalb wir hier eben per Up/Down ueber die //Tabelle gesprungen. const SwRect& rVisArea = rSh.VisArea(); if( aOldVis == rVisArea && !rSh.IsStartOfDoc() && !rSh.IsEndOfDoc() ) { - //JP 11.10.2001 Bug 72294 - take the center point of VisArea to - // decide in which direction the user want. + // take the center point of VisArea to + // decide in which direction the user want. if( aModPt.Y() < ( rVisArea.Top() + rVisArea.Height() / 2 ) ) rSh.Up( TRUE, 1 ); else @@ -629,7 +612,6 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG ) Beschreibung: --------------------------------------------------------------------*/ - void SwEditWin::JustifyAreaTimer() { const Rectangle &rVisArea = GetView().GetVisArea(); @@ -668,7 +650,6 @@ inline void SwEditWin::EnterArea() Beschreibung: Modus fuer Rahmen einfuegen ------------------------------------------------------------------------*/ - void SwEditWin::InsFrm(USHORT nCols) { StdDrawMode( OBJ_NONE, FALSE ); @@ -676,15 +657,10 @@ void SwEditWin::InsFrm(USHORT nCols) nInsFrmColCount = nCols; } - - void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, BOOL bObjSelect ) { SetSdrDrawMode( eSdrObjectKind ); -/* if (GetDrawFuncPtr()) - GetDrawFuncPtr()->Deactivate();*/ - if (bObjSelect) rView.SetDrawFuncPtr(new DrawSelection( &rView.GetWrtShell(), this, &rView )); else @@ -695,13 +671,11 @@ void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, BOOL bObjSelect ) if (bObjSelect) rView.GetDrawFuncPtr()->Activate( SID_OBJECT_SELECT ); else - rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< USHORT >(eSdrObjectKind) ); // don't know if this is useful at all; but it keeps functionality as it was... + rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< USHORT >(eSdrObjectKind) ); bInsFrm = FALSE; nInsFrmColCount = 1; } - - void SwEditWin::StopInsFrm() { if (rView.GetDrawFuncPtr()) @@ -717,7 +691,6 @@ void SwEditWin::StopInsFrm() /*-------------------------------------------------------------------- --------------------------------------------------------------------*/ - BOOL SwEditWin::IsInputSequenceCheckingRequired( const String &rText, const SwPaM& rCrsr ) const { const SvtCTLOptions& rCTLOptions = SW_MOD()->GetCTLOptions(); @@ -744,12 +717,10 @@ BOOL SwEditWin::IsInputSequenceCheckingRequired( const String &rText, const SwPa return (0 <= nCTLScriptPos && nCTLScriptPos <= rText.Len()); } - /*-------------------------------------------------------------------- Beschreibung: Der Character Buffer wird in das Dokument eingefuegt --------------------------------------------------------------------*/ - void SwEditWin::FlushInBuffer() { if ( aInBuffer.Len() ) @@ -873,7 +844,6 @@ void SwEditWin::FlushInBuffer() aReq.Done(); } } - //#21019# apply CTL and CJK language to the text input sal_Bool bLang = true; if(eBufferLanguage != LANGUAGE_DONTKNOW) { @@ -895,7 +865,7 @@ void SwEditWin::FlushInBuffer() if ( eLang == eBufferLanguage ) // current language attribute equal to language reported from system bLang = sal_False; - else if ( !bInputLanguageSwitched && RES_CHRATR_LANGUAGE == nWhich /* && (eLang&LANGUAGE_MASK_PRIMARY) == LANGUAGE_ENGLISH */ ) + else if ( !bInputLanguageSwitched && RES_CHRATR_LANGUAGE == nWhich ) { // special case: switching between two "LATIN" languages // In case the current keyboard setting might be suitable for both languages we can't safely assume that the user @@ -974,14 +944,11 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb ) SwWrtShell &rSh = rView.GetWrtShell(); SwRect aTmp = rSh.GetFlyRect(); if( aTmp.HasArea() && - // --> FME 2005-01-13 #i40348# // IsSelObjProtected() seems to be the correct condition, not // !HasReadonlySel(), otherwise frame is not moveable if content is // protected. !rSh.IsSelObjProtected( FLYPROTECT_POS|FLYPROTECT_SIZE ) ) - // <-- { - // OD 18.09.2003 #i18732# - add item <RES_FOLLOW_TEXT_FLOW> SfxItemSet aSet(rSh.GetAttrPool(), RES_FRM_SIZE, RES_FRM_SIZE, RES_VERT_ORIENT, RES_ANCHOR, @@ -1009,13 +976,12 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb ) SwRect aBoundRect; Point aRefPoint; - // OD 18.09.2003 #i18732# - adjustment for allowing vertical position - // aligned to page for fly frame anchored to paragraph or to character. + // adjustment for allowing vertical position + // aligned to page for fly frame anchored to paragraph or to character. { SwFmtVertOrient aVert( (SwFmtVertOrient&)aSet.Get(RES_VERT_ORIENT) ); const bool bFollowTextFlow = static_cast<const SwFmtFollowTextFlow&>(aSet.Get(RES_FOLLOW_TEXT_FLOW)).GetValue(); - // OD 12.11.2003 #i22341# - additional provide content position const SwPosition* pToCharCntntPos = ((SwFmtAnchor&)aSet.Get(RES_ANCHOR)).GetCntntAnchor(); rSh.CalcBoundRect( aBoundRect, eAnchorId, text::RelOrientation::FRAME, aVert.GetRelationOrient(), @@ -1034,10 +1000,10 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb ) case MOVE_UP_BIG: case MOVE_UP_SMALL: aTmp.Top( aTmp.Top() - nUp ); break; case MOVE_RIGHT_SMALL: if( aTmp.Width() < aSnap.Width() + MINFLY ) break; - nRight = aSnap.Width(); // kein break + nRight = aSnap.Width(); // no break case MOVE_RIGHT_BIG: aTmp.Left( aTmp.Left() + nRight ); break; case MOVE_DOWN_SMALL: if( aTmp.Height() < aSnap.Height() + MINFLY ) break; - nDown = aSnap.Height(); // kein break + nDown = aSnap.Height(); // no break case MOVE_DOWN_BIG: aTmp.Top( aTmp.Top() + nDown ); break; default: OSL_ENSURE(true, "ChangeFly: Unknown direction." ); } @@ -1133,16 +1099,13 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb ) rSh.EndAllAction(); } } -/* -----------------------------23.05.2002 11:35------------------------------ - ---------------------------------------------------------------------------*/ void SwEditWin::ChangeDrawing( BYTE nDir ) { - // --> OD 2005-01-31 #i40845# - start undo action in order to get only one + // start undo action in order to get only one // undo action for this change. SwWrtShell &rSh = rView.GetWrtShell(); rSh.StartUndo(); - // <-- long nX = 0; long nY = 0; @@ -1206,7 +1169,6 @@ void SwEditWin::ChangeDrawing( BYTE nDir ) // if the object's position is not protected if(0 == (nProtect&FLYPROTECT_POS)) { - // --> FME 2005-04-26 #i47138# // Check if object is anchored as character and move direction BOOL bDummy; const bool bVertAnchor = rSh.IsFrmVertical( TRUE, bDummy ); @@ -1215,7 +1177,6 @@ void SwEditWin::ChangeDrawing( BYTE nDir ) !bHoriMove || (rSh.GetAnchorId() != FLY_AS_CHAR); if ( bMoveAllowed ) { - // <-- pSdrView->MoveAllMarked(Size(nX, nY)); rSh.SetModified(); } @@ -1271,17 +1232,13 @@ void SwEditWin::ChangeDrawing( BYTE nDir ) rSh.EndAllAction(); } - // --> OD 2005-01-31 #i40845# - end undo action rSh.EndUndo(); - // <-- } /*-------------------------------------------------------------------- Beschreibung: KeyEvents --------------------------------------------------------------------*/ - - void SwEditWin::KeyInput(const KeyEvent &rKEvt) { if( rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE && @@ -1345,7 +1302,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) // look for vertical mappings if( !bIsDocReadOnly && !rSh.IsSelFrmMode() && !rSh.IsObjSelected() ) { - //JP 21.2.2002: must changed from switch to if, because the Linux + // must changed from switch to if, because the Linux // compiler has problem with the code. Has to remove if the new general // handler exist. USHORT nKey = rKEvt.GetKeyCode().GetCode(); @@ -1466,9 +1423,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) enum SW_KeyState { KS_Start, KS_CheckKey, KS_InsChar, KS_InsTab, KS_NoNum, KS_NumOff, KS_NumOrNoNum, KS_NumDown, KS_NumUp, - // -> #i23725# KS_NumIndentInc, KS_NumIndentDec, - // <- #i23725# KS_OutlineLvOff, KS_NextCell, KS_PrevCell, KS_OutlineUp, KS_OutlineDown, @@ -1506,20 +1461,16 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) KS_GotoPrevFieldMark, KS_Ende }; - - SW_KeyState eKeyState = bIsDocReadOnly ? KS_CheckDocReadOnlyKeys : KS_CheckKey, eNextKeyState = KS_Ende; BYTE nDir = 0; - // -> #i23725# if (nKS_NUMDOWN_Count > 0) nKS_NUMDOWN_Count--; if (nKS_NUMINDENTINC_Count > 0) nKS_NUMINDENTINC_Count--; - // <- #i23725# while( KS_Ende != eKeyState ) { @@ -1532,8 +1483,8 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) #if OSL_DEBUG_LEVEL > 1 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - // JP 19.01.99: zum Umschalten des Cursor Verhaltens in ReadOnly - // Bereichen + // zum Umschalten des Cursor Verhaltens in ReadOnly + // Bereichen if( 0x7210 == rKeyCode.GetFullCode() ) rSh.SetReadOnlyAvailable( !rSh.IsReadOnlyAvailable() ); else @@ -1542,7 +1493,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) if( !rKeyCode.IsMod2() && '=' == aCh && !rSh.IsTableMode() && rSh.GetTableFmt() && - rSh.IsSttPara() /*&& rSh.IsEndPara()*/ && + rSh.IsSttPara() && !rSh.HasReadonlySel() ) { // in der Tabelle am Anfang der Zelle ein '=' -> @@ -1619,12 +1570,6 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) eFlyState = KS_Fly_Change; nDir = MOVE_DOWN_SMALL; goto KEYINPUT_CHECKTABLE; -// case KEY_UP | KEY_MOD2 | KEY_SHIFT: -// eKeyState = KS_ColTopBig; -// goto KEYINPUT_CHECKTABLE; -// case KEY_DOWN | KEY_MOD2 | KEY_SHIFT: -// eKeyState = KS_ColTopSmall; -// goto KEYINPUT_CHECKTABLE; case KEY_UP | KEY_MOD2 | KEY_MOD1: eKeyState = KS_CellBottomSmall; @@ -1675,7 +1620,6 @@ KEYINPUT_CHECKTABLE: nTblChgSize = pModOpt->GetTblVInsert(); } goto KEYINPUT_CHECKTABLE_INSDEL; -// case KEY_RIGHT: case KEY_RIGHT | KEY_MOD1: { eTblChgMode = nsTblChgWidthHeightType::WH_FLAG_INSDEL | nsTblChgWidthHeightType::WH_CELL_RIGHT; @@ -1817,28 +1761,24 @@ KEYINPUT_CHECKTABLE_INSDEL: case KEY_BACKSPACE | KEY_SHIFT: if( !rSh.HasReadonlySel() ) { - // #i23725# BOOL bDone = FALSE; - // --> OD 2006-01-31 - try to add comment for code snip: + // try to add comment for code snip: // Remove the paragraph indent, if the cursor is at the // beginning of a paragraph, there is no selection // and no numbering rule found at the current paragraph - // --> OD 2006-01-31 #b6341339#, #i58776# // Also try to remove indent, if current paragraph // has numbering rule, but isn't counted and only // key <backspace> is hit. const bool bOnlyBackspaceKey( KEY_BACKSPACE == rKeyCode.GetFullCode() ); if ( rSh.IsSttPara() && - !rSh.HasSelection() && // i40834 + !rSh.HasSelection() && ( NULL == rSh.GetCurNumRule() || ( rSh.IsNoNum() && bOnlyBackspaceKey ) ) ) { bDone = rSh.TryRemoveIndent(); } - // <-- - // -> #i23725# if (bDone) eKeyState = KS_Ende; else @@ -1860,10 +1800,7 @@ KEYINPUT_CHECKTABLE_INSDEL: bDone = TRUE; } } - // <- #i23725# - // --> OD 2006-01-31 #b6341339#, #i58776# - // --> OD 2006-04-21 #i63540# - // revise fix for issues b6341339 and i58776: + // If the cursor is in an empty paragraph, which has // a numbering, but not the oultine numbering, and // there is no selection, the numbering has to be @@ -1905,7 +1842,6 @@ KEYINPUT_CHECKTABLE_INSDEL: { eKeyState = KS_NumOrNoNum; } - // <-- } } break; @@ -1932,11 +1868,8 @@ KEYINPUT_CHECKTABLE_INSDEL: if( rSh.GetCurNumRule() && rSh.IsSttOfPara() && !rSh.HasReadonlySel() ) { - // --> OD 2007-10-02 #b660435# -// if (rSh.IsFirstOfNumRule()) // #i23725# if ( rSh.IsFirstOfNumRule() && numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() ) - // <-- eKeyState = KS_NumIndentInc; else eKeyState = KS_NumDown; @@ -1963,10 +1896,9 @@ KEYINPUT_CHECKTABLE_INSDEL: { SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl(); if( pColl && - //0 <= pColl->GetOutlineLevel() && #i24560# - //MAXLEVEL - 1 > pColl->GetOutlineLevel() )//#outline level,zhaojianwei + pColl->IsAssignedToListLevelOfOutlineStyle() - && MAXLEVEL-1 > pColl->GetAssignedOutlineStyleLevel() )//<-end,zhaojianwei + && MAXLEVEL-1 > pColl->GetAssignedOutlineStyleLevel() ) eKeyState = KS_OutlineDown; } } @@ -1986,11 +1918,9 @@ KEYINPUT_CHECKTABLE_INSDEL: else if( rSh.GetCurNumRule() && rSh.IsSttOfPara() && !rSh.HasReadonlySel() ) { - // --> OD 2007-10-02 #b660435# -// if (rSh.IsFirstOfNumRule()) // #i23725# + if ( rSh.IsFirstOfNumRule() && numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() ) - // <-- eKeyState = KS_NumIndentDec; else eKeyState = KS_NumUp; @@ -2016,8 +1946,6 @@ KEYINPUT_CHECKTABLE_INSDEL: if( rSh.IsSttOfPara() && !rSh.HasReadonlySel() ) { SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl(); - //if( pColl && 0 < pColl->GetOutlineLevel() && //#outline level,zhaojianwei - // MAXLEVEL - 1 >= pColl->GetOutlineLevel() ) if( pColl && pColl->IsAssignedToListLevelOfOutlineStyle() && 0 < pColl->GetAssignedOutlineStyleLevel()) @@ -2035,7 +1963,7 @@ KEYINPUT_CHECKTABLE_INSDEL: { if( aTmpQHD.HasCntnt() && !rSh.HasSelection() ) { - // zum naechsten Tip + // to the next Tip aTmpQHD.Inc( pACorr && pACorr->GetSwFlags(). bAutoCmpltEndless ); eKeyState = KS_NextPrevGlossary; @@ -2058,7 +1986,7 @@ KEYINPUT_CHECKTABLE_INSDEL: if( aTmpQHD.HasCntnt() && !rSh.HasSelection() && !rSh.HasReadonlySel() ) { - // zum vorherigen Tip + // to the previous Tip aTmpQHD.Dec( pACorr && pACorr->GetSwFlags(). bAutoCmpltEndless ); eKeyState = KS_NextPrevGlossary; @@ -2168,13 +2096,12 @@ KEYINPUT_CHECKTABLE_INSDEL: bFlushBuffer = TRUE, bNormalChar = FALSE; else { -// OS 22.09.95: Da der Sfx Acceleratoren nur aufruft, wenn sie beim letzten -// Statusupdate enabled wurden, muss copy ggf. von uns -// 'gewaltsam' gerufen werden. + // Da der Sfx Acceleratoren nur aufruft, wenn sie beim letzten + // Statusupdate enabled wurden, muss copy ggf. von uns + // 'gewaltsam' gerufen werden. if( rKeyCode.GetFunction() == KEYFUNC_COPY ) GetView().GetViewFrame()->GetBindings().Execute(SID_COPY); - if( !bIsDocReadOnly && bNormalChar ) { const int nSelectionType = rSh.GetSelectionType(); @@ -2241,15 +2168,15 @@ KEYINPUT_CHECKTABLE_INSDEL: } break; case KS_InsTab: - if( rView.ISA( SwWebView )) //Kein Tabulator fuer Web! + if( rView.ISA( SwWebView )) // no Tab for WebView { - // Bug 56196 - dann sollte der weiter gereicht werden. + // dann sollte der weiter gereicht werden. Window::KeyInput( aKeyEvent ); eKeyState = KS_Ende; break; } aCh = '\t'; - // kein break! + // no break! case KS_InsChar: if (rSh.GetChar(FALSE)==CH_TXT_ATR_FORMELEMENT) { @@ -2295,7 +2222,6 @@ KEYINPUT_CHECKTABLE_INSDEL: aInBuffer.Expand( aInBuffer.Len() + 1, ' ' ); } - BOOL bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh ); BOOL bRunNext = pACorr && pACorr->HasRunNext(); if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) && @@ -2335,7 +2261,6 @@ KEYINPUT_CHECKTABLE_INSDEL: else { InfoBox( this, SW_RES( MSG_READONLY_CONTENT )).Execute(); - // ??? Window::KeyInput( aKeyEvent ); eKeyState = KS_Ende; } break; @@ -2348,12 +2273,6 @@ KEYINPUT_CHECKTABLE_INSDEL: ChgToEnEmDash | SetINetAttr | Autocorrect ) && !rSh.HasReadonlySel() ) - /* { - pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd | - ChgFractionSymbol | ChgOrdinalNumber | - ChgToEnEmDash | SetINetAttr | - Autocorrect ) && - !rSh.HasReadonlySel() ) */ { FlushInBuffer(); rSh.AutoCorrect( *pACorr, static_cast< sal_Unicode >('\0') ); @@ -2366,8 +2285,6 @@ KEYINPUT_CHECKTABLE_INSDEL: { USHORT nSlotId = 0; FlushInBuffer(); -//??? if( bFlushCharBuffer ) -//??? FlushInBuffer( &rSh ); switch( eKeyState ) { case KS_SpecialInsert: @@ -2388,17 +2305,14 @@ KEYINPUT_CHECKTABLE_INSDEL: case KS_NumDown: rSh.NumUpDown( TRUE ); - nKS_NUMDOWN_Count = 2; // #i23725# + nKS_NUMDOWN_Count = 2; break; case KS_NumUp: rSh.NumUpDown( FALSE ); break; - // -> #i23726# case KS_NumIndentInc: - // --> OD 2008-06-16 #i90078# rSh.ChangeIndentOfAllListLevels(360); - // <-- nKS_NUMINDENTINC_Count = 2; break; @@ -2417,11 +2331,8 @@ KEYINPUT_CHECKTABLE_INSDEL: break; case KS_NumIndentDec: - // --> OD 2008-06-16 #i90078# rSh.ChangeIndentOfAllListLevels(-360); - // <-- break; - // <- #i23726# case KS_OutlineDown: rSh.OutlineUpDown( 1 ); @@ -2431,7 +2342,7 @@ KEYINPUT_CHECKTABLE_INSDEL: break; case KS_NextCell: - //In Tabelle immer 'flushen' + // always 'flush' in tables rSh.GoNextCell(); nSlotId = FN_GOTO_NEXT_CELL; break; @@ -2443,8 +2354,6 @@ KEYINPUT_CHECKTABLE_INSDEL: rSh.SplitNode( TRUE ); break; -// case KS_NumOrNoNum: -// break; case KS_NextObject: case KS_PrevObject: if(rSh.GotoObj( KS_NextObject == eKeyState, GOTOOBJ_GOTO_ANY)) @@ -2514,9 +2423,7 @@ KEYINPUT_CHECKTABLE_INSDEL: case KS_ColRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; case KS_ColLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_LEFT, pModOpt->GetTblHMove() ); break; case KS_ColRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_RIGHT, pModOpt->GetTblHMove() ); break; -// case KS_ColTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; case KS_ColBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break; -// case KS_ColTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_TOP, pModOpt->GetTblVMove() ); break; case KS_ColBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_BOTTOM, pModOpt->GetTblVMove() ); break; case KS_CellLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; case KS_CellRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break; @@ -2582,7 +2489,7 @@ KEYINPUT_CHECKTABLE_INSDEL: // falls die gepufferten Zeichen eingefuegt werden sollen if( bFlushBuffer && aInBuffer.Len() ) { - //OS 16.02.96 11.04: bFlushCharBuffer wurde hier nicht zurueckgesetzt + // bFlushCharBuffer wurde hier nicht zurueckgesetzt // warum nicht? BOOL bSave = bFlushCharBuffer; FlushInBuffer(); @@ -2604,7 +2511,6 @@ KEYINPUT_CHECKTABLE_INSDEL: Beschreibung: MouseEvents --------------------------------------------------------------------*/ - void SwEditWin::RstMBDownFlags() { //Nicht auf allen Systemen kommt vor dem modalen @@ -2616,8 +2522,6 @@ void SwEditWin::RstMBDownFlags() ReleaseMouse(); } - - void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) { SwWrtShell &rSh = rView.GetWrtShell(); @@ -2628,7 +2532,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // opened by inplace client and we would deactivate the inplace client, // the contex menu is closed by VCL asynchronously which in the end // would work on deleted objects or the context menu has no parent anymore) - // See #126086# and #128122# SfxInPlaceClient* pIPClient = rSh.GetSfxViewShell()->GetIPClient(); BOOL bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() ); @@ -2696,7 +2599,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) } } - bIsInMove = FALSE; aStartPos = rMEvt.GetPosPixel(); aRszMvHdlPt.X() = 0, aRszMvHdlPt.Y() = 0; @@ -2708,7 +2610,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) 0 != (nMouseTabCol = rSh.WhichMouseTabCol( aDocPos ) ) && !rSh.IsObjSelectable( aDocPos ) ) { - // --> FME 2004-07-30 #i32329# Enhanced table selection if ( SW_TABSEL_HORI <= nMouseTabCol && SW_TABCOLSEL_VERT >= nMouseTabCol ) { rSh.EnterStdMode(); @@ -2724,7 +2625,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) } return; } - // <-- if ( !rSh.IsTableMode() ) { @@ -2753,7 +2653,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) } } } - // #i23726# else if (bTmp && rSh.IsNumLabel(aDocPos)) { @@ -2763,10 +2662,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) SfxBindings& rBind = rView.GetViewFrame()->GetBindings(); rBind.Update(); - // --> OD 2005-02-21 #i42921# if ( RulerMarginDrag( rMEvt, rSh.IsVerticalModeAtNdAndPos( *pNodeAtPos, aDocPos ) ) ) - // <-- { rView.SetNumRuleNodeFromDoc( NULL ); rView.InvalidateRulerPos(); @@ -2775,11 +2672,10 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) } else { - // --> FME 2005-11-03 #125036# Make sure the pointer is set to 0, + // Make sure the pointer is set to 0, // otherwise it may point to nowhere after deleting the corresponding // text node. rView.SetNumRuleNodeFromDoc( NULL ); - // <-- return; } } @@ -2799,7 +2695,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) { BOOL bOnlyText = FALSE; bMBPressed = bNoInterrupt = TRUE; - nKS_NUMDOWN_Count = 0; // #i23725# + nKS_NUMDOWN_Count = 0; CaptureMouse(); @@ -2877,11 +2773,9 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) bExecHyperlinks = TRUE; } - // --> FME 2004-07-30 #i32329# Enhanced selection BYTE nNumberOfClicks = static_cast< BYTE >(rMEvt.GetClicks() % 4); if ( 0 == nNumberOfClicks && 0 < rMEvt.GetClicks() ) nNumberOfClicks = 4; - // <-- BOOL bExecDrawTextLink = FALSE; @@ -2914,7 +2808,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) !GetView().GetViewFrame()->GetDispatcher()->IsLocked() && !bExecDrawTextLink) { - // #107513# // Test if there is a draw object at that position and if it should be selected. sal_Bool bShould = rSh.ShouldObjectBeSelected(aDocPos); @@ -3035,7 +2928,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ( !bIsDocReadOnly && rSh.IsInsideSelectedObj(aDocPos) && 0 == rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) ) -/* SJ: 01.03.2005: this is no good, on the one hand GetSelectionType is used as flag field (take a look into the GetSelectionType method) +/* this is no good, on the one hand GetSelectionType is used as flag field (take a look into the GetSelectionType method) on the other hand the return value is used in a switch without proper masking (very nice), this must lead to trouble */ switch ( rSh.GetSelectionType() &~ ( nsSelectionType::SEL_FONTWORK | nsSelectionType::SEL_EXTRUDED_CUSTOMSHAPE ) ) @@ -3152,12 +3045,10 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ( bMod ) rSh.EnterAddMode(); - // --> FME 2004-07-30 #i32329# Enhanced selection if ( 3 == nNumberOfClicks ) rSh.SelSentence( &aDocPos ); else rSh.SelPara( &aDocPos ); - // <-- if ( bMod ) rSh.LeaveAddMode(); @@ -3390,7 +3281,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) bCallBase = FALSE; } - //#i42732# - notify the edit window that from now on we do not use the input language + // notify the edit window that from now on we do not use the input language if ( !(CRSR_POSOLD & nTmpSetCrsr) ) SetUseInputLanguage( sal_False ); @@ -3402,13 +3293,11 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ( !bOverURLGrf && !bOnlyText ) { const int nSelType = rSh.GetSelectionType(); - // --> OD 2009-12-30 #i89920# // Check in general, if an object is selectable at given position. // Thus, also text fly frames in background become selectable via Ctrl-Click. if ( nSelType & nsSelectionType::SEL_OLE || nSelType & nsSelectionType::SEL_GRF || rSh.IsObjSelectable( aDocPos ) ) - // <-- { MV_KONTEXT( &rSh ); if( !rSh.IsFrmSelected() ) @@ -3420,8 +3309,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // nicht mehr hier zuruecksetzen, damit -- falls durch MouseMove // bei gedrueckter Ctrl-Taste eine Mehrfachselektion erfolgen soll, // im Drag nicht die vorherige Selektion aufgehoben wird. -// if(bModePushed) -// rSh.PopMode(FALSE); break; } } @@ -3434,7 +3321,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) Beschreibung: MouseMove --------------------------------------------------------------------*/ - void SwEditWin::MouseMove(const MouseEvent& _rMEvt) { MouseEvent rMEvt(_rMEvt); @@ -3461,8 +3347,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) SET_CURR_SHELL( &rSh ); - //aPixPt == Point in Pixel, rel. zu ChildWin - //aDocPt == Point in Twips, Dokumentkoordinaten + //aPixPt == Point in Pixel, relative to ChildWin + //aDocPt == Point in Twips, document coordinates const Point aPixPt( rMEvt.GetPosPixel() ); const Point aDocPt( PixelToLogic( aPixPt ) ); @@ -3519,7 +3405,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) Point aDD( SwEditWin::nDDStartPosX, SwEditWin::nDDStartPosY ); aDD = LogicToPixel( aDD ); Rectangle aRect( aDD.X()-3, aDD.Y()-3, aDD.X()+3, aDD.Y()+3 ); - if ( !aRect.IsInside( aPixPt ) ) // MA 23. May. 95: Tatterschutz. + if ( !aRect.IsInside( aPixPt ) ) StopDDTimer( &rSh, aDocPt ); } @@ -3580,7 +3466,6 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) nPointer = POINTER_HSIZEBAR; bChkTblSel = true; break; - // --> FME 2004-07-30 #i20126# Enhanced table selection case SW_TABSEL_HORI : nPointer = POINTER_TAB_SELECT_SE; break; @@ -3599,31 +3484,26 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) case SW_TABCOLSEL_VERT : nPointer = POINTER_TAB_SELECT_W; break; - // <-- } if ( USHRT_MAX != nPointer && - // --> FME 2004-10-20 #i35543# - // Enhanced table selection is explicitely allowed in table mode + // i#35543 - Enhanced table selection is explicitely allowed in table mode ( !bChkTblSel || !rSh.IsTableMode() ) ) - // <-- { SetPointer( nPointer ); } return; } - // #i23726# else if (rSh.IsNumLabel(aDocPt, RULER_MOUSE_MARGINWIDTH)) { - // --> OD 2005-02-21 #i42921# - consider vertical mode + // i#42921 - consider vertical mode SwTxtNode* pNodeAtPos = rSh.GetNumRuleNodeAtPos( aDocPt ); const USHORT nPointer = rSh.IsVerticalModeAtNdAndPos( *pNodeAtPos, aDocPt ) ? POINTER_VSIZEBAR : POINTER_HSIZEBAR; SetPointer( nPointer ); - // <-- return; } @@ -3645,10 +3525,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) // So the pAnchorMarker has to find the right SdrHdl, if it's // the old one, it will find it with position aOld, if this one // is destroyed, it will find a new one at position GetHdlPos(). - // --> OD 2010-09-16 #i114522# -// const Point aOld = pAnchorMarker->GetPos(); + const Point aOld = pAnchorMarker->GetPosForHitTest( *(rSh.GetOut()) ); - // <-- Point aNew = rSh.FindAnchorPos( aDocPt ); SdrHdl* pHdl; if( (0!=( pHdl = pSdrView->PickHandle( aOld ) )|| @@ -3661,7 +3539,6 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) { pAnchorMarker->SetPos( aNew ); pAnchorMarker->SetLastPos( aDocPt ); - //OLMpSdrView->RefreshAllIAOManagers(); } } else @@ -3724,8 +3601,6 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) 0 != ( pMacro = pFlyFmt->GetMacro().GetMacroTable(). Get( nEvent )) && // oder nur z.B. alle 20 Twip bescheid sagen? -// ( 20 > Abs( aRszMvHdlPt.X() - aDocPt.X() ) || -// 20 > Abs( aRszMvHdlPt.Y() - aDocPt.Y() ) ) aRszMvHdlPt != aDocPt ) { aRszMvHdlPt = aDocPt; @@ -3811,9 +3686,6 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) } else { - //JP 24.09.98: Fix fuer die Bugs 55592 / 55931 - //JP 23.04.99: Fix fuer den Bugs 65289 - //JP 06.07.99: Fix fuer den Bugs 67360 if( !rMEvt.IsSynthetic() && !(( MOUSE_LEFT + KEY_MOD1 == rMEvt.GetModifier() + rMEvt.GetButtons() ) && @@ -3835,7 +3707,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) UpdatePointer(aDocPt, 0); // evtl. muss hier ein Rahmen markiert werden break; } - //#i6193#, change ui if mouse is over SwPostItField + // change ui if mouse is over SwPostItField // TODO: do the same thing for redlines SW_REDLINE SwRect aFldRect; SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD); @@ -3947,7 +3819,6 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) Beschreibung: Button Up --------------------------------------------------------------------*/ - void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) { BOOL bCallBase = TRUE; @@ -3963,7 +3834,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) SdrHdlKind eOldSdrMoveHdl = eSdrMoveHdl; eSdrMoveHdl = HDL_USER; // fuer die MoveEvents - wieder zuruecksetzen - // sicherheitshalber zuruecksetzen Bug 27900 + // sicherheitshalber zuruecksetzen rView.SetTabColFromDoc( FALSE ); rView.SetNumRuleNodeFromDoc(NULL); @@ -3983,10 +3854,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) //MouseButtonUp nur bearbeiten, wenn auch das Down an dieses Fenster ging. if ( !bMBPressed ) { -// OS 25.02.97 Undo fuer die Giesskann ist bereits im CommandHdl -//JP 29.09.95: so sollte es sein!!! if(pApplyTempl->bUndo) -// if( pApplyTempl && MOUSE_RIGHT == rMEvt.GetModifier() + rMEvt.GetButtons() ) -// rSh.Do( SwWrtShell::UNDO ); +// Undo fuer die Giesskann ist bereits im CommandHdl +//so sollte es sein!!! + return; } @@ -4009,7 +3879,6 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if( pAnchorMarker ) { Point aPnt( pAnchorMarker->GetLastPos() ); - //OLMpSdrView->RefreshAllIAOManagers(); DELETEZ( pAnchorMarker ); if( aPnt.X() || aPnt.Y() ) rSh.FindAnchorPos( aPnt, TRUE ); @@ -4177,7 +4046,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if( bHoldSelection ) { - //JP 27.04.99: Bug 65389 - das EndDrag sollte auf jedenfall + // das EndDrag sollte auf jedenfall // gerufen werden. bHoldSelection = FALSE; (rSh.*rSh.fnEndDrag)( &aDocPt, FALSE ); @@ -4203,8 +4072,6 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) (rSh.*rSh.fnEndDrag)( &aDocPt, FALSE ); // Internetfield? --> Link-Callen (DocLaden!!) -//JP 18.10.96: Bug 32437 - -// if( !rSh.HasSelection() ) if( !bInSel ) { USHORT nFilter = URLLOAD_NOFILTER; @@ -4255,8 +4122,6 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if ( aCntntAtPos.aFnd.pFldmark != NULL) { IFieldmark *fieldBM = const_cast< IFieldmark* > ( aCntntAtPos.aFnd.pFldmark ); - //SwDocShell* pDocSh = rView.GetDocShell(); - //SwDoc *pDoc=pDocSh->GetDoc(); if (fieldBM->GetFieldname( ).equalsAscii( ODF_FORMCHECKBOX ) ) { ICheckboxFieldmark* pCheckboxFm = dynamic_cast<ICheckboxFieldmark*>(fieldBM); @@ -4465,11 +4330,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) case SFX_STYLE_FAMILY_PSEUDO: if( !rSh.HasReadonlySel() ) { - // --> OD 2008-03-17 #refactorlists# rSh.SetCurNumRule( *pApplyTempl->aColl.pNumRule, false, pApplyTempl->aColl.pNumRule->GetDefaultListId() ); - // <-- bCallBase = FALSE; pApplyTempl->bUndo = TRUE; if( pApplyTempl->aColl.pNumRule ) @@ -4508,12 +4371,10 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) Window::MouseButtonUp(rMEvt); } - /*-------------------------------------------------------------------- Beschreibung: Vorlage anwenden --------------------------------------------------------------------*/ - void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl) { static BOOL bIdle = FALSE; @@ -4568,7 +4429,6 @@ void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl) Beschreibung: ctor --------------------------------------------------------------------*/ - SwEditWin::SwEditWin(Window *pParent, SwView &rMyView): Window(pParent, WinBits(WB_CLIPCHILDREN | WB_DIALOGCONTROL)), DropTargetHelper( this ), @@ -4594,8 +4454,8 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView): bLockInput(FALSE), bObjectSelect( FALSE ), - nKS_NUMDOWN_Count(0), // #i23725# - nKS_NUMINDENTINC_Count(0) // #i23725# + nKS_NUMDOWN_Count(0), + nKS_NUMINDENTINC_Count(0) { SetHelpId(HID_EDIT_WIN); EnableChildTransparentMode(); @@ -4603,7 +4463,7 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView): bLinkRemoved = bMBPressed = bInsDraw = bInsFrm = bIsInDrag = bOldIdle = bOldIdleSet = bChainMode = bWasShdwCrsr = FALSE; - //#i42732# initially use the input language + // initially use the input language bUseInputLanguage = sal_True; SetMapMode(MapMode(MAP_TWIP)); @@ -4623,7 +4483,7 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView): aTemplateTimer.SetTimeout(400); aTemplateTimer.SetTimeoutHdl(LINK(this, SwEditWin, TemplateTimerHdl)); - //JP 16.12.98: temporaere Loesung!!! Sollte bei jeder Cursorbewegung + // temporaere Loesung!!! Sollte bei jeder Cursorbewegung // den Font von der akt. einfuege Position setzen! if( !rMyView.GetDocShell()->IsReadOnly() ) { @@ -4633,8 +4493,6 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView): } } - - SwEditWin::~SwEditWin() { aKeyInputTimer.Stop(); @@ -4654,12 +4512,10 @@ SwEditWin::~SwEditWin() delete pAnchorMarker; } - /****************************************************************************** * Beschreibung: DrawTextEditMode einschalten ******************************************************************************/ - void SwEditWin::EnterDrawTextMode( const Point& aDocPos ) { if ( rView.EnterDrawTextMode(aDocPos) == TRUE ) @@ -4679,14 +4535,11 @@ void SwEditWin::EnterDrawTextMode( const Point& aDocPos ) * Beschreibung: DrawMode einschalten ******************************************************************************/ - - BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos) { SwWrtShell &rSh = rView.GetWrtShell(); SdrView *pSdrView = rSh.GetDrawView(); -// if ( GetDrawFuncPtr() && (aActHitType == SDRHIT_NONE || rSh.IsDrawCreate()) ) if ( rView.GetDrawFuncPtr() ) { if (rSh.IsDrawCreate()) @@ -4724,11 +4577,8 @@ BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos) * Beschreibung: ******************************************************************************/ - - BOOL SwEditWin::IsDrawSelMode() { -// return (IsFrmAction() == FALSE && GetSdrDrawMode() == OBJ_NONE); return IsObjectSelect(); } @@ -4736,7 +4586,6 @@ BOOL SwEditWin::IsDrawSelMode() * Beschreibung: ******************************************************************************/ - void SwEditWin::GetFocus() { if ( rView.GetPostItMgr()->HasActiveSidebarWin() ) @@ -4755,8 +4604,6 @@ void SwEditWin::GetFocus() * Beschreibung: ******************************************************************************/ - - void SwEditWin::LoseFocus() { rView.GetWrtShell().InvalidateAccessibleFocus(); @@ -4770,8 +4617,6 @@ void SwEditWin::LoseFocus() * Beschreibung: ******************************************************************************/ - - void SwEditWin::Command( const CommandEvent& rCEvt ) { SwWrtShell &rSh = rView.GetWrtShell(); @@ -4787,7 +4632,6 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) // menu from an inplace client has been closed. Now we have the chance // to deactivate the inplace client without any problem regarding parent // windows and code on the stack. - // For more information, see #126086# and #128122# SfxInPlaceClient* pIPClient = rSh.GetSfxViewShell()->GetIPClient(); BOOL bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() ); if ( bIsOleActive && ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )) @@ -4887,7 +4731,6 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) if ( VOICECOMMANDTYPE_CONTROL == pCData->GetType() ) break; - USHORT nSlotId = 0; SfxPoolItem *pItem = 0; @@ -5006,7 +4849,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) if ( sRecord.Len() ) { - // #102812# convert quotes in IME text + // convert quotes in IME text // works on the last input character, this is escpecially in Korean text often done // quotes that are inside of the string are not replaced! const sal_Unicode aCh = sRecord.GetChar(sRecord.Len() - 1); @@ -5134,7 +4977,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) GetView().GetViewFrame()->GetDispatcher()->Execute(SID_HANGUL_HANJA_CONVERSION); break; case COMMAND_INPUTLANGUAGECHANGE : - //#i42732# update state of fontname if input language changes + // i#42732 - update state of fontname if input language changes bInputLanguageSwitched = true; SetUseInputLanguage( sal_True ); break; @@ -5217,26 +5060,21 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) Window::Command(rCEvt); } -/* -----------------25.08.2003 10:12----------------- - #i18686#: select the object/cursor at the mouse - position of the context menu request - --------------------------------------------------*/ +/* i#18686 select the object/cursor at the mouse + position of the context menu request */ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) { BOOL bRet = FALSE; const Point aDocPos( PixelToLogic( rMousePos ) ); - // --> OD 2005-02-17 #i42258# const bool bIsInsideSelectedObj( rSh.IsInsideSelectedObj( aDocPos ) ); - // <-- //create a synthetic mouse event out of the coordinates MouseEvent aMEvt(rMousePos); SdrView *pSdrView = rSh.GetDrawView(); if ( pSdrView ) { - // --> OD 2005-02-17 #i42258# - no close of insert_draw and reset of + // no close of insert_draw and reset of // draw mode, if context menu position is inside a selected object. if ( !bIsInsideSelectedObj && rView.GetDrawFuncPtr() ) - // <-- { rView.GetDrawFuncPtr()->Deactivate(); @@ -5308,7 +5146,6 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) if( !rSh.IsSelFrmMode() && !GetView().GetViewFrame()->GetDispatcher()->IsLocked() ) { - // #107513# // Test if there is a draw object at that position and if it should be selected. sal_Bool bShould = rSh.ShouldObjectBeSelected(aDocPos); @@ -5458,8 +5295,6 @@ SfxShell* lcl_GetShellFromDispatcher( SwView& rView, TypeId nType ) return pShell; } - - void SwEditWin::ClearTip() { } @@ -5470,7 +5305,6 @@ IMPL_LINK( SwEditWin, KeyInputFlushHandler, Timer *, EMPTYARG ) return 0; } - IMPL_LINK( SwEditWin, KeyInputTimerHandler, Timer *, EMPTYARG ) { bTblInsDelMode = FALSE; @@ -5486,28 +5320,20 @@ void SwEditWin::_FinitStaticData() { delete pQuickHlpData; } -/* -----------------23.01.2003 12:15----------------- - * #i3370# remove quick help to prevent saving - * of autocorrection suggestions - * --------------------------------------------------*/ +/* i#3370 - remove quick help to prevent saving + * of autocorrection suggestions */ void SwEditWin::StopQuickHelp() { if( HasFocus() && pQuickHlpData && pQuickHlpData->bClear ) pQuickHlpData->Stop( rView.GetWrtShell() ); } -/*-----------------23.02.97 18:39------------------- - ---------------------------------------------------*/ - - IMPL_LINK(SwEditWin, TemplateTimerHdl, Timer*, EMPTYARG) { SetApplyTemplate(SwApplyTemplate()); return 0; } - void SwEditWin::SetChainMode( BOOL bOn ) { if ( !bChainMode ) @@ -5532,8 +5358,7 @@ void SwEditWin::SetChainMode( BOOL bOn ) uno::Reference< ::com::sun::star::accessibility::XAccessible > SwEditWin::CreateAccessible() { - SolarMutexGuard aGuard; // this should have - // happend already!!! + SolarMutexGuard aGuard; // this should have happend already!!! SwWrtShell *pSh = rView.GetWrtShellPtr(); OSL_ENSURE( pSh, "no writer shell, no accessible object" ); uno::Reference< @@ -5551,7 +5376,6 @@ void QuickHelpData::Move( QuickHelpData& rCpy ) // Pointer verschieben aArr.Insert( &rCpy.aArr ); rCpy.aArr.Remove( (USHORT)0, rCpy.aArr.Count() ); -// nTipId = rCpy.nTipId; bClear = rCpy.bClear; nLen = rCpy.nLen; nCurArrPos = rCpy.nCurArrPos; @@ -5581,7 +5405,6 @@ void QuickHelpData::ClearCntnt() delete[] pAttrs, pAttrs = 0; } - void QuickHelpData::Start( SwWrtShell& rSh, USHORT nWrdLen ) { if( pCETID ) delete pCETID, pCETID = 0; @@ -5629,8 +5452,6 @@ void QuickHelpData::Stop( SwWrtShell& rSh ) ClearCntnt(); } - - void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord ) { salhelper::SingletonRef<SwCalendarWrapper>* pCalendar = s_getCalendarWrapper(); @@ -5647,8 +5468,6 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord ) if( rWord.Len() + 1 < sStr.Len() && //!!! UNICODE: fehlendes interface -// pIntl->CompareEqual( rWord, sStr.Copy( 0, rWord.Len() ), -// INTN_COMPARE_IGNORECASE ) ) COMPARE_EQUAL == rWord.CompareIgnoreCaseToAscii( sStr, rWord.Len() )) { @@ -5670,9 +5489,9 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord ) while( nStt < nEnd ) { const String& rS = rACLst[ nStt ]; - //JP 16.06.99: Bug 66927 - only if the count of chars - // from the suggest greater as the - // actual word + // only if the count of chars + // from the suggest greater as the + // actual word if( rS.Len() > rWord.Len() ) { String* pNew = new String( rS ); @@ -5683,9 +5502,7 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord ) } } } -/* -----------------06.11.2002 12:01----------------- - * - * --------------------------------------------------*/ + void SwEditWin::ShowAutoTextCorrectQuickHelp( const String& rWord, SvxAutoCorrCfg* pACfg, SvxAutoCorrect* pACorr, sal_Bool bFromIME ) @@ -5717,10 +5534,6 @@ void SwEditWin::ShowAutoTextCorrectQuickHelp( pQuickHlpData->Start( rSh, rWord.Len() ); } -/* -----------------29.03.2006 11:01----------------- - * - * --------------------------------------------------*/ - void SwEditWin::SetUseInputLanguage( sal_Bool bNew ) { if ( bNew || bUseInputLanguage ) @@ -5732,9 +5545,6 @@ void SwEditWin::SetUseInputLanguage( sal_Bool bNew ) bUseInputLanguage = bNew; } -/*-- 13.11.2008 10:18:17--------------------------------------------------- - - -----------------------------------------------------------------------*/ XubString SwEditWin::GetSurroundingText() const { String sReturn; @@ -5760,9 +5570,7 @@ XubString SwEditWin::GetSurroundingText() const return sReturn; } -/*-- 13.11.2008 10:18:17--------------------------------------------------- - -----------------------------------------------------------------------*/ Selection SwEditWin::GetSurroundingTextSelection() const { SwWrtShell& rSh = rView.GetWrtShell(); diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 6cc805ecae33..0946da40cea1 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -71,7 +71,6 @@ #include <colmgr.hxx> #include <grfatr.hxx> #include <uiitems.hxx> -// OD 19.09.2003 #i18732# #include <fmtfollowtextflow.hxx> #include <frmui.hrc> @@ -114,7 +113,6 @@ struct StringIdPair_Impl #define MAX_PERCENT_WIDTH 254L #define MAX_PERCENT_HEIGHT 254L -// OD 19.09.2003 #i18732# - change order of alignments #define LB_FRAME 0x00000001L // Textbereich des Absatzes #define LB_PRTAREA 0x00000002L // Textbereich des Absatzes + Einzuege #define LB_VERT_FRAME 0x00000004L // Vertikaler Textbereich des Absatzes @@ -136,11 +134,9 @@ struct StringIdPair_Impl #define LB_REL_CHAR 0x00020000L // Zeichenausrichtung Zeichen #define LB_REL_ROW 0x00040000L // Zeichenausrichtung Zeile -// OD 10.11.2003 #i22305# #define LB_FLY_VERT_FRAME 0x00100000L // vertical entire frame #define LB_FLY_VERT_PRTAREA 0x00200000L // vertical frame text area -// OD 11.11.2003 #i22341# #define LB_VERT_LINE 0x00400000L // vertical text line static RelationMap __FAR_DATA aRelationMap[] = @@ -163,11 +159,9 @@ static RelationMap __FAR_DATA aRelationMap[] = {SwFPos::REL_BORDER, SwFPos::REL_BORDER, LB_VERT_FRAME, text::RelOrientation::FRAME}, {SwFPos::REL_PRTAREA, SwFPos::REL_PRTAREA, LB_VERT_PRTAREA, text::RelOrientation::PRINT_AREA}, - // OD 10.11.2003 #i22305# {SwFPos::FLY_REL_PG_FRAME, SwFPos::FLY_REL_PG_FRAME, LB_FLY_VERT_FRAME, text::RelOrientation::FRAME}, {SwFPos::FLY_REL_PG_PRTAREA, SwFPos::FLY_REL_PG_PRTAREA, LB_FLY_VERT_PRTAREA, text::RelOrientation::PRINT_AREA}, - // OD 11.11.2003 #i22341# {SwFPos::REL_LINE, SwFPos::REL_LINE, LB_VERT_LINE, text::RelOrientation::TEXT_LINE} }; @@ -232,8 +226,7 @@ static FrmMap __FAR_DATA aHFlyHtmlMap[] = {SwFPos::FROMLEFT, SwFPos::MIR_FROMLEFT, text::HoriOrientation::NONE, LB_FLY_REL_PG_FRAME} }; -// OD 19.09.2003 #i18732# - own vertical alignment map for to frame anchored objects -// OD 10.11.2003 #i22305# +// own vertical alignment map for to frame anchored objects #define VERT_FRAME_REL (LB_FLY_VERT_FRAME|LB_FLY_VERT_PRTAREA) static FrmMap __FAR_DATA aVFrameMap[] = @@ -246,7 +239,6 @@ static FrmMap __FAR_DATA aVFrameMap[] = static FrmMap __FAR_DATA aVFlyHtmlMap[] = { - // OD 10.11.2003 #i22305# {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, LB_FLY_VERT_FRAME}, {SwFPos::FROMTOP, SwFPos::FROMTOP, text::VertOrientation::NONE, LB_FLY_VERT_FRAME} }; @@ -280,7 +272,7 @@ static FrmMap __FAR_DATA aHParaHtmlAbsMap[] = {SwFPos::RIGHT, SwFPos::MIR_RIGHT, text::HoriOrientation::RIGHT, HTML_HORI_PARA_REL} }; -// OD 19.09.2003 #i18732# - allow vertical alignment at page areas +// allow vertical alignment at page areas #define VERT_PARA_REL (LB_VERT_FRAME|LB_VERT_PRTAREA| \ LB_REL_PG_FRAME|LB_REL_PG_PRTAREA) @@ -327,14 +319,12 @@ static FrmMap __FAR_DATA aHCharHtmlAbsMap[] = {SwFPos::FROMLEFT, SwFPos::MIR_FROMLEFT, text::HoriOrientation::NONE, LB_REL_PG_FRAME} }; -// OD 19.09.2003 #i18732# - allow vertical alignment at page areas -// OD 12.11.2003 #i22341# - handle <LB_REL_CHAR> on its own +// allow vertical alignment at page areas #define VERT_CHAR_REL (LB_VERT_FRAME|LB_VERT_PRTAREA| \ LB_REL_PG_FRAME|LB_REL_PG_PRTAREA) static FrmMap __FAR_DATA aVCharMap[] = { - // OD 11.11.2003 #i22341# // introduce mappings for new vertical alignment at top of line <LB_VERT_LINE> // and correct mapping for vertical alignment at character for position <FROM_BOTTOM> // Note: Because of these adjustments the map becomes ambigous in its values @@ -435,7 +425,6 @@ size_t lcl_GetFrmMapCount( const FrmMap* pMap) return sizeof(aHParaMap) / aSizeOf; if ( pMap == aHFrameMap ) return sizeof(aHFrameMap) / aSizeOf; - // OD 19.09.2003 #i18732# - own vertical alignment map for to frame anchored objects if ( pMap == aVFrameMap ) return sizeof(aVFrameMap) / aSizeOf; if ( pMap == aHCharMap ) @@ -544,7 +533,7 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString return eStringId; } -// OD 12.11.2003 #i22341# - helper method in order to determine all possible +// helper method in order to determine all possible // listbox relations in a relation map for a given relation ULONG lcl_GetLBRelationsForRelations( const USHORT _nRel ) { @@ -562,7 +551,7 @@ ULONG lcl_GetLBRelationsForRelations( const USHORT _nRel ) return nLBRelations; } -// OD 14.11.2003 #i22341# - helper method on order to determine all possible +// helper method on order to determine all possible // listbox relations in a relation map for a given string ID ULONG lcl_GetLBRelationsForStrID( const FrmMap* _pMap, const SvxSwFramePosString::StringId _eStrId, @@ -633,7 +622,6 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) : aAtVertPosED (this, SW_RES(ED_AT_VERT_POS)), aVertRelationFT (this, SW_RES(FT_VERT_RELATION)), aVertRelationLB (this, SW_RES(LB_VERT_RELATION)), - // OD 19.09.2003 #i18732# - new checkbox aFollowTextFlowCB(this, SW_RES(CB_FOLLOWTEXTFLOW)), aPositionFL (this, SW_RES(FL_POSITION)), @@ -654,7 +642,6 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) : nUpperBorder(0), nLowerBorder(0), fWidthHeightRatio(1.0), - // OD 12.11.2003 #i22341# mpToCharCntntPos( NULL ), nOldH(text::HoriOrientation::CENTER), @@ -672,7 +659,6 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) : aHeightED. SetLoseFocusHdl( aLk ); aAtHorzPosED.SetLoseFocusHdl( aLk ); aAtVertPosED.SetLoseFocusHdl( aLk ); - // OD 25.09.2003 #i18732# - click handler for new checkbox aFollowTextFlowCB.SetClickHdl( aLk ); aLk = LINK(this, SwFrmPage, ModifyHdl); @@ -728,7 +714,7 @@ namespace void SwFrmPage::EnableGraficMode( void ) { - // #i39692# mustn't be called more than once + // i#39692 - mustn't be called more than once if(!aRealSizeBT.IsVisible()) { long nOffset1 = aRelWidthCB.GetPosPixel().Y() - aAutoWidthCB.GetPosPixel().Y(); @@ -766,7 +752,6 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) SetMetric( aAtHorzPosED, aMetric ); SetMetric( aAtVertPosED, aMetric ); - const SwFmtAnchor& rAnchor = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR); if (bFormat) @@ -808,8 +793,6 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) aRealSizeBT.SetClickHdl(LINK(this, SwFrmPage, RealSizeHdl)); EnableGraficMode(); } -// else -// aTypeFL.SetSizePixel(Size(aTypeFL.GetSizePixel().Width(), aSizeFL.GetSizePixel().Height())); if ( nDlgType == DLG_FRM_GRF ) aFixedRatioCB.Check( FALSE ); @@ -823,11 +806,10 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) } else { -// aTypeFL.SetSizePixel(Size(aTypeFL.GetSizePixel().Width(), aSizeFL.GetSizePixel().Height())); aGrfSize = ((const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE)).GetSize(); } - //Prozenteingabe ermoeglichen. + // entering procent value made possible aWidthED. SetBaseValue( aWidthED.Normalize(aGrfSize.Width()), FUNIT_TWIP ); aHeightED.SetBaseValue( aHeightED.Normalize(aGrfSize.Height()), FUNIT_TWIP ); //the available space is not yet known so the RefValue has to be calculated from size and relative size values @@ -860,11 +842,11 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) default:; //prevent warning } - // OD 12.11.2003 #i22341# - determine content position of character + // i#22341 - determine content position of character // Note: content position can be NULL mpToCharCntntPos = rAnchor.GetCntntAnchor(); - // OD 19.09.2003 #i18732# - init checkbox value + // i#18732 - init checkbox value { const bool bFollowTextFlow = static_cast<const SwFmtFollowTextFlow&>(rSet.Get(RES_FOLLOW_TEXT_FLOW)).GetValue(); @@ -893,16 +875,16 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) aMirrorPagesCB.Show(FALSE); if(nDlgType == DLG_FRM_STD) aFixedRatioCB.Enable(FALSE); - // OD 19.09.2003 #i18732# - hide checkbox in HTML mode + // i#18732 hide checkbox in HTML mode aFollowTextFlowCB.Show(FALSE); } else { - // OD 06.11.2003 #i18732# correct enable/disable of check box 'Mirror on..' + // enable/disable of check box 'Mirror on..' aMirrorPagesCB.Enable(!aAnchorAsCharRB.IsChecked()); - // OD 06.11.2003 #i18732# - enable/disable check box 'Follow text flow'. - // OD 10.11.2003 #i22305# - enable check box 'Follow text + // enable/disable check box 'Follow text flow'. + // enable check box 'Follow text // flow' also for anchor type to-frame. aFollowTextFlowCB.Enable( aAnchorAtParaRB.IsChecked() || aAnchorAtCharRB.IsChecked() || @@ -912,7 +894,6 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) Init( rSet, TRUE ); aAtVertPosED.SaveValue(); aAtHorzPosED.SaveValue(); - // OD 19.09.2003 #i18732# aFollowTextFlowCB.SaveValue(); bNoModifyHdl = FALSE; @@ -1048,12 +1029,6 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet) const SwFmtFrmSize& rOldSize = (const SwFmtFrmSize& )rOldSet.Get(RES_FRM_SIZE); SwFmtFrmSize aSz( rOldSize ); -/* // Folgende Zeilen nur zum debuggen: - BOOL bModified = aWidthED.IsValueModified(); - USHORT nOldWidth = rOldSize.GetWidth (); - USHORT nWidth = aWidthED .GetValue(); - USHORT nMinWidth = aWidthED .GetMin();*/ - BOOL bValueModified = (aWidthED.IsValueModified() || aHeightED.IsValueModified()); BOOL bCheckChanged = (aRelWidthCB.GetSavedValue() != aRelWidthCB.IsChecked() || aRelHeightCB.GetSavedValue() != aRelHeightCB.IsChecked()); @@ -1114,11 +1089,10 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet) (aSz.GetHeight() > 0 || aSz.GetHeightPercent() > 0))) { if (aSz.GetHeightSizeType() == ATT_VAR_SIZE) // VAR_SIZE gibts nicht bei Rahmen - aSz.SetHeightSizeType(ATT_MIN_SIZE); // Bug #45776 (Vorlagen ohne Breite/Hoehe) + aSz.SetHeightSizeType(ATT_MIN_SIZE); bRet |= 0 != rSet.Put( aSz ); } - // OD 19.09.2003 #i18732# if(aFollowTextFlowCB.IsChecked() != aFollowTextFlowCB.GetSavedValue()) { bRet |= 0 != rSet.Put(SwFmtFollowTextFlow(aFollowTextFlowCB.IsChecked())); @@ -1165,7 +1139,7 @@ void SwFrmPage::InitPos(RndStdIds eId, } else if ( eId == FLY_AT_FLY ) { - // OD 19.09.2003 #i18732# - own vertical alignment map for to frame + // own vertical alignment map for to frame // anchored objects. pVMap = bHtmlMode ? aVFlyHtmlMap : aVFrameMap; pHMap = bHtmlMode ? aHFlyHtmlMap : aHFrameMap; @@ -1212,7 +1186,6 @@ void SwFrmPage::InitPos(RndStdIds eId, nH = nOldH; nHRel = nOldHRel; } - // OD 12.11.2003 #i22341# - pass <nHRel> as 3rd parameter to method <FillPosLB> USHORT nMapPos = FillPosLB(pHMap, nH, nHRel, aHorizontalDLB); FillRelLB(pHMap, nMapPos, nH, nHRel, aHoriRelationLB, aHoriRelationFT); @@ -1222,11 +1195,9 @@ void SwFrmPage::InitPos(RndStdIds eId, nV = nOldV; nVRel = nOldVRel; } - // OD 12.11.2003 #i22341# - pass <nVRel> as 3rd parameter to method <FillPosLB> nMapPos = FillPosLB(pVMap, nV, nVRel, aVerticalDLB); FillRelLB(pVMap, nMapPos, nV, nVRel, aVertRelationLB, aVertRelationFT); - // Edits init bEnable = nH == text::HoriOrientation::NONE && eId != FLY_AS_CHAR; if (!bEnable) { @@ -1276,7 +1247,7 @@ USHORT SwFrmPage::FillPosLB(const FrmMap* _pMap, _rLB.Clear(); - // OD 12.11.2003 #i22341# - determine all possible listbox relations for + // i#22341 determine all possible listbox relations for // given relation for map <aVCharMap> const ULONG nLBRelations = (_pMap != aVCharMap) ? 0L @@ -1286,8 +1257,7 @@ USHORT SwFrmPage::FillPosLB(const FrmMap* _pMap, size_t nCount = ::lcl_GetFrmMapCount(_pMap); for (size_t i = 0; _pMap && i < nCount; ++i) { -// #61359# Warum nicht von links/von innen bzw. von oben? -// if (!bFormat || (pMap[i].eStrId != SwFPos::FROMLEFT && pMap[i].eStrId != SwFPos::FROMTOP)) +// Warum nicht von links/von innen bzw. von oben? { SvxSwFramePosString::StringId eStrId = aMirrorPagesCB.IsChecked() ? _pMap[i].eMirrorStrId : _pMap[i].eStrId; eStrId = lcl_ChangeResIdToVerticalOrRTL(eStrId, bIsVerticalFrame, bIsInRightToLeft); @@ -1297,7 +1267,7 @@ USHORT SwFrmPage::FillPosLB(const FrmMap* _pMap, // bei zeichengebundenen Rahmen keine doppelten Eintraege einfuegen _rLB.InsertEntry(sEntry); } - // OD 12.11.2003 #i22341# - add condition to handle map <aVCharMap> + // i#22341 - add condition to handle map <aVCharMap> // that is ambigous in the alignment. if ( _pMap[i].nAlign == _nAlign && ( !(_pMap == aVCharMap) || _pMap[i].nLBRelations & nLBRelations ) ) @@ -1386,7 +1356,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap, { USHORT nRelCount = sizeof(aRelationMap) / sizeof(RelationMap); - // OD 14.11.2003 #i22341# - special handling for map <aVCharMap>, + // special handling for map <aVCharMap>, // because its ambigous in its <eStrId>/<eMirrorStrId>. if ( _pMap == aVCharMap ) { @@ -1489,7 +1459,7 @@ short SwFrmPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, { short nAlign = 0; - // OD 14.11.2003 #i22341# - special handling also for map <aVCharMap>, + // i#22341 special handling also for map <aVCharMap>, // because it contains ambigous items for alignment if ( pMap == aVAsCharHtmlMap || pMap == aVAsCharMap || pMap == aVCharMap ) @@ -1666,7 +1636,6 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG ) aVal.bAutoHeight = aAutoHeightCB.IsChecked(); aVal.bAutoWidth = aAutoWidthCB.IsChecked(); aVal.bMirror = aMirrorPagesCB.IsChecked(); - // OD 18.09.2003 #i18732# aVal.bFollowTextFlow = aFollowTextFlowCB.IsChecked(); if ( pHMap ) @@ -1783,9 +1752,9 @@ IMPL_LINK( SwFrmPage, AnchorTypeHdl, RadioButton *, EMPTYARG ) { aMirrorPagesCB.Enable(!aAnchorAsCharRB.IsChecked()); - // OD 06.11.2003 #i18732# - enable check box 'Follow text flow' for anchor + // i#18732 - enable check box 'Follow text flow' for anchor // type to-paragraph' and to-character - // OD 10.11.2003 #i22305# - enable check box 'Follow text + // i#22305 - enable check box 'Follow text // flow' also for anchor type to-frame. aFollowTextFlowCB.Enable( aAnchorAtParaRB.IsChecked() || aAnchorAtCharRB.IsChecked() || @@ -2233,12 +2202,6 @@ void SwFrmPage::SetFormatUsed(BOOL bFmt) aAnchorAtFrameRB.Hide(); aTypeFL.Hide(); aTypeSepFL.Hide(); - -// Point aSizePos = aSizeFL.GetPosPixel(); -// Size aSizeSize = aSizeFL.GetSizePixel(); -// aSizeSize.Width() = aTypeFL.GetPosPixel().X() + -// aTypeFL.GetSizePixel().Width() - aSizePos.X(); -// aSizeFL.SetSizePixel(aSizeSize); } } @@ -2889,7 +2852,6 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet ) aThisPageFrames.erase(aThisPageFrames.begin(), aThisPageFrames.end()); aRemainFrames.erase(aRemainFrames.begin(), aRemainFrames.end()); - pWrtSh->GetConnectableFrmFmts(*pFmt, sPrevChain, TRUE, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames ); lcl_InsertVectors(aNextLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames); @@ -2915,7 +2877,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet ) const SwFmtEditInReadonly& rEdit = (const SwFmtEditInReadonly& )rSet.Get(RES_EDIT_IN_READONLY); aEditInReadonlyCB.Check(rEdit.GetValue()); aEditInReadonlyCB.SaveValue(); - // drucken + // print const SvxPrintItem& rPrt = (const SvxPrintItem&)rSet.Get(RES_PRINT); aPrintFrameCB.Check(rPrt.GetValue()); aPrintFrameCB.SaveValue(); |