[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sfx2/inc sw/inc sw/source

Oliver-Rainer Wittmann orw at apache.org
Thu Jun 26 01:09:35 PDT 2014


 sfx2/inc/sfx2/objsh.hxx       |   12 +
 sw/inc/docsh.hxx              |   48 ++---
 sw/source/ui/app/docsh.cxx    |  387 +++++++++++++++++++++---------------------
 sw/source/ui/app/docsh2.cxx   |  138 +++++++-------
 sw/source/ui/app/docshini.cxx |  196 ++++++++++-----------
 sw/source/ui/app/docst.cxx    |   86 ++++-----
 sw/source/ui/app/docstyle.cxx |    3 
 7 files changed, 444 insertions(+), 426 deletions(-)

New commits:
commit 368b3a6660e8623e43529e21e41fbce1192e6a92
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date:   Thu Jun 26 08:03:24 2014 +0000

    124914: Writer - reset certain language dependent pool defaults before importing a document via <SfxObjectShell::ImportFrom(..)> (used for OOXML *.docx import)

diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx
index 33ecaf8..7cfa6ec 100644
--- a/sfx2/inc/sfx2/objsh.hxx
+++ b/sfx2/inc/sfx2/objsh.hxx
@@ -204,8 +204,16 @@ private:
     sal_Bool                    bHasName :1,        // sal_True := bestehendes Objekt, sal_False := es ist ein neues Objekt
                                 bIsTmp :1;          // temp. Storage
         sal_Bool        bIsInGenerateThumbnail; //optimize thumbnail generate and store procedure to improve odt saving performance, i120030
-    virtual void BeforeLoading( SfxMedium&, const ::rtl::OUString &, const ::rtl::OUString & ){};
-    virtual void AfterLoading( SfxMedium&, const ::rtl::OUString &, const ::rtl::OUString & ){};
+
+protected:
+    // methods called in implementation of <ImportFrom(..)>
+    virtual void BeforeLoading( SfxMedium&, const ::rtl::OUString &, const ::rtl::OUString & )
+    {
+    };
+
+    virtual void AfterLoading( SfxMedium&, const ::rtl::OUString &, const ::rtl::OUString & )
+    {
+    };
 
 private:
 //#if 0 // _SOLAR__PRIVATE
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 28872642c..985e6d1 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -64,26 +64,28 @@ void SW_DLLPRIVATE InitDrawModelAndDocShell(SwDocShell* pSwDocShell, SwDrawModel
 
 class SW_DLLPUBLIC SwDocShell: public SfxObjectShell, public SfxListener
 {
-    SwDoc*                  pDoc;           // Document
-    rtl::Reference< SfxStyleSheetBasePool > mxBasePool;     // Durchreiche fuer Formate
-    FontList*               pFontList;      // aktuelle FontListe
+    SwDoc* mpDoc; // Document
+
+    rtl::Reference< SfxStyleSheetBasePool > mxBasePool; // Durchreiche fuer Formate
+
+    FontList* mpFontList; // aktuelle FontListe
+    bool mbInUpdateFontList; //prevent nested calls of UpdateFontList
 
     // Nix geht ohne die WrtShell (historische Gruende)
     // RuekwaertsPointer auf die View (historische Gruende)
     // Dieser gilt solange bis im Activate ein neuer gesetzt wird
     // oder dieser im Dtor der View geloescht wird
     //
-    SwView*                 pView;
-    SwWrtShell*             pWrtShell;
+    SwView* mpView;
+    SwWrtShell* mpWrtShell;
 
-    Timer                   aFinishedTimer; // Timer fuers ueberpriefen der
-                                            // Grafik-Links. Sind alle da,
-                                            // dann ist Doc voll. geladen
+    Timer aFinishedTimer;   // Timer fuers ueberpriefen der
+                            // Grafik-Links. Sind alle da,
+                            // dann ist Doc voll. geladen
+
+    comphelper::EmbeddedObjectContainer* mpOLEChildList;
+    sal_Int16 mnUpdateDocMode; // contains the com::sun::star::document::UpdateDocMode
 
-    //SvPersistRef            xOLEChildList;  // fuers RemoveOLEObjects
-    comphelper::EmbeddedObjectContainer*    pOLEChildList;
-    sal_Int16               nUpdateDocMode; // contains the com::sun::star::document::UpdateDocMode
-    bool                    bInUpdateFontList; //prevent nested calls of UpdateFontList
     // Methoden fuer den Zugriff aufs Doc
     SW_DLLPRIVATE void                  AddLink();
     SW_DLLPRIVATE void                  RemoveLink();
@@ -95,8 +97,8 @@ class SW_DLLPUBLIC SwDocShell: public SfxObjectShell, public SfxListener
     SW_DLLPRIVATE virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
     SW_DLLPRIVATE virtual sal_Bool Load( SfxMedium& rMedium );
     SW_DLLPRIVATE virtual sal_Bool LoadFrom( SfxMedium& rMedium );
-    SW_DLLPRIVATE virtual sal_Bool            ConvertFrom( SfxMedium &rMedium );
-    SW_DLLPRIVATE virtual sal_Bool            ConvertTo( SfxMedium &rMedium );
+    SW_DLLPRIVATE virtual sal_Bool ConvertFrom( SfxMedium &rMedium );
+    SW_DLLPRIVATE virtual sal_Bool ConvertTo( SfxMedium &rMedium );
     SW_DLLPRIVATE virtual sal_Bool SaveAs( SfxMedium& rMedium );
     SW_DLLPRIVATE virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
 
@@ -153,6 +155,10 @@ protected:
     /// override to update text fields
     virtual void                DoFlushDocInfo();
 
+    // override <SfxObjectShell>'s method which is called in <SfxObjectShell::ImportFrom(..)>.
+    // <SfxObjectShell::ImportFrom(..)> is used by current import of Microsoft Word documents in OOXML file format.
+    virtual void BeforeLoading( SfxMedium&, const ::rtl::OUString &, const ::rtl::OUString & );
+
 public:
     using SotObject::GetInterface;
 
@@ -195,8 +201,8 @@ public:
     void                    StateStyleSheet(SfxItemSet&, SwWrtShell* pSh = 0 );
 
     // Doc rausreichen aber VORSICHT
-    inline SwDoc*                   GetDoc() { return pDoc; }
-    inline const SwDoc*             GetDoc() const { return pDoc; }
+    inline SwDoc*                   GetDoc() { return mpDoc; }
+    inline const SwDoc*             GetDoc() const { return mpDoc; }
     IDocumentDeviceAccess*          getIDocumentDeviceAccess();
     const IDocumentSettingAccess*   getIDocumentSettingAccess() const;
     IDocumentChartDataProviderAccess*       getIDocumentChartDataProviderAccess();
@@ -229,12 +235,12 @@ public:
 
     // View setzen fuer Aktionen ueber Shell
     void          SetView(SwView* pVw);
-    const SwView *GetView() const { return pView; }
-    SwView       *GetView()       { return pView; }
+    const SwView *GetView() const { return mpView; }
+    SwView       *GetView()       { return mpView; }
 
     // Zugriff auf die zur SwView gehoerige SwWrtShell
-          SwWrtShell *GetWrtShell()       { return pWrtShell; }
-    const SwWrtShell *GetWrtShell() const { return pWrtShell; }
+          SwWrtShell *GetWrtShell()       { return mpWrtShell; }
+    const SwWrtShell *GetWrtShell() const { return mpWrtShell; }
 
     // fuer die Core - die kennt die DocShell aber keine WrtShell!
           SwFEShell *GetFEShell();
@@ -287,7 +293,7 @@ public:
     // Doc aus Html-Source neu laden
     void    ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView );
 
-    sal_Int16   GetUpdateDocMode() const {return nUpdateDocMode;}
+    sal_Int16   GetUpdateDocMode() const {return mnUpdateDocMode;}
 
     void ToggleBrowserMode(sal_Bool bOn, SwView* pView);
 
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index 316b0be..2b6d856 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -174,7 +174,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
         *ppRdr = pPaM ? new SwReader( rMedium, aFileName, *pPaM ) :
             pCrsrShell ?
                 new SwReader( rMedium, aFileName, *pCrsrShell->GetCrsr() )
-                    : new SwReader( rMedium, aFileName, pDoc );
+                    : new SwReader( rMedium, aFileName, mpDoc );
     }
     else
         return 0;
@@ -208,7 +208,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
 
     // #i30171# set the UpdateDocMode at the SwDocShell
     SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
-    nUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE;
+    mnUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE;
 
     if( pFlt->GetDefaultTemplate().Len() )
         pRead->SetTemplateName( pFlt->GetDefaultTemplate() );
@@ -252,26 +252,26 @@ sal_Bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
 
     pRdr->GetDoc()->set(IDocumentSettingAccess::HTML_MODE, ISA(SwWebDocShell));
 
-    /* #106748# Restore the pool default if reading a saved document. */
-    pDoc->RemoveAllFmtLanguageDependencies();
+    // Restore the pool default if reading a saved document.
+    mpDoc->RemoveAllFmtLanguageDependencies();
 
     sal_uLong nErr = pRdr->Read( *pRead );
 
     // Evtl. ein altes Doc weg
-    if ( pDoc != pRdr->GetDoc() )
+    if ( mpDoc != pRdr->GetDoc() )
     {
-        if( pDoc )
+        if( mpDoc )
             RemoveLink();
-        pDoc = pRdr->GetDoc();
+        mpDoc = pRdr->GetDoc();
 
         AddLink();
 
         if ( !mxBasePool.is() )
-            mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
+            mxBasePool = new SwDocStyleSheetPool( *mpDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
     }
 
     UpdateFontList();
-    InitDrawModelAndDocShell(this, pDoc ? pDoc->GetDrawModel() : 0);
+    InitDrawModelAndDocShell(this, mpDoc ? mpDoc->GetDrawModel() : 0);
 
     delete pRdr;
 
@@ -280,22 +280,27 @@ sal_Bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
     SetError( nErr, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
     sal_Bool bOk = !IsError( nErr );
 
-    // --> OD 2006-11-07 #i59688#
-//    // StartFinishedLoading rufen. Nicht bei asynchronen Filtern!
-//    // Diese muessen das selbst rufen!
-//    if( bOk && !pDoc->IsInLoadAsynchron() )
-//        StartLoadFinishedTimer();
-    if ( bOk && !pDoc->IsInLoadAsynchron() )
+    if ( bOk && !mpDoc->IsInLoadAsynchron() )
     {
         LoadingFinished();
     }
-    // <--
 
     pRead->setSotStorageRef(pStg); // #i45333# save sot storage ref in case of recursive calls
 
     return bOk;
 }
 
+
+void SwDocShell::BeforeLoading( SfxMedium&, const ::rtl::OUString &, const ::rtl::OUString & )
+{
+    if ( mpDoc == NULL )
+    {
+        return;
+    }
+
+    mpDoc->RemoveAllFmtLanguageDependencies();
+}
+
 /*--------------------------------------------------------------------
     Beschreibung: Sichern des Default-Formats, Stg vorhanden
  --------------------------------------------------------------------*/
@@ -305,18 +310,18 @@ sal_Bool SwDocShell::Save()
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722",  "SwDocShell::Save" );
     //#i3370# remove quick help to prevent saving of autocorrection suggestions
-    if(pView)
-        pView->GetEditWin().StopQuickHelp();
+    if(mpView)
+        mpView->GetEditWin().StopQuickHelp();
     SwWait aWait( *this, true );
 
     CalcLayoutForOLEObjects();  // format for OLE objets
     // --> OD 2006-03-17 #i62875#
     // reset compatibility flag <DoNotCaptureDrawObjsOnPage>, if possible
-    if ( pWrtShell && pDoc &&
-         pDoc->get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
-         docfunc::AllDrawObjsOnPage( *pDoc ) )
+    if ( mpWrtShell && mpDoc &&
+         mpDoc->get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
+         docfunc::AllDrawObjsOnPage( *mpDoc ) )
     {
-        pDoc->set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
+        mpDoc->set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
     }
     // <--
 
@@ -334,7 +339,7 @@ sal_Bool SwDocShell::Save()
                 WriterRef xWrt;
                 ::GetXMLWriter( aEmptyStr, GetMedium()->GetBaseURL( true ), xWrt );
                 xWrt->SetOrganizerMode( sal_True );
-                SwWriter aWrt( *GetMedium(), *pDoc );
+                SwWriter aWrt( *GetMedium(), *mpDoc );
                 nErr = aWrt.Write( xWrt );
                 xWrt->SetOrganizerMode( sal_False );
             }
@@ -349,35 +354,35 @@ sal_Bool SwDocShell::Save()
         case SFX_CREATE_MODE_PREVIEW:
         default:
             {
-                if( pDoc->ContainsMSVBasic() )
+                if( mpDoc->ContainsMSVBasic() )
                 {
                     //TODO/MBA: it looks as that this code can be removed!
                     //SvxImportMSVBasic aTmp( *this, pIo->GetStorage() );
                     //aTmp.SaveOrDelMSVBAStorage( sal_False, aEmptyStr );
                     if( SvtFilterOptions::Get()->IsLoadWordBasicStorage() )
                         nVBWarning = GetSaveWarningOfMSVBAStorage( (SfxObjectShell&) (*this) );
-                    pDoc->SetContainsMSVBasic( sal_False );
+                    mpDoc->SetContainsMSVBasic( sal_False );
                 }
 
                 // TabellenBox Edit beenden!
-                if( pWrtShell )
-                    pWrtShell->EndAllTblBoxEdit();
+                if( mpWrtShell )
+                    mpWrtShell->EndAllTblBoxEdit();
 
                 WriterRef xWrt;
                 ::GetXMLWriter( aEmptyStr, GetMedium()->GetBaseURL( true ), xWrt );
 
                 sal_Bool bLockedView(sal_False);
-                if ( pWrtShell )
+                if ( mpWrtShell )
                 {
-                    bLockedView = pWrtShell->IsViewLocked();
-                    pWrtShell->LockView( sal_True );    //lock visible section
+                    bLockedView = mpWrtShell->IsViewLocked();
+                    mpWrtShell->LockView( sal_True );    //lock visible section
                 }
 
-                SwWriter aWrt( *GetMedium(), *pDoc );
+                SwWriter aWrt( *GetMedium(), *mpDoc );
                 nErr = aWrt.Write( xWrt );
 
-                if ( pWrtShell )
-                    pWrtShell->LockView( bLockedView );
+                if ( mpWrtShell )
+                    mpWrtShell->LockView( bLockedView );
             }
             break;
         }
