[Libreoffice-commits] core.git: 19 commits - basic/source chart2/source comphelper/source configure.ac cppu/source drawinglayer/source extensions/source external/boost filter/source framework/source include/sfx2 sd/source sfx2/source sot/source svtools/source svx/source sw/inc sw/source tools/source vcl/generic vcl/osx vcl/source

Oliver-Rainer Wittmann orw at apache.org
Thu Jun 26 08:29:52 PDT 2014


 basic/source/classes/sbunoobj.cxx                                   |    8 
 basic/source/runtime/methods1.cxx                                   |    3 
 basic/source/sbx/sbxarray.cxx                                       |   10 
 chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx   |   18 
 chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx |   18 
 comphelper/source/property/ChainablePropertySet.cxx                 |    2 
 comphelper/source/property/MasterPropertySet.cxx                    |    2 
 comphelper/source/property/propertysethelper.cxx                    |    2 
 configure.ac                                                        |    2 
 cppu/source/uno/lbenv.cxx                                           |    2 
 drawinglayer/source/processor2d/vclhelperbufferdevice.cxx           |    6 
 extensions/source/update/check/updatehdl.cxx                        |   11 
 external/boost/UnpackedTarball_boost.mk                             |    2 
 external/boost/boost.spirit.Wunused-parameter.warnings.patch        |   47 +
 filter/source/msfilter/svdfppt.cxx                                  |    8 
 framework/source/fwi/classes/propertysethelper.cxx                  |    2 
 include/sfx2/sfxbasemodel.hxx                                       |    2 
 sd/source/filter/html/htmlex.cxx                                    |    3 
 sfx2/source/dialog/securitypage.cxx                                 |    2 
 sfx2/source/doc/Metadatable.cxx                                     |    6 
 sfx2/source/doc/sfxbasemodel.cxx                                    |   16 
 sot/source/base/factory.cxx                                         |    2 
 svtools/source/contnr/simptabl.cxx                                  |    7 
 svx/source/dialog/dlgctl3d.cxx                                      |    6 
 svx/source/fmcomp/xmlexchg.cxx                                      |    7 
 svx/source/items/grfitem.cxx                                        |    2 
 svx/source/sdr/attribute/sdrtextattribute.cxx                       |    6 
 svx/source/sdr/properties/defaultproperties.cxx                     |    2 
 svx/source/stbctrls/pszctrl.cxx                                     |    2 
 svx/source/table/svdotable.cxx                                      |   15 
 svx/source/tbxctrls/grafctrl.cxx                                    |    4 
 svx/source/xoutdev/_xpoly.cxx                                       |    3 
 sw/inc/docsh.hxx                                                    |   28 -
 sw/source/core/layout/pagechg.cxx                                   |    4 
 sw/source/filter/writer/writer.cxx                                  |    6 
 sw/source/filter/ww8/ww8par.cxx                                     |    5 
 sw/source/filter/ww8/ww8par.hxx                                     |    5 
 sw/source/filter/ww8/ww8par5.cxx                                    |   72 +-
 sw/source/filter/ww8/ww8par6.cxx                                    |    6 
 sw/source/uibase/app/docsh.cxx                                      |  266 +++++-----
 sw/source/uibase/app/docsh2.cxx                                     |  132 ++--
 sw/source/uibase/app/docshdrw.cxx                                   |    2 
 sw/source/uibase/app/docshini.cxx                                   |  192 +++----
 sw/source/uibase/app/docst.cxx                                      |   64 +-
 sw/source/uibase/dochdl/gloshdl.cxx                                 |   12 
 sw/source/uibase/shells/textfld.cxx                                 |   16 
 tools/source/generic/bigint.cxx                                     |    3 
 tools/source/generic/poly2.cxx                                      |    3 
 tools/source/stream/stream.cxx                                      |    4 
 vcl/generic/glyphs/gcach_ftyp.cxx                                   |    1 
 vcl/generic/print/glyphset.cxx                                      |    2 
 vcl/osx/a11ytextwrapper.mm                                          |    6 
 vcl/source/bitmap/bitmapscalesuper.cxx                              |    2 
 vcl/source/control/edit.cxx                                         |    3 
 vcl/source/gdi/bitmap.cxx                                           |    3 
 vcl/source/gdi/bitmap3.cxx                                          |   28 -
 56 files changed, 585 insertions(+), 508 deletions(-)

New commits:
commit e28797356f34253bcbe7237d7bfdbcda2a3f5b3c
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date:   Thu Jun 26 09:24:49 2014 +0000

    Resolves: #i125122# WW8 import: Handle nested TOX fields
    
    - only the content of nested TOX fields is imported, no TOX field itself
    
    (cherry picked from commit 1df1e98e7b6556892f546cc559e31f9fd9e00a78)
    (cherry picked from commit b2d0492ea85a2f96378326361421749619269b15)
    
    Conflicts:
    	sw/source/filter/ww8/ww8par.hxx
    	sw/source/filter/ww8/ww8par5.cxx
    	sw/source/filter/ww8/ww8par6.cxx
    
    Change-Id: I29cf81df72bf548414bef06b54a691eae6a5edcd

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index e0074f1..34ca56e 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4220,8 +4220,9 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SvStorage* pStorage,
     , nIdctHint(0)
     , bBidi(false)
     , bReadTable(false)
-    , mbLoadingTOCCache(false)
-    , mbLoadingTOCHyperlink(false)
+    , mbLoadingTOXCache(false)
+    , mnEmbeddedTOXLevel(0)
+    , mbLoadingTOXHyperlink(false)
     , mpPosAfterTOC(0)
     , mbCareFirstParaEndInToc(false)
     , mbCareLastParaEndInToc(false)
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 6da60d5..a9558a7 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1336,9 +1336,10 @@ private:
     bool bReadTable;
     boost::shared_ptr<SwPaM> mpTableEndPaM;
     // Indicate that currently on loading a TOC, managed by Read_F_TOX() and End_Field()
-    bool mbLoadingTOCCache;
+    bool mbLoadingTOXCache;
+    int mnEmbeddedTOXLevel;
     // Indicate that current on loading a hyperlink, which is inside a TOC; Managed by Read_F_Hyperlink() and End_Field()
-    bool mbLoadingTOCHyperlink;
+    bool mbLoadingTOXHyperlink;
     // a document position recorded the after-position of TOC section, managed by Read_F_TOX() and End_Field()
     SwPaM* mpPosAfterTOC;
 
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index c7352c2..d9ca4f2 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -495,42 +495,50 @@ sal_uInt16 SwWW8ImplReader::End_Field()
             }
         }
         break;
-            // Doing corresponding status management for TOC field, index field, hyperlink field and page reference field
+            // Doing corresponding status management for TOX field, index field, hyperlink field and page reference field
             case 13://TOX
             case 8://index
-                if (mbLoadingTOCCache)
+                if (mbLoadingTOXCache)
                 {
-                    maTOXEndCps.insert(nCP);
-                    mbLoadingTOCCache = false;
-                    if ( pPaM->End() &&
-                         pPaM->End()->nNode.GetNode().GetTxtNode() &&
-                         pPaM->End()->nNode.GetNode().GetTxtNode()->Len() == 0 )
+                    if (mnEmbeddedTOXLevel > 0)
                     {
-                            JoinNode(*pPaM);
+                        JoinNode(*pPaM);
+                        --mnEmbeddedTOXLevel;
                     }
                     else
                     {
+                        maTOXEndCps.insert(nCP);
+                        mbLoadingTOXCache = false;
+                        if ( pPaM->End() &&
+                             pPaM->End()->nNode.GetNode().GetTxtNode() &&
+                             pPaM->End()->nNode.GetNode().GetTxtNode()->Len() == 0 )
+                        {
+                            JoinNode(*pPaM);
+                        }
+                        else
+                        {
                             mbCareLastParaEndInToc = true;
-                    }
+                        }
 
-                    if (mpPosAfterTOC)
-                    {
-                        *pPaM = *mpPosAfterTOC;
-                        delete mpPosAfterTOC;
-                        mpPosAfterTOC = 0;
+                        if (mpPosAfterTOC)
+                        {
+                            *pPaM = *mpPosAfterTOC;
+                            delete mpPosAfterTOC;
+                            mpPosAfterTOC = 0;
+                        }
                     }
                 }
                 break;
-            case 37://REF
-                if (mbLoadingTOCCache && !mbLoadingTOCHyperlink)
+            case 37: //REF
+                if (mbLoadingTOXCache && !mbLoadingTOXHyperlink)
                 {
                     pCtrlStck->SetAttr(*pPaM->GetPoint(),RES_TXTATR_INETFMT);
                 }
                 break;
             case 88:
-                if (mbLoadingTOCHyperlink)
-                    mbLoadingTOCHyperlink = false;
-                pCtrlStck->SetAttr(*pPaM->GetPoint(),RES_TXTATR_INETFMT);
+                if (mbLoadingTOXHyperlink)
+                    mbLoadingTOXHyperlink = false;
+                pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_TXTATR_INETFMT);
                 break;
             case 36:
             case 68:
@@ -2027,13 +2035,13 @@ eF_ResT SwWW8ImplReader::Read_F_PgRef( WW8FieldDesc*, OUString& rStr )
 
     const OUString sName(GetMappedBookmark(sOrigName));
 
-    // loading page reference field in TOC
-    if (mbLoadingTOCCache )
+    // loading page reference field in TOX
+    if (mbLoadingTOXCache)
     {
         // insert page ref representation as plain text --> return FLD_TEXT
         // if there is no hyperlink settings for current toc and referenced bookmark is available,
         // assign link to current ref area
-        if ( !mbLoadingTOCHyperlink && !sName.isEmpty() )
+        if (!mbLoadingTOXHyperlink && !sName.isEmpty())
         {
             // #i120879# add cross reference bookmark name prefix, if it
             // matches internal TOC bookmark naming convention
@@ -2817,7 +2825,17 @@ static sal_uInt16 lcl_GetMaxValidWordTOCLevel(const SwForm &rForm)
 
 eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr )
 {
-    mbLoadingTOCCache = true;
+    if (!mbLoadingTOXCache)
+    {
+        mbLoadingTOXCache = true;
+    }
+    else
+    {
+        // Embedded TOX --> continue reading its content, but no further TOX
+        // field
+        ++mnEmbeddedTOXLevel;
+        return FLD_TEXT;
+    }
 
     if (pF->nLRes < 3)
         return FLD_TEXT;      // ignore (#i25440#)
@@ -3398,9 +3416,9 @@ eF_ResT SwWW8ImplReader::Read_F_Hyperlink( WW8FieldDesc* /*pF*/, OUString& rStr
                             pReffedStck->aReferencedTOCBookmarks.insert( sMark );
                         }
 
-                        if (mbLoadingTOCCache)
+                        if (mbLoadingTOXCache)
                         {
-                            mbLoadingTOCHyperlink = true;//on loading a TOC field nested hyperlink field
+                            mbLoadingTOXHyperlink = true; //on loading a TOC field nested hyperlink field
                         }
                     }
                     break;
@@ -3426,9 +3444,9 @@ eF_ResT SwWW8ImplReader::Read_F_Hyperlink( WW8FieldDesc* /*pF*/, OUString& rStr
     if( !sMark.isEmpty() )
         ( sURL += "#" ) += sMark;
 
-    SwFmtINetFmt aURL( sURL, sTarget );
+    SwFmtINetFmt aURL(sURL, sTarget);
     // If on loading TOC field, change the default style into the "index link"
-    if (mbLoadingTOCCache)
+    if (mbLoadingTOXCache)
     {
         OUString sLinkStyle("Index Link");
         sal_uInt16 nPoolId =
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 884af85..1ee747b 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -3728,11 +3728,11 @@ void SwWW8ImplReader::Read_CColl( sal_uInt16, const sal_uInt8* pData, short nLen
         || vColl[nId].bColl )              // oder Para-Style ?
         return;                             // dann ignorieren
 
-    // if current on loading a TOC field, and current trying to apply a hyperlink character style,
-    // just ignore. For the hyperlinks inside TOC in MS Word is not same with a common hyperlink
+    // if current on loading a TOX field, and current trying to apply a hyperlink character style,
+    // just ignore. For the hyperlinks inside TOX in MS Word is not same with a common hyperlink
     // Character styles: without underline and blue font color. And such type style will be applied in others
     // processes.
-    if (mbLoadingTOCCache && vColl[nId].GetWWStyleId() == ww::stiHyperlink)
+    if (mbLoadingTOXCache && vColl[nId].GetWWStyleId() == ww::stiHyperlink)
     {
         return;
     }
commit 749bd87e90ed80c26d93748f2fbe682d533c53f1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jun 26 15:51:29 2014 +0100

    drop the functional parts
    
    appears to work without it as far as I can see
    
    Change-Id: Ibe19addeeb38f853a515aef36d6bc83d338e1c0b

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 6ca8ddb..1cb8e91 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -177,15 +177,6 @@ private:
                                                   // sal_False := new object
     bool                        bIsInGenerateThumbnail; //optimize thumbnail generate and store procedure to improve odt saving performance, i120030
 
-
-protected:
-    // methods called in implementation of <ImportFrom(..)>
-    virtual void BeforeLoading(SfxMedium&,
-                               const OUString&) {}
-
-    virtual void AfterLoading(SfxMedium&,
-                              const OUString&) {}
-
 private:
     SAL_DLLPRIVATE void UpdateTime_Impl(const ::com::sun::star::uno::Reference<
         ::com::sun::star::document::XDocumentProperties> & i_xDocProps);
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index b971c93..1e37373 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2177,8 +2177,6 @@ bool SfxObjectShell::ImportFrom(SfxMedium& rMedium,
 {
     OUString aFilterName( rMedium.GetFilter()->GetFilterName() );
 
-    BeforeLoading(rMedium, aFilterName);
-
     uno::Reference< lang::XMultiServiceFactory >  xMan = ::comphelper::getProcessServiceFactory();
     uno::Reference < lang::XMultiServiceFactory > xFilterFact (
                 xMan->createInstance( "com.sun.star.document.FilterFactory" ), uno::UNO_QUERY );
@@ -2286,8 +2284,6 @@ bool SfxObjectShell::ImportFrom(SfxMedium& rMedium,
                 }
             }
         }
-        AfterLoading(rMedium, aFilterName);
-
         return bRtn;
         }
         catch (const packages::zip::ZipIOException&)
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 230b267..2aeafa6 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -143,12 +143,6 @@ protected:
     /// override to update text fields
     virtual void                DoFlushDocInfo() SAL_OVERRIDE;
 
-    // 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&) SAL_OVERRIDE;
-
 public:
     using SotObject::GetInterface;
 
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 2381681..bffe055 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -300,16 +300,6 @@ bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
     return bOk;
 }
 
-void SwDocShell::BeforeLoading(SfxMedium&, const ::rtl::OUString&)
-{
-    if (mpDoc == NULL)
-    {
-        return;
-    }
-
-    mpDoc->RemoveAllFmtLanguageDependencies();
-}
-
 // Saving the Default-Format, Stg present
 bool SwDocShell::Save()
 {
commit 2f7b92c5bbd1b1aaa857a41457d866e04ce603a2
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date:   Thu Jun 26 08:03:24 2014 +0000

    Resolves: #i124914# reset certain language dependent pool defaults...
    
    before importing a document via <SfxObjectShell::ImportFrom(..)> (used for
    OOXML *.docx import)
    
    (cherry picked from commit 920bf1164fe0c3d232dc0f7d476eec1660f4690e)
    
    Conflicts:
    	sfx2/inc/sfx2/objsh.hxx
    	sw/inc/docsh.hxx
    	sw/source/ui/app/docsh.cxx
    	sw/source/ui/app/docsh2.cxx
    	sw/source/ui/app/docshini.cxx
    	sw/source/ui/app/docst.cxx
    	sw/source/ui/app/docstyle.cxx
    
    Change-Id: Id32bd6a8ef081dd4af4d832aa42317de7f64184f

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 1cb8e91..6ca8ddb 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -177,6 +177,15 @@ private:
                                                   // sal_False := new object
     bool                        bIsInGenerateThumbnail; //optimize thumbnail generate and store procedure to improve odt saving performance, i120030
 
+
+protected:
+    // methods called in implementation of <ImportFrom(..)>
+    virtual void BeforeLoading(SfxMedium&,
+                               const OUString&) {}
+
+    virtual void AfterLoading(SfxMedium&,
+                              const OUString&) {}
+
 private:
     SAL_DLLPRIVATE void UpdateTime_Impl(const ::com::sun::star::uno::Reference<
         ::com::sun::star::document::XDocumentProperties> & i_xDocProps);
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 1e37373..b971c93 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2177,6 +2177,8 @@ bool SfxObjectShell::ImportFrom(SfxMedium& rMedium,
 {
     OUString aFilterName( rMedium.GetFilter()->GetFilterName() );
 
+    BeforeLoading(rMedium, aFilterName);
+
     uno::Reference< lang::XMultiServiceFactory >  xMan = ::comphelper::getProcessServiceFactory();
     uno::Reference < lang::XMultiServiceFactory > xFilterFact (
                 xMan->createInstance( "com.sun.star.document.FilterFactory" ), uno::UNO_QUERY );
@@ -2284,6 +2286,8 @@ bool SfxObjectShell::ImportFrom(SfxMedium& rMedium,
                 }
             }
         }
+        AfterLoading(rMedium, aFilterName);
+
         return bRtn;
         }
         catch (const packages::zip::ZipIOException&)
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 9760272..230b267 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -54,24 +54,24 @@ class IDocumentChartDataProviderAccess;
 
 class SW_DLLPUBLIC SwDocShell: public SfxObjectShell, public SfxListener
 {
-    SwDoc*                  pDoc;                           ///< Document.
+    SwDoc*                  mpDoc;                          ///< Document.
     rtl::Reference< SfxStyleSheetBasePool > mxBasePool;     ///< Passing through for formats.
-    FontList*               pFontList;                      ///< Current Fontlist.
+    FontList*               mpFontList;                     ///< Current Fontlist.
+    bool                    mbInUpdateFontList; ///< prevent nested calls of UpdateFontList
 
     /** For "historical reasons" nothing can be done without the WrtShell.
      Back-pointer on View (again "for historical reasons").
      Back-pointer is valid until in Activate a new one is set
      or until it is deleted in the View's Dtor. */
 
-    SwView*                 pView;
-    SwWrtShell*             pWrtShell;
+    SwView*                 mpView;
+    SwWrtShell*             mpWrtShell;
 
     Timer                   aFinishedTimer; /**< Timer for checking graphics-links.
                                              If all are present, the doc is loaded completely. */
 
-    comphelper::EmbeddedObjectContainer*    pOLEChildList;
-    sal_Int16               nUpdateDocMode;    ///< contains the com::sun::star::document::UpdateDocMode
-    bool                    bInUpdateFontList; ///< prevent nested calls of UpdateFontList
+    comphelper::EmbeddedObjectContainer*    mpOLEChildList;
+    sal_Int16               mnUpdateDocMode;    ///< contains the com::sun::star::document::UpdateDocMode
     bool                    bIsATemplate;      ///< prevent nested calls of UpdateFontList
 
     /// Methods for access to doc.
@@ -143,6 +143,12 @@ protected:
     /// override to update text fields
     virtual void                DoFlushDocInfo() SAL_OVERRIDE;
 
+    // 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&) SAL_OVERRIDE;
+
 public:
     using SotObject::GetInterface;
 
@@ -190,8 +196,8 @@ public:
     void                    StateStyleSheet(SfxItemSet&, SwWrtShell* pSh = 0 );
 
     /// returns Doc. But be careful!
-    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();
@@ -207,12 +213,12 @@ public:
 
     /// Set View for actions via 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; }
 
     /// Accress to the SwWrtShell belonging to SwView.
-          SwWrtShell *GetWrtShell()       { return pWrtShell; }
-    const SwWrtShell *GetWrtShell() const { return pWrtShell; }
+          SwWrtShell *GetWrtShell()       { return mpWrtShell; }
+    const SwWrtShell *GetWrtShell() const { return mpWrtShell; }
 
     /// For Core - it knows the DocShell but not the WrtShell!
           SwFEShell *GetFEShell();
@@ -263,7 +269,7 @@ public:
     /// Re-read Doc from Html-source.
     void    ReloadFromHtml( const OUString& rStreamName, SwSrcView* pSrcView );
 
-    sal_Int16   GetUpdateDocMode() const {return nUpdateDocMode;}
+    sal_Int16   GetUpdateDocMode() const {return mnUpdateDocMode;}
 
     void ToggleBrowserMode(bool bOn, SwView* pView);
 
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 8e8b30e..2381681 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -176,7 +176,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;
@@ -210,7 +210,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
 
     // #i30171# set the UpdateDocMode at the SwDocShell
     SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, false);
-    nUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE;
+    mnUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE;
 
     if (!pFlt->GetDefaultTemplate().isEmpty())
         pRead->SetTemplateName( pFlt->GetDefaultTemplate() );
@@ -241,7 +241,7 @@ bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
       return false; // #129881# return if no reader is found
     SotStorageRef pStg=pRead->getSotStorageRef(); // #i45333# save sot storage ref in case of recursive calls
 
-    pDoc->setDocAccTitle(OUString());
+    mpDoc->setDocAccTitle(OUString());
     SfxViewFrame* pFrame1 = SfxViewFrame::GetFirst( this );
     if (pFrame1)
     {
@@ -263,21 +263,21 @@ bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
 
     pRdr->GetDoc()->getIDocumentSettingAccess().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 );
 
     // Maybe put away one old Doc
-    if ( pDoc != pRdr->GetDoc() )
+    if ( mpDoc != pRdr->GetDoc() )
     {
         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();
@@ -290,7 +290,7 @@ bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
     SetError( nErr, OUString(  OSL_LOG_PREFIX  ) );
     bool bOk = !IsError( nErr );
 
-    if ( bOk && !pDoc->IsInLoadAsynchron() )
+    if ( bOk && !mpDoc->IsInLoadAsynchron() )
     {
         LoadingFinished();
     }
@@ -300,22 +300,32 @@ bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
     return bOk;
 }
 
+void SwDocShell::BeforeLoading(SfxMedium&, const ::rtl::OUString&)
+{
+    if (mpDoc == NULL)
+    {
+        return;
+    }
+
+    mpDoc->RemoveAllFmtLanguageDependencies();
+}
+
 // Saving the Default-Format, Stg present
 bool 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
     // #i62875#
     // reset compatibility flag <DoNotCaptureDrawObjsOnPage>, if possible
-    if ( pWrtShell && pDoc &&
-         pDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
-         docfunc::AllDrawObjsOnPage( *pDoc ) )
+    if ( mpWrtShell && mpDoc &&
+         mpDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
+         docfunc::AllDrawObjsOnPage( *mpDoc ) )
     {
-        pDoc->getIDocumentSettingAccess().set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
+        mpDoc->getIDocumentSettingAccess().set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
     }
 
     sal_uLong nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
@@ -332,7 +342,7 @@ bool SwDocShell::Save()
                 WriterRef xWrt;
                 ::GetXMLWriter( aEmptyOUStr, GetMedium()->GetBaseURL( true ), xWrt );
                 xWrt->SetOrganizerMode( true );
-                SwWriter aWrt( *GetMedium(), *pDoc );
+                SwWriter aWrt( *GetMedium(), *mpDoc );
                 nErr = aWrt.Write( xWrt );
                 xWrt->SetOrganizerMode( false );
             }
