diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-07-26 19:33:06 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-07-27 00:45:20 +0200 |
commit | e039978b5256bfa0c42b1ce546c27326ef052412 (patch) | |
tree | aa499aa54593866342546aa7d936a729ecf8768e /sfx2 | |
parent | c7dd322b3c37d84f6962f9d91a8770d3cb9d4888 (diff) |
turns out nobody calls those SfxObjectShell methods, remove them
Change-Id: Ic04fc47e88f0d12a0889fd9e28ff0fc42c6556aa
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objcont.cxx | 184 |
1 files changed, 0 insertions, 184 deletions
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index b28e805e5d32..dbac74bce8da 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -416,190 +416,6 @@ Bitmap SfxObjectShell::GetStyleFamilyBitmap(SfxStyleFamily eFamily) 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 ( SfxObjectShell &rSource /* the document template from which |