[Libreoffice-commits] core.git: sw/inc sw/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 25 19:22:37 UTC 2019
sw/inc/txatritr.hxx | 18 ++--
sw/source/core/crsr/DropDownFormFieldButton.cxx | 28 +++----
sw/source/core/inc/swselectionlist.hxx | 12 +--
sw/source/core/inc/unobookmark.hxx | 2
sw/source/core/layout/swselectionlist.cxx | 8 +-
sw/source/core/txtnode/txatritr.cxx | 92 ++++++++++++------------
sw/source/core/unocore/unobkm.cxx | 4 -
7 files changed, 82 insertions(+), 82 deletions(-)
New commits:
commit 6ffc81ad71714ee568eb0ad2dff3df167a2f060f
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Nov 25 08:27:16 2019 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Nov 25 20:21:34 2019 +0100
sw: prefix members of SwFieldDialog, SwLanguageIterator, SwSelectionList ...
... and SwXFieldmark
Change-Id: I06654f5473ded6ba683c9755e500b7c44c3a7d7c
Reviewed-on: https://gerrit.libreoffice.org/83642
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Tested-by: Jenkins
diff --git a/sw/inc/txatritr.hxx b/sw/inc/txatritr.hxx
index 625b9cba2e1a..504a8e2b7fdd 100644
--- a/sw/inc/txatritr.hxx
+++ b/sw/inc/txatritr.hxx
@@ -48,14 +48,14 @@ public:
class SwLanguageIterator
{
- SwScriptIterator aSIter;
+ SwScriptIterator m_aScriptIter;
std::deque<const SwTextAttr*>
- aStack;
- const SwTextNode& rTextNd;
- const SfxPoolItem* pParaItem;
- const SfxPoolItem* pCurItem;
- size_t nAttrPos;
- sal_Int32 nChgPos;
+ m_aStack;
+ const SwTextNode& m_rTextNode;
+ const SfxPoolItem* m_pParaItem;
+ const SfxPoolItem* m_pCurrentItem;
+ size_t m_nAttrPos;
+ sal_Int32 m_nChgPos;
void AddToStack( const SwTextAttr& rAttr );
void SearchNextChg();
@@ -64,9 +64,9 @@ public:
SwLanguageIterator( const SwTextNode& rTextNd, sal_Int32 nStart );
bool Next();
- sal_Int32 GetChgPos() const { return nChgPos; }
+ sal_Int32 GetChgPos() const { return m_nChgPos; }
LanguageType GetLanguage() const
- { return static_cast<const SvxLanguageItem&>(*pCurItem).GetValue(); }
+ { return static_cast<const SvxLanguageItem&>(*m_pCurrentItem).GetValue(); }
};
#endif
diff --git a/sw/source/core/crsr/DropDownFormFieldButton.cxx b/sw/source/core/crsr/DropDownFormFieldButton.cxx
index 916d6ab1a8b7..249bd22100ed 100644
--- a/sw/source/core/crsr/DropDownFormFieldButton.cxx
+++ b/sw/source/core/crsr/DropDownFormFieldButton.cxx
@@ -27,8 +27,8 @@ namespace
class SwFieldDialog : public FloatingWindow
{
private:
- VclPtr<ListBox> aListBox;
- sw::mark::IFieldmark* pFieldmark;
+ VclPtr<ListBox> m_aListBox;
+ sw::mark::IFieldmark* m_pFieldmark;
DECL_LINK(MyListBoxHandler, ListBox&, void);
@@ -41,8 +41,8 @@ public:
SwFieldDialog::SwFieldDialog(SwEditWin* parent, sw::mark::IFieldmark* fieldBM, long nMinListWidth)
: FloatingWindow(parent, WB_BORDER | WB_SYSTEMWINDOW)
- , aListBox(VclPtr<ListBox>::Create(this))
- , pFieldmark(fieldBM)
+ , m_aListBox(VclPtr<ListBox>::Create(this))
+ , m_pFieldmark(fieldBM)
{
if (fieldBM != nullptr)
{
@@ -56,12 +56,12 @@ SwFieldDialog::SwFieldDialog(SwEditWin* parent, sw::mark::IFieldmark* fieldBM, l
{
pListEntries->second >>= vListEntries;
for (OUString const& i : std::as_const(vListEntries))
- aListBox->InsertEntry(i);
+ m_aListBox->InsertEntry(i);
}
if (!vListEntries.hasElements())
{
- aListBox->InsertEntry(SwResId(STR_DROP_DOWN_EMPTY_LIST));
+ m_aListBox->InsertEntry(SwResId(STR_DROP_DOWN_EMPTY_LIST));
}
// Select the current one
@@ -72,17 +72,17 @@ SwFieldDialog::SwFieldDialog(SwEditWin* parent, sw::mark::IFieldmark* fieldBM, l
{
sal_Int32 nSelection = -1;
pResult->second >>= nSelection;
- aListBox->SelectEntryPos(nSelection);
+ m_aListBox->SelectEntryPos(nSelection);
}
}
- Size lbSize(aListBox->GetOptimalSize());
+ Size lbSize(m_aListBox->GetOptimalSize());
lbSize.AdjustWidth(50);
lbSize.AdjustHeight(20);
lbSize.setWidth(std::max(lbSize.Width(), nMinListWidth));
- aListBox->SetSizePixel(lbSize);
- aListBox->SetSelectHdl(LINK(this, SwFieldDialog, MyListBoxHandler));
- aListBox->Show();
+ m_aListBox->SetSizePixel(lbSize);
+ m_aListBox->SetSelectHdl(LINK(this, SwFieldDialog, MyListBoxHandler));
+ m_aListBox->Show();
SetSizePixel(lbSize);
}
@@ -91,7 +91,7 @@ SwFieldDialog::~SwFieldDialog() { disposeOnce(); }
void SwFieldDialog::dispose()
{
- aListBox.disposeAndClear();
+ m_aListBox.disposeAndClear();
FloatingWindow::dispose();
}
@@ -110,8 +110,8 @@ IMPL_LINK(SwFieldDialog, MyListBoxHandler, ListBox&, rBox, void)
if (nSelection >= 0)
{
OUString sKey = ODF_FORMDROPDOWN_RESULT;
- (*pFieldmark->GetParameters())[sKey] <<= nSelection;
- pFieldmark->Invalidate();
+ (*m_pFieldmark->GetParameters())[sKey] <<= nSelection;
+ m_pFieldmark->Invalidate();
SwView& rView = static_cast<SwEditWin*>(GetParent())->GetView();
rView.GetDocShell()->SetModified();
}
diff --git a/sw/source/core/inc/swselectionlist.hxx b/sw/source/core/inc/swselectionlist.hxx
index 53350dd6485a..0fe63587ba81 100644
--- a/sw/source/core/inc/swselectionlist.hxx
+++ b/sw/source/core/inc/swselectionlist.hxx
@@ -39,8 +39,8 @@ class SwFrame;
class SwSelectionList
{
- std::list< SwPaM* > aList; // container for the selected text portions
- const SwFrame* pContext; // the context of these text portions
+ std::list< SwPaM* > m_aList; // container for the selected text portions
+ const SwFrame* m_pContext; // the context of these text portions
public:
/** Ctor to create an empty list for a given context
@@ -52,24 +52,24 @@ public:
/** Start of the container for the selected text portions
*/
- std::list<SwPaM*>::iterator getStart() { return aList.begin(); }
+ std::list<SwPaM*>::iterator getStart() { return m_aList.begin(); }
/** End of the container for the selected text portions
*/
- std::list<SwPaM*>::iterator getEnd() { return aList.end(); }
+ std::list<SwPaM*>::iterator getEnd() { return m_aList.end(); }
/** Adds a text portion to the selection list
@param pPam
represents a text portion to select
*/
- void insertPaM( SwPaM* pPam ) { aList.push_front( pPam ); }
+ void insertPaM( SwPaM* pPam ) { m_aList.push_front( pPam ); }
/** Reports if the list does not contain any text portion
@return true, if list is empty
*/
- bool isEmpty() const { return aList.empty(); }
+ bool isEmpty() const { return m_aList.empty(); }
/** Checks if the context of the list is equal to the context of the frame
diff --git a/sw/source/core/inc/unobookmark.hxx b/sw/source/core/inc/unobookmark.hxx
index 20b984742b73..297cd5a4ccfb 100644
--- a/sw/source/core/inc/unobookmark.hxx
+++ b/sw/source/core/inc/unobookmark.hxx
@@ -183,7 +183,7 @@ class SwXFieldmark final
: public SwXFieldmark_Base
{
::sw::mark::ICheckboxFieldmark* getCheckboxFieldmark();
- bool const isReplacementObject;
+ bool const m_bReplacementObject;
SwXFieldmark(bool isReplacementObject, SwDoc* pDoc);
diff --git a/sw/source/core/layout/swselectionlist.cxx b/sw/source/core/layout/swselectionlist.cxx
index 23f6de0e9b4e..b7628cbac93a 100644
--- a/sw/source/core/layout/swselectionlist.cxx
+++ b/sw/source/core/layout/swselectionlist.cxx
@@ -68,16 +68,16 @@ namespace {
}
SwSelectionList::SwSelectionList( const SwFrame* pInitCxt ) :
- pContext( getContext( pInitCxt ) )
+ m_pContext( getContext( pInitCxt ) )
{
}
bool SwSelectionList::checkContext( const SwFrame* pCheck )
{
pCheck = getContext( pCheck );
- if( !pContext )
- pContext = pCheck;
- return pContext == pCheck;
+ if( !m_pContext )
+ m_pContext = pCheck;
+ return m_pContext == pCheck;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/txatritr.cxx b/sw/source/core/txtnode/txatritr.cxx
index 3fd45de385ff..76c1f61c35fb 100644
--- a/sw/source/core/txtnode/txatritr.cxx
+++ b/sw/source/core/txtnode/txatritr.cxx
@@ -86,11 +86,11 @@ void SwScriptIterator::Next()
SwLanguageIterator::SwLanguageIterator( const SwTextNode& rTNd,
sal_Int32 nStt )
- : aSIter( rTNd.GetText(), nStt ),
- rTextNd( rTNd ),
- pParaItem( nullptr ),
- nAttrPos( 0 ),
- nChgPos( nStt )
+ : m_aScriptIter( rTNd.GetText(), nStt ),
+ m_rTextNode( rTNd ),
+ m_pParaItem( nullptr ),
+ m_nAttrPos( 0 ),
+ m_nChgPos( nStt )
{
SearchNextChg();
}
@@ -98,43 +98,43 @@ SwLanguageIterator::SwLanguageIterator( const SwTextNode& rTNd,
bool SwLanguageIterator::Next()
{
bool bRet = false;
- if (nChgPos < aSIter.GetText().getLength())
+ if (m_nChgPos < m_aScriptIter.GetText().getLength())
{
bRet = true;
- if( !aStack.empty() )
+ if( !m_aStack.empty() )
{
do {
- const SwTextAttr* pHt = aStack.front();
+ const SwTextAttr* pHt = m_aStack.front();
const sal_Int32 nEndPos = *pHt->End();
- if( nChgPos >= nEndPos )
- aStack.pop_front();
+ if( m_nChgPos >= nEndPos )
+ m_aStack.pop_front();
else
break;
- } while( !aStack.empty() );
+ } while( !m_aStack.empty() );
}
- if( !aStack.empty() )
+ if( !m_aStack.empty() )
{
- const size_t nSavePos = nAttrPos;
+ const size_t nSavePos = m_nAttrPos;
SearchNextChg();
- if( !aStack.empty() )
+ if( !m_aStack.empty() )
{
- const SwTextAttr* pHt = aStack.front();
+ const SwTextAttr* pHt = m_aStack.front();
const sal_Int32 nEndPos = *pHt->End();
- if( nChgPos >= nEndPos )
+ if( m_nChgPos >= nEndPos )
{
- nChgPos = nEndPos;
- nAttrPos = nSavePos;
+ m_nChgPos = nEndPos;
+ m_nAttrPos = nSavePos;
if( RES_TXTATR_CHARFMT == pHt->Which() )
{
- const sal_uInt16 nWId = GetWhichOfScript( RES_CHRATR_LANGUAGE, aSIter.GetCurrScript() );
- pCurItem = &pHt->GetCharFormat().GetCharFormat()->GetFormatAttr(nWId);
+ const sal_uInt16 nWId = GetWhichOfScript( RES_CHRATR_LANGUAGE, m_aScriptIter.GetCurrScript() );
+ m_pCurrentItem = &pHt->GetCharFormat().GetCharFormat()->GetFormatAttr(nWId);
}
else
- pCurItem = &pHt->GetAttr();
+ m_pCurrentItem = &pHt->GetAttr();
- aStack.pop_front();
+ m_aStack.pop_front();
}
}
}
@@ -148,53 +148,53 @@ void SwLanguageIterator::AddToStack( const SwTextAttr& rAttr )
{
size_t nIns = 0;
const sal_Int32 nEndPos = *rAttr.End();
- for( ; nIns < aStack.size(); ++nIns )
- if( *aStack[ nIns ]->End() > nEndPos )
+ for( ; nIns < m_aStack.size(); ++nIns )
+ if( *m_aStack[ nIns ]->End() > nEndPos )
break;
- aStack.insert( aStack.begin() + nIns, &rAttr );
+ m_aStack.insert( m_aStack.begin() + nIns, &rAttr );
}
void SwLanguageIterator::SearchNextChg()
{
sal_uInt16 nWh = 0;
- if( nChgPos == aSIter.GetScriptChgPos() )
+ if( m_nChgPos == m_aScriptIter.GetScriptChgPos() )
{
- aSIter.Next();
- pParaItem = nullptr;
- nAttrPos = 0; // must be restart at the beginning, because
+ m_aScriptIter.Next();
+ m_pParaItem = nullptr;
+ m_nAttrPos = 0; // must be restart at the beginning, because
// some attributes can start before or inside
// the current scripttype!
- aStack.clear();
+ m_aStack.clear();
}
- if( !pParaItem )
+ if( !m_pParaItem )
{
- nWh = GetWhichOfScript( RES_CHRATR_LANGUAGE, aSIter.GetCurrScript() );
- pParaItem = &rTextNd.GetSwAttrSet().Get( nWh );
+ nWh = GetWhichOfScript( RES_CHRATR_LANGUAGE, m_aScriptIter.GetCurrScript() );
+ m_pParaItem = &m_rTextNode.GetSwAttrSet().Get( nWh );
}
- sal_Int32 nStt = nChgPos;
- nChgPos = aSIter.GetScriptChgPos();
- pCurItem = pParaItem;
+ sal_Int32 nStt = m_nChgPos;
+ m_nChgPos = m_aScriptIter.GetScriptChgPos();
+ m_pCurrentItem = m_pParaItem;
- const SwpHints* pHts = rTextNd.GetpSwpHints();
+ const SwpHints* pHts = m_rTextNode.GetpSwpHints();
if( pHts )
{
if( !nWh )
{
- nWh = GetWhichOfScript( RES_CHRATR_LANGUAGE, aSIter.GetCurrScript() );
+ nWh = GetWhichOfScript( RES_CHRATR_LANGUAGE, m_aScriptIter.GetCurrScript() );
}
const SfxPoolItem* pItem = nullptr;
- for( ; nAttrPos < pHts->Count(); ++nAttrPos )
+ for( ; m_nAttrPos < pHts->Count(); ++m_nAttrPos )
{
- const SwTextAttr* pHt = pHts->Get( nAttrPos );
+ const SwTextAttr* pHt = pHts->Get( m_nAttrPos );
const sal_Int32* pEnd = pHt->End();
const sal_Int32 nHtStt = pHt->GetStart();
if( nHtStt < nStt && ( !pEnd || *pEnd <= nStt ))
continue;
- if( nHtStt >= nChgPos )
+ if( nHtStt >= m_nChgPos )
break;
pItem = CharFormat::GetItem( *pHt, nWh );
@@ -202,14 +202,14 @@ void SwLanguageIterator::SearchNextChg()
{
if( nHtStt > nStt )
{
- if( nChgPos > nHtStt )
- nChgPos = nHtStt;
+ if( m_nChgPos > nHtStt )
+ m_nChgPos = nHtStt;
break;
}
AddToStack( *pHt );
- pCurItem = pItem;
- if( *pEnd < nChgPos )
- nChgPos = *pEnd;
+ m_pCurrentItem = pItem;
+ if( *pEnd < m_nChgPos )
+ m_nChgPos = *pEnd;
}
}
}
diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx
index ddeaccf1966b..f27bdeaec023 100644
--- a/sw/source/core/unocore/unobkm.cxx
+++ b/sw/source/core/unocore/unobkm.cxx
@@ -523,7 +523,7 @@ SwXBookmark::removeVetoableChangeListener(
SwXFieldmark::SwXFieldmark(bool _isReplacementObject, SwDoc* pDc)
: SwXFieldmark_Base(pDc)
- , isReplacementObject(_isReplacementObject)
+ , m_bReplacementObject(_isReplacementObject)
{ }
void SwXFieldmarkParameters::insertByName(const OUString& aName, const uno::Any& aElement)
@@ -604,7 +604,7 @@ void SwXFieldmark::attachToRange( const uno::Reference < text::XTextRange >& xTe
{
attachToRangeEx( xTextRange,
- ( isReplacementObject ? IDocumentMarkAccess::MarkType::CHECKBOX_FIELDMARK : IDocumentMarkAccess::MarkType::TEXT_FIELDMARK ) );
+ ( m_bReplacementObject ? IDocumentMarkAccess::MarkType::CHECKBOX_FIELDMARK : IDocumentMarkAccess::MarkType::TEXT_FIELDMARK ) );
}
OUString SwXFieldmark::getFieldType()
More information about the Libreoffice-commits
mailing list