@@ -347,32 +357,32 @@ bool SwDocShell::Save()
         case SFX_CREATE_MODE_PREVIEW:
         default:
             {
-                if( pDoc->ContainsMSVBasic() )
+                if( mpDoc->ContainsMSVBasic() )
                 {
                     if( SvtFilterOptions::Get().IsLoadWordBasicStorage() )
                         nVBWarning = GetSaveWarningOfMSVBAStorage( (SfxObjectShell&) (*this) );
-                    pDoc->SetContainsMSVBasic( false );
+                    mpDoc->SetContainsMSVBasic( false );
                 }
 
                 // End TableBox Edit!
-                if( pWrtShell )
-                    pWrtShell->EndAllTblBoxEdit();
+                if( mpWrtShell )
+                    mpWrtShell->EndAllTblBoxEdit();
 
                 WriterRef xWrt;
                 ::GetXMLWriter( aEmptyOUStr, GetMedium()->GetBaseURL( true ), xWrt );
 
                 bool bLockedView(false);
-                if ( pWrtShell )
+                if ( mpWrtShell )
                 {
-                    bLockedView = pWrtShell->IsViewLocked();
-                    pWrtShell->LockView( true );    //lock visible section
+                    bLockedView = mpWrtShell->IsViewLocked();
+                    mpWrtShell->LockView( 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;
         }
@@ -380,7 +390,7 @@ bool SwDocShell::Save()
     }
     SetError( nErr ? nErr : nVBWarning, OUString(  OSL_LOG_PREFIX  ) );
 
-    SfxViewFrame* pFrm = pWrtShell ? pWrtShell->GetView().GetViewFrame() : 0;
+    SfxViewFrame* pFrm = mpWrtShell ? mpWrtShell->GetView().GetViewFrame() : 0;
     if( pFrm )
     {
         pFrm->GetBindings().SetState(SfxBoolItem(SID_DOC_MODIFIED, false));
@@ -393,19 +403,19 @@ 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->getIDocumentSettingAccess().get(IDocumentSettingAccess::GLOBAL_DOCUMENT) &&
-        !pDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS) )
+    if( mpDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::GLOBAL_DOCUMENT) &&
+        !mpDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS) )
         RemoveOLEObjects();
 
     {
@@ -432,11 +442,11 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium )
     CalcLayoutForOLEObjects();  // format for OLE objets
     // #i62875#
     // reset compatibility flag <DoNotCaptureDrawObjsOnPage>, if possible
-    if ( pWrtShell &&
-         pDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
-         docfunc::AllDrawObjsOnPage( *pDoc ) )
+    if ( mpWrtShell &&
+         mpDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
+         docfunc::AllDrawObjsOnPage( *mpDoc ) )
     {
-        pDoc->getIDocumentSettingAccess().set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
+        mpDoc->getIDocumentSettingAccess().set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
     }
 
     sal_uLong nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
@@ -459,23 +469,23 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium )
             xDocSh->DoClose();
         }
 
-        if( pDoc->ContainsMSVBasic() )
+        if( mpDoc->ContainsMSVBasic() )
         {
             if( SvtFilterOptions::Get().IsLoadWordBasicStorage() )
                 nVBWarning = GetSaveWarningOfMSVBAStorage( (SfxObjectShell&) *this );
-            pDoc->SetContainsMSVBasic( false );
+            mpDoc->SetContainsMSVBasic( false );
         }
 
         // End TableBox Edit!
-        if( pWrtShell )
-            pWrtShell->EndAllTblBoxEdit();
+        if( mpWrtShell )
+            mpWrtShell->EndAllTblBoxEdit();
 
         // Remember and preserve Modified-Flag without calling the Link
         // (for OLE; after Statement from MM)
-        bool bIsModified = pDoc->IsModified();
-        pDoc->GetIDocumentUndoRedo().LockUndoNoModifiedPosition();
-        Link aOldOLELnk( pDoc->GetOle2Link() );
-        pDoc->SetOle2Link( Link() );
+        bool bIsModified = mpDoc->IsModified();
+        mpDoc->GetIDocumentUndoRedo().LockUndoNoModifiedPosition();
+        Link aOldOLELnk( mpDoc->GetOle2Link() );
+        mpDoc->SetOle2Link( Link() );
 
             // Suppress SfxProgress when we are Embedded
         SW_MOD()->SetEmbeddedLoadSave(
@@ -485,29 +495,29 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium )
         ::GetXMLWriter( aEmptyOUStr, rMedium.GetBaseURL( true ), xWrt );
 
         bool bLockedView(false);
-        if ( pWrtShell )
+        if ( mpWrtShell )
         {
-            bLockedView = pWrtShell->IsViewLocked();
-            pWrtShell->LockView( true );    //lock visible section
+            bLockedView = mpWrtShell->IsViewLocked();
+            mpWrtShell->LockView( 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( false );
 
         // Increase RSID
-        pDoc->setRsid( pDoc->getRsid() );
+        mpDoc->setRsid( mpDoc->getRsid() );
     }
     SetError( nErr ? nErr : nVBWarning, OUString(  OSL_LOG_PREFIX  ) );
 
@@ -539,20 +549,20 @@ 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() )
     {
         bool bSave = pFlt->GetUserData() == "CWW8"
              && SvtFilterOptions::Get().IsLoadWordBasicStorage();
@@ -565,14 +575,14 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
             {
                 nVBWarning = SaveOrDelMSVBAStorage( (SfxObjectShell&) *this, *xStg, bSave, OUString("Macros") );
                 xStg->Commit();
-                pDoc->SetContainsMSVBasic( true );
+                mpDoc->SetContainsMSVBasic( true );
             }
         }
     }
 
     // End TableBox Edit!
-    if( pWrtShell )
-        pWrtShell->EndAllTblBoxEdit();
+    if( mpWrtShell )
+        mpWrtShell->EndAllTblBoxEdit();
 
     if( pFlt->GetUserData() == "HTML" )
     {
@@ -603,16 +613,16 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
     }
 
     // #i76360# Update document statistics
-    pDoc->UpdateDocStat();
+    mpDoc->UpdateDocStat();
 
     CalcLayoutForOLEObjects();  // format for OLE objets
     // #i62875#
     // reset compatibility flag <DoNotCaptureDrawObjsOnPage>, if possible
