summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/ui/dlg/Navigator.cxx33
-rw-r--r--reportdesign/source/ui/inc/Navigator.hxx8
2 files changed, 12 insertions, 29 deletions
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index 586494bbe2b9..2c4512470733 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -24,7 +24,6 @@
#include <ReportController.hxx>
#include <UITools.hxx>
#include <reportformula.hxx>
-#include <com/sun/star/report/XReportDefinition.hpp>
#include <com/sun/star/report/XFixedText.hpp>
#include <com/sun/star/report/XFixedLine.hpp>
#include <com/sun/star/report/XFormattedField.hpp>
@@ -98,8 +97,6 @@ static OUString lcl_getName(const uno::Reference< beans::XPropertySet>& _xElemen
return sName.makeStringAndClear();
}
-namespace {
-
class NavigatorTree : public ::cppu::BaseMutex
, public reportdesign::ITraverseReport
, public comphelper::OSelectionChangeListener
@@ -207,8 +204,6 @@ public:
}
};
-}
-
NavigatorTree::NavigatorTree(std::unique_ptr<weld::TreeView> xTreeView, OReportController& rController)
: OPropertyChangeListener(m_aMutex)
, m_xTreeView(std::move(xTreeView))
@@ -789,20 +784,10 @@ void NavigatorTree::UserData::_disposing(const lang::EventObject& _rSource)
m_pTree->_disposing( _rSource );
}
-class ONavigatorImpl
-{
-public:
- ONavigatorImpl(OReportController& rController, weld::Builder& rBuilder);
- ONavigatorImpl(const ONavigatorImpl&) = delete;
- ONavigatorImpl& operator=(const ONavigatorImpl&) = delete;
-
- uno::Reference< report::XReportDefinition> m_xReport;
- std::unique_ptr<NavigatorTree> m_xNavigatorTree;
-};
-
-ONavigatorImpl::ONavigatorImpl(OReportController& rController, weld::Builder& rBuilder)
- : m_xReport(rController.getReportDefinition())
- , m_xNavigatorTree(std::make_unique<NavigatorTree>(rBuilder.weld_tree_view("treeview"), rController))
+ONavigator::ONavigator(weld::Window* pParent, OReportController& rController)
+ : GenericDialogController(pParent, "modules/dbreport/ui/floatingnavigator.ui", "FloatingNavigator")
+ , m_xReport(rController.getReportDefinition())
+ , m_xNavigatorTree(std::make_unique<NavigatorTree>(m_xBuilder->weld_tree_view("treeview"), rController))
{
reportdesign::OReportVisitor aVisitor(m_xNavigatorTree.get());
aVisitor.start(m_xReport);
@@ -811,13 +796,7 @@ ONavigatorImpl::ONavigatorImpl(OReportController& rController, weld::Builder& rB
m_xNavigatorTree->expand_row(*xScratch);
lang::EventObject aEvent(rController);
m_xNavigatorTree->_selectionChanged(aEvent);
-}
-
-ONavigator::ONavigator(weld::Window* pParent, OReportController& rController)
- : GenericDialogController(pParent, "modules/dbreport/ui/floatingnavigator.ui", "FloatingNavigator")
-{
- m_pImpl.reset(new ONavigatorImpl(rController, *m_xBuilder));
- m_pImpl->m_xNavigatorTree->grab_focus();
+ m_xNavigatorTree->grab_focus();
m_xDialog->connect_container_focus_changed(LINK(this, ONavigator, FocusChangeHdl));
}
@@ -829,7 +808,7 @@ ONavigator::~ONavigator()
IMPL_LINK_NOARG(ONavigator, FocusChangeHdl, weld::Container&, void)
{
if (m_xDialog->has_toplevel_focus())
- m_pImpl->m_xNavigatorTree->grab_focus();
+ m_xNavigatorTree->grab_focus();
}
} // rptui
diff --git a/reportdesign/source/ui/inc/Navigator.hxx b/reportdesign/source/ui/inc/Navigator.hxx
index eed3e529c00d..f201472147f5 100644
--- a/reportdesign/source/ui/inc/Navigator.hxx
+++ b/reportdesign/source/ui/inc/Navigator.hxx
@@ -19,15 +19,19 @@
#ifndef INCLUDED_REPORTDESIGN_SOURCE_UI_INC_NAVIGATOR_HXX
#define INCLUDED_REPORTDESIGN_SOURCE_UI_INC_NAVIGATOR_HXX
+#include <com/sun/star/report/XReportDefinition.hpp>
#include <vcl/weld.hxx>
#include <memory>
+
namespace rptui
{
+ class NavigatorTree;
class OReportController;
- class ONavigatorImpl;
class ONavigator : public weld::GenericDialogController
{
- ::std::unique_ptr<ONavigatorImpl> m_pImpl;
+ css::uno::Reference< css::report::XReportDefinition> m_xReport;
+ std::unique_ptr<NavigatorTree> m_xNavigatorTree;
+
ONavigator(const ONavigator&) = delete;
void operator =(const ONavigator&) = delete;