Kaydet (Commit) 19701064 authored tarafından Michael Stahl's avatar Michael Stahl

remove some more SfxObjectShell methods that only call each other

Change-Id: I71807adff43ce2cfb748764edcc5880cdbba746f
üst 1ed9d506
......@@ -508,24 +508,6 @@ public:
#define DEF_CONTENT_COUNT 1
virtual void SetOrganizerSearchMask(
SfxStyleSheetBasePool* ) const;
virtual sal_Bool CanHaveChildren(
sal_uInt16 nIdx1,
sal_uInt16 nIdx2 = INDEX_IGNORE
);
virtual void GetContent( String &,
Bitmap &rClosedBitmap,
Bitmap &rOpenedBitmap,
sal_Bool &bCanDelete,
sal_uInt16 nPos,
sal_uInt16 nIdx1
);
virtual Bitmap GetStyleFamilyBitmap(SfxStyleFamily eFamily);
virtual void LoadStyles( SfxObjectShell &rSource );
void ReadNote( INote * );
void UpdateNote( INote * );
......
......@@ -212,12 +212,6 @@ void DrawDocShell::Execute( SfxRequest& rReq )
}
}
void DrawDocShell::SetOrganizerSearchMask(SfxStyleSheetBasePool* pBasePool) const
{
pBasePool->SetSearchMask(SD_STYLE_FAMILY_GRAPHICS, SFXSTYLEBIT_USERDEF | SFXSTYLEBIT_USED);
}
void DrawDocShell::SetDocShellFunction( const ::sd::FunctionReference& xFunction )
{
if( mxDocShellFunction.is() )
......
......@@ -94,7 +94,6 @@ public:
virtual Printer* GetDocumentPrinter();
virtual void OnDocumentPrinterChanged(Printer* pNewPrinter);
virtual SfxStyleSheetBasePool* GetStyleSheetPool();
virtual void SetOrganizerSearchMask(SfxStyleSheetBasePool* pBasePool) const;
virtual Size GetFirstPageSize();
virtual void FillClass(SvGlobalName* pClassName, sal_uInt32* pFormat, OUString* pAppName, OUString* pFullTypeName, OUString* pShortTypeName, sal_Int32 nFileFormat, sal_Bool bTemplate = sal_False ) const;
virtual void SetModified( sal_Bool = sal_True );
......
......@@ -303,119 +303,6 @@ SfxStyleSheetBasePool* SfxObjectShell::GetStyleSheetPool()
return 0;
}
void SfxObjectShell::SetOrganizerSearchMask(
SfxStyleSheetBasePool* pStylePool) const
{
pStylePool->SetSearchMask(
SFX_STYLE_FAMILY_ALL,
SFXSTYLEBIT_USERDEF | SFXSTYLEBIT_USED);
}
//--------------------------------------------------------------------
sal_Bool SfxObjectShell::CanHaveChildren(sal_uInt16 nIdx1, sal_uInt16 nIdx2)
{
switch(nIdx1)
{
case INDEX_IGNORE:
return true;
case CONTENT_STYLE:
return INDEX_IGNORE == nIdx2 || !GetStyleSheetPool() ? false : true;
case CONTENT_MACRO:
return false;
}
return false;
}
//--------------------------------------------------------------------
void SfxObjectShell::GetContent(String &rText,
Bitmap &rClosedBitmap,
Bitmap &rOpenedBitmap,
sal_Bool &bCanDel,
sal_uInt16 i,
sal_uInt16 nIdx
)
{
bCanDel=true;
switch(nIdx)
{
case INDEX_IGNORE:
{
sal_uInt16 nTextResId = 0;
sal_uInt16 nClosedBitmapResId = 0; // evtl. sp"ater mal unterschiedliche
sal_uInt16 nOpenedBitmapResId = 0; // " " " "
switch(i)
{
case CONTENT_STYLE:
nTextResId = STR_STYLES;
nClosedBitmapResId= BMP_STYLES_CLOSED;
nOpenedBitmapResId= BMP_STYLES_OPENED;
break;
case CONTENT_MACRO:
nTextResId = STR_MACROS;
nClosedBitmapResId= BMP_STYLES_CLOSED;
nOpenedBitmapResId= BMP_STYLES_OPENED;
break;
}
if ( nTextResId )
{
rText = SfxResId(nTextResId).toString();
rClosedBitmap = Bitmap(SfxResId(nClosedBitmapResId));
rOpenedBitmap = Bitmap(SfxResId(nOpenedBitmapResId));
}
break;
}
case CONTENT_STYLE:
{
SfxStyleSheetBasePool *pStylePool = GetStyleSheetPool();
SetOrganizerSearchMask(pStylePool);
SfxStyleSheetBase *pStyle = (*pStylePool)[i];
rText = pStyle->GetName();
bCanDel=((pStyle->GetMask() & SFXSTYLEBIT_USERDEF)
== SFXSTYLEBIT_USERDEF);
rClosedBitmap = rOpenedBitmap =
GetStyleFamilyBitmap(pStyle->GetFamily());
}
break;
case CONTENT_MACRO:
break;
}
}
//--------------------------------------------------------------------
Bitmap SfxObjectShell::GetStyleFamilyBitmap(SfxStyleFamily eFamily)
{
sal_uInt16 nResId = 0;
switch(eFamily)
{
case SFX_STYLE_FAMILY_CHAR:
nResId = BMP_STYLES_FAMILY1;
break;
case SFX_STYLE_FAMILY_PARA:
nResId = BMP_STYLES_FAMILY2;
break;
case SFX_STYLE_FAMILY_FRAME:
nResId = BMP_STYLES_FAMILY3;
break;
case SFX_STYLE_FAMILY_PAGE :
nResId = BMP_STYLES_FAMILY4;
break;
case SFX_STYLE_FAMILY_PSEUDO:
case SFX_STYLE_FAMILY_ALL:
break;
}
if ( nResId )
return Bitmap(SfxResId(nResId));
else
return Bitmap();
}
void SfxObjectShell::LoadStyles
(
SfxObjectShell &rSource /* the document template from which
......
......@@ -135,7 +135,6 @@ class SW_DLLPUBLIC SwDocShell: public SfxObjectShell, public SfxListener
using SfxObjectShell::GetVisArea;
using SfxObjectShell::GetStyleFamilyBitmap;
protected:
/// override to update text fields
......@@ -199,9 +198,6 @@ public:
/// For Style PI.
virtual SfxStyleSheetBasePool* GetStyleSheetPool();
/// For Organizer.
virtual Bitmap GetStyleFamilyBitmap( SfxStyleFamily eFamily );
/// Set View for actions via Shell.
void SetView(SwView* pVw);
const SwView *GetView() const { return pView; }
......
......@@ -1320,11 +1320,4 @@ void SwDocShell::FormatPage(
Edit( rPage, aEmptyStr, SFX_STYLE_FAMILY_PAGE, 0, sal_False, nSlot, &rActShell);
}
Bitmap SwDocShell::GetStyleFamilyBitmap( SfxStyleFamily eFamily )
{
if( SFX_STYLE_FAMILY_PSEUDO == eFamily )
return Bitmap( SW_RES( BMP_STYLES_FAMILY_NUM ));
return SfxObjectShell::GetStyleFamilyBitmap( eFamily );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment