Skip to content

Commit

Permalink
loplugin:unusedfields in formula..registry
Browse files Browse the repository at this point in the history
Change-Id: I031654d8bb4f1788d364ef4f8d3bf7a05fadb148
Reviewed-on: https://gerrit.libreoffice.org/54454
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
  • Loading branch information
Noel Grandin committed May 17, 2018
1 parent f046fed commit b275246
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 75 deletions.
18 changes: 8 additions & 10 deletions formula/source/ui/dlg/formula.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,6 @@ class FormulaDlg_Impl
bool m_bIsShutDown;
bool m_bMakingTree; // in method of constructing tree

vcl::Font m_aFntBold;
vcl::Font m_aFntLight;
bool m_bEditFlag;
const IFunctionDescription* m_pFuncDesc;
sal_Int32 m_nArgs;
Expand Down Expand Up @@ -331,18 +329,18 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent
m_pMEdit->SetModifyHdl( LINK( this, FormulaDlg_Impl, FormulaHdl ) );
m_pMEFormula->SetSelChangedHdl( LINK( this, FormulaDlg_Impl, FormulaCursorHdl ) );

m_aFntLight = m_pFtFormula->GetFont();
m_aFntLight.SetTransparent( true );
m_aFntBold = m_aFntLight;
m_aFntBold.SetWeight( WEIGHT_BOLD );
vcl::Font aFntLight = m_pFtFormula->GetFont();
aFntLight.SetTransparent( true );
vcl::Font aFntBold = aFntLight;
aFntBold.SetWeight( WEIGHT_BOLD );

m_pParaWin->SetArgumentFonts( m_aFntBold, m_aFntLight);
m_pParaWin->SetArgumentFonts( aFntBold, aFntLight);

// function description for choosing a function is no longer in a different color

m_pFtHeadLine->SetFont(m_aFntBold);
m_pFtFuncName->SetFont(m_aFntLight);
m_pFtFuncDesc->SetFont(m_aFntLight);
m_pFtHeadLine->SetFont(aFntBold);
m_pFtFuncName->SetFont(aFntLight);
m_pFtFuncDesc->SetFont(aFntLight);
}

FormulaDlg_Impl::~FormulaDlg_Impl()
Expand Down
4 changes: 2 additions & 2 deletions fpicker/source/office/RemoteFilesDialog.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, PickerFlags nBits )

m_eMode = ( nBits & PickerFlags::SaveAs ) ? REMOTEDLG_MODE_SAVE : REMOTEDLG_MODE_OPEN;
m_eType = ( nBits & PickerFlags::PathDialog ) ? REMOTEDLG_TYPE_PATHDLG : REMOTEDLG_TYPE_FILEDLG;
m_bMultiselection = bool( nBits & PickerFlags::MultiSelection );
bool bMultiselection = bool( nBits & PickerFlags::MultiSelection );
m_bIsUpdated = false;
m_bIsConnected = false;
m_bServiceChanged = false;
Expand Down Expand Up @@ -245,7 +245,7 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, PickerFlags nBits )

m_pFileView = VclPtr< SvtFileView >::Create( m_pContainer, WB_BORDER | WB_TABSTOP,
REMOTEDLG_TYPE_PATHDLG == m_eType,
m_bMultiselection, false );
bMultiselection, false );

m_pFileView->Show();
m_pFileView->EnableAutoResize();
Expand Down
1 change: 0 additions & 1 deletion fpicker/source/office/RemoteFilesDialog.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ private:

SvtRemoteDlgMode m_eMode;
SvtRemoteDlgType m_eType;
bool m_bMultiselection;
bool m_bIsUpdated;
bool m_bIsConnected;
bool m_bServiceChanged;
Expand Down
13 changes: 0 additions & 13 deletions framework/inc/jobs/jobresult.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ class JobResult final

private:

/** hold the original pure result, which was given back by an
executed job
We analyze it and use it to set all our other members.
*/
css::uno::Any m_aPureResult;

/**
an user of us must know, which (possible) parts of
a "pure result" was really set by an executed job.
Expand All @@ -85,13 +79,6 @@ class JobResult final
*/
std::vector< css::beans::NamedValue > m_lArguments;

/**
an executed job can force his deactivation
But we provide this information here only.
Doing so is part of any user of us.
*/
bool m_bDeactivate;

/**
represent the part "DispatchResult"
It's a fulfilled event type, which was given
Expand Down
9 changes: 0 additions & 9 deletions framework/inc/jobs/joburl.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,6 @@ class JobURL
/** holds the service part of a job URL */
OUString m_sService;

/** holds the event arguments */
OUString m_sEventArgs;

/** holds the alias arguments */
OUString m_sAliasArgs;

/** holds the service arguments */
OUString m_sServiceArgs;

// native interface

public:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class ModuleAcceleratorConfiguration : public ModuleAcceleratorConfiguration_BAS
/** identify the application module, where this accelerator
configuration cache should work on. */
OUString m_sModule;
OUString m_sLocale;

public:

Expand Down Expand Up @@ -106,7 +105,7 @@ ModuleAcceleratorConfiguration::ModuleAcceleratorConfiguration(
{
::comphelper::SequenceAsHashMap lArgs(lArguments);
m_sModule = lArgs.getUnpackedValueOrDefault("ModuleIdentifier", OUString());
m_sLocale = lArgs.getUnpackedValueOrDefault("Locale", OUString("x-default"));
// OUString sLocale = lArgs.getUnpackedValueOrDefault("Locale", OUString("x-default"));
}

if (m_sModule.isEmpty())
Expand Down
20 changes: 8 additions & 12 deletions framework/source/jobs/jobresult.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ namespace framework{
but it marks this new instance as non valid!
*/
JobResult::JobResult()
: m_bDeactivate(false)
{
// reset the flag mask!
// It will reset the accessible state of this object.
Expand Down Expand Up @@ -87,12 +86,7 @@ JobResult::JobResult()
the job result
*/
JobResult::JobResult( /*IN*/ const css::uno::Any& aResult )
: m_bDeactivate(false)
{
// safe the pure result
// May someone need it later ...
m_aPureResult = aResult;

// reset the flag mask!
// It will reset the accessible state of this object.
// That can be useful if something will fail here ...
Expand All @@ -106,8 +100,14 @@ JobResult::JobResult( /*IN*/ const css::uno::Any& aResult )
::comphelper::SequenceAsHashMap::const_iterator pIt = aProtocol.find(JobConst::ANSWER_DEACTIVATE_JOB());
if (pIt != aProtocol.end())
{
pIt->second >>= m_bDeactivate;
if (m_bDeactivate)
/**
an executed job can force his deactivation
But we provide this information here only.
Doing so is part of any user of us.
*/
bool bDeactivate;
pIt->second >>= bDeactivate;
if (bDeactivate)
m_eParts |= E_DEACTIVATE;
}

Expand All @@ -134,10 +134,8 @@ JobResult::JobResult( /*IN*/ const css::uno::Any& aResult )
*/
JobResult::JobResult( const JobResult& rCopy )
{
m_aPureResult = rCopy.m_aPureResult;
m_eParts = rCopy.m_eParts;
m_lArguments = rCopy.m_lArguments;
m_bDeactivate = rCopy.m_bDeactivate;
m_aDispatchResult = rCopy.m_aDispatchResult;
}

Expand All @@ -160,10 +158,8 @@ JobResult::~JobResult()
JobResult& JobResult::operator=( const JobResult& rCopy )
{
SolarMutexGuard g;
m_aPureResult = rCopy.m_aPureResult;
m_eParts = rCopy.m_eParts;
m_lArguments = rCopy.m_lArguments;
m_bDeactivate = rCopy.m_bDeactivate;
m_aDispatchResult = rCopy.m_aDispatchResult;
return *this;
}
Expand Down
3 changes: 0 additions & 3 deletions framework/source/jobs/joburl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ JobURL::JobURL( /*IN*/ const OUString& sURL )
{
// set the part value
m_sEvent = sPartValue;
m_sEventArgs = sPartArguments;
m_eRequest |= E_EVENT;
}
else
Expand All @@ -77,7 +76,6 @@ JobURL::JobURL( /*IN*/ const OUString& sURL )
{
// set the part value
m_sAlias = sPartValue;
m_sAliasArgs = sPartArguments;
m_eRequest |= E_ALIAS;
}
else
Expand All @@ -89,7 +87,6 @@ JobURL::JobURL( /*IN*/ const OUString& sURL )
{
// set the part value
m_sService = sPartValue;
m_sServiceArgs = sPartArguments;
m_eRequest |= E_SERVICE;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ class ModuleUIConfigurationManager : public cppu::WeakImplHelper<
OUString m_aPropUIName;
OUString m_aPropResourceURL;
OUString m_aModuleIdentifier;
OUString m_aModuleShortName;
css::uno::Reference< css::embed::XTransactedObject > m_xUserRootCommit;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
osl::Mutex m_mutex;
Expand Down Expand Up @@ -846,13 +845,14 @@ ModuleUIConfigurationManager::ModuleUIConfigurationManager(

SolarMutexGuard g;

if( aArguments.getLength() == 2 && (aArguments[0] >>= m_aModuleShortName) && (aArguments[1] >>= m_aModuleIdentifier))
OUString aModuleShortName;
if( aArguments.getLength() == 2 && (aArguments[0] >>= aModuleShortName) && (aArguments[1] >>= m_aModuleIdentifier))
{
}
else
{
::comphelper::SequenceAsHashMap lArgs(aArguments);
m_aModuleShortName = lArgs.getUnpackedValueOrDefault("ModuleShortName", OUString());
aModuleShortName = lArgs.getUnpackedValueOrDefault("ModuleShortName", OUString());
m_aModuleIdentifier = lArgs.getUnpackedValueOrDefault("ModuleIdentifier", OUString());
}

Expand All @@ -873,7 +873,7 @@ ModuleUIConfigurationManager::ModuleUIConfigurationManager(
m_pStorageHandler[i].reset( new PresetHandler( m_xContext ) );
m_pStorageHandler[i]->connectToResource( PresetHandler::E_MODULES,
aResourceType, // this path won't be used later... see next lines!
m_aModuleShortName,
aModuleShortName,
css::uno::Reference< css::embed::XStorage >()); // no document root used here!
}
}
Expand Down
6 changes: 0 additions & 6 deletions lingucomponent/source/languageguessing/guess.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ inline bool isSeparator(const char c){
Guess::Guess()
: language_str(DEFAULT_LANGUAGE)
, country_str(DEFAULT_COUNTRY)
, encoding_str(DEFAULT_ENCODING)
{
}

Expand All @@ -59,7 +58,6 @@ Guess::Guess()
Guess::Guess(const char * guess_str)
: language_str(DEFAULT_LANGUAGE)
, country_str(DEFAULT_COUNTRY)
, encoding_str(DEFAULT_ENCODING)
{
string lang;
string country;
Expand Down Expand Up @@ -103,10 +101,6 @@ Guess::Guess(const char * guess_str)
language_str=lang;
}
country_str=country;

if(enc!=""){//if not we use the default value
encoding_str=enc;
}
}
}

Expand Down
1 change: 0 additions & 1 deletion lingucomponent/source/languageguessing/guess.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class Guess final {
private:
string language_str;
string country_str;
string encoding_str;
};

#endif
Expand Down
18 changes: 6 additions & 12 deletions registry/source/reflread.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,6 @@ class FieldList : public BlopObject
public:

sal_uInt16 m_numOfEntries;
sal_uInt16 m_numOfFieldEntries;
size_t m_FIELD_ENTRY_SIZE;
ConstantPool* m_pCP;

Expand All @@ -563,11 +562,10 @@ class FieldList : public BlopObject
{
if ( m_numOfEntries > 0 )
{
m_numOfFieldEntries = readUINT16(0);
m_FIELD_ENTRY_SIZE = m_numOfFieldEntries * sizeof(sal_uInt16);
sal_uInt16 numOfFieldEntries = readUINT16(0);
m_FIELD_ENTRY_SIZE = numOfFieldEntries * sizeof(sal_uInt16);
} else
{
m_numOfFieldEntries = 0;
m_FIELD_ENTRY_SIZE = 0;
}
}
Expand Down Expand Up @@ -738,7 +736,6 @@ class ReferenceList : public BlopObject
public:

sal_uInt16 m_numOfEntries;
sal_uInt16 m_numOfReferenceEntries;
size_t m_REFERENCE_ENTRY_SIZE;
ConstantPool* m_pCP;

Expand All @@ -749,11 +746,10 @@ class ReferenceList : public BlopObject
{
if ( m_numOfEntries > 0 )
{
m_numOfReferenceEntries = readUINT16(0);
m_REFERENCE_ENTRY_SIZE = m_numOfReferenceEntries * sizeof(sal_uInt16);
sal_uInt16 numOfReferenceEntries = readUINT16(0);
m_REFERENCE_ENTRY_SIZE = numOfReferenceEntries * sizeof(sal_uInt16);
} else
{
m_numOfReferenceEntries = 0;
m_REFERENCE_ENTRY_SIZE = 0;
}
}
Expand Down Expand Up @@ -840,7 +836,6 @@ class MethodList : public BlopObject
public:

sal_uInt16 m_numOfEntries;
sal_uInt16 m_numOfParamEntries;
size_t m_PARAM_ENTRY_SIZE;
std::unique_ptr<sal_uInt32[]> m_pIndex;
ConstantPool* m_pCP;
Expand All @@ -853,11 +848,10 @@ class MethodList : public BlopObject
if ( m_numOfEntries > 0 )
{
readUINT16(0) /* numOfMethodEntries */;
m_numOfParamEntries = readUINT16(sizeof(sal_uInt16));
m_PARAM_ENTRY_SIZE = m_numOfParamEntries * sizeof(sal_uInt16);
sal_uInt16 numOfParamEntries = readUINT16(sizeof(sal_uInt16));
m_PARAM_ENTRY_SIZE = numOfParamEntries * sizeof(sal_uInt16);
} else
{
m_numOfParamEntries = 0;
m_PARAM_ENTRY_SIZE = 0;
}
}
Expand Down

0 comments on commit b275246

Please sign in to comment.