-    if ( pWrtShell &&
-         pDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
-         docfunc::AllDrawObjsOnPage( *pDoc ) )
+    if ( mpWrtShell &&
+         mpDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE) &&
+         docfunc::AllDrawObjsOnPage( *mpDoc ) )
     {
-        pDoc->getIDocumentSettingAccess().set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
+        mpDoc->getIDocumentSettingAccess().set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
     }
 
     if( xWriter->IsStgWriter() &&
@@ -684,7 +694,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
     }
 
     if( pFlt->GetUserData() == FILTER_TEXT_DLG &&
-        ( pWrtShell || !::lcl_GetSourceView( this ) ))
+        ( mpWrtShell || !::lcl_GetSourceView( this ) ))
     {
         SwAsciiOptions aOpt;
         OUString sItemOpt;
@@ -711,23 +721,23 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
     const OUString aFileName( rMedium.GetName() );
 
     // No View, so the whole Document!
-    if ( pWrtShell && !Application::IsHeadlessModeEnabled() )
+    if ( mpWrtShell && !Application::IsHeadlessModeEnabled() )
     {
         SwWait aWait( *this, true );
         // #i106906#
-        const bool bFormerLockView = pWrtShell->IsViewLocked();
-        pWrtShell->LockView( true );
-        pWrtShell->StartAllAction();
-        pWrtShell->Push();
-        SwWriter aWrt( rMedium, *pWrtShell, true );
+        const bool bFormerLockView = mpWrtShell->IsViewLocked();
+        mpWrtShell->LockView( true );
+        mpWrtShell->StartAllAction();
+        mpWrtShell->Push();
+        SwWriter aWrt( rMedium, *mpWrtShell, true );
         nErrno = aWrt.Write( xWriter, &aFileName );
         //JP 16.05.97: In case the SFX revokes the View while saving
-        if( pWrtShell )
+        if( mpWrtShell )
         {
-            pWrtShell->Pop(false);
-            pWrtShell->EndAllAction();
+            mpWrtShell->Pop(false);
+            mpWrtShell->EndAllAction();
             // #i106906#
-            pWrtShell->LockView( bFormerLockView );
+            mpWrtShell->LockView( bFormerLockView );
         }
     }
     else
@@ -741,7 +751,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
         }
         else
         {
-            SwWriter aWrt( rMedium, *pDoc );
+            SwWriter aWrt( rMedium, *mpDoc );
             nErrno = aWrt.Write( xWriter, &aFileName );
         }
     }
@@ -763,27 +773,27 @@ bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor
     {
         // Do not decide until here, whether Saving was successful or not
         if( IsModified() )
-            pDoc->SetModified();
+            mpDoc->SetModified();
         else
-            pDoc->ResetModified();
+            mpDoc->ResetModified();
     }
 
-    if( pOLEChildList )
+    if (mpOLEChildList)
     {
         bool bResetModified = IsEnableSetModified();
         if( bResetModified )
             EnableSetModified( false );
 
-        uno::Sequence < OUString > aNames = pOLEChildList->GetObjectNames();
+        uno::Sequence < 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() ) )
             {
                 OSL_FAIL("Copying of objects didn't work!" );
             }
         }
 
-        DELETEZ( pOLEChildList );
+        DELETEZ(mpOLEChildList);
         if( bResetModified )
             EnableSetModified( true );
     }
@@ -806,10 +816,10 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
     JobSetup *pOrig = 0;
     if ( !rSetup.GetPrinterName().isEmpty() && ASPECT_THUMBNAIL != nAspect )
     {
-        pOrig = const_cast<JobSetup*>(pDoc->getIDocumentDeviceAccess().getJobsetup());
+        pOrig = const_cast<JobSetup*>(mpDoc->getIDocumentDeviceAccess().getJobsetup());
         if( pOrig )         // then we copy that
             pOrig = new JobSetup( *pOrig );
-        pDoc->getIDocumentDeviceAccess().setJobsetup( rSetup );
+        mpDoc->getIDocumentDeviceAccess().setJobsetup( rSetup );
     }
 
     Rectangle aRect( nAspect == ASPECT_THUMBNAIL ?
@@ -821,12 +831,12 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
     pDev->SetBackground();
     const bool bWeb = this->ISA(SwWebDocShell);
     SwPrintData aOpts;
-    SwViewShell::PrtOle2( pDoc, SW_MOD()->GetUsrPref(bWeb), aOpts, pDev, aRect );
+    SwViewShell::PrtOle2( mpDoc, SW_MOD()->GetUsrPref(bWeb), aOpts, pDev, aRect );
     pDev->Pop();
 
     if( pOrig )
     {
-        pDoc->getIDocumentDeviceAccess().setJobsetup( *pOrig );
+        mpDoc->getIDocumentDeviceAccess().setJobsetup( *pOrig );
         delete pOrig;
     }
     if ( bResetModified )
@@ -836,9 +846,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() )
@@ -851,7 +861,7 @@ void SwDocShell::SetVisArea( const Rectangle &rRect )
         aRect.Move( nMoveX, nMoveY );
 
         // Calls SfxInPlaceObject::SetVisArea()!
-        pView->SetVisArea( aRect, true );
+        mpView->SetVisArea( aRect, true );
     }
     else
         SfxObjectShell::SetVisArea( aRect );
@@ -862,8 +872,8 @@ Rectangle SwDocShell::GetVisArea( sal_uInt16 nAspect ) const
     if ( nAspect == ASPECT_THUMBNAIL )
     {
         // Preview: set VisArea to the first page.
-        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( false, 0, false );
         return aPageRect.SVRect();
@@ -873,12 +883,12 @@ Rectangle SwDocShell::GetVisArea( sal_uInt16 nAspect ) const
 
 Printer *SwDocShell::GetDocumentPrinter()
 {
-    return pDoc->getIDocumentDeviceAccess().getPrinter( false );
+    return mpDoc->getIDocumentDeviceAccess().getPrinter( false );
 }
 
 OutputDevice* SwDocShell::GetDocumentRefDev()
 {
-    return pDoc->getIDocumentDeviceAccess().getReferenceDevice( false );
+    return mpDoc->getIDocumentDeviceAccess().getReferenceDevice( false );
 }
 
 void SwDocShell::OnDocumentPrinterChanged( Printer * pNewPrinter )
@@ -1021,7 +1031,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
 
         case SID_ATTR_YEAR2000:
             {
-                const SvNumberFormatter* pFmtr = pDoc->GetNumberFormatter(false);
+                const SvNumberFormatter* pFmtr = mpDoc->GetNumberFormatter(false);
                 rSet.Put( SfxUInt16Item( nWhich,
                         static_cast< sal_uInt16 >(
                         pFmtr ? pFmtr->GetYear2000()
@@ -1030,14 +1040,14 @@ void SwDocShell::GetState(SfxItemSet& rSet)
             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();
+            //mpDoc->UpdateFlds( NULL, false );
+            sfx2::LinkManager& rLnkMgr = mpDoc->GetLinkManager();
             const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks();
             bool bRet = false;
             if( !rLnks.empty() )
@@ -1045,7 +1055,7 @@ 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 ) );
         }
@@ -1078,15 +1088,15 @@ SfxStyleSheetBasePool*  SwDocShell::GetStyleSheetPool()
 
 void SwDocShell::SetView(SwView* pVw)
 {
-    if ( 0 != (pView = pVw) )
-        pWrtShell = &pView->GetWrtShell();
+    if ( 0 != (mpView = pVw) )
+        mpWrtShell = &mpView->GetWrtShell();
     else
-        pWrtShell = 0;
+        mpWrtShell = 0;
 }
 
 void SwDocShell::PrepareReload()
 {
-    ::DelAllGrfCacheEntries( pDoc );
+    ::DelAllGrfCacheEntries( mpDoc );
 }
 
 // #i59688#
@@ -1102,7 +1112,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);
@@ -1114,9 +1124,9 @@ void SwDocShell::LoadingFinished()
     }
 
     // #i38810#
-    if ( bHasDocToStayModified && !pDoc->IsModified() )
+    if ( bHasDocToStayModified && !mpDoc->IsModified() )
     {
-        pDoc->SetModified();
+        mpDoc->SetModified();
     }
 }
 
@@ -1125,29 +1135,29 @@ void SwDocShell::CancelTransfers()
 {
     // Cancel all links from LinkManager
     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;
 
             OUString aObjName = pOLENd->GetOLEObj().GetCurrentPersistName();
-            GetEmbeddedObjectContainer().MoveEmbeddedObject( aObjName, *pOLEChildList );
+            GetEmbeddedObjectContainer().MoveEmbeddedObject( aObjName, *mpOLEChildList );
         }
     }
 }
@@ -1161,16 +1171,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;
         }
     }
@@ -1200,18 +1210,18 @@ uno::Reference< frame::XController >
 
 void SwDocShell::setDocAccTitle( const OUString& rTitle )
 {
-    if (pDoc)
+    if (mpDoc)
     {
-        pDoc->setDocAccTitle( rTitle );
+        mpDoc->setDocAccTitle( rTitle );
     }
 }
 
 const OUString SwDocShell::getDocAccTitle() const
 {
     OUString sRet;
-    if (pDoc)
+    if (mpDoc)
     {
-        sRet = pDoc->getDocAccTitle();
+        sRet = mpDoc->getDocAccTitle();
     }
 
     return sRet;
@@ -1255,24 +1265,24 @@ 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);
 }
 
 bool SwDocShell::SetProtectionPassword( const OUString &rNewPassword )
@@ -1281,7 +1291,7 @@ bool SwDocShell::SetProtectionPassword( const OUString &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, false, &pItem )
         && ((SfxBoolItem*)pItem)->GetValue() == (aPasswd.getLength() > 0))
