summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-09-15 19:07:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-09-16 08:12:25 +0200
commitf2f6a5df1e8bcedc2dc675573ada5eb426867dbb (patch)
treea11dec5b1e9872907ceb4645ca32b0c145f2418a /sc
parentbd53efb7917540c5f3b85957ed56a767c258e89a (diff)
use more concrete UNO types in sc
Change-Id: I2da6016abf4c7302a725fa4e3b413296a70035a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173413 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/dispuno.hxx3
-rw-r--r--sc/inc/macromgr.hxx4
-rw-r--r--sc/source/ui/docshell/macromgr.cxx4
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx4
-rw-r--r--sc/source/ui/vba/vbarange.cxx6
-rw-r--r--sc/source/ui/vba/vbarange.hxx8
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx5
-rw-r--r--sc/source/ui/vba/vbaworksheet.hxx3
8 files changed, 19 insertions, 18 deletions
diff --git a/sc/inc/dispuno.hxx b/sc/inc/dispuno.hxx
index f8c5e0791a83..54b809c4e581 100644
--- a/sc/inc/dispuno.hxx
+++ b/sc/inc/dispuno.hxx
@@ -27,6 +27,7 @@
namespace com::sun::star::frame { class XDispatchProviderInterception; }
class ScTabViewShell;
+class ScDispatch;
class ScDispatchProviderInterceptor final : public cppu::WeakImplHelper<
css::frame::XDispatchProviderInterceptor,
@@ -43,7 +44,7 @@ class ScDispatchProviderInterceptor final : public cppu::WeakImplHelper<
css::uno::Reference< css::frame::XDispatchProvider> m_xMasterDispatcher;
/// own dispatch
- css::uno::Reference< css::frame::XDispatch> m_xMyDispatch;
+ rtl::Reference<ScDispatch> m_xMyDispatch;
public:
diff --git a/sc/inc/macromgr.hxx b/sc/inc/macromgr.hxx
index d7930eaa308a..a1cfd3693134 100644
--- a/sc/inc/macromgr.hxx
+++ b/sc/inc/macromgr.hxx
@@ -11,6 +11,7 @@
#include <com/sun/star/container/XContainerListener.hpp>
+#include <rtl/ref.hxx>
#include <rtl/ustring.hxx>
#include "scdllapi.h"
@@ -20,6 +21,7 @@
class ScDocument;
class ScFormulaCell;
class ScUserMacroDepTracker;
+class VBAProjectListener;
class ScMacroManager
{
@@ -38,7 +40,7 @@ public:
private:
typedef std::unordered_map<OUString, bool> NameBoolMap;
NameBoolMap mhFuncToVolatile;
- css::uno::Reference<css::container::XContainerListener> mxContainerListener;
+ rtl::Reference<VBAProjectListener> mxContainerListener;
::std::unique_ptr<ScUserMacroDepTracker> mpDepTracker;
ScDocument& mrDoc;
diff --git a/sc/source/ui/docshell/macromgr.cxx b/sc/source/ui/docshell/macromgr.cxx
index 126f482674b2..001707084e7b 100644
--- a/sc/source/ui/docshell/macromgr.cxx
+++ b/sc/source/ui/docshell/macromgr.cxx
@@ -102,8 +102,6 @@ ScMacroManager::~ScMacroManager()
typedef ::cppu::WeakImplHelper< css::container::XContainerListener > ContainerListenerHelper;
-namespace {
-
class VBAProjectListener : public ContainerListenerHelper
{
ScMacroManager* mpMacroMgr;
@@ -125,8 +123,6 @@ public:
};
-}
-
void ScMacroManager::InitUserFuncData()
{
// Clear unordered_map
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index d0bc51455ae4..739e98c33537 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -66,6 +66,7 @@ class ScNavigatorSettings;
class ScRangeName;
class ScDrawTransferObj;
class ScCondFormatDlgData;
+class ScDispatchProviderInterceptor;
namespace sc { class SparklineShell; }
@@ -147,8 +148,7 @@ private:
std::unique_ptr<::editeng::SvxBorderLine> pCurFrameLine;
- css::uno::Reference< css::frame::XDispatchProviderInterceptor >
- xDisProvInterceptor;
+ rtl::Reference<ScDispatchProviderInterceptor> xDisProvInterceptor;
Point aWinPos;
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 44133bed55e2..d93bc994f099 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -323,6 +323,8 @@ public:
}
};
+}
+
class ScVbaRangeAreas : public ScVbaCollectionBaseImpl
{
bool mbIsRows;
@@ -344,8 +346,6 @@ public:
};
-}
-
uno::Reference< container::XEnumeration > SAL_CALL
ScVbaRangeAreas::createEnumeration()
{
@@ -3930,7 +3930,7 @@ uno::Any SAL_CALL
ScVbaRange::Areas( const uno::Any& item)
{
if ( !item.hasValue() )
- return uno::Any( m_Areas );
+ return uno::Any( uno::Reference< ov::XCollection >(m_Areas) );
return m_Areas->Item( item, uno::Any() );
}
diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx
index 21b708a949f6..d36eb2562e63 100644
--- a/sc/source/ui/vba/vbarange.hxx
+++ b/sc/source/ui/vba/vbarange.hxx
@@ -24,7 +24,7 @@
#include <com/sun/star/sheet/FillDateMode.hpp>
#include <com/sun/star/sheet/FillMode.hpp>
#include <com/sun/star/sheet/FillDirection.hpp>
-
+#include <rtl/ref.hxx>
#include "vbaformat.hxx"
#include <address.hxx>
#include <formula/grammar.hxx>
@@ -44,6 +44,8 @@ class ScCellRangeObj;
class ScDocShell;
class ScDocument;
class ScRangeList;
+class ScVbaRangeAreas;
+class ScVbaValidation;
class ArrayVisitor
{
@@ -73,13 +75,13 @@ enum class RangeValueType { value, value2 };
class ScVbaRange : public ScVbaRange_BASE
{
- css::uno::Reference< ov::XCollection > m_Areas;
+ rtl::Reference< ScVbaRangeAreas > m_Areas;
css::uno::Reference< ov::XCollection > m_Borders;
css::uno::Reference< css::table::XCellRange > mxRange;
css::uno::Reference< css::sheet::XSheetCellRangeContainer > mxRanges;
bool mbIsRows;
bool mbIsColumns;
- css::uno::Reference< ov::excel::XValidation > m_xValidation;
+ rtl::Reference< ScVbaValidation > m_xValidation;
/// @throws css::uno::RuntimeException
double getCalcColWidth(const css::table::CellRangeAddress&);
/// @throws css::uno::RuntimeException
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index 4501c967e07b..74c06b3603b3 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -711,11 +711,10 @@ ScVbaWorksheet::ChartObjects( const uno::Any& Index )
}
if ( Index.hasValue() )
{
- uno::Reference< XCollection > xColl( mxCharts, uno::UNO_QUERY_THROW );
- return xColl->Item( Index, uno::Any() );
+ return mxCharts->Item( Index, uno::Any() );
}
else
- return uno::Any( mxCharts );
+ return uno::Any( uno::Reference<ov::excel::XChartObjects>(mxCharts) );
}
diff --git a/sc/source/ui/vba/vbaworksheet.hxx b/sc/source/ui/vba/vbaworksheet.hxx
index 7ac05220a2f4..f8ca3d0f8cba 100644
--- a/sc/source/ui/vba/vbaworksheet.hxx
+++ b/sc/source/ui/vba/vbaworksheet.hxx
@@ -37,6 +37,7 @@ namespace ooo::vba::excel {
}
class ScVbaSheetObjectsBase;
+class ScVbaChartObjects;
typedef InheritedHelperInterfaceWeakImpl< ov::excel::XWorksheet > WorksheetImpl_BASE;
@@ -44,7 +45,7 @@ class ScVbaWorksheet : public WorksheetImpl_BASE
{
css::uno::Reference< css::sheet::XSpreadsheet > mxSheet;
css::uno::Reference< css::frame::XModel > mxModel;
- css::uno::Reference< ov::excel::XChartObjects > mxCharts;
+ rtl::Reference<ScVbaChartObjects> mxCharts;
css::uno::Reference< ov::excel::XHyperlinks > mxHlinks;
::rtl::Reference< ScVbaSheetObjectsBase > mxButtons[2];
bool mbVeryHidden;