sw/source/filter/ww8/docxattributeoutput.cxx | 54 +++++++++++++-------------- sw/source/filter/ww8/docxattributeoutput.hxx | 10 ++--- sw/source/uibase/dbui/dbtree.cxx | 34 ++++++++--------- sw/source/uibase/inc/content.hxx | 16 ++++---- sw/source/uibase/inc/dbtree.hxx | 6 +-- sw/source/uibase/utlui/content.cxx | 2 - 6 files changed, 61 insertions(+), 61 deletions(-)
New commits: commit 418cb3c844da2e7094fa6b63b33d8c938897203c Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Mar 7 08:21:20 2022 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Mar 7 09:06:52 2022 +0100 sw: prefix members of DocxAttributeOutput, SwDBTreeList, ... ... SwTOXBaseContent and SwURLFieldContent See tdf#94879 for motivation. Change-Id: I6481279dcb680ebba6392bbde3f4736dd270e52a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131092 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index f5b270f1f580..a08a16919e8d 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1123,11 +1123,11 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT void DocxAttributeOutput::SyncNodelessCells(ww8::WW8TableNodeInfoInner::Pointer_t const & pInner, sal_Int32 nCell, sal_uInt32 nRow) { - sal_Int32 nOpenCell = lastOpenCell.back(); + sal_Int32 nOpenCell = m_LastOpenCell.back(); if (nOpenCell != -1 && nOpenCell != nCell && nOpenCell < MAX_CELL_IN_WORD) EndTableCell(nOpenCell); - sal_Int32 nClosedCell = lastClosedCell.back(); + sal_Int32 nClosedCell = m_LastClosedCell.back(); for (sal_Int32 i = nClosedCell+1; i < nCell; ++i) { if (i >= MAX_CELL_IN_WORD) @@ -1169,13 +1169,13 @@ void DocxAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointe { //we expect that the higher depth row was closed, and //we are just missing the table close - assert(lastOpenCell.back() == -1 && lastClosedCell.back() == -1); + assert(m_LastOpenCell.back() == -1 && m_LastClosedCell.back() == -1); EndTable(); } SyncNodelessCells(pInner, nCell, nRow); - sal_Int32 nClosedCell = lastClosedCell.back(); + sal_Int32 nClosedCell = m_LastClosedCell.back(); if (nCell == nClosedCell) { //Start missing trailing cell(s) @@ -4026,7 +4026,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point const SvxBoxItem& rBox = pTableBox->GetFrameFormat( )->GetBox( ); - const SvxBoxItem& rDefaultBox = (*tableFirstCells.rbegin())->getTableBox( )->GetFrameFormat( )->GetBox( ); + const SvxBoxItem& rDefaultBox = (*m_TableFirstCells.rbegin())->getTableBox( )->GetFrameFormat( )->GetBox( ); { // The cell borders impl_borders(m_pSerializer, rBox, lcl_getTableCellBorderOptions(bEcma), @@ -4076,9 +4076,9 @@ void DocxAttributeOutput::StartTable( ww8::WW8TableNodeInfoInner::Pointer_t cons m_pSerializer->startElementNS(XML_w, XML_tbl); - tableFirstCells.push_back(pTableTextNodeInfoInner); - lastOpenCell.push_back(-1); - lastClosedCell.push_back(-1); + m_TableFirstCells.push_back(pTableTextNodeInfoInner); + m_LastOpenCell.push_back(-1); + m_LastClosedCell.push_back(-1); InitTableHelper( pTableTextNodeInfoInner ); TableDefinition( pTableTextNodeInfoInner ); @@ -4091,14 +4091,14 @@ void DocxAttributeOutput::EndTable() if ( m_tableReference->m_nTableDepth > 0 ) --m_tableReference->m_nTableDepth; - lastClosedCell.pop_back(); - lastOpenCell.pop_back(); - tableFirstCells.pop_back(); + m_LastClosedCell.pop_back(); + m_LastOpenCell.pop_back(); + m_TableFirstCells.pop_back(); // We closed the table; if it is a nested table, the cell that contains it // still continues // set to true only if we were in a nested table, not otherwise. - if( !tableFirstCells.empty() ) + if( !m_TableFirstCells.empty() ) m_tableReference->m_bTableCellOpen = true; // Cleans the table helper @@ -4143,13 +4143,13 @@ void DocxAttributeOutput::StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t c void DocxAttributeOutput::EndTableRow( ) { m_pSerializer->endElementNS( XML_w, XML_tr ); - lastOpenCell.back() = -1; - lastClosedCell.back() = -1; + m_LastOpenCell.back() = -1; + m_LastClosedCell.back() = -1; } void DocxAttributeOutput::StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow ) { - lastOpenCell.back() = nCell; + m_LastOpenCell.back() = nCell; InitTableHelper( pTableTextNodeInfoInner ); @@ -4163,8 +4163,8 @@ void DocxAttributeOutput::StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t void DocxAttributeOutput::EndTableCell(sal_uInt32 nCell) { - lastClosedCell.back() = nCell; - lastOpenCell.back() = -1; + m_LastClosedCell.back() = nCell; + m_LastOpenCell.back() = -1; if (m_tableReference->m_bTableCellParaSdtOpen) EndParaSdtBlock(); @@ -7517,7 +7517,7 @@ void DocxAttributeOutput::EmbedFontStyle( std::u16string_view name, int tag, Fon if( fontUrl.isEmpty()) return; // TODO IDocumentSettingAccess::EMBED_SYSTEM_FONTS - if( !fontFilesMap.count( fontUrl )) + if( !m_FontFilesMap.count( fontUrl )) { osl::File file( fontUrl ); if( file.open( osl_File_OpenFlag_Read ) != osl::File::E_None ) @@ -7579,12 +7579,12 @@ void DocxAttributeOutput::EmbedFontStyle( std::u16string_view name, int tag, Fon EmbeddedFontRef ref; ref.relId = relId; ref.fontKey = fontKeyStr; - fontFilesMap[ fontUrl ] = ref; + m_FontFilesMap[ fontUrl ] = ref; ++m_nextFontId; } m_pSerializer->singleElementNS( XML_w, tag, - FSNS( XML_r, XML_id ), fontFilesMap[ fontUrl ].relId, - FSNS( XML_w, XML_fontKey ), fontFilesMap[ fontUrl ].fontKey ); + FSNS( XML_r, XML_id ), m_FontFilesMap[ fontUrl ].relId, + FSNS( XML_w, XML_fontKey ), m_FontFilesMap[ fontUrl ].fontKey ); } OString DocxAttributeOutput::TransHighlightColor( sal_uInt8 nIco ) @@ -8532,17 +8532,17 @@ bool DocxAttributeOutput::DropdownField( const SwField* pField ) bool DocxAttributeOutput::PlaceholderField( const SwField* pField ) { - assert( pendingPlaceholder == nullptr ); - pendingPlaceholder = pField; + assert( m_PendingPlaceholder == nullptr ); + m_PendingPlaceholder = pField; return false; // do not expand } void DocxAttributeOutput::WritePendingPlaceholder() { - if( pendingPlaceholder == nullptr ) + if( m_PendingPlaceholder == nullptr ) return; - const SwField* pField = pendingPlaceholder; - pendingPlaceholder = nullptr; + const SwField* pField = m_PendingPlaceholder; + m_PendingPlaceholder = nullptr; m_pSerializer->startElementNS(XML_w, XML_sdt); m_pSerializer->startElementNS(XML_w, XML_sdtPr); if( !pField->GetPar2().isEmpty()) @@ -10277,7 +10277,7 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, const FSHelperPtr m_nFieldsInHyperlink( 0 ), m_bExportingOutline(false), m_nChartCount(0), - pendingPlaceholder( nullptr ), + m_PendingPlaceholder( nullptr ), m_postitFieldsMaxId( 0 ), m_anchorId( 1 ), m_nextFontId( 1 ), diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 0853d6c9d3f2..cac04054f542 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -962,7 +962,7 @@ private: std::vector<PostponedChart> m_aPostponedCharts; std::vector<const SdrObject*> m_aPostponedFormControls; std::vector<PostponedDrawing> m_aPostponedActiveXControls; - const SwField* pendingPlaceholder; + const SwField* m_PendingPlaceholder; struct PostItDOCXData{ sal_Int32 id; @@ -982,13 +982,13 @@ private: std::unique_ptr<TableReference> m_tableReference; - std::map< OUString, EmbeddedFontRef > fontFilesMap; // font file url to data + std::map< OUString, EmbeddedFontRef > m_FontFilesMap; // font file url to data // Remember first cell (used for default borders/margins) of each table - std::vector<ww8::WW8TableNodeInfoInner::Pointer_t> tableFirstCells; + std::vector<ww8::WW8TableNodeInfoInner::Pointer_t> m_TableFirstCells; // Remember last open and closed cells on each level - std::vector<sal_Int32> lastOpenCell; - std::vector<sal_Int32> lastClosedCell; + std::vector<sal_Int32> m_LastOpenCell; + std::vector<sal_Int32> m_LastClosedCell; std::optional<css::drawing::FillStyle> m_oFillStyle; /// If FormatBox() already handled fill style / gradient. diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx index 941df07e1ec7..432a0a28e68b 100644 --- a/sw/source/uibase/dbui/dbtree.cxx +++ b/sw/source/uibase/dbui/dbtree.cxx @@ -128,9 +128,9 @@ Reference<XConnection> SwDBTreeList_Impl::GetConnection(const OUString& rSource } SwDBTreeList::SwDBTreeList(std::unique_ptr<weld::TreeView> xTreeView) - : bInitialized(false) - , bShowColumns(false) - , pImpl(new SwDBTreeList_Impl) + : m_bInitialized(false) + , m_bShowColumns(false) + , m_pImpl(new SwDBTreeList_Impl) , m_xTreeView(std::move(xTreeView)) , m_xScratchIter(m_xTreeView->make_iterator()) { @@ -143,10 +143,10 @@ SwDBTreeList::~SwDBTreeList() void SwDBTreeList::InitTreeList() { - if (!pImpl->HasContext() && pImpl->GetWrtShell()) + if (!m_pImpl->HasContext() && m_pImpl->GetWrtShell()) return; - Sequence< OUString > aDBNames = pImpl->GetContext()->getElementNames(); + Sequence< OUString > aDBNames = m_pImpl->GetContext()->getElementNames(); auto const sort = comphelper::string::NaturalStringSorter( comphelper::getProcessComponentContext(), Application::GetSettings().GetUILanguageTag().getLocale()); @@ -170,7 +170,7 @@ void SwDBTreeList::InitTreeList() } Select(u"", u"", u""); - bInitialized = true; + m_bInitialized = true; } void SwDBTreeList::AddDataSource(const OUString& rSource) @@ -193,9 +193,9 @@ IMPL_LINK(SwDBTreeList, RequestingChildrenHdl, const weld::TreeIter&, rParent, b OUString sSourceName = m_xTreeView->get_text(*xGrandParent); OUString sTableName = m_xTreeView->get_text(rParent); - if(!pImpl->GetContext()->hasByName(sSourceName)) + if(!m_pImpl->GetContext()->hasByName(sSourceName)) return true; - Reference<XConnection> xConnection = pImpl->GetConnection(sSourceName); + Reference<XConnection> xConnection = m_pImpl->GetConnection(sSourceName); bool bTable = m_xTreeView->get_id(rParent).isEmpty(); Reference<XColumnsSupplier> xColsSupplier; if(bTable) @@ -256,9 +256,9 @@ IMPL_LINK(SwDBTreeList, RequestingChildrenHdl, const weld::TreeIter&, rParent, b try { OUString sSourceName = m_xTreeView->get_text(rParent); - if (!pImpl->GetContext()->hasByName(sSourceName)) + if (!m_pImpl->GetContext()->hasByName(sSourceName)) return true; - Reference<XConnection> xConnection = pImpl->GetConnection(sSourceName); + Reference<XConnection> xConnection = m_pImpl->GetConnection(sSourceName); if (xConnection.is()) { Reference<XTablesSupplier> xTSupplier(xConnection, UNO_QUERY); @@ -270,7 +270,7 @@ IMPL_LINK(SwDBTreeList, RequestingChildrenHdl, const weld::TreeIter&, rParent, b for (const OUString& rTableName : aTableNames) { m_xTreeView->insert(&rParent, -1, &rTableName, nullptr, - nullptr, nullptr, bShowColumns, m_xScratchIter.get()); + nullptr, nullptr, m_bShowColumns, m_xScratchIter.get()); m_xTreeView->set_image(*m_xScratchIter, aImg); } } @@ -286,7 +286,7 @@ IMPL_LINK(SwDBTreeList, RequestingChildrenHdl, const weld::TreeIter&, rParent, b //to discriminate between queries and tables the user data of query entries is set OUString sId(OUString::number(1)); m_xTreeView->insert(&rParent, -1, &rQueryName, &sId, - nullptr, nullptr, bShowColumns, m_xScratchIter.get()); + nullptr, nullptr, m_bShowColumns, m_xScratchIter.get()); m_xTreeView->set_image(*m_xScratchIter, aImg); } } @@ -361,7 +361,7 @@ void SwDBTreeList::Select(std::u16string_view rDBName, std::u16string_view rTabl m_xTreeView->copy_iterator(*xChild, *xParent); bool bNoChild = false; - if (bShowColumns && !rColumnName.empty()) + if (m_bShowColumns && !rColumnName.empty()) { if (!m_xTreeView->iter_has_child(*xParent)) { @@ -400,8 +400,8 @@ void SwDBTreeList::Select(std::u16string_view rDBName, std::u16string_view rTabl void SwDBTreeList::SetWrtShell(SwWrtShell& rSh) { - pImpl->SetWrtShell(rSh); - if (m_xTreeView->get_visible() && !bInitialized) + m_pImpl->SetWrtShell(rSh); + if (m_xTreeView->get_visible() && !m_bInitialized) InitTreeList(); } @@ -416,10 +416,10 @@ namespace void SwDBTreeList::ShowColumns(bool bShowCol) { - if (bShowCol == bShowColumns) + if (bShowCol == m_bShowColumns) return; - bShowColumns = bShowCol; + m_bShowColumns = bShowCol; OUString sTableName; OUString sColumnName; const OUString sDBName(GetDBName(sTableName, sColumnName)); diff --git a/sw/source/uibase/inc/content.hxx b/sw/source/uibase/inc/content.hxx index dd18d71637ca..0a4e18013be4 100644 --- a/sw/source/uibase/inc/content.hxx +++ b/sw/source/uibase/inc/content.hxx @@ -72,8 +72,8 @@ class SwRegionContent final : public SwContent class SwURLFieldContent final : public SwContent { - OUString sURL; - const SwTextINetFormat* pINetAttr; + OUString m_sURL; + const SwTextINetFormat* m_pINetAttr; public: SwURLFieldContent( const SwContentType* pCnt, @@ -81,12 +81,12 @@ public: const OUString& rURL, const SwTextINetFormat* pAttr, tools::Long nYPos ) - : SwContent( pCnt, rName, nYPos ), sURL( rURL ), pINetAttr( pAttr ) + : SwContent( pCnt, rName, nYPos ), m_sURL( rURL ), m_pINetAttr( pAttr ) {} virtual bool IsProtect() const override; - const OUString& GetURL() const { return sURL; } - const SwTextINetFormat* GetINetAttr() const { return pINetAttr; } + const OUString& GetURL() const { return m_sURL; } + const SwTextINetFormat* GetINetAttr() const { return m_pINetAttr; } }; class SwTextFieldContent final : public SwContent @@ -150,14 +150,14 @@ public: class SwTOXBaseContent final : public SwContent { - const SwTOXBase* pBase; + const SwTOXBase* m_pBase; public: SwTOXBaseContent(const SwContentType* pCnt, const OUString& rName, tools::Long nYPos, const SwTOXBase& rBase) - : SwContent( pCnt, rName, nYPos ), pBase(&rBase) + : SwContent( pCnt, rName, nYPos ), m_pBase(&rBase) {} virtual ~SwTOXBaseContent() override; - const SwTOXBase* GetTOXBase() const {return pBase;} + const SwTOXBase* GetTOXBase() const {return m_pBase;} }; /** diff --git a/sw/source/uibase/inc/dbtree.hxx b/sw/source/uibase/inc/dbtree.hxx index 651654bb9843..c6806cdfed8a 100644 --- a/sw/source/uibase/inc/dbtree.hxx +++ b/sw/source/uibase/inc/dbtree.hxx @@ -29,10 +29,10 @@ class SwWrtShell; class SW_DLLPUBLIC SwDBTreeList { - bool bInitialized; - bool bShowColumns; + bool m_bInitialized; + bool m_bShowColumns; - rtl::Reference<SwDBTreeList_Impl> pImpl; + rtl::Reference<SwDBTreeList_Impl> m_pImpl; std::unique_ptr<weld::TreeView> m_xTreeView; std::unique_ptr<weld::TreeIter> m_xScratchIter; diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index e0b3fbd16d69..1791887b1f43 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -222,7 +222,7 @@ bool SwPostItContent::IsProtect() const bool SwURLFieldContent::IsProtect() const { - return pINetAttr->IsProtect(); + return m_pINetAttr->IsProtect(); } SwGraphicContent::~SwGraphicContent()