summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-08-20 10:13:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-20 11:28:46 +0200
commite367e59e37499d0efca381f0b41df52c7cfc2026 (patch)
tree5d723ef00ca4d480231571cedef3029640ad6aa3 /sfx2
parent02c9c9adf65883ecaeef0e86a4b0b70ee3d5cf52 (diff)
loplugin:unusedfields
Change-Id: Ie27afe4c2438c44baece4b926572584c6695dc39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120774 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/StyleList.cxx11
-rw-r--r--sfx2/source/dialog/templdlg.cxx12
-rw-r--r--sfx2/source/inc/StyleList.hxx3
-rw-r--r--sfx2/source/inc/templdgi.hxx10
4 files changed, 6 insertions, 30 deletions
diff --git a/sfx2/source/dialog/StyleList.cxx b/sfx2/source/dialog/StyleList.cxx
index 259113f62e96..b9d943cf519d 100644
--- a/sfx2/source/dialog/StyleList.cxx
+++ b/sfx2/source/dialog/StyleList.cxx
@@ -77,10 +77,9 @@ using namespace css::uno;
// Constructor
-StyleList::StyleList(weld::Builder* pBuilder, std::optional<SfxStyleFamilies> xFamilies,
- SfxBindings* pBindings, SfxCommonTemplateDialog_Impl* Parent,
- SfxModule* Module, weld::Container* pC, OString treeviewname,
- OString flatviewname)
+StyleList::StyleList(weld::Builder* pBuilder, SfxBindings* pBindings,
+ SfxCommonTemplateDialog_Impl* Parent, weld::Container* pC,
+ OString treeviewname, OString flatviewname)
: m_bHierarchical(false)
, m_bAllowReParentDrop(false)
, m_bNewByExampleDisabled(false)
@@ -97,13 +96,12 @@ StyleList::StyleList(weld::Builder* pBuilder, std::optional<SfxStyleFamilies> xF
, m_nActFilter(0)
, m_xFmtLb(pBuilder->weld_tree_view(flatviewname))
, m_xTreeBox(pBuilder->weld_tree_view(treeviewname))
- , m_xStyleFamilies(xFamilies)
, m_pCurObjShell(nullptr)
, m_nActFamily(0xffff)
, m_nAppFilter(SfxStyleSearchBits::Auto)
, m_pParentDialog(Parent)
, m_pBindings(pBindings)
- , m_Module(Module)
+ , m_Module(nullptr)
, m_nModifier(0)
, m_pContainer(pC)
{
@@ -925,7 +923,6 @@ IMPL_LINK(StyleList, EnableTreeDrag, bool, m_bEnable, void)
m_bAllowReParentDrop = pStyle && pStyle->HasParentSupport() && m_bEnable;
}
m_bTreeDrag = m_bEnable;
- m_pParentDialog->SetEnableDrag(m_bTreeDrag);
}
// Fill the treeview
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 0d17a7cbd4e4..bb27c5e51fb3 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -188,21 +188,18 @@ void SfxCommonTemplateDialog_Impl::connect_stylelist_set_water_can_state(
SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl(SfxBindings* pB, weld::Container* pC, weld::Builder* pBuilder)
: pBindings(pB)
, mpContainer(pC)
- , pModule(nullptr)
, xModuleManager(frame::ModuleManager::create(::comphelper::getProcessComponentContext()))
, m_pDeletionWatcher(nullptr)
- , m_aStyleList(pBuilder, mxStyleFamilies, pB, this, pModule, pC, "treeview", "flatview")
+ , m_aStyleList(pBuilder, pB, this, pC, "treeview", "flatview")
, mxPreviewCheckbox(pBuilder->weld_check_button("showpreview"))
, mxFilterLb(pBuilder->weld_combo_box("filter"))
, nActFamily(0xffff)
, nActFilter(0)
, bIsWater(false)
, bUpdate(false)
- , bUpdateFamily(false)
, bWaterDisabled(false)
, bNewByExampleDisabled(false)
, bUpdateByExampleDisabled(false)
- , bTreeDrag(true)
, m_bWantHierarchical(false)
{
mxFilterLb->set_help_id(HID_TEMPLATE_FILTER);
@@ -454,9 +451,6 @@ void SfxCommonTemplateDialog_Impl::SetFamilyState( sal_uInt16 nSlotId, const Sfx
{
m_aStyleList.SetFamilyState(nSlotId, pItem);
bUpdate = true;
-
- // If used templates (how the hell you find this out??)
- bUpdateFamily = true;
}
// Internal: Perform functions through the Dispatcher
@@ -905,16 +899,12 @@ void SfxCommonTemplateDialog_Impl::SetFamily(SfxStyleFamily const nFamily)
{
m_aStyleListSetFamily.Call(nId);
nActFamily = nId;
- if ( nId != 0xFFFF )
- bUpdateFamily = true;
}
}
IMPL_LINK(SfxCommonTemplateDialog_Impl, UpdateFamily_Hdl, StyleList&, rStyleList, void)
{
- bUpdateFamily = false;
bWaterDisabled = false;
- bTreeDrag = true;
bUpdateByExampleDisabled = false;
if (IsCheckedItem("watercan") &&
diff --git a/sfx2/source/inc/StyleList.hxx b/sfx2/source/inc/StyleList.hxx
index 99889b15534b..ed228f869c1e 100644
--- a/sfx2/source/inc/StyleList.hxx
+++ b/sfx2/source/inc/StyleList.hxx
@@ -52,8 +52,7 @@ class StyleList : public SfxListener
public:
// Constructor
- StyleList(weld::Builder* pBuilder, std::optional<SfxStyleFamilies> xFamilies,
- SfxBindings* pBindings, SfxCommonTemplateDialog_Impl* Parent, SfxModule* Module,
+ StyleList(weld::Builder* pBuilder, SfxBindings* pBindings, SfxCommonTemplateDialog_Impl* Parent,
weld::Container* pC, OString treeviewname, OString flatviewname);
// Destructor
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index 83192cbd6356..0b9753cccce1 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -74,9 +74,7 @@ protected:
SfxBindings* pBindings;
weld::Container* mpContainer;
- SfxModule* pModule;
- std::optional<SfxStyleFamilies> mxStyleFamilies;
css::uno::Reference<css::frame::XModuleManager2> xModuleManager;
DeletionWatcher* m_pDeletionWatcher;
@@ -89,11 +87,9 @@ protected:
bool bIsWater :1;
bool bUpdate :1;
- bool bUpdateFamily :1;
bool bWaterDisabled :1;
bool bNewByExampleDisabled :1;
bool bUpdateByExampleDisabled :1;
- bool bTreeDrag :1;
bool m_bWantHierarchical :1;
Link<void*, size_t> m_aStyleListReadResource;
@@ -104,7 +100,6 @@ protected:
Link<void*, bool> m_aStyleListWaterCan;
Link<void*, bool> m_aStyleListHasSelectedStyle;
Link<void*, void> m_aStyleListUpdateFamily;
- Link<SfxHintId, void> m_aStyleListNotify;
Link<void*, void> m_aStyleListUpdateStyleDependents;
Link<bool, void> m_aStyleListEnableTreeDrag;
Link<void*, void> m_aStyleListEnableDelete;
@@ -172,10 +167,6 @@ public:
// Used in TreeDrag
void EnableTreeDrag(bool b);
- // Dialog and StyleList have their own copies of variable bTreeDrag.
- // When TreeDrag is enabled in StyleList, the value of m_bTreeDrag is updated in StyleList
- // This function updates the value of bTreeDrag here too.
- void SetEnableDrag(bool treedrag) { bTreeDrag = treedrag; }
// It comes into action when a style is created or updated or newmenu is created
void EnableExample_Impl(sal_uInt16 nId, bool bEnable);
@@ -208,7 +199,6 @@ public:
void connect_stylelist_has_selected_style(const Link<void*, bool>& rLink);
void connect_stylelist_update_style_dependents(const Link<void*, void>& rLink);
void connect_stylelist_enable_tree_drag(const Link<bool, void> rLink);
- void connect_stylelist_notify(const Link<SfxHintId, void> rLink) { m_aStyleListNotify = rLink; }
void connect_stylelist_enable_delete(const Link<void*, void> rLink);
void connect_stylelist_set_water_can_state(const Link<const SfxBoolItem*, void> rLink);
void connect_set_family(const Link<sal_uInt16, void> rLink) { m_aStyleListSetFamily = rLink; }