diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/IDocumentContentOperations.hxx | 4 | ||||
-rw-r--r-- | sw/inc/editsh.hxx | 2 | ||||
-rw-r--r-- | sw/inc/swunohelper.hxx | 5 | ||||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/doc/DocumentContentOperationsManager.cxx | 11 | ||||
-rw-r--r-- | sw/source/core/edit/eddel.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/edit/edfcol.cxx | 7 | ||||
-rw-r--r-- | sw/source/core/edit/editsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/DocumentContentOperationsManager.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/swunohelper.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unoframe.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/misc/glosdoc.cxx | 2 |
12 files changed, 23 insertions, 30 deletions
diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx index 5ba9b1a6d3fc..fb4006334a15 100644 --- a/sw/inc/IDocumentContentOperations.hxx +++ b/sw/inc/IDocumentContentOperations.hxx @@ -162,11 +162,11 @@ public: virtual SwFlyFrameFormat* InsertGraphicObject( const SwPaM& rRg, const GraphicObject& rGrfObj, const SfxItemSet* pFlyAttrSet, - const SfxItemSet* pGrfAttrSet, SwFrameFormat*) = 0; + const SfxItemSet* pGrfAttrSet) = 0; /** Transpose graphic (with undo) */ - virtual void ReRead(SwPaM&, const OUString& rGrfName, const OUString& rFltName, const Graphic* pGraphic, const GraphicObject* pGrfObj) = 0; + virtual void ReRead(SwPaM&, const OUString& rGrfName, const OUString& rFltName, const Graphic* pGraphic) = 0; /** Insert a DrawObject. The object must be already registered in DrawModel. diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 6ecf2ce5e75b..91bbf131e0e0 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -388,7 +388,7 @@ public: /// Removes the paragraph metadata field at the current cursor, if any. /// Returns true iff a paragraph metadata field was removed. /// Currently there are two variants: signature and classification. - bool RemoveParagraphMetadataFieldAtCursor(const bool bBackspaceNotDel); + bool RemoveParagraphMetadataFieldAtCursor(); void Insert2(SwField const &, const bool bForceExpandHints); diff --git a/sw/inc/swunohelper.hxx b/sw/inc/swunohelper.hxx index 79ad3c47a295..35459bdcfa31 100644 --- a/sw/inc/swunohelper.hxx +++ b/sw/inc/swunohelper.hxx @@ -43,9 +43,8 @@ sal_Int32 GetEnumAsInt32( const css::uno::Any& rVal ); // delete the file under this URL SW_DLLPUBLIC bool UCB_DeleteFile( const OUString& rURL ); - // copy/move the file to a new location -bool UCB_CopyFile( const OUString& rURL, const OUString& rNewURL, - bool bCopyIsMove ); + // move the file to a new location +bool UCB_MoveFile( const OUString& rURL, const OUString& rNewURL ); // is the URL on the current system case sensitive? SW_DLLPUBLIC bool UCB_IsCaseSensitiveFileName( const OUString& rURL ); diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 339b7f5b4ef6..05478b782488 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -3612,9 +3612,9 @@ void SwUiWriterTest::testUndoDelAsCharTdf107512() frameSet.Put(anchor); GraphicObject grf; pShell->SttEndDoc(true); - CPPUNIT_ASSERT(rIDCO.InsertGraphicObject(*pShell->GetCursor(), grf, &frameSet, &grfSet, nullptr)); + CPPUNIT_ASSERT(rIDCO.InsertGraphicObject(*pShell->GetCursor(), grf, &frameSet, &grfSet)); pShell->SttEndDoc(false); - CPPUNIT_ASSERT(rIDCO.InsertGraphicObject(*pShell->GetCursor(), grf, &frameSet, &grfSet, nullptr)); + CPPUNIT_ASSERT(rIDCO.InsertGraphicObject(*pShell->GetCursor(), grf, &frameSet, &grfSet)); CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF)); SvxCharHiddenItem hidden(true, RES_CHRATR_HIDDEN); pShell->SelectText(1, 4); @@ -3763,7 +3763,7 @@ void SwUiWriterTest::testUndoDelAsChar() SwFormatAnchor anchor(RndStdIds::FLY_AS_CHAR); frameSet.Put(anchor); GraphicObject grf; - CPPUNIT_ASSERT(rIDCO.InsertGraphicObject(*pShell->GetCursor(), grf, &frameSet, &grfSet, nullptr)); + CPPUNIT_ASSERT(rIDCO.InsertGraphicObject(*pShell->GetCursor(), grf, &frameSet, &grfSet)); CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF)); pShell->SetMark(); pShell->Left(1, CRSR_SKIP_CHARS); diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 5bba95739fa4..4044019605d1 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -2640,11 +2640,9 @@ SwFlyFrameFormat* DocumentContentOperationsManager::InsertGraphic( SwFlyFrameFormat* DocumentContentOperationsManager::InsertGraphicObject( const SwPaM &rRg, const GraphicObject& rGrfObj, const SfxItemSet* pFlyAttrSet, - const SfxItemSet* pGrfAttrSet, - SwFrameFormat* pFrameFormat ) + const SfxItemSet* pGrfAttrSet ) { - if( !pFrameFormat ) - pFrameFormat = m_rDoc.getIDocumentStylePoolAccess().GetFrameFormatFromPool( RES_POOLFRM_GRAPHIC ); + SwFrameFormat* pFrameFormat = m_rDoc.getIDocumentStylePoolAccess().GetFrameFormatFromPool( RES_POOLFRM_GRAPHIC ); SwGrfNode* pSwGrfNode = SwNodes::MakeGrfNode( SwNodeIndex( m_rDoc.GetNodes().GetEndOfAutotext() ), rGrfObj, m_rDoc.GetDfltGrfFormatColl() ); @@ -2694,8 +2692,7 @@ SwFlyFrameFormat* DocumentContentOperationsManager::InsertOLE(const SwPaM &rRg, } void DocumentContentOperationsManager::ReRead( SwPaM& rPam, const OUString& rGrfName, - const OUString& rFltName, const Graphic* pGraphic, - const GraphicObject* pGrafObj ) + const OUString& rFltName, const Graphic* pGraphic ) { SwGrfNode *pGrfNd; if( ( !rPam.HasMark() @@ -2712,7 +2709,7 @@ void DocumentContentOperationsManager::ReRead( SwPaM& rPam, const OUString& rGrf GetMirrorGrf().GetValue() ) pGrfNd->SetAttr( SwMirrorGrf() ); - pGrfNd->ReRead( rGrfName, rFltName, pGraphic, pGrafObj ); + pGrfNd->ReRead( rGrfName, rFltName, pGraphic, /*pGrafObj*/nullptr ); m_rDoc.getIDocumentState().SetModified(); } } diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx index a0e1c4bd6646..bcd0f9d7b34e 100644 --- a/sw/source/core/edit/eddel.cxx +++ b/sw/source/core/edit/eddel.cxx @@ -144,7 +144,7 @@ long SwEditShell::Delete() } else { - nRet = RemoveParagraphMetadataFieldAtCursor(true) ? 1 : 0; + nRet = RemoveParagraphMetadataFieldAtCursor() ? 1 : 0; } return nRet; diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 696ec27507e9..a9e7d1d05ad1 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -2023,7 +2023,7 @@ bool SwEditShell::IsCursorInParagraphMetadataField() const return false; } -bool SwEditShell::RemoveParagraphMetadataFieldAtCursor(const bool bBackspaceNotDel) +bool SwEditShell::RemoveParagraphMetadataFieldAtCursor() { if (GetCursor() && GetCursor()->Start()) { @@ -2034,10 +2034,7 @@ bool SwEditShell::RemoveParagraphMetadataFieldAtCursor(const bool bBackspaceNotD { // Try moving the cursor to see if we're _facing_ a metafield or not, // as opposed to being within one. - if (bBackspaceNotDel) - index--; // Backspace moves left - else - index++; // Delete moves right + index--; // Backspace moves left xField = lcl_GetParagraphMetadataFieldAtIndex(GetDoc()->GetDocShell(), pNode, index); } diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 7d3dd51265b7..08248c57373c 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -291,7 +291,7 @@ void SwEditShell::ReRead( const OUString& rGrfName, const OUString& rFltName, const Graphic* pGraphic ) { StartAllAction(); - mxDoc->getIDocumentContentOperations().ReRead( *GetCursor(), rGrfName, rFltName, pGraphic, nullptr ); + mxDoc->getIDocumentContentOperations().ReRead( *GetCursor(), rGrfName, rFltName, pGraphic ); EndAllAction(); } diff --git a/sw/source/core/inc/DocumentContentOperationsManager.hxx b/sw/source/core/inc/DocumentContentOperationsManager.hxx index a56971f2ecc0..c60676617b78 100644 --- a/sw/source/core/inc/DocumentContentOperationsManager.hxx +++ b/sw/source/core/inc/DocumentContentOperationsManager.hxx @@ -67,9 +67,9 @@ public: const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrameFormat*) override; SwFlyFrameFormat* InsertGraphicObject(const SwPaM& rRg, const GraphicObject& rGrfObj, const SfxItemSet* pFlyAttrSet, - const SfxItemSet* pGrfAttrSet, SwFrameFormat*) override; + const SfxItemSet* pGrfAttrSet) override; - void ReRead(SwPaM&, const OUString& rGrfName, const OUString& rFltName, const Graphic* pGraphic, const GraphicObject* pGrfObj) override; + void ReRead(SwPaM&, const OUString& rGrfName, const OUString& rFltName, const Graphic* pGraphic) override; SwDrawFrameFormat* InsertDrawObj( const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet& rFlyAttrSet ) override; diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx index 30dadb978edf..e2fcdcf0724f 100644 --- a/sw/source/core/unocore/swunohelper.cxx +++ b/sw/source/core/unocore/swunohelper.cxx @@ -74,7 +74,7 @@ bool UCB_DeleteFile( const OUString& rURL ) return bRemoved; } -bool UCB_CopyFile( const OUString& rURL, const OUString& rNewURL, bool bCopyIsMove ) +bool UCB_MoveFile( const OUString& rURL, const OUString& rNewURL ) { bool bCopyCompleted = true; try @@ -92,7 +92,7 @@ bool UCB_CopyFile( const OUString& rURL, const OUString& rNewURL, bool bCopyIsMo aInfo.NameClash = css::ucb::NameClash::ERROR; aInfo.NewTitle = sName; aInfo.SourceURL = rURL; - aInfo.MoveData = bCopyIsMove; + aInfo.MoveData = true; aTempContent.executeCommand( "transfer", uno::Any(aInfo) ); } catch( css::uno::Exception& ) diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 8e29518d5070..a49f49f7d973 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -1571,7 +1571,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any& throw uno::RuntimeException(); } SwPaM aGrfPaM(*pGrfNode); - pFormat->GetDoc()->getIDocumentContentOperations().ReRead(aGrfPaM, sGrfName, sFltName, nullptr, nullptr); + pFormat->GetDoc()->getIDocumentContentOperations().ReRead(aGrfPaM, sGrfName, sFltName, nullptr); } } else if (FN_UNO_GRAPHIC == pEntry->nWID) @@ -1591,7 +1591,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any& } SwPaM aGrfPaM(*pGrfNode); Graphic aGraphic( xGraphic ); - pFormat->GetDoc()->getIDocumentContentOperations().ReRead( aGrfPaM, OUString(), OUString(), &aGraphic, nullptr ); + pFormat->GetDoc()->getIDocumentContentOperations().ReRead( aGrfPaM, OUString(), OUString(), &aGraphic ); } } } diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx index ae1b4396b1ec..c23f9d36c127 100644 --- a/sw/source/uibase/misc/glosdoc.cxx +++ b/sw/source/uibase/misc/glosdoc.cxx @@ -228,7 +228,7 @@ bool SwGlossaries::RenameGroupDoc( return false; } - if (!SWUnoHelper::UCB_CopyFile(sOldFileURL, sNewFileURL, true )) + if (!SWUnoHelper::UCB_MoveFile(sOldFileURL, sNewFileURL )) return false; RemoveFileFromList( rOldGroup ); |