diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-02-03 07:53:38 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-02-03 09:47:22 +0100 |
commit | 19be62a31d12999cf279f9e9d7b20d4cb40fd341 (patch) | |
tree | 5369db95112e95244f0827925932e79fe242b88f /sw | |
parent | 32cf800f88be1348bf0ad5297cf353566aeac790 (diff) |
sw: prefix members of StgWriter, SwAsciiOptions, SwReader and SwTextBlocks
See tdf#94879 for motivation.
Change-Id: I5e77069f678f39d52b3ece825bd2c0444fa40584
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87843
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/shellio.hxx | 70 | ||||
-rw-r--r-- | sw/source/core/swg/swblocks.cxx | 248 | ||||
-rw-r--r-- | sw/source/filter/basflt/fltini.cxx | 26 | ||||
-rw-r--r-- | sw/source/filter/basflt/shellio.cxx | 62 | ||||
-rw-r--r-- | sw/source/filter/writer/writer.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/xml/wrtxml.cxx | 20 |
6 files changed, 218 insertions, 218 deletions
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index ad174afb3d61..095dc77b6269 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -63,36 +63,36 @@ namespace com { namespace sun { namespace star { namespace embed { class XStorag class SW_DLLPUBLIC SwAsciiOptions { - OUString sFont; - rtl_TextEncoding eCharSet; - LanguageType nLanguage; - LineEnd eCRLF_Flag; - bool bIncludeBOM; // Whether to include a byte-order-mark in the output. + OUString m_sFont; + rtl_TextEncoding m_eCharSet; + LanguageType m_nLanguage; + LineEnd m_eCRLF_Flag; + bool m_bIncludeBOM; // Whether to include a byte-order-mark in the output. public: - const OUString& GetFontName() const { return sFont; } - void SetFontName( const OUString& rFont ) { sFont = rFont; } + const OUString& GetFontName() const { return m_sFont; } + void SetFontName( const OUString& rFont ) { m_sFont = rFont; } - rtl_TextEncoding GetCharSet() const { return eCharSet; } - void SetCharSet( rtl_TextEncoding nVal ) { eCharSet = nVal; } + rtl_TextEncoding GetCharSet() const { return m_eCharSet; } + void SetCharSet( rtl_TextEncoding nVal ) { m_eCharSet = nVal; } - LanguageType GetLanguage() const { return nLanguage; } - void SetLanguage( LanguageType nVal ) { nLanguage = nVal; } + LanguageType GetLanguage() const { return m_nLanguage; } + void SetLanguage( LanguageType nVal ) { m_nLanguage = nVal; } - LineEnd GetParaFlags() const { return eCRLF_Flag; } - void SetParaFlags( LineEnd eVal ) { eCRLF_Flag = eVal; } + LineEnd GetParaFlags() const { return m_eCRLF_Flag; } + void SetParaFlags( LineEnd eVal ) { m_eCRLF_Flag = eVal; } - bool GetIncludeBOM() const { return bIncludeBOM; } - void SetIncludeBOM( bool bVal ) { bIncludeBOM = bVal; } + bool GetIncludeBOM() const { return m_bIncludeBOM; } + void SetIncludeBOM( bool bVal ) { m_bIncludeBOM = bVal; } void Reset() { - sFont.clear(); - eCRLF_Flag = GetSystemLineEnd(); - eCharSet = ::osl_getThreadTextEncoding(); - nLanguage = LANGUAGE_SYSTEM; - bIncludeBOM = true; + m_sFont.clear(); + m_eCRLF_Flag = GetSystemLineEnd(); + m_eCharSet = ::osl_getThreadTextEncoding(); + m_nLanguage = LANGUAGE_SYSTEM; + m_bIncludeBOM = true; } // for the automatic conversion (mail/news/...) void ReadUserData( const OUString& ); @@ -149,14 +149,14 @@ public: // Calls reader with its options, document, cursor etc. class SW_DLLPUBLIC SwReader: public SwDocFac { - SvStream* pStrm; - tools::SvRef<SotStorage> const pStg; - css::uno::Reference < css::embed::XStorage > xStg; - SfxMedium* const pMedium; // Who wants to obtain a Medium (W4W). - - SwPaM* const pCursor; - OUString const aFileName; - OUString sBaseURL; + SvStream* mpStrm; + tools::SvRef<SotStorage> const mpStg; + css::uno::Reference < css::embed::XStorage > mxStg; + SfxMedium* const mpMedium; // Who wants to obtain a Medium (W4W). + + SwPaM* const mpCursor; + OUString const maFileName; + OUString msBaseURL; bool mbSkipImages; public: @@ -180,7 +180,7 @@ public: bool ReadGlossaries( const Reader&, SwTextBlocks&, bool bSaveRelFiles ); protected: - void SetBaseURL( const OUString& rURL ) { sBaseURL = rURL; } + void SetBaseURL( const OUString& rURL ) { msBaseURL = rURL; } void SetSkipImages( bool bSkipImages ) { mbSkipImages = bSkipImages; } }; @@ -311,8 +311,8 @@ class SwImpBlocks; class SW_DLLPUBLIC SwTextBlocks { - std::unique_ptr<SwImpBlocks> pImp; - ErrCode nErr; + std::unique_ptr<SwImpBlocks> m_pImp; + ErrCode m_nErr; public: SwTextBlocks( const OUString& ); @@ -322,7 +322,7 @@ public: void ClearDoc(); // Delete Doc-contents. OUString GetName() const; void SetName( const OUString& ); - ErrCode const & GetError() const { return nErr; } + ErrCode const & GetError() const { return m_nErr; } OUString GetBaseURL() const; void SetBaseURL( const OUString& rURL ); @@ -479,8 +479,8 @@ typedef tools::SvRef<Writer> WriterRef; class SW_DLLPUBLIC StgWriter : public Writer { protected: - tools::SvRef<SotStorage> pStg; - css::uno::Reference < css::embed::XStorage > xStg; + tools::SvRef<SotStorage> m_pStg; + css::uno::Reference < css::embed::XStorage > m_xStg; // Create error at call. virtual ErrCode WriteStream() override; @@ -497,7 +497,7 @@ public: virtual ErrCode Write( SwPaM&, const css::uno::Reference < css::embed::XStorage >&, const OUString*, SfxMedium* = nullptr ) override; virtual ErrCode Write( SwPaM&, SotStorage&, const OUString* ) override; - SotStorage& GetStorage() const { return *pStg; } + SotStorage& GetStorage() const { return *m_pStg; } }; // Interface class for general access on special writers. diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx index 7f56710677bc..803c1bb0b48b 100644 --- a/sw/source/core/swg/swblocks.cxx +++ b/sw/source/core/swg/swblocks.cxx @@ -221,18 +221,18 @@ bool SwImpBlocks::PutMuchEntries( bool ) } SwTextBlocks::SwTextBlocks( const OUString& rFile ) - : nErr( 0 ) + : m_nErr( 0 ) { INetURLObject aObj(rFile); const OUString sFileName = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ); switch( SwImpBlocks::GetFileType( rFile ) ) { - case SwImpBlocks::FileType::XML: pImp.reset( new SwXMLTextBlocks( sFileName ) ); break; - case SwImpBlocks::FileType::NoFile: pImp.reset( new SwXMLTextBlocks( sFileName ) ); break; + case SwImpBlocks::FileType::XML: m_pImp.reset( new SwXMLTextBlocks( sFileName ) ); break; + case SwImpBlocks::FileType::NoFile: m_pImp.reset( new SwXMLTextBlocks( sFileName ) ); break; default: break; } - if( !pImp ) - nErr = ERR_SWG_FILE_FORMAT_ERROR; + if( !m_pImp ) + m_nErr = ERR_SWG_FILE_FORMAT_ERROR; } SwTextBlocks::~SwTextBlocks() @@ -241,75 +241,75 @@ SwTextBlocks::~SwTextBlocks() OUString SwTextBlocks::GetName() const { - return pImp ? pImp->m_aName : OUString(); + return m_pImp ? m_pImp->m_aName : OUString(); } void SwTextBlocks::SetName( const OUString& r ) { - if( pImp ) - pImp->SetName( r ); + if( m_pImp ) + m_pImp->SetName( r ); } sal_uInt16 SwTextBlocks::GetCount() const { - return pImp ? pImp->GetCount() : 0; + return m_pImp ? m_pImp->GetCount() : 0; } sal_uInt16 SwTextBlocks::GetIndex( const OUString& r ) const { - return pImp ? pImp->GetIndex( r ) : USHRT_MAX; + return m_pImp ? m_pImp->GetIndex( r ) : USHRT_MAX; } sal_uInt16 SwTextBlocks::GetLongIndex( const OUString& r ) const { - return pImp ? pImp->GetLongIndex( r ) : USHRT_MAX; + return m_pImp ? m_pImp->GetLongIndex( r ) : USHRT_MAX; } OUString SwTextBlocks::GetShortName( sal_uInt16 n ) const { - if( pImp ) - return pImp->GetShortName( n ); + if( m_pImp ) + return m_pImp->GetShortName( n ); return OUString(); } OUString SwTextBlocks::GetLongName( sal_uInt16 n ) const { - if( pImp ) - return pImp->GetLongName( n ); + if( m_pImp ) + return m_pImp->GetLongName( n ); return OUString(); } bool SwTextBlocks::Delete( sal_uInt16 n ) { - if( pImp && !pImp->m_bInPutMuchBlocks ) + if( m_pImp && !m_pImp->m_bInPutMuchBlocks ) { - if( pImp->IsFileChanged() ) - nErr = ERR_TXTBLOCK_NEWFILE_ERROR; - else if( ERRCODE_NONE == (nErr = pImp->OpenFile( false ) )) + if( m_pImp->IsFileChanged() ) + m_nErr = ERR_TXTBLOCK_NEWFILE_ERROR; + else if( ERRCODE_NONE == (m_nErr = m_pImp->OpenFile( false ) )) { - nErr = pImp->Delete( n ); - if( !nErr ) + m_nErr = m_pImp->Delete( n ); + if( !m_nErr ) { - pImp->m_aNames.erase( pImp->m_aNames.begin() + n ); + m_pImp->m_aNames.erase( m_pImp->m_aNames.begin() + n ); } - if( n == pImp->m_nCurrentIndex ) - pImp->m_nCurrentIndex = USHRT_MAX; - if( !nErr ) - nErr = pImp->MakeBlockList(); + if( n == m_pImp->m_nCurrentIndex ) + m_pImp->m_nCurrentIndex = USHRT_MAX; + if( !m_nErr ) + m_nErr = m_pImp->MakeBlockList(); } - pImp->CloseFile(); - pImp->Touch(); + m_pImp->CloseFile(); + m_pImp->Touch(); - return ( nErr == ERRCODE_NONE ); + return ( m_nErr == ERRCODE_NONE ); } return false; } void SwTextBlocks::Rename( sal_uInt16 n, const OUString* s, const OUString* l ) { - if( pImp && !pImp->m_bInPutMuchBlocks ) + if( m_pImp && !m_pImp->m_bInPutMuchBlocks ) { - pImp->m_nCurrentIndex = USHRT_MAX; + m_pImp->m_nCurrentIndex = USHRT_MAX; OUString aNew; OUString aLong; if( s ) @@ -319,105 +319,105 @@ void SwTextBlocks::Rename( sal_uInt16 n, const OUString* s, const OUString* l ) if( aNew.isEmpty() ) { OSL_ENSURE( false, "No short name provided in the rename" ); - nErr = ERR_SWG_INTERNAL_ERROR; + m_nErr = ERR_SWG_INTERNAL_ERROR; return; } - if( pImp->IsFileChanged() ) - nErr = ERR_TXTBLOCK_NEWFILE_ERROR; - else if( ERRCODE_NONE == ( nErr = pImp->OpenFile( false ))) + if( m_pImp->IsFileChanged() ) + m_nErr = ERR_TXTBLOCK_NEWFILE_ERROR; + else if( ERRCODE_NONE == ( m_nErr = m_pImp->OpenFile( false ))) { // Set the new entry in the list before we do that! aNew = GetAppCharClass().uppercase( aNew ); - nErr = pImp->Rename( n, aNew ); - if( !nErr ) + m_nErr = m_pImp->Rename( n, aNew ); + if( !m_nErr ) { - bool bOnlyText = pImp->m_aNames[ n ]->bIsOnlyText; - pImp->m_aNames.erase( pImp->m_aNames.begin() + n ); - pImp->AddName( aNew, aLong, bOnlyText ); - nErr = pImp->MakeBlockList(); + bool bOnlyText = m_pImp->m_aNames[ n ]->bIsOnlyText; + m_pImp->m_aNames.erase( m_pImp->m_aNames.begin() + n ); + m_pImp->AddName( aNew, aLong, bOnlyText ); + m_nErr = m_pImp->MakeBlockList(); } } - pImp->CloseFile(); - pImp->Touch(); + m_pImp->CloseFile(); + m_pImp->Touch(); } } bool SwTextBlocks::BeginGetDoc( sal_uInt16 n ) { - if( pImp && !pImp->m_bInPutMuchBlocks ) + if( m_pImp && !m_pImp->m_bInPutMuchBlocks ) { - if( pImp->IsFileChanged() ) - nErr = ERR_TXTBLOCK_NEWFILE_ERROR; - else if( ERRCODE_NONE == ( nErr = pImp->OpenFile())) + if( m_pImp->IsFileChanged() ) + m_nErr = ERR_TXTBLOCK_NEWFILE_ERROR; + else if( ERRCODE_NONE == ( m_nErr = m_pImp->OpenFile())) { - pImp->ClearDoc(); - nErr = pImp->GetDoc( n ); - if( nErr ) - pImp->m_nCurrentIndex = USHRT_MAX; + m_pImp->ClearDoc(); + m_nErr = m_pImp->GetDoc( n ); + if( m_nErr ) + m_pImp->m_nCurrentIndex = USHRT_MAX; else - pImp->m_nCurrentIndex = n; + m_pImp->m_nCurrentIndex = n; } - return ( nErr == ERRCODE_NONE ); + return ( m_nErr == ERRCODE_NONE ); } return false; } void SwTextBlocks::EndGetDoc() { - if( pImp && !pImp->m_bInPutMuchBlocks ) - pImp->CloseFile(); + if( m_pImp && !m_pImp->m_bInPutMuchBlocks ) + m_pImp->CloseFile(); } bool SwTextBlocks::BeginPutDoc( const OUString& s, const OUString& l ) { - if( pImp ) + if( m_pImp ) { - bool bOk = pImp->m_bInPutMuchBlocks; + bool bOk = m_pImp->m_bInPutMuchBlocks; if( !bOk ) { - if( pImp->IsFileChanged() ) - nErr = ERR_TXTBLOCK_NEWFILE_ERROR; + if( m_pImp->IsFileChanged() ) + m_nErr = ERR_TXTBLOCK_NEWFILE_ERROR; else - nErr = pImp->OpenFile( false ); - bOk = ERRCODE_NONE == nErr; + m_nErr = m_pImp->OpenFile( false ); + bOk = ERRCODE_NONE == m_nErr; } if( bOk ) { const OUString aNew = GetAppCharClass().uppercase(s); - nErr = pImp->BeginPutDoc( aNew, l ); + m_nErr = m_pImp->BeginPutDoc( aNew, l ); } - if( nErr ) - pImp->CloseFile(); + if( m_nErr ) + m_pImp->CloseFile(); } - return ERRCODE_NONE == nErr; + return ERRCODE_NONE == m_nErr; } sal_uInt16 SwTextBlocks::PutDoc() { sal_uInt16 nIdx = USHRT_MAX; - if( pImp ) + if( m_pImp ) { - nErr = pImp->PutDoc(); - if( !nErr ) + m_nErr = m_pImp->PutDoc(); + if( !m_nErr ) { - pImp->m_nCurrentIndex = GetIndex( pImp->m_aShort ); - if( pImp->m_nCurrentIndex != USHRT_MAX ) - pImp->m_aNames[ pImp->m_nCurrentIndex ]->aLong = pImp->m_aLong; + m_pImp->m_nCurrentIndex = GetIndex( m_pImp->m_aShort ); + if( m_pImp->m_nCurrentIndex != USHRT_MAX ) + m_pImp->m_aNames[ m_pImp->m_nCurrentIndex ]->aLong = m_pImp->m_aLong; else { - pImp->AddName( pImp->m_aShort, pImp->m_aLong ); - pImp->m_nCurrentIndex = pImp->GetIndex( pImp->m_aShort ); + m_pImp->AddName( m_pImp->m_aShort, m_pImp->m_aLong ); + m_pImp->m_nCurrentIndex = m_pImp->GetIndex( m_pImp->m_aShort ); } - if( !pImp->m_bInPutMuchBlocks ) - nErr = pImp->MakeBlockList(); + if( !m_pImp->m_bInPutMuchBlocks ) + m_nErr = m_pImp->MakeBlockList(); } - if( !pImp->m_bInPutMuchBlocks ) + if( !m_pImp->m_bInPutMuchBlocks ) { - pImp->CloseFile(); - pImp->Touch(); + m_pImp->CloseFile(); + m_pImp->Touch(); } - nIdx = pImp->m_nCurrentIndex; + nIdx = m_pImp->m_nCurrentIndex; } return nIdx; } @@ -426,40 +426,40 @@ sal_uInt16 SwTextBlocks::PutText( const OUString& rShort, const OUString& rName, const OUString& rText ) { sal_uInt16 nIdx = USHRT_MAX; - if( pImp ) + if( m_pImp ) { - bool bOk = pImp->m_bInPutMuchBlocks; + bool bOk = m_pImp->m_bInPutMuchBlocks; if( !bOk ) { - if( pImp->IsFileChanged() ) - nErr = ERR_TXTBLOCK_NEWFILE_ERROR; + if( m_pImp->IsFileChanged() ) + m_nErr = ERR_TXTBLOCK_NEWFILE_ERROR; else - nErr = pImp->OpenFile( false ); - bOk = ERRCODE_NONE == nErr; + m_nErr = m_pImp->OpenFile( false ); + bOk = ERRCODE_NONE == m_nErr; } if( bOk ) { OUString aNew = GetAppCharClass().uppercase( rShort ); - nErr = pImp->PutText( aNew, rName, rText ); - pImp->m_nCurrentIndex = USHRT_MAX; - if( !nErr ) + m_nErr = m_pImp->PutText( aNew, rName, rText ); + m_pImp->m_nCurrentIndex = USHRT_MAX; + if( !m_nErr ) { - nIdx = GetIndex( pImp->m_aShort ); + nIdx = GetIndex( m_pImp->m_aShort ); if( nIdx != USHRT_MAX ) - pImp->m_aNames[ nIdx ]->aLong = rName; + m_pImp->m_aNames[ nIdx ]->aLong = rName; else { - pImp->AddName( pImp->m_aShort, rName, true ); - nIdx = pImp->GetIndex( pImp->m_aShort ); + m_pImp->AddName( m_pImp->m_aShort, rName, true ); + nIdx = m_pImp->GetIndex( m_pImp->m_aShort ); } - if( !pImp->m_bInPutMuchBlocks ) - nErr = pImp->MakeBlockList(); + if( !m_pImp->m_bInPutMuchBlocks ) + m_nErr = m_pImp->MakeBlockList(); } } - if( !pImp->m_bInPutMuchBlocks ) + if( !m_pImp->m_bInPutMuchBlocks ) { - pImp->CloseFile(); - pImp->Touch(); + m_pImp->CloseFile(); + m_pImp->Touch(); } } return nIdx; @@ -467,42 +467,42 @@ sal_uInt16 SwTextBlocks::PutText( const OUString& rShort, const OUString& rName, SwDoc* SwTextBlocks::GetDoc() { - if( pImp ) - return pImp->m_xDoc.get(); + if( m_pImp ) + return m_pImp->m_xDoc.get(); return nullptr; } void SwTextBlocks::ClearDoc() { - if( pImp ) + if( m_pImp ) { - pImp->ClearDoc(); - pImp->m_nCurrentIndex = USHRT_MAX; + m_pImp->ClearDoc(); + m_pImp->m_nCurrentIndex = USHRT_MAX; } } OUString const & SwTextBlocks::GetFileName() const { - return pImp->GetFileName(); + return m_pImp->GetFileName(); } bool SwTextBlocks::IsReadOnly() const { - return pImp->m_bReadOnly; + return m_pImp->m_bReadOnly; } bool SwTextBlocks::IsOnlyTextBlock( sal_uInt16 nIdx ) const { bool bRet = false; - if( pImp && !pImp->m_bInPutMuchBlocks ) + if( m_pImp && !m_pImp->m_bInPutMuchBlocks ) { - SwBlockName* pBlkNm = pImp->m_aNames[ nIdx ].get(); + SwBlockName* pBlkNm = m_pImp->m_aNames[ nIdx ].get(); if( !pBlkNm->bIsOnlyTextFlagInit && - !pImp->IsFileChanged() && !pImp->OpenFile() ) + !m_pImp->IsFileChanged() && !m_pImp->OpenFile() ) { - pBlkNm->bIsOnlyText = pImp->IsOnlyTextBlock( pBlkNm->aShort ); + pBlkNm->bIsOnlyText = m_pImp->IsOnlyTextBlock( pBlkNm->aShort ); pBlkNm->bIsOnlyTextFlagInit = true; - pImp->CloseFile(); + m_pImp->CloseFile(); } bRet = pBlkNm->bIsOnlyText; } @@ -511,11 +511,11 @@ bool SwTextBlocks::IsOnlyTextBlock( sal_uInt16 nIdx ) const bool SwTextBlocks::IsOnlyTextBlock( const OUString& rShort ) const { - sal_uInt16 nIdx = pImp->GetIndex( rShort ); + sal_uInt16 nIdx = m_pImp->GetIndex( rShort ); if( USHRT_MAX != nIdx ) { - if( pImp->m_aNames[ nIdx ]->bIsOnlyTextFlagInit ) - return pImp->m_aNames[ nIdx ]->bIsOnlyText; + if( m_pImp->m_aNames[ nIdx ]->bIsOnlyTextFlagInit ) + return m_pImp->m_aNames[ nIdx ]->bIsOnlyText; return IsOnlyTextBlock( nIdx ); } @@ -526,44 +526,44 @@ bool SwTextBlocks::IsOnlyTextBlock( const OUString& rShort ) const bool SwTextBlocks::GetMacroTable( sal_uInt16 nIdx, SvxMacroTableDtor& rMacroTable ) { bool bRet = true; - if ( pImp && !pImp->m_bInPutMuchBlocks ) - bRet = ( ERRCODE_NONE == pImp->GetMacroTable( nIdx, rMacroTable ) ); + if ( m_pImp && !m_pImp->m_bInPutMuchBlocks ) + bRet = ( ERRCODE_NONE == m_pImp->GetMacroTable( nIdx, rMacroTable ) ); return bRet; } bool SwTextBlocks::SetMacroTable( sal_uInt16 nIdx, const SvxMacroTableDtor& rMacroTable ) { bool bRet = true; - if ( pImp && !pImp->m_bInPutMuchBlocks ) - bRet = ( ERRCODE_NONE == pImp->SetMacroTable( nIdx, rMacroTable ) ); + if ( m_pImp && !m_pImp->m_bInPutMuchBlocks ) + bRet = ( ERRCODE_NONE == m_pImp->SetMacroTable( nIdx, rMacroTable ) ); return bRet; } bool SwTextBlocks::StartPutMuchBlockEntries() { bool bRet = false; - if( pImp ) - bRet = pImp->PutMuchEntries( true ); + if( m_pImp ) + bRet = m_pImp->PutMuchEntries( true ); return bRet; } void SwTextBlocks::EndPutMuchBlockEntries() { - if( pImp ) - pImp->PutMuchEntries( false ); + if( m_pImp ) + m_pImp->PutMuchEntries( false ); } OUString SwTextBlocks::GetBaseURL() const { - if(pImp) - return pImp->GetBaseURL(); + if(m_pImp) + return m_pImp->GetBaseURL(); return OUString(); } void SwTextBlocks::SetBaseURL( const OUString& rURL ) { - if(pImp) - pImp->SetBaseURL(rURL); + if(m_pImp) + m_pImp->SetBaseURL(rURL); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index eb89e87ffea1..9ff97e447f9a 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -565,31 +565,31 @@ void SwAsciiOptions::ReadUserData( const OUString& rStr ) sal_Int32 nToken = 0; OUString sToken = rStr.getToken(0, ',', nToken); // 1. Charset name if (!sToken.isEmpty()) - eCharSet = CharSetFromName(sToken); + m_eCharSet = CharSetFromName(sToken); if (nToken >= 0 && !(sToken = rStr.getToken(0, ',', nToken)).isEmpty()) // 2. Line ending type { if (sToken.equalsIgnoreAsciiCase("CRLF")) - eCRLF_Flag = LINEEND_CRLF; + m_eCRLF_Flag = LINEEND_CRLF; else if (sToken.equalsIgnoreAsciiCase("LF")) - eCRLF_Flag = LINEEND_LF; + m_eCRLF_Flag = LINEEND_LF; else - eCRLF_Flag = LINEEND_CR; + m_eCRLF_Flag = LINEEND_CR; } if (nToken >= 0 && !(sToken = rStr.getToken(0, ',', nToken)).isEmpty()) // 3. Font name - sFont = sToken; + m_sFont = sToken; if (nToken >= 0 && !(sToken = rStr.getToken(0, ',', nToken)).isEmpty()) // 4. Language tag - nLanguage = LanguageTag::convertToLanguageTypeWithFallback(sToken); + m_nLanguage = LanguageTag::convertToLanguageTypeWithFallback(sToken); if (nToken >= 0 && !(sToken = rStr.getToken(0, ',', nToken)).isEmpty()) // 5. Include BOM? - bIncludeBOM = !(sToken.equalsIgnoreAsciiCase("FALSE")); + m_bIncludeBOM = !(sToken.equalsIgnoreAsciiCase("FALSE")); } void SwAsciiOptions::WriteUserData(OUString& rStr) { // 1. charset - rStr = NameFromCharSet(eCharSet) + ","; + rStr = NameFromCharSet(m_eCharSet) + ","; // 2. LineEnd - switch(eCRLF_Flag) + switch(m_eCRLF_Flag) { case LINEEND_CRLF: rStr += "CRLF"; @@ -604,17 +604,17 @@ void SwAsciiOptions::WriteUserData(OUString& rStr) rStr += ","; // 3. Fontname - rStr += sFont + ","; + rStr += m_sFont + ","; // 4. Language - if (nLanguage) + if (m_nLanguage) { - rStr += LanguageTag::convertToBcp47(nLanguage); + rStr += LanguageTag::convertToBcp47(m_nLanguage); } rStr += ","; // 5. Whether to include byte-order-mark - if( bIncludeBOM ) + if( m_bIncludeBOM ) { rStr += "true"; } diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index d26214c43c44..25568a51ad32 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -75,14 +75,14 @@ ErrCode SwReader::Read( const Reader& rOptions ) { // copy variables Reader* po = const_cast<Reader*>(&rOptions); - po->m_pStream = pStrm; - po->m_pStorage = pStg; - po->m_xStorage = xStg; - po->m_bInsertMode = nullptr != pCursor; + po->m_pStream = mpStrm; + po->m_pStorage = mpStg; + po->m_xStorage = mxStg; + po->m_bInsertMode = nullptr != mpCursor; po->m_bSkipImages = mbSkipImages; // if a Medium is selected, get its Stream - if( nullptr != (po->m_pMedium = pMedium ) && + if( nullptr != (po->m_pMedium = mpMedium ) && !po->SetStrmStgPtr() ) { po->SetReadUTF8( false ); @@ -104,8 +104,8 @@ ErrCode SwReader::Read( const Reader& rOptions ) mxDoc->SetInXMLImport( dynamic_cast< XMLReader* >(po) != nullptr ); SwPaM *pPam; - if( pCursor ) - pPam = pCursor; + if( mpCursor ) + pPam = mpCursor; else { // if the Reader was not called by a Shell, create a PaM ourselves @@ -123,7 +123,7 @@ ErrCode SwReader::Read( const Reader& rOptions ) bool bReadPageDescs = false; bool const bDocUndo = mxDoc->GetIDocumentUndoRedo().DoesUndo(); - bool bSaveUndo = bDocUndo && pCursor; + bool bSaveUndo = bDocUndo && mpCursor; if( bSaveUndo ) { // the reading of the page template cannot be undone! @@ -160,7 +160,7 @@ ErrCode SwReader::Read( const Reader& rOptions ) mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::Ignore ); std::unique_ptr<SwPaM> pUndoPam; - if( bDocUndo || pCursor ) + if( bDocUndo || mpCursor ) { // set Pam to the previous node, so that it is not also moved const SwNodeIndex& rTmp = pPam->GetPoint()->nNode; @@ -168,7 +168,7 @@ ErrCode SwReader::Read( const Reader& rOptions ) } // store for now all Fly's - if( pCursor ) + if( mpCursor ) { std::copy(mxDoc->GetSpzFrameFormats()->begin(), mxDoc->GetSpzFrameFormats()->end(), std::back_inserter(aFlyFrameArr)); @@ -183,7 +183,7 @@ ErrCode SwReader::Read( const Reader& rOptions ) mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld ); - nError = po->Read( *mxDoc, sBaseURL, *pPam, aFileName ); + nError = po->Read( *mxDoc, msBaseURL, *pPam, maFileName ); // an ODF document may contain redline mode in settings.xml; save it! ePostReadRedlineFlags = mxDoc->getIDocumentRedlineAccess().GetRedlineFlags(); @@ -216,7 +216,7 @@ ErrCode SwReader::Read( const Reader& rOptions ) } } - if( pCursor ) + if( mpCursor ) { *pUndoPam->GetMark() = *pPam->GetPoint(); ++pUndoPam->GetPoint()->nNode; @@ -277,7 +277,7 @@ ErrCode SwReader::Read( const Reader& rOptions ) { pFrameFormat->MakeFrames(); } - else if( pCursor ) + else if( mpCursor ) { mxDoc->SetContainsAtPageObjWithContentAnchor( true ); } @@ -323,10 +323,10 @@ ErrCode SwReader::Read( const Reader& rOptions ) * When Seeking, the current Status-, EOF- and bad-Bit is set; * nobody knows why */ - if( pStrm ) + if( mpStrm ) { - pStrm->Seek(0); - pStrm->ResetError(); + mpStrm->Seek(0); + mpStrm->ResetError(); } } @@ -356,7 +356,7 @@ ErrCode SwReader::Read( const Reader& rOptions ) } // delete Pam if it was created only for reading - if( !pCursor ) + if( !mpCursor ) { delete pPam; // open a new one @@ -374,7 +374,7 @@ ErrCode SwReader::Read( const Reader& rOptions ) mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld ); mxDoc->SetOle2Link( aOLELink ); - if( pCursor ) // the document is now modified + if( mpCursor ) // the document is now modified mxDoc->getIDocumentState().SetModified(); // #i38810# - If links have been updated, the document // have to be modified. During update of links the OLE link at the document @@ -395,8 +395,8 @@ ErrCode SwReader::Read( const Reader& rOptions ) SwReader::SwReader(SfxMedium& rMedium, const OUString& rFileName, SwDoc *pDocument) - : SwDocFac(pDocument), pStrm(nullptr), pMedium(&rMedium), pCursor(nullptr), - aFileName(rFileName), mbSkipImages(false) + : SwDocFac(pDocument), mpStrm(nullptr), mpMedium(&rMedium), mpCursor(nullptr), + maFileName(rFileName), mbSkipImages(false) { SetBaseURL( rMedium.GetBaseURL() ); SetSkipImages( rMedium.IsSkipImages() ); @@ -405,21 +405,21 @@ SwReader::SwReader(SfxMedium& rMedium, const OUString& rFileName, SwDoc *pDocume // Read into an existing document SwReader::SwReader(SvStream& rStrm, const OUString& rFileName, const OUString& rBaseURL, SwPaM& rPam) - : SwDocFac(rPam.GetDoc()), pStrm(&rStrm), pMedium(nullptr), pCursor(&rPam), - aFileName(rFileName), mbSkipImages(false) + : SwDocFac(rPam.GetDoc()), mpStrm(&rStrm), mpMedium(nullptr), mpCursor(&rPam), + maFileName(rFileName), mbSkipImages(false) { SetBaseURL( rBaseURL ); } SwReader::SwReader(SfxMedium& rMedium, const OUString& rFileName, SwPaM& rPam) - : SwDocFac(rPam.GetDoc()), pStrm(nullptr), pMedium(&rMedium), - pCursor(&rPam), aFileName(rFileName), mbSkipImages(false) + : SwDocFac(rPam.GetDoc()), mpStrm(nullptr), mpMedium(&rMedium), + mpCursor(&rPam), maFileName(rFileName), mbSkipImages(false) { SetBaseURL( rMedium.GetBaseURL() ); } SwReader::SwReader( const uno::Reference < embed::XStorage > &rStg, const OUString& rFilename, SwPaM &rPam ) - : SwDocFac(rPam.GetDoc()), pStrm(nullptr), xStg( rStg ), pMedium(nullptr), pCursor(&rPam), aFileName(rFilename), mbSkipImages(false) + : SwDocFac(rPam.GetDoc()), mpStrm(nullptr), mxStg( rStg ), mpMedium(nullptr), mpCursor(&rPam), maFileName(rFilename), mbSkipImages(false) { } @@ -636,13 +636,13 @@ bool SwReader::HasGlossaries( const Reader& rOptions ) { // copy variables Reader* po = const_cast<Reader*>(&rOptions); - po->m_pStream = pStrm; - po->m_pStorage = pStg; + po->m_pStream = mpStrm; + po->m_pStorage = mpStg; po->m_bInsertMode = false; // if a Medium is selected, get its Stream bool bRet = false; - if( nullptr == (po->m_pMedium = pMedium ) || po->SetStrmStgPtr() ) + if( nullptr == (po->m_pMedium = mpMedium ) || po->SetStrmStgPtr() ) bRet = po->HasGlossaries(); return bRet; } @@ -652,13 +652,13 @@ bool SwReader::ReadGlossaries( const Reader& rOptions, { // copy variables Reader* po = const_cast<Reader*>(&rOptions); - po->m_pStream = pStrm; - po->m_pStorage = pStg; + po->m_pStream = mpStrm; + po->m_pStorage = mpStg; po->m_bInsertMode = false; // if a Medium is selected, get its Stream bool bRet = false; - if( nullptr == (po->m_pMedium = pMedium ) || po->SetStrmStgPtr() ) + if( nullptr == (po->m_pMedium = mpMedium ) || po->SetStrmStgPtr() ) bRet = po->ReadGlossaries( rBlocks, bSaveRelFiles ); return bRet; } diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index bb761851da6c..501bd8099059 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -492,7 +492,7 @@ ErrCode StgWriter::WriteStream() ErrCode StgWriter::Write( SwPaM& rPaM, SotStorage& rStg, const OUString* pFName ) { SetStream(nullptr); - pStg = &rStg; + m_pStg = &rStg; m_pDoc = rPaM.GetDoc(); m_pOrigFileName = pFName; @@ -505,7 +505,7 @@ ErrCode StgWriter::Write( SwPaM& rPaM, SotStorage& rStg, const OUString* pFName ErrCode nRet = WriteStorage(); - pStg = nullptr; + m_pStg = nullptr; ResetWriter(); return nRet; @@ -514,8 +514,8 @@ ErrCode StgWriter::Write( SwPaM& rPaM, SotStorage& rStg, const OUString* pFName ErrCode StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage >& rStg, const OUString* pFName, SfxMedium* pMedium ) { SetStream(nullptr); - pStg = nullptr; - xStg = rStg; + m_pStg = nullptr; + m_xStg = rStg; m_pDoc = rPaM.GetDoc(); m_pOrigFileName = pFName; @@ -528,7 +528,7 @@ ErrCode StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage >& ErrCode nRet = pMedium ? WriteMedium( *pMedium ) : WriteStorage(); - pStg = nullptr; + m_pStg = nullptr; ResetWriter(); return nRet; diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index 9a9aad263c1f..4904f63d75dc 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -87,8 +87,8 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS uno::Reference< document::XEmbeddedObjectResolver > xObjectResolver; rtl::Reference<SvXMLEmbeddedObjectHelper> xObjectHelper; - OSL_ENSURE( xStg.is(), "Where is my storage?" ); - xGraphicHelper = SvXMLGraphicHelper::Create( xStg, + OSL_ENSURE( m_xStg.is(), "Where is my storage?" ); + xGraphicHelper = SvXMLGraphicHelper::Create( m_xStg, SvXMLGraphicHelperMode::Write ); xGraphicStorageHandler = xGraphicHelper.get(); @@ -96,7 +96,7 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS if( pPersist ) { xObjectHelper = SvXMLEmbeddedObjectHelper::Create( - xStg, *pPersist, + m_xStg, *pPersist, SvXMLEmbeddedObjectHelperMode::Write ); xObjectResolver = xObjectHelper.get(); } @@ -159,7 +159,7 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aInfoMap ) ) ); - xInfoSet->setPropertyValue( "TargetStorage", Any( xStg ) ); + xInfoSet->setPropertyValue( "TargetStorage", Any( m_xStg ) ); if (m_bShowProgress) { @@ -210,7 +210,7 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS } // #i69627# - const bool bOASIS = ( SotStorage::GetVersion( xStg ) > SOFFICE_FILEFORMAT_60 ); + const bool bOASIS = ( SotStorage::GetVersion( m_xStg ) > SOFFICE_FILEFORMAT_60 ); if ( bOASIS && docfunc::HasOutlineStyleToBeWrittenAsNormalListStyle( *m_pDoc ) ) { @@ -273,7 +273,7 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS // N.B.: embedded documents have their own manifest.rdf! if ( bOASIS ) { - const uno::Reference<beans::XPropertySet> xPropSet(xStg, + const uno::Reference<beans::XPropertySet> xPropSet(m_xStg, uno::UNO_QUERY_THROW); try { @@ -285,7 +285,7 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS { const uno::Reference<rdf::XDocumentMetadataAccess> xDMA( xModelComp, uno::UNO_QUERY_THROW); - xDMA->storeMetadataToStorage(xStg); + xDMA->storeMetadataToStorage(m_xStg); } } catch (beans::UnknownPropertyException &) @@ -377,7 +377,7 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS { try { - uno::Reference < io::XStream > xStm = xStg->openStreamElement( "layout-cache", embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE ); + uno::Reference < io::XStream > xStm = m_xStg->openStreamElement( "layout-cache", embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE ); std::unique_ptr<SvStream> pStream = utl::UcbStreamHelper::CreateStream( xStm ); if( !pStream->GetError() ) { @@ -470,7 +470,7 @@ bool SwXMLWriter::WriteThroughComponent( const Sequence<Any> & rArguments, const Sequence<beans::PropertyValue> & rMediaDesc ) { - OSL_ENSURE( xStg.is(), "Need storage!" ); + OSL_ENSURE( m_xStg.is(), "Need storage!" ); OSL_ENSURE( nullptr != pStreamName, "Need stream name!" ); OSL_ENSURE( nullptr != pServiceName, "Need service name!" ); @@ -481,7 +481,7 @@ bool SwXMLWriter::WriteThroughComponent( { const OUString sStreamName = OUString::createFromAscii( pStreamName ); uno::Reference<io::XStream> xStream = - xStg->openStreamElement( sStreamName, + m_xStg->openStreamElement( sStreamName, embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE ); uno::Reference <beans::XPropertySet > xSet( xStream, uno::UNO_QUERY ); |