include/sfx2/filedlghelper.hxx | 1 sd/inc/ResourceId.hxx | 6 ---- sd/inc/drawdoc.hxx | 28 +++++-------------- sd/qa/unit/misc-tests.cxx | 4 +- sd/source/core/drawdoc3.cxx | 26 ++++++----------- sd/source/ui/framework/configuration/ResourceId.cxx | 24 ++-------------- sd/source/ui/slidesorter/controller/SlsClipboard.cxx | 2 - sd/source/ui/view/ViewClipboard.cxx | 1 sfx2/source/appl/appopen.cxx | 2 - sfx2/source/dialog/filedlghelper.cxx | 5 +-- svtools/source/control/valueacc.cxx | 4 +- svtools/source/control/valueimp.hxx | 4 -- sw/source/core/layout/laycache.cxx | 7 ++-- sw/source/core/layout/layhelp.hxx | 2 - sw/source/core/layout/sectfrm.cxx | 2 - sw/source/filter/ww8/docxattributeoutput.cxx | 2 - sw/source/filter/ww8/docxexport.cxx | 4 +- sw/source/filter/ww8/docxexport.hxx | 2 - sw/source/ui/fldui/fldtdlg.cxx | 10 +++--- sw/source/uibase/inc/fldtdlg.hxx | 3 -- 20 files changed, 46 insertions(+), 93 deletions(-)
New commits: commit 257686688ea916853421d632b4d5a7cb8c05230f Author: Noel Grandin <[email protected]> AuthorDate: Thu Jun 26 14:19:30 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Thu Jun 26 21:32:07 2025 +0200 loplugin:constantparam Change-Id: Ifd973d558a73954d4b240b4d740739aa0a0a077e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187044 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx index 68b8539e4540..253c86e057bb 100644 --- a/include/sfx2/filedlghelper.hxx +++ b/include/sfx2/filedlghelper.hxx @@ -294,7 +294,6 @@ ErrCode FileOpenDialog_Impl( weld::Window* pParent, std::optional<SfxAllItemSet>& rpSet, const OUString* pPath, sal_Int16 nDialog, - const OUString& rPreselectedDir, const css::uno::Sequence< OUString >& rDenyList, std::optional<bool>& rShowFilterDialog ); diff --git a/sd/inc/ResourceId.hxx b/sd/inc/ResourceId.hxx index 11312ce598d3..b697662a8339 100644 --- a/sd/inc/ResourceId.hxx +++ b/sd/inc/ResourceId.hxx @@ -219,13 +219,10 @@ private: sal_Int16 CompareToLocalImplementation (const ResourceId& rId) const; /** Return whether the called ResourceId object is bound to the anchor - consisting of the URLs given by psFirstAnchorURL and paAnchorURLs. + consisting of the URLs given by psFirstAnchorURL. @param psFirstAnchorURL Optional first URL of the anchor. This can be missing or present independently of paAnchorURLs. - @param paAnchorURLs - Optional set of additional anchor URLs. This can be missing or - present independently of psFirstAnchorURL. @param eMode This specifies whether the called resource has to be directly bound to the given anchor in order to return <TRUE/> or whether @@ -233,7 +230,6 @@ private: */ bool IsBoundToAnchor ( const OUString* psFirstAnchorURL, - const std::vector<OUString>* paAnchorURLs, css::drawing::framework::AnchorBindingMode eMode) const; /** Return whether the called ResourceId object is bound to the anchor diff --git a/sd/source/ui/framework/configuration/ResourceId.cxx b/sd/source/ui/framework/configuration/ResourceId.cxx index e9135697311c..9790048cf5fc 100644 --- a/sd/source/ui/framework/configuration/ResourceId.cxx +++ b/sd/source/ui/framework/configuration/ResourceId.cxx @@ -250,7 +250,7 @@ bool ResourceId::isBoundTo ( if ( ! rxResourceId.is()) { // An empty reference is interpreted as empty resource id. - return IsBoundToAnchor(nullptr, nullptr, eMode); + return IsBoundToAnchor(nullptr, eMode); } return IsBoundToAnchor(rxResourceId->maResourceURLs, eMode); @@ -260,7 +260,7 @@ bool ResourceId::isBoundToURL ( const OUString& rsAnchorURL, AnchorBindingMode eMode) const { - return IsBoundToAnchor(&rsAnchorURL, nullptr, eMode); + return IsBoundToAnchor(&rsAnchorURL, eMode); } /** When eMode is DIRECTLY then the anchor of the called object and the @@ -270,13 +270,11 @@ bool ResourceId::isBoundToURL ( */ bool ResourceId::IsBoundToAnchor ( const OUString* psFirstAnchorURL, - const std::vector<OUString>* paAnchorURLs, AnchorBindingMode eMode) const { const sal_uInt32 nLocalAnchorURLCount (maResourceURLs.size() - 1); const bool bHasFirstAnchorURL (psFirstAnchorURL!=nullptr); - const sal_uInt32 nAnchorURLCount ((bHasFirstAnchorURL?1:0) - + (paAnchorURLs!=nullptr ? paAnchorURLs->size() : 0)); + const sal_uInt32 nAnchorURLCount (bHasFirstAnchorURL?1:0); // Check the lengths. if (nLocalAnchorURLCount<nAnchorURLCount || @@ -287,23 +285,9 @@ bool ResourceId::IsBoundToAnchor ( // Compare the nAnchorURLCount bottom-most anchor URLs of this resource // id and the given anchor. - sal_uInt32 nOffset = 0; - if (paAnchorURLs != nullptr) - { - sal_uInt32 nCount = paAnchorURLs->size(); - while (nOffset < nCount) - { - if ( maResourceURLs[nLocalAnchorURLCount - nOffset] != - (*paAnchorURLs)[nCount - 1 - nOffset] ) - { - return false; - } - ++nOffset; - } - } if (bHasFirstAnchorURL) { - if ( *psFirstAnchorURL != maResourceURLs[nLocalAnchorURLCount - nOffset] ) + if ( *psFirstAnchorURL != maResourceURLs[nLocalAnchorURLCount] ) return false; } diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index fed96a68051c..b31f7e0b0a09 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -655,7 +655,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) ErrCode nErr = sfx2::FileOpenDialog_Impl(pTopWindow, nDialogType, eDialogFlags, aURLList, - aFilter, pSet, &aPath, nDialog, "", aDenyList, bShowFilterDialog); + aFilter, pSet, &aPath, nDialog, aDenyList, bShowFilterDialog); if ( nErr == ERRCODE_ABORT ) { diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 9050192f0bb2..3daaab04054a 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -2838,7 +2838,6 @@ ErrCode FileOpenDialog_Impl( weld::Window* pParent, std::optional<SfxAllItemSet>& rpSet, const OUString* pPath, sal_Int16 nDialog, - const OUString& rPreselectedDir, const css::uno::Sequence< OUString >& rDenyList, std::optional<bool>& rShowFilterDialog ) { @@ -2848,9 +2847,9 @@ ErrCode FileOpenDialog_Impl( weld::Window* pParent, // read-only to discourage editing (which would invalidate existing // signatures). if (nFlags & FileDialogFlags::SignPDF) - pDialog.reset(new FileDialogHelper(nDialogType, nFlags, SfxResId(STR_SFX_FILTERNAME_PDF), u"pdf", rPreselectedDir, rDenyList, pParent)); + pDialog.reset(new FileDialogHelper(nDialogType, nFlags, SfxResId(STR_SFX_FILTERNAME_PDF), u"pdf", u""_ustr, rDenyList, pParent)); else - pDialog.reset(new FileDialogHelper(nDialogType, nFlags, OUString(), nDialog, SfxFilterFlags::NONE, SfxFilterFlags::NONE, rPreselectedDir, rDenyList, pParent)); + pDialog.reset(new FileDialogHelper(nDialogType, nFlags, OUString(), nDialog, SfxFilterFlags::NONE, SfxFilterFlags::NONE, u""_ustr, rDenyList, pParent)); OUString aPath; if ( pPath ) diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 37496a9b25fd..e23ae31281d5 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -675,11 +675,11 @@ ValueSetItem* ValueSetAcc::getItem (sal_uInt16 nIndex) const } -void ValueSetAcc::ThrowIfDisposed(bool bCheckValueSet) +void ValueSetAcc::ThrowIfDisposed() { ensureAlive(); - if (bCheckValueSet && !mpValueSet) + if (!mpValueSet) { assert(false && "ValueSetAcc not disposed but mpValueSet == NULL"); throw css::uno::RuntimeException(u"ValueSetAcc not disposed but mpValueSet == NULL"_ustr); diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx index a36e324b2be5..3094c9d32737 100644 --- a/svtools/source/control/valueimp.hxx +++ b/svtools/source/control/valueimp.hxx @@ -143,11 +143,9 @@ private: state of being disposed). If that is the case then DisposedException is thrown to inform the (indirect) caller of the foul deed. - @param bCheckValueSet - Whether to also check that the ValueSet is non-null. @throws css::lang::DisposedException */ - void ThrowIfDisposed(bool bCheckValueSet = true); + void ThrowIfDisposed(); /** Check whether the value set has a 'none' field, i.e. a field (button) that deselects any items (selects none of them). diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index 4c1df8a6b286..7b758822dd3c 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -616,8 +616,7 @@ bool SwLayHelper::CheckInsertPage( SwPageFrame *& rpPage, SwLayoutFrame *& rpLay, SwFrame *& rpFrame, - bool & rIsBreakAfter, - bool const isForceBreak) + bool & rIsBreakAfter) { bool bEnd = nullptr == rpPage->GetNext(); const SvxFormatBreakItem& rBrk = rpFrame->GetBreakItem(); @@ -629,7 +628,7 @@ bool SwLayHelper::CheckInsertPage( ? nullptr : rDesc.GetPageDesc(); - bool bBrk = isForceBreak || rIsBreakAfter; + bool bBrk = rIsBreakAfter; rIsBreakAfter = rBrk.GetBreak() == SvxBreak::PageAfter || rBrk.GetBreak() == SvxBreak::PageBoth; if ( !bBrk ) @@ -823,7 +822,7 @@ bool SwLayHelper::CheckInsert( SwNodeOffset nNodeIndex ) } SwPageFrame* pLastPage = mrpPage; - if (CheckInsertPage(mrpPage, mrpLay, mrpFrame, mbBreakAfter, false)) + if (CheckInsertPage(mrpPage, mrpLay, mrpFrame, mbBreakAfter)) { CheckFlyCache_( pLastPage ); if( mrpPrv && mrpPrv->IsTextFrame() && !mrpPrv->isFrameAreaSizeValid() ) diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx index 91f8e259b93e..3d6f94a70f2e 100644 --- a/sw/source/core/layout/layhelp.hxx +++ b/sw/source/core/layout/layhelp.hxx @@ -128,7 +128,7 @@ public: bool CheckInsert( SwNodeOffset nNodeIndex ); static bool CheckInsertPage(SwPageFrame *& rpPage, SwLayoutFrame *& rpLay, - SwFrame *& rpFrame, bool & rIsBreakAfter, bool const isForceBreak); + SwFrame *& rpFrame, bool & rIsBreakAfter); /// Look for fresh text frames at this (new) page and set them to the right /// position, if they are in the fly cache. diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index 9b11ff0c3e31..c37dc152dada 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -2850,7 +2850,7 @@ void SwSectionFrame::SwClientNotify(const SwModify& rMod, const SfxHint& rHint) continue; } assert(pLowerFrame->IsContentFrame() || pLowerFrame->IsTabFrame()); - if (SwLayHelper::CheckInsertPage(pPage, pLay, pLowerFrame, isBreakAfter, false)) + if (SwLayHelper::CheckInsertPage(pPage, pLay, pLowerFrame, isBreakAfter)) { if (pLowerFrame == Lower()) { // move the whole section diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index c1b36660d88d..35bcb3c2c980 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -8597,7 +8597,7 @@ DocxAttributeOutput::hasProperties DocxAttributeOutput::WritePostitFields() { // richtext data.lastParaId - = GetExport().WriteOutliner(*f->GetTextObject(), TXT_ATN, bNeedParaId, true); + = GetExport().WriteOutliner(*f->GetTextObject(), TXT_ATN, bNeedParaId); } else { diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index ebd8cb1efbde..aa509e7f80e6 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -2019,7 +2019,7 @@ bool DocxExport::ignoreAttributeForStyleDefaults( sal_uInt16 nWhich ) const } sal_Int32 DocxExport::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTyp, - bool bNeedsLastParaId, bool bWriteAnnotRef) + bool bNeedsLastParaId) { const EditTextObject& rEditObj = rParaObj.GetTextObject(); MSWord_SdrAttrIter aAttrIter( *this, rEditObj, nTyp ); @@ -2044,7 +2044,7 @@ sal_Int32 DocxExport::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt SfxItemSet aParagraphMarkerProperties(m_rDoc.GetAttrPool()); AttrOutput().EndParagraphProperties(aParagraphMarkerProperties, nullptr, nullptr, nullptr); - if (bWriteAnnotRef && n == 0) + if (n == 0) { m_pAttrOutput->GetSerializer()->startElementNS(XML_w, XML_r); m_pAttrOutput->GetSerializer()->singleElementNS(XML_w, XML_annotationRef); diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx index 36d45f197338..929544e41fdf 100644 --- a/sw/source/filter/ww8/docxexport.hxx +++ b/sw/source/filter/ww8/docxexport.hxx @@ -201,7 +201,7 @@ public: void OutputDML( css::uno::Reference< css::drawing::XShape > const & xShape ); sal_Int32 WriteOutliner(const OutlinerParaObject& rOutliner, sal_uInt8 nTyp, - bool bNeedsLastParaId, bool bWriteAnnotRef = false); + bool bNeedsLastParaId); virtual ExportFormat GetExportFormat() const override { return ExportFormat::DOCX; } diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx index 45755f2fa292..6b2b401e4e82 100644 --- a/sw/source/ui/fldui/fldtdlg.cxx +++ b/sw/source/ui/fldui/fldtdlg.cxx @@ -171,11 +171,11 @@ IMPL_LINK_NOARG(SwFieldDlg, CancelHdl, weld::Button&, void) } // newly initialise TabPage after Doc-Switch -void SwFieldDlg::ReInitTabPage(std::u16string_view rPageId, bool bOnlyActivate) +void SwFieldDlg::ReInitTabPage(std::u16string_view rPageId) { SwFieldPage* pPage = static_cast<SwFieldPage*>(GetTabPage(rPageId)); if (pPage) - pPage->EditNewField( bOnlyActivate ); // newly initialise TabPage + pPage->EditNewField( /*bOnlyActivate*/true ); // newly initialise TabPage } // newly initialise after activation of a few TabPages @@ -192,12 +192,12 @@ void SwFieldDlg::Activate() && !SwCursorShell::PosInsideInputField(*rSh.GetCursor()->GetPoint())); - ReInitTabPage(u"variables", true); + ReInitTabPage(u"variables"); if( !bHtmlMode ) { - ReInitTabPage(u"ref", true); - ReInitTabPage(u"functions", true); + ReInitTabPage(u"ref"); + ReInitTabPage(u"functions"); } } diff --git a/sw/source/uibase/inc/fldtdlg.hxx b/sw/source/uibase/inc/fldtdlg.hxx index 19e2316a61cc..eee64a50fd76 100644 --- a/sw/source/uibase/inc/fldtdlg.hxx +++ b/sw/source/uibase/inc/fldtdlg.hxx @@ -39,8 +39,7 @@ class SwFieldDlg final : public SfxTabDialogController virtual SfxItemSet* CreateInputItemSet(const OUString& rId) override; virtual void PageCreated(const OUString& rId, SfxTabPage& rPage) override; - void ReInitTabPage(std::u16string_view rPageId, - bool bOnlyActivate = false); + void ReInitTabPage(std::u16string_view rPageId); public: SwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, weld::Window *pParent); commit be4e89d412d48ce6a362edee446cd9407ca92097 Author: Noel Grandin <[email protected]> AuthorDate: Thu Jun 26 14:03:48 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Thu Jun 26 21:31:53 2025 +0200 remove some dead code from commit 0d8f5429a0f4b1e9818c6d04502e08dbfeec3eba Author: Mohamed Ali <[email protected]> Date: Tue Feb 25 03:13:44 2025 +0200 tdf#45617 Make master slide copyable Change-Id: I166a4db94db5ccf940220d61bc0174e9ad41bd7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187043 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index 37bd5aa91a8a..1e4e544828c4 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -202,11 +202,11 @@ struct InsertBookmarkOptions } // Preset for file insert operation - static InsertBookmarkOptions ForFileInsert(bool bLinkPages, bool bMergeMasterPagesOnly = false) { + static InsertBookmarkOptions ForFileInsert(bool bLinkPages) { InsertBookmarkOptions options; options.bLink = bLinkPages; options.bIsFileDocument = true; - options.bMergeMasterPagesOnly = bMergeMasterPagesOnly; + options.bMergeMasterPagesOnly = false; return options; } @@ -221,14 +221,14 @@ struct InsertBookmarkOptions } // Preset for page link resolution - static InsertBookmarkOptions ForPageLinks(bool bCopySource, bool bNoDialogs, bool bMergeMasterPagesOnly = false) { + static InsertBookmarkOptions ForPageLinks(bool bCopySource, bool bNoDialogs) { InsertBookmarkOptions options; options.bLink = true; options.bReplace = true; options.bPreservePageNames = true; options.bCopy = bCopySource; options.bNoDialogs = bNoDialogs; - options.bMergeMasterPagesOnly = bMergeMasterPagesOnly; + options.bMergeMasterPagesOnly = false; return options; } @@ -622,7 +622,6 @@ public: * It handles the insertion of pages that were previously copied or cut to the clipboard. * * @param rBookmarkList List of page names to be pasted - * @param pExchangeList Optional list of names to use for the pasted pages * @param nInsertPos Position where pages should be inserted * @param pBookmarkDocSh Source document shell * @param bMergeMasterPages Whether to merge master pages from source @@ -631,7 +630,6 @@ public: */ bool PasteBookmarkAsPage( const PageNameList &rBookmarkList, - PageNameList *pExchangeList, sal_uInt16 nInsertPos, ::sd::DrawDocShell* pBookmarkDocSh, bool bMergeMasterPages, @@ -649,7 +647,6 @@ public: * @param bLink Whether to link to the source pages instead of copying * @param nInsertPos Position where pages should be inserted * @param pBookmarkDocSh Source document shell - * @param bMergeMasterPagesOnly Whether to only merge master pages (not content pages) * @return true if operation was successful */ bool InsertFileAsPage( @@ -657,8 +654,7 @@ public: PageNameList *pExchangeList, bool bLink, sal_uInt16 nInsertPos, - ::sd::DrawDocShell* pBookmarkDocSh, - bool bMergeMasterPagesOnly = false); + ::sd::DrawDocShell* pBookmarkDocSh); /** * Handle drag and drop operations @@ -671,15 +667,13 @@ public: * @param nInsertPos Position where pages should be inserted * @param pBookmarkDocSh Source document shell * @param bMergeMasterPages Whether to merge master pages from source - * @param bMergeMasterPagesOnly Whether to only merge master pages (not content pages) * @return true if operation was successful */ bool DropBookmarkAsPage( const PageNameList &rBookmarkList, sal_uInt16 nInsertPos, ::sd::DrawDocShell* pBookmarkDocSh, - bool bMergeMasterPages, - bool bMergeMasterPagesOnly = false); + bool bMergeMasterPages); /** * Resolve page links @@ -692,15 +686,13 @@ public: * @param nInsertPos Position where resolved pages should be inserted * @param bNoDialogs Whether to suppress dialogs during operation * @param bCopy Whether to copy the linked pages - * @param bMergeMasterPagesOnly Whether to only merge master pages (not content pages) * @return true if operation was successful */ bool ResolvePageLinks( const PageNameList &rBookmarkList, sal_uInt16 nInsertPos, bool bNoDialogs, - bool bCopy, - bool bMergeMasterPagesOnly = false); + bool bCopy); /** * Copy or move pages within the same document @@ -710,18 +702,14 @@ public: * of pages while maintaining proper references and styles. * * @param rBookmarkList List of page names to be copied or moved - * @param pExchangeList Optional list of names to use for the destination pages * @param nInsertPos Position where pages should be inserted * @param bPreservePageNames Whether to preserve original page names - * @param bMergeMasterPagesOnly Whether to only merge master pages (not content pages) * @return true if operation was successful */ bool CopyOrMovePagesWithinDocument( const PageNameList &rBookmarkList, - PageNameList *pExchangeList, sal_uInt16 nInsertPos, - bool bPreservePageNames, - bool bMergeMasterPagesOnly = false); + bool bPreservePageNames); /** * Import a whole document diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx index 6ea90cc6cb50..cbad214058ef 100644 --- a/sd/qa/unit/misc-tests.cxx +++ b/sd/qa/unit/misc-tests.cxx @@ -973,7 +973,7 @@ void SdMiscTest::testTdf39519() // Insert a bookmark as a new page using the same name std::vector<OUString> aBookmarkList = { u"Test"_ustr }; - pDoc->CopyOrMovePagesWithinDocument(aBookmarkList, nullptr, 2, false); + pDoc->CopyOrMovePagesWithinDocument(aBookmarkList, 2, false); // Check if the copied page has a different name SdPage* pCopiedPage = static_cast<SdPage*>(pDoc->GetPage(2)); @@ -995,7 +995,7 @@ void SdMiscTest::testTdf164284() // Move a bookmark as a page using the same name pDoc->DoMakePageObjectsNamesUnique(false); std::vector<OUString> aBookmarkList = { u"Test"_ustr }; - pDoc->CopyOrMovePagesWithinDocument(aBookmarkList, nullptr, 2, true); + pDoc->CopyOrMovePagesWithinDocument(aBookmarkList, 2, true); // Check if the moved page has the same name SdPage* pMovedPage = static_cast<SdPage*>(pDoc->GetPage(2)); diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index b30f630b3072..7177d6404557 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -2154,7 +2154,6 @@ SdPage* SdDrawDocument::AddNewMasterPageFromExisting( // Paste pages from clipboard - handles regular paste operations bool SdDrawDocument::PasteBookmarkAsPage( const PageNameList &rBookmarkList, - PageNameList *pExchangeList, sal_uInt16 nInsertPos, ::sd::DrawDocShell* pBookmarkDocSh, bool bMergeMasterPages, @@ -2164,7 +2163,7 @@ bool SdDrawDocument::PasteBookmarkAsPage( InsertBookmarkOptions options = InsertBookmarkOptions::ForPaste(bMergeMasterPages, bMergeMasterPagesOnly); // Create insertion parameters - PageInsertionParams aInsertParams(nInsertPos, pExchangeList); + PageInsertionParams aInsertParams(nInsertPos, /*pExchangeList*/nullptr); // Get the bookmark document first so we can use it for scale object determination if (!initBookmarkDoc(pBookmarkDocSh, aInsertParams.pBookmarkDoc, aInsertParams.aBookmarkName)) @@ -2267,12 +2266,11 @@ bool SdDrawDocument::ResolvePageLinks( const PageNameList &rBookmarkList, sal_uInt16 nInsertPos, bool bNoDialogs, - bool bCopy, - bool bMergeMasterPagesOnly) + bool bCopy) { // Use predefined options for page link resolution InsertBookmarkOptions options = InsertBookmarkOptions::ForPageLinks(bCopy, bNoDialogs); - options.bMergeMasterPagesOnly = bMergeMasterPagesOnly; + options.bMergeMasterPagesOnly = /*bMergeMasterPagesOnly*/false; // Create insertion parameters PageInsertionParams aInsertParams(nInsertPos); @@ -2469,12 +2467,11 @@ bool SdDrawDocument::InsertFileAsPage( PageNameList *pExchangeList, bool bLink, sal_uInt16 nInsertPos, - ::sd::DrawDocShell* pBookmarkDocSh, - bool bMergeMasterPagesOnly) + ::sd::DrawDocShell* pBookmarkDocSh) { // Use predefined options for file insert operation InsertBookmarkOptions options = InsertBookmarkOptions::ForFileInsert(bLink); - options.bMergeMasterPagesOnly = bMergeMasterPagesOnly; + options.bMergeMasterPagesOnly = /*bMergeMasterPagesOnly*/false; // Create parameter object for page insertion PageInsertionParams aInsertParams(nInsertPos, pExchangeList); @@ -2569,11 +2566,10 @@ bool SdDrawDocument::DropBookmarkAsPage( const PageNameList &rBookmarkList, sal_uInt16 nInsertPos, ::sd::DrawDocShell* pBookmarkDocSh, - bool bMergeMasterPages, - bool bMergeMasterPagesOnly) + bool bMergeMasterPages) { // Use predefined options for drag and drop operation - InsertBookmarkOptions options = InsertBookmarkOptions::ForDragDrop(bMergeMasterPages, bMergeMasterPagesOnly); + InsertBookmarkOptions options = InsertBookmarkOptions::ForDragDrop(bMergeMasterPages, /*bMergeMasterPagesOnly*/false); // Create parameter object for page insertion PageInsertionParams aInsertParams(nInsertPos); @@ -2667,17 +2663,15 @@ bool SdDrawDocument::DropBookmarkAsPage( // Copy or move pages within the same document bool SdDrawDocument::CopyOrMovePagesWithinDocument( const PageNameList &rBookmarkList, - PageNameList *pExchangeList, sal_uInt16 nInsertPos, - bool bPreservePageNames, - bool bMergeMasterPagesOnly) + bool bPreservePageNames) { // Use predefined options for internal document operations - InsertBookmarkOptions options = InsertBookmarkOptions::ForInternalOps(bPreservePageNames, bMergeMasterPagesOnly); + InsertBookmarkOptions options = InsertBookmarkOptions::ForInternalOps(bPreservePageNames, /*bMergeMasterPagesOnly*/false); // Create parameter object for page insertion // When copying within document, source and target are the same - PageInsertionParams aInsertParams(nInsertPos, pExchangeList, this); + PageInsertionParams aInsertParams(nInsertPos, /*pExchangeList*/nullptr, this); DocumentPageCounts pageCounts(GetSdPageCount(PageKind::Standard), aInsertParams.pBookmarkDoc->GetSdPageCount(PageKind::Standard), diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx index 1ded3c5ab719..af77054939e4 100644 --- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx +++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx @@ -332,7 +332,6 @@ sal_Int32 Clipboard::PasteTransferable (sal_Int32 nInsertPosition, bool bMergeMa nInsertPageCount = static_cast<sal_uInt16>(rBookmarkList.size()); rModel.GetDocument()->PasteBookmarkAsPage( rBookmarkList, - nullptr, nInsertIndex, pClipTransferable->GetPageDocShell(), bMergeMasterPages, @@ -353,7 +352,6 @@ sal_Int32 Clipboard::PasteTransferable (sal_Int32 nInsertPosition, bool bMergeMa nInsertPageCount = pDataDoc->GetSdPageCount( PageKind::Standard ); rModel.GetDocument()->PasteBookmarkAsPage( std::vector<OUString>(), - nullptr, nInsertIndex, pDataDocSh, bMergeMasterPages, diff --git a/sd/source/ui/view/ViewClipboard.cxx b/sd/source/ui/view/ViewClipboard.cxx index 66af08ba2bb8..aa29705afd8d 100644 --- a/sd/source/ui/view/ViewClipboard.cxx +++ b/sd/source/ui/view/ViewClipboard.cxx @@ -230,7 +230,6 @@ sal_uInt16 ViewClipboard::InsertSlides ( // This is a regular paste operation rDoc.PasteBookmarkAsPage( pBookmarkList ? *pBookmarkList : std::vector<OUString>(), - nullptr, nInsertPosition, pDataDocSh, bMergeMasterPages);
