[PATCH 6/6] Some more bogus comments, commented code removed.
Robert Roth
robert.roth.off at gmail.com
Fri Nov 5 00:10:04 PDT 2010
---
sw/source/ui/frmdlg/wrap.cxx | 4 +-
sw/source/ui/uiview/uivwimp.cxx | 2 -
sw/source/ui/utlui/content.cxx | 93 +++++++-------------------------------
sw/source/ui/utlui/glbltree.cxx | 9 ----
sw/source/ui/utlui/prcntfld.cxx | 8 +---
sw/source/ui/utlui/unotools.cxx | 2 -
6 files changed, 21 insertions(+), 97 deletions(-)
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index dee3c62..4bf818d 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -42,7 +42,7 @@
#include <editeng/opaqitem.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/lrspitem.hxx>
-// OD 18.09.2003 #i18732#
+// #i18732#
#include <fmtfollowtextflow.hxx>
#include <svx/swframevalidation.hxx>
@@ -447,7 +447,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
aVal.bAutoHeight = rFrmSize.GetHeightSizeType() == ATT_MIN_SIZE;
aVal.bAutoWidth = rFrmSize.GetWidthSizeType() == ATT_MIN_SIZE;
aVal.bMirror = rHori.IsPosToggle();
- // OD 18.09.2003 #i18732#
+ // #i18732#
aVal.bFollowTextFlow =
static_cast<const SwFmtFollowTextFlow&>(rSet.Get(RES_FOLLOW_TEXT_FLOW)).GetValue();
diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx
index 3350d8d..5394818 100644
--- a/sw/source/ui/uiview/uivwimp.cxx
+++ b/sw/source/ui/uiview/uivwimp.cxx
@@ -158,8 +158,6 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq )
else
{
rReq.Ignore();
-// KA 04.07.2002
-// InfoBox( 0, SW_RES(MSG_SCAN_NOSOURCE) ).Execute();
}
}
break;
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index b7bd209..b032530 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -97,7 +97,6 @@
#include "globals.hrc"
#include <unomid.h>
-
#define CTYPE_CNT 0
#define CTYPE_CTT 1
@@ -107,7 +106,6 @@ using namespace ::com::sun::star::text;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::container;
-
#define NAVI_BOOKMARK_DELIM (sal_Unicode)1
typedef SwContent* SwContentPtr;
@@ -116,7 +114,6 @@ SV_IMPL_OP_PTRARR_SORT(SwContentArr, SwContentPtr)
sal_Bool SwContentTree::bIsInDrag = sal_False;
-
namespace
{
static sal_Bool lcl_IsContent(SvLBoxEntry* pEntry)
@@ -124,13 +121,11 @@ namespace
return ((SwTypeNumber*)pEntry->GetUserData())->GetTypeId() == CTYPE_CNT;
}
-
static sal_Bool lcl_IsContentType(SvLBoxEntry* pEntry)
{
return ((SwTypeNumber*)pEntry->GetUserData())->GetTypeId() == CTYPE_CTT;
}
-
static sal_Bool lcl_FindShell(SwWrtShell* pShell)
{
sal_Bool bFound = sal_False;
@@ -328,7 +323,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
if( !pFmt->GetInfo( aAskItem ) &&
!aAskItem.pObject ) // not visible
pCnt->SetInvisible();
- pMember->Insert(pCnt);//, pMember->Count());
+ pMember->Insert(pCnt);
sal_uInt16 nPos = pMember->Count() - 1;
if(nOldRegionCount > nPos &&
@@ -386,7 +381,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
RTL_TEXTENCODING_UTF8 ),
&p->rINetAttr,
n );
- pMember->Insert( pCnt );//, n );
+ pMember->Insert( pCnt );
}
bEdit = sal_True;
nOldMemberCount = nMemberCount;
@@ -423,28 +418,8 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
nMemberCount++;
}
}
- /*
- // this code can be used once we want redline comments in the margin
- else // redcomment
- {
- SwRedline* pRedline = static_cast<SwRedline*>((*i)->GetBroadCaster());
- if ( pRedline->GetComment() != String(::rtl::OUString::createFromAscii("")) )
- {
- String sEntry = pRedline->GetComment();
- RemoveNewline(sEntry);
- SwPostItContent* pCnt = new SwPostItContent(
- this,
- sEntry, // hier steht der Text
- pRedline,
- nMemberCount);
- pMember->Insert(pCnt);
- nMemberCount++;
- }
- }
- */
}
}
- //
sTypeToken = aEmptyStr;
bEdit = sal_True;
nOldMemberCount = nMemberCount;
@@ -462,10 +437,8 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
for( sal_uInt32 i=0; i< nCount; i++ )
{
SdrObject* pTemp = pPage->GetObj(i);
- // --> OD 2006-03-09 #i51726# - all drawing objects can be named now
-// if(pTemp->ISA(SdrObjGroup) && pTemp->GetName().Len())
+ // #i51726# - all drawing objects can be named now
if ( pTemp->GetName().Len() )
- // <--
nMemberCount++;
}
}
@@ -578,7 +551,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
!aAskItem.pObject ) // not visible
pCnt->SetInvisible();
- pMember->Insert(pCnt);//, i);
+ pMember->Insert(pCnt);
if(nOldMemberCount > (int)i &&
(pOldMember->GetObject(i))->IsInvisible() != pCnt->IsInvisible())
@@ -623,7 +596,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
if( !pFrmFmt->GetInfo( aAskItem ) &&
!aAskItem.pObject ) // not visible
pCnt->SetInvisible();
- pMember->Insert(pCnt);//, i);
+ pMember->Insert(pCnt);
if(nOldMemberCount > (int)i &&
(pOldMember->GetObject(i))->IsInvisible() != pCnt->IsInvisible())
*pbLevelOrVisibiblityChanged = sal_True;
@@ -642,7 +615,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
const String& rBkmName = ppBookmark->get()->GetName();
//nYPos von 0 -> text::Bookmarks werden nach Alphabet sortiert
SwContent* pCnt = new SwContent(this, rBkmName, 0);
- pMember->Insert(pCnt);//, pMember->Count());
+ pMember->Insert(pCnt);
}
}
}
@@ -675,7 +648,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
if( !pFmt->GetInfo( aAskItem ) &&
!aAskItem.pObject ) // not visible
pCnt->SetInvisible();
- pMember->Insert(pCnt);//, pMember->Count());
+ pMember->Insert(pCnt);
sal_uInt16 nPos = pMember->Count() - 1;
if(nOldMemberCount > nPos &&
@@ -697,7 +670,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
//Referenzen nach Alphabet sortiert
SwContent* pCnt = new SwContent(
this, *aRefMarks.GetObject(i), 0);
- pMember->Insert(pCnt);//, i);
+ pMember->Insert(pCnt);
}
}
break;
@@ -718,7 +691,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
RTL_TEXTENCODING_UTF8 ),
&p->rINetAttr,
n );
- pMember->Insert( pCnt );//, n );
+ pMember->Insert( pCnt );
}
}
break;
@@ -738,7 +711,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
!aAskItem.pObject ) // not visible
pCnt->SetInvisible();
- pMember->Insert( pCnt );//, nTox );
+ pMember->Insert( pCnt );
sal_uInt16 nPos = pMember->Count() - 1;
if(nOldMemberCount > nPos &&
(pOldMember->GetObject(nPos))->IsInvisible()
@@ -796,7 +769,6 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
*/
}
}
- //
}
break;
case CONTENT_TYPE_DRAWOBJECT:
@@ -816,10 +788,8 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
for( sal_uInt32 i=0; i< nCount; i++ )
{
SdrObject* pTemp = pPage->GetObj(i);
- // --> OD 2006-03-09 #i51726# - all drawing objects can be named now
-// if(pTemp->ISA(SdrObjGroup) && pTemp->GetName().Len())
+ // #i51726# - all drawing objects can be named now
if ( pTemp->GetName().Len() )
- // <--
{
SwContact* pContact = (SwContact*)pTemp->GetUserCall();
long nYPos = 0;
@@ -1017,7 +987,6 @@ sal_Int8 SwContentTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
return bIsInDrag ? DND_ACTION_NONE : GetParentWindow()->ExecuteDrop(rEvt);
}
-
/***************************************************************************
Beschreibung: Handler fuer Dragging und ContextMenu
***************************************************************************/
@@ -1172,14 +1141,6 @@ PopupMenu* SwContentTree::CreateContextMenu( void )
pSubPop4->InsertItem(600, sPostItShow );
pSubPop4->InsertItem(601, sPostItHide );
pSubPop4->InsertItem(602, sPostItDelete );
- /*
- pSubPop4->InsertItem(603,rtl::OUString::createFromAscii("Sort"));
- PopupMenu* pMenuSort = new PopupMenu;
- pMenuSort->InsertItem(604,rtl::OUString::createFromAscii("By Position"));
- pMenuSort->InsertItem(605,rtl::OUString::createFromAscii("By Author"));
- pMenuSort->InsertItem(606,rtl::OUString::createFromAscii("By Date"));
- pSubPop4->SetPopupMenu(603, pMenuSort);
- */
pPop->InsertItem(4, pType->GetSingleName());
pPop->SetPopupMenu(4, pSubPop4);
}
@@ -1383,7 +1344,6 @@ sal_Bool SwContentTree::Collapse( SvLBoxEntry* pParent )
bRet = SvTreeListBox::Collapse(pParent);
}
else
-// bRet = sal_False;
bRet = SvTreeListBox::Collapse(pParent);
return bRet;
}
@@ -1484,7 +1444,6 @@ void SwContentTree::Display( sal_Bool bActive )
if(!*ppContentT)
(*ppContentT) = new SwContentType(pShell, nCntType, nOutlineLevel );
-
String sEntry = (*ppContentT)->GetName();
SvLBoxEntry* pEntry;
const Image& rImage = aEntryImages.GetImage(SID_SW_START + nCntType);
@@ -1651,7 +1610,7 @@ sal_Bool SwContentTree::FillTransferData( TransferDataContainer& rTransfer,
OSL_ENSURE(nPos < pWrtShell->getIDocumentOutlineNodesAccess()->getOutlineNodesCount(),
"outlinecnt changed");
- // #100738# make sure outline may actually be copied
+ // make sure outline may actually be copied
if( pWrtShell->IsOutlineCopyable( nPos ) )
{
const SwNumRule* pOutlRule = pWrtShell->GetOutlineNumRule();
@@ -1686,7 +1645,7 @@ sal_Bool SwContentTree::FillTransferData( TransferDataContainer& rTransfer,
break;
case CONTENT_TYPE_URLFIELD:
sUrl = ((SwURLFieldContent*)pCnt)->GetURL();
- // kein break;
+ // no break;
case CONTENT_TYPE_OLE:
case CONTENT_TYPE_GRAPHIC:
if(GetParentWindow()->GetRegionDropMode() != REGION_MODE_NONE)
@@ -2035,8 +1994,6 @@ void SwContentTree::FindActiveTypeAndRemoveUserData()
if(pEntry->GetUserData() && lcl_IsContentType(pEntry))
nLastSelType = ((SwContentType*)pEntry->GetUserData())->GetType();
}
-// else
-// nLastSelType = USHRT_MAX;
pEntry = First();
while(pEntry)
{
@@ -2385,7 +2342,7 @@ sal_Bool SwContentTree::NotifyMoving( SvLBoxEntry* pTarget,
aActiveContentArr[CONTENT_TYPE_OUTLINE]->Invalidate();
Display(sal_True);
}
- //TreeListBox wird aus dem Dokument neu geladen
+ //TreeListBox will be reloaed from the document
return sal_False;
}
@@ -2416,7 +2373,6 @@ sal_Bool SwContentTree::NotifyCopying( SvLBoxEntry* pTarget,
}
-
OSL_ENSURE( pEntry &&
lcl_IsContent(pEntry),"Source == 0 or Source has no Content" );
GetParentWindow()->MoveOutline( nSourcePos, nTargetPos, sal_False);
@@ -2707,7 +2663,7 @@ void SwContentTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
break;
}
//Anzeige
- default: // nSelectedPopupEntry > 300
+ default:
if(nSelectedPopupEntry > 300 && nSelectedPopupEntry < 400)
{
nSelectedPopupEntry -= 300;
@@ -2949,15 +2905,6 @@ void SwContentTree::EditEntry(SvLBoxEntry* pEntry, sal_uInt8 nMode)
pActiveShell->GetView().GetPostItMgr()->SetActiveSidebarWin(0);
pActiveShell->DelRight();
}
- /*
- // this code can be used once we want redline comments in the margin
- else
- {
- SwMarginWin* pComment = pActiveShell->GetView().GetPostItMgr()->GetPostIt(((SwPostItContent*)pCnt)->GetRedline());
- if (pComment)
- pComment->Delete();
- }
- */
}
else
{
@@ -3127,10 +3074,8 @@ void SwContentTree::GotoContent(SwContent* pCnt)
for( sal_uInt32 i=0; i< nCount; i++ )
{
SdrObject* pTemp = pPage->GetObj(i);
- // --> OD 2006-03-09 #i51726# - all drawing objects can be named now
-// if(pTemp->ISA(SdrObjGroup) && pTemp->GetName() == pCnt->GetName())
+ // #i51726# - all drawing objects can be named now
if ( pTemp->GetName() == pCnt->GetName() )
- // <--
{
SdrPageView* pPV = pDrawView->GetSdrPageView();
if( pPV )
@@ -3154,9 +3099,7 @@ void SwContentTree::GotoContent(SwContent* pCnt)
rView.GetEditWin().GrabFocus();
}
-/*-----------------06.02.97 19.14-------------------
- Jetzt nochtdie passende text::Bookmark
---------------------------------------------------*/
+/* Jetzt nochtdie passende text::Bookmark */
NaviContentBookmark::NaviContentBookmark()
:
nDocSh(0),
@@ -3231,7 +3174,6 @@ void SwContentLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFl
if(lcl_IsContent(pEntry) &&
((SwContent *)pEntry->GetUserData())->IsInvisible())
{
- //* pCont = (SwContent*)pEntry->GetUserData();
Font aOldFont( rDev.GetFont());
Font aFont(aOldFont);
Color aCol( COL_LIGHTGRAY );
@@ -3257,5 +3199,4 @@ void SwContentTree::DataChanged( const DataChangedEvent& rDCEvt )
SvTreeListBox::DataChanged( rDCEvt );
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx
index 90ab5f9..ee43c7c 100644
--- a/sw/source/ui/utlui/glbltree.cxx
+++ b/sw/source/ui/utlui/glbltree.cxx
@@ -78,8 +78,6 @@ using ::rtl::OUString;
// Kontextmenue fuer GlobalTree
#define CTX_INSERT_ANY_INDEX 10
-//#define CTX_INSERT_CNTIDX 11
-//#define CTX_INSERT_USRIDX 12
#define CTX_INSERT_FILE 11
#define CTX_INSERT_NEW_FILE 12
#define CTX_INSERT_TEXT 13
@@ -413,8 +411,6 @@ void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox)
pMenu->SetHelpId(i, aHelpForMenu[i] );
}
pMenu->EnableItem(CTX_INSERT_ANY_INDEX, 0 != (nEnableFlags & ENABLE_INSERT_IDX ));
-// pMenu->EnableItem(CTX_INSERT_CNTIDX, 0 != (nEnableFlags & ENABLE_INSERT_IDX ));
-// pMenu->EnableItem(CTX_INSERT_USRIDX, 0 != (nEnableFlags & ENABLE_INSERT_IDX ));
pMenu->EnableItem(CTX_INSERT_TEXT, 0 != (nEnableFlags & ENABLE_INSERT_TEXT));
pMenu->EnableItem(CTX_INSERT_FILE, 0 != (nEnableFlags & ENABLE_INSERT_FILE));
pMenu->EnableItem(CTX_INSERT_NEW_FILE, 0 != (nEnableFlags & ENABLE_INSERT_FILE));
@@ -792,9 +788,7 @@ IMPL_LINK( SwGlobalTree, PopupHdl, Menu* , pMenu)
}
void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
-//IMPL_LINK( SwGlobalTree, PopupHdl, Menu* , pMenu)
{
-// USHORT nId = pMenu->GetCurItemId();
SvLBoxEntry* pEntry = FirstSelected();
SwGlblDocContent* pCont = pEntry ? (SwGlblDocContent*)pEntry->GetUserData() : 0;
// wird waehrend des Dialogs ein RequestHelp gerufen,
@@ -889,8 +883,6 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
}
break;
case CTX_INSERT_ANY_INDEX:
-// case CTX_INSERT_CNTIDX:
-// case CTX_INSERT_USRIDX:
{
if(pContCopy)
{
@@ -1024,7 +1016,6 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
delete pContCopy;
else
bDeleteContentCopy = true;
-// return TRUE;
}
IMPL_LINK( SwGlobalTree, Timeout, Timer*, EMPTYARG )
diff --git a/sw/source/ui/utlui/prcntfld.cxx b/sw/source/ui/utlui/prcntfld.cxx
index 18a6ef6..5b7dfbb 100644
--- a/sw/source/ui/utlui/prcntfld.cxx
+++ b/sw/source/ui/utlui/prcntfld.cxx
@@ -31,8 +31,6 @@
#include "prcntfld.hxx"
-// STATIC DATA -----------------------------------------------------------
-
PercentField::PercentField( Window* pWin, const ResId& rResId ) :
MetricField ( pWin, rResId ),
@@ -84,7 +82,7 @@ void PercentField::ShowPercent(BOOL bPercent)
SetDecimalDigits( 0 );
nAktWidth = ConvertValue(nOldMin, 0, nOldDigits, eOldUnit, FUNIT_TWIP);
- // Um 0.5 Prozent aufrunden
+ // round to 0.5 percent
nPercent = ((nAktWidth * 10) / nRefValue + 5) / 10;
MetricField::SetMin(Max(static_cast< sal_Int64 >(1), nPercent));
@@ -101,7 +99,6 @@ void PercentField::ShowPercent(BOOL bPercent)
}
else
MetricFormatter::SetValue(nLastPercent);
-// SetValue(100, FUNIT_CUSTOM);
}
else
{
@@ -215,7 +212,6 @@ void PercentField::SetMax(sal_Int64 nNewMax, FieldUnit eInUnit)
{
if (eInUnit == FUNIT_NONE)
eInUnit = eOldUnit;
-// SetRefValue(Convert(nNewMax, eInUnit, FUNIT_TWIP));
}
}
@@ -297,7 +293,7 @@ sal_Int64 PercentField::Convert(sal_Int64 nValue, FieldUnit eInUnit, FieldUnit e
nAktWidth = nValue;
else
nAktWidth = ConvertValue(nValue, 0, nOldDigits, eInUnit, FUNIT_TWIP);
- // Um 0.5 Prozent runden
+ // Round to 0.5 percent
return ((nAktWidth * 1000) / nRefValue + 5) / 10;
}
diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx
index a61579e..f9dd3cf 100644
--- a/sw/source/ui/utlui/unotools.cxx
+++ b/sw/source/ui/utlui/unotools.cxx
@@ -97,7 +97,6 @@ SwOneExampleFrame::SwOneExampleFrame( Window& rWin,
// the controller is asynchronously set
aLoadedTimer.SetTimeoutHdl(LINK(this, SwOneExampleFrame, TimeoutHdl));
-// aLoadedTimer.SetTimeout(500);
aLoadedTimer.SetTimeout(200);
rWin.Enable(sal_False);
@@ -146,7 +145,6 @@ void SwOneExampleFrame::CreateControl()
uno::Reference< beans::XPropertySet > xPrSet(xInst, uno::UNO_QUERY);
uno::Any aURL;
- //
// create new doc
String sTempURL = C2S(cFactory);
if(sArgumentURL.Len())
--
1.7.1
--=-oGBwvzBqyAfXB2YY0tfw--
More information about the LibreOffice
mailing list