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

turns out nobody calls those SfxObjectShell methods, remove them

Change-Id: Ic04fc47e88f0d12a0889fd9e28ff0fc42c6556aa
üst c7dd322b
...@@ -526,19 +526,6 @@ public: ...@@ -526,19 +526,6 @@ public:
virtual Bitmap GetStyleFamilyBitmap(SfxStyleFamily eFamily); virtual Bitmap GetStyleFamilyBitmap(SfxStyleFamily eFamily);
virtual sal_Bool InsertStuffWithIndexes( SfxObjectShell &rSource,
sal_uInt16 nSourceIdx1,
sal_uInt16 nSourceIdx2,
sal_uInt16 nSourceIdx3,
sal_uInt16 &nIdx1,
sal_uInt16 &nIdx2,
sal_uInt16 &nIdx3,
sal_uInt16 &rIdxDeleted);
virtual sal_Bool RemoveStuffWithIndexes( sal_uInt16 nIdx1,
sal_uInt16 nIdx2 = INDEX_IGNORE,
sal_uInt16 nIdx3 = INDEX_IGNORE);
virtual void LoadStyles( SfxObjectShell &rSource ); virtual void LoadStyles( SfxObjectShell &rSource );
void ReadNote( INote * ); void ReadNote( INote * );
void UpdateNote( INote * ); void UpdateNote( INote * );
......
...@@ -340,19 +340,6 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, bool bReplace, bool bCellS ...@@ -340,19 +340,6 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, bool bReplace, bool bCellS
} }
sal_Bool ScDocShell::InsertStuffWithIndexes( SfxObjectShell &rSource,
sal_uInt16 nSourceIdx1, sal_uInt16 nSourceIdx2, sal_uInt16 nSourceIdx3,
sal_uInt16 &nIdx1, sal_uInt16 &nIdx2, sal_uInt16 &nIdx3, sal_uInt16 &rIdxDeleted )
{
sal_Bool bRet = SfxObjectShell::InsertStuffWithIndexes(
rSource, nSourceIdx1, nSourceIdx2, nSourceIdx3,
nIdx1, nIdx2, nIdx3, rIdxDeleted );
if (bRet)
lcl_AdjustPool( GetStyleSheetPool() ); // SetItems anpassen
return bRet;
}
void ScDocShell::ReconnectDdeLink(SfxObjectShell& rServer) void ScDocShell::ReconnectDdeLink(SfxObjectShell& rServer)
{ {
::sfx2::LinkManager* pLinkManager = aDocument.GetLinkManager(); ::sfx2::LinkManager* pLinkManager = aDocument.GetLinkManager();
......
...@@ -209,9 +209,6 @@ public: ...@@ -209,9 +209,6 @@ public:
virtual void PrepareReload(); virtual void PrepareReload();
virtual sal_Bool IsInformationLost(); virtual sal_Bool IsInformationLost();
virtual void LoadStyles( SfxObjectShell &rSource ); virtual void LoadStyles( SfxObjectShell &rSource );
virtual sal_Bool InsertStuffWithIndexes( SfxObjectShell &rSource,
sal_uInt16 nSourceIdx1, sal_uInt16 nSourceIdx2, sal_uInt16 nSourceIdx3,
sal_uInt16 &nIdx1, sal_uInt16 &nIdx2, sal_uInt16 &nIdx3, sal_uInt16 &rIdxDeleted ) SAL_OVERRIDE;
virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); // SfxInPlaceObject virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); // SfxInPlaceObject
virtual sal_Bool DoSaveCompleted( SfxMedium * pNewStor); // SfxObjectShell virtual sal_Bool DoSaveCompleted( SfxMedium * pNewStor); // SfxObjectShell
......
...@@ -416,190 +416,6 @@ Bitmap SfxObjectShell::GetStyleFamilyBitmap(SfxStyleFamily eFamily) ...@@ -416,190 +416,6 @@ Bitmap SfxObjectShell::GetStyleFamilyBitmap(SfxStyleFamily eFamily)
return Bitmap(); return Bitmap();
} }
//--------------------------------------------------------------------
sal_Bool SfxObjectShell::InsertStuffWithIndexes(SfxObjectShell &rSource,
sal_uInt16 nSourceIdx1,
sal_uInt16 nSourceIdx2,
sal_uInt16 /*nSourceIdx3*/,
sal_uInt16 &nIdx1,
sal_uInt16 &nIdx2,
sal_uInt16 &/*nIdx3*/,
sal_uInt16 &/*nDeleted*/)
{
sal_Bool bRet = sal_False;
if (INDEX_IGNORE == nIdx1 && CONTENT_STYLE == nSourceIdx1)
nIdx1 = CONTENT_STYLE;
if (CONTENT_STYLE == nSourceIdx1 && CONTENT_STYLE == nIdx1)
{
SfxStyleSheetBasePool* pHisPool = rSource.GetStyleSheetPool();
SfxStyleSheetBasePool* pMyPool = GetStyleSheetPool();
SetOrganizerSearchMask(pHisPool);
SetOrganizerSearchMask(pMyPool);
SfxStyleSheetBase* pHisSheet = NULL;
if ( pHisPool && pHisPool->Count() > nSourceIdx2 )
pHisSheet = (*pHisPool)[nSourceIdx2];
// Pasting is only needed if a style sheet is moved between
// different (!) Pools
if ( pHisSheet && pMyPool != pHisPool )
{
if (INDEX_IGNORE == nIdx2)
{
nIdx2 = pMyPool->Count();
}
// if such a template already exists: delete!
OUString aOldName(pHisSheet->GetName());
SfxStyleFamily eOldFamily = pHisSheet->GetFamily();
SfxStyleSheetBase* pExist = pMyPool->Find(aOldName, eOldFamily);
sal_Bool bUsedOrUserDefined;
if( pExist )
{
bUsedOrUserDefined =
pExist->IsUsed() || pExist->IsUserDefined();
if( ErrorHandler::HandleError(
*new MessageInfo( ERRCODE_SFXMSG_STYLEREPLACE, aOldName ) )
!= ERRCODE_BUTTON_OK )
return sal_False;
else
{
pMyPool->Replace( *pHisSheet, *pExist );
SetModified( sal_True );
nIdx2 = nIdx1 = INDEX_IGNORE;
return sal_True;
}
}
SfxStyleSheetBase& rNewSheet = pMyPool->Make(
aOldName, eOldFamily,
pHisSheet->GetMask(), nIdx2);
// Fill the Itemset of the new template
rNewSheet.GetItemSet().Set(pHisSheet->GetItemSet());
// Who gets the new one as a Parent?
// Who is using the new one as Follow?
SfxStyleSheetBase* pTestSheet = pMyPool->First();
while (pTestSheet)
{
if (pTestSheet->GetFamily() == eOldFamily &&
pTestSheet->HasParentSupport() &&
pTestSheet->GetParent() == aOldName)
{
pTestSheet->SetParent(aOldName);
// Rebuild Link
}
if (pTestSheet->GetFamily() == eOldFamily &&
pTestSheet->HasFollowSupport() &&
pTestSheet->GetFollow() == aOldName)
{
pTestSheet->SetFollow(aOldName);
// Rebuild Link
}
pTestSheet = pMyPool->Next();
}
bUsedOrUserDefined =
rNewSheet.IsUsed() || rNewSheet.IsUserDefined();
// has a New Parent? if so, start search with the same name
if (pHisSheet->HasParentSupport())
{
const String& rParentName = pHisSheet->GetParent();
if (0 != rParentName.Len())
{
SfxStyleSheetBase* pParentOfNew =
pMyPool->Find(rParentName, eOldFamily);
if (pParentOfNew)
rNewSheet.SetParent(rParentName);
}
}
// Has the new got a Follow? if so start search
// with the same name.
if (pHisSheet->HasFollowSupport())
{
const String& rFollowName = pHisSheet->GetFollow();
if (0 != rFollowName.Len())
{
SfxStyleSheetBase* pFollowOfNew =
pMyPool->Find(rFollowName, eOldFamily);
if (pFollowOfNew)
rNewSheet.SetFollow(rFollowName);
}
}
SetModified( sal_True );
if( !bUsedOrUserDefined ) nIdx2 = nIdx1 = INDEX_IGNORE;
bRet = sal_True;
}
else
bRet = sal_False;
}
return bRet;
}
//--------------------------------------------------------------------
sal_Bool SfxObjectShell::RemoveStuffWithIndexes
(
sal_uInt16 nIdx1,
sal_uInt16 nIdx2,
sal_uInt16 /*nIdx3*/
)
{
sal_Bool bRet = sal_False;
if (CONTENT_STYLE == nIdx1)
{
SfxStyleSheetBasePool* pMyPool = GetStyleSheetPool();
SetOrganizerSearchMask(pMyPool);
SfxStyleSheetBase* pMySheet = (*pMyPool)[nIdx2];
OUString aName(pMySheet->GetName());
OUString aEmpty;
SfxStyleFamily eFamily = pMySheet->GetFamily();
pMyPool->Remove(pMySheet);
bRet = sal_True;
SfxStyleSheetBase* pTestSheet = pMyPool->First();
while (pTestSheet)
{
if (pTestSheet->GetFamily() == eFamily &&
pTestSheet->HasParentSupport() &&
pTestSheet->GetParent() == aName)
{
pTestSheet->SetParent(aEmpty); // Remove link
}
if (pTestSheet->GetFamily() == eFamily &&
pTestSheet->HasFollowSupport() &&
pTestSheet->GetFollow() == aName)
{
pTestSheet->SetFollow(aEmpty); // Remove link
}
pTestSheet = pMyPool->Next();
}
SetModified( sal_True );
}
return bRet;
}
void SfxObjectShell::LoadStyles void SfxObjectShell::LoadStyles
( (
SfxObjectShell &rSource /* the document template from which SfxObjectShell &rSource /* the document template from which
......
...@@ -200,19 +200,6 @@ public: ...@@ -200,19 +200,6 @@ public:
virtual SfxStyleSheetBasePool* GetStyleSheetPool(); virtual SfxStyleSheetBasePool* GetStyleSheetPool();
/// For Organizer. /// For Organizer.
virtual sal_Bool InsertStuffWithIndexes(SfxObjectShell &rSource,
sal_uInt16 nSourceIdx1,
sal_uInt16 nSourceIdx2,
sal_uInt16 nSourceIdx3,
sal_uInt16& nIdx1,
sal_uInt16& nIdx2,
sal_uInt16& nIdx3,
sal_uInt16& nRemovedIdx) SAL_OVERRIDE;
virtual sal_Bool RemoveStuffWithIndexes(sal_uInt16 nIdx1,
sal_uInt16 nIdx2 = INDEX_IGNORE,
sal_uInt16 nIdx3 = INDEX_IGNORE) SAL_OVERRIDE;
virtual Bitmap GetStyleFamilyBitmap( SfxStyleFamily eFamily ); virtual Bitmap GetStyleFamilyBitmap( SfxStyleFamily eFamily );
/// Set View for actions via Shell. /// Set View for actions via Shell.
......
This diff is collapsed.
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