[Libreoffice-commits] core.git: sw/inc sw/source

Miklos Vajna vmiklos at collabora.co.uk
Mon Apr 23 10:25:45 UTC 2018


 sw/inc/shellio.hxx                     |   56 +++++++++----------
 sw/source/filter/ascii/parasc.cxx      |    8 +-
 sw/source/filter/basflt/shellio.cxx    |   94 ++++++++++++++++-----------------
 sw/source/filter/docx/swdocxreader.cxx |    6 +-
 sw/source/filter/html/swhtml.cxx       |   24 ++++----
 sw/source/filter/rtf/swparrtf.cxx      |    5 +
 sw/source/filter/ww8/ww8par.cxx        |   22 +++----
 sw/source/filter/xml/swxml.cxx         |   52 +++++++++---------
 8 files changed, 134 insertions(+), 133 deletions(-)

New commits:
commit 27e26fc4286f66ab1bf4c807d86b8f3254c5c68b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Apr 23 09:06:52 2018 +0200

    sw: prefix members of Reader
    
    Change-Id: Ia4210410047ce3b37113cfe0d4dff5bb7122baf2
    Reviewed-on: https://gerrit.libreoffice.org/53307
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 225e0521530a..126374395895 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -187,27 +187,27 @@ class SW_DLLPUBLIC Reader
     friend bool TestImportRTF(SvStream &rStream);
     friend bool TestImportHTML(SvStream &rStream);
     rtl::Reference<SwDoc> mxTemplate;
-    OUString aTemplateNm;
+    OUString m_aTemplateName;
 
-    Date aDStamp;
-    tools::Time aTStamp;
-    DateTime aChkDateTime;
+    Date m_aDateStamp;
+    tools::Time m_aTimeStamp;
+    DateTime m_aCheckDateTime;
 
 protected:
-    SvStream* pStrm;
-    tools::SvRef<SotStorage> pStg;
-    css::uno::Reference < css::embed::XStorage > xStg;
-    SfxMedium* pMedium;     // Who wants to obtain a Medium (W4W).
-
-    SwgReaderOption aOpt;
-    bool bInsertMode : 1;
-    bool bTmplBrowseMode : 1;
-    bool bReadUTF8: 1;      // Interprete stream as UTF-8.
-    bool bBlockMode: 1;
-    bool bOrganizerMode : 1;
-    bool bHasAskTemplateName : 1;
-    bool bIgnoreHTMLComments : 1;
-    bool bSkipImages : 1;
+    SvStream* m_pStream;
+    tools::SvRef<SotStorage> m_pStorage;
+    css::uno::Reference < css::embed::XStorage > m_xStorage;
+    SfxMedium* m_pMedium;     // Who wants to obtain a Medium (W4W).
+
+    SwgReaderOption m_aOption;
+    bool m_bInsertMode : 1;
+    bool m_bTemplateBrowseMode : 1;
+    bool m_bReadUTF8: 1;      // Interprete stream as UTF-8.
+    bool m_bBlockMode: 1;
+    bool m_bOrganizerMode : 1;
+    bool m_bHasAskTemplateName : 1;
+    bool m_bIgnoreHTMLComments : 1;
+    bool m_bSkipImages : 1;
 
     virtual OUString GetTemplateName(SwDoc& rDoc) const;
 
@@ -216,7 +216,7 @@ public:
     virtual ~Reader();
 
     virtual int GetReaderType();
-    SwgReaderOption& GetReaderOpt() { return aOpt; }
+    SwgReaderOption& GetReaderOpt() { return m_aOption; }
 
     virtual void SetFltName( const OUString& rFltNm );
 
@@ -234,16 +234,16 @@ public:
     void SetTemplateName( const OUString& rDir );
     void MakeHTMLDummyTemplateDoc();
 
-    bool IsReadUTF8() const { return bReadUTF8; }
-    void SetReadUTF8( bool bSet ) { bReadUTF8 = bSet; }
+    bool IsReadUTF8() const { return m_bReadUTF8; }
+    void SetReadUTF8( bool bSet ) { m_bReadUTF8 = bSet; }
 
-    bool IsBlockMode() const { return bBlockMode; }
-    void SetBlockMode( bool bSet ) { bBlockMode = bSet; }
+    bool IsBlockMode() const { return m_bBlockMode; }
+    void SetBlockMode( bool bSet ) { m_bBlockMode = bSet; }
 