@@ -1316,7 +1326,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, false, &pItem )
         && ((SfxBoolItem*)pItem)->GetValue() == (aPasswdHash.getLength() != 0))
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 74cbb03..e68a0d9 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -188,21 +188,21 @@ void SwDocShell::ToggleBrowserMode(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( true );    // lock visible section
-        pWrtShell->StartAllAction();
+    if ( mpWrtShell ) {
+        bUnlockView = !mpWrtShell->IsViewLocked();
+        mpWrtShell->LockView( true );    // lock visible section
+        mpWrtShell->StartAllAction();
     }
 
-    pDoc->DocInfoChgd();
+    mpDoc->DocInfoChgd();
 
-    if ( pWrtShell ) {
-        pWrtShell->EndAllAction();
+    if ( mpWrtShell ) {
+        mpWrtShell->EndAllAction();
         if ( bUnlockView ) {
-            pWrtShell->LockView( false );
+            mpWrtShell->LockView( false );
         }
     }
 }
@@ -229,12 +229,12 @@ static void lcl_processCompatibleSfxHint( const uno::Reference< script::vba::XVB
 // Notification on DocInfo changes
 void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
 {
-    if( !pDoc )
+    if( !mpDoc )
     {
         return ;
     }
 
-    uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = pDoc->GetVbaEventProcessor();
+    uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = mpDoc->GetVbaEventProcessor();
     if( xVbaEvents.is() )
         lcl_processCompatibleSfxHint( xVbaEvents, rHint );
 
@@ -260,16 +260,16 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
     if( nAction )
     {
         bool bUnlockView = true; //initializing prevents warning
-        if( pWrtShell )
+        if( mpWrtShell )
         {
-            bUnlockView = !pWrtShell->IsViewLocked();
-            pWrtShell->LockView( true );    //lock visible section
-            pWrtShell->StartAllAction();
+            bUnlockView = !mpWrtShell->IsViewLocked();
+            mpWrtShell->LockView( true );    //lock visible section
+            mpWrtShell->StartAllAction();
         }
         switch( nAction )
         {
         case 2:
-            pDoc->GetSysFldType( RES_FILENAMEFLD )->UpdateFlds();
+            mpDoc->GetSysFldType( RES_FILENAMEFLD )->UpdateFlds();
             break;
         // #i38126# - own action for event LOADFINISHED
         // in order to avoid a modified document.
@@ -282,24 +282,24 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
                 if ( bResetModified )
                     EnableSetModified( false );
                 // #i41679#
-                const bool bIsDocModified = pDoc->IsModified();
+                const bool bIsDocModified = mpDoc->IsModified();
 
-                pDoc->DocInfoChgd( );
+                mpDoc->DocInfoChgd( );
 
                 // #i41679#
                 if ( !bIsDocModified )
-                    pDoc->ResetModified();
+                    mpDoc->ResetModified();
                 if ( bResetModified )
                     EnableSetModified( true );
             }
             break;
         }
 
-        if( pWrtShell )
+        if( mpWrtShell )
         {
-            pWrtShell->EndAllAction();
+            mpWrtShell->EndAllAction();
             if( bUnlockView )
-                pWrtShell->LockView( false );
+                mpWrtShell->LockView( false );
         }
     }
 }
@@ -312,9 +312,9 @@ bool SwDocShell::PrepareClose( bool bUI )
     if( nRet )
         EndListening( *this );
 
-    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;
@@ -694,7 +694,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
                 xDocSh->DoInitNew( 0 );
 
                 bool bImpress = FN_ABSTRACT_STARIMPRESS == nWhich;
-                pDoc->Summary( pSmryDoc, nLevel, nPara, bImpress );
+                mpDoc->Summary( pSmryDoc, nLevel, nPara, bImpress );
                 if( bImpress )
                 {
                     WriterRef xWrt;
@@ -823,24 +823,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:
@@ -942,7 +942,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
                         uno::Reference<XFilePickerControlAccess> xCtrlAcc(xFP, UNO_QUERY);
 
                         bool    bOutline[MAXLEVEL] = {false};
-                        const SwOutlineNodes& rOutlNds = pDoc->GetNodes().GetOutLineNds();
+                        const SwOutlineNodes& rOutlNds = mpDoc->GetNodes().GetOutLineNds();
                         if( !rOutlNds.empty() )
                         {
                             int nLevel;
@@ -954,7 +954,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
                                 }
                         }
 
-                        const sal_uInt16 nStyleCount = pDoc->GetTxtFmtColls()->size();
+                        const sal_uInt16 nStyleCount = mpDoc->GetTxtFmtColls()->size();
                         Sequence<OUString> aListBoxEntries( MAXLEVEL + nStyleCount);
                         OUString* pEntries = aListBoxEntries.getArray();
                         sal_Int32   nIdx = 0 ;
@@ -969,7 +969,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
                         OUString    sStyle( SW_RESSTR(STR_FDLG_STYLE) );
                         for(sal_uInt16 i = 0; i < nStyleCount; ++i)
                         {
-                            SwTxtFmtColl &rTxtColl = *(*pDoc->GetTxtFmtColls())[ i ];
+                            SwTxtFmtColl &rTxtColl = *(*mpDoc->GetTxtFmtColls())[ i ];
                             if( !rTxtColl.IsDefault() && rTxtColl.IsAtDocNodeSet() )
                             {
                                 pEntries[nIdx++] = sStyle + rTxtColl.GetName();
@@ -1039,17 +1039,17 @@ void SwDocShell::Execute(SfxRequest& rReq)
                         if ( bCreateByOutlineLevel )
                         {
                             bDone = bCreateHtml
-                                ? pDoc->GenerateHTMLDoc( aFileName, nTemplateOutlineLevel )
-                                : pDoc->GenerateGlobalDoc( aFileName, nTemplateOutlineLevel );
+                                ? mpDoc->GenerateHTMLDoc( aFileName, nTemplateOutlineLevel )
+                                : mpDoc->GenerateGlobalDoc( aFileName, nTemplateOutlineLevel );
                         }
                         else
                         {
                             const SwTxtFmtColl* pSplitColl = 0;
                             if ( !aTemplateName.isEmpty() )
-                                pSplitColl = pDoc->FindTxtFmtCollByName(aTemplateName);
+                                pSplitColl = mpDoc->FindTxtFmtCollByName(aTemplateName);
                             bDone = bCreateHtml
-                                ? pDoc->GenerateHTMLDoc( aFileName, pSplitColl )
-                                : pDoc->GenerateGlobalDoc( aFileName, pSplitColl );
+                                ? mpDoc->GenerateHTMLDoc( aFileName, pSplitColl )
+                                : mpDoc->GenerateGlobalDoc( aFileName, pSplitColl );
                         }
                         if( bDone )
                         {
@@ -1108,7 +1108,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
                     pViewShell = pVFrame ? pVFrame->GetViewShell() : 0;
                     pCurrView = dynamic_cast<SwView*>( pViewShell );
                 }
-                pDoc->GetNumberFormatter(true)->SetYear2000(nYear2K);
+                mpDoc->GetNumberFormatter(true)->SetYear2000(nYear2K);
             }
         break;
         case FN_OPEN_FILE:
@@ -1164,24 +1164,24 @@ void lcl_processCompatibleSfxHint( const uno::Reference< document::XVbaEventsHel
 bool SwDocShell::DdeGetData( const OUString& rItem, const OUString& rMimeType,
                              uno::Any & rValue )
 {
-    return pDoc->GetData( rItem, rMimeType, rValue );
+    return mpDoc->GetData( rItem, rMimeType, rValue );
 }
 
 bool SwDocShell::DdeSetData( const OUString& rItem, const OUString& rMimeType,
                              const uno::Any & rValue )
 {
-    return pDoc->SetData( rItem, rMimeType, rValue );
+    return mpDoc->SetData( rItem, rMimeType, rValue );
 }
 
 ::sfx2::SvLinkSource* SwDocShell::DdeCreateLinkSource( const OUString& rItem )
 {
-    return pDoc->CreateLinkSource( rItem );
+    return mpDoc->CreateLinkSource( rItem );
 }
 
 void SwDocShell::ReconnectDdeLink(SfxObjectShell& rServer)
 {
-    if ( pDoc ) {
-        ::sfx2::LinkManager& rLinkManager = pDoc->GetLinkManager();
+    if ( mpDoc ) {
+        ::sfx2::LinkManager& rLinkManager = mpDoc->GetLinkManager();
         rLinkManager.ReconnectDdeLink(rServer);
     }
 }
@@ -1208,7 +1208,7 @@ void SwDocShell::FillClass( SvGlobalName * pClassName,
     }
 // #FIXME check with new Event handling
 #if 0
-    uno::Reference< document::XVbaEventsHelper > xVbaEventsHelper = pDoc->GetVbaEventsHelper();
+    uno::Reference< document::XVbaEventsHelper > xVbaEventsHelper = mpDoc->GetVbaEventsHelper();
     if( xVbaEventsHelper.is() )
         lcl_processCompatibleSfxHint( xVbaEventsHelper, rHint );
 #endif
@@ -1221,20 +1221,20 @@ void SwDocShell::SetModified( bool bSet )
     SfxObjectShell::SetModified( bSet );
     if( IsEnableSetModified())
     {
-         if (!pDoc->IsInCallModified() )
+         if (!mpDoc->IsInCallModified() )
          {
             EnableSetModified( false );
             if( bSet )
             {
-                bool bOld = pDoc->IsModified();
-                pDoc->SetModified();
+                bool bOld = mpDoc->IsModified();
+                mpDoc->SetModified();
                 if( !bOld )
                 {
-                    pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
+                    mpDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
                 }
             }
             else
-                pDoc->ResetModified();
+                mpDoc->ResetModified();
 
             EnableSetModified( true );
          }
@@ -1325,7 +1325,7 @@ void SwDocShell::ReloadFromHtml( const OUString& rStreamName, SwSrcView* pSrcVie
         }
     }
 #endif
-    bool bWasBrowseMode = pDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::BROWSE_MODE);
+    bool bWasBrowseMode = mpDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::BROWSE_MODE);
     RemoveLink();
 
     // now also the UNO-Model has to be informed about the new Doc #51535#
@@ -1336,7 +1336,7 @@ void SwDocShell::ReloadFromHtml( const OUString& rStreamName, SwSrcView* pSrcVie
     AddLink();
     //#116402# update font list when new document is created
     UpdateFontList();
-    pDoc->getIDocumentSettingAccess().set(IDocumentSettingAccess::BROWSE_MODE, bWasBrowseMode);
+    mpDoc->getIDocumentSettingAccess().set(IDocumentSettingAccess::BROWSE_MODE, bWasBrowseMode);
     pSrcView->SetPool(&GetPool());
 
     const OUString& rMedname = GetMedium()->GetName();
@@ -1356,7 +1356,7 @@ void SwDocShell::ReloadFromHtml( const OUString& rStreamName, SwSrcView* pSrcVie
     // 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 );
 
@@ -1378,7 +1378,7 @@ void SwDocShell::ReloadFromHtml( const OUString& rStreamName, SwSrcView* pSrcVie
     if(bModified && !IsReadOnly())
         SetModified();
     else
-        pDoc->ResetModified();
+        mpDoc->ResetModified();
 }
 
 sal_uLong SwDocShell::LoadStylesFromFile( const OUString& rURL,
@@ -1436,13 +1436,13 @@ sal_uLong SwDocShell::LoadStylesFromFile( const OUString& rURL,
         // insert the styles!
         if( bUnoCall )
         {
-            SwNodeIndex aIdx( pDoc->GetNodes().GetEndOfContent(), -1 );
+            SwNodeIndex aIdx( mpDoc->GetNodes().GetEndOfContent(), -1 );
             pPam.reset(new SwPaM( aIdx ));
             pReader.reset(new SwReader( aMed, rURL, *pPam ));
         }
         else
         {
-            pReader.reset(new SwReader( aMed, rURL, *pWrtShell->GetCrsr() ));
+            pReader.reset(new SwReader( aMed, rURL, *mpWrtShell->GetCrsr() ));
         }
 
         pRead->GetReaderOpt().SetTxtFmts( rOpt.IsTxtFmts() );
@@ -1453,14 +1453,14 @@ sal_uLong SwDocShell::LoadStylesFromFile( const OUString& 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();
         }
     }
 
diff --git a/sw/source/uibase/app/docshdrw.cxx b/sw/source/uibase/app/docshdrw.cxx
index 479aa30..f24a98d 100644
--- a/sw/source/uibase/app/docshdrw.cxx
+++ b/sw/source/uibase/app/docshdrw.cxx
@@ -35,7 +35,7 @@ using namespace ::com::sun::star;
 // Load Document
 void  SwDocShell::InitDraw()
 {
-    SdrModel *pDrDoc = pDoc->getIDocumentDrawModelAccess().GetDrawModel();
+    SdrModel *pDrDoc = mpDoc->getIDocumentDrawModelAccess().GetDrawModel();
     if( pDrDoc )
     {
         // create Lists and Tables DocShell's ItemSet
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx
index cda1266..bc5b40a 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -99,7 +99,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
     bool bHTMLTemplSet = false;
     if( bRet )
     {
-        AddLink();      // create pDoc / pIo if applicable
+        AddLink();      // create mpDoc / pIo if applicable
 
         bool bWeb = ISA( SwWebDocShell );
         if ( bWeb )
@@ -108,7 +108,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
             GetDoc()->getIDocumentSettingAccess().set(IDocumentSettingAccess::GLOBAL_DOCUMENT, true);       // Globaldokument
 
         if ( GetCreateMode() ==  SFX_CREATE_MODE_EMBEDDED )
-            SwTransferable::InitOle( this, *pDoc );
+            SwTransferable::InitOle( this, *mpDoc );
 
         // set forbidden characters if necessary
         SvxAsianConfig aAsian;
@@ -121,20 +121,20 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
                 ForbiddenCharacters aForbidden;
                 aAsian.GetStartEndChars( pLocales[i], aForbidden.beginLine, aForbidden.endLine);
                 LanguageType  eLang = LanguageTag::convertToLanguageType(pLocales[i]);
-                pDoc->getIDocumentSettingAccess().setForbiddenCharacters( eLang, aForbidden);
+                mpDoc->getIDocumentSettingAccess().setForbiddenCharacters( eLang, aForbidden);
             }
         }
-        pDoc->getIDocumentSettingAccess().set(IDocumentSettingAccess::KERN_ASIAN_PUNCTUATION,
+        mpDoc->getIDocumentSettingAccess().set(IDocumentSettingAccess::KERN_ASIAN_PUNCTUATION,
                   !aAsian.IsKerningWesternTextOnly());
-        pDoc->getIDocumentSettingAccess().setCharacterCompressionType(static_cast<SwCharCompressType>(aAsian.GetCharDistanceCompression()));
-        pDoc->getIDocumentDeviceAccess().setPrintData(*SW_MOD()->GetPrtOptions(bWeb));
+        mpDoc->getIDocumentSettingAccess().setCharacterCompressionType(static_cast<SwCharCompressType>(aAsian.GetCharDistanceCompression()));
+        mpDoc->getIDocumentDeviceAccess().setPrintData(*SW_MOD()->GetPrtOptions(bWeb));
 
         SubInitNew();
 
         // for all
 
         SwStdFontConfig* pStdFont = SW_MOD()->GetStdFontConfig();
-        SfxPrinter* pPrt = pDoc->getIDocumentDeviceAccess().getPrinter( false );
+        SfxPrinter* pPrt = mpDoc->getIDocumentDeviceAccess().getPrinter( false );
 
         OUString sEntry;
         sal_uInt16 aFontWhich[] =
@@ -172,7 +172,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
             sal_uInt16 nFontWhich = aFontWhich[i];
             sal_uInt16 nFontId = aFontIds[i];
             boost::scoped_ptr<SvxFontItem> pFontItem;
-            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))
             {
@@ -204,20 +204,20 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
                 pFontItem.reset(new SvxFontItem(aLangDefFont.GetFamily(), aLangDefFont.GetName(),
                                                 aEmptyOUStr, 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);
             }
             pFontItem.reset();
             sal_Int32 nFontHeight = pStdFont->GetFontHeight( FONT_STANDARD, i, eLanguage );
             if(nFontHeight <= 0)
                 nFontHeight = SwStdFontConfig::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]);
             }
 
@@ -240,20 +240,20 @@ 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]))
@@ -264,7 +264,7 @@ 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, false ) )
@@ -277,7 +277,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
             if(nFontHeight <= 0)
                 nFontHeight = SwStdFontConfig::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, true ));
             if(aFontHeight.GetHeight() != sal::static_int_cast<sal_uInt32, sal_Int32>(nFontHeight))
             {
@@ -289,7 +289,7 @@ 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->getIDocumentSettingAccess().set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT,
+        mpDoc->getIDocumentSettingAccess().set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT,
                 SW_MOD()->GetUsrPref( bWeb )->IsAlignMathObjectsToBaseline() );
     }
 
