http://openoffice.org/bugzilla/show_bug.cgi?id=117814





--- Comment #23 from [email protected]  2011-04-12 14:30:01 ---
Now the biggest part.
I analysed all remaining calls to class SwDocShell in core and divided it into
three parts:

- code that can be replaced by other code
- code that works with SfxObjectShell (base class of SwDocShell)
- code that is genuine SwDocShell code

By moving all methods for the latter into an interface and handing over only
this interface to the core (instead of a whole SwDocShell pointer) the
dependencies to SwDocShell can be removed completely.

With a few exceptions (mainly ctors of SwDocShell) I successfully converted the
whole code in core and filter. For a quick glance here's the interface with the
remaining SwDocShell methods I couldn't implement in the core:

class IDocShell
{
public:
    virtual ~IDocShell();
    virtual SfxObjectShell* GetDocPersist() = 0;
    virtual SfxInPlaceClient* GetIPClient( 
        const ::svt::EmbeddedObjectRef& xObjRef ) = 0;
    virtual SfxStyleSheetBasePool* GetStyleSheetPool() = 0;
    virtual Reader* StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, 
        SwCrsrShell* pCrsrSh = 0, SwPaM* pPaM = 0) = 0;
    virtual sal_uLong LoadStylesFromFile( const String& rURL, 
        SwgReaderOption& rOpt, sal_Bool bUnoCall ) = 0;
    virtual int FindDocShell( SwDoc** ppDoc,
        SfxObjectShellLock& rLock,
        const String& rFileName,
        const String& rPasswd,
        String& rFilter,
        sal_Int16 nVersion ) = 0;
    virtual bool CanSwitchReadOnlyCursor() const = 0;
    virtual void CreateLinguisticEventListener() = 0;
    virtual bool IsWeb() const = 0;
    virtual void ClearModel() = 0;
    virtual void LoadingFinished() = 0;
    virtual void UpdateFontList() = 0;
    virtual void BroadcastEventHint( sal_uInt16 nId, sal_uInt16 nResId ) = 0;
};

This gives hints for possible further refactoring.

changeset e49903e96e37
http://hg.services.openoffice.org/cws/swcoreseparation/rev/e49903e96e37

-- 
Configure bugmail: http://openoffice.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification
from Bugzilla. Please log into the website and enter your comments.
---------------------------------------------------------------------
-- 
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help
-- 
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help

Reply via email to