sw/inc/IMark.hxx | 65 ++++--------------- sw/qa/extras/globalfilter/globalfilter.cxx | 2 sw/qa/extras/uiwriter/uiwriter4.cxx | 12 +-- sw/qa/extras/uiwriter/uiwriter5.cxx | 4 - sw/source/core/inc/unobookmark.hxx | 2 sw/source/core/text/itrform2.cxx | 4 - sw/source/core/text/portxt.cxx | 2 sw/source/core/unocore/unobkm.cxx | 10 +- sw/source/filter/html/wrthtml.cxx | 4 - sw/source/filter/ww8/docxattributeoutput.cxx | 2 sw/source/filter/ww8/wrtww8.cxx | 2 sw/source/filter/ww8/ww8par3.cxx | 2 sw/source/ui/vba/vbaformfield.cxx | 2 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/vbaformfielddropdownlistentries.cxx | 9 +- sw/source/ui/vba/vbaformfielddropdownlistentries.hxx | 4 - sw/source/ui/vba/vbaformfielddropdownlistentry.cxx | 4 - sw/source/ui/vba/vbaformfielddropdownlistentry.hxx | 4 - sw/source/uibase/docvw/edtwin.cxx | 6 - 22 files changed, 54 insertions(+), 94 deletions(-)
New commits: commit 2fbd16ed37ad0312faef79d1147d57731cfd980e Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sun Aug 4 15:28:12 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Aug 4 17:46:59 2024 +0200 simplify IMark hierarchy (3) merge IDropdownFieldmark into DropDownFieldmark Change-Id: I5dd9a166bc3f0710237b45fb0b063973547f2eb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171460 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/inc/IMark.hxx b/sw/inc/IMark.hxx index 69aa15fd0615..75af34ca0e14 100644 --- a/sw/inc/IMark.hxx +++ b/sw/inc/IMark.hxx @@ -108,25 +108,6 @@ namespace sw::mark IFieldmark &operator =(IFieldmark const&) = delete; }; - class SW_DLLPUBLIC IDropdownFieldmark - : virtual public IFieldmark - { - protected: - IDropdownFieldmark() = default; - - public: - virtual OUString GetContent(sal_Int32* pIndex) const = 0; - virtual OUString GetContent() const override = 0; - virtual void AddContent(const OUString& rText, sal_Int32* pIndex = nullptr) = 0; - virtual void DelContent(sal_Int32 nDelIndex = -1) = 0; - virtual void ReplaceContent(const OUString* pText, sal_Int32* pIndex) = 0; - virtual void ReplaceContent(const OUString& sNewContent) override = 0; - - private: - IDropdownFieldmark(IDropdownFieldmark const &) = delete; - IDropdownFieldmark &operator =(IDropdownFieldmark const&) = delete; - }; - class SW_DLLPUBLIC IDateFieldmark : virtual public IFieldmark { @@ -378,7 +359,7 @@ namespace sw::mark }; /// Fieldmark with a drop down button (e.g. this button opens the date picker for a date field) - class FieldmarkWithDropDownButton + class SW_DLLPUBLIC FieldmarkWithDropDownButton : public NonTextFieldmark { public: @@ -394,9 +375,8 @@ namespace sw::mark }; /// Fieldmark representing a drop-down form field. - class DropDownFieldmark final - : virtual public IDropdownFieldmark - , public FieldmarkWithDropDownButton + class SW_DLLPUBLIC DropDownFieldmark final + : public FieldmarkWithDropDownButton { public: DropDownFieldmark(const SwPaM& rPaM, const OUString& rName); @@ -404,11 +384,11 @@ namespace sw::mark void ShowButton(SwEditWin* pEditWin) override; void RemoveButton() override; - OUString GetContent(sal_Int32* pIndex) const override; + OUString GetContent(sal_Int32* pIndex) const; OUString GetContent() const override; - void AddContent(const OUString& rText, sal_Int32* pIndex = nullptr) override; - void DelContent(sal_Int32 nDelIndex = -1) override; - void ReplaceContent(const OUString* pText, sal_Int32* pIndex) override; + void AddContent(const OUString& rText, sal_Int32* pIndex = nullptr); + void DelContent(sal_Int32 nDelIndex = -1); + void ReplaceContent(const OUString* pText, sal_Int32* pIndex); void ReplaceContent(const OUString& sNewContent) override; // This method should be called only by the portion so we can now the portion's painting area diff --git a/sw/source/ui/vba/vbaformfielddropdown.cxx b/sw/source/ui/vba/vbaformfielddropdown.cxx index 08648fb05065..01a219d752d3 100644 --- a/sw/source/ui/vba/vbaformfielddropdown.cxx +++ b/sw/source/ui/vba/vbaformfielddropdown.cxx @@ -26,7 +26,7 @@ SwVbaFormFieldDropDown::SwVbaFormFieldDropDown( const uno::Reference<ooo::vba::XHelperInterface>& rParent, const uno::Reference<uno::XComponentContext>& rContext, ::sw::mark::IFieldmark& rFormField) : SwVbaFormFieldDropDown_BASE(rParent, rContext) - , m_pDropDown(dynamic_cast<sw::mark::IDropdownFieldmark*>(&rFormField)) + , m_pDropDown(dynamic_cast<sw::mark::DropDownFieldmark*>(&rFormField)) { } diff --git a/sw/source/ui/vba/vbaformfielddropdown.hxx b/sw/source/ui/vba/vbaformfielddropdown.hxx index e92caa2f8e8c..d4b30c1e665c 100644 --- a/sw/source/ui/vba/vbaformfielddropdown.hxx +++ b/sw/source/ui/vba/vbaformfielddropdown.hxx @@ -19,7 +19,7 @@ typedef InheritedHelperInterfaceWeakImpl<ooo::vba::word::XDropDown> SwVbaFormFie class SwVbaFormFieldDropDown : public SwVbaFormFieldDropDown_BASE { private: - sw::mark::IDropdownFieldmark* m_pDropDown; + sw::mark::DropDownFieldmark* m_pDropDown; public: /// @throws css::uno::RuntimeException diff --git a/sw/source/ui/vba/vbaformfielddropdownlistentries.cxx b/sw/source/ui/vba/vbaformfielddropdownlistentries.cxx index 6f77079e1b6d..30af34a4988b 100644 --- a/sw/source/ui/vba/vbaformfielddropdownlistentries.cxx +++ b/sw/source/ui/vba/vbaformfielddropdownlistentries.cxx @@ -14,7 +14,7 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -static uno::Sequence<OUString> lcl_getListEntries(sw::mark::IDropdownFieldmark& rDropDown) +static uno::Sequence<OUString> lcl_getListEntries(sw::mark::DropDownFieldmark& rDropDown) { uno::Sequence<OUString> aSeq; (*rDropDown.GetParameters())[ODF_FORMDROPDOWN_LISTENTRY] >>= aSeq; @@ -53,13 +53,13 @@ class ListEntryCollectionHelper private: uno::Reference<XHelperInterface> mxParent; uno::Reference<uno::XComponentContext> mxContext; - sw::mark::IDropdownFieldmark& m_rDropDown; + sw::mark::DropDownFieldmark& m_rDropDown; public: /// @throws css::uno::RuntimeException ListEntryCollectionHelper(uno::Reference<ov::XHelperInterface> xParent, uno::Reference<uno::XComponentContext> xContext, - sw::mark::IDropdownFieldmark& rFormField) + sw::mark::DropDownFieldmark& rFormField) : mxParent(std::move(xParent)) , mxContext(std::move(xContext)) , m_rDropDown(rFormField) @@ -91,8 +91,7 @@ public: SwVbaFormFieldDropDownListEntries::SwVbaFormFieldDropDownListEntries( const uno::Reference<XHelperInterface>& xParent, - const uno::Reference<uno::XComponentContext>& xContext, - sw::mark::IDropdownFieldmark& rFormField) + const uno::Reference<uno::XComponentContext>& xContext, sw::mark::DropDownFieldmark& rFormField) : SwVbaFormFieldDropDownListEntries_BASE( xParent, xContext, uno::Reference<container::XIndexAccess>( diff --git a/sw/source/ui/vba/vbaformfielddropdownlistentries.hxx b/sw/source/ui/vba/vbaformfielddropdownlistentries.hxx index ef1339127021..f8ea422678f0 100644 --- a/sw/source/ui/vba/vbaformfielddropdownlistentries.hxx +++ b/sw/source/ui/vba/vbaformfielddropdownlistentries.hxx @@ -21,14 +21,14 @@ typedef CollTestImplHelper<ooo::vba::word::XListEntries> SwVbaFormFieldDropDownL class SwVbaFormFieldDropDownListEntries : public SwVbaFormFieldDropDownListEntries_BASE { private: - sw::mark::IDropdownFieldmark& m_rDropDown; + sw::mark::DropDownFieldmark& m_rDropDown; public: /// @throws css::uno::RuntimeException SwVbaFormFieldDropDownListEntries( const css::uno::Reference<ov::XHelperInterface>& xParent, const css::uno::Reference<css::uno::XComponentContext>& xContext, - sw::mark::IDropdownFieldmark& m_rDropDown); + sw::mark::DropDownFieldmark& m_rDropDown); // XListEntries css::uno::Reference<ooo::vba::word::XListEntry> diff --git a/sw/source/ui/vba/vbaformfielddropdownlistentry.cxx b/sw/source/ui/vba/vbaformfielddropdownlistentry.cxx index 10d58e113eb7..fc3cb39b0e2c 100644 --- a/sw/source/ui/vba/vbaformfielddropdownlistentry.cxx +++ b/sw/source/ui/vba/vbaformfielddropdownlistentry.cxx @@ -14,8 +14,8 @@ using namespace ::com::sun::star; SwVbaFormFieldDropDownListEntry::SwVbaFormFieldDropDownListEntry( const uno::Reference<ooo::vba::XHelperInterface>& rParent, - const uno::Reference<uno::XComponentContext>& rContext, - sw::mark::IDropdownFieldmark& rFormField, sal_Int32 nZIndex) + const uno::Reference<uno::XComponentContext>& rContext, sw::mark::DropDownFieldmark& rFormField, + sal_Int32 nZIndex) : SwVbaFormFieldDropDownListEntry_BASE(rParent, rContext) , m_rDropDown(rFormField) , m_nZIndex(nZIndex) diff --git a/sw/source/ui/vba/vbaformfielddropdownlistentry.hxx b/sw/source/ui/vba/vbaformfielddropdownlistentry.hxx index 4ded080e632e..32d76f0d08ad 100644 --- a/sw/source/ui/vba/vbaformfielddropdownlistentry.hxx +++ b/sw/source/ui/vba/vbaformfielddropdownlistentry.hxx @@ -20,7 +20,7 @@ typedef InheritedHelperInterfaceWeakImpl<ooo::vba::word::XListEntry> class SwVbaFormFieldDropDownListEntry : public SwVbaFormFieldDropDownListEntry_BASE { private: - sw::mark::IDropdownFieldmark& m_rDropDown; + sw::mark::DropDownFieldmark& m_rDropDown; // All LO and internal UNO functions are 0-based. Convert to 1-based when sending to VBA const sal_Int32 m_nZIndex; @@ -29,7 +29,7 @@ public: SwVbaFormFieldDropDownListEntry( const css::uno::Reference<ooo::vba::XHelperInterface>& rParent, const css::uno::Reference<css::uno::XComponentContext>& rContext, - sw::mark::IDropdownFieldmark& rFormField, sal_Int32 nZIndex); + sw::mark::DropDownFieldmark& rFormField, sal_Int32 nZIndex); ~SwVbaFormFieldDropDownListEntry() override; // XListEntry commit 61a63b97c31b33adf69ef8bf3f187dfd6762f854 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sun Aug 4 15:10:16 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Aug 4 17:46:48 2024 +0200 simplify IMark hierarchy (2) merge ICheckboxFieldmark into CheckboxFieldmark Change-Id: Iaed990a9ac509b031d31e62c8878d8a5988476ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171459 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/inc/IMark.hxx b/sw/inc/IMark.hxx index 3ca72a6fd5ef..69aa15fd0615 100644 --- a/sw/inc/IMark.hxx +++ b/sw/inc/IMark.hxx @@ -108,20 +108,6 @@ namespace sw::mark IFieldmark &operator =(IFieldmark const&) = delete; }; - class SW_DLLPUBLIC ICheckboxFieldmark - : virtual public IFieldmark - { - protected: - ICheckboxFieldmark() = default; - - public: - virtual bool IsChecked() const =0; - virtual void SetChecked(bool checked) =0; - private: - ICheckboxFieldmark(ICheckboxFieldmark const &) = delete; - ICheckboxFieldmark &operator =(ICheckboxFieldmark const&) = delete; - }; - class SW_DLLPUBLIC IDropdownFieldmark : virtual public IFieldmark { @@ -156,8 +142,8 @@ namespace sw::mark virtual OUString GetDateInStandardDateFormat(double fDate) const = 0; private: - IDateFieldmark(ICheckboxFieldmark const &) = delete; - IDateFieldmark &operator =(ICheckboxFieldmark const&) = delete; + IDateFieldmark(IDateFieldmark const &) = delete; + IDateFieldmark &operator =(IDateFieldmark const&) = delete; }; OUString ExpandFieldmark(IFieldmark* pBM); @@ -316,7 +302,7 @@ namespace sw::mark OUString m_sHideCondition; }; - class Fieldmark + class SW_DLLPUBLIC Fieldmark : virtual public IFieldmark , public MarkBase { @@ -370,7 +356,7 @@ namespace sw::mark }; // Non text fieldmarks have no content between the start and end marks. - class NonTextFieldmark + class SW_DLLPUBLIC NonTextFieldmark : public Fieldmark { public: @@ -380,14 +366,13 @@ namespace sw::mark }; /// Fieldmark representing a checkbox form field. - class CheckboxFieldmark final - : virtual public ICheckboxFieldmark - , public NonTextFieldmark + class SW_DLLPUBLIC CheckboxFieldmark final + : public NonTextFieldmark { public: CheckboxFieldmark(const SwPaM& rPaM, const OUString& rName); - bool IsChecked() const override; - void SetChecked(bool checked) override; + bool IsChecked() const; + void SetChecked(bool checked); OUString GetContent() const override; void ReplaceContent(const OUString& sNewContent) override; }; diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx index c6217738f69f..bd4f0f4498c8 100644 --- a/sw/qa/extras/globalfilter/globalfilter.cxx +++ b/sw/qa/extras/globalfilter/globalfilter.cxx @@ -1876,7 +1876,7 @@ void Test::testCheckBoxFormField() CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), pFieldmark); CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), ODF_FORMCHECKBOX, pFieldmark->GetFieldname()); - ::sw::mark::ICheckboxFieldmark* pCheckBox = dynamic_cast< ::sw::mark::ICheckboxFieldmark* >(pFieldmark); + ::sw::mark::CheckboxFieldmark* pCheckBox = dynamic_cast< ::sw::mark::CheckboxFieldmark* >(pFieldmark); CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), pCheckBox); // The first one is unchecked, the other one is checked diff --git a/sw/qa/extras/uiwriter/uiwriter4.cxx b/sw/qa/extras/uiwriter/uiwriter4.cxx index 3078f92df610..334f7389965a 100644 --- a/sw/qa/extras/uiwriter/uiwriter4.cxx +++ b/sw/qa/extras/uiwriter/uiwriter4.cxx @@ -1501,8 +1501,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf151548_tabNavigation2) // verify that the checkboxes start off in the unchecked state for (auto it = pMarkAccess->getFieldmarksBegin(); it != pMarkAccess->getFieldmarksEnd(); ++it) { - sw::mark::ICheckboxFieldmark* pCheckBox - = dynamic_cast<::sw::mark::ICheckboxFieldmark*>(*it); + sw::mark::CheckboxFieldmark* pCheckBox = dynamic_cast<::sw::mark::CheckboxFieldmark*>(*it); CPPUNIT_ASSERT(!pCheckBox->IsChecked()); } @@ -1521,8 +1520,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf151548_tabNavigation2) for (auto it = pMarkAccess->getFieldmarksBegin(); it != pMarkAccess->getFieldmarksEnd(); ++it) { - sw::mark::ICheckboxFieldmark* pCheckBox - = dynamic_cast<::sw::mark::ICheckboxFieldmark*>(*it); + sw::mark::CheckboxFieldmark* pCheckBox = dynamic_cast<::sw::mark::CheckboxFieldmark*>(*it); // verify that the legacy checkbox became checked by the first loop. CPPUNIT_ASSERT(pCheckBox->IsChecked()); @@ -1556,8 +1554,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf151548_tabNavigation) // Tab and toggle 4 times, verifying beforehand that the state was unchecked for (auto it = pMarkAccess->getFieldmarksBegin(); it != pMarkAccess->getFieldmarksEnd(); ++it) { - sw::mark::ICheckboxFieldmark* pCheckBox - = dynamic_cast<::sw::mark::ICheckboxFieldmark*>(*it); + sw::mark::CheckboxFieldmark* pCheckBox = dynamic_cast<::sw::mark::CheckboxFieldmark*>(*it); CPPUNIT_ASSERT(!pCheckBox->IsChecked()); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 32, KEY_SPACE); // toggle checkbox on @@ -1569,8 +1566,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf151548_tabNavigation) // meaning that looping is working, and no other controls are reacting to the tab key. for (auto it = pMarkAccess->getFieldmarksBegin(); it != pMarkAccess->getFieldmarksEnd(); ++it) { - sw::mark::ICheckboxFieldmark* pCheckBox - = dynamic_cast<::sw::mark::ICheckboxFieldmark*>(*it); + sw::mark::CheckboxFieldmark* pCheckBox = dynamic_cast<::sw::mark::CheckboxFieldmark*>(*it); CPPUNIT_ASSERT(pCheckBox->IsChecked()); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 32, KEY_SPACE); // toggle checkbox off diff --git a/sw/qa/extras/uiwriter/uiwriter5.cxx b/sw/qa/extras/uiwriter/uiwriter5.cxx index ad8b78251bd0..7e28047ce99d 100644 --- a/sw/qa/extras/uiwriter/uiwriter5.cxx +++ b/sw/qa/extras/uiwriter/uiwriter5.cxx @@ -803,8 +803,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testCheckboxFormFieldInsertion) CPPUNIT_ASSERT(pFieldmark); CPPUNIT_ASSERT_EQUAL(ODF_FORMCHECKBOX, pFieldmark->GetFieldname()); // The checkbox is not checked by default - ::sw::mark::ICheckboxFieldmark* pCheckBox - = dynamic_cast<::sw::mark::ICheckboxFieldmark*>(pFieldmark); + ::sw::mark::CheckboxFieldmark* pCheckBox + = dynamic_cast<::sw::mark::CheckboxFieldmark*>(pFieldmark); CPPUNIT_ASSERT(pCheckBox); CPPUNIT_ASSERT(!pCheckBox->IsChecked()); diff --git a/sw/source/core/inc/unobookmark.hxx b/sw/source/core/inc/unobookmark.hxx index 7082e3c09587..eeccb19d9216 100644 --- a/sw/source/core/inc/unobookmark.hxx +++ b/sw/source/core/inc/unobookmark.hxx @@ -182,7 +182,7 @@ typedef cppu::ImplInheritanceHelper< SwXBookmark, class SwXFieldmark final : public SwXFieldmark_Base { - ::sw::mark::ICheckboxFieldmark* getCheckboxFieldmark(); + ::sw::mark::CheckboxFieldmark* getCheckboxFieldmark(); bool const m_bReplacementObject; bool m_isFieldmarkSeparatorAtStart = false; diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 3a884203b414..913228480483 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -1184,8 +1184,8 @@ namespace sw::mark { { if (pBM->GetFieldname() == ODF_FORMCHECKBOX) { - ::sw::mark::ICheckboxFieldmark const*const pCheckboxFm( - dynamic_cast<ICheckboxFieldmark const*>(pBM)); + ::sw::mark::CheckboxFieldmark const*const pCheckboxFm( + dynamic_cast<CheckboxFieldmark const*>(pBM)); assert(pCheckboxFm); return pCheckboxFm->IsChecked() ? u"\u2612"_ustr diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index d7c376de35ce..a9c738534e1e 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -913,7 +913,7 @@ void SwFieldFormCheckboxPortion::Paint( const SwTextPaintInfo& rInf ) const if (pBM && pBM->GetFieldname( ) == ODF_FORMCHECKBOX) { - const ICheckboxFieldmark* pCheckboxFm = dynamic_cast<ICheckboxFieldmark const*>(pBM); + const CheckboxFieldmark* pCheckboxFm = dynamic_cast<CheckboxFieldmark const*>(pBM); bool bChecked = pCheckboxFm && pCheckboxFm->IsChecked(); rInf.DrawCheckBox(*this, bChecked); } diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index f61d86f1267f..ea8363ac0f2e 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -704,13 +704,13 @@ SwXFieldmark::CreateXFieldmark(SwDoc & rDoc, ::sw::mark::IMark *const pMark, return xMark; } -::sw::mark::ICheckboxFieldmark* +::sw::mark::CheckboxFieldmark* SwXFieldmark::getCheckboxFieldmark() { - ::sw::mark::ICheckboxFieldmark* pCheckboxFm = nullptr; + ::sw::mark::CheckboxFieldmark* pCheckboxFm = nullptr; if ( getFieldType() == ODF_FORMCHECKBOX ) { - pCheckboxFm = dynamic_cast< ::sw::mark::ICheckboxFieldmark* >( GetBookmark()); + pCheckboxFm = dynamic_cast< ::sw::mark::CheckboxFieldmark* >( GetBookmark()); assert( GetBookmark() == nullptr || pCheckboxFm != nullptr ); // unclear to me whether GetBookmark() can be null here } @@ -728,7 +728,7 @@ SwXFieldmark::setPropertyValue(const OUString& PropertyName, SolarMutexGuard g; if ( PropertyName == "Checked" ) { - ::sw::mark::ICheckboxFieldmark* pCheckboxFm = getCheckboxFieldmark(); + ::sw::mark::CheckboxFieldmark* pCheckboxFm = getCheckboxFieldmark(); bool bChecked( false ); if ( !(pCheckboxFm && ( rValue >>= bChecked )) ) throw uno::RuntimeException(); @@ -754,7 +754,7 @@ uno::Any SAL_CALL SwXFieldmark::getPropertyValue(const OUString& rPropertyName) SolarMutexGuard g; if ( rPropertyName == "Checked" ) { - ::sw::mark::ICheckboxFieldmark* pCheckboxFm = getCheckboxFieldmark(); + ::sw::mark::CheckboxFieldmark* pCheckboxFm = getCheckboxFieldmark(); if ( !pCheckboxFm ) throw uno::RuntimeException(); diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 9d3a7dd584f2..d97349a28c36 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -1327,8 +1327,8 @@ void SwHTMLWriter::OutPointFieldmarks( const SwPosition& rPos ) if (pMark->GetFieldname() != ODF_FORMCHECKBOX) return; - const sw::mark::ICheckboxFieldmark* pCheckBox = - dynamic_cast<const sw::mark::ICheckboxFieldmark*>(pMark); + const sw::mark::CheckboxFieldmark* pCheckBox = + dynamic_cast<const sw::mark::CheckboxFieldmark*>(pMark); if (!pCheckBox) return; diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index e3ff688d0115..745997557f31 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2500,7 +2500,7 @@ void DocxAttributeOutput::WriteFFData( const FieldInfos& rInfos ) const OUString sName = params.getName(); bool bChecked = false; - const sw::mark::ICheckboxFieldmark* pCheckboxFm = dynamic_cast<const sw::mark::ICheckboxFieldmark*>(&rFieldmark); + const sw::mark::CheckboxFieldmark* pCheckboxFm = dynamic_cast<const sw::mark::CheckboxFieldmark*>(&rFieldmark); if ( pCheckboxFm && pCheckboxFm->IsChecked() ) bChecked = true; diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 1aeeaf47eefd..a5d7dac2ff32 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -4196,7 +4196,7 @@ void WW8SHDLong::Write( WW8Export& rExport ) void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) { const ::sw::mark::IFieldmark* pFieldmark = &rFieldmark; - const ::sw::mark::ICheckboxFieldmark* pAsCheckbox = dynamic_cast< const ::sw::mark::ICheckboxFieldmark* >( pFieldmark ); + const ::sw::mark::CheckboxFieldmark* pAsCheckbox = dynamic_cast< const ::sw::mark::CheckboxFieldmark* >( pFieldmark ); if ( ! ( rFieldmark.GetFieldname() == ODF_FORMTEXT || rFieldmark.GetFieldname() == ODF_FORMDROPDOWN || diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 0976737d7230..e6fc3ec44e55 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -227,7 +227,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, OUString& rStr ) OSL_ENSURE(pFieldmark!=nullptr, "hmmm; why was the bookmark not created?"); if (pFieldmark!=nullptr) { IFieldmark::parameter_map_t* const pParameters = pFieldmark->GetParameters(); - ICheckboxFieldmark* pCheckboxFm = dynamic_cast<ICheckboxFieldmark*>(pFieldmark); + CheckboxFieldmark* pCheckboxFm = dynamic_cast<CheckboxFieldmark*>(pFieldmark); (*pParameters)[ODF_FORMCHECKBOX_HELPTEXT] <<= aFormula.msToolTip; if(pCheckboxFm) diff --git a/sw/source/ui/vba/vbaformfield.cxx b/sw/source/ui/vba/vbaformfield.cxx index faecbd60f9b9..2efb092b8712 100644 --- a/sw/source/ui/vba/vbaformfield.cxx +++ b/sw/source/ui/vba/vbaformfield.cxx @@ -216,7 +216,7 @@ OUString SwVbaFormField::getResult() { return m_rFormField.GetContent(); } void SwVbaFormField::setResult(const OUString& rSet) { - if (dynamic_cast<sw::mark::ICheckboxFieldmark*>(&m_rFormField)) + if (dynamic_cast<sw::mark::CheckboxFieldmark*>(&m_rFormField)) m_rFormField.ReplaceContent(u"false"_ustr); else m_rFormField.ReplaceContent(rSet); diff --git a/sw/source/ui/vba/vbaformfieldcheckbox.cxx b/sw/source/ui/vba/vbaformfieldcheckbox.cxx index caf9d96397e8..9ee7b15c3018 100644 --- a/sw/source/ui/vba/vbaformfieldcheckbox.cxx +++ b/sw/source/ui/vba/vbaformfieldcheckbox.cxx @@ -25,7 +25,7 @@ SwVbaFormFieldCheckBox::SwVbaFormFieldCheckBox( const uno::Reference<ooo::vba::XHelperInterface>& rParent, const uno::Reference<uno::XComponentContext>& rContext, sw::mark::IFieldmark& rFormField) : SwVbaFormFieldCheckBox_BASE(rParent, rContext) - , m_pCheckBox(dynamic_cast<sw::mark::ICheckboxFieldmark*>(&rFormField)) + , m_pCheckBox(dynamic_cast<sw::mark::CheckboxFieldmark*>(&rFormField)) { } diff --git a/sw/source/ui/vba/vbaformfieldcheckbox.hxx b/sw/source/ui/vba/vbaformfieldcheckbox.hxx index c62549585b4e..87aaf1238855 100644 --- a/sw/source/ui/vba/vbaformfieldcheckbox.hxx +++ b/sw/source/ui/vba/vbaformfieldcheckbox.hxx @@ -19,7 +19,7 @@ typedef InheritedHelperInterfaceWeakImpl<ooo::vba::word::XCheckBox> SwVbaFormFie class SwVbaFormFieldCheckBox : public SwVbaFormFieldCheckBox_BASE { private: - sw::mark::ICheckboxFieldmark* m_pCheckBox; + sw::mark::CheckboxFieldmark* m_pCheckBox; public: /// @throws css::uno::RuntimeException diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 8a917ac2e806..8f49de4d5234 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -2546,8 +2546,8 @@ KEYINPUT_CHECKTABLE_INSDEL: if (rSh.GetChar(false)==CH_TXT_ATR_FORMELEMENT) { - ::sw::mark::ICheckboxFieldmark* pFieldmark = - dynamic_cast< ::sw::mark::ICheckboxFieldmark* > + ::sw::mark::CheckboxFieldmark* pFieldmark = + dynamic_cast< ::sw::mark::CheckboxFieldmark* > (rSh.GetCurrentFieldmark()); OSL_ENSURE(pFieldmark, "Where is my FieldMark??"); @@ -5100,7 +5100,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) IFieldmark *fieldBM = const_cast< IFieldmark* > ( aContentAtPos.aFnd.pFieldmark ); if ( fieldBM->GetFieldname( ) == ODF_FORMCHECKBOX ) { - ICheckboxFieldmark& rCheckboxFm = dynamic_cast<ICheckboxFieldmark&>(*fieldBM); + CheckboxFieldmark& rCheckboxFm = dynamic_cast<CheckboxFieldmark&>(*fieldBM); rCheckboxFm.SetChecked(!rCheckboxFm.IsChecked()); rCheckboxFm.Invalidate(); rSh.InvalidateWindows( SwRect(m_rView.GetVisArea()) );