summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2010-11-13 20:23:06 +0000
committerCaolán McNamara <caolanm@redhat.com>2010-11-13 21:03:33 +0000
commitc98643446524eaae7774e1b2cb315ce616b116f2 (patch)
tree9242cc9aac56c4b3ba13b9985a5856b07d8a5b7f /sfx2
parented9367d7ef823cdaf6097b45d2f91e3901c47bab (diff)
tidy up hicontrast remains
remove unused parameters, shrink code accordingly, devirtualize methods which are not overridden anywhere and only used by docvor.cxx
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/docvor.cxx11
-rw-r--r--sfx2/source/doc/objcont.cxx49
2 files changed, 21 insertions, 39 deletions
diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx
index 5f500ff70e..f9071e646b 100644
--- a/sfx2/source/doc/docvor.cxx
+++ b/sfx2/source/doc/docvor.cxx
@@ -531,7 +531,7 @@ BOOL SfxOrganizeListBox_Impl::Select( SvLBoxEntry* pEntry, BOOL bSelect )
Path aPath(this, pEntry);
GetObjectShell(aPath)->TriggerHelpPI(
- aPath[nLevel+1], aPath[nLevel+2], aPath[nLevel+3]);
+ aPath[nLevel+1], aPath[nLevel+2]);
return SvTreeListBox::Select(pEntry,bSelect);
}
@@ -1187,19 +1187,18 @@ void SfxOrganizeListBox_Impl::RequestingChilds( SvLBoxEntry* pEntry )
SfxObjectShellRef aRef = GetObjectShell(aPath);
if(aRef.Is())
{
- const USHORT nCount = aRef->GetContentCount(
- aPath[nDocLevel+1], aPath[nDocLevel+2]);
+ const USHORT nCount = aRef->GetContentCount(aPath[nDocLevel+1]);
String aText;
Bitmap aClosedBmp, aOpenedBmp;
- const BOOL bCanHaveChilds =
+ const bool bCanHaveChilds =
aRef->CanHaveChilds(aPath[nDocLevel+1],
aPath[nDocLevel+2]);
for(USHORT i = 0; i < nCount; ++i)
{
- BOOL bDeletable;
+ bool bDeletable;
aRef->GetContent(
aText, aClosedBmp, aOpenedBmp, bDeletable,
- i, aPath[nDocLevel+1], aPath[nDocLevel+2]);
+ i, aPath[nDocLevel+1]);
// Create image with the correct mask color
Image aClosedImage( aClosedBmp, aMaskColor );
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index e647ed6867..6ecc69f0a4 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -329,11 +329,9 @@ void SfxObjectShell::SetOrganizerSearchMask(
//--------------------------------------------------------------------
-USHORT SfxObjectShell::GetContentCount(
- USHORT nIdx1,
- USHORT /*nIdx2*/)
+sal_uInt16 SfxObjectShell::GetContentCount(sal_uInt16 nIdx)
{
- switch(nIdx1)
+ switch(nIdx)
{
case INDEX_IGNORE:
return DEF_CONTENT_COUNT;
@@ -347,20 +345,14 @@ USHORT SfxObjectShell::GetContentCount(
}
case CONTENT_MACRO:
break;
-/*
- case CONTENT_CONFIG:
- return ( GetConfigManager() ) ?
- GetConfigManager()->GetItemCount() : 0;
- break;
- */
}
return 0;
}
//--------------------------------------------------------------------
-//TODO/CLEANUP: remove this method (it's virtual)
-void SfxObjectShell::TriggerHelpPI(USHORT nIdx1, USHORT nIdx2, USHORT)
+//TODO/CLEANUP: remove this method
+void SfxObjectShell::TriggerHelpPI(USHORT nIdx1, USHORT nIdx2)
{
if(nIdx1==CONTENT_STYLE && nIdx2 != INDEX_IGNORE) //StyleSheets
{
@@ -369,38 +361,29 @@ void SfxObjectShell::TriggerHelpPI(USHORT nIdx1, USHORT nIdx2, USHORT)
}
}
-BOOL SfxObjectShell::CanHaveChilds(USHORT nIdx1,
- USHORT nIdx2)
+bool SfxObjectShell::CanHaveChilds(sal_uInt16 nIdx1, sal_uInt16 nIdx2)
{
- switch(nIdx1) {
+ switch(nIdx1)
+ {
case INDEX_IGNORE:
- return TRUE;
+ return true;
case CONTENT_STYLE:
- return INDEX_IGNORE == nIdx2 || !GetStyleSheetPool()? FALSE: TRUE;
+ return INDEX_IGNORE == nIdx2 || !GetStyleSheetPool() ? false : true;
case CONTENT_MACRO:
-//!! return INDEX_IGNORE == nIdx2? FALSE: TRUE;
- return FALSE;
-/*
- case CONTENT_CONFIG:
- return INDEX_IGNORE == nIdx2 ? FALSE : TRUE;
- */
+ return false;
}
- return FALSE;
+ return false;
}
//--------------------------------------------------------------------
-void SfxObjectShell::GetContent(String &rText,
- Bitmap &rClosedBitmap,
- Bitmap &rOpenedBitmap,
- BOOL &bCanDel,
- USHORT i,
- USHORT nIdx1,
- USHORT /*nIdx2*/ )
+void SfxObjectShell::GetContent(String &rText,
+ Bitmap &rClosedBitmap, Bitmap &rOpenedBitmap,
+ bool &bCanDel, sal_uInt16 i, sal_uInt16 nIdx)
{
- bCanDel=TRUE;
+ bCanDel=true;
- switch(nIdx1)
+ switch(nIdx)
{
case INDEX_IGNORE:
{