-    bool IsOrganizerMode() const { return bOrganizerMode; }
-    void SetOrganizerMode( bool bSet ) { bOrganizerMode = bSet; }
+    bool IsOrganizerMode() const { return m_bOrganizerMode; }
+    void SetOrganizerMode( bool bSet ) { m_bOrganizerMode = bSet; }
 
-    void SetIgnoreHTMLComments( bool bSet ) { bIgnoreHTMLComments = bSet; }
+    void SetIgnoreHTMLComments( bool bSet ) { m_bIgnoreHTMLComments = bSet; }
 
     virtual bool HasGlossaries() const;
     virtual bool ReadGlossaries( SwTextBlocks&, bool bSaveRelFiles ) const;
@@ -253,8 +253,8 @@ public:
     virtual size_t GetSectionList( SfxMedium& rMedium,
                                    std::vector<OUString>& rStrings) const;
 
-    const tools::SvRef<SotStorage>& getSotStorageRef() { return pStg; };
-    void setSotStorageRef(const tools::SvRef<SotStorage>& pStgRef) { pStg = pStgRef; };
+    const tools::SvRef<SotStorage>& getSotStorageRef() { return m_pStorage; };
+    void setSotStorageRef(const tools::SvRef<SotStorage>& pStgRef) { m_pStorage = pStgRef; };
 
 private:
     virtual ErrCode Read(SwDoc &, const OUString& rBaseURL, SwPaM &, const OUString &)=0;
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index d511424dba6d..a23bdfc77b41 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -77,19 +77,19 @@ public:
 // Call for the general reader interface
 ErrCode AsciiReader::Read( SwDoc &rDoc, const OUString&, SwPaM &rPam, const OUString & )
 {
-    if( !pStrm )
+    if( !m_pStream )
     {
         OSL_ENSURE( false, "ASCII read without a stream" );
         return ERR_SWG_READ_ERROR;
     }
 
-    SwASCIIParser* pParser = new SwASCIIParser( &rDoc, rPam, *pStrm,
-                                        !bInsertMode, aOpt.GetASCIIOpts() );
+    SwASCIIParser* pParser = new SwASCIIParser( &rDoc, rPam, *m_pStream,
+                                        !m_bInsertMode, m_aOption.GetASCIIOpts() );
     ErrCode nRet = pParser->CallParser();
 
     delete pParser;
     // after Read reset the options
-    aOpt.ResetASCIIOpts();
+    m_aOption.ResetASCIIOpts();
     return nRet;
 }
 
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index c0c1cea95987..24e92e23412b 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -66,14 +66,14 @@ ErrCode SwReader::Read( const Reader& rOptions )
 {
     // copy variables
     Reader* po = const_cast<Reader*>(&rOptions);
-    po->pStrm = pStrm;
-    po->pStg  = pStg;
-    po->xStg  = xStg;
-    po->bInsertMode = nullptr != pCursor;
-    po->bSkipImages = mbSkipImages;
+    po->m_pStream = pStrm;
+    po->m_pStorage  = pStg;
+    po->m_xStorage  = xStg;
+    po->m_bInsertMode = nullptr != pCursor;
+    po->m_bSkipImages = mbSkipImages;
 
     // if a Medium is selected, get its Stream
-    if( nullptr != (po->pMedium = pMedium ) &&
+    if( nullptr != (po->m_pMedium = pMedium ) &&
         !po->SetStrmStgPtr() )
     {
         po->SetReadUTF8( false );
@@ -119,7 +119,7 @@ ErrCode SwReader::Read( const Reader& rOptions )
     if( bSaveUndo )
     {
         // the reading of the page template cannot be undone!
-        bReadPageDescs = po->aOpt.IsPageDescs();
+        bReadPageDescs = po->m_aOption.IsPageDescs();
         if( bReadPageDescs )
         {
             bSaveUndo = false;
@@ -141,7 +141,7 @@ ErrCode SwReader::Read( const Reader& rOptions )
     // Array of FlyFormats
     SwFrameFormatsV aFlyFrameArr;
     // only read templates? then ignore multi selection!
-    bool bFormatsOnly = po->aOpt.IsFormatsOnly();
+    bool bFormatsOnly = po->m_aOption.IsFormatsOnly();
 
     while( true )
     {
@@ -429,12 +429,12 @@ SwReader::SwReader( const uno::Reference < embed::XStorage > &rStg, const OUStri
 }
 
 Reader::Reader()
-  : aDStamp( Date::EMPTY ),
-    aTStamp( tools::Time::EMPTY ),
-    aChkDateTime( DateTime::EMPTY ),
-    pStrm(nullptr), pMedium(nullptr), bInsertMode(false),
-    bTmplBrowseMode(false), bReadUTF8(false), bBlockMode(false), bOrganizerMode(false),
-    bHasAskTemplateName(false), bIgnoreHTMLComments(false), bSkipImages(false)
+  : m_aDateStamp( Date::EMPTY ),
+    m_aTimeStamp( tools::Time::EMPTY ),
+    m_aCheckDateTime( DateTime::EMPTY ),
+    m_pStream(nullptr), m_pMedium(nullptr), m_bInsertMode(false),
+    m_bTemplateBrowseMode(false), m_bReadUTF8(false), m_bBlockMode(false), m_bOrganizerMode(false),
+    m_bHasAskTemplateName(false), m_bIgnoreHTMLComments(false), m_bSkipImages(false)
 {
 }
 
@@ -450,40 +450,40 @@ OUString Reader::GetTemplateName(SwDoc& /*rDoc*/) const
 // load the Filter template, set and release
 SwDoc* Reader::GetTemplateDoc(SwDoc& rDoc)
 {
-    if( !bHasAskTemplateName )
+    if( !m_bHasAskTemplateName )
     {
         SetTemplateName( GetTemplateName(rDoc) );
-        bHasAskTemplateName = true;
+        m_bHasAskTemplateName = true;
     }
 
-    if( aTemplateNm.isEmpty() )
+    if( m_aTemplateName.isEmpty() )
         ClearTemplate();
     else
     {
-        INetURLObject aTDir( aTemplateNm );
+        INetURLObject aTDir( m_aTemplateName );
         const OUString aFileName = aTDir.GetMainURL( INetURLObject::DecodeMechanism::NONE );
         OSL_ENSURE( !aTDir.HasError(), "No absolute path for template name!" );
         DateTime aCurrDateTime( DateTime::SYSTEM );
         bool bLoad = false;
 
         // if the template is already loaded, check once-a-minute if it has changed
-        if( !mxTemplate.is() || aCurrDateTime >= aChkDateTime )
+        if( !mxTemplate.is() || aCurrDateTime >= m_aCheckDateTime )
         {
             Date aTstDate( Date::EMPTY );
             tools::Time aTstTime( tools::Time::EMPTY );
             if( FStatHelper::GetModifiedDateTimeOfFile(
                             aTDir.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
                             &aTstDate, &aTstTime ) &&
-                ( !mxTemplate.is() || aDStamp != aTstDate || aTStamp != aTstTime ))
+                ( !mxTemplate.is() || m_aDateStamp != aTstDate || m_aTimeStamp != aTstTime ))
             {
                 bLoad = true;
-                aDStamp = aTstDate;
-                aTStamp = aTstTime;
+                m_aDateStamp = aTstDate;
+                m_aTimeStamp = aTstTime;
             }
 
             // only one minute later check if it has changed
-            aChkDateTime = aCurrDateTime;
-            aChkDateTime += tools::Time( 0, 1 );
+            m_aCheckDateTime = aCurrDateTime;
+            m_aCheckDateTime += tools::Time( 0, 1 );
         }
 
         if (bLoad)
@@ -506,7 +506,7 @@ SwDoc* Reader::GetTemplateDoc(SwDoc& rDoc)
                     mxTemplate->SetOle2Link( Link<bool,void>() );
                     // always FALSE
                     mxTemplate->GetIDocumentUndoRedo().DoUndo( false );
-                    mxTemplate->getIDocumentSettingAccess().set(DocumentSettingId::BROWSE_MODE, bTmplBrowseMode );
+                    mxTemplate->getIDocumentSettingAccess().set(DocumentSettingId::BROWSE_MODE, m_bTemplateBrowseMode );
                     mxTemplate->RemoveAllFormatLanguageDependencies();
 
                     ReadXML->SetOrganizerMode( true );
@@ -518,7 +518,7 @@ SwDoc* Reader::GetTemplateDoc(SwDoc& rDoc)
             }
         }
 
-        OSL_ENSURE( !mxTemplate.is() || FStatHelper::IsDocument( aFileName ) || aTemplateNm=="$$Dummy$$",
+        OSL_ENSURE( !mxTemplate.is() || FStatHelper::IsDocument( aFileName ) || m_aTemplateName=="$$Dummy$$",
                 "TemplatePtr but no template exist!" );
     }
 
@@ -548,10 +548,10 @@ void Reader::ClearTemplate()
 
 void Reader::SetTemplateName( const OUString& rDir )
 {
-    if( !rDir.isEmpty() && aTemplateNm != rDir )
+    if( !rDir.isEmpty() && m_aTemplateName != rDir )
     {
         ClearTemplate();
-        aTemplateNm = rDir;
+        m_aTemplateName = rDir;
     }
 }
 
@@ -559,38 +559,38 @@ void Reader::MakeHTMLDummyTemplateDoc()
 {
     ClearTemplate();
     mxTemplate = new SwDoc;
-    mxTemplate->getIDocumentSettingAccess().set(DocumentSettingId::BROWSE_MODE, bTmplBrowseMode );
+    mxTemplate->getIDocumentSettingAccess().set(DocumentSettingId::BROWSE_MODE, m_bTemplateBrowseMode );
     mxTemplate->getIDocumentDeviceAccess().getPrinter( true );
     mxTemplate->RemoveAllFormatLanguageDependencies();
-    aChkDateTime = Date( 1, 1, 2300 );  // year 2300 should be sufficient
-    aTemplateNm = "$$Dummy$$";
+    m_aCheckDateTime = Date( 1, 1, 2300 );  // year 2300 should be sufficient
+    m_aTemplateName = "$$Dummy$$";
 }
 
 // Users that do not need to open these Streams / Storages,
 // have to override this method
 bool Reader::SetStrmStgPtr()
 {
-    OSL_ENSURE( pMedium, "Where is the Media??" );
+    OSL_ENSURE( m_pMedium, "Where is the Media??" );
 
-    if( pMedium->IsStorage() )
+    if( m_pMedium->IsStorage() )
     {
         if( SW_STORAGE_READER & GetReaderType() )
         {
-            xStg = pMedium->GetStorage();
+            m_xStorage = m_pMedium->GetStorage();
             return true;
         }
     }
     else
     {
-        pStrm = pMedium->GetInStream();
-        if ( pStrm && SotStorage::IsStorageFile(pStrm) && (SW_STORAGE_READER & GetReaderType()) )
+        m_pStream = m_pMedium->GetInStream();
+        if ( m_pStream && SotStorage::IsStorageFile(m_pStream) && (SW_STORAGE_READER & GetReaderType()) )
         {
-            pStg = new SotStorage( *pStrm );
-            pStrm = nullptr;
+            m_pStorage = new SotStorage( *m_pStream );
+            m_pStream = nullptr;
         }
         else if ( !(SW_STREAM_READER & GetReaderType()) )
         {
-            pStrm = nullptr;
+            m_pStream = nullptr;
             return false;
         }
 
@@ -641,13 +641,13 @@ bool SwReader::HasGlossaries( const Reader& rOptions )
 {
     // copy variables
     Reader* po = const_cast<Reader*>(&rOptions);
-    po->pStrm = pStrm;
-    po->pStg  = pStg;
-    po->bInsertMode = false;
+    po->m_pStream = pStrm;
+    po->m_pStorage  = pStg;
+    po->m_bInsertMode = false;
 
     // if a Medium is selected, get its Stream
     bool bRet = false;
-    if( !( nullptr != (po->pMedium = pMedium ) && !po->SetStrmStgPtr() ))
+    if( !( nullptr != (po->m_pMedium = pMedium ) && !po->SetStrmStgPtr() ))
         bRet = po->HasGlossaries();
     return bRet;
 }
@@ -657,13 +657,13 @@ bool SwReader::ReadGlossaries( const Reader& rOptions,
 {
     // copy variables
     Reader* po = const_cast<Reader*>(&rOptions);
-    po->pStrm = pStrm;
-    po->pStg  = pStg;
-    po->bInsertMode = false;
+    po->m_pStream = pStrm;
+    po->m_pStorage  = pStg;
+    po->m_bInsertMode = false;
 
     // if a Medium is selected, get its Stream
     bool bRet = false;
-    if( !( nullptr != (po->pMedium = pMedium ) && !po->SetStrmStgPtr() ))
+    if( !( nullptr != (po->m_pMedium = pMedium ) && !po->SetStrmStgPtr() ))
         bRet = po->ReadGlossaries( rBlocks, bSaveRelFiles );
     return bRet;
 }
diff --git a/sw/source/filter/docx/swdocxreader.cxx b/sw/source/filter/docx/swdocxreader.cxx
index 07bf6eaa6576..f62917904c77 100644
--- a/sw/source/filter/docx/swdocxreader.cxx
+++ b/sw/source/filter/docx/swdocxreader.cxx
@@ -51,7 +51,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT Reader* ImportDOCX()
 
 ErrCode SwDOCXReader::Read(SwDoc& rDoc, const OUString& /* rBaseURL */, SwPaM& rPam, const OUString& /* FileName */ )
 {
-    if (!pMedium->GetInStream())
+    if (!m_pMedium->GetInStream())
         return ERR_SWG_READ_ERROR;
 
     // We want to work in an empty paragraph.
@@ -69,7 +69,7 @@ ErrCode SwDOCXReader::Read(SwDoc& rDoc, const OUString& /* rBaseURL */, SwPaM& r
     xImporter->setTargetDocument(xDstDoc);
 
     const uno::Reference<text::XTextRange> xInsertTextRange = SwXTextRange::CreateXTextRange(rDoc, *rPam.GetPoint(), nullptr);
-    uno::Reference<io::XStream> xStream(new utl::OStreamWrapper(*pMedium->GetInStream()));
+    uno::Reference<io::XStream> xStream(new utl::OStreamWrapper(*m_pMedium->GetInStream()));
 
     //SetLoading hack because the document properties will be re-initted
     //by the xml filter and during the init, while its considered uninitialized,
@@ -129,7 +129,7 @@ bool SwDOCXReader::ReadGlossaries( SwTextBlocks& rBlocks, bool /* bSaveRelFiles
         uno::Reference<lang::XComponent> xDstDoc( xDocSh->GetModel(), uno::UNO_QUERY_THROW );
         xImporter->setTargetDocument( xDstDoc );
 
-        uno::Reference<io::XStream> xStream( new utl::OStreamWrapper( *pMedium->GetInStream() ) );
+        uno::Reference<io::XStream> xStream( new utl::OStreamWrapper( *m_pMedium->GetInStream() ) );
 
         uno::Sequence<beans::PropertyValue> aDescriptor( comphelper::InitPropertySequence({
                 { "InputStream", uno::Any(xStream) },
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 50fdbf6a4d0b..0e7be1b9ed5f 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -158,7 +158,7 @@ static HTMLOptionEnum<sal_uInt16> aHTMLSpacerTypeTable[] =
 
 HTMLReader::HTMLReader()
 {
-    bTmplBrowseMode = true;
+    m_bTemplateBrowseMode = true;
 }
 
 OUString HTMLReader::GetTemplateName(SwDoc& rDoc) const
@@ -189,11 +189,11 @@ OUString HTMLReader::GetTemplateName(SwDoc& rDoc) const
 
 bool HTMLReader::SetStrmStgPtr()
 {
-    OSL_ENSURE( pMedium, "Where is the medium??" );
+    OSL_ENSURE( m_pMedium, "Where is the medium??" );
 
-    if( pMedium->IsRemote() || !pMedium->IsStorage() )
+    if( m_pMedium->IsRemote() || !m_pMedium->IsStorage() )
     {
-        pStrm = pMedium->GetInStream();
+        m_pStream = m_pMedium->GetInStream();
         return true;
     }
     return false;
@@ -203,13 +203,13 @@ bool HTMLReader::SetStrmStgPtr()
 // Call for the general Reader-Interface
 ErrCode HTMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPam, const OUString & rName )
 {
-    if( !pStrm )
+    if( !m_pStream )
     {
-        OSL_ENSURE( pStrm, "HTML-Read without stream" );
+        OSL_ENSURE( m_pStream, "HTML-Read without stream" );
         return ERR_SWG_READ_ERROR;
     }
 
-    if( !bInsertMode )
+    if( !m_bInsertMode )
     {
         Reader::ResetFrameFormats( rDoc );
 
@@ -225,15 +225,15 @@ ErrCode HTMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPam, co
     // so nobody steals the document!
     rtl::Reference<SwDoc> aHoldRef(&rDoc);
     ErrCode nRet = ERRCODE_NONE;
-    tools::SvRef<SwHTMLParser> xParser = new SwHTMLParser( &rDoc, rPam, *pStrm,
-                                            rName, rBaseURL, !bInsertMode, pMedium,
+    tools::SvRef<SwHTMLParser> xParser = new SwHTMLParser( &rDoc, rPam, *m_pStream,
+                                            rName, rBaseURL, !m_bInsertMode, m_pMedium,
                                             IsReadUTF8(),
-                                            bIgnoreHTMLComments );
+                                            m_bIgnoreHTMLComments );
 
     SvParserState eState = xParser->CallParser();
 
     if( SvParserState::Pending == eState )
-        pStrm->ResetError();
+        m_pStream->ResetError();
     else if( SvParserState::Accepted != eState )
     {
         const OUString sErr(OUString::number(static_cast<sal_Int32>(xParser->GetLineNr()))
@@ -5607,7 +5607,7 @@ bool TestImportHTML(SvStream &rStream)
 {
     FontCacheGuard aFontCacheGuard;
     std::unique_ptr<Reader> xReader(new HTMLReader);
-    xReader->pStrm = &rStream;
+    xReader->m_pStream = &rStream;
 
     SwGlobals::ensure();
 
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index be23eeaeb0a2..12060f78fd87 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -47,7 +47,7 @@ class SwRTFReader : public Reader
 ErrCode SwRTFReader::Read(SwDoc& rDoc, const OUString& /*rBaseURL*/, SwPaM& rPam,
                           const OUString& /*rFileName*/)
 {
-    if (!pStrm)
+    if (!m_pStream)
         return ERR_SWG_READ_ERROR;
 
     // We want to work in an empty paragraph.
@@ -88,7 +88,8 @@ ErrCode SwRTFReader::Read(SwDoc& rDoc, const OUString& /*rBaseURL*/, SwPaM& rPam
 
     uno::Reference<document::XFilter> xFilter(xInterface, uno::UNO_QUERY_THROW);
     uno::Sequence<beans::PropertyValue> aDescriptor(comphelper::InitPropertySequence(
-        { { "InputStream", uno::Any(uno::Reference<io::XStream>(new utl::OStreamWrapper(*pStrm))) },
+        { { "InputStream",
+            uno::Any(uno::Reference<io::XStream>(new utl::OStreamWrapper(*m_pStream))) },
           { "InsertMode", uno::Any(true) },
           { "TextInsertModeRange", uno::Any(xInsertTextRange) } }));
     ErrCode ret = ERRCODE_NONE;
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 1b735a0b02a0..8e8d2f99bfd0 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -6195,7 +6195,7 @@ bool TestImportDOC(SvStream &rStream, const OUString &rFltName)
     std::unique_ptr<Reader> xReader(ImportDOC());
 
     tools::SvRef<SotStorage> xStorage;
-    xReader->pStrm = &rStream;
+    xReader->m_pStream = &rStream;
     if (rFltName != "WW6")
     {
         try
@@ -6208,7 +6208,7 @@ bool TestImportDOC(SvStream &rStream, const OUString &rFltName)
         {
             return false;
         }
-        xReader->pStg = xStorage.get();
+        xReader->m_pStorage = xStorage.get();
     }
     xReader->SetFltName(rFltName);
 
@@ -6246,8 +6246,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportWW2(SvStream &rStream)
 ErrCode WW8Reader::OpenMainStream( tools::SvRef<SotStorageStream>& rRef, sal_uInt16& rBuffSize )
 {
     ErrCode nRet = ERR_SWG_READ_ERROR;
-    OSL_ENSURE( pStg.get(), "Where is my Storage?" );
-    rRef = pStg->OpenSotStream( "WordDocument", StreamMode::READ | StreamMode::SHARE_DENYALL);
+    OSL_ENSURE( m_pStorage.get(), "Where is my Storage?" );
+    rRef = m_pStorage->OpenSotStream( "WordDocument", StreamMode::READ | StreamMode::SHARE_DENYALL);
 
     if( rRef.is() )
     {
@@ -6267,10 +6267,10 @@ ErrCode WW8Reader::OpenMainStream( tools::SvRef<SotStorageStream>& rRef, sal_uIn
 ErrCode WW8Reader::Read(SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, const OUString & /* FileName */)
 {
     sal_uInt16 nOldBuffSize = 32768;
-    bool bNew = !bInsertMode; // New Doc (no inserting)
+    bool bNew = !m_bInsertMode; // New Doc (no inserting)
 
     tools::SvRef<SotStorageStream> refStrm; // So that no one else can steal the Stream
-    SvStream* pIn = pStrm;
+    SvStream* pIn = m_pStream;
 
     ErrCode nRet = ERRCODE_NONE;
     sal_uInt8 nVersion = 8;
@@ -6278,7 +6278,7 @@ ErrCode WW8Reader::Read(SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, cons
     const OUString sFltName = GetFltName();
     if ( sFltName=="WW6" )
     {
-        if (pStrm)
+        if (m_pStream)
             nVersion = 6;
         else
         {
@@ -6293,7 +6293,7 @@ ErrCode WW8Reader::Read(SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, cons
         else if ( sFltName=="CWW7" )
             nVersion = 7;
 
-        if( pStg.is() )
+        if( m_pStorage.is() )
         {
             nRet = OpenMainStream( refStrm, nOldBuffSize );
             pIn = refStrm.get();
@@ -6307,8 +6307,8 @@ ErrCode WW8Reader::Read(SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, cons
 
     if( !nRet )
     {
-        std::unique_ptr<SwWW8ImplReader> pRdr(new SwWW8ImplReader(nVersion, pStg.get(), pIn, rDoc,
-            rBaseURL, bNew, bSkipImages, *rPaM.GetPoint()));
+        std::unique_ptr<SwWW8ImplReader> pRdr(new SwWW8ImplReader(nVersion, m_pStorage.get(), pIn, rDoc,
+            rBaseURL, bNew, m_bSkipImages, *rPaM.GetPoint()));
         if (bNew)
         {
             // Remove Frame and offsets from Frame Template
@@ -6361,7 +6361,7 @@ bool WW8Reader::ReadGlossaries(SwTextBlocks& rBlocks, bool bSaveRelFiles) const
     tools::SvRef<SotStorageStream> refStrm;
     if (!pThis->OpenMainStream(refStrm, nOldBuffSize))
     {
-        WW8Glossary aGloss( refStrm, 8, pStg.get() );
+        WW8Glossary aGloss( refStrm, 8, m_pStorage.get() );
         bRet = aGloss.Load( rBlocks, bSaveRelFiles );
     }
     return bRet;
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 5f5d9c0d4c0d..dfc4482de381 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -491,10 +491,10 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con
 
     // get the input stream (storage or stream)
     uno::Reference<embed::XStorage> xStorage;
-    if( pMedium )
-        xStorage = pMedium->GetStorage();
+    if( m_pMedium )
+        xStorage = m_pMedium->GetStorage();
     else
-        xStorage = xStg;
+        xStorage = m_xStorage;
 
     if( !xStorage.is() )
         return ERR_SWG_READ_ERROR;
@@ -666,38 +666,38 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con
                                 Any(xStatusIndicator) };
 
     // prepare for special modes
-    if( aOpt.IsFormatsOnly() )
+    if( m_aOption.IsFormatsOnly() )
     {
         sal_Int32 nCount =
-            (aOpt.IsFrameFormats() ? 1 : 0) +
-            (aOpt.IsPageDescs() ? 1 : 0) +
-            (aOpt.IsTextFormats() ? 2 : 0) +
-            (aOpt.IsNumRules() ? 1 : 0);
+            (m_aOption.IsFrameFormats() ? 1 : 0) +
+            (m_aOption.IsPageDescs() ? 1 : 0) +
+            (m_aOption.IsTextFormats() ? 2 : 0) +
+            (m_aOption.IsNumRules() ? 1 : 0);
 
         Sequence< OUString> aFamiliesSeq( nCount );
         OUString *pSeq = aFamiliesSeq.getArray();
-        if( aOpt.IsFrameFormats() )
+        if( m_aOption.IsFrameFormats() )
             // SfxStyleFamily::Frame;
             *pSeq++ = "FrameStyles";
-        if( aOpt.IsPageDescs() )
+        if( m_aOption.IsPageDescs() )
             // SfxStyleFamily::Page;
             *pSeq++ = "PageStyles";
-        if( aOpt.IsTextFormats() )
+        if( m_aOption.IsTextFormats() )
         {
             // (SfxStyleFamily::Char|SfxStyleFamily::Para);
             *pSeq++ = "CharacterStyles";
             *pSeq++ = "ParagraphStyles";
         }
-        if( aOpt.IsNumRules() )
+        if( m_aOption.IsNumRules() )
             // SfxStyleFamily::Pseudo;
             *pSeq++ = "NumberingStyles";
 
         xInfoSet->setPropertyValue( "StyleInsertModeFamilies",
                                     makeAny(aFamiliesSeq) );
 
-        xInfoSet->setPropertyValue( "StyleInsertModeOverwrite", makeAny(!aOpt.IsMerge()) );
+        xInfoSet->setPropertyValue( "StyleInsertModeOverwrite", makeAny(!m_aOption.IsMerge()) );
     }
-    else if( bInsertMode )
+    else if( m_bInsertMode )
     {
         const uno::Reference<text::XTextRange> xInsertTextRange =
             SwXTextRange::CreateXTextRange(rDoc, *rPaM.GetPoint(), nullptr);
@@ -722,7 +722,7 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con
     // Set base URI
     // there is ambiguity which medium should be used here
     // for now the own medium has a preference
-    SfxMedium* pMedDescrMedium = pMedium ? pMedium : pDocSh->GetMedium();
+    SfxMedium* pMedDescrMedium = m_pMedium ? m_pMedium : pDocSh->GetMedium();
     OSL_ENSURE( pMedDescrMedium, "There is no medium to get MediaDescriptor from!" );
 
     xInfoSet->setPropertyValue( "BaseURI", makeAny( rBaseURL ) );
@@ -782,8 +782,8 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con
     }
 
     ErrCode nWarnRDF = ERRCODE_NONE;
-    if ( !(IsOrganizerMode() || IsBlockMode() || aOpt.IsFormatsOnly() ||
-           bInsertMode) )
+    if ( !(IsOrganizerMode() || IsBlockMode() || m_aOption.IsFormatsOnly() ||
+           m_bInsertMode) )
     {
         // RDF metadata - must be read before styles/content
         // N.B.: embedded documents have their own manifest.rdf!
@@ -826,8 +826,8 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con
         aEmptyArgs, rName, false );
 
     ErrCode nWarn2 = ERRCODE_NONE;
-    if( !(IsOrganizerMode() || IsBlockMode() || aOpt.IsFormatsOnly() ||
-          bInsertMode) )
+    if( !(IsOrganizerMode() || IsBlockMode() || m_aOption.IsFormatsOnly() ||
+          m_bInsertMode) )
     {
         nWarn2 = ReadThroughComponent(
             xStorage, xModelComp, "settings.xml", nullptr, xContext,
@@ -842,15 +842,15 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con
                 : "com.sun.star.comp.Writer.XMLStylesImporter"),
         aFilterArgs, rName, true );
 
-    if( !nRet && !(IsOrganizerMode() || aOpt.IsFormatsOnly()) )
+    if( !nRet && !(IsOrganizerMode() || m_aOption.IsFormatsOnly()) )
         nRet = ReadThroughComponent(
            xStorage, xModelComp, "content.xml", "Content.xml", xContext,
             (bOASIS ? "com.sun.star.comp.Writer.XMLOasisContentImporter"
                     : "com.sun.star.comp.Writer.XMLContentImporter"),
            aFilterArgs, rName, true );
 
-    if( !(IsOrganizerMode() || IsBlockMode() || bInsertMode ||
-          aOpt.IsFormatsOnly() ) )
+    if( !(IsOrganizerMode() || IsBlockMode() || m_bInsertMode ||
+          m_aOption.IsFormatsOnly() ) )
     {
         try
         {
@@ -866,14 +866,14 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con
     }
 
     // Notify math objects
-    if( bInsertMode )
+    if( m_bInsertMode )
         rDoc.PrtOLENotify( false );
     else if ( rDoc.IsOLEPrtNotifyPending() )
         rDoc.PrtOLENotify( true );
 
     nRet = nRet ? nRet : (nWarn ? nWarn : (nWarn2 ? nWarn2 : nWarnRDF ) );
 
-    aOpt.ResetAllFormatsOnly();
+    m_aOption.ResetAllFormatsOnly();
 
     // redline password
     Any aAny = xInfoSet->getPropertyValue( sRedlineProtectionKey );
@@ -923,8 +923,8 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con
         //       has lost the information, that this certain style is related to
         //       the outline numbering rule.
         // #i70748# - only for templates
-        if ( pMedium && pMedium->GetFilter() &&
-             pMedium->GetFilter()->IsOwnTemplateFormat() )
+        if ( m_pMedium && m_pMedium->GetFilter() &&
+             m_pMedium->GetFilter()->IsOwnTemplateFormat() )
         {
             lcl_AdjustOutlineStylesForOOo( rDoc );
         }


More information about the Libreoffice-commits mailing list