From f9c4fd0b981d7a0ebf76d3110955e16809dd6068 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 4 Aug 2024 16:28:17 +0200 Subject: simplify IMark hierarchy (5) merge into IFieldmark into Fieldmark Change-Id: Ide5c01fe49bae0be45746f6b581d72342da9c3a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171463 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/ui/vba/vbacontentcontrols.cxx | 2 +- sw/source/ui/vba/vbaformfield.cxx | 10 +++++----- sw/source/ui/vba/vbaformfield.hxx | 4 ++-- sw/source/ui/vba/vbaformfieldcheckbox.cxx | 2 +- sw/source/ui/vba/vbaformfieldcheckbox.hxx | 2 +- sw/source/ui/vba/vbaformfielddropdown.cxx | 2 +- sw/source/ui/vba/vbaformfielddropdown.hxx | 2 +- sw/source/ui/vba/vbaformfields.cxx | 14 +++++++------- sw/source/ui/vba/vbaformfieldtextinput.cxx | 2 +- sw/source/ui/vba/vbaformfieldtextinput.hxx | 4 ++-- 10 files changed, 22 insertions(+), 22 deletions(-) (limited to 'sw/source/ui/vba') diff --git a/sw/source/ui/vba/vbacontentcontrols.cxx b/sw/source/ui/vba/vbacontentcontrols.cxx index 5a7dccef17f5..8383aee7e3f8 100644 --- a/sw/source/ui/vba/vbacontentcontrols.cxx +++ b/sw/source/ui/vba/vbacontentcontrols.cxx @@ -229,7 +229,7 @@ SwVbaContentControls::SwVbaContentControls(const uno::Reference SwVbaContentControls::Add(const uno::Any& Range, // sal_Int32 Type) // { -// sw::mark::IFieldmark* pFieldmark = nullptr; +// sw::mark::Fieldmark* pFieldmark = nullptr; // switch (Type) // { // case ooo::vba::word::WdFieldType::wdFieldFormCheckBox: diff --git a/sw/source/ui/vba/vbaformfield.cxx b/sw/source/ui/vba/vbaformfield.cxx index 882773d17b2b..4fffbec0ff6c 100644 --- a/sw/source/ui/vba/vbaformfield.cxx +++ b/sw/source/ui/vba/vbaformfield.cxx @@ -34,7 +34,7 @@ using namespace ::com::sun::star; SwVbaFormField::SwVbaFormField(const uno::Reference& rParent, const uno::Reference& rContext, const uno::Reference& xTextDocument, - sw::mark::IFieldmark& rFormField) + sw::mark::Fieldmark& rFormField) : SwVbaFormField_BASE(rParent, rContext) , m_xTextDocument(xTextDocument) , m_rFormField(rFormField) @@ -71,8 +71,8 @@ uno::Any SwVbaFormField::Previous() if (!pMarkAccess) return uno::Any(); - sw::mark::IFieldmark* pFieldMark = pMarkAccess->getFieldmarkBefore(m_rFormField.GetMarkPos(), - /*bLoop=*/false); + sw::mark::Fieldmark* pFieldMark = pMarkAccess->getFieldmarkBefore(m_rFormField.GetMarkPos(), + /*bLoop=*/false); // DateFields are a LO specialty, and do not exist natively in MS documents. Ignore if added... auto pDateField = dynamic_cast(pFieldMark); @@ -99,8 +99,8 @@ uno::Any SwVbaFormField::Next() if (!pMarkAccess) return uno::Any(); - sw::mark::IFieldmark* pFieldMark = pMarkAccess->getFieldmarkAfter(m_rFormField.GetMarkPos(), - /*bLoop=*/false); + sw::mark::Fieldmark* pFieldMark = pMarkAccess->getFieldmarkAfter(m_rFormField.GetMarkPos(), + /*bLoop=*/false); // DateFields are a LO specialty, and do not exist natively in MS documents. Ignore if added... auto pDateField = dynamic_cast(pFieldMark); diff --git a/sw/source/ui/vba/vbaformfield.hxx b/sw/source/ui/vba/vbaformfield.hxx index 260e79093589..bc5921e99929 100644 --- a/sw/source/ui/vba/vbaformfield.hxx +++ b/sw/source/ui/vba/vbaformfield.hxx @@ -21,14 +21,14 @@ class SwVbaFormField : public SwVbaFormField_BASE { private: css::uno::Reference m_xTextDocument; - sw::mark::IFieldmark& m_rFormField; + sw::mark::Fieldmark& m_rFormField; public: /// @throws css::uno::RuntimeException SwVbaFormField(const css::uno::Reference& rParent, const css::uno::Reference& rContext, const uno::Reference& xTextDocument, - sw::mark::IFieldmark& rFormField); + sw::mark::Fieldmark& rFormField); ~SwVbaFormField() override; // XFormField Methods diff --git a/sw/source/ui/vba/vbaformfieldcheckbox.cxx b/sw/source/ui/vba/vbaformfieldcheckbox.cxx index 9ee7b15c3018..a6740970c1b8 100644 --- a/sw/source/ui/vba/vbaformfieldcheckbox.cxx +++ b/sw/source/ui/vba/vbaformfieldcheckbox.cxx @@ -23,7 +23,7 @@ using namespace ::com::sun::star; */ SwVbaFormFieldCheckBox::SwVbaFormFieldCheckBox( const uno::Reference& rParent, - const uno::Reference& rContext, sw::mark::IFieldmark& rFormField) + const uno::Reference& rContext, sw::mark::Fieldmark& rFormField) : SwVbaFormFieldCheckBox_BASE(rParent, rContext) , m_pCheckBox(dynamic_cast(&rFormField)) { diff --git a/sw/source/ui/vba/vbaformfieldcheckbox.hxx b/sw/source/ui/vba/vbaformfieldcheckbox.hxx index 87aaf1238855..10753347b591 100644 --- a/sw/source/ui/vba/vbaformfieldcheckbox.hxx +++ b/sw/source/ui/vba/vbaformfieldcheckbox.hxx @@ -25,7 +25,7 @@ public: /// @throws css::uno::RuntimeException SwVbaFormFieldCheckBox(const css::uno::Reference& rParent, const css::uno::Reference& rContext, - sw::mark::IFieldmark& rFormField); + sw::mark::Fieldmark& rFormField); ~SwVbaFormFieldCheckBox() override; // XCheckBox diff --git a/sw/source/ui/vba/vbaformfielddropdown.cxx b/sw/source/ui/vba/vbaformfielddropdown.cxx index 01a219d752d3..448daba0af8d 100644 --- a/sw/source/ui/vba/vbaformfielddropdown.cxx +++ b/sw/source/ui/vba/vbaformfielddropdown.cxx @@ -24,7 +24,7 @@ using namespace ::com::sun::star; */ SwVbaFormFieldDropDown::SwVbaFormFieldDropDown( const uno::Reference& rParent, - const uno::Reference& rContext, ::sw::mark::IFieldmark& rFormField) + const uno::Reference& rContext, ::sw::mark::Fieldmark& rFormField) : SwVbaFormFieldDropDown_BASE(rParent, rContext) , m_pDropDown(dynamic_cast(&rFormField)) { diff --git a/sw/source/ui/vba/vbaformfielddropdown.hxx b/sw/source/ui/vba/vbaformfielddropdown.hxx index d4b30c1e665c..bc7355b7e014 100644 --- a/sw/source/ui/vba/vbaformfielddropdown.hxx +++ b/sw/source/ui/vba/vbaformfielddropdown.hxx @@ -25,7 +25,7 @@ public: /// @throws css::uno::RuntimeException SwVbaFormFieldDropDown(const css::uno::Reference& rParent, const css::uno::Reference& rContext, - sw::mark::IFieldmark& rFormField); + sw::mark::Fieldmark& rFormField); ~SwVbaFormFieldDropDown() override; // XDropDown diff --git a/sw/source/ui/vba/vbaformfields.cxx b/sw/source/ui/vba/vbaformfields.cxx index 426bb78a53c8..7f8a3ef5de1b 100644 --- a/sw/source/ui/vba/vbaformfields.cxx +++ b/sw/source/ui/vba/vbaformfields.cxx @@ -25,9 +25,9 @@ using namespace ::com::sun::star; // @param rIndex serves multiple purposes // [in] -1 to indicate searching using the provided name, SAL_MAX_INT32 for totals // [out] rIndex indicates the found index, or the total number of fieldmarks -static sw::mark::IFieldmark* lcl_getFieldmark(std::string_view rName, sal_Int32& rIndex, - const uno::Reference& xModel, - uno::Sequence* pElementNames = nullptr) +static sw::mark::Fieldmark* lcl_getFieldmark(std::string_view rName, sal_Int32& rIndex, + const uno::Reference& xModel, + uno::Sequence* pElementNames = nullptr) { SwDoc* pDoc = word::getDocShell(xModel)->GetDoc(); @@ -53,10 +53,10 @@ static sw::mark::IFieldmark* lcl_getFieldmark(std::string_view rName, sal_Int32& && (*aIter)->GetName().equalsIgnoreAsciiCase(OUString::fromUtf8(rName))) { rIndex = nCounter; - return dynamic_cast(*aIter); + return dynamic_cast(*aIter); } else if (rIndex == nCounter) - return dynamic_cast(*aIter); + return dynamic_cast(*aIter); ++nCounter; if (pElementNames) @@ -106,7 +106,7 @@ private: uno::Reference mxParent; uno::Reference mxContext; uno::Reference mxTextDocument; - sw::mark::IFieldmark* m_pCache; + sw::mark::Fieldmark* m_pCache; public: /// @throws css::uno::RuntimeException @@ -199,7 +199,7 @@ void SwVbaFormFields::setShaded(sal_Bool /*bSet*/) // uno::Reference SwVbaFormFields::Add(const uno::Any& Range, // sal_Int32 Type) // { -// sw::mark::IFieldmark* pFieldmark = nullptr; +// sw::mark::Fieldmark* pFieldmark = nullptr; // switch (Type) // { // case ooo::vba::word::WdFieldType::wdFieldFormCheckBox: diff --git a/sw/source/ui/vba/vbaformfieldtextinput.cxx b/sw/source/ui/vba/vbaformfieldtextinput.cxx index c4188491ca3f..7724b933709d 100644 --- a/sw/source/ui/vba/vbaformfieldtextinput.cxx +++ b/sw/source/ui/vba/vbaformfieldtextinput.cxx @@ -25,7 +25,7 @@ using namespace ::com::sun::star; */ SwVbaFormFieldTextInput::SwVbaFormFieldTextInput( const uno::Reference& rParent, - const uno::Reference& rContext, sw::mark::IFieldmark& rFormField) + const uno::Reference& rContext, sw::mark::Fieldmark& rFormField) : SwVbaFormFieldTextInput_BASE(rParent, rContext) , m_rTextInput(rFormField) { diff --git a/sw/source/ui/vba/vbaformfieldtextinput.hxx b/sw/source/ui/vba/vbaformfieldtextinput.hxx index 513cac64defd..2df7a41d2895 100644 --- a/sw/source/ui/vba/vbaformfieldtextinput.hxx +++ b/sw/source/ui/vba/vbaformfieldtextinput.hxx @@ -19,13 +19,13 @@ typedef InheritedHelperInterfaceWeakImpl SwVbaFormFi class SwVbaFormFieldTextInput : public SwVbaFormFieldTextInput_BASE { private: - sw::mark::IFieldmark& m_rTextInput; + sw::mark::Fieldmark& m_rTextInput; public: /// @throws css::uno::RuntimeException SwVbaFormFieldTextInput(const css::uno::Reference& rParent, const css::uno::Reference& rContext, - sw::mark::IFieldmark& rFormField); + sw::mark::Fieldmark& rFormField); ~SwVbaFormFieldTextInput() override; // XTextInput -- cgit