@@ -385,7 +390,7 @@ sal_Bool SwDocShell::Save()
     }
     SetError( nErr ? nErr : nVBWarning, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
 
-    SfxViewFrame* pFrm = pWrtShell ? pWrtShell->GetView().GetViewFrame() : 0;
+    SfxViewFrame* pFrm = mpWrtShell ? mpWrtShell->GetView().GetViewFrame() : 0;
     if( pFrm )
     {
         pFrm->GetBindings().SetState( SfxStringItem( SID_DOC_MODIFIED, ' ' ));
@@ -402,7 +407,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722",  "SwDocShell::SaveAs" );
 
-    pDoc->setDocAccTitle(String());
+    mpDoc->setDocAccTitle(String());
     SfxViewFrame* pFrame1 = SfxViewFrame::GetFirst( this );
     if (pFrame1)
     {
@@ -418,19 +423,19 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
     }
     SwWait aWait( *this, true );
     //#i3370# remove quick help to prevent saving of autocorrection suggestions
-    if(pView)
-        pView->GetEditWin().StopQuickHelp();
+    if(mpView)
+        mpView->GetEditWin().StopQuickHelp();
 
     //#i91811# mod if we have an active margin window, write back the text
-    if ( pView &&
-         pView->GetPostItMgr() &&
-         pView->GetPostItMgr()->HasActiveSidebarWin() )
+    if ( mpView &&
+         mpView->GetPostItMgr() &&
+         mpView->GetPostItMgr()->HasActiveSidebarWin() )
     {
-        pView->GetPostItMgr()->UpdateDataOnActiveSidebarWin();
+        mpView->GetPostItMgr()->UpdateDataOnActiveSidebarWin();
     }
 
-    if( pDoc->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) &&
-        !pDoc->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS) )
+    if( mpDoc->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) &&
+        !mpDoc->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS) )
         RemoveOLEObjects();
 
     {
@@ -457,11 +462,11 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
     CalcLayoutForOLEObjects();  // format for OLE objets
     // --> OD 2006-03-17 #i62875#
     // reset compatibility flag <DoNotCaptureDrawObjsOnPage>, if possible
-    if ( pWrtShell && pDoc &&
-         pDoc->get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
-         docfunc::AllDrawObjsOnPage( *pDoc ) )
+    if ( mpWrtShell && mpDoc &&
+         mpDoc->get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
+         docfunc::AllDrawObjsOnPage( *mpDoc ) )
     {
-        pDoc->set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
+        mpDoc->set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
     }
     // <--
 
@@ -487,26 +492,26 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
             xDocSh->DoClose();
         }
 
-        if( pDoc->ContainsMSVBasic() )
+        if( mpDoc->ContainsMSVBasic() )
         {
             //TODO/MBA: it looks as that this code can be removed!
             //SvxImportMSVBasic aTmp( *this, pIo->GetStorage() );
             //aTmp.SaveOrDelMSVBAStorage( sal_False, aEmptyStr );
             if( SvtFilterOptions::Get()->IsLoadWordBasicStorage() )
                 nVBWarning = GetSaveWarningOfMSVBAStorage( (SfxObjectShell&) *this );
-            pDoc->SetContainsMSVBasic( sal_False );
+            mpDoc->SetContainsMSVBasic( sal_False );
         }
 
         // TabellenBox Edit beenden!
-        if( pWrtShell )
-            pWrtShell->EndAllTblBoxEdit();
+        if( mpWrtShell )
+            mpWrtShell->EndAllTblBoxEdit();
 
         // Modified-Flag merken und erhalten ohne den Link zu Callen
         // (fuer OLE; nach Anweisung von MM)
-        sal_Bool bIsModified = pDoc->IsModified();
-        pDoc->GetIDocumentUndoRedo().LockUndoNoModifiedPosition();
-        Link aOldOLELnk( pDoc->GetOle2Link() );
-        pDoc->SetOle2Link( Link() );
+        sal_Bool bIsModified = mpDoc->IsModified();
+        mpDoc->GetIDocumentUndoRedo().LockUndoNoModifiedPosition();
+        Link aOldOLELnk( mpDoc->GetOle2Link() );
+        mpDoc->SetOle2Link( Link() );
 
             // SfxProgress unterdruecken, wenn man Embedded ist
         SW_MOD()->SetEmbeddedLoadSave(
@@ -516,24 +521,24 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
         ::GetXMLWriter( aEmptyStr, rMedium.GetBaseURL( true ), xWrt );
 
         sal_Bool bLockedView(sal_False);
-        if ( pWrtShell )
+        if ( mpWrtShell )
         {
-            bLockedView = pWrtShell->IsViewLocked();
-            pWrtShell->LockView( sal_True );    //lock visible section
+            bLockedView = mpWrtShell->IsViewLocked();
+            mpWrtShell->LockView( sal_True );    //lock visible section
         }
 
-        SwWriter aWrt( rMedium, *pDoc );
+        SwWriter aWrt( rMedium, *mpDoc );
         nErr = aWrt.Write( xWrt );
 
-        if ( pWrtShell )
-            pWrtShell->LockView( bLockedView );
+        if ( mpWrtShell )
+            mpWrtShell->LockView( bLockedView );
 
         if( bIsModified )
         {
-            pDoc->SetModified();
-            pDoc->GetIDocumentUndoRedo().UnLockUndoNoModifiedPosition();
+            mpDoc->SetModified();
+            mpDoc->GetIDocumentUndoRedo().UnLockUndoNoModifiedPosition();
         }
-        pDoc->SetOle2Link( aOldOLELnk );
+        mpDoc->SetOle2Link( aOldOLELnk );
 
         SW_MOD()->SetEmbeddedLoadSave( sal_False );
     }
@@ -570,20 +575,20 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
     }
 
     //#i3370# remove quick help to prevent saving of autocorrection suggestions
-    if(pView)
-        pView->GetEditWin().StopQuickHelp();
+    if(mpView)
+        mpView->GetEditWin().StopQuickHelp();
 
     //#i91811# mod if we have an active margin window, write back the text
-    if ( pView &&
-         pView->GetPostItMgr() &&
-         pView->GetPostItMgr()->HasActiveSidebarWin() )
+    if ( mpView &&
+         mpView->GetPostItMgr() &&
+         mpView->GetPostItMgr()->HasActiveSidebarWin() )
     {
-        pView->GetPostItMgr()->UpdateDataOnActiveSidebarWin();
+        mpView->GetPostItMgr()->UpdateDataOnActiveSidebarWin();
     }
 
     sal_uLong nVBWarning = 0;
 
-    if( pDoc->ContainsMSVBasic() )
+    if( mpDoc->ContainsMSVBasic() )
     {
         sal_Bool bSave = pFlt->GetUserData().EqualsAscii( "CWW8" )
              && SvtFilterOptions::Get()->IsLoadWordBasicStorage();
@@ -596,14 +601,14 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
             {
                 nVBWarning = SaveOrDelMSVBAStorage( (SfxObjectShell&) *this, *xStg, bSave, String::CreateFromAscii("Macros") );
                 xStg->Commit();
-                pDoc->SetContainsMSVBasic( sal_True );
+                mpDoc->SetContainsMSVBasic( sal_True );
             }
         }
     }
 
     // TabellenBox Edit beenden!
-    if( pWrtShell )
-        pWrtShell->EndAllTblBoxEdit();
+    if( mpWrtShell )
+        mpWrtShell->EndAllTblBoxEdit();
 
     if( pFlt->GetUserData().EqualsAscii( "HTML") )
     {
@@ -633,17 +638,17 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
     }
 
     // --> FME 2007-5-7 #i76360# Update document statistics
-    SwDocStat aDocStat( pDoc->GetDocStat() );;
-    pDoc->UpdateDocStat( aDocStat );
+    SwDocStat aDocStat( mpDoc->GetDocStat() );;
+    mpDoc->UpdateDocStat( aDocStat );
     // <--
     CalcLayoutForOLEObjects();  // format for OLE objets
     // --> OD 2006-03-17 #i62875#
     // reset compatibility flag <DoNotCaptureDrawObjsOnPage>, if possible
-    if ( pWrtShell && pDoc &&
-         pDoc->get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
-         docfunc::AllDrawObjsOnPage( *pDoc ) )
+    if ( mpWrtShell && mpDoc &&
+         mpDoc->get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
+         docfunc::AllDrawObjsOnPage( *mpDoc ) )
     {
-        pDoc->set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
+        mpDoc->set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
     }
     // <--
 
@@ -717,7 +722,7 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
     }
 
     if( pFlt->GetUserData().EqualsAscii( FILTER_TEXT_DLG ) &&
-        ( pWrtShell || !::lcl_GetSourceView( this ) ))
+        ( mpWrtShell || !::lcl_GetSourceView( this ) ))
     {
         SwAsciiOptions aOpt;
         String sItemOpt;
@@ -744,25 +749,25 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
     String aFileName( rMedium.GetName() );
 
     //Keine View also das ganze Dokument!
-    if ( pWrtShell )
+    if ( mpWrtShell )
     {
         SwWait aWait( *this, true );
         // --> OD 2009-12-31 #i106906#
-        const sal_Bool bFormerLockView = pWrtShell->IsViewLocked();
-        pWrtShell->LockView( sal_True );
+        const sal_Bool bFormerLockView = mpWrtShell->IsViewLocked();
+        mpWrtShell->LockView( sal_True );
         // <--
-        pWrtShell->StartAllAction();
-        pWrtShell->Push();
-        SwWriter aWrt( rMedium, *pWrtShell, sal_True );
+        mpWrtShell->StartAllAction();
+        mpWrtShell->Push();
+        SwWriter aWrt( rMedium, *mpWrtShell, sal_True );
         nErrno = aWrt.Write( xWriter, &aFileName );
         //JP 16.05.97: falls der SFX uns die View waehrend des speicherns
         //              entzieht
-        if( pWrtShell )
+        if( mpWrtShell )
         {
-            pWrtShell->Pop(sal_False);
-            pWrtShell->EndAllAction();
+            mpWrtShell->Pop(sal_False);
+            mpWrtShell->EndAllAction();
             // --> OD 2009-12-31 #i106906#
-            pWrtShell->LockView( bFormerLockView );
+            mpWrtShell->LockView( bFormerLockView );
             // <--
         }
     }
@@ -777,7 +782,7 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
         }
         else
         {
-            SwWriter aWrt( rMedium, *pDoc );
+            SwWriter aWrt( rMedium, *mpDoc );
             nErrno = aWrt.Write( xWriter, &aFileName );
         }
     }
@@ -808,21 +813,21 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS
     {
         // erst hier entscheiden, ob das Speichern geklappt hat oder nicht
         if( IsModified() )
-            pDoc->SetModified();
+            mpDoc->SetModified();
         else
-            pDoc->ResetModified();
+            mpDoc->ResetModified();
     }
 
-    if( pOLEChildList )
+    if( mpOLEChildList )
     {
         sal_Bool bResetModified = IsEnableSetModified();
         if( bResetModified )
             EnableSetModified( sal_False );
 
-        uno::Sequence < rtl::OUString > aNames = pOLEChildList->GetObjectNames();
+        uno::Sequence < rtl::OUString > aNames = mpOLEChildList->GetObjectNames();
         for( sal_Int32 n = aNames.getLength(); n; n-- )
         {
-            if ( !pOLEChildList->MoveEmbeddedObject( aNames[n-1], GetEmbeddedObjectContainer() ) )
+            if ( !mpOLEChildList->MoveEmbeddedObject( aNames[n-1], GetEmbeddedObjectContainer() ) )
             {
                 DBG_ERROR( "Copying of objects didn't work!" );
             }
@@ -832,7 +837,7 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS
             //pPersist->Move( &aRef, aRef->GetStorageName() );
         }
 
-        DELETEZ( pOLEChildList );
+        DELETEZ( mpOLEChildList );
         if( bResetModified )
             EnableSetModified( sal_True );
     }
@@ -870,10 +875,10 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
     JobSetup *pOrig = 0;
     if ( rSetup.GetPrinterName().Len() && ASPECT_THUMBNAIL != nAspect )
     {
-        pOrig = const_cast<JobSetup*>(pDoc->getJobsetup());
+        pOrig = const_cast<JobSetup*>(mpDoc->getJobsetup());
         if( pOrig )         // dann kopieren wir uns den
             pOrig = new JobSetup( *pOrig );
-        pDoc->setJobsetup( rSetup );
+        mpDoc->setJobsetup( rSetup );
     }
 
     Rectangle aRect( nAspect == ASPECT_THUMBNAIL ?
@@ -885,12 +890,12 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
     pDev->SetBackground();
     sal_Bool bWeb = 0 != PTR_CAST(SwWebDocShell, this);
     SwPrintData aOpts;
-    ViewShell::PrtOle2( pDoc, SW_MOD()->GetUsrPref(bWeb), aOpts, pDev, aRect );
+    ViewShell::PrtOle2( mpDoc, SW_MOD()->GetUsrPref(bWeb), aOpts, pDev, aRect );
     pDev->Pop();
 
     if( pOrig )
     {
-        pDoc->setJobsetup( *pOrig );
+        mpDoc->setJobsetup( *pOrig );
         delete pOrig;
     }
     if ( bResetModified )
@@ -901,9 +906,9 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
 void SwDocShell::SetVisArea( const Rectangle &rRect )
 {
     Rectangle aRect( rRect );
-    if ( pView )
+    if ( mpView )
     {
-        Size aSz( pView->GetDocSz() );
+        Size aSz( mpView->GetDocSz() );
         aSz.Width() += DOCUMENTBORDER; aSz.Height() += DOCUMENTBORDER;
         long nMoveX = 0, nMoveY = 0;
         if ( aRect.Right() > aSz.Width() )
@@ -916,7 +921,7 @@ void SwDocShell::SetVisArea( const Rectangle &rRect )
         aRect.Move( nMoveX, nMoveY );
 
         //Ruft das SfxInPlaceObject::SetVisArea()!
-        pView->SetVisArea( aRect, sal_True );
+        mpView->SetVisArea( aRect, sal_True );
     }
     else
         SfxObjectShell::SetVisArea( aRect );
@@ -928,8 +933,8 @@ Rectangle SwDocShell::GetVisArea( sal_uInt16 nAspect ) const
     if ( nAspect == ASPECT_THUMBNAIL )
     {
         //PreView: VisArea auf die erste Seite einstellen.
-        SwNodeIndex aIdx( pDoc->GetNodes().GetEndOfExtras(), 1 );
-        SwCntntNode* pNd = pDoc->GetNodes().GoNext( &aIdx );
+        SwNodeIndex aIdx( mpDoc->GetNodes().GetEndOfExtras(), 1 );
+        SwCntntNode* pNd = mpDoc->GetNodes().GoNext( &aIdx );
 
         const SwRect aPageRect = pNd->FindPageFrmRect( sal_False, 0, sal_False );
         return aPageRect.SVRect();
@@ -939,12 +944,12 @@ Rectangle SwDocShell::GetVisArea( sal_uInt16 nAspect ) const
 
 Printer *SwDocShell::GetDocumentPrinter()
 {
-    return pDoc->getPrinter( false );
+    return mpDoc->getPrinter( false );
 }
 
 OutputDevice* SwDocShell::GetDocumentRefDev()
 {
-    return pDoc->getReferenceDevice( false );
+    return mpDoc->getReferenceDevice( false );
 }
 
 void SwDocShell::OnDocumentPrinterChanged( Printer * pNewPrinter )
@@ -1003,12 +1008,12 @@ sal_uInt16 SwDocShell::GetHiddenInformationState( sal_uInt16 nStates )
 
 void SwDocShell::GetState(SfxItemSet& rSet)
 {
-    SfxWhichIter aIter(rSet);
-    sal_uInt16  nWhich  = aIter.FirstWhich();
+    SfxWhichIter aIter( rSet );
+    sal_uInt16 nWhich = aIter.FirstWhich();
 
     while (nWhich)
     {
-        switch (nWhich)
+        switch ( nWhich )
         {
         case SID_PRINTPREVIEW:
         {
@@ -1016,16 +1021,16 @@ void SwDocShell::GetState(SfxItemSet& rSet)
             // Disable "multiple layout"
             if ( !bDisable )
             {
-                SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this);
+                SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst( this );
                 while (pTmpFrm)     // Preview suchen
                 {
                     if ( PTR_CAST(SwView, pTmpFrm->GetViewShell()) &&
-                         ((SwView*)pTmpFrm->GetViewShell())->GetWrtShell().GetViewOptions()->getBrowseMode() )
+                         ( (SwView*) pTmpFrm->GetViewShell() )->GetWrtShell().GetViewOptions()->getBrowseMode() )
                     {
                         bDisable = sal_True;
                         break;
                     }
-                    pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this);
+                    pTmpFrm = pTmpFrm->GetNext( *pTmpFrm, this );
                 }
             }
             // End of disabled "multiple layout"
@@ -1034,78 +1039,85 @@ void SwDocShell::GetState(SfxItemSet& rSet)
             else
             {
                 SfxBoolItem aBool( SID_PRINTPREVIEW, sal_False );
-                if( PTR_CAST( SwPagePreView, SfxViewShell::Current()) )
+                if ( PTR_CAST( SwPagePreView, SfxViewShell::Current() ) )
                     aBool.SetValue( sal_True );
                 rSet.Put( aBool );
             }
         }
         break;
+
         case SID_SOURCEVIEW:
         {
-            SfxViewShell* pCurrView = GetView() ? (SfxViewShell*)GetView()
-                                        : SfxViewShell::Current();
-            sal_Bool bSourceView = 0 != PTR_CAST(SwSrcView, pCurrView);
-            rSet.Put(SfxBoolItem(SID_SOURCEVIEW, bSourceView));
+            SfxViewShell* pCurrView = GetView() ? (SfxViewShell*) GetView()
+                                                  :
+                                                  SfxViewShell::Current();
+            sal_Bool bSourceView = 0 != PTR_CAST( SwSrcView, pCurrView );
+            rSet.Put( SfxBoolItem( SID_SOURCEVIEW, bSourceView ) );
         }
         break;
+
         case SID_HTML_MODE:
-            rSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(this)));
-        break;
+            rSet.Put( SfxUInt16Item( SID_HTML_MODE, ::GetHtmlMode( this ) ) );
+            break;
 
         case FN_ABSTRACT_STARIMPRESS:
         case FN_OUTLINE_TO_IMPRESS:
-            {
-                SvtModuleOptions aMOpt;
-                if ( !aMOpt.IsImpress() )
-                    rSet.DisableItem( nWhich );
-            }
-            /* no break here */
+        {
+            SvtModuleOptions aMOpt;
+            if ( !aMOpt.IsImpress() )
+                rSet.DisableItem( nWhich );
+        }
+        /* no break here */
         case FN_ABSTRACT_NEWDOC:
         case FN_OUTLINE_TO_CLIPBOARD:
-            {
-                if ( !GetDoc()->GetNodes().GetOutLineNds().Count() )
-                    rSet.DisableItem( nWhich );
-            }
-            break;
+        {
+            if ( !GetDoc()->GetNodes().GetOutLineNds().Count() )
+                rSet.DisableItem( nWhich );
+        }
+        break;
+
         case SID_BROWSER_MODE:
         case FN_PRINT_LAYOUT:
-            {
-                sal_Bool bState = GetDoc()->get(IDocumentSettingAccess::BROWSE_MODE);
-                if(FN_PRINT_LAYOUT == nWhich)
-                    bState = !bState;
-                rSet.Put( SfxBoolItem( nWhich, bState));
-            }
-            break;
+        {
+            sal_Bool bState = GetDoc()->get( IDocumentSettingAccess::BROWSE_MODE );
+            if ( FN_PRINT_LAYOUT == nWhich )
+                bState = !bState;
+            rSet.Put( SfxBoolItem( nWhich, bState ) );
+        }
+        break;
 
         case FN_NEW_GLOBAL_DOC:
-            if ( ISA(SwGlobalDocShell) )
+            if ( ISA( SwGlobalDocShell ) )
                 rSet.DisableItem( nWhich );
             break;
 
         case FN_NEW_HTML_DOC:
-            if( ISA( SwWebDocShell ) )
+            if ( ISA( SwWebDocShell ) )
                 rSet.DisableItem( nWhich );
             break;
 
         case SID_ATTR_YEAR2000:
-            {
-                const SvNumberFormatter* pFmtr = pDoc->GetNumberFormatter(sal_False);
-                rSet.Put( SfxUInt16Item( nWhich,
-                        static_cast< sal_uInt16 >(
-                        pFmtr ? pFmtr->GetYear2000()
-                              : ::utl::MiscCfg().GetYear2000() )));
-            }
-            break;
+        {
+            const SvNumberFormatter* pFmtr = mpDoc->GetNumberFormatter( sal_False );
+            rSet.Put( SfxUInt16Item( nWhich,
+                static_cast< sal_uInt16 >(
+                pFmtr ? pFmtr->GetYear2000()
+                        :
+                        ::utl::MiscCfg().GetYear2000() ) ) );
+        }
+        break;
+
         case SID_ATTR_CHAR_FONTLIST:
         {
-            rSet.Put( SvxFontListItem( pFontList, SID_ATTR_CHAR_FONTLIST ) );
+            rSet.Put( SvxFontListItem( mpFontList, SID_ATTR_CHAR_FONTLIST ) );
         }
         break;
+
         case SID_MAIL_PREPAREEXPORT:
         {
             //check if linked content or possibly hidden content is available
             //pDoc->UpdateFlds( NULL, false );
-            sfx2::LinkManager& rLnkMgr = pDoc->GetLinkManager();
+            sfx2::LinkManager& rLnkMgr = mpDoc->GetLinkManager();
             const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks();
             sal_Bool bRet = sal_False;
             if( rLnks.Count() )
@@ -1113,13 +1125,14 @@ void SwDocShell::GetState(SfxItemSet& rSet)
             else
             {
                 //sections with hidden flag, hidden character attribute, hidden paragraph/text or conditional text fields
-                bRet = pDoc->HasInvisibleContent();
+                bRet = mpDoc->HasInvisibleContent();
             }
             rSet.Put( SfxBoolItem( nWhich, bRet ) );
         }
         break;
 
-        default: DBG_ASSERT(!this,"Hier darfst Du nicht hinein!");
+        default:
+            DBG_ASSERT( !this, "Hier darfst Du nicht hinein!" );
 
         }
         nWhich = aIter.NextWhich();
@@ -1155,20 +1168,20 @@ SfxStyleSheetBasePool*  SwDocShell::GetStyleSheetPool()
 
 void SwDocShell::SetView(SwView* pVw)
 {
-    if(0 != (pView = pVw))
+    if(0 != (mpView = pVw))
     {
-        pWrtShell = &pView->GetWrtShell();
+        mpWrtShell = &mpView->GetWrtShell();
     }
     else
     {
-        pWrtShell = 0;
+        mpWrtShell = 0;
     }
 }
 
 
 void SwDocShell::PrepareReload()
 {
-    ::DelAllGrfCacheEntries( pDoc );
+    ::DelAllGrfCacheEntries( mpDoc );
 }
 
 // linked graphics are now loaded on demand.
@@ -1181,7 +1194,7 @@ void SwDocShell::LoadingFinished()
     // enables the document modification again.
     // Thus, manuell modify the document, if its modified and its links are updated
     // before <FinishedLoading(..)> is called.
-    const bool bHasDocToStayModified( pDoc->IsModified() && pDoc->LinksUpdated() );
+    const bool bHasDocToStayModified( mpDoc->IsModified() && mpDoc->LinksUpdated() );
     FinishedLoading( SFX_LOADED_ALL );
     SfxViewFrame* pVFrame = SfxViewFrame::GetFirst(this);
     if(pVFrame)
@@ -1191,9 +1204,9 @@ void SwDocShell::LoadingFinished()
             ((SwSrcView*)pShell)->Load(this);
     }
 
-    if ( bHasDocToStayModified && !pDoc->IsModified() )
+    if ( bHasDocToStayModified && !mpDoc->IsModified() )
     {
-        pDoc->SetModified();
+        mpDoc->SetModified();
     }
 }
 
