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

loplugin:unusedfields in editeng

Change-Id: I9806d87028a11a8103c35004c87b5098ca591409
Reviewed-on: https://gerrit.libreoffice.org/39495Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 9ad9c518
......@@ -282,8 +282,6 @@ desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx:120
dp_gui::UpdateCommandEnv m_installThread ::rtl::Reference<UpdateInstallDialog::Thread>
desktop/unx/source/splashx.c:369
input_mode long
editeng/source/editeng/impedit.hxx:515
ImpEditEngine bImpConvertFirstCall _Bool
embeddedobj/source/inc/oleembobj.hxx:127
OleEmbeddedObject m_nTargetState sal_Int32
embeddedobj/source/inc/oleembobj.hxx:139
......@@ -302,12 +300,8 @@ embeddedobj/source/inc/oleembobj.hxx:170
OleEmbeddedObject m_nStatusAspect sal_Int64
embeddedobj/source/inc/oleembobj.hxx:184
OleEmbeddedObject m_bFromClipboard _Bool
extensions/source/abpilot/datasourcehandling.cxx:303
abp::ODataSourceImpl bTablesUpToDate _Bool
extensions/source/propctrlr/propertyhandler.hxx:80
pcr::PropertyHandler m_aEnsureResAccess class pcr::PcrClient
extensions/source/propctrlr/usercontrol.hxx:102
pcr::OFormattedNumericControl m_nLastDecimalDigits sal_Int32
extensions/source/scanner/scanner.hxx:46
ScannerManager maProtector osl::Mutex
extensions/source/scanner/scanner.hxx:47
......@@ -928,32 +922,6 @@ include/drawinglayer/primitive2d/textlayoutdevice.hxx:61
drawinglayer::primitive2d::TextLayouterDevice maSolarGuard class SolarMutexGuard
include/editeng/adjustitem.hxx:39
SvxAdjustItem bLeft _Bool
include/editeng/editdata.hxx:226
HtmlImportInfo nTokenValue short
include/editeng/editdata.hxx:261
ParagraphInfos nParaHeight sal_uInt16
include/editeng/editdata.hxx:262
ParagraphInfos nLines sal_uInt16
include/editeng/editdata.hxx:264
ParagraphInfos nFirstLineStartX sal_uInt16
include/editeng/editdata.hxx:266
ParagraphInfos nFirstLineOffset sal_uInt16
include/editeng/editdata.hxx:278
EECharAttrib nPara sal_Int32
include/editeng/editdata.hxx:347
EENotify pEditEngine class EditEngine *
include/editeng/editdata.hxx:348
EENotify pEditView class EditView *
include/editeng/swafopt.hxx:81
SvxSwAutoFormatFlags bChkFontAttr _Bool
include/editeng/swafopt.hxx:99
SvxSwAutoFormatFlags bDummy _Bool
include/editeng/swafopt.hxx:120
SvxSwAutoFormatFlags bDummy6 _Bool
include/editeng/swafopt.hxx:121
SvxSwAutoFormatFlags bDummy7 _Bool
include/editeng/swafopt.hxx:122
SvxSwAutoFormatFlags bDummy8 _Bool
include/editeng/unotext.hxx:606
SvxUnoTextRangeEnumeration mxParentText css::uno::Reference<css::text::XText>
include/filter/msfilter/dffpropset.hxx:35
......
......@@ -1002,7 +1002,6 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, v
if ( GetNotifyHdl().IsSet() )
{
EENotify aNotify( EE_NOTIFY_INPUT_START );
aNotify.pEditEngine = this;
pImpEditEngine->CallNotify( aNotify );
}
......@@ -1403,7 +1402,6 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, v
if ( GetNotifyHdl().IsSet() )
{
EENotify aNotify( EE_NOTIFY_INPUT_END );
aNotify.pEditEngine = this;
pImpEditEngine->CallNotify( aNotify );
}
......@@ -2423,10 +2421,6 @@ ParagraphInfos EditEngine::GetParagraphInfos( sal_Int32 nPara )
DBG_ASSERT( pParaPortion && pLine, "GetParagraphInfos - Paragraph out of range" );
if ( pParaPortion && pLine )
{
aInfos.nParaHeight = (sal_uInt16)pParaPortion->GetHeight();
aInfos.nLines = pParaPortion->GetLines().Count();
aInfos.nFirstLineStartX = pLine->GetStartPosX();
aInfos.nFirstLineOffset = pParaPortion->GetFirstLineOffset();
aInfos.nFirstLineHeight = pLine->GetHeight();
aInfos.nFirstLineTextHeight = pLine->GetTxtHeight();
aInfos.nFirstLineMaxAscent = pLine->GetMaxAscent();
......@@ -2471,7 +2465,6 @@ void EditEngine::ParagraphInserted( sal_Int32 nPara )
if ( GetNotifyHdl().IsSet() )
{
EENotify aNotify( EE_NOTIFY_PARAGRAPHINSERTED );
aNotify.pEditEngine = this;
aNotify.nParagraph = nPara;
pImpEditEngine->CallNotify( aNotify );
}
......@@ -2483,7 +2476,6 @@ void EditEngine::ParagraphDeleted( sal_Int32 nPara )
if ( GetNotifyHdl().IsSet() )
{
EENotify aNotify( EE_NOTIFY_PARAGRAPHREMOVED );
aNotify.pEditEngine = this;
aNotify.nParagraph = nPara;
pImpEditEngine->CallNotify( aNotify );
}
......@@ -2506,7 +2498,6 @@ void EditEngine::ParagraphHeightChanged( sal_Int32 nPara )
if ( GetNotifyHdl().IsSet() )
{
EENotify aNotify( EE_NOTIFY_TextHeightChanged );
aNotify.pEditEngine = this;
aNotify.nParagraph = nPara;
pImpEditEngine->CallNotify( aNotify );
}
......
......@@ -756,7 +756,6 @@ void EditTextObjectImpl::GetCharAttribs( sal_Int32 nPara, std::vector<EECharAttr
const XEditAttribute& rAttr = *aAttrib.get();
EECharAttrib aEEAttr;
aEEAttr.pAttr = rAttr.GetItem();
aEEAttr.nPara = nPara;
aEEAttr.nStart = rAttr.GetStart();
aEEAttr.nEnd = rAttr.GetEnd();
rLst.push_back(aEEAttr);
......
......@@ -495,7 +495,6 @@ void EditHTMLParser::NextToken( HtmlTokenId nToken )
{
HtmlImportInfo aImportInfo(HtmlImportState::NextToken, this, mpEditEngine->CreateESelection(aCurSel));
aImportInfo.nToken = nToken;
aImportInfo.nTokenValue = (short)nTokenValue;
if ( nToken == HtmlTokenId::TEXTTOKEN )
aImportInfo.aText = aToken;
else if (nToken == HtmlTokenId::STYLE_OFF)
......
......@@ -44,7 +44,6 @@ HtmlImportInfo::HtmlImportInfo( HtmlImportState eSt, SvParser<HtmlTokenId>* pPrs
pParser = pPrsrs;
eState = eSt;
nToken = HtmlTokenId::NONE;
nTokenValue = 0;
}
HtmlImportInfo::~HtmlImportInfo()
......
......@@ -149,10 +149,7 @@ void ImpEditView::SetEditSelection( const EditSelection& rEditSelection )
{
eNotifyType = EE_NOTIFY_TEXTVIEWSELECTIONCHANGED;
}
//EENotify aNotify( EE_NOTIFY_TEXTVIEWSELECTIONCHANGED );
EENotify aNotify( eNotifyType );
aNotify.pEditEngine = pEditEngine;
aNotify.pEditView = GetEditViewPtr();
pEditEngine->pImpEditEngine->CallNotify( aNotify );
}
}
......@@ -1204,8 +1201,6 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck )
if ( pEditEngine->pImpEditEngine->GetNotifyHdl().IsSet() )
{
EENotify aNotify( EE_NOTIFY_TEXTVIEWSCROLLED );
aNotify.pEditEngine = pEditEngine;
aNotify.pEditView = GetEditViewPtr();
pEditEngine->pImpEditEngine->CallNotify( aNotify );
}
}
......
......@@ -512,7 +512,6 @@ private:
bool bUseAutoColor:1;
bool bForceAutoColor:1;
bool bCallParaInsertedOrDeleted:1;
bool bImpConvertFirstCall:1; // specifies if ImpConvert is called the very first time after Convert was called
bool bFirstWordCapitalization:1; // specifies if auto-correction should capitalize the first word or not
bool mbLastTryMerge:1;
bool mbReplaceLeadingSingleQuotationMark:1;
......
......@@ -105,7 +105,6 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) :
bUseAutoColor(true),
bForceAutoColor(false),
bCallParaInsertedOrDeleted(false),
bImpConvertFirstCall(false),
bFirstWordCapitalization(true),
mbLastTryMerge(false),
mbReplaceLeadingSingleQuotationMark(true)
......@@ -724,7 +723,6 @@ void ImpEditEngine::TextModified()
if ( GetNotifyHdl().IsSet() )
{
EENotify aNotify( EE_NOTIFY_TEXTMODIFIED );
aNotify.pEditEngine = GetEditEnginePtr();
CallNotify( aNotify );
}
}
......@@ -2194,7 +2192,6 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, sal_Int32 n
if ( GetNotifyHdl().IsSet() )
{
EENotify aNotify( EE_NOTIFY_PARAGRAPHSMOVED );
aNotify.pEditEngine = GetEditEnginePtr();
aNotify.nParagraph = nNewPos;
aNotify.nParam1 = aOldPositions.Min();
aNotify.nParam2 = aOldPositions.Max();
......@@ -4421,7 +4418,6 @@ void ImpEditEngine::EnterBlockNotifications()
// external, non-queued events to be captured as well from
// client side
EENotify aNotify( EE_NOTIFY_BLOCKNOTIFICATION_START );
aNotify.pEditEngine = GetEditEnginePtr();
GetNotifyHdl().Call( aNotify );
}
......@@ -4445,7 +4441,6 @@ void ImpEditEngine::LeaveBlockNotifications()
}
EENotify aNotify( EE_NOTIFY_BLOCKNOTIFICATION_END );
aNotify.pEditEngine = GetEditEnginePtr();
GetNotifyHdl().Call( aNotify );
}
}
......
......@@ -1596,8 +1596,6 @@ void ImpEditEngine::Convert( EditView* pEditView,
else if ( CreateEPaM( aEditDoc.GetStartPaM() ) == pConvInfo->aConvStart )
bIsStart = true;
bImpConvertFirstCall = true; // next ImpConvert call is the very first in this conversion turn
TextConvWrapper aWrp( Application::GetDefDialogParent(),
::comphelper::getProcessComponentContext(),
LanguageTag::convertToLocale( nSrcLang ),
......
......@@ -746,7 +746,6 @@ void ImpEditEngine::GetCharAttribs( sal_Int32 nPara, std::vector<EECharAttrib>&
const EditCharAttrib& rAttr = *i.get();
EECharAttrib aEEAttr;
aEEAttr.pAttr = rAttr.GetItem();
aEEAttr.nPara = nPara;
aEEAttr.nStart = rAttr.GetStart();
aEEAttr.nEnd = rAttr.GetEnd();
rLst.push_back(aEEAttr);
......
......@@ -28,7 +28,6 @@ SvxSwAutoFormatFlags::SvxSwAutoFormatFlags()
bAutoCorrect =
bCapitalStartSentence =
bCapitalStartWord =
bChkFontAttr =
bChgUserColl =
bChgEnumNum =
bAddNonBrkSpace =
......@@ -39,8 +38,7 @@ SvxSwAutoFormatFlags::SvxSwAutoFormatFlags()
bAFormatDelSpacesAtSttEnd =
bAFormatDelSpacesBetweenLines =
bAFormatByInpDelSpacesAtSttEnd =
bAFormatByInpDelSpacesBetweenLines =
bDummy = true;
bAFormatByInpDelSpacesBetweenLines = true;
bReplaceStyles =
bDelEmptyNode =
......@@ -58,9 +56,6 @@ SvxSwAutoFormatFlags::SvxSwAutoFormatFlags()
bAutoCmpltCollectWords =
bAutoCmpltKeepList = true;
bDummy6 = bDummy7 = bDummy8 =
false;
nRightMargin = 50; // default 50%
nAutoCmpltExpandKey = KEY_RETURN;
......@@ -86,7 +81,6 @@ SvxSwAutoFormatFlags& SvxSwAutoFormatFlags::operator=( const SvxSwAutoFormatFlag
bAutoCorrect = rAFFlags.bAutoCorrect;
bCapitalStartSentence = rAFFlags.bCapitalStartSentence;
bCapitalStartWord = rAFFlags.bCapitalStartWord;
bChkFontAttr = rAFFlags.bChkFontAttr;
bChgUserColl = rAFFlags.bChgUserColl;
bChgEnumNum = rAFFlags.bChgEnumNum;
......@@ -107,12 +101,6 @@ SvxSwAutoFormatFlags& SvxSwAutoFormatFlags::operator=( const SvxSwAutoFormatFlag
bAFormatByInpDelSpacesAtSttEnd = rAFFlags.bAFormatByInpDelSpacesAtSttEnd;
bAFormatByInpDelSpacesBetweenLines = rAFFlags.bAFormatByInpDelSpacesBetweenLines;
bDummy = rAFFlags.bDummy;
bDummy6 = rAFFlags.bDummy6;
bDummy7 = rAFFlags.bDummy7;
bDummy8 = rAFFlags.bDummy8;
bWithRedlining = rAFFlags.bWithRedlining;
bRightMargin = rAFFlags.bRightMargin;
......
......@@ -298,12 +298,10 @@ namespace abp
::utl::SharedUNOComponent< XConnection >
xConnection;
StringBag aTables; // the cached table names
OUString sName;
bool bTablesUpToDate; // table name cache up-to-date?
OUString sName;
explicit ODataSourceImpl(const Reference< XComponentContext >& _rxORB)
: xORB(_rxORB)
, bTablesUpToDate(false)
{
}
......@@ -317,7 +315,6 @@ namespace abp
,xConnection( _rSource.xConnection )
,aTables( _rSource.aTables )
,sName( _rSource.sName )
,bTablesUpToDate( _rSource.bTablesUpToDate )
{
}
......@@ -518,7 +515,6 @@ namespace abp
}
// now the table cache is up-to-date
m_pImpl->bTablesUpToDate = true;
return m_pImpl->aTables;
}
......@@ -607,7 +603,6 @@ namespace abp
// success
m_pImpl->xConnection.reset( xConnection );
m_pImpl->aTables.clear();
m_pImpl->bTablesUpToDate = false;
return true;
}
......@@ -617,7 +612,6 @@ namespace abp
{
m_pImpl->xConnection.clear();
m_pImpl->aTables.clear();
m_pImpl->bTablesUpToDate = false;
}
......
......@@ -173,8 +173,6 @@ namespace pcr
:OFormattedNumericControl_Base( PropertyControlType::Unknown, pParent, nWinStyle )
{
getTypedControlWindow()->TreatAsNumber(true);
m_nLastDecimalDigits = getTypedControlWindow()->GetDecimalDigits();
}
......@@ -225,24 +223,6 @@ namespace pcr
DBG_ASSERT( pEntry, "OFormattedNumericControl::SetFormatDescription: invalid format key!" );
if ( pEntry )
{
switch (pEntry->GetType() & ~css::util::NumberFormat::DEFINED)
{
case css::util::NumberFormat::NUMBER:
case css::util::NumberFormat::CURRENCY:
case css::util::NumberFormat::SCIENTIFIC:
case css::util::NumberFormat::FRACTION:
case css::util::NumberFormat::PERCENT:
m_nLastDecimalDigits = getTypedControlWindow()->GetDecimalDigits();
break;
case css::util::NumberFormat::DATETIME:
case css::util::NumberFormat::DATE:
case css::util::NumberFormat::TIME:
m_nLastDecimalDigits = 7;
break;
default:
m_nLastDecimalDigits = 0;
break;
}
bFallback = false;
}
......@@ -253,7 +233,6 @@ namespace pcr
getTypedControlWindow()->TreatAsNumber(false);
getTypedControlWindow()->SetFormatter(nullptr);
getTypedControlWindow()->SetText("");
m_nLastDecimalDigits = 0;
}
}
......
......@@ -98,9 +98,6 @@ namespace pcr
typedef CommonBehaviourControl< css::inspection::XPropertyControl, FormattedField > OFormattedNumericControl_Base;
class OFormattedNumericControl : public OFormattedNumericControl_Base
{
private:
sal_Int32 m_nLastDecimalDigits;
public:
OFormattedNumericControl( vcl::Window* pParent, WinBits nWinStyle);
......@@ -112,7 +109,7 @@ namespace pcr
void SetFormatDescription( const FormatDescription& rDesc );
// make some FormattedField methods available
void SetDecimalDigits(sal_uInt16 nPrecision) { getTypedControlWindow()->SetDecimalDigits(nPrecision); m_nLastDecimalDigits = nPrecision; }
void SetDecimalDigits(sal_uInt16 nPrecision) { getTypedControlWindow()->SetDecimalDigits(nPrecision); }
void SetDefaultValue(double dDef) { getTypedControlWindow()->SetDefaultValue(dDef); }
void EnableEmptyField(bool bEnable) { getTypedControlWindow()->EnableEmptyField(bEnable); }
void SetThousandsSep(bool bEnable) { getTypedControlWindow()->SetThousandsSep(bEnable); }
......
......@@ -223,7 +223,6 @@ struct HtmlImportInfo
HtmlImportState eState;
HtmlTokenId nToken;
short nTokenValue;
OUString aText;
......@@ -249,21 +248,12 @@ struct RtfImportInfo
struct ParagraphInfos
{
ParagraphInfos()
: nParaHeight( 0 )
, nLines( 0 )
, nFirstLineStartX( 0 )
, nFirstLineOffset( 0 )
, nFirstLineHeight( 0 )
: nFirstLineHeight( 0 )
, nFirstLineTextHeight ( 0 )
, nFirstLineMaxAscent( 0 )
, bValid( false )
{}
sal_uInt16 nParaHeight;
sal_uInt16 nLines;
sal_uInt16 nFirstLineStartX;
sal_uInt16 nFirstLineOffset;
sal_uInt16 nFirstLineHeight;
sal_uInt16 nFirstLineTextHeight;
sal_uInt16 nFirstLineMaxAscent;
......@@ -275,7 +265,6 @@ struct EECharAttrib
{
const SfxPoolItem* pAttr;
sal_Int32 nPara;
sal_Int32 nStart;
sal_Int32 nEnd;
};
......@@ -344,8 +333,6 @@ enum EENotifyType
struct EENotify
{
EENotifyType eNotificationType;
EditEngine* pEditEngine;
EditView* pEditView;
sal_Int32 nParagraph; // only valid in PARAGRAPHINSERTED/EE_NOTIFY_PARAGRAPHREMOVED
......@@ -353,7 +340,7 @@ struct EENotify
sal_Int32 nParam2;
EENotify( EENotifyType eType )
{ eNotificationType = eType; pEditEngine = nullptr; pEditView = nullptr; nParagraph = EE_PARA_NOT_FOUND; nParam1 = 0; nParam2 = 0; }
{ eNotificationType = eType; nParagraph = EE_PARA_NOT_FOUND; nParam1 = 0; nParam2 = 0; }
};
#endif // INCLUDED_EDITENG_EDITDATA_HXX
......
......@@ -78,7 +78,6 @@ struct EDITENG_DLLPUBLIC SvxSwAutoFormatFlags
bool bAutoCorrect : 1;
bool bCapitalStartSentence : 1;
bool bCapitalStartWord : 1;
bool bChkFontAttr : 1;
bool bChgUserColl : 1;
bool bChgEnumNum : 1;
......@@ -96,7 +95,6 @@ struct EDITENG_DLLPUBLIC SvxSwAutoFormatFlags
bool bSetBorder : 1;
bool bCreateTable : 1;
bool bReplaceStyles : 1;
bool bDummy : 1;
bool bWithRedlining : 1;
......@@ -116,12 +114,6 @@ struct EDITENG_DLLPUBLIC SvxSwAutoFormatFlags
bool bAutoCmpltKeepList : 1;
// some dummies for any new options
bool bDummy6 : 1,
bDummy7 : 1,
bDummy8 : 1
;
SvxSwAutoFormatFlags();
SvxSwAutoFormatFlags( const SvxSwAutoFormatFlags& rAFFlags ) { *this = rAFFlags; }
SvxSwAutoFormatFlags& operator=( const SvxSwAutoFormatFlags& );
......
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