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

loplugin:unusedfields

Change-Id: I8dc5a6ef84f43bad0bee26592b3a8e95c58e6f22
Reviewed-on: https://gerrit.libreoffice.org/72027
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 3a98352f
......@@ -166,7 +166,6 @@ void OMarkableTreeListBox::CheckButtons()
void OMarkableTreeListBox::CheckButtonHdl()
{
checkedButton_noBroadcast(GetHdlEntry());
m_aCheckButtonHandler.Call(this);
}
void OMarkableTreeListBox::checkedButton_noBroadcast(SvTreeListEntry* _pEntry)
......
......@@ -67,8 +67,6 @@ namespace DatabaseObjectContainer = ::com::sun::star::sdb::application::Database
OTableTreeListBox::OTableTreeListBox(vcl::Window* pParent, WinBits nWinStyle)
:OMarkableTreeListBox(pParent, nWinStyle)
,m_xImageProvider( new ImageProvider )
,m_bVirtualRoot(false)
,m_bNoEmptyFolders( false )
{
implSetDefaultImages();
}
......@@ -319,20 +317,6 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn
try
{
if (haveVirtualRoot())
{
OUString sRootEntryText;
if ( std::none_of(_rTables.begin(),_rTables.end(),
[] (const TNames::value_type& name) { return !name.second; }) )
sRootEntryText = DBA_RES(STR_ALL_TABLES);
else if ( std::none_of(_rTables.begin(),_rTables.end(),
[] (const TNames::value_type& name) { return name.second; }) )
sRootEntryText = DBA_RES(STR_ALL_VIEWS);
else
sRootEntryText = DBA_RES(STR_ALL_TABLES_AND_VIEWS);
InsertEntry( sRootEntryText, nullptr, false, TREELIST_APPEND, reinterpret_cast< void* >( DatabaseObjectContainer::TABLES ) );
}
if ( _rTables.empty() )
// nothing to do (besides inserting the root entry)
return;
......@@ -349,7 +333,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn
);
}
if ( !m_bNoEmptyFolders && lcl_shouldDisplayEmptySchemasAndCatalogs( _rxConnection ) )
if ( lcl_shouldDisplayEmptySchemasAndCatalogs( _rxConnection ) )
{
bool bSupportsCatalogs = xMeta->supportsCatalogsInDataManipulation();
bool bSupportsSchemas = xMeta->supportsSchemasInDataManipulation();
......@@ -365,12 +349,11 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn
bCatalogs ? xMeta->getCatalogs() : xMeta->getSchemas(), 1 ) );
sal_Int32 nFolderType = bCatalogs ? DatabaseObjectContainer::CATALOG : DatabaseObjectContainer::SCHEMA;
SvTreeListEntry* pRootEntry = getAllObjectsEntry();
for (auto const& folderName : aFolderNames)
{
SvTreeListEntry* pFolder = GetEntryPosByName( folderName, pRootEntry );
SvTreeListEntry* pFolder = GetEntryPosByName( folderName, nullptr );
if ( !pFolder )
InsertEntry( folderName, pRootEntry, false, TREELIST_APPEND, reinterpret_cast< void* >( nFolderType ) );
InsertEntry( folderName, nullptr, false, TREELIST_APPEND, reinterpret_cast< void* >( nFolderType ) );
}
}
}
......@@ -491,11 +474,6 @@ void TableTreeListBox::checkWildcard(weld::TreeIter& rEntry)
checkedButton_noBroadcast(rEntry);
}
SvTreeListEntry* OTableTreeListBox::getAllObjectsEntry() const
{
return haveVirtualRoot() ? First() : nullptr;
}
std::unique_ptr<weld::TreeIter> TableTreeListBox::getAllObjectsEntry() const
{
if (!haveVirtualRoot())
......@@ -571,18 +549,11 @@ void OTableTreeListBox::implEmphasize(SvTreeListEntry* _pEntry, bool _bChecked,
{
OSL_ENSURE(_pEntry, "OTableTreeListBox::implEmphasize: invalid entry (NULL)!");
// special emphasizing handling for the "all objects" entry
bool bAllObjectsEntryAffected = haveVirtualRoot() && (getAllObjectsEntry() == _pEntry);
if ( GetModel()->HasChildren(_pEntry) // the entry has children
|| bAllObjectsEntryAffected // or it is the "all objects" entry
)
if ( GetModel()->HasChildren(_pEntry) ) // the entry has children
{
OBoldListboxString* pTextItem = static_cast<OBoldListboxString*>(_pEntry->GetFirstItem(SvLBoxItemType::String));
if (pTextItem)
pTextItem->emphasize(_bChecked);
if (bAllObjectsEntryAffected)
InvalidateEntry(_pEntry);
}
if (_bUpdateDescendants)
......@@ -665,7 +636,7 @@ SvTreeListEntry* OTableTreeListBox::implAddEntry(
OUString sCatalog, sSchema, sName;
qualifiedNameComponents( _rxMeta, _rTableName, sCatalog, sSchema, sName, ::dbtools::EComposeRule::InDataManipulation );
SvTreeListEntry* pParentEntry = getAllObjectsEntry();
SvTreeListEntry* pParentEntry = nullptr;
// if the DB uses catalog at the start of identifiers, then our hierarchy is
// catalog
......@@ -899,7 +870,7 @@ SvTreeListEntry* OTableTreeListBox::getEntryByQualifiedName( const OUString& _rN
OUString sCatalog, sSchema, sName;
qualifiedNameComponents(xMeta, _rName, sCatalog, sSchema, sName,::dbtools::EComposeRule::InDataManipulation);
SvTreeListEntry* pParent = getAllObjectsEntry();
SvTreeListEntry* pParent = nullptr;
SvTreeListEntry* pCat = nullptr;
SvTreeListEntry* pSchema = nullptr;
if ( !sCatalog.isEmpty() )
......
......@@ -35,7 +35,6 @@ namespace dbaui
class OMarkableTreeListBox : public DBTreeListBox
{
std::unique_ptr<SvLBoxButtonData> m_pCheckButton;
Link<void*,void> m_aCheckButtonHandler;
public:
OMarkableTreeListBox( vcl::Window* pParent, WinBits nWinStyle );
......
......@@ -42,8 +42,6 @@ class OTableTreeListBox final : public OMarkableTreeListBox
m_xConnection; // the connection we're working for, set in implOnNewConnection, called by UpdateTableList
std::unique_ptr< ImageProvider >
m_xImageProvider; // provider for our images
bool m_bVirtualRoot; // should the first entry be visible
bool m_bNoEmptyFolders; // should empty catalogs/schematas be prevented from being displayed?
public:
OTableTreeListBox(vcl::Window* pParent, WinBits nWinStyle);
......@@ -103,8 +101,6 @@ public:
SvTreeListEntry* getEntryByQualifiedName( const OUString& _rName );
SvTreeListEntry* getAllObjectsEntry() const;
private:
virtual void InitEntry(SvTreeListEntry* _pEntry, const OUString& _rString, const Image& _rCollapsedBitmap, const Image& _rExpandedBitmap, SvLBoxButtonKind _eButtonKind) override;
......@@ -129,8 +125,6 @@ private:
bool impl_getAndAssertMetaData( css::uno::Reference< css::sdbc::XDatabaseMetaData >& _out_rMetaData ) const;
bool haveVirtualRoot() const { return m_bVirtualRoot; }
/** fill the table list with the tables and views determined by the two given containers
@param _rxConnection the connection where you got the object names from. Must not be NULL.
Used to split the full qualified names into its parts.
......
......@@ -148,7 +148,6 @@ public:
::std::map<const FormulaToken*, sheet::FormulaToken> m_aTokenMap;
IFormulaEditorHelper* m_pHelper;
weld::Dialog& m_rDialog;
weld::Builder& m_rParent;
OUString m_aOldFormula;
bool m_bStructUpdate;
......@@ -230,7 +229,6 @@ FormulaDlg_Impl::FormulaDlg_Impl(weld::Dialog& rDialog,
: m_pFunctionOpCodesEnd(nullptr)
, m_pHelper(_pHelper)
, m_rDialog(rDialog)
, m_rParent(rBuilder)
, m_bUserMatrixFlag(false)
, m_aTitle1( ForResId( STR_TITLE1 ) )
, m_aTitle2( ForResId( STR_TITLE2 ) )
......
......@@ -57,24 +57,6 @@ void StructPage::SetActiveFlag(bool bFlag)
bActiveFlag = bFlag;
}
void StructListBox::MouseButtonDown( const MouseEvent& rMEvt )
{
bActiveFlag = true;
SvTreeListBox::MouseButtonDown(rMEvt);
}
void StructListBox::GetFocus()
{
bActiveFlag = true;
SvTreeListBox::GetFocus();
}
void StructListBox::LoseFocus()
{
bActiveFlag = false;
SvTreeListBox::LoseFocus();
}
StructPage::StructPage(weld::Container* pParent)
: m_xBuilder(Application::CreateBuilder(pParent, "formula/ui/structpage.ui"))
, m_xContainer(m_xBuilder->weld_container("StructPage"))
......
......@@ -32,13 +32,6 @@ namespace formula
class FormulaToken;
class StructListBox : public SvTreeListBox
{
private:
bool bActiveFlag;
protected:
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
public:
StructListBox(vcl::Window* pParent, WinBits nBits );
......@@ -50,9 +43,6 @@ public:
SvTreeListEntry* pParent,
sal_uLong nPos,
const FormulaToken* pToken );
void GetFocus() override;
void LoseFocus() override;
};
......
......@@ -552,8 +552,7 @@ void ThumbnailViewAcc::ThrowIfDisposed()
SfxThumbnailViewAcc::SfxThumbnailViewAcc( SfxThumbnailView* pParent ) :
ValueSetAccComponentBase (m_aMutex),
mpParent( pParent ),
mbIsFocused(false)
mpParent( pParent )
{
}
......@@ -713,8 +712,6 @@ uno::Reference< accessibility::XAccessibleStateSet > SAL_CALL SfxThumbnailViewAc
pStateSet->AddState (accessibility::AccessibleStateType::VISIBLE);
pStateSet->AddState (accessibility::AccessibleStateType::MANAGES_DESCENDANTS);
pStateSet->AddState (accessibility::AccessibleStateType::FOCUSABLE);
if (mbIsFocused)
pStateSet->AddState (accessibility::AccessibleStateType::FOCUSED);
return pStateSet;
}
......
......@@ -220,8 +220,6 @@ private:
::std::vector< css::uno::Reference<
css::accessibility::XAccessibleEventListener > > mxEventListeners;
SfxThumbnailView* mpParent;
/// The current FOCUSED state.
bool mbIsFocused;
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
......
......@@ -63,7 +63,6 @@ private:
Color maSelectedColor;
Color maCustomColor;
Color maUnselectedColor;
public:
bool mbSelected:1;
......@@ -183,11 +182,6 @@ public:
maSelectedColor = rColor;
}
void setUnselectedFillColor(const Color& rColor)
{
maUnselectedColor = rColor;
}
void setCustomColor(const Color& rColor)
{
maCustomColor = rColor;
......@@ -1143,7 +1137,6 @@ void TabBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& r
TabDrawer aDrawer(rRenderContext);
aDrawer.setSelectedFillColor(aSelectColor);
aDrawer.setUnselectedFillColor(aFaceColor);
// Now, start drawing the tabs.
......
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