@@ -1202,29 +1215,29 @@ void SwDocShell::CancelTransfers()
 {
     // alle Links vom LinkManager Canceln
     aFinishedTimer.Stop();
-    pDoc->GetLinkManager().CancelTransfers();
+    mpDoc->GetLinkManager().CancelTransfers();
     SfxObjectShell::CancelTransfers();
 }
 
 SwFEShell* SwDocShell::GetFEShell()
 {
-    return pWrtShell;
+    return mpWrtShell;
 }
 
 void SwDocShell::RemoveOLEObjects()
 {
-    SwIterator<SwCntntNode,SwFmtColl> aIter( *pDoc->GetDfltGrfFmtColl() );
+    SwIterator<SwCntntNode,SwFmtColl> aIter( *mpDoc->GetDfltGrfFmtColl() );
     for( SwCntntNode* pNd = aIter.First(); pNd; pNd = aIter.Next() )
     {
         SwOLENode* pOLENd = pNd->GetOLENode();
         if( pOLENd && ( pOLENd->IsOLEObjectDeleted() ||
                         pOLENd->IsInGlobalDocSection() ) )
         {
-            if( !pOLEChildList )
-                pOLEChildList = new comphelper::EmbeddedObjectContainer;
+            if( !mpOLEChildList )
+                mpOLEChildList = new comphelper::EmbeddedObjectContainer;
 
             ::rtl::OUString aObjName = pOLENd->GetOLEObj().GetCurrentPersistName();
-            GetEmbeddedObjectContainer().MoveEmbeddedObject( aObjName, *pOLEChildList );
+            GetEmbeddedObjectContainer().MoveEmbeddedObject( aObjName, *mpOLEChildList );
         }
     }
 }
@@ -1238,16 +1251,16 @@ void SwDocShell::RemoveOLEObjects()
 // saved, but of course only id there are OLE objects with bOLESizeInvalid set.
 void SwDocShell::CalcLayoutForOLEObjects()
 {
-    if( !pWrtShell )
+    if( !mpWrtShell )
         return;
 
-    SwIterator<SwCntntNode,SwFmtColl> aIter( *pDoc->GetDfltGrfFmtColl() );
+    SwIterator<SwCntntNode,SwFmtColl> aIter( *mpDoc->GetDfltGrfFmtColl() );
     for( SwCntntNode* pNd = aIter.First(); pNd; pNd = aIter.Next() )
     {
         SwOLENode* pOLENd = pNd->GetOLENode();
         if( pOLENd && pOLENd->IsOLESizeInvalid() )
         {
-            pWrtShell->CalcLayout();
+            mpWrtShell->CalcLayout();
             break;
         }
     }
@@ -1283,34 +1296,36 @@ uno::Reference< frame::XController >
  ---------------------------------------------------------------------------*/
 void SwDocShell::setDocAccTitle( const String& rTitle )
 {
-    if (pDoc )
+    if ( mpDoc )
     {
-        pDoc->setDocAccTitle( rTitle );
+        mpDoc->setDocAccTitle( rTitle );
     }
 }
 const String SwDocShell::getDocAccTitle() const
 {
     String sRet;
-    if  (pDoc)
+    if ( mpDoc )
     {
-        sRet =  pDoc->getDocAccTitle();
+        sRet = mpDoc->getDocAccTitle();
     }
 
     return sRet;
 }
 
-void SwDocShell::setDocReadOnly( sal_Bool bReadOnly)
+void SwDocShell::setDocReadOnly(
+    sal_Bool bReadOnly )
 {
-    if (pDoc )
+    if ( mpDoc )
     {
-        pDoc->setDocReadOnly( bReadOnly );
+        mpDoc->setDocReadOnly( bReadOnly );
     }
 }
+
 sal_Bool SwDocShell::getDocReadOnly() const
 {
-    if  (pDoc)
+    if ( mpDoc )
     {
-        return pDoc->getDocReadOnly();
+        return mpDoc->getDocReadOnly();
     }
 
     return sal_False;
@@ -1354,27 +1369,27 @@ rtl::OUString SwDocShell::GetEventName( sal_Int32 nIndex )
 
 const ::sfx2::IXmlIdRegistry* SwDocShell::GetXmlIdRegistry() const
 {
-    return pDoc ? &pDoc->GetXmlIdRegistry() : 0;
+    return mpDoc ? &mpDoc->GetXmlIdRegistry() : 0;
 }
 
 
 bool SwDocShell::IsChangeRecording() const
 {
-    return (pWrtShell->GetRedlineMode() & nsRedlineMode_t::REDLINE_ON) != 0;
+    return (mpWrtShell->GetRedlineMode() & nsRedlineMode_t::REDLINE_ON) != 0;
 }
 
 
 bool SwDocShell::HasChangeRecordProtection() const
 {
-    return pWrtShell->getIDocumentRedlineAccess()->GetRedlinePassword().getLength() > 0;
+    return mpWrtShell->getIDocumentRedlineAccess()->GetRedlinePassword().getLength() > 0;
 }
 
 
 void SwDocShell::SetChangeRecording( bool bActivate )
 {
     sal_uInt16 nOn = bActivate ? nsRedlineMode_t::REDLINE_ON : 0;
-    sal_uInt16 nMode = pWrtShell->GetRedlineMode();
-    pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
+    sal_uInt16 nMode = mpWrtShell->GetRedlineMode();
+    mpWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
 }
 
 
@@ -1384,7 +1399,7 @@ bool SwDocShell::SetProtectionPassword( const String &rNewPassword )
     const SfxItemSet*   pArgs = &aSet;
     const SfxPoolItem*  pItem = NULL;
 
-    IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess();
+    IDocumentRedlineAccess* pIDRA = mpWrtShell->getIDocumentRedlineAccess();
     Sequence< sal_Int8 > aPasswd = pIDRA->GetRedlinePassword();
     if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, sal_False, &pItem )
         && ((SfxBoolItem*)pItem)->GetValue() == (aPasswd.getLength() > 0))
@@ -1420,7 +1435,7 @@ bool SwDocShell::GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal
     const SfxItemSet*   pArgs = &aSet;
     const SfxPoolItem*  pItem = NULL;
 
