summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-21 16:47:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-22 07:40:33 +0100
commitc50357ff625972464d1a591afe4198d3f6f42a39 (patch)
tree6d10334c4af64b7c138f7c780e690659e66fd3f8
parent131cc96a890b8988703532d09773bb0bde20ee8a (diff)
loplugin:unusedfields in sw
Change-Id: Id68a01042f8398d7d4803a9ce7eb03620732f1ce Reviewed-on: https://gerrit.libreoffice.org/68163 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sw/inc/tox.hxx8
-rw-r--r--sw/source/core/edit/edfcol.cxx2
-rw-r--r--sw/source/core/unocore/unoidx.cxx6
-rw-r--r--sw/source/filter/xml/xmltbli.cxx44
-rw-r--r--sw/source/filter/xml/xmltbli.hxx4
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx4
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx2
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx1
-rw-r--r--sw/source/ui/vba/vbacolumn.cxx1
-rw-r--r--sw/source/ui/vba/vbacolumn.hxx1
-rw-r--r--sw/source/uibase/dbui/mmconfigitem.cxx1
-rw-r--r--sw/source/uibase/inc/conpoly.hxx3
-rw-r--r--sw/source/uibase/inc/mmconfigitem.hxx4
-rw-r--r--sw/source/uibase/inc/wrap.hxx1
-rw-r--r--sw/source/uibase/ribbar/conpoly.cxx9
15 files changed, 16 insertions, 75 deletions
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index ae5a75df26d6..75bf9d6e189c 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -61,7 +61,6 @@ class SW_DLLPUBLIC SwTOXMark
OUString m_aAltText; // Text of caption is different.
OUString m_aPrimaryKey;
OUString m_aSecondaryKey;
- OUString m_aCitationKeyReading;
// three more strings for phonetic sorting
OUString m_aTextReading;
@@ -120,7 +119,6 @@ public:
inline void SetTextReading(const OUString& rStr);
inline void SetPrimaryKeyReading(const OUString& rStr );
inline void SetSecondaryKeyReading(const OUString& rStr);
- inline void SetCitationKeyReading(const OUString& rStr);
inline OUString const & GetPrimaryKey() const;
inline OUString const & GetSecondaryKey() const;
@@ -591,12 +589,6 @@ inline void SwTOXMark::SetPrimaryKeyReading( const OUString& rKey )
m_aPrimaryKeyReading = rKey;
}
-inline void SwTOXMark::SetCitationKeyReading( const OUString& rKey )
-{
- SAL_WARN_IF(GetTOXType()->GetType() != TOX_CITATION, "sw", "Wrong type");
- m_aCitationKeyReading = rKey;
-}
-
inline void SwTOXMark::SetSecondaryKeyReading( const OUString& rKey )
{
SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index ab0b35bf18fa..f3d4fe945c27 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -349,7 +349,6 @@ struct SignatureDescr
OUString msSignature;
OUString msUsage;
OUString msDate;
- OUString msId;
bool isValid() const { return !msSignature.isEmpty(); }
};
@@ -359,7 +358,6 @@ SignatureDescr lcl_getSignatureDescr(const uno::Reference<frame::XModel>& xModel
const OUString& sFieldId)
{
SignatureDescr aDescr;
- aDescr.msId = sFieldId;
const OUString prefix = ParagraphSignatureRDFNamespace + sFieldId;
const std::map<OUString, OUString> aStatements = lcl_getRDFStatements(xModel, xParagraph);
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index c7f3397b62b0..de2b67a7da37 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -1877,11 +1877,7 @@ SwXDocumentIndexMark::attach(
aMark.SetMainEntry(m_pImpl->m_bMainEntry);
break;
case TOX_CITATION:
- if (!m_pImpl->m_sCitaitonText.isEmpty())
- {
- aMark.SetCitationKeyReading(m_pImpl->m_sCitaitonText);
- }
- aMark.SetMainEntry(m_pImpl->m_bMainEntry);
+ aMark.SetMainEntry(m_pImpl->m_bMainEntry);
break;
case TOX_USER:
case TOX_CONTENT:
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 10bdae565e64..885abd80a5e5 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -169,7 +169,6 @@ class SwXMLTableCell_Impl
{
OUString aStyleName;
- OUString mXmlId;
OUString m_StringValue;
OUString sFormula; // cell formula; valid if length > 0
@@ -207,8 +206,7 @@ public:
bool bHasValue,
bool bCovered,
double dVal,
- OUString const*const pStringValue,
- OUString const& i_rXmlId);
+ OUString const*const pStringValue);
bool IsUsed() const { return pStartNode!=nullptr ||
xSubTable.is() || bProtected;}
@@ -244,8 +242,7 @@ inline void SwXMLTableCell_Impl::Set( const OUString& rStyleName,
bool bHasVal,
bool bCov,
double dVal,
- OUString const*const pStringValue,
- OUString const& i_rXmlId )
+ OUString const*const pStringValue )
{
aStyleName = rStyleName;
nRowSpan = nRSpan;
@@ -262,11 +259,6 @@ inline void SwXMLTableCell_Impl::Set( const OUString& rStyleName,
m_bHasStringValue = (pStringValue != nullptr);
bProtected = bProtect;
- if (!mbCovered) // ensure uniqueness
- {
- mXmlId = i_rXmlId;
- }
-
// set formula, if valid
if (pFormula != nullptr)
{
@@ -295,21 +287,18 @@ class SwXMLTableRow_Impl
{
OUString aStyleName;
OUString aDfltCellStyleName;
- OUString mXmlId;
std::vector<std::unique_ptr<SwXMLTableCell_Impl>> m_Cells;
bool bSplitable;
public:
SwXMLTableRow_Impl( const OUString& rStyleName, sal_uInt32 nCells,
- const OUString *pDfltCellStyleName = nullptr,
- const OUString& i_rXmlId = OUString() );
+ const OUString *pDfltCellStyleName = nullptr );
inline SwXMLTableCell_Impl *GetCell( sal_uInt32 nCol );
inline void Set( const OUString& rStyleName,
- const OUString& rDfltCellStyleName,
- const OUString& i_rXmlId );
+ const OUString& rDfltCellStyleName );
void Expand( sal_uInt32 nCells, bool bOneCell );
@@ -324,10 +313,8 @@ public:
SwXMLTableRow_Impl::SwXMLTableRow_Impl( const OUString& rStyleName,
sal_uInt32 nCells,
- const OUString *pDfltCellStyleName,
- const OUString& i_rXmlId ) :
+ const OUString *pDfltCellStyleName ) :
aStyleName( rStyleName ),
- mXmlId( i_rXmlId ),
bSplitable( false )
{
if( pDfltCellStyleName )
@@ -373,12 +360,10 @@ void SwXMLTableRow_Impl::Expand( sal_uInt32 nCells, bool bOneCell )
}
inline void SwXMLTableRow_Impl::Set( const OUString& rStyleName,
- const OUString& rDfltCellStyleName,
- const OUString& i_rXmlId )
+ const OUString& rDfltCellStyleName )
{
aStyleName = rStyleName;
aDfltCellStyleName = rDfltCellStyleName;
- mXmlId = i_rXmlId;
}
void SwXMLTableRow_Impl::Dispose()
@@ -584,7 +569,6 @@ inline void SwXMLTableCellContext_Impl::InsertContent_()
!m_aStyleName.isEmpty()) ? & m_aStyleName : nullptr) );
GetTable()->InsertCell( m_aStyleName, m_nRowSpan, m_nColSpan,
pStartNode,
- mXmlId,
nullptr, m_bProtect, &m_sFormula, m_bHasValue, m_fValue,
(m_bHasStringValue && m_bValueTypeIsString) ? &m_StringValue : nullptr);
}
@@ -599,7 +583,7 @@ inline void SwXMLTableCellContext_Impl::InsertContent()
inline void SwXMLTableCellContext_Impl::InsertContent(
SwXMLTableContext *pTable )
{
- GetTable()->InsertCell( m_aStyleName, m_nRowSpan, m_nColSpan, nullptr, mXmlId, pTable, m_bProtect );
+ GetTable()->InsertCell( m_aStyleName, m_nRowSpan, m_nColSpan, nullptr, pTable, m_bProtect );
m_bHasTableContent = true;
}
@@ -931,8 +915,7 @@ SwXMLTableRowContext_Impl::SwXMLTableRowContext_Impl( SwXMLImport& rImport,
}
}
if( GetTable()->IsValid() )
- GetTable()->InsertRow( aStyleName, aDfltCellStyleName, bInHead,
- sXmlId );
+ GetTable()->InsertRow( aStyleName, aDfltCellStyleName, bInHead );
}
void SwXMLTableRowContext_Impl::EndElement()
@@ -1522,7 +1505,6 @@ OUString SwXMLTableContext::GetColumnDefaultCellStyleName( sal_uInt32 nCol ) con
void SwXMLTableContext::InsertCell( const OUString& rStyleName,
sal_uInt32 nRowSpan, sal_uInt32 nColSpan,
const SwStartNode *pStartNode,
- const OUString & i_rXmlId,
SwXMLTableContext *pTable,
bool bProtect,
const OUString* pFormula,
@@ -1622,7 +1604,7 @@ void SwXMLTableContext::InsertCell( const OUString& rStyleName,
throw css::lang::IndexOutOfBoundsException();
pCell->Set( sStyleName, j, i, pStartNode,
pTable, bProtect, pFormula, bHasValue, bCovered, fValue,
- pStringValue, i_rXmlId );
+ pStringValue );
}
}
@@ -1634,8 +1616,7 @@ void SwXMLTableContext::InsertCell( const OUString& rStyleName,
void SwXMLTableContext::InsertRow( const OUString& rStyleName,
const OUString& rDfltCellStyleName,
- bool bInHead,
- const OUString & i_rXmlId )
+ bool bInHead )
{
OSL_ENSURE( m_nCurRow < USHRT_MAX,
"SwXMLTableContext::InsertRow: no space left" );
@@ -1651,14 +1632,14 @@ void SwXMLTableContext::InsertRow( const OUString& rStyleName,
// The current row has already been inserted because of a row span
// of a previous row.
(*m_pRows)[m_nCurRow]->Set(
- rStyleName, rDfltCellStyleName, i_rXmlId );
+ rStyleName, rDfltCellStyleName );
}
else
{
// add a new row
m_pRows->push_back(std::make_unique<SwXMLTableRow_Impl>(
rStyleName, GetColumnCount(),
- &rDfltCellStyleName, i_rXmlId));
+ &rDfltCellStyleName));
}
// We start at the first column ...
@@ -1688,7 +1669,6 @@ void SwXMLTableContext::InsertRepRows( sal_uInt32 nCount )
InsertCell( pSrcCell->GetStyleName(), 1U,
pSrcCell->GetColSpan(),
InsertTableSection(),
- OUString(),
nullptr, pSrcCell->IsProtected(),
&pSrcCell->GetFormula(),
pSrcCell->HasValue(), pSrcCell->GetValue(),
diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx
index 157be580f67f..9d5272e46d37 100644
--- a/sw/source/filter/xml/xmltbli.hxx
+++ b/sw/source/filter/xml/xmltbli.hxx
@@ -163,7 +163,6 @@ public:
void InsertCell( const OUString& rStyleName,
sal_uInt32 nRowSpan, sal_uInt32 nColSpan,
const SwStartNode *pStNd,
- const OUString & i_rXmlId = OUString(),
SwXMLTableContext *pTable=nullptr,
bool bIsProtected = false,
const OUString *pFormula=nullptr,
@@ -172,8 +171,7 @@ public:
OUString const*const pStringValue = nullptr);
void InsertRow( const OUString& rStyleName,
const OUString& rDfltCellStyleName,
- bool bInHead,
- const OUString & i_rXmlId = OUString() );
+ bool bInHead );
void FinishRow();
void InsertRepRows( sal_uInt32 nCount );
const SwXMLTableCell_Impl *GetCell( sal_uInt32 nRow, sal_uInt32 nCol ) const;
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index bd6d4f7c9b88..aa5cca460593 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -154,8 +154,6 @@ struct DB_Column
struct DB_ColumnConfigData
{
SwInsDBColumns aDBColumns;
- OUString sSource;
- OUString sTable;
OUString sEdit;
OUString sTableList;
OUString sTmplNm;
@@ -1665,8 +1663,6 @@ void SwInsertDBColAutoPilot::Load()
if(sSource == aDBData.sDataSource && sCommand == aDBData.sCommand)
{
std::unique_ptr<DB_ColumnConfigData> pNewData(new DB_ColumnConfigData);
- pNewData->sSource = sSource;
- pNewData->sTable = sCommand;
pDataSourceProps[3] >>= pNewData->sEdit;
pDataSourceProps[4] >>= pNewData->sTableList;
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 6fb80114c077..c1296bf97f7a 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -266,7 +266,7 @@ SwFrameFormat* SwMailMergeLayoutPage::InsertAddressAndGreeting(SwView const * p
pAddressBlockFormat = InsertAddressFrame( pView->GetWrtShell(),
rConfigItem,
aAddressPosition, bAlignToBody, false);
- rConfigItem.SetAddressInserted(pAddressBlockFormat->GetName());
+ rConfigItem.SetAddressInserted();
}
//now the greeting
if(rConfigItem.IsGreetingLine(false) && !rConfigItem.IsGreetingInserted())
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index 41eade66087f..32c16bdac9ab 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -396,7 +396,6 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
aVal.nWidth = aSize.Width();
aVal.nHeight = aSize.Height();
- m_aFrameSize = aSize;
aMgr.ValidateMetrics(aVal, nullptr);
diff --git a/sw/source/ui/vba/vbacolumn.cxx b/sw/source/ui/vba/vbacolumn.cxx
index 5e6c4abe21df..624e4fe12d25 100644
--- a/sw/source/ui/vba/vbacolumn.cxx
+++ b/sw/source/ui/vba/vbacolumn.cxx
@@ -32,7 +32,6 @@ using namespace ::com::sun::star;
SwVbaColumn::SwVbaColumn( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextTable >& xTextTable, sal_Int32 nIndex ) :
SwVbaColumn_BASE( rParent, rContext ), mxTextTable( xTextTable ), mnIndex( nIndex )
{
- mxTableColumns = mxTextTable->getColumns();
}
SwVbaColumn::~SwVbaColumn()
diff --git a/sw/source/ui/vba/vbacolumn.hxx b/sw/source/ui/vba/vbacolumn.hxx
index 739fe99b8939..d2eaefbbff06 100644
--- a/sw/source/ui/vba/vbacolumn.hxx
+++ b/sw/source/ui/vba/vbacolumn.hxx
@@ -31,7 +31,6 @@ class SwVbaColumn : public SwVbaColumn_BASE
{
private:
css::uno::Reference< css::text::XTextTable > mxTextTable;
- css::uno::Reference< css::table::XTableColumns > mxTableColumns;
sal_Int32 const mnIndex;
public:
diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx
index e42f6e774278..3c641d4dbc0b 100644
--- a/sw/source/uibase/dbui/mmconfigitem.cxx
+++ b/sw/source/uibase/dbui/mmconfigitem.cxx
@@ -1543,7 +1543,6 @@ void SwMailMergeConfigItem::DocumentReloaded()
{
m_bGreetingInserted = false;
m_bAddressInserted = false;
- m_rAddressBlockFrame.clear();
}
bool SwMailMergeConfigItem::IsMailAvailable() const
diff --git a/sw/source/uibase/inc/conpoly.hxx b/sw/source/uibase/inc/conpoly.hxx
index f3276e3a2fef..f44ed07d5adc 100644
--- a/sw/source/uibase/inc/conpoly.hxx
+++ b/sw/source/uibase/inc/conpoly.hxx
@@ -24,15 +24,12 @@
// base class for all functions
class ConstPolygon : public SwDrawBase
{
- Point aLastPos;
-
public:
ConstPolygon(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
// Mouse- & Key-Events
virtual bool MouseMove(const MouseEvent& rMEvt) override;
virtual bool MouseButtonUp(const MouseEvent& rMEvt) override;
- virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
virtual void Activate(const sal_uInt16 nSlotId) override; // activate function
};
diff --git a/sw/source/uibase/inc/mmconfigitem.hxx b/sw/source/uibase/inc/mmconfigitem.hxx
index 9064bd2b220b..f6f6f66eb58b 100644
--- a/sw/source/uibase/inc/mmconfigitem.hxx
+++ b/sw/source/uibase/inc/mmconfigitem.hxx
@@ -56,7 +56,6 @@ class SW_DLLPUBLIC SwMailMergeConfigItem
bool m_bAddressInserted;
bool m_bGreetingInserted;
sal_Int32 m_nGreetingMoves;
- OUString m_rAddressBlockFrame;
std::set<sal_Int32> m_aExcludedRecords;
css::uno::Reference<css::view::XSelectionChangeListener> m_xDBChangedListener;
@@ -207,10 +206,9 @@ public:
//session information
bool IsAddressInserted() const { return m_bAddressInserted; }
- void SetAddressInserted(const OUString& rFrameName)
+ void SetAddressInserted()
{
m_bAddressInserted = true;
- m_rAddressBlockFrame = rFrameName;
}
bool IsGreetingInserted() const
diff --git a/sw/source/uibase/inc/wrap.hxx b/sw/source/uibase/inc/wrap.hxx
index 7b397a797e2e..c0d73b256e8b 100644
--- a/sw/source/uibase/inc/wrap.hxx
+++ b/sw/source/uibase/inc/wrap.hxx
@@ -38,7 +38,6 @@ class SwWrapTabPage: public SfxTabPage
RndStdIds m_nAnchorId;
sal_uInt16 m_nHtmlMode;
- Size m_aFrameSize;
SwWrtShell* m_pWrtSh;
bool m_bFormat;
diff --git a/sw/source/uibase/ribbar/conpoly.cxx b/sw/source/uibase/ribbar/conpoly.cxx
index ad573d06a80c..247306be78b6 100644
--- a/sw/source/uibase/ribbar/conpoly.cxx
+++ b/sw/source/uibase/ribbar/conpoly.cxx
@@ -33,15 +33,6 @@ ConstPolygon::ConstPolygon(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* p
{
}
-bool ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
-{
- bool bReturn = SwDrawBase::MouseButtonDown(rMEvt);
- if (bReturn)
- aLastPos = rMEvt.GetPosPixel();
-
- return bReturn;
-}
-
bool ConstPolygon::MouseMove(const MouseEvent& rMEvt)
{
bool bReturn = SwDrawBase::MouseMove(rMEvt);