@@ -297,19 +297,19 @@ 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 ) );
 
 // #i29550#
-    pDoc->SetDefault( SfxBoolItem( RES_COLLAPSING_BORDERS, true ) );
+    mpDoc->SetDefault( SfxBoolItem( RES_COLLAPSING_BORDERS, true ) );
 // <-- collapsing
 
     //#i16874# AutoKerning as default for new documents
-    pDoc->SetDefault( SvxAutoKernItem( true, RES_CHRATR_AUTOKERN ) );
+    mpDoc->SetDefault( SvxAutoKernItem( true, RES_CHRATR_AUTOKERN ) );
 
     // #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;
 }
@@ -317,13 +317,13 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
 // Ctor with SfxCreateMode ?????
 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),
+    mbInUpdateFontList(false),
+    mpView( 0 ),
+    mpWrtShell( 0 ),
+    mpOLEChildList( 0 ),
+    mnUpdateDocMode(document::UpdateDocMode::ACCORDING_TO_CONFIG),
     bIsATemplate(false)
 {
     Init_Impl();
@@ -332,13 +332,13 @@ SwDocShell::SwDocShell( SfxObjectCreateMode eMode ) :
 // Ctor / Dtor
 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),
+    mbInUpdateFontList(false),
+    mpView( 0 ),
+    mpWrtShell( 0 ),
+    mpOLEChildList( 0 ),
+    mnUpdateDocMode(document::UpdateDocMode::ACCORDING_TO_CONFIG),
     bIsATemplate(false)
 {
     Init_Impl();
@@ -347,13 +347,13 @@ SwDocShell::SwDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
 // Ctor / Dtor
 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),
+    mbInUpdateFontList(false),
+    mpView( 0 ),
+    mpWrtShell( 0 ),
+    mpOLEChildList( 0 ),
+    mnUpdateDocMode(document::UpdateDocMode::ACCORDING_TO_CONFIG),
     bIsATemplate(false)
 {
     Init_Impl();
@@ -363,22 +363,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;
 
     // we, as BroadCaster also become our own Listener
     // (for DocInfo/FileNames/....)
     EndListening( *this );
 
-    delete pOLEChildList;
+    delete mpOLEChildList;
 }
 
 void  SwDocShell::Init_Impl()
