Index: source/core/doc/docnew.cxx =================================================================== --- source/core/doc/docnew.cxx (revision 269610) +++ source/core/doc/docnew.cxx (working copy) @@ -444,23 +444,7 @@ pNewDBMgr = new SwNewDBMgr; // create TOXTypes - ShellResource* pShellRes = ViewShell::GetShellRes(); - - SwTOXType * pNew = new SwTOXType(TOX_CONTENT, pShellRes->aTOXContentName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - pNew = new SwTOXType(TOX_INDEX, pShellRes->aTOXIndexName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - pNew = new SwTOXType(TOX_USER, pShellRes->aTOXUserName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - pNew = new SwTOXType(TOX_ILLUSTRATIONS, pShellRes->aTOXIllustrationsName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - pNew = new SwTOXType(TOX_OBJECTS, pShellRes->aTOXObjectsName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - pNew = new SwTOXType(TOX_TABLES, pShellRes->aTOXTablesName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - pNew = new SwTOXType(TOX_AUTHORITIES, pShellRes->aTOXAuthoritiesName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - + InitTOXTypes(); // --> OD 2008-03-07 #refactorlists# // pass empty item set containing the paragraph's list attributes // as ignorable items to the stype manager. @@ -832,7 +816,7 @@ // loesche der Nodes geloescht werden. pBookmarkTbl->DeleteAndDestroy( 0, pBookmarkTbl->Count() ); pTOXTypes->DeleteAndDestroy( 0, pTOXTypes->Count() ); - + InitTOXTypes( ); // create a dummy pagedesc for the layout sal_uInt16 nDummyPgDsc = MakePageDesc( String::CreateFromAscii( "?DUMMY?" )); SwPageDesc* pDummyPgDsc = aPageDescs[ nDummyPgDsc ]; @@ -1056,3 +1040,21 @@ } } // <-- +void SwDoc::InitTOXTypes() +{ + ShellResource* pShellRes = ViewShell::GetShellRes(); + SwTOXType * pNew = new SwTOXType(TOX_CONTENT, pShellRes->aTOXContentName ); + pTOXTypes->Insert( pNew, pTOXTypes->Count() ); + pNew = new SwTOXType(TOX_INDEX, pShellRes->aTOXIndexName ); + pTOXTypes->Insert( pNew, pTOXTypes->Count() ); + pNew = new SwTOXType(TOX_USER, pShellRes->aTOXUserName ); + pTOXTypes->Insert( pNew, pTOXTypes->Count() ); + pNew = new SwTOXType(TOX_ILLUSTRATIONS, pShellRes->aTOXIllustrationsName ); + pTOXTypes->Insert( pNew, pTOXTypes->Count() ); + pNew = new SwTOXType(TOX_OBJECTS, pShellRes->aTOXObjectsName ); + pTOXTypes->Insert( pNew, pTOXTypes->Count() ); + pNew = new SwTOXType(TOX_TABLES, pShellRes->aTOXTablesName ); + pTOXTypes->Insert( pNew, pTOXTypes->Count() ); + pNew = new SwTOXType(TOX_AUTHORITIES, pShellRes->aTOXAuthoritiesName ); + pTOXTypes->Insert( pNew, pTOXTypes->Count() ); +} Index: inc/doc.hxx =================================================================== --- inc/doc.hxx (revision 269610) +++ inc/doc.hxx (working copy) @@ -719,7 +719,7 @@ SwFmt *_MakeCharFmt(const String &, SwFmt *, BOOL, BOOL ); SwFmt *_MakeFrmFmt(const String &, SwFmt *, BOOL, BOOL ); SwFmt *_MakeTxtFmtColl(const String &, SwFmt *, BOOL, BOOL ); - + void InitTOXTypes(); public: /** Life cycle