diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-11-12 08:32:09 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-11-12 08:36:00 +0100 |
commit | 3b4eab183305efc89067255e3c2ff5f21fdfaa74 (patch) | |
tree | adfc711a5f45c7d9b0e27cfb2533c1c605749545 | |
parent | 8db9acda4edf64a672190b778dd651f2b7339e31 (diff) |
sw: prefix members of SwXMLImport
Change-Id: I7e28a5c2a0d7d03de13b673c23f2ed5467d99389
-rw-r--r-- | sw/source/filter/xml/xmlimp.cxx | 136 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlimp.hxx | 66 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlitemi.cxx | 26 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltbli.cxx | 12 |
4 files changed, 120 insertions, 120 deletions
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 776f5512d77b..195bafd7d760 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -349,10 +349,10 @@ void SwXMLDocStylesContext_Impl::EndElement() const SvXMLTokenMap& SwXMLImport::GetDocElemTokenMap() { - if( !pDocElemTokenMap ) - pDocElemTokenMap = new SvXMLTokenMap( aDocTokenMap ); + if( !m_pDocElemTokenMap ) + m_pDocElemTokenMap = new SvXMLTokenMap( aDocTokenMap ); - return *pDocElemTokenMap; + return *m_pDocElemTokenMap; } SvXMLImportContext *SwXMLImport::CreateContext( @@ -398,22 +398,22 @@ SwXMLImport::SwXMLImport( const uno::Reference< uno::XComponentContext >& rContext, OUString const & implementationName, SvXMLImportFlags nImportFlags) : SvXMLImport( rContext, implementationName, nImportFlags ), - pSttNdIdx( nullptr ), - pTableItemMapper( nullptr ), - pDocElemTokenMap( nullptr ), - pTableElemTokenMap( nullptr ), - pTableCellAttrTokenMap( nullptr ), - pGraphicResolver( nullptr ), - pEmbeddedResolver( nullptr ), - nStyleFamilyMask( SFX_STYLE_FAMILY_ALL ), - bLoadDoc( true ), - bInsert( false ), - bBlock( false ), - bShowProgress( true ), - bOrganizerMode( false ), - bInititedXForms( false ), - bPreserveRedlineMode( true ), - doc( nullptr ) + m_pSttNdIdx( nullptr ), + m_pTableItemMapper( nullptr ), + m_pDocElemTokenMap( nullptr ), + m_pTableElemTokenMap( nullptr ), + m_pTableCellAttrTokenMap( nullptr ), + m_pGraphicResolver( nullptr ), + m_pEmbeddedResolver( nullptr ), + m_nStyleFamilyMask( SFX_STYLE_FAMILY_ALL ), + m_bLoadDoc( true ), + m_bInsert( false ), + m_bBlock( false ), + m_bShowProgress( true ), + m_bOrganizerMode( false ), + m_bInititedXForms( false ), + m_bPreserveRedlineMode( true ), + m_pDoc( nullptr ) { _InitItemImport(); @@ -421,16 +421,16 @@ SwXMLImport::SwXMLImport( SwXMLImport::~SwXMLImport() throw () { - delete pDocElemTokenMap; - delete pTableElemTokenMap; - delete pTableCellAttrTokenMap; + delete m_pDocElemTokenMap; + delete m_pTableElemTokenMap; + delete m_pTableCellAttrTokenMap; _FinitItemImport(); } void SwXMLImport::setTextInsertMode( const Reference< XTextRange > & rInsertPos ) { - bInsert = true; + m_bInsert = true; Reference < XText > xText = rInsertPos->getText(); Reference < XTextCursor > xTextCursor = @@ -441,19 +441,19 @@ void SwXMLImport::setTextInsertMode( void SwXMLImport::setStyleInsertMode( sal_uInt16 nFamilies, bool bOverwrite ) { - bInsert = !bOverwrite; - nStyleFamilyMask = nFamilies; - bLoadDoc = false; + m_bInsert = !bOverwrite; + m_nStyleFamilyMask = nFamilies; + m_bLoadDoc = false; } void SwXMLImport::setBlockMode( ) { - bBlock = true; + m_bBlock = true; } void SwXMLImport::setOrganizerMode( ) { - bOrganizerMode = true; + m_bOrganizerMode = true; } namespace @@ -653,7 +653,7 @@ void SwXMLImport::startDocument() if( (getImportFlags() & SvXMLImportFlags::CONTENT) && !IsStylesOnlyMode() ) { - pSttNdIdx = new SwNodeIndex( pDoc->GetNodes() ); + m_pSttNdIdx = new SwNodeIndex( pDoc->GetNodes() ); if( IsInsertMode() ) { SwPaM *pPaM = pTextCrsr->GetPaM(); @@ -661,7 +661,7 @@ void SwXMLImport::startDocument() // Split once and remember the node that has been splitted. pDoc->getIDocumentContentOperations().SplitNode( *pPos, false ); - *pSttNdIdx = pPos->nNode.GetIndex()-1; + *m_pSttNdIdx = pPos->nNode.GetIndex()-1; // Split again. pDoc->getIDocumentContentOperations().SplitNode( *pPos, false ); @@ -683,8 +683,8 @@ void SwXMLImport::startDocument() if( !GetGraphicResolver().is() ) { - pGraphicResolver = SvXMLGraphicHelper::Create( GRAPHICHELPER_MODE_READ ); - Reference< document::XGraphicObjectResolver > xGraphicResolver( pGraphicResolver ); + m_pGraphicResolver = SvXMLGraphicHelper::Create( GRAPHICHELPER_MODE_READ ); + Reference< document::XGraphicObjectResolver > xGraphicResolver( m_pGraphicResolver ); SetGraphicResolver( xGraphicResolver ); } @@ -693,10 +693,10 @@ void SwXMLImport::startDocument() SfxObjectShell *pPersist = pDoc->GetPersist(); if( pPersist ) { - pEmbeddedResolver = SvXMLEmbeddedObjectHelper::Create( + m_pEmbeddedResolver = SvXMLEmbeddedObjectHelper::Create( *pPersist, EMBEDDEDOBJECTHELPER_MODE_READ ); - Reference< document::XEmbeddedObjectResolver > xEmbeddedResolver( pEmbeddedResolver ); + Reference< document::XEmbeddedObjectResolver > xEmbeddedResolver( m_pEmbeddedResolver ); SetEmbeddedResolver( xEmbeddedResolver ); } } @@ -712,10 +712,10 @@ void SwXMLImport::endDocument() // this method will modify the document directly -> lock SolarMutex SolarMutexGuard aGuard; - if( pGraphicResolver ) - SvXMLGraphicHelper::Destroy( pGraphicResolver ); - if( pEmbeddedResolver ) - SvXMLEmbeddedObjectHelper::Destroy( pEmbeddedResolver ); + if( m_pGraphicResolver ) + SvXMLGraphicHelper::Destroy( m_pGraphicResolver ); + if( m_pEmbeddedResolver ) + SvXMLEmbeddedObjectHelper::Destroy( m_pEmbeddedResolver ); // Clear the shape import to sort the shapes (and not in the // destructor that might be called after the import has finished // for Java filters. @@ -732,35 +732,35 @@ void SwXMLImport::endDocument() sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); assert(pTextCrsr && "SwXTextCursor missing"); SwPaM *pPaM = pTextCrsr->GetPaM(); - if( IsInsertMode() && pSttNdIdx->GetIndex() ) + if( IsInsertMode() && m_pSttNdIdx->GetIndex() ) { // If we are in insert mode, join the splitted node that is in front // of the new content with the first new node. Or in other words: // Revert the first split node. - SwTextNode* pTextNode = pSttNdIdx->GetNode().GetTextNode(); - SwNodeIndex aNxtIdx( *pSttNdIdx ); + SwTextNode* pTextNode = m_pSttNdIdx->GetNode().GetTextNode(); + SwNodeIndex aNxtIdx( *m_pSttNdIdx ); if( pTextNode && pTextNode->CanJoinNext( &aNxtIdx ) && - pSttNdIdx->GetIndex() + 1 == aNxtIdx.GetIndex() ) + m_pSttNdIdx->GetIndex() + 1 == aNxtIdx.GetIndex() ) { // If the PaM points to the first new node, move the PaM to the // end of the previous node. if( pPaM->GetPoint()->nNode == aNxtIdx ) { - pPaM->GetPoint()->nNode = *pSttNdIdx; + pPaM->GetPoint()->nNode = *m_pSttNdIdx; pPaM->GetPoint()->nContent.Assign( pTextNode, pTextNode->GetText().getLength()); } #if OSL_DEBUG_LEVEL > 0 // !!! This should be impossible !!!! - OSL_ENSURE( pSttNdIdx->GetIndex()+1 != + OSL_ENSURE( m_pSttNdIdx->GetIndex()+1 != pPaM->GetBound().nNode.GetIndex(), "PaM.Bound1 point to new node " ); - OSL_ENSURE( pSttNdIdx->GetIndex()+1 != + OSL_ENSURE( m_pSttNdIdx->GetIndex()+1 != pPaM->GetBound( false ).nNode.GetIndex(), "PaM.Bound2 points to new node" ); - if( pSttNdIdx->GetIndex()+1 == + if( m_pSttNdIdx->GetIndex()+1 == pPaM->GetBound().nNode.GetIndex() ) { const sal_Int32 nCntPos = @@ -768,7 +768,7 @@ void SwXMLImport::endDocument() pPaM->GetBound().nContent.Assign( pTextNode, pTextNode->GetText().getLength() + nCntPos ); } - if( pSttNdIdx->GetIndex()+1 == + if( m_pSttNdIdx->GetIndex()+1 == pPaM->GetBound( false ).nNode.GetIndex() ) { const sal_Int32 nCntPos = @@ -831,7 +831,7 @@ void SwXMLImport::endDocument() // Remove line break that has been inserted by the import, // but only if one has been inserted! if( pNextNd->CanJoinPrev(/* &pPos->nNode*/ ) && - *pSttNdIdx != pPos->nNode ) + *m_pSttNdIdx != pPos->nNode ) { pNextNd->JoinPrev(); } @@ -861,8 +861,8 @@ void SwXMLImport::endDocument() GetTextImport()->ResetCursor(); - delete pSttNdIdx; - pSttNdIdx = nullptr; + delete m_pSttNdIdx; + m_pSttNdIdx = nullptr; // SJ: #i49801# -> now permitting repaints if ( pDoc ) @@ -888,7 +888,7 @@ void SwXMLImport::endDocument() } // #i90243# - if ( bInititedXForms ) + if ( m_bInititedXForms ) { Reference< xforms::XFormsSupplier > xFormsSupp( GetModel(), UNO_QUERY ); Reference< XNameAccess > xXForms; @@ -902,9 +902,9 @@ void SwXMLImport::endDocument() Sequence< beans::PropertyValue > aXFormsSettings; const OUString sXFormsSettingsName( GetXMLToken( XML_XFORM_MODEL_SETTINGS ) ); - if ( xLateInitSettings.is() && xLateInitSettings->hasByName( sXFormsSettingsName ) ) + if ( m_xLateInitSettings.is() && m_xLateInitSettings->hasByName( sXFormsSettingsName ) ) { - OSL_VERIFY( xLateInitSettings->getByName( sXFormsSettingsName ) >>= aXFormsSettings ); + OSL_VERIFY( m_xLateInitSettings->getByName( sXFormsSettingsName ) >>= aXFormsSettings ); applyXFormsSettings( xXForms, aXFormsSettings ); } } @@ -973,9 +973,9 @@ XMLTextImportHelper* SwXMLImport::CreateTextImport() { return new SwXMLTextImportHelper( GetModel(), *this, getImportInfo(), IsInsertMode(), - IsStylesOnlyMode(), bShowProgress, + IsStylesOnlyMode(), m_bShowProgress, IsBlockMode(), IsOrganizerMode(), - bPreserveRedlineMode ); + m_bPreserveRedlineMode ); } XMLShapeImportHelper* SwXMLImport::CreateShapeImport() @@ -1451,19 +1451,19 @@ void SwXMLImport::SetDocumentSpecificSettings( // preserve the settings for a later iteration - we are currently reading the settings.xml, // the content.xml will be read later, by another instance of SwXMLImport - OSL_ENSURE( xLateInitSettings.is(), "SwXMLImport::SetDocumentSpecificSettings: no storage for those settings!" ); - if ( !xLateInitSettings.is() ) + OSL_ENSURE( m_xLateInitSettings.is(), "SwXMLImport::SetDocumentSpecificSettings: no storage for those settings!" ); + if ( !m_xLateInitSettings.is() ) return; try { - if ( xLateInitSettings->hasByName( _rSettingsGroupName ) ) + if ( m_xLateInitSettings->hasByName( _rSettingsGroupName ) ) { - xLateInitSettings->replaceByName( _rSettingsGroupName, makeAny( _rSettings ) ); + m_xLateInitSettings->replaceByName( _rSettingsGroupName, makeAny( _rSettings ) ); OSL_FAIL( "SwXMLImport::SetDocumentSpecificSettings: already have settings for this model!" ); } else - xLateInitSettings->insertByName( _rSettingsGroupName, makeAny( _rSettings ) ); + m_xLateInitSettings->insertByName( _rSettingsGroupName, makeAny( _rSettings ) ); } catch( const Exception& ) { @@ -1486,7 +1486,7 @@ void SwXMLImport::initialize( { if (aValue.Name == "PreserveRedlineMode") { - OSL_VERIFY( aValue.Value >>= bPreserveRedlineMode ); + OSL_VERIFY( aValue.Value >>= m_bPreserveRedlineMode ); } continue; } @@ -1496,7 +1496,7 @@ void SwXMLImport::initialize( { if (aNamedValue.Name == "LateInitSettings") { - OSL_VERIFY( aNamedValue.Value >>= xLateInitSettings ); + OSL_VERIFY( aNamedValue.Value >>= m_xLateInitSettings ); } } } @@ -1532,13 +1532,13 @@ void SwXMLImport::initXForms() if( ! pDoc->isXForms() ) pDoc->initXForms( false ); - bInititedXForms = true; + m_bInititedXForms = true; } SwDoc* SwXMLImport::getDoc() { - if( doc != nullptr ) - return doc; + if( m_pDoc != nullptr ) + return m_pDoc; Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY ); Reference < XText > xText = xTextDoc->getText(); Reference<XUnoTunnel> xTextTunnel( xText, UNO_QUERY); @@ -1546,9 +1546,9 @@ SwDoc* SwXMLImport::getDoc() SwXText *pText = reinterpret_cast< SwXText *>( sal::static_int_cast< sal_IntPtr >( xTextTunnel->getSomething( SwXText::getUnoTunnelId() ))); assert( pText != nullptr ); - doc = pText->GetDoc(); - assert( doc != nullptr ); - return doc; + m_pDoc = pText->GetDoc(); + assert( m_pDoc != nullptr ); + return m_pDoc; } const SwDoc* SwXMLImport::getDoc() const diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx index 28ea68aeb946..ab6227d5a785 100644 --- a/sw/source/filter/xml/xmlimp.hxx +++ b/sw/source/filter/xml/xmlimp.hxx @@ -49,37 +49,37 @@ namespace SwImport { class SwXMLImport: public SvXMLImport { - SwNodeIndex *pSttNdIdx; - - SvXMLUnitConverter *pTwipUnitConv; - SvXMLImportItemMapper *pTableItemMapper;// paragraph item import - SvXMLTokenMap *pDocElemTokenMap; - SvXMLTokenMap *pTableElemTokenMap; - SvXMLTokenMap *pTableCellAttrTokenMap; - SvXMLGraphicHelper *pGraphicResolver; - SvXMLEmbeddedObjectHelper *pEmbeddedResolver; - - SvXMLItemMapEntriesRef xTableItemMap; - SvXMLItemMapEntriesRef xTableColItemMap; - SvXMLItemMapEntriesRef xTableRowItemMap; - SvXMLItemMapEntriesRef xTableCellItemMap; - tools::SvRef<SotStorage> xPackage; + SwNodeIndex *m_pSttNdIdx; + + SvXMLUnitConverter *m_pTwipUnitConv; + SvXMLImportItemMapper *m_pTableItemMapper;// paragraph item import + SvXMLTokenMap *m_pDocElemTokenMap; + SvXMLTokenMap *m_pTableElemTokenMap; + SvXMLTokenMap *m_pTableCellAttrTokenMap; + SvXMLGraphicHelper *m_pGraphicResolver; + SvXMLEmbeddedObjectHelper *m_pEmbeddedResolver; + + SvXMLItemMapEntriesRef m_xTableItemMap; + SvXMLItemMapEntriesRef m_xTableColItemMap; + SvXMLItemMapEntriesRef m_xTableRowItemMap; + SvXMLItemMapEntriesRef m_xTableCellItemMap; + tools::SvRef<SotStorage> m_xPackage; css::uno::Reference< css::container::XNameContainer > - xLateInitSettings; + m_xLateInitSettings; - sal_uInt16 nStyleFamilyMask;// Mask of styles to load - bool bLoadDoc : 1; // Load doc or styles only - bool bInsert : 1; // Insert mode. If styles are + sal_uInt16 m_nStyleFamilyMask;// Mask of styles to load + bool m_bLoadDoc : 1; // Load doc or styles only + bool m_bInsert : 1; // Insert mode. If styles are // loaded only false means that // existing styles will be // overwritten. - bool bBlock : 1; // Load text block - bool bShowProgress : 1; - bool bOrganizerMode : 1; - bool bInititedXForms : 1; - bool bPreserveRedlineMode; + bool m_bBlock : 1; // Load text block + bool m_bShowProgress : 1; + bool m_bOrganizerMode : 1; + bool m_bInititedXForms : 1; + bool m_bPreserveRedlineMode; - SwDoc* doc; // cached for getDoc() + SwDoc* m_pDoc; // cached for getDoc() void _InitItemImport(); void _FinitItemImport(); @@ -146,11 +146,11 @@ public: const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ); SvXMLImportContext *CreateBodyContentContext( const OUString& rLocalName ); - sal_uInt16 GetStyleFamilyMask() const { return nStyleFamilyMask; } - bool IsInsertMode() const { return bInsert; } - bool IsStylesOnlyMode() const { return !bLoadDoc; } - bool IsBlockMode() const { return bBlock; } - bool IsOrganizerMode() const { return bOrganizerMode; } + sal_uInt16 GetStyleFamilyMask() const { return m_nStyleFamilyMask; } + bool IsInsertMode() const { return m_bInsert; } + bool IsStylesOnlyMode() const { return !m_bLoadDoc; } + bool IsBlockMode() const { return m_bBlock; } + bool IsOrganizerMode() const { return m_bOrganizerMode; } inline const SvXMLUnitConverter& GetTwipUnitConverter() const; inline const SvXMLImportItemMapper& GetTableItemMapper() const; @@ -191,17 +191,17 @@ public: inline const SvXMLUnitConverter& SwXMLImport::GetTwipUnitConverter() const { - return *pTwipUnitConv; + return *m_pTwipUnitConv; } inline const SvXMLImportItemMapper& SwXMLImport::GetTableItemMapper() const { - return *pTableItemMapper; + return *m_pTableItemMapper; } inline SvXMLImportItemMapper& SwXMLImport::GetTableItemMapper() { - return *pTableItemMapper; + return *m_pTableItemMapper; } #endif // _XMLIMP_HXX diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx index b2030a6ad5c5..20a5dc8a03d0 100644 --- a/sw/source/filter/xml/xmlitemi.cxx +++ b/sw/source/filter/xml/xmlitemi.cxx @@ -329,21 +329,21 @@ SvXMLImportContext *SwXMLItemSetContext_Impl::CreateChildContext( void SwXMLImport::_InitItemImport() { - pTwipUnitConv = new SvXMLUnitConverter( GetComponentContext(), + m_pTwipUnitConv = new SvXMLUnitConverter( GetComponentContext(), util::MeasureUnit::TWIP, util::MeasureUnit::TWIP ); - xTableItemMap = new SvXMLItemMapEntries( aXMLTableItemMap ); - xTableColItemMap = new SvXMLItemMapEntries( aXMLTableColItemMap ); - xTableRowItemMap = new SvXMLItemMapEntries( aXMLTableRowItemMap ); - xTableCellItemMap = new SvXMLItemMapEntries( aXMLTableCellItemMap ); + m_xTableItemMap = new SvXMLItemMapEntries( aXMLTableItemMap ); + m_xTableColItemMap = new SvXMLItemMapEntries( aXMLTableColItemMap ); + m_xTableRowItemMap = new SvXMLItemMapEntries( aXMLTableRowItemMap ); + m_xTableCellItemMap = new SvXMLItemMapEntries( aXMLTableCellItemMap ); - pTableItemMapper = new SwXMLImportTableItemMapper_Impl( xTableItemMap ); + m_pTableItemMapper = new SwXMLImportTableItemMapper_Impl( m_xTableItemMap ); } void SwXMLImport::_FinitItemImport() { - delete pTableItemMapper; - delete pTwipUnitConv; + delete m_pTableItemMapper; + delete m_pTwipUnitConv; } SvXMLImportContext *SwXMLImport::CreateTableItemImportContext( @@ -358,20 +358,20 @@ SvXMLImportContext *SwXMLImport::CreateTableItemImportContext( switch( nFamily ) { case XML_STYLE_FAMILY_TABLE_TABLE: - xItemMap = xTableItemMap; + xItemMap = m_xTableItemMap; break; case XML_STYLE_FAMILY_TABLE_COLUMN: - xItemMap = xTableColItemMap; + xItemMap = m_xTableColItemMap; break; case XML_STYLE_FAMILY_TABLE_ROW: - xItemMap = xTableRowItemMap; + xItemMap = m_xTableRowItemMap; break; case XML_STYLE_FAMILY_TABLE_CELL: - xItemMap = xTableCellItemMap; + xItemMap = m_xTableCellItemMap; break; } - pTableItemMapper->setMapEntries( xItemMap ); + m_pTableItemMapper->setMapEntries( xItemMap ); return new SwXMLItemSetContext_Impl( *this, nPrefix, rLocalName, xAttrList, rItemSet, diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 59e44c1bb3a4..d8808abc562d 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -149,18 +149,18 @@ static SvXMLTokenMapEntry aTableCellAttrTokenMap[] = const SvXMLTokenMap& SwXMLImport::GetTableElemTokenMap() { - if( !pTableElemTokenMap ) - pTableElemTokenMap = new SvXMLTokenMap( aTableElemTokenMap ); + if( !m_pTableElemTokenMap ) + m_pTableElemTokenMap = new SvXMLTokenMap( aTableElemTokenMap ); - return *pTableElemTokenMap; + return *m_pTableElemTokenMap; } const SvXMLTokenMap& SwXMLImport::GetTableCellAttrTokenMap() { - if( !pTableCellAttrTokenMap ) - pTableCellAttrTokenMap = new SvXMLTokenMap( aTableCellAttrTokenMap ); + if( !m_pTableCellAttrTokenMap ) + m_pTableCellAttrTokenMap = new SvXMLTokenMap( aTableCellAttrTokenMap ); - return *pTableCellAttrTokenMap; + return *m_pTableCellAttrTokenMap; } class SwXMLTableCell_Impl |