sw/inc/ftnidx.hxx | 6 sw/inc/txatritr.hxx | 6 sw/source/core/doc/ftnidx.cxx | 8 - sw/source/core/inc/UndoInsert.hxx | 18 +- sw/source/core/txtnode/txatritr.cxx | 30 +-- sw/source/core/undo/unins.cxx | 116 +++++++-------- writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 38 ---- writerfilter/source/dmapper/DomainMapperTableHandler.hxx | 2 writerfilter/source/dmapper/DomainMapper_Impl.cxx | 8 - writerfilter/source/dmapper/DomainMapper_Impl.hxx | 10 - 10 files changed, 92 insertions(+), 150 deletions(-)
New commits: commit 749fd6508504cf3b2e3822eca52a67fa36d75fb8 Author: Justin Luth <justin.l...@collabora.com> AuthorDate: Sat Nov 30 12:07:11 2019 +0300 Commit: László Németh <nem...@numbertext.org> CommitDate: Mon Dec 2 11:00:25 2019 +0100 revert obsolete writerfilter hacks for tdf#119054 and tdf#128752 These are obsoleted in LibreOffice 6.5 by tdf#118947's commit 6bced3c6a1bf8d4652dd6ba75e41b128ce1bfc5c Both of these hacks were backported to 6.4, but I have no intention of backporting my patch. Change-Id: Ie639b9d55d90d25b58e140fba443fce98f2d7ba1 Reviewed-on: https://gerrit.libreoffice.org/84125 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_l...@sil.org> Reviewed-by: László Németh <nem...@numbertext.org> diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index 9fa23720ba00..fb596a983204 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -809,9 +809,6 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl // Remove properties from style/row that aren't allowed in cells pAllCellProps->Erase( PROP_HEADER_ROW_COUNT ); pAllCellProps->Erase( PROP_TBL_HEADER ); - // Remove paragraph properties from style/row that paragraph style can overwrite - pAllCellProps->Erase( PROP_PARA_BOTTOM_MARGIN ); - pAllCellProps->Erase( PROP_PARA_LINE_SPACING ); // Then add the cell properties pAllCellProps->InsertProps(*aCellIterator); @@ -984,36 +981,6 @@ css::uno::Sequence<css::beans::PropertyValues> DomainMapperTableHandler::endTabl return aRowProperties; } -// table style has got bigger precedence than docDefault style, -// but lower precedence than the paragraph styles and direct paragraph formatting -void DomainMapperTableHandler::ApplyParaProperty(css::beans::PropertyValues aTableProperties, PropertyIds eId) -{ - OUString sPropertyName = getPropertyName(eId); - auto pTableProp = std::find_if(aTableProperties.begin(), aTableProperties.end(), - [&](const beans::PropertyValue& rProp) { return rProp.Name == sPropertyName; }); - if (pTableProp != aTableProperties.end()) - { - uno::Any aValue = pTableProp->Value; - for (const auto& rParaProp : m_rDMapper_Impl.m_aParagraphsToEndTable) - { - // there is no direct paragraph formatting - if (!rParaProp.m_pPropertyMap->isSet(eId)) - { - OUString sParaStyleName; - rParaProp.m_rPropertySet->getPropertyValue("ParaStyleName") >>= sParaStyleName; - StyleSheetEntryPtr pEntry = m_rDMapper_Impl.GetStyleSheetTable()->FindStyleSheetByConvertedStyleName(sParaStyleName); - uno::Any aMargin = m_rDMapper_Impl.GetPropertyFromStyleSheet(eId, pEntry, true, true); - uno::Any aMarginDocDefault = m_rDMapper_Impl.GetPropertyFromStyleSheet(eId, nullptr, true, true); - // use table style only when 1) both values are empty (no docDefault and paragraph style definitions) or - // 2) both non-empty values are equal (docDefault paragraph properties are copied to the base paragraph style during import) - // TODO check the case, when two parent styles modify the docDefault and the last one set back the docDefault value - if (aMargin == aMarginDocDefault) - rParaProp.m_rPropertySet->setPropertyValue(sPropertyName, aValue); - } - } - } -} - void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel, bool bTableStartsAtCellStart) { #ifdef DBG_UTIL @@ -1111,10 +1078,6 @@ void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel, bool bTab } } } - - // OOXML table style may container paragraph properties, apply these now. - ApplyParaProperty(aTableInfo.aTableProperties, PROP_PARA_BOTTOM_MARGIN); - ApplyParaProperty(aTableInfo.aTableProperties, PROP_PARA_LINE_SPACING); } } catch ( const lang::IllegalArgumentException & ) @@ -1192,7 +1155,6 @@ void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel, bool bTab m_aCellProperties.clear(); m_aRowProperties.clear(); m_bHadFootOrEndnote = false; - m_rDMapper_Impl.m_aParagraphsToEndTable.clear(); #ifdef DBG_UTIL TagLogger::getInstance().endElement(); diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx index 16d2a0cc37cc..41b6339506f9 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx @@ -91,8 +91,6 @@ public: */ void startTable(const TablePropertyMapPtr& pProps); - void ApplyParaProperty(css::beans::PropertyValues aTableProperties, PropertyIds eId); - /// Handle end of table. void endTable(unsigned int nestedTableLevel, bool bTableStartsAtCellStart); /** diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 49f98383801b..2238984124b1 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1707,14 +1707,6 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con css::uno::Reference<css::beans::XPropertySet> xParaProps(xTextRange, uno::UNO_QUERY); - // table style has got bigger precedence than docDefault style - // collect these pending paragraph properties to process in endTable() - if (xParaProps && m_nTableDepth > 0) - { - TableParagraph aPending{pParaContext, xParaProps}; - m_aParagraphsToEndTable.push_back(aPending); - } - // tdf#118521 set paragraph top or bottom margin based on the paragraph style // if we already set the other margin with direct formatting if (xParaProps) diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 1422b747035e..507150ec4e50 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -404,13 +404,6 @@ struct SymbolData { } }; -/// Information about a paragraph to be finished after a table end. -struct TableParagraph -{ - PropertyMapPtr m_pPropertyMap; - css::uno::Reference<css::beans::XPropertySet> m_rPropertySet; -}; - class DomainMapper; class DomainMapper_Impl final { @@ -1042,9 +1035,6 @@ public: bool m_bIsActualParagraphFramed; std::vector<css::uno::Any> aFramedRedlines; - /// Table paragraph properties may need style update based on table style - std::vector<TableParagraph> m_aParagraphsToEndTable; - private: void PushPageHeaderFooter(bool bHeader, SectionPropertyMap::PageType eType); std::vector<css::uno::Reference< css::drawing::XShape > > m_vTextFramesForChaining ; commit 2244865e7b8f229c81b94c8a875414f71ba81c5a Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Dec 2 08:48:45 2019 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Dec 2 11:00:20 2019 +0100 sw: prefix members of SwScriptIterator, SwUndoInsert, SwUndoReRead and ... ... SwUpdFootnoteEndNtAtEnd See tdf#94879 for motivation. Change-Id: I013bae47e38afd9dcb1678a1d0b988495d5ac265 Reviewed-on: https://gerrit.libreoffice.org/84188 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/sw/inc/ftnidx.hxx b/sw/inc/ftnidx.hxx index 245d9176dc16..39acdf0a96a0 100644 --- a/sw/inc/ftnidx.hxx +++ b/sw/inc/ftnidx.hxx @@ -51,11 +51,11 @@ public: class SwUpdFootnoteEndNtAtEnd { - std::vector<const SwSectionNode*> aFootnoteSects, aEndSects; - std::vector<std::pair<sal_uInt16, sal_uInt16>> aFootnoteNums, aEndNums; + std::vector<const SwSectionNode*> m_aFootnoteSections, m_aEndSections; + std::vector<std::pair<sal_uInt16, sal_uInt16>> m_aFootnoteNumbers, m_aEndNumbers; public: - SwUpdFootnoteEndNtAtEnd() : aFootnoteSects(), aEndSects() {} + SwUpdFootnoteEndNtAtEnd() : m_aFootnoteSections(), m_aEndSections() {} static const SwSectionNode* FindSectNdWithEndAttr( const SwTextFootnote& rTextFootnote ); diff --git a/sw/inc/txatritr.hxx b/sw/inc/txatritr.hxx index 504a8e2b7fdd..8cf7eca01452 100644 --- a/sw/inc/txatritr.hxx +++ b/sw/inc/txatritr.hxx @@ -32,8 +32,8 @@ class SwScriptIterator { const OUString& m_rText; sal_Int32 m_nChgPos; - sal_uInt16 nCurScript; - bool const bForward; + sal_uInt16 m_nCurScript; + bool const m_bForward; public: SwScriptIterator( const OUString& rStr, sal_Int32 nStart, @@ -41,7 +41,7 @@ public: void Next(); - sal_uInt16 GetCurrScript() const { return nCurScript; } + sal_uInt16 GetCurrScript() const { return m_nCurScript; } sal_Int32 GetScriptChgPos() const { return (m_nChgPos == -1) ? COMPLETE_STRING : m_nChgPos; } const OUString& GetText() const { return m_rText; } }; diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx index af4e30130362..0ca3a8b117f2 100644 --- a/sw/source/core/doc/ftnidx.cxx +++ b/sw/source/core/doc/ftnidx.cxx @@ -469,14 +469,14 @@ std::pair<sal_uInt16, sal_uInt16> SwUpdFootnoteEndNtAtEnd::GetNumber( std::vector<std::pair<sal_uInt16, sal_uInt16>> *pNum; if( rTextFootnote.GetFootnote().IsEndNote() ) { - pArr = &aEndSects; - pNum = &aEndNums; + pArr = &m_aEndSections; + pNum = &m_aEndNumbers; nWh = RES_END_AT_TXTEND; } else { - pArr = &aFootnoteSects; - pNum = &aFootnoteNums; + pArr = &m_aFootnoteSections; + pNum = &m_aFootnoteNumbers; nWh = RES_FTN_AT_TXTEND; } diff --git a/sw/source/core/inc/UndoInsert.hxx b/sw/source/core/inc/UndoInsert.hxx index eaef3609b720..fbfcb2c9a7e0 100644 --- a/sw/source/core/inc/UndoInsert.hxx +++ b/sw/source/core/inc/UndoInsert.hxx @@ -43,11 +43,11 @@ class SwUndoInsert: public SwUndo, private SwUndoSaveContent std::unique_ptr<SwNodeIndex> m_pUndoNodeIndex; o3tl::optional<OUString> maText; o3tl::optional<OUString> maUndoText; - std::unique_ptr<SwRedlineData> pRedlData; - sal_uLong nNode; - sal_Int32 nContent, nLen; - bool const bIsWordDelim : 1; - bool const bIsAppend : 1; + std::unique_ptr<SwRedlineData> m_pRedlData; + sal_uLong m_nNode; + sal_Int32 m_nContent, m_nLen; + bool const m_bIsWordDelim : 1; + bool const m_bIsAppend : 1; bool m_bWithRsid : 1; const SwInsertFlags m_nInsertFlags; @@ -56,7 +56,7 @@ class SwUndoInsert: public SwUndo, private SwUndoSaveContent bool CanGrouping( sal_Unicode cIns ); bool CanGrouping( const SwPosition& rPos ); - SwDoc * pDoc; + SwDoc * m_pDoc; void Init(const SwNodeIndex & rNode); o3tl::optional<OUString> GetTextFromDoc() const; @@ -134,11 +134,11 @@ private: class SwUndoReRead : public SwUndo { - std::unique_ptr<Graphic> pGrf; + std::unique_ptr<Graphic> mpGraphic; o3tl::optional<OUString> maNm; o3tl::optional<OUString> maFltr; - sal_uLong nPos; - MirrorGraph nMirr; + sal_uLong mnPosition; + MirrorGraph mnMirror; void SaveGraphicData( const SwGrfNode& ); void SetAndSave( ::sw::UndoRedoContext & ); diff --git a/sw/source/core/txtnode/txatritr.cxx b/sw/source/core/txtnode/txatritr.cxx index 76c1f61c35fb..b90f1060fd5e 100644 --- a/sw/source/core/txtnode/txatritr.cxx +++ b/sw/source/core/txtnode/txatritr.cxx @@ -33,54 +33,54 @@ SwScriptIterator::SwScriptIterator( const OUString& rStr, sal_Int32 nStt, bool const bFrwrd) : m_rText(rStr) , m_nChgPos(rStr.getLength()) - , nCurScript(i18n::ScriptType::WEAK) - , bForward(bFrwrd) + , m_nCurScript(i18n::ScriptType::WEAK) + , m_bForward(bFrwrd) { assert(g_pBreakIt && g_pBreakIt->GetBreakIter().is()); if ( ! bFrwrd && nStt ) --nStt; sal_Int32 nPos = nStt; - nCurScript = g_pBreakIt->GetBreakIter()->getScriptType(m_rText, nPos); - if( i18n::ScriptType::WEAK == nCurScript ) + m_nCurScript = g_pBreakIt->GetBreakIter()->getScriptType(m_rText, nPos); + if( i18n::ScriptType::WEAK == m_nCurScript ) { if( nPos ) { nPos = g_pBreakIt->GetBreakIter()->beginOfScript( - m_rText, nPos, nCurScript); + m_rText, nPos, m_nCurScript); if (nPos > 0 && nPos < m_rText.getLength()) { nStt = --nPos; - nCurScript = + m_nCurScript = g_pBreakIt->GetBreakIter()->getScriptType(m_rText,nPos); } } } - m_nChgPos = bForward + m_nChgPos = m_bForward ? g_pBreakIt->GetBreakIter()->endOfScript( - m_rText, nStt, nCurScript) + m_rText, nStt, m_nCurScript) : g_pBreakIt->GetBreakIter()->beginOfScript( - m_rText, nStt, nCurScript); + m_rText, nStt, m_nCurScript); } void SwScriptIterator::Next() { assert(g_pBreakIt && g_pBreakIt->GetBreakIter().is()); - if (bForward && m_nChgPos >= 0 && m_nChgPos < m_rText.getLength()) + if (m_bForward && m_nChgPos >= 0 && m_nChgPos < m_rText.getLength()) { - nCurScript = + m_nCurScript = g_pBreakIt->GetBreakIter()->getScriptType(m_rText, m_nChgPos); m_nChgPos = g_pBreakIt->GetBreakIter()->endOfScript( - m_rText, m_nChgPos, nCurScript); + m_rText, m_nChgPos, m_nCurScript); } - else if (!bForward && m_nChgPos > 0) + else if (!m_bForward && m_nChgPos > 0) { --m_nChgPos; - nCurScript = + m_nCurScript = g_pBreakIt->GetBreakIter()->getScriptType(m_rText, m_nChgPos); m_nChgPos = g_pBreakIt->GetBreakIter()->beginOfScript( - m_rText, m_nChgPos, nCurScript); + m_rText, m_nChgPos, m_nCurScript); } } diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index 3932194f7f26..d6b39e3b768f 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -65,15 +65,15 @@ o3tl::optional<OUString> SwUndoInsert::GetTextFromDoc() const { o3tl::optional<OUString> aResult; - SwNodeIndex aNd( pDoc->GetNodes(), nNode); + SwNodeIndex aNd( m_pDoc->GetNodes(), m_nNode); SwContentNode* pCNd = aNd.GetNode().GetContentNode(); if( pCNd->IsTextNode() ) { OUString sText = pCNd->GetTextNode()->GetText(); - sal_Int32 nStart = nContent-nLen; - sal_Int32 nLength = nLen; + sal_Int32 nStart = m_nContent-m_nLen; + sal_Int32 nLength = m_nLen; if (nStart < 0) { @@ -90,12 +90,12 @@ o3tl::optional<OUString> SwUndoInsert::GetTextFromDoc() const void SwUndoInsert::Init(const SwNodeIndex & rNd) { // consider Redline - pDoc = rNd.GetNode().GetDoc(); - if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() ) + m_pDoc = rNd.GetNode().GetDoc(); + if( m_pDoc->getIDocumentRedlineAccess().IsRedlineOn() ) { - pRedlData.reset( new SwRedlineData( RedlineType::Insert, - pDoc->getIDocumentRedlineAccess().GetRedlineAuthor() ) ); - SetRedlineFlags( pDoc->getIDocumentRedlineAccess().GetRedlineFlags() ); + m_pRedlData.reset( new SwRedlineData( RedlineType::Insert, + m_pDoc->getIDocumentRedlineAccess().GetRedlineAuthor() ) ); + SetRedlineFlags( m_pDoc->getIDocumentRedlineAccess().GetRedlineFlags() ); } maUndoText = GetTextFromDoc(); @@ -108,8 +108,8 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd, sal_Int32 nCnt, const SwInsertFlags nInsertFlags, bool bWDelim ) : SwUndo(SwUndoId::TYPING, rNd.GetNode().GetDoc()), - nNode( rNd.GetIndex() ), nContent(nCnt), nLen(nL), - bIsWordDelim( bWDelim ), bIsAppend( false ) + m_nNode( rNd.GetIndex() ), m_nContent(nCnt), m_nLen(nL), + m_bIsWordDelim( bWDelim ), m_bIsAppend( false ) , m_bWithRsid(false) , m_nInsertFlags(nInsertFlags) { @@ -118,8 +118,8 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd, sal_Int32 nCnt, SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd ) : SwUndo(SwUndoId::SPLITNODE, rNd.GetNode().GetDoc()), - nNode( rNd.GetIndex() ), nContent(0), nLen(1), - bIsWordDelim( false ), bIsAppend( true ) + m_nNode( rNd.GetIndex() ), m_nContent(0), m_nLen(1), + m_bIsWordDelim( false ), m_bIsAppend( true ) , m_bWithRsid(false) , m_nInsertFlags(SwInsertFlags::EMPTYEXPAND) { @@ -132,11 +132,11 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd ) bool SwUndoInsert::CanGrouping( sal_Unicode cIns ) { - if( !bIsAppend && bIsWordDelim == + if( !m_bIsAppend && m_bIsWordDelim == !GetAppCharClass().isLetterNumeric( OUString( cIns )) ) { - nLen++; - nContent++; + m_nLen++; + m_nContent++; if (maUndoText) (*maUndoText) += OUStringChar(cIns); @@ -149,8 +149,8 @@ bool SwUndoInsert::CanGrouping( sal_Unicode cIns ) bool SwUndoInsert::CanGrouping( const SwPosition& rPos ) { bool bRet = false; - if( nNode == rPos.nNode.GetIndex() && - nContent == rPos.nContent.GetIndex() ) + if( m_nNode == rPos.nNode.GetIndex() && + m_nContent == rPos.nContent.GetIndex() ) { // consider Redline SwDoc& rDoc = *rPos.nNode.GetNode().GetDoc(); @@ -171,10 +171,10 @@ bool SwUndoInsert::CanGrouping( const SwPosition& rPos ) { SwIndex* pIdx = &pRedl->End()->nContent; if( pIReg == pIdx->GetIdxReg() && - nContent == pIdx->GetIndex() ) + m_nContent == pIdx->GetIndex() ) { - if( !pRedl->HasMark() || !pRedlData || - *pRedl != *pRedlData || *pRedl != aRData ) + if( !pRedl->HasMark() || !m_pRedlData || + *pRedl != *m_pRedlData || *pRedl != aRData ) { bRet = false; break; @@ -201,7 +201,7 @@ SwUndoInsert::~SwUndoInsert() { maText.reset(); } - pRedlData.reset(); + m_pRedlData.reset(); } void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext) @@ -209,9 +209,9 @@ void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext) SwDoc *const pTmpDoc = & rContext.GetDoc(); SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor()); - if( bIsAppend ) + if( m_bIsAppend ) { - pPam->GetPoint()->nNode = nNode; + pPam->GetPoint()->nNode = m_nNode; if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() )) { @@ -227,20 +227,20 @@ void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext) } else { - sal_uLong nNd = nNode; - sal_Int32 nCnt = nContent; - if( nLen ) + sal_uLong nNd = m_nNode; + sal_Int32 nCnt = m_nContent; + if( m_nLen ) { - SwNodeIndex aNd( pTmpDoc->GetNodes(), nNode); + SwNodeIndex aNd( pTmpDoc->GetNodes(), m_nNode); SwContentNode* pCNd = aNd.GetNode().GetContentNode(); - SwPaM aPaM( *pCNd, nContent ); + SwPaM aPaM( *pCNd, m_nContent ); aPaM.SetMark(); SwTextNode * const pTextNode( pCNd->GetTextNode() ); if ( pTextNode ) { - aPaM.GetPoint()->nContent -= nLen; + aPaM.GetPoint()->nContent -= m_nLen; if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() )) pTmpDoc->getIDocumentRedlineAccess().DeleteRedline( aPaM, true, RedlineType::Any ); if (m_bWithRsid) @@ -256,8 +256,8 @@ void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext) aPaM.GetMark()->nContent.GetIndex()); } RemoveIdxFromRange( aPaM, false ); - maText = pTextNode->GetText().copy(nContent-nLen, nLen); - pTextNode->EraseText( aPaM.GetPoint()->nContent, nLen ); + maText = pTextNode->GetText().copy(m_nContent-m_nLen, m_nLen); + pTextNode->EraseText( aPaM.GetPoint()->nContent, m_nLen ); } else // otherwise Graphics/OLE/Text/... { @@ -273,11 +273,11 @@ void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext) if (!maText) { m_pUndoNodeIndex.reset( - new SwNodeIndex(pDoc->GetNodes().GetEndOfContent())); + new SwNodeIndex(m_pDoc->GetNodes().GetEndOfContent())); MoveToUndoNds(aPaM, m_pUndoNodeIndex.get()); } - nNode = aPaM.GetPoint()->nNode.GetIndex(); - nContent = aPaM.GetPoint()->nContent.GetIndex(); + m_nNode = aPaM.GetPoint()->nNode.GetIndex(); + m_nContent = aPaM.GetPoint()->nContent.GetIndex(); } // set cursor to Undo range @@ -297,20 +297,20 @@ void SwUndoInsert::RedoImpl(::sw::UndoRedoContext & rContext) SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor()); pPam->DeleteMark(); - if( bIsAppend ) + if( m_bIsAppend ) { - pPam->GetPoint()->nNode = nNode - 1; + pPam->GetPoint()->nNode = m_nNode - 1; pTmpDoc->getIDocumentContentOperations().AppendTextNode( *pPam->GetPoint() ); pPam->SetMark(); pPam->Move( fnMoveBackward ); pPam->Exchange(); - if( pRedlData && IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() )) + if( m_pRedlData && IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() )) { RedlineFlags eOld = pTmpDoc->getIDocumentRedlineAccess().GetRedlineFlags(); pTmpDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern(eOld & ~RedlineFlags::Ignore); - pTmpDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( *pRedlData, *pPam ), true); + pTmpDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( *m_pRedlData, *pPam ), true); pTmpDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld ); } else if( !( RedlineFlags::Ignore & GetRedlineFlags() ) && @@ -321,12 +321,12 @@ void SwUndoInsert::RedoImpl(::sw::UndoRedoContext & rContext) } else { - pPam->GetPoint()->nNode = nNode; + pPam->GetPoint()->nNode = m_nNode; SwContentNode *const pCNd = pPam->GetPoint()->nNode.GetNode().GetContentNode(); - pPam->GetPoint()->nContent.Assign( pCNd, nContent ); + pPam->GetPoint()->nContent.Assign( pCNd, m_nContent ); - if( nLen ) + if( m_nLen ) { const bool bMvBkwrd = MovePtBackward( *pPam ); @@ -352,16 +352,16 @@ void SwUndoInsert::RedoImpl(::sw::UndoRedoContext & rContext) m_pUndoNodeIndex.reset(); MoveFromUndoNds(*pTmpDoc, nMvNd, *pPam->GetMark()); } - nNode = pPam->GetMark()->nNode.GetIndex(); - nContent = pPam->GetMark()->nContent.GetIndex(); + m_nNode = pPam->GetMark()->nNode.GetIndex(); + m_nContent = pPam->GetMark()->nContent.GetIndex(); MovePtForward( *pPam, bMvBkwrd ); pPam->Exchange(); - if( pRedlData && IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() )) + if( m_pRedlData && IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() )) { RedlineFlags eOld = pTmpDoc->getIDocumentRedlineAccess().GetRedlineFlags(); pTmpDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern(eOld & ~RedlineFlags::Ignore); - pTmpDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( *pRedlData, + pTmpDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( *m_pRedlData, *pPam ), true); pTmpDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld ); } @@ -376,16 +376,16 @@ void SwUndoInsert::RedoImpl(::sw::UndoRedoContext & rContext) void SwUndoInsert::RepeatImpl(::sw::RepeatContext & rContext) { - if( !nLen ) + if( !m_nLen ) return; SwDoc & rDoc = rContext.GetDoc(); - SwNodeIndex aNd( rDoc.GetNodes(), nNode ); + SwNodeIndex aNd( rDoc.GetNodes(), m_nNode ); SwContentNode* pCNd = aNd.GetNode().GetContentNode(); - if( !bIsAppend && 1 == nLen ) // >1 than always Text, otherwise Graphics/OLE/Text/... + if( !m_bIsAppend && 1 == m_nLen ) // >1 than always Text, otherwise Graphics/OLE/Text/... { - SwPaM aPaM( *pCNd, nContent ); + SwPaM aPaM( *pCNd, m_nContent ); aPaM.SetMark(); aPaM.Move(fnMoveBackward); pCNd = aPaM.GetContentNode(); @@ -396,7 +396,7 @@ void SwUndoInsert::RepeatImpl(::sw::RepeatContext & rContext) switch( pCNd->GetNodeType() ) { case SwNodeType::Text: - if( bIsAppend ) + if( m_bIsAppend ) { rDoc.getIDocumentContentOperations().AppendTextNode( *rContext.GetRepeatPaM().GetPoint() ); } @@ -405,7 +405,7 @@ void SwUndoInsert::RepeatImpl(::sw::RepeatContext & rContext) OUString const aText( pCNd->GetTextNode()->GetText() ); ::sw::GroupUndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo()); rDoc.getIDocumentContentOperations().InsertString( rContext.GetRepeatPaM(), - aText.copy(nContent - nLen, nLen) ); + aText.copy(m_nContent - m_nLen, m_nLen) ); } break; case SwNodeType::Grf: @@ -781,7 +781,7 @@ void SwUndoReplace::Impl::SetEnd(SwPaM const& rPam) } SwUndoReRead::SwUndoReRead( const SwPaM& rPam, const SwGrfNode& rGrfNd ) - : SwUndo( SwUndoId::REREAD, rPam.GetDoc() ), nPos( rPam.GetPoint()->nNode.GetIndex() ) + : SwUndo( SwUndoId::REREAD, rPam.GetDoc() ), mnPosition( rPam.GetPoint()->nNode.GetIndex() ) { SaveGraphicData( rGrfNd ); } @@ -793,16 +793,16 @@ SwUndoReRead::~SwUndoReRead() void SwUndoReRead::SetAndSave(::sw::UndoRedoContext & rContext) { SwDoc & rDoc = rContext.GetDoc(); - SwGrfNode* pGrfNd = rDoc.GetNodes()[ nPos ]->GetGrfNode(); + SwGrfNode* pGrfNd = rDoc.GetNodes()[ mnPosition ]->GetGrfNode(); if( !pGrfNd ) return ; // cache the old values - std::unique_ptr<Graphic> pOldGrf( pGrf ? new Graphic(*pGrf) : nullptr); + std::unique_ptr<Graphic> pOldGrf( mpGraphic ? new Graphic(*mpGraphic) : nullptr); o3tl::optional<OUString> aOldNm = maNm; o3tl::optional<OUString> aOldFltr = maFltr; - MirrorGraph nOldMirr = nMirr; + MirrorGraph nOldMirr = mnMirror; // since all of them are cleared/modified by SaveGraphicData: SaveGraphicData( *pGrfNd ); @@ -838,15 +838,15 @@ void SwUndoReRead::SaveGraphicData( const SwGrfNode& rGrfNd ) maNm = OUString(); maFltr = OUString(); rGrfNd.GetFileFilterNms(&*maNm, &*maFltr); - pGrf.reset(); + mpGraphic.reset(); } else { - pGrf.reset( new Graphic( rGrfNd.GetGrf(true) ) ); + mpGraphic.reset( new Graphic( rGrfNd.GetGrf(true) ) ); maNm.reset(); maFltr.reset(); } - nMirr = rGrfNd.GetSwAttrSet().GetMirrorGrf().GetValue(); + mnMirror = rGrfNd.GetSwAttrSet().GetMirrorGrf().GetValue(); } SwUndoInsertLabel::SwUndoInsertLabel( const SwLabelType eTyp, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits