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