-    IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess();
+    IDocumentRedlineAccess* pIDRA = mpWrtShell->getIDocumentRedlineAccess();
     Sequence< sal_Int8 > aPasswdHash( pIDRA->GetRedlinePassword() );
     if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, sal_False, &pItem )
         && ((SfxBoolItem*)pItem)->GetValue() == (aPasswdHash.getLength() != 0))
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index e39f19f..85b122b 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -196,21 +196,21 @@ void    SwDocShell::ToggleBrowserMode(sal_Bool bSet, SwView* _pView )
 /// update text fields on document properties changes
 void SwDocShell::DoFlushDocInfo()
 {
-    if ( !pDoc ) return;
+    if ( !mpDoc ) return;
 
     bool bUnlockView(true);
-    if ( pWrtShell ) {
-        bUnlockView = !pWrtShell->IsViewLocked();
-        pWrtShell->LockView( sal_True );    // lock visible section
-        pWrtShell->StartAllAction();
+    if ( mpWrtShell ) {
+        bUnlockView = !mpWrtShell->IsViewLocked();
+        mpWrtShell->LockView( sal_True );   // lock visible section
+        mpWrtShell->StartAllAction();
     }
 
-    pDoc->DocInfoChgd();
+    mpDoc->DocInfoChgd();
 
-    if ( pWrtShell ) {
-        pWrtShell->EndAllAction();
+    if ( mpWrtShell ) {
+        mpWrtShell->EndAllAction();
         if ( bUnlockView ) {
-            pWrtShell->LockView( sal_False );
+            mpWrtShell->LockView( sal_False );
         }
     }
 }
@@ -242,13 +242,13 @@ void lcl_processCompatibleSfxHint( const uno::Reference< script::vba::XVBAEventP
 
 void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
 {
-    if( !pDoc )
+    if( !mpDoc )
     {
         return ;
     }
 
 #ifdef FUTURE_VBA
-    uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = pDoc->GetVbaEventProcessor();
+    uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = mpDoc->GetVbaEventProcessor();
     if( xVbaEvents.is() )
         lcl_processCompatibleSfxHint( xVbaEvents, rHint );
 #endif
@@ -274,16 +274,16 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
     if( nAction )
     {
         sal_Bool bUnlockView = sal_True; //initializing prevents warning
-        if( pWrtShell )
+        if( mpWrtShell )
         {
-            bUnlockView = !pWrtShell->IsViewLocked();
-            pWrtShell->LockView( sal_True );    //lock visible section
-            pWrtShell->StartAllAction();
+            bUnlockView = !mpWrtShell->IsViewLocked();
+            mpWrtShell->LockView( sal_True );   //lock visible section
+            mpWrtShell->StartAllAction();
         }
         switch( nAction )
         {
         case 2:
-            pDoc->GetSysFldType( RES_FILENAMEFLD )->UpdateFlds();
+            mpDoc->GetSysFldType( RES_FILENAMEFLD )->UpdateFlds();
             break;
 
         // own action for event LOADFINISHED in order to avoid a modified document.
@@ -294,23 +294,23 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
                 const bool bResetModified = IsEnableSetModified();
                 if ( bResetModified )
                     EnableSetModified( sal_False );
-                const bool bIsDocModified = pDoc->IsModified();
+                const bool bIsDocModified = mpDoc->IsModified();
 
-                pDoc->DocInfoChgd( );
+                mpDoc->DocInfoChgd( );
 
                 if ( !bIsDocModified )
-                    pDoc->ResetModified();
+                    mpDoc->ResetModified();
                 if ( bResetModified )
                     EnableSetModified( sal_True );
             }
             break;
         }
 
-        if( pWrtShell )
+        if( mpWrtShell )
         {
-            pWrtShell->EndAllAction();
+            mpWrtShell->EndAllAction();
             if( bUnlockView )
-                pWrtShell->LockView( sal_False );
+                mpWrtShell->LockView( sal_False );
         }
     }
 }
@@ -327,9 +327,9 @@ sal_uInt16 SwDocShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
         EndListening( *this );
 
 #ifdef FUTURE_VBA
-    if( pDoc && IsInPrepareClose() )
+    if( mpDoc && IsInPrepareClose() )
     {
-        uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = pDoc->GetVbaEventProcessor();
+        uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = mpDoc->GetVbaEventProcessor();
         if( xVbaEvents.is() )
         {
             using namespace com::sun::star::script::vba::VBAEventId;
@@ -388,7 +388,7 @@ sal_Bool SwDocShell::Insert( SfxObjectShell &rSource,
 
         // dflt. PageDesc und StandardZeichenvorlage nie loeschen !!!
         if( ( SFX_STYLE_FAMILY_PAGE == eOldFamily &&
-              const_cast<const SwDoc *>(pDoc)->GetPageDesc(0).GetName() ==
+              const_cast<const SwDoc *>(mpDoc)->GetPageDesc(0).GetName() ==
               rOldName ) ||
               ( SFX_STYLE_FAMILY_CHAR == eOldFamily &&
                 rOldName == *SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD -
@@ -399,7 +399,7 @@ sal_Bool SwDocShell::Insert( SfxObjectShell &rSource,
         sal_uInt16 nMySrchMask = pMyPool->GetSearchMask();
 
         SfxStyleSheetBase* pExist;
-        if( ::FindPhyStyle( *pDoc, rOldName, eOldFamily ) )
+        if( ::FindPhyStyle( *mpDoc, rOldName, eOldFamily ) )
         {
             // Bug 20365: nur uebernehmen, wenn das gewuenscht ist!
             if( ERRCODE_BUTTON_OK != ErrorHandler::HandleError(
@@ -439,7 +439,7 @@ sal_Bool SwDocShell::Insert( SfxObjectShell &rSource,
             // gesondert behandeln!!
             SwPageDesc* pDestDsc = (SwPageDesc*)xNewSheet->GetPageDesc();
             SwPageDesc* pCpyDsc = (SwPageDesc*)((SwDocStyleSheet*)pHisSheet)->GetPageDesc();
-            pDoc->CopyPageDesc( *pCpyDsc, *pDestDsc );
+            mpDoc->CopyPageDesc( *pCpyDsc, *pDestDsc );
         }
         else
             // die neue Vorlage mit den Attributen fuellen
@@ -539,7 +539,7 @@ sal_Bool SwDocShell::Insert( SfxObjectShell &rSource,
         pMyPool->SetSearchMask( eMyOldFamily, nMySrchMask );
 
         // Model geaendert
-        ASSERT(pDoc, "Doc fehlt");
+        ASSERT(mpDoc, "Doc fehlt");
         GetDoc()->SetModified();
 
         bRet = sal_True;
@@ -587,7 +587,7 @@ sal_Bool SwDocShell::Remove(sal_uInt16 nIdx1,       // siehe Insert
 
         // dflt. PageDesc und StandardZeichenvorlage nie loeschen !!!
         if( ( SFX_STYLE_FAMILY_PAGE == eFamily &&
-              const_cast<const SwDoc *>(pDoc)->GetPageDesc(0).GetName()
+              const_cast<const SwDoc *>(mpDoc)->GetPageDesc(0).GetName()
               == aName ) ||
               ( SFX_STYLE_FAMILY_CHAR == eFamily &&
                 aName == *SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD -
@@ -629,7 +629,7 @@ sal_Bool SwDocShell::Remove(sal_uInt16 nIdx1,       // siehe Insert
 
 
     // Model geaendert
-    ASSERT(pDoc, "Doc fehlt");
+    ASSERT(mpDoc, "Doc fehlt");
     GetDoc()->SetModified();
 
     return bRet;
@@ -1031,7 +1031,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
                 xDocSh->DoInitNew( 0 );
 
                 sal_Bool bImpress = FN_ABSTRACT_STARIMPRESS == nWhich;
-                pDoc->Summary( pSmryDoc, nLevel, nPara, bImpress );
+                mpDoc->Summary( pSmryDoc, nLevel, nPara, bImpress );
                 if( bImpress )
                 {
                     WriterRef xWrt;
@@ -1175,24 +1175,24 @@ void SwDocShell::Execute(SfxRequest& rReq)
         case SID_MAIL_PREPAREEXPORT:
         {
             //pWrtShell is not set in page preview
-            if(pWrtShell)
-                pWrtShell->StartAllAction();
-            pDoc->UpdateFlds( NULL, false );
-            pDoc->EmbedAllLinks();
-            pDoc->RemoveInvisibleContent();
-            if(pWrtShell)
-                pWrtShell->EndAllAction();
+            if(mpWrtShell)
+                mpWrtShell->StartAllAction();
+            mpDoc->UpdateFlds( NULL, false );
+            mpDoc->EmbedAllLinks();
+            mpDoc->RemoveInvisibleContent();
+            if(mpWrtShell)
+                mpWrtShell->EndAllAction();
         }
         break;
 
         case SID_MAIL_EXPORT_FINISHED:
         {
-                if(pWrtShell)
-                    pWrtShell->StartAllAction();
+                if(mpWrtShell)
+                    mpWrtShell->StartAllAction();
                 //try to undo the removal of invisible content
-                pDoc->RestoreInvisibleContent();
-                if(pWrtShell)
-                    pWrtShell->EndAllAction();
+                mpDoc->RestoreInvisibleContent();
+                if(mpWrtShell)
+                    mpWrtShell->EndAllAction();
         }
         break;
         case FN_NEW_HTML_DOC:
@@ -1333,7 +1333,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
                     /////////////////////////////////////////////////////////////////////
 
                         bool    bOutline[MAXLEVEL] = {false};
-                        const SwOutlineNodes& rOutlNds = pDoc->GetNodes().GetOutLineNds();
+                        const SwOutlineNodes& rOutlNds = mpDoc->GetNodes().GetOutLineNds();
                         if( rOutlNds.Count() )
                         {
                             int nLevel;
@@ -1345,7 +1345,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
                                 }
                         }
 
-                        const sal_uInt16 nStyleCount = pDoc->GetTxtFmtColls()->Count();
+                        const sal_uInt16 nStyleCount = mpDoc->GetTxtFmtColls()->Count();
                         Sequence<OUString> aListBoxEntries( MAXLEVEL + nStyleCount);
                         OUString* pEntries = aListBoxEntries.getArray();
                         sal_Int32   nIdx = 0 ;
@@ -1361,7 +1361,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
                         for(sal_uInt16 i = 0; i < nStyleCount; ++i)
                         {
                             SwTxtFmtColl &rTxtColl =
-                                *pDoc->GetTxtFmtColls()->GetObject( i );
+                                *mpDoc->GetTxtFmtColls()->GetObject( i );
                             if( !rTxtColl.IsDefault() && rTxtColl.IsAtDocNodeSet() )
                             {
                                 pEntries[nIdx++] = sStyle + rTxtColl.GetName();
@@ -1443,17 +1443,17 @@ void SwDocShell::Execute(SfxRequest& rReq)
                         if ( bCreateByOutlineLevel )    //add by zhaojianwei
                         {
                             bDone = bCreateHtml         //#outline level,removed by zhaojianwei
-                                ? pDoc->GenerateHTMLDoc( aFileName, nTemplateOutlineLevel )
-                                : pDoc->GenerateGlobalDoc( aFileName, nTemplateOutlineLevel );
+                                ? mpDoc->GenerateHTMLDoc( aFileName, nTemplateOutlineLevel )
+                                : mpDoc->GenerateGlobalDoc( aFileName, nTemplateOutlineLevel );
                         }
                         else
                         {
                             const SwTxtFmtColl* pSplitColl = 0;
                             if ( aTemplateName.Len() )
-                                pSplitColl = pDoc->FindTxtFmtCollByName(aTemplateName);
+                                pSplitColl = mpDoc->FindTxtFmtCollByName(aTemplateName);
                             bDone = bCreateHtml         //#outline level,removed by zhaojianwei
-                                ? pDoc->GenerateHTMLDoc( aFileName, pSplitColl )
-                                : pDoc->GenerateGlobalDoc( aFileName, pSplitColl );
+                                ? mpDoc->GenerateHTMLDoc( aFileName, pSplitColl )
+                                : mpDoc->GenerateGlobalDoc( aFileName, pSplitColl );
                         }
                         //<-end,zhaojianwei
                         if( bDone )
@@ -1515,7 +1515,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
                     pViewShell = pVFrame ? pVFrame->GetViewShell() : 0;
                     pCurrView = dynamic_cast<SwView*>( pViewShell );
                 }
-                pDoc->GetNumberFormatter(sal_True)->SetYear2000(nYear2K);
+                mpDoc->GetNumberFormatter(sal_True)->SetYear2000(nYear2K);
             }
         break;
 
@@ -1531,7 +1531,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
 long SwDocShell::DdeGetData( const String& rItem, const String& rMimeType,
                                 uno::Any & rValue )
 {
-    return pDoc->GetData( rItem, rMimeType, rValue );
+    return mpDoc->GetData( rItem, rMimeType, rValue );
 }
 
 
@@ -1542,7 +1542,7 @@ long SwDocShell::DdeGetData( const String& rItem, const String& rMimeType,
 long SwDocShell::DdeSetData( const String& rItem, const String& rMimeType,
                             const uno::Any & rValue )
 {
-    return pDoc->SetData( rItem, rMimeType, rValue );
+    return mpDoc->SetData( rItem, rMimeType, rValue );
 }
 
 
@@ -1552,7 +1552,7 @@ long SwDocShell::DdeSetData( const String& rItem, const String& rMimeType,
 
 ::sfx2::SvLinkSource* SwDocShell::DdeCreateLinkSource( const String& rItem )
 {
-    return pDoc->CreateLinkSource( rItem );
+    return mpDoc->CreateLinkSource( rItem );
 }
 
 /*--------------------------------------------------------------------
@@ -1593,20 +1593,20 @@ void SwDocShell::SetModified( sal_Bool bSet )
     SfxObjectShell::SetModified( bSet );
     if( IsEnableSetModified())
     {
-         if (!pDoc->IsInCallModified() )
+         if (!mpDoc->IsInCallModified() )
          {
             EnableSetModified( sal_False );
             if( bSet )
             {
-                sal_Bool bOld = pDoc->IsModified();
-                pDoc->SetModified();
+                sal_Bool bOld = mpDoc->IsModified();
+                mpDoc->SetModified();
                 if( !bOld )
                 {
-                    pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
+                    mpDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
                 }
             }
             else
-                pDoc->ResetModified();
+                mpDoc->ResetModified();
 
             EnableSetModified( sal_True );
          }
@@ -1699,7 +1699,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
                     "Loschen des Basics hat nicht geklappt" );
         }
     }
-    sal_Bool bWasBrowseMode = pDoc->get(IDocumentSettingAccess::BROWSE_MODE);
+    sal_Bool bWasBrowseMode = mpDoc->get(IDocumentSettingAccess::BROWSE_MODE);
     RemoveLink();
 
     //jetzt muss auch das UNO-Model ueber das neue Doc informiert werden #51535#
@@ -1710,7 +1710,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
     AddLink();
     //#116402# update font list when new document is created
     UpdateFontList();
-    pDoc->set(IDocumentSettingAccess::BROWSE_MODE, bWasBrowseMode);
+    mpDoc->set(IDocumentSettingAccess::BROWSE_MODE, bWasBrowseMode);
     pSrcView->SetPool(&GetPool());
 
 
@@ -1731,7 +1731,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
     // the base URL has to be set to the filename of the document <rMedname>
     // and not to the base URL of the temporary file <aMed> in order to get
     // the URLs of the linked graphics correctly resolved.
-    SwReloadFromHtmlReader aReader( aMed, rMedname, pDoc );
+    SwReloadFromHtmlReader aReader( aMed, rMedname, mpDoc );
     // <--
     aReader.Read( *ReadHTML );
 
@@ -1754,7 +1754,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
     if(bModified && !IsReadOnly())
         SetModified();
     else
-        pDoc->ResetModified();
+        mpDoc->ResetModified();
 }
 
 sal_uLong SwDocShell::LoadStylesFromFile( const String& rURL,
@@ -1820,13 +1820,13 @@ sal_uLong SwDocShell::LoadStylesFromFile( const String& rURL,
         // insert the styles!
         if( bUnoCall )
         {
-            SwNodeIndex aIdx( pDoc->GetNodes().GetEndOfContent(), -1 );
+            SwNodeIndex aIdx( mpDoc->GetNodes().GetEndOfContent(), -1 );
             pPam = new SwPaM( aIdx );
             pReader = new SwReader( aMed, rURL, *pPam );
         }
         else
         {
-            pReader = new SwReader( aMed, rURL, *pWrtShell->GetCrsr() );
+            pReader = new SwReader( aMed, rURL, *mpWrtShell->GetCrsr() );
         }
 
         pRead->GetReaderOpt().SetTxtFmts( rOpt.IsTxtFmts() );
@@ -1837,14 +1837,14 @@ sal_uLong SwDocShell::LoadStylesFromFile( const String& rURL,
 
         if( bUnoCall )
         {
-            UnoActionContext aAction( pDoc );
+            UnoActionContext aAction( mpDoc );
             nErr = pReader->Read( *pRead );
         }
         else
         {
-            pWrtShell->StartAllAction();
+            mpWrtShell->StartAllAction();
             nErr = pReader->Read( *pRead );
-            pWrtShell->EndAllAction();
+            mpWrtShell->EndAllAction();
         }
         delete pPam;
         delete pReader;
diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx
index c104da9..13ecdf7 100644
--- a/sw/source/ui/app/docshini.cxx
+++ b/sw/source/ui/app/docshini.cxx
@@ -137,7 +137,7 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
                     RES_PARATR_TABSTOP));
 */
         if ( GetCreateMode() ==  SFX_CREATE_MODE_EMBEDDED )
-            SwTransferable::InitOle( this, *pDoc );
+            SwTransferable::InitOle( this, *mpDoc );
 
         // set forbidden characters if necessary
         SvxAsianConfig aAsian;
@@ -150,20 +150,20 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
                 ForbiddenCharacters aForbidden;
                 aAsian.GetStartEndChars( pLocales[i], aForbidden.beginLine, aForbidden.endLine);
                 LanguageType  eLang = SvxLocaleToLanguage(pLocales[i]);
-                pDoc->setForbiddenCharacters( eLang, aForbidden);
+                mpDoc->setForbiddenCharacters( eLang, aForbidden);
             }
         }
-        pDoc->set(IDocumentSettingAccess::KERN_ASIAN_PUNCTUATION,
+        mpDoc->set(IDocumentSettingAccess::KERN_ASIAN_PUNCTUATION,
                   !aAsian.IsKerningWesternTextOnly());
-        pDoc->setCharacterCompressionType(static_cast<SwCharCompressType>(aAsian.GetCharDistanceCompression()));
-        pDoc->setPrintData(*SW_MOD()->GetPrtOptions(bWeb));
+        mpDoc->setCharacterCompressionType(static_cast<SwCharCompressType>(aAsian.GetCharDistanceCompression()));
+        mpDoc->setPrintData(*SW_MOD()->GetPrtOptions(bWeb));
 
         SubInitNew();
 
         // fuer alle
 
         SwStdFontConfig* pStdFont = SW_MOD()->GetStdFontConfig();
-        SfxPrinter* pPrt = pDoc->getPrinter( false );
+        SfxPrinter* pPrt = mpDoc->getPrinter( false );
 
         String sEntry;
         sal_uInt16 aFontWhich[] =
@@ -201,7 +201,7 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
             sal_uInt16 nFontWhich = aFontWhich[i];
             sal_uInt16 nFontId = aFontIds[i];
             SvxFontItem* pFontItem = 0;
-            const SvxLanguageItem& rLang = (const SvxLanguageItem&)pDoc->GetDefault( aLangTypes[i] );
+            const SvxLanguageItem& rLang = (const SvxLanguageItem&)mpDoc->GetDefault( aLangTypes[i] );
             LanguageType eLanguage = rLang.GetLanguage();
             if(!pStdFont->IsFontDefault(nFontId))
             {
@@ -238,20 +238,20 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
                 pFontItem = new SvxFontItem(aLangDefFont.GetFamily(), aLangDefFont.GetName(),
                                     aEmptyStr, aLangDefFont.GetPitch(), aLangDefFont.GetCharSet(), nFontWhich);
             }
-            pDoc->SetDefault(*pFontItem);
+            mpDoc->SetDefault(*pFontItem);
             if( !bHTMLTemplSet )
             {
-                SwTxtFmtColl *pColl = pDoc->GetTxtCollFromPool(RES_POOLCOLL_STANDARD);
+                SwTxtFmtColl *pColl = mpDoc->GetTxtCollFromPool(RES_POOLCOLL_STANDARD);
                 pColl->ResetFmtAttr(nFontWhich);
             }
             delete pFontItem;
             sal_Int32 nFontHeight = pStdFont->GetFontHeight( FONT_STANDARD, i, eLanguage );
             if(nFontHeight <= 0)
                 nFontHeight = pStdFont->GetDefaultHeightFor( nFontId, eLanguage );
-            pDoc->SetDefault(SvxFontHeightItem( nFontHeight, 100, aFontHeightWhich[i] ));
+            mpDoc->SetDefault(SvxFontHeightItem( nFontHeight, 100, aFontHeightWhich[i] ));
             if( !bHTMLTemplSet )
             {
-                SwTxtFmtColl *pColl = pDoc->GetTxtCollFromPool(RES_POOLCOLL_STANDARD);
+                SwTxtFmtColl *pColl = mpDoc->GetTxtCollFromPool(RES_POOLCOLL_STANDARD);
                 pColl->ResetFmtAttr(aFontHeightWhich[i]);
             }
 
@@ -274,20 +274,20 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
 
         sal_uInt16 nFontWhich = RES_CHRATR_FONT;
         sal_uInt16 nFontHeightWhich = RES_CHRATR_FONTSIZE;
-        LanguageType eLanguage = static_cast<const SvxLanguageItem&>(pDoc->GetDefault( RES_CHRATR_LANGUAGE )).GetLanguage();
+        LanguageType eLanguage = static_cast<const SvxLanguageItem&>(mpDoc->GetDefault( RES_CHRATR_LANGUAGE )).GetLanguage();
         for(sal_uInt8 nIdx = 0; nIdx < 24; nIdx += 2)
         {
             if(nIdx == 8)
             {
                 nFontWhich = RES_CHRATR_CJK_FONT;
                 nFontHeightWhich = RES_CHRATR_CJK_FONTSIZE;
-                eLanguage = static_cast<const SvxLanguageItem&>(pDoc->GetDefault( RES_CHRATR_CJK_LANGUAGE )).GetLanguage();
+                eLanguage = static_cast<const SvxLanguageItem&>(mpDoc->GetDefault( RES_CHRATR_CJK_LANGUAGE )).GetLanguage();
             }
             else if(nIdx == 16)
             {
                 nFontWhich = RES_CHRATR_CTL_FONT;
                 nFontHeightWhich = RES_CHRATR_CTL_FONTSIZE;
-                eLanguage = static_cast<const SvxLanguageItem&>(pDoc->GetDefault( RES_CHRATR_CTL_LANGUAGE )).GetLanguage();
+                eLanguage = static_cast<const SvxLanguageItem&>(mpDoc->GetDefault( RES_CHRATR_CTL_LANGUAGE )).GetLanguage();
             }
             SwTxtFmtColl *pColl = 0;
             if(!pStdFont->IsFontDefault(aFontIdPoolId[nIdx]))
@@ -298,7 +298,7 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
                 if( pPrt )
                     aFont = pPrt->GetFontMetric( aFont );
 
-                pColl = pDoc->GetTxtCollFromPool(aFontIdPoolId[nIdx + 1]);
+                pColl = mpDoc->GetTxtCollFromPool(aFontIdPoolId[nIdx + 1]);
                 if( !bHTMLTemplSet ||
                     SFX_ITEM_SET != pColl->GetAttrSet().GetItemState(
                                                     nFontWhich, sal_False ) )
@@ -311,7 +311,7 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
             if(nFontHeight <= 0)
                 nFontHeight = pStdFont->GetDefaultHeightFor( aFontIdPoolId[nIdx], eLanguage );
             if(!pColl)
-                pColl = pDoc->GetTxtCollFromPool(aFontIdPoolId[nIdx + 1]);
+                pColl = mpDoc->GetTxtCollFromPool(aFontIdPoolId[nIdx + 1]);
             SvxFontHeightItem aFontHeight( (const SvxFontHeightItem&)pColl->GetFmtAttr( nFontHeightWhich, sal_True ));
             if(aFontHeight.GetHeight() != sal::static_int_cast<sal_uInt32, sal_Int32>(nFontHeight))
             {
@@ -323,7 +323,7 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
         // the default for documents created via 'File/New' should be 'on'
         // (old documents, where this property was not yet implemented, will get the
         // value 'false' in the SwDoc c-tor)
-        pDoc->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT,
+        mpDoc->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT,
                 SW_MOD()->GetUsrPref( bWeb )->IsAlignMathObjectsToBaseline() );
     }
 
@@ -331,26 +331,26 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
         the default adjusment is to the right. */
     if( !bHTMLTemplSet &&
         FRMDIR_HORI_RIGHT_TOP == GetDefaultFrameDirection(GetAppLanguage()) )
-        pDoc->SetDefault( SvxAdjustItem(SVX_ADJUST_RIGHT, RES_PARATR_ADJUST ) );
+        mpDoc->SetDefault( SvxAdjustItem(SVX_ADJUST_RIGHT, RES_PARATR_ADJUST ) );
 
     // OD 09.10.2003 #i18732# - set dynamic pool default for
     // item RES_FOLLOW_TEXT_FLOW to sal_False for *new document*.
     // Thus, redo this change in method <SwDoc::RemoveAllFmtLanguageDependencies()>,
     // which is called from <SwDocShell::ConvertFrom(..)> in order to restore
     // the static pool default.
-    pDoc->SetDefault( SwFmtFollowTextFlow( sal_False ) );
+    mpDoc->SetDefault( SwFmtFollowTextFlow( sal_False ) );
 
 // --> collapsing borders FME 2005-05-27 #i29550#
-    pDoc->SetDefault( SfxBoolItem( RES_COLLAPSING_BORDERS, sal_True ) );
+    mpDoc->SetDefault( SfxBoolItem( RES_COLLAPSING_BORDERS, sal_True ) );
 // <-- collapsing
 
     //#i16874# AutoKerning as default for new documents
-    pDoc->SetDefault( SvxAutoKernItem( sal_True, RES_CHRATR_AUTOKERN ) );
+    mpDoc->SetDefault( SvxAutoKernItem( sal_True, RES_CHRATR_AUTOKERN ) );
 
     // --> OD 2005-02-10 #i42080# - Due to the several calls of method <SetDefault(..)>
     // at the document instance, the document is modified. Thus, reset this
     // status here. Note: In method <SubInitNew()> this is also done.
-    pDoc->ResetModified();
+    mpDoc->ResetModified();
     // <--
 
     return bRet;
@@ -363,13 +363,13 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
 
 SwDocShell::SwDocShell( SfxObjectCreateMode eMode ) :
     SfxObjectShell ( eMode ),
-    pDoc(0),
-    pFontList(0),
-    pView( 0 ),
-    pWrtShell( 0 ),
-    pOLEChildList( 0 ),
-    nUpdateDocMode(document::UpdateDocMode::ACCORDING_TO_CONFIG),
-    bInUpdateFontList(false)
+    mpDoc(0),
+    mpFontList(0),
+    mpView( 0 ),
+    mpWrtShell( 0 ),
+    mpOLEChildList( 0 ),
+    mnUpdateDocMode(document::UpdateDocMode::ACCORDING_TO_CONFIG),
+    mbInUpdateFontList(false)
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722",  "SwDocShell::SwDocShell" );
     Init_Impl();
@@ -382,13 +382,13 @@ SwDocShell::SwDocShell( SfxObjectCreateMode eMode ) :
 
 SwDocShell::SwDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
     SfxObjectShell ( i_nSfxCreationFlags ),
-    pDoc(0),
-    pFontList(0),
-    pView( 0 ),
-    pWrtShell( 0 ),
-    pOLEChildList( 0 ),
-    nUpdateDocMode(document::UpdateDocMode::ACCORDING_TO_CONFIG),
-    bInUpdateFontList(false)
+    mpDoc(0),
+    mpFontList(0),
+    mpView( 0 ),
+    mpWrtShell( 0 ),
+    mpOLEChildList( 0 ),
+    mnUpdateDocMode(document::UpdateDocMode::ACCORDING_TO_CONFIG),
+    mbInUpdateFontList(false)
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722",  "SwDocShell::SwDocShell" );
     Init_Impl();
@@ -401,13 +401,13 @@ SwDocShell::SwDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
 
 SwDocShell::SwDocShell( SwDoc *pD, SfxObjectCreateMode eMode ):
     SfxObjectShell ( eMode ),
-    pDoc(pD),
-    pFontList(0),
-    pView( 0 ),
-    pWrtShell( 0 ),
-    pOLEChildList( 0 ),
-    nUpdateDocMode(document::UpdateDocMode::ACCORDING_TO_CONFIG),
-    bInUpdateFontList(false)
+    mpDoc(pD),
+    mpFontList(0),
+    mpView( 0 ),
+    mpWrtShell( 0 ),
+    mpOLEChildList( 0 ),
+    mnUpdateDocMode(document::UpdateDocMode::ACCORDING_TO_CONFIG),
+    mbInUpdateFontList(false)
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722",  "SwDocShell::SwDocShell" );
     Init_Impl();
@@ -421,22 +421,22 @@ SwDocShell::SwDocShell( SwDoc *pD, SfxObjectCreateMode eMode ):
  SwDocShell::~SwDocShell()
 {
     // disable chart related objects now because in ~SwDoc it may be to late for this
-    if( pDoc )
+    if( mpDoc )
     {
-        pDoc->GetChartControllerHelper().Disconnect();
-        SwChartDataProvider *pPCD = pDoc->GetChartDataProvider();
+        mpDoc->GetChartControllerHelper().Disconnect();
+        SwChartDataProvider *pPCD = mpDoc->GetChartDataProvider();
         if (pPCD)
             pPCD->dispose();
     }
 
     RemoveLink();
-    delete pFontList;
+    delete mpFontList;
 
     // wir als BroadCaster werden auch unser eigener Listener
     // (fuer DocInfo/FileNamen/....)
     EndListening( *this );
 
-    delete pOLEChildList;
+    delete mpOLEChildList;
 }
 /* -----------------------------10.09.2001 15:59------------------------------
 
@@ -461,23 +461,23 @@ void  SwDocShell::Init_Impl()
 
 void SwDocShell::AddLink()
 {
-    if( !pDoc )
+    if( !mpDoc )
     {
         SwDocFac aFactory;
-        pDoc = aFactory.GetDoc();
-        pDoc->acquire();
-        pDoc->set(IDocumentSettingAccess::HTML_MODE, ISA(SwWebDocShell) );
+        mpDoc = aFactory.GetDoc();
+        mpDoc->acquire();
+        mpDoc->set(IDocumentSettingAccess::HTML_MODE, ISA(SwWebDocShell) );
     }
     else
-        pDoc->acquire();
-    pDoc->SetDocShell( this );      // am Doc den DocShell-Pointer setzen
+        mpDoc->acquire();
+    mpDoc->SetDocShell( this );     // am Doc den DocShell-Pointer setzen
     uno::Reference< text::XTextDocument >  xDoc(GetBaseModel(), uno::UNO_QUERY);
     ((SwXTextDocument*)xDoc.get())->Reactivate(this);
 
-    SetPool(&pDoc->GetAttrPool());
+    SetPool(&mpDoc->GetAttrPool());
 
     // am besten erst wenn eine sdbcx::View erzeugt wird !!!
-    pDoc->SetOle2Link(LINK(this, SwDocShell, Ole2ModifiedHdl));
+    mpDoc->SetOle2Link(LINK(this, SwDocShell, Ole2ModifiedHdl));
 }
 
 /*--------------------------------------------------------------------
@@ -487,17 +487,17 @@ void SwDocShell::AddLink()
 
 void SwDocShell::UpdateFontList()
 {
-    if(!bInUpdateFontList)
+    if(!mbInUpdateFontList)
     {
-        bInUpdateFontList = true;
-        ASSERT(pDoc, "Kein Doc keine FontList");
-        if( pDoc )
+        mbInUpdateFontList = true;
+        ASSERT(mpDoc, "Kein Doc keine FontList");
+        if( mpDoc )
         {
-            delete pFontList;
-            pFontList = new FontList( pDoc->getReferenceDevice( true ) );
-            PutItem( SvxFontListItem( pFontList, SID_ATTR_CHAR_FONTLIST ) );
+            delete mpFontList;
+            mpFontList = new FontList( mpDoc->getReferenceDevice( true ) );
+            PutItem( SvxFontListItem( mpFontList, SID_ATTR_CHAR_FONTLIST ) );
         }
-        bInUpdateFontList = false;
+        mbInUpdateFontList = false;
     }
 }
 
@@ -512,19 +512,19 @@ void SwDocShell::RemoveLink()
     uno::Reference< text::XTextDocument >  xDoc(GetBaseModel(), uno::UNO_QUERY);
     ((SwXTextDocument*)xDoc.get())->Invalidate();
     aFinishedTimer.Stop();
-    if(pDoc)
+    if(mpDoc)
     {
         if( mxBasePool.is() )
         {
             static_cast<SwDocStyleSheetPool*>(mxBasePool.get())->dispose();
             mxBasePool.clear();
         }
-        sal_Int8 nRefCt = static_cast< sal_Int8 >(pDoc->release());
-        pDoc->SetOle2Link(Link());
-        pDoc->SetDocShell( 0 );
+        sal_Int8 nRefCt = static_cast< sal_Int8 >(mpDoc->release());
+        mpDoc->SetOle2Link(Link());
+        mpDoc->SetDocShell( 0 );
         if( !nRefCt )
-            delete pDoc;
-        pDoc = 0;       // wir haben das Doc nicht mehr !!
+            delete mpDoc;
+        mpDoc = 0;       // wir haben das Doc nicht mehr !!
     }
 }
 void SwDocShell::InvalidateModel()
@@ -552,7 +552,7 @@ sal_Bool  SwDocShell::Load( SfxMedium& rMedium )
     if( SfxObjectShell::Load( rMedium ))
     {
         RTL_LOGFILE_CONTEXT_TRACE( aLog, "after SfxInPlaceObject::Load" );
-        if( pDoc )              // fuer Letzte Version !!
+        if( mpDoc )              // fuer Letzte Version !!
             RemoveLink();       // das existierende Loslassen
 
         AddLink();      // Link setzen und Daten updaten !!
@@ -560,11 +560,11 @@ sal_Bool  SwDocShell::Load( SfxMedium& rMedium )
         // Das Laden
         // fuer MD
             ASSERT( !mxBasePool.is(), "wer hat seinen Pool nicht zerstoert?" );
-            mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
+            mxBasePool = new SwDocStyleSheetPool( *mpDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
             if(GetCreateMode() != SFX_CREATE_MODE_ORGANIZER)
             {
                 SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
-                nUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE;
+                mnUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE;
             }
 
         SwWait aWait( *this, true );
@@ -580,7 +580,7 @@ sal_Bool  SwDocShell::Load( SfxMedium& rMedium )
                 if( ReadXML )
                 {
                     ReadXML->SetOrganizerMode( sal_True );
-                    SwReader aRdr( rMedium, aEmptyStr, pDoc );
+                    SwReader aRdr( rMedium, aEmptyStr, mpDoc );
                     nErr = aRdr.Read( *ReadXML );
                     ReadXML->SetOrganizerMode( sal_False );
                 }
@@ -591,7 +591,7 @@ sal_Bool  SwDocShell::Load( SfxMedium& rMedium )
         case SFX_CREATE_MODE_EMBEDDED:
             {
                 // fuer MWERKS (Mac-Compiler): kann nicht selbststaendig casten
-                SwTransferable::InitOle( this, *pDoc );
+                SwTransferable::InitOle( this, *mpDoc );
             }
             // SfxProgress unterdruecken, wenn man Embedded ist
             SW_MOD()->SetEmbeddedLoadSave( sal_True );
@@ -605,7 +605,7 @@ sal_Bool  SwDocShell::Load( SfxMedium& rMedium )
                 {
                     // die DocInfo vom Doc am DocShell-Medium setzen
                     RTL_LOGFILE_CONTEXT_TRACE( aLog, "before ReadDocInfo" );
-                    SwReader aRdr( rMedium, aEmptyStr, pDoc );
+                    SwReader aRdr( rMedium, aEmptyStr, mpDoc );
                     RTL_LOGFILE_CONTEXT_TRACE( aLog, "before Read" );
                     nErr = aRdr.Read( *pReader );
                     RTL_LOGFILE_CONTEXT_TRACE( aLog, "after Read" );
@@ -615,13 +615,13 @@ sal_Bool  SwDocShell::Load( SfxMedium& rMedium )
                     // by this formats.
                     if( ISA( SwWebDocShell ) )
                     {
-                        if( !pDoc->get(IDocumentSettingAccess::HTML_MODE) )
-                            pDoc->set(IDocumentSettingAccess::HTML_MODE, true);
+                        if( !mpDoc->get(IDocumentSettingAccess::HTML_MODE) )
+                            mpDoc->set(IDocumentSettingAccess::HTML_MODE, true);
                     }
                     if( ISA( SwGlobalDocShell ) )
                     {
-                        if( !pDoc->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
-                            pDoc->set(IDocumentSettingAccess::GLOBAL_DOCUMENT, true);
+                        if( !mpDoc->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
+                            mpDoc->set(IDocumentSettingAccess::GLOBAL_DOCUMENT, true);
                     }
                 }
 #ifdef DBG_UTIL
@@ -637,7 +637,7 @@ sal_Bool  SwDocShell::Load( SfxMedium& rMedium )
         }
 
         UpdateFontList();
-        InitDrawModelAndDocShell(this, pDoc ? pDoc->GetDrawModel() : 0);
+        InitDrawModelAndDocShell(this, mpDoc ? mpDoc->GetDrawModel() : 0);
 
         SetError( nErr, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
         bRet = !IsError( nErr );
@@ -647,7 +647,7 @@ sal_Bool  SwDocShell::Load( SfxMedium& rMedium )
 //        if( bRet && !pDoc->IsInLoadAsynchron() &&
 //            GetCreateMode() == SFX_CREATE_MODE_STANDARD )
 //            StartLoadFinishedTimer();
-        if ( bRet && !pDoc->IsInLoadAsynchron() &&
+        if ( bRet && !mpDoc->IsInLoadAsynchron() &&
              GetCreateMode() == SFX_CREATE_MODE_STANDARD )
         {
             LoadingFinished();
@@ -670,7 +670,7 @@ sal_Bool  SwDocShell::LoadFrom( SfxMedium& rMedium )
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722",  "SwDocShell::LoadFrom" );
     sal_Bool bRet = sal_False;
-    if( pDoc )
+    if( mpDoc )
         RemoveLink();
 
     AddLink();      // Link setzen und Daten updaten !!
@@ -687,11 +687,11 @@ sal_Bool  SwDocShell::LoadFrom( SfxMedium& rMedium )
             SwWait aWait( *this, true );
             {
                 ASSERT( !mxBasePool.is(), "wer hat seinen Pool nicht zerstoert?" );
-                mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
+                mxBasePool = new SwDocStyleSheetPool( *mpDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
                 if( ReadXML )
                 {
                     ReadXML->SetOrganizerMode( sal_True );
-                    SwReader aRdr( rMedium, aEmptyStr, pDoc );
+                    SwReader aRdr( rMedium, aEmptyStr, mpDoc );
                     nErr = aRdr.Read( *ReadXML );
                     ReadXML->SetOrganizerMode( sal_False );
                 }
@@ -726,7 +726,7 @@ sal_Bool  SwDocShell::LoadFrom( SfxMedium& rMedium )
     } while( sal_False );
 
     SfxObjectShell::LoadFrom( rMedium );
-    pDoc->ResetModified();
+    mpDoc->ResetModified();
     return bRet;
 }
 
@@ -734,12 +734,12 @@ sal_Bool  SwDocShell::LoadFrom( SfxMedium& rMedium )
 void SwDocShell::SubInitNew()
 {
     ASSERT( !mxBasePool.is(), "wer hat seinen Pool nicht zerstoert?" );
-    mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
+    mxBasePool = new SwDocStyleSheetPool( *mpDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
     UpdateFontList();
-    InitDrawModelAndDocShell(this, pDoc ? pDoc->GetDrawModel() : 0);
+    InitDrawModelAndDocShell(this, mpDoc ? mpDoc->GetDrawModel() : 0);
 
-    pDoc->setLinkUpdateMode( GLOBALSETTING );
-    pDoc->setFieldUpdateFlags( AUTOUPD_GLOBALSETTING );
+    mpDoc->setLinkUpdateMode( GLOBALSETTING );
+    mpDoc->setFieldUpdateFlags( AUTOUPD_GLOBALSETTING );
 
     sal_Bool bWeb = ISA(SwWebDocShell);
 
@@ -755,7 +755,7 @@ void SwDocShell::SubInitNew()
         nRange[ (sizeof(nRange)/sizeof(nRange[0])) - 3 ] = RES_PARATR_TABSTOP;
         nRange[ (sizeof(nRange)/sizeof(nRange[0])) - 2 ] = RES_PARATR_HYPHENZONE;
     }
-    SfxItemSet aDfltSet( pDoc->GetAttrPool(), nRange );
+    SfxItemSet aDfltSet( mpDoc->GetAttrPool(), nRange );
 
     //! get lingu options without loading lingu DLL
     SvtLinguOptions aLinguOpt;
@@ -771,7 +771,7 @@ void SwDocShell::SubInitNew()
 
     if(!bWeb)
     {
-        SvxHyphenZoneItem aHyp( (SvxHyphenZoneItem&) pDoc->GetDefault(
+        SvxHyphenZoneItem aHyp( (SvxHyphenZoneItem&) mpDoc->GetDefault(
                                                         RES_PARATR_HYPHENZONE) );
         aHyp.GetMinLead()   = static_cast< sal_uInt8 >(aLinguOpt.nHyphMinLeading);
         aHyp.GetMinTrail()  = static_cast< sal_uInt8 >(aLinguOpt.nHyphMinTrailing);
@@ -785,21 +785,21 @@ void SwDocShell::SubInitNew()
     }
     aDfltSet.Put( SvxColorItem( Color( COL_AUTO ), RES_CHRATR_COLOR ) );
 
-    pDoc->SetDefault( aDfltSet );
+    mpDoc->SetDefault( aDfltSet );
 
     //default page mode for text grid
     if(!bWeb)
     {
         sal_Bool bSquaredPageMode = SW_MOD()->GetUsrPref(sal_False)->IsSquaredPageMode();
-        pDoc->SetDefaultPageMode( bSquaredPageMode );
+        mpDoc->SetDefaultPageMode( bSquaredPageMode );
     }
 
-    pDoc->ResetModified();
+    mpDoc->ResetModified();
 }
 
 /*
  * Document Interface Access
  */
-IDocumentDeviceAccess* SwDocShell::getIDocumentDeviceAccess() { return pDoc; }
-const IDocumentSettingAccess* SwDocShell::getIDocumentSettingAccess() const { return pDoc; }
-IDocumentChartDataProviderAccess* SwDocShell::getIDocumentChartDataProviderAccess() { return pDoc; }
+IDocumentDeviceAccess* SwDocShell::getIDocumentDeviceAccess() { return mpDoc; }
+const IDocumentSettingAccess* SwDocShell::getIDocumentSettingAccess() const { return mpDoc; }
+IDocumentChartDataProviderAccess* SwDocShell::getIDocumentChartDataProviderAccess() { return mpDoc; }
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index e9eef34..316a09c 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -159,7 +159,7 @@ void  SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
                     SfxTemplateItem aItem(nWhich, aName);
 
                     sal_uInt16 nMask = 0;
-                    if( pDoc->get(IDocumentSettingAccess::HTML_MODE) )
+                    if( mpDoc->get(IDocumentSettingAccess::HTML_MODE) )
                         nMask = SWSTYLEBIT_HTML;
                     else
                     {
@@ -185,7 +185,7 @@ void  SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
 
             case SID_STYLE_FAMILY3:
 
-                if( pDoc->get(IDocumentSettingAccess::HTML_MODE) )
+                if( mpDoc->get(IDocumentSettingAccess::HTML_MODE) )
                     rSet.DisableItem( nWhich );
                 else
                 {
@@ -201,7 +201,7 @@ void  SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
             case SID_STYLE_FAMILY4:
             {
                 SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
-                if( pDoc->get(IDocumentSettingAccess::HTML_MODE) && !pHtmlOpt->IsPrintLayoutExtension())
+                if( mpDoc->get(IDocumentSettingAccess::HTML_MODE) && !pHtmlOpt->IsPrintLayoutExtension())
                     rSet.DisableItem( nWhich );
                 else
                 {
@@ -427,14 +427,14 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
                         break;
                         case SFX_STYLE_FAMILY_FRAME:
                         {
-                            SwFrmFmt* pFrm = pWrtShell->GetCurFrmFmt();
+                            SwFrmFmt* pFrm = mpWrtShell->GetCurFrmFmt();
                             if( pFrm )
                                 aParam = pFrm->GetName();
                         }
                         break;
                         case SFX_STYLE_FAMILY_CHAR:
                         {
-                            SwCharFmt* pChar = pWrtShell->GetCurCharFmt();
+                            SwCharFmt* pChar = mpWrtShell->GetCurCharFmt();
                             if( pChar )
                                 aParam = pChar->GetName();
                         }
@@ -518,7 +518,7 @@ sal_uInt16 SwDocShell::Edit(
     SfxStyleSheetBase *pStyle = 0;
 
     sal_uInt16 nRet = nMask;
-    sal_Bool bModified = pDoc->IsModified();
+    sal_Bool bModified = mpDoc->IsModified();
 
     if( bNew )
     {
@@ -537,17 +537,16 @@ sal_uInt16 SwDocShell::Edit(
             {
                 if(rParent.Len())
                 {
-                    SwTxtFmtColl* pColl = pWrtShell->FindTxtFmtCollByName( rParent );
+                    SwTxtFmtColl* pColl = mpWrtShell->FindTxtFmtCollByName( rParent );
                     if(!pColl)
                     {
                         sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
                         if(USHRT_MAX != nId)
-                            pColl =  pWrtShell->GetTxtCollFromPool( nId );
+                            pColl =  mpWrtShell->GetTxtCollFromPool( nId );
                     }
                     pDStyle->GetCollection()->SetDerivedFrom( pColl );
                     pDStyle->PresetParent( rParent );
 
-                    //#outline level,add by zhaojianwei
                      /*When a new paragraph style is created based on a "to outline style
                         assigned" paragraph style, the outline level attribute and the list
                         style attribute of the new paragraph style have to be set to 0
@@ -558,12 +557,11 @@ sal_uInt16 SwDocShell::Edit(
                         pDStyle->GetCollection()->SetFmtAttr( aItem );
                         pDStyle->GetCollection()->SetAttrOutlineLevel( 0 );
                     }
-                    //<-end,zhaojianwei
 
                 }
                 else
                 {
-                    SwTxtFmtColl* pColl = pWrtShell->GetCurTxtFmtColl();
+                    SwTxtFmtColl* pColl = mpWrtShell->GetCurTxtFmtColl();
                     pDStyle->GetCollection()->SetDerivedFrom( pColl );
                     if( pColl )
                         pDStyle->PresetParent( pColl->GetName() );
@@ -574,12 +572,12 @@ sal_uInt16 SwDocShell::Edit(
             {
                 if(rParent.Len())
                 {
-                    SwCharFmt* pCFmt = pWrtShell->FindCharFmtByName( rParent );
+                    SwCharFmt* pCFmt = mpWrtShell->FindCharFmtByName( rParent );
                     if(!pCFmt)
                     {
                         sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
                         if(USHRT_MAX != nId)
-                            pCFmt =  pWrtShell->GetCharFmtFromPool( nId );
+                            pCFmt =  mpWrtShell->GetCharFmtFromPool( nId );
                     }
 
                     pDStyle->GetCharFmt()->SetDerivedFrom( pCFmt );
@@ -587,7 +585,7 @@ sal_uInt16 SwDocShell::Edit(
                 }
                 else
                 {
-                    SwCharFmt* pCFmt = pWrtShell->GetCurCharFmt();
+                    SwCharFmt* pCFmt = mpWrtShell->GetCurCharFmt();
                     pDStyle->GetCharFmt()->SetDerivedFrom( pCFmt );
                         if( pCFmt )
                             pDStyle->PresetParent( pCFmt->GetName() );
@@ -598,12 +596,12 @@ sal_uInt16 SwDocShell::Edit(
             {
                 if(rParent.Len())
                 {
-                    SwFrmFmt* pFFmt = pWrtShell->GetDoc()->FindFrmFmtByName( rParent );
+                    SwFrmFmt* pFFmt = mpWrtShell->GetDoc()->FindFrmFmtByName( rParent );
                     if(!pFFmt)
                     {
                         sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT);
                         if(USHRT_MAX != nId)
-                            pFFmt =  pWrtShell->GetFrmFmtFromPool( nId );
+                            pFFmt =  mpWrtShell->GetFrmFmtFromPool( nId );
                     }
                     pDStyle->GetFrmFmt()->SetDerivedFrom( pFFmt );
                     pDStyle->PresetParent( rParent );
@@ -681,7 +679,7 @@ sal_uInt16 SwDocShell::Edit(
         // In HTML mode, we do not always have a printer. In order to show
         // the correct page size in the Format - Page dialog, we have to
         // get one here.
-        SwWrtShell* pCurrShell = ( pActShell ? pActShell : pWrtShell );
+        SwWrtShell* pCurrShell = ( pActShell ? pActShell : mpWrtShell );
         if( ( HTMLMODE_ON & nHtmlMode ) &&
             !pCurrShell->getIDocumentDeviceAccess()->getPrinter( false ) )
             pCurrShell->InitPrt( pCurrShell->getIDocumentDeviceAccess()->getPrinter( true ) );
@@ -693,7 +691,7 @@ sal_uInt16 SwDocShell::Edit(
         DBG_ASSERT(pFact, "Dialogdiet fail!");
         SfxAbstractTabDialog* pDlg = pFact->CreateTemplateDialog( DLG_TEMPLATE_BASE,
                                                     0, *(xTmp.get()), nFamily, nSlot,
-                                                    pActShell ? pActShell : pWrtShell, bNew);
+                                                    pActShell ? pActShell : mpWrtShell, bNew);
         DBG_ASSERT(pDlg, "Dialogdiet fail!");
         if(RET_OK == pDlg->Execute())
         {
@@ -727,7 +725,7 @@ sal_uInt16 SwDocShell::Edit(
                         SID_IMAGE_ORIENTATION,
                         SID_ATTR_CHAR_FONT,
                         FN_INSERT_CTRL, FN_INSERT_OBJ_CTRL, 0};
-                    pView->GetViewFrame()->GetBindings().Invalidate(aInval);
+                    mpView->GetViewFrame()->GetBindings().Invalidate(aInval);
                 }
                 SfxItemSet aTmpSet( *pDlg->GetOutputItemSet() );
                 if( SFX_STYLE_FAMILY_CHAR == nFamily )
@@ -749,7 +747,7 @@ sal_uInt16 SwDocShell::Edit(
                 {
                     const SfxPoolItem *pItem = NULL;
                     if( aTmpSet.GetItemState( GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION, sal_False ) , sal_True, &pItem ) == SFX_ITEM_SET )
-                        SwChartHelper::DoUpdateAllCharts( pDoc );
+                        SwChartHelper::DoUpdateAllCharts( mpDoc );
                 }
             }
 
@@ -767,7 +765,7 @@ sal_uInt16 SwDocShell::Edit(
             }
 
             if(SFX_STYLE_FAMILY_PAGE == nFamily)
-                pView->InvalidateRulerPos();
+                mpView->InvalidateRulerPos();
 
             if( bNew )
                 mxBasePool->Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_CREATED, *xTmp.get() ) );
@@ -778,10 +776,10 @@ sal_uInt16 SwDocShell::Edit(
             // Kopf-/Fusszeilen entfernt werden. Sonst kommts zu GPFs!!!
             delete pDlg;
 
-            pDoc->SetModified();
+            mpDoc->SetModified();
             if( !bModified )    // Bug 57028
             {
-                pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
+                mpDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
             }
 
             GetWrtShell()->EndAllAction();
@@ -793,11 +791,11 @@ sal_uInt16 SwDocShell::Edit(
                 // #116530#
                 //pBasePool->Erase( &aTmp );
                 GetWrtShell()->Undo(1);
-                pDoc->GetIDocumentUndoRedo().ClearRedo();
+                mpDoc->GetIDocumentUndoRedo().ClearRedo();
             }
 
             if( !bModified )
-                pDoc->ResetModified();
+                mpDoc->ResetModified();
             delete pDlg;
         }
     }
@@ -838,15 +836,15 @@ sal_uInt16 SwDocShell::Edit(
             xTmp->SetItemSet( aTmpSet );
         }
         if(SFX_STYLE_FAMILY_PAGE == nFamily)
-            pView->InvalidateRulerPos();
+            mpView->InvalidateRulerPos();
 
         if( bNew )
             mxBasePool->Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_CREATED, *xTmp.get() ) );
 
-        pDoc->SetModified();
+        mpDoc->SetModified();
         if( !bModified )        // Bug 57028
         {
-            pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
+            mpDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
         }
         GetWrtShell()->EndAllAction();
     }
@@ -909,11 +907,8 @@ sal_uInt16 SwDocShell::ApplyStyles(
     }
     case SFX_STYLE_FAMILY_PARA:
     {
-        // --> OD 2007-11-06 #i62675#
-        // clear also list attributes at affected text nodes, if paragraph
-        // style has the list style attribute set.
+        // clear also list attributes at affected text nodes, if paragraph style has the list style attribute set.
         pSh->SetTxtFmtColl( pStyle->GetCollection(), true );
-        // <--
         break;
     }
     case SFX_STYLE_FAMILY_FRAME:
@@ -930,14 +925,9 @@ sal_uInt16 SwDocShell::ApplyStyles(
 
     case SFX_STYLE_FAMILY_PSEUDO:
     {
-        // --> OD 2008-02-08 #newlistlevelattrs#
-        // reset indent attribute on applying list style
-        // --> OD 2008-03-17 #refactorlists#
-        // continue list of list style
         const SwNumRule* pNumRule = pStyle->GetNumRule();
         const String sListIdForStyle = pNumRule->GetDefaultListId();
         pSh->SetCurNumRule( *pNumRule, false, sListIdForStyle, true );
-        // <--
         break;
     }
 
@@ -959,7 +949,7 @@ sal_uInt16 SwDocShell::DoWaterCan(const String &rName, sal_uInt16 nFamily)
 {
     ASSERT(GetWrtShell(), "Keine Shell, keine Styles");
 
-    SwEditWin& rEdtWin = pView->GetEditWin();
+    SwEditWin& rEdtWin = mpView->GetEditWin();
     SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
     sal_Bool bWaterCan = !(pApply && pApply->eType != 0);
     if( !rName.Len() )
@@ -1001,7 +991,7 @@ sal_uInt16 SwDocShell::DoWaterCan(const String &rName, sal_uInt16 nFamily)
         aTemplate.eType = 0;
 
     // Template anwenden
-    pView->GetEditWin().SetApplyTemplate(aTemplate);
+    mpView->GetEditWin().SetApplyTemplate(aTemplate);
 
     return nFamily;
 }
@@ -1295,22 +1285,22 @@ void SwDocShell::_LoadStyles( SfxObjectShell& rSource, sal_Bool bPreserveCurrent
         //              der Vorlage erhalten, einmal alle FixFelder der
         //              Source aktualisieren
         if(!bPreserveCurrentDocument)
-            ((SwDocShell&)rSource).pDoc->SetFixFields(false, NULL);
-        if( pWrtShell )
+            ((SwDocShell&)rSource).mpDoc->SetFixFields(false, NULL);
+        if( mpWrtShell )
         {
-            pWrtShell->StartAllAction();
-            pDoc->ReplaceStyles( *((SwDocShell&)rSource).pDoc );
-            pWrtShell->EndAllAction();
+            mpWrtShell->StartAllAction();
+            mpDoc->ReplaceStyles( *((SwDocShell&)rSource).mpDoc );
+            mpWrtShell->EndAllAction();
         }
         else
         {
-            sal_Bool bModified = pDoc->IsModified();
-            pDoc->ReplaceStyles( *((SwDocShell&)rSource).pDoc );
-            if( !bModified && pDoc->IsModified() && !pView )
+            sal_Bool bModified = mpDoc->IsModified();
+            mpDoc->ReplaceStyles( *((SwDocShell&)rSource).mpDoc );
+            if( !bModified && mpDoc->IsModified() && !mpView )
             {
                 // die View wird spaeter angelegt, ueberschreibt aber das
                 // Modify-Flag. Per Undo ist sowieso nichts mehr zu machen
-                pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
+                mpDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
             }
         }
     }
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index 4346db0..c1cdea4 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -1267,11 +1267,10 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
                 if( pColl != &pColl->GetNextTxtFmtColl() )
                     pCColl->SetNextTxtFmtColl( pColl->GetNextTxtFmtColl() );
 
-                //pCColl->SetOutlineLevel( pColl->GetOutlineLevel() );//#outline level,zhaojianwei
                 if( pColl->IsAssignedToListLevelOfOutlineStyle())
                     pCColl->AssignToListLevelOfOutlineStyle(pColl->GetAssignedOutlineStyleLevel());
                 else
-                    pCColl->DeleteAssignmentToListLevelOfOutlineStyle();//<--end,zhaojianwei
+                    pCColl->DeleteAssignmentToListLevelOfOutlineStyle();
 
 
 


More information about the Libreoffice-commits mailing list