@@ -397,39 +397,39 @@ void  SwDocShell::Init_Impl()
 
 void SwDocShell::AddLink()
 {
-    if( !pDoc )
+    if( !mpDoc )
     {
         SwDocFac aFactory;
-        pDoc = aFactory.GetDoc();
-        pDoc->acquire();
-        pDoc->getIDocumentSettingAccess().set(IDocumentSettingAccess::HTML_MODE, ISA(SwWebDocShell) );
+        mpDoc = aFactory.GetDoc();
+        mpDoc->acquire();
+        mpDoc->getIDocumentSettingAccess().set(IDocumentSettingAccess::HTML_MODE, ISA(SwWebDocShell) );
     }
     else
-        pDoc->acquire();
-    pDoc->SetDocShell( this );      // set the DocShell-Pointer for Doc
+        mpDoc->acquire();
+    mpDoc->SetDocShell( this );      // set the DocShell-Pointer for Doc
     uno::Reference< text::XTextDocument >  xDoc(GetBaseModel(), uno::UNO_QUERY);
     ((SwXTextDocument*)xDoc.get())->Reactivate(this);
 
-    SetPool(&pDoc->GetAttrPool());
+    SetPool(&mpDoc->GetAttrPool());
 
     // most suitably not until a sdbcx::View is created!!!
-    pDoc->SetOle2Link(LINK(this, SwDocShell, Ole2ModifiedHdl));
+    mpDoc->SetOle2Link(LINK(this, SwDocShell, Ole2ModifiedHdl));
 }
 
 // create new FontList Change Printer
 void SwDocShell::UpdateFontList()
 {
-    if(!bInUpdateFontList)
+    if(!mbInUpdateFontList)
     {
-        bInUpdateFontList = true;
-        OSL_ENSURE(pDoc, "No Doc no FontList");
-        if( pDoc )
+        mbInUpdateFontList = true;
+        OSL_ENSURE(mpDoc, "No Doc no FontList");
+        if( mpDoc )
         {
-            delete pFontList;
-            pFontList = new FontList( pDoc->getIDocumentDeviceAccess().getReferenceDevice( true ) );
-            PutItem( SvxFontListItem( pFontList, SID_ATTR_CHAR_FONTLIST ) );
+            delete mpFontList;
+            mpFontList = new FontList( mpDoc->getIDocumentDeviceAccess().getReferenceDevice( true ) );
+            PutItem( SvxFontListItem( mpFontList, SID_ATTR_CHAR_FONTLIST ) );
         }
-        bInUpdateFontList = false;
+        mbInUpdateFontList = false;
     }
 }
 
@@ -439,19 +439,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;       // we don't have the Doc anymore!!
+            delete mpDoc;
+        mpDoc = 0;       // we don't have the Doc anymore!!
     }
 }
 void SwDocShell::InvalidateModel()
@@ -474,7 +474,7 @@ bool  SwDocShell::Load( SfxMedium& rMedium )
     if( SfxObjectShell::Load( rMedium ))
     {
         SAL_INFO( "sw.ui", "after SfxInPlaceObject::Load" );
-        if( pDoc )              // for last version!!
+        if (mpDoc)              // for last version!!
             RemoveLink();       // release the existing
 
         AddLink();      // set Link and update Data!!
@@ -482,11 +482,11 @@ bool  SwDocShell::Load( SfxMedium& rMedium )
         // Loading
         // for MD
         OSL_ENSURE( !mxBasePool.is(), "who hasn't destroyed their Pool?" );
-        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, false);
-            nUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE;
+            mnUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE;
         }
 
         SwWait aWait( *this, true );
@@ -498,7 +498,7 @@ bool  SwDocShell::Load( SfxMedium& rMedium )
                     if( ReadXML )
                     {
                         ReadXML->SetOrganizerMode( true );
-                        SwReader aRdr( rMedium, aEmptyOUStr, pDoc );
+                        SwReader aRdr( rMedium, aEmptyOUStr, mpDoc );
                         nErr = aRdr.Read( *ReadXML );
                         ReadXML->SetOrganizerMode( false );
                     }
@@ -509,7 +509,7 @@ bool  SwDocShell::Load( SfxMedium& rMedium )
             case SFX_CREATE_MODE_EMBEDDED:
                 {
                     // for MWERKS (Mac-Compiler): can't cast autonomously
-                    SwTransferable::InitOle( this, *pDoc );
+                    SwTransferable::InitOle( this, *mpDoc );
                 }
                 // suppress SfxProgress, when we are Embedded
                 SW_MOD()->SetEmbeddedLoadSave( true );
@@ -523,7 +523,7 @@ bool  SwDocShell::Load( SfxMedium& rMedium )
                     {
                         // set Doc's DocInfo at DocShell-Medium
                         SAL_INFO( "sw.ui", "before ReadDocInfo" );
-                        SwReader aRdr( rMedium, aEmptyOUStr, pDoc );
+                        SwReader aRdr( rMedium, aEmptyOUStr, mpDoc );
                         SAL_INFO( "sw.ui", "before Read" );
                         nErr = aRdr.Read( *pReader );
                         SAL_INFO( "sw.ui", "after Read" );
@@ -532,13 +532,13 @@ bool  SwDocShell::Load( SfxMedium& rMedium )
                         // by this formats.
                         if( ISA( SwWebDocShell ) )
                         {
-                            if( !pDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::HTML_MODE) )
-                                pDoc->getIDocumentSettingAccess().set(IDocumentSettingAccess::HTML_MODE, true);
+                            if( !mpDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::HTML_MODE) )
+                                mpDoc->getIDocumentSettingAccess().set(IDocumentSettingAccess::HTML_MODE, true);
                         }
                         if( ISA( SwGlobalDocShell ) )
                         {
-                            if( !pDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
-                                pDoc->getIDocumentSettingAccess().set(IDocumentSettingAccess::GLOBAL_DOCUMENT, true);
+                            if( !mpDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
+                                mpDoc->getIDocumentSettingAccess().set(IDocumentSettingAccess::GLOBAL_DOCUMENT, true);
                         }
                     }
                 }
@@ -554,7 +554,7 @@ bool  SwDocShell::Load( SfxMedium& rMedium )
         SetError( nErr, OUString( OSL_LOG_PREFIX ) );
         bRet = !IsError( nErr );
 
-        if ( bRet && !pDoc->IsInLoadAsynchron() &&
+        if ( bRet && !mpDoc->IsInLoadAsynchron() &&
              GetCreateMode() == SFX_CREATE_MODE_STANDARD )
         {
             LoadingFinished();
@@ -570,7 +570,7 @@ bool  SwDocShell::Load( SfxMedium& rMedium )
 bool  SwDocShell::LoadFrom( SfxMedium& rMedium )
 {
     bool bRet = false;
-    if( pDoc )
+    if( mpDoc )
         RemoveLink();
 
     AddLink();      // set Link and update Data!!
@@ -585,11 +585,11 @@ bool  SwDocShell::LoadFrom( SfxMedium& rMedium )
             SwWait aWait( *this, true );
             {
                 OSL_ENSURE( !mxBasePool.is(), "who hasn't destroyed their Pool?" );
-                mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
+                mxBasePool = new SwDocStyleSheetPool( *mpDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
                 if( ReadXML )
                 {
                     ReadXML->SetOrganizerMode( true );
-                    SwReader aRdr( rMedium, aEmptyOUStr, pDoc );
+                    SwReader aRdr( rMedium, aEmptyOUStr, mpDoc );
                     nErr = aRdr.Read( *ReadXML );
                     ReadXML->SetOrganizerMode( false );
                 }
@@ -606,19 +606,19 @@ bool  SwDocShell::LoadFrom( SfxMedium& rMedium )
     } while( false );
 
     SfxObjectShell::LoadFrom( rMedium );
-    pDoc->ResetModified();
+    mpDoc->ResetModified();
     return bRet;
 }
 
 void SwDocShell::SubInitNew()
 {
     OSL_ENSURE( !mxBasePool.is(), "who hasn't destroyed their Pool?" );
-    mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
+    mxBasePool = new SwDocStyleSheetPool( *mpDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
     UpdateFontList();
     InitDraw();
 
-    pDoc->getIDocumentSettingAccess().setLinkUpdateMode( GLOBALSETTING );
-    pDoc->getIDocumentSettingAccess().setFieldUpdateFlags( AUTOUPD_GLOBALSETTING );
+    mpDoc->getIDocumentSettingAccess().setLinkUpdateMode( GLOBALSETTING );
+    mpDoc->getIDocumentSettingAccess().setFieldUpdateFlags( AUTOUPD_GLOBALSETTING );
 
     bool bWeb = ISA(SwWebDocShell);
 
@@ -634,7 +634,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;
@@ -650,7 +650,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);
@@ -664,23 +664,23 @@ 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)
     {
         bool bSquaredPageMode = SW_MOD()->GetUsrPref(false)->IsSquaredPageMode();
-        pDoc->SetDefaultPageMode( bSquaredPageMode );
+        mpDoc->SetDefaultPageMode( bSquaredPageMode );
     }
 
-    pDoc->ResetModified();
+    mpDoc->ResetModified();
 }
 
 /*
  * Document Interface Access
  */
-IDocumentDeviceAccess* SwDocShell::getIDocumentDeviceAccess() { return &pDoc->getIDocumentDeviceAccess(); }
-const IDocumentSettingAccess* SwDocShell::getIDocumentSettingAccess() const { return &pDoc->getIDocumentSettingAccess(); }
-IDocumentChartDataProviderAccess* SwDocShell::getIDocumentChartDataProviderAccess() { return pDoc; }
+IDocumentDeviceAccess* SwDocShell::getIDocumentDeviceAccess() { return &mpDoc->getIDocumentDeviceAccess(); }
+const IDocumentSettingAccess* SwDocShell::getIDocumentSettingAccess() const { return &mpDoc->getIDocumentSettingAccess(); }
+IDocumentChartDataProviderAccess* SwDocShell::getIDocumentChartDataProviderAccess() { return mpDoc; }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index ec4332c..da3aab0 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -159,7 +159,7 @@ void  SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
                     SfxTemplateItem aItem(nWhich, aName);
 
                     sal_uInt16 nMask = 0;
-                    if( pDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::HTML_MODE) )
+                    if( mpDoc->getIDocumentSettingAccess().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->getIDocumentSettingAccess().get(IDocumentSettingAccess::HTML_MODE) )
+                if( mpDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::HTML_MODE) )
                     rSet.DisableItem( nWhich );
                 else
                 {
@@ -201,7 +201,7 @@ void  SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
             case SID_STYLE_FAMILY4:
             {
                 SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
-                if( pDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::HTML_MODE) && !rHtmlOpt.IsPrintLayoutExtension())
+                if( mpDoc->getIDocumentSettingAccess().get(IDocumentSettingAccess::HTML_MODE) && !rHtmlOpt.IsPrintLayoutExtension())
                     rSet.DisableItem( nWhich );
                 else
                 {
@@ -421,14 +421,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();
                         }
@@ -624,7 +624,7 @@ sal_uInt16 SwDocShell::Edit(
     SfxStyleSheetBase *pStyle = 0;
 
     sal_uInt16 nRet = nMask;
-    bool bModified = pDoc->IsModified();
+    bool bModified = mpDoc->IsModified();
 
     if( bNew )
     {
@@ -643,12 +643,12 @@ sal_uInt16 SwDocShell::Edit(
             {
                 if(!rParent.isEmpty())
                 {
-                    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 );
@@ -666,7 +666,7 @@ sal_uInt16 SwDocShell::Edit(
                 }
                 else
                 {
-                    SwTxtFmtColl* pColl = pWrtShell->GetCurTxtFmtColl();
+                    SwTxtFmtColl* pColl = mpWrtShell->GetCurTxtFmtColl();
                     pDStyle->GetCollection()->SetDerivedFrom( pColl );
                     if( pColl )
                         pDStyle->PresetParent( pColl->GetName() );
@@ -677,12 +677,12 @@ sal_uInt16 SwDocShell::Edit(
             {
                 if(!rParent.isEmpty())
                 {
-                    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 );
@@ -690,7 +690,7 @@ sal_uInt16 SwDocShell::Edit(
                 }
                 else
                 {
-                    SwCharFmt* pCFmt = pWrtShell->GetCurCharFmt();
+                    SwCharFmt* pCFmt = mpWrtShell->GetCurCharFmt();
                     pDStyle->GetCharFmt()->SetDerivedFrom( pCFmt );
                         if( pCFmt )
                             pDStyle->PresetParent( pCFmt->GetName() );
@@ -701,12 +701,12 @@ sal_uInt16 SwDocShell::Edit(
             {
                 if(!rParent.isEmpty())
                 {
-                    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 );
@@ -761,7 +761,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 ) );
@@ -773,7 +773,7 @@ sal_uInt16 SwDocShell::Edit(
         assert( pFact );
         boost::scoped_ptr<SfxAbstractApplyTabDialog> pDlg(pFact->CreateTemplateDialog(
                                                     0, *(xTmp.get()), nFamily, sPage,
-                                                    pActShell ? pActShell : pWrtShell, bNew));
+                                                    pActShell ? pActShell : mpWrtShell, bNew));
         assert( pDlg );
         ApplyStyle aApplyStyleHelper(*this, bNew, pStyle, nRet, xTmp, nFamily, pDlg.get(), mxBasePool, bModified);
         pDlg->SetApplyHdl(LINK(&aApplyStyleHelper, ApplyStyle, ApplyHdl));
@@ -787,11 +787,11 @@ sal_uInt16 SwDocShell::Edit(
             if( bNew )
             {
                 GetWrtShell()->Undo(1);
-                pDoc->GetIDocumentUndoRedo().ClearRedo();
+                mpDoc->GetIDocumentUndoRedo().ClearRedo();
             }
 
             if( !bModified )
-                pDoc->ResetModified();
+                mpDoc->ResetModified();
         }
 
         nRet = aApplyStyleHelper.getRet();
@@ -820,15 +820,15 @@ sal_uInt16 SwDocShell::Edit(
             ::ConvertAttrGenToChar(xTmp->GetItemSet(), CONV_ATTR_STD);
         }
         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();
     }
@@ -938,7 +938,7 @@ sal_uInt16 SwDocShell::DoWaterCan(const OUString &rName, sal_uInt16 nFamily)
 {
     assert( GetWrtShell() );
 
-    SwEditWin& rEdtWin = pView->GetEditWin();
+    SwEditWin& rEdtWin = mpView->GetEditWin();
     SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
     bool bWaterCan = !(pApply && pApply->eType != 0);
 
@@ -982,7 +982,7 @@ sal_uInt16 SwDocShell::DoWaterCan(const OUString &rName, sal_uInt16 nFamily)
     else
         aTemplate.eType = 0;
 
-    pView->GetEditWin().SetApplyTemplate(aTemplate);
+    mpView->GetEditWin().SetApplyTemplate(aTemplate);
 
     return nFamily;
 }
@@ -1247,27 +1247,27 @@ void SwDocShell::_LoadStyles( SfxObjectShell& rSource, bool bPreserveCurrentDocu
         // of the template, update all the Source's
         // FixFields once.
         if(!bPreserveCurrentDocument)
-            ((SwDocShell&)rSource).pDoc->SetFixFields(false, NULL);
-        if( pWrtShell )
+            ((SwDocShell&)rSource).mpDoc->SetFixFields(false, NULL);
+        if( mpWrtShell )
         {
             // rhbz#818557, fdo#58893: EndAllAction will call SelectShell(),
             // which pushes a bunch of SfxShells that are not cleared
             // (for unknown reasons) when closing the document, causing crash;
             // setting bNoInterrupt appears to avoid the problem.
             ::comphelper::FlagRestorationGuard g(bNoInterrupt, true);
-            pWrtShell->StartAllAction();
-            pDoc->ReplaceStyles( *((SwDocShell&)rSource).pDoc );
-            pWrtShell->EndAllAction();
+            mpWrtShell->StartAllAction();
+            mpDoc->ReplaceStyles( *((SwDocShell&)rSource).mpDoc );
+            mpWrtShell->EndAllAction();
         }
         else
         {
-            bool bModified = pDoc->IsModified();
-            pDoc->ReplaceStyles( *((SwDocShell&)rSource).pDoc );
-            if( !bModified && pDoc->IsModified() && !pView )
+            bool bModified = mpDoc->IsModified();
+            mpDoc->ReplaceStyles( *((SwDocShell&)rSource).mpDoc );
+            if( !bModified && mpDoc->IsModified() && !mpView )
             {
                 // the View is created later, but overwrites the Modify-Flag.
                 // Undo doesn't work anymore anyways.
-                pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
+                mpDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
             }
         }
     }
commit 587f178ba457e4eb221a3e078f16efa6c3217646
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jun 26 11:14:51 2014 +0100

    clang: Value stored to 'nSumG' is never read
    
    yikes, well that was a worthwhile exercise
    
    Change-Id: I454c16ce8b307abfdd2db3d2e38f4d36fba429fa

diff --git a/vcl/source/bitmap/bitmapscalesuper.cxx b/vcl/source/bitmap/bitmapscalesuper.cxx
index 13b65e6..cbfb08e 100644
--- a/vcl/source/bitmap/bitmapscalesuper.cxx
+++ b/vcl/source/bitmap/bitmapscalesuper.cxx
@@ -925,7 +925,7 @@ void scaleNonPalleteGeneral2(BitmapReadAccess* pAcc, BitmapWriteAccess* pWAcc,
                 nSumB /= nTotalWeightY;
             }
 
-            BitmapColor aColRes((sal_uInt8)nSumR, (sal_uInt8)nSumR, (sal_uInt8)nSumB);
+            BitmapColor aColRes((sal_uInt8)nSumR, (sal_uInt8)nSumG, (sal_uInt8)nSumB);
             pWAcc->SetPixel( nYDst, nXDst++, aColRes );
         }
     }
commit daa6898578ec72faa406bfe08977f7d748610716
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jun 26 11:17:53 2014 +0100

    clang: Dead initialization
    
    Change-Id: Ieae5303e55f21044ef8e91e63c4896696cfad51c

diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index d45e534..a4e1622 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -2337,7 +2337,6 @@ double implGetDateOfFirstDayInFirstWeek
 
     double dBaseDate;
     implDateSerial( nYear, 1, 1, dBaseDate );
-    double dRetDate = dBaseDate;
 
     sal_Int16 nWeekDay0101 = implGetWeekDay( dBaseDate );
     sal_Int16 nDayDiff = nWeekDay0101 - nFirstDay;
@@ -2350,7 +2349,7 @@ double implGetDateOfFirstDayInFirstWeek
         if( nThisWeeksDaysInYearCount < nFirstWeekMinDays )
             nDayDiff -= 7;
     }
-    dRetDate = dBaseDate - nDayDiff;
+    double dRetDate = dBaseDate - nDayDiff;
     return dRetDate;
 }
 
diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx
index 084ecb2..28dd1d2 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -117,20 +117,15 @@ void UpdateHandler::enableControls( short nCtrlState )
     if ( nCtrlState == mnLastCtrlState )
         return;
 
-    bool bEnableControl;
-
-    short nCurStateVal = nCtrlState;
-    short nOldStateVal = mnLastCtrlState;
-
     // the help button should always be the last button in the
     // enum list und must never be disabled
     for ( int i=0; i<HELP_BUTTON; i++ )
     {
-        nCurStateVal = (short)(nCtrlState >> i);
-        nOldStateVal = (short)(mnLastCtrlState >> i);
+        short nCurStateVal = (short)(nCtrlState >> i);
+        short nOldStateVal = (short)(mnLastCtrlState >> i);
         if ( ( nCurStateVal & 0x01 ) != ( nOldStateVal & 0x01 ) )
         {
-            bEnableControl = ( ( nCurStateVal & 0x01 ) == 0x01 );
+            bool bEnableControl = ( ( nCurStateVal & 0x01 ) == 0x01 );
             setControlProperty( msButtonIDs[i], "Enabled", uno::Any( bEnableControl ) );
         }
     }
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index e49327e..54db936 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -1830,7 +1830,8 @@ bool HtmlExport::CreateHtmlForPresPages()
 
                         case presentation::ClickAction_PREVPAGE:
                         {
-                            sal_uLong nPage = nSdPage;
+                            sal_uLong nPage;
+
                             if (nSdPage == 0)
                                 nPage = 0;
                             else
diff --git a/svtools/source/contnr/simptabl.cxx b/svtools/source/contnr/simptabl.cxx
index 720028e..dcb87ad 100644
--- a/svtools/source/contnr/simptabl.cxx
+++ b/svtools/source/contnr/simptabl.cxx
@@ -163,10 +163,10 @@ void SvSimpleTable::SetTabs()
         if ( nPrivTabCount > aHeaderBar.GetItemCount() )
             nPrivTabCount = aHeaderBar.GetItemCount();
 
-        sal_uInt16 i, nNewSize = static_cast< sal_uInt16 >( GetTab(0) ), nPos = 0;
+        sal_uInt16 i, nPos = 0;
         for ( i = 1; i < nPrivTabCount; ++i )
         {

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list