diff options
author | Michael Stahl <mst@openoffice.org> | 2010-01-08 17:13:59 +0100 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2010-01-08 17:13:59 +0100 |
commit | 82aba30102fe1cce3f6582bfbe29bacb7498363d (patch) | |
tree | 5ef922e255331819f19bba80bdb2e12072529d00 /sw | |
parent | fb0dd0d206e140a72291bff3e0225c938bb9de68 (diff) |
swunolocking1: #i105557#: remove class SwUnoCallBack.
everything SwUnoCallBack class does has unfixable race conditions.
in SwDoc, the uno callback is now a plain SwModify.
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/doc.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/doc/docnew.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/inc/unoclbck.hxx | 52 | ||||
-rw-r--r-- | sw/source/core/unocore/makefile.mk | 1 | ||||
-rw-r--r-- | sw/source/core/unocore/unoclbck.cxx | 85 | ||||
-rw-r--r-- | sw/source/core/unocore/unocoll.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/unocore/unoobj.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/unocore/unoobj2.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/unocore/unoportenum.cxx | 16 |
9 files changed, 6 insertions, 157 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index de82d9056ff9..0066b37b4575 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -199,7 +199,6 @@ class SwLayouter; class SdrView; class SdrMarkList; class SwAuthEntry; -class SwUnoCallBack; class SwLayoutCache; class IStyleAccess; struct SwCallMouseEvent; @@ -391,7 +390,7 @@ class SW_DLLPUBLIC SwDoc : SwLayoutCache *pLayoutCache; // Layout cache to read and save with the // document for a faster formatting - SwUnoCallBack *pUnoCallBack; + SwModify *pUnoCallBack; IGrammarContact *mpGrammarContact; // for grammar checking in paragraphs during editing mutable comphelper::ImplementationReference< SwChartDataProvider diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 71c42cf27176..7b333ad1f960 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -90,7 +90,6 @@ #include <viewsh.hxx> #include <doctxm.hxx> #include <shellres.hxx> -#include <unoclbck.hxx> #include <breakit.hxx> #include <laycache.hxx> #include <mvsave.hxx> @@ -259,7 +258,7 @@ SwDoc::SwDoc() : pStyleAccess( 0 ), // <-- pLayoutCache( 0 ), - pUnoCallBack(new SwUnoCallBack(0)), + pUnoCallBack(new SwModify(0)), mpGrammarContact( 0 ), aChartDataProviderImplRef(), pChartControllerHelper( 0 ), diff --git a/sw/source/core/inc/unoclbck.hxx b/sw/source/core/inc/unoclbck.hxx deleted file mode 100644 index 30a338f358f6..000000000000 --- a/sw/source/core/inc/unoclbck.hxx +++ /dev/null @@ -1,52 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: unoclbck.hxx,v $ - * $Revision: 1.6 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _UNOCLBCK_HXX -#define _UNOCLBCK_HXX -#include <calbck.hxx> - -class SwXReferenceMark; -class SwFmtRefMark; -class SwFmtFtn; -class SwXFootnote; -class SwTOXMark; -class SwXDocumentIndexMark; - -class SwUnoCallBack : public SwModify -{ -public: - SwUnoCallBack(SwModify *pToRegisterIn); - virtual ~SwUnoCallBack(); - - // returns the API object of a reference mark if available - SwXReferenceMark* GetRefMark(const SwFmtRefMark& rMark); - SwXFootnote* GetFootnote(const SwFmtFtn& rMark); - SwXDocumentIndexMark* GetTOXMark(const SwTOXMark& rMark); -}; -#endif diff --git a/sw/source/core/unocore/makefile.mk b/sw/source/core/unocore/makefile.mk index b364956a3d0c..31c6f4f72668 100644 --- a/sw/source/core/unocore/makefile.mk +++ b/sw/source/core/unocore/makefile.mk @@ -115,7 +115,6 @@ SLOFILES = \ $(SLO)$/unotextmarkup.obj\ $(SLO)$/TextCursorHelper.obj \ $(SLO)$/unotext.obj\ - $(SLO)$/unoclbck.obj\ $(SLO)$/unomap.obj\ $(SLO)$/unoprnms.obj\ $(SLO)$/XMLRangeHelper.obj diff --git a/sw/source/core/unocore/unoclbck.cxx b/sw/source/core/unocore/unoclbck.cxx deleted file mode 100644 index 6e5b08210147..000000000000 --- a/sw/source/core/unocore/unoclbck.cxx +++ /dev/null @@ -1,85 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: unoclbck.cxx,v $ - * $Revision: 1.10 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" - - -#include <hintids.hxx> -#include <tools/debug.hxx> -#include <swtypes.hxx> -#include <unofootnote.hxx> -#include <unorefmark.hxx> -#include <unoidx.hxx> -#include <tox.hxx> -#include <unoclbck.hxx> -#include <txtftn.hxx> -#include <fmtftn.hxx> -#include <doc.hxx> -#include <fmtrfmrk.hxx> -#include <txtrfmrk.hxx> - -/* -----------------------------06.01.00 13:51-------------------------------- - - ---------------------------------------------------------------------------*/ -SwUnoCallBack::SwUnoCallBack(SwModify *pToRegisterIn) : - SwModify(pToRegisterIn) -{ -} -/* -----------------------------06.01.00 13:51-------------------------------- - - ---------------------------------------------------------------------------*/ -SwUnoCallBack::~SwUnoCallBack() -{ -} -/* -----------------------------01.09.00 12:03-------------------------------- - - ---------------------------------------------------------------------------*/ -SwXReferenceMark* SwUnoCallBack::GetRefMark(const SwFmtRefMark& rMark) -{ - return SwXReferenceMark::GetReferenceMark(*this, rMark); -} - -/* -----------------------------05.09.00 12:38-------------------------------- - - ---------------------------------------------------------------------------*/ -SwXFootnote* SwUnoCallBack::GetFootnote(const SwFmtFtn& rMark) -{ - return SwXFootnote::GetXFootnote(*this, rMark); -} - -/* -----------------------------27.11.00 17:15-------------------------------- - - ---------------------------------------------------------------------------*/ -SwXDocumentIndexMark* SwUnoCallBack::GetTOXMark(const SwTOXMark& /*rMark*/) -{ - return 0; -} - diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 57f9b05a9c01..daafeb65888b 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -43,7 +43,6 @@ #include <poolfmt.hxx> #include <unocoll.hxx> #include <unosett.hxx> -#include <unoclbck.hxx> #include <fmtanchr.hxx> #include <ndtxt.hxx> #include <section.hxx> diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index ba86f9c509b1..e1601dcbcad1 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -84,7 +84,6 @@ #include <sfx2/fcontnr.hxx> #include <fmtrfmrk.hxx> #include <txtrfmrk.hxx> -#include <unoclbck.hxx> #include <unotextrange.hxx> #include <unotextcursor.hxx> #include <unomap.hxx> diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 53b0da94b12d..90d8c7538a0d 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -75,7 +75,6 @@ #include <sfx2/fcontnr.hxx> #include <fmtrfmrk.hxx> #include <txtrfmrk.hxx> -#include <unoclbck.hxx> #include <unoparaframeenum.hxx> #include <unofootnote.hxx> #include <unotextbodyhf.hxx> diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 6e29ff314cf8..fd9722db9616 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -45,7 +45,6 @@ #include <unocrsr.hxx> #include <docary.hxx> #include <tox.hxx> -#include <unoclbck.hxx> #include <unomid.h> #include <unoparaframeenum.hxx> #include <unocrsrhelper.hxx> @@ -429,9 +428,7 @@ lcl_CreateRefMarkPortion( SwDoc* pDoc = pUnoCrsr->GetDoc(); const SwFmtRefMark& rRefMark = static_cast<const SwFmtRefMark&>(rAttr.GetAttr()); - Reference<XTextContent> xContent = - static_cast<SwUnoCallBack*>(pDoc->GetUnoCallBack()) - ->GetRefMark(rRefMark); + Reference<XTextContent> xContent; if (!xContent.is()) { xContent = new SwXReferenceMark(pDoc, &rRefMark); @@ -476,15 +473,10 @@ lcl_CreateTOXMarkPortion( SwDoc* pDoc = pUnoCrsr->GetDoc(); const SwTOXMark& rTOXMark = static_cast<const SwTOXMark&>(rAttr.GetAttr()); - Reference<XTextContent> xContent = - static_cast<SwUnoCallBack*>(pDoc->GetUnoCallBack()) - ->GetTOXMark(rTOXMark); - if (!xContent.is()) - { - xContent.set( SwXDocumentIndexMark::CreateXDocumentIndexMark(*pDoc, + Reference<XTextContent> xContent( + SwXDocumentIndexMark::CreateXDocumentIndexMark(*pDoc, *const_cast<SwTOXType*>(rTOXMark.GetTOXType()), rTOXMark), - uno::UNO_QUERY); - } + uno::UNO_QUERY); SwXTextPortion* pPortion = 0; if (!bEnd) |