Kaydet (Commit) c50357ff authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:unusedfields in sw

Change-Id: Id68a01042f8398d7d4803a9ce7eb03620732f1ce
Reviewed-on: https://gerrit.libreoffice.org/68163
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 131cc96a
......@@ -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");
......
......@@ -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);
......
......@@ -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:
......
......@@ -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(),
......
......@@ -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;
......
......@@ -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;
......
......@@ -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())
......
......@@ -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);
......
......@@ -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()
......
......@@ -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:
......
......@@ -1543,7 +1543,6 @@ void SwMailMergeConfigItem::DocumentReloaded()
{
m_bGreetingInserted = false;
m_bAddressInserted = false;
m_rAddressBlockFrame.clear();
}
bool SwMailMergeConfigItem::IsMailAvailable() const
......
......@@ -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
};
......
......@@ -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
......
......@@ -38,7 +38,6 @@ class SwWrapTabPage: public SfxTabPage
RndStdIds m_nAnchorId;
sal_uInt16 m_nHtmlMode;
Size m_aFrameSize;
SwWrtShell* m_pWrtSh;
bool m_bFormat;
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment