summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-05-10 12:56:34 +0200
committerMichael Stahl <mstahl@redhat.com>2017-05-10 18:01:08 +0200
commit60901e880b215d06ab3a7d79d2041bb2c6c64a78 (patch)
tree27860c0f2a6c142cbb503387e137cfa879a32452 /sw/source/filter
parent32f40845a5b463cc45292df69f141a0011582272 (diff)
sw: remove overloading of IDocumentContentOperations::Insert
Change-Id: I29114e7057262f8fd169927abc9d3186a4c74c0c
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/html/htmlgrin.cxx6
-rw-r--r--sw/source/filter/html/htmlplug.cxx12
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx6
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx12
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx3
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx3
-rw-r--r--sw/source/filter/xml/xmltexti.cxx38
7 files changed, 51 insertions, 29 deletions
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 8e6ef04b7c65..153d1e31e346 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -709,8 +709,10 @@ IMAGE_SETEVENT:
aFrameSet.Put( aFrameSize );
// passing empty sGrfNm here, means we don't want the graphic to be linked
- SwFrameFormat *pFlyFormat = m_xDoc->getIDocumentContentOperations().Insert( *m_pPam, sGrfNm, aEmptyOUStr, &aGraphic,
- &aFrameSet, nullptr, nullptr );
+ SwFrameFormat *const pFlyFormat =
+ m_xDoc->getIDocumentContentOperations().InsertGraphic(
+ *m_pPam, sGrfNm, aEmptyOUStr, &aGraphic,
+ &aFrameSet, nullptr, nullptr);
SwGrfNode *pGrfNd = m_xDoc->GetNodes()[ pFlyFormat->GetContent().GetContentIdx()
->GetIndex()+1 ]->GetGrfNode();
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index adc048cb3b67..154372347432 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -459,7 +459,9 @@ void SwHTMLParser::InsertEmbed()
// und in das Dok einfuegen
SwFrameFormat* pFlyFormat =
- m_xDoc->getIDocumentContentOperations().Insert( *m_pPam, ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aFrameSet );
+ m_xDoc->getIDocumentContentOperations().InsertEmbObject(*m_pPam,
+ ::svt::EmbeddedObjectRef(xObj, embed::Aspects::MSOLE_CONTENT),
+ &aFrameSet);
// Namen am FrameFormat setzen
if( !aName.isEmpty() )
@@ -631,7 +633,7 @@ void SwHTMLParser::EndObject()
// und in das Dok einfuegen
SwFrameFormat* pFlyFormat =
- m_xDoc->getIDocumentContentOperations().Insert( *m_pPam,
+ m_xDoc->getIDocumentContentOperations().InsertEmbObject(*m_pPam,
::svt::EmbeddedObjectRef( m_pAppletImpl->GetApplet(), embed::Aspects::MSOLE_CONTENT ),
&m_pAppletImpl->GetItemSet() );
@@ -764,7 +766,7 @@ void SwHTMLParser::EndApplet()
// und in das Dok einfuegen
SwFrameFormat* pFlyFormat =
- m_xDoc->getIDocumentContentOperations().Insert( *m_pPam,
+ m_xDoc->getIDocumentContentOperations().InsertEmbObject(*m_pPam,
::svt::EmbeddedObjectRef( m_pAppletImpl->GetApplet(), embed::Aspects::MSOLE_CONTENT ),
&m_pAppletImpl->GetItemSet());
@@ -937,7 +939,9 @@ void SwHTMLParser::InsertFloatingFrame()
// und in das Dok einfuegen
SwFrameFormat* pFlyFormat =
- m_xDoc->getIDocumentContentOperations().Insert( *m_pPam, ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aFrameSet );
+ m_xDoc->getIDocumentContentOperations().InsertEmbObject(*m_pPam,
+ ::svt::EmbeddedObjectRef(xObj, embed::Aspects::MSOLE_CONTENT),
+ &aFrameSet);
// den alternativen Namen setzen
SwNoTextNode *pNoTextNd =
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 9623dd288355..121f605f34dd 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -3031,7 +3031,8 @@ SwFlyFrameFormat* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObj
// as a linked graphic -
if (GraphicType::NONE == eType || CanUseRemoteLink(aGrfName))
{
- pRetFrameFormat = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, aGrfName, OUString(), nullptr,
+ pRetFrameFormat = m_rDoc.getIDocumentContentOperations().InsertGraphic(
+ *m_pPaM, aGrfName, OUString(), nullptr,
&rFlySet, &aGrSet, nullptr);
bDone = true;
}
@@ -3039,7 +3040,8 @@ SwFlyFrameFormat* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObj
if (!bDone)
{
const Graphic& rGraph = pGrf->GetGraphic();
- pRetFrameFormat = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, OUString(), OUString(), &rGraph,
+ pRetFrameFormat = m_rDoc.getIDocumentContentOperations().InsertGraphic(
+ *m_pPaM, OUString(), OUString(), &rGraph,
&rFlySet, &aGrSet, nullptr);
}
}
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index 6f41f57aab17..4b42da49d882 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -368,8 +368,10 @@ SwFlyFrameFormat* SwWW8ImplReader::MakeGrafNotInContent(const WW8PicDesc& rPD,
aFlySet.Put( SwFormatFrameSize( ATT_FIX_SIZE, nWidth, nHeight ) );
- SwFlyFrameFormat* pFlyFormat = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, rFileName, OUString(), pGraph,
- &aFlySet, &rGrfSet, nullptr);
+ SwFlyFrameFormat *const pFlyFormat =
+ m_rDoc.getIDocumentContentOperations().InsertGraphic(
+ *m_pPaM, rFileName, OUString(), pGraph,
+ &aFlySet, &rGrfSet, nullptr);
// So the frames are generated when inserted in an existing doc:
if (m_rDoc.getIDocumentLayoutAccess().GetCurrentViewShell() &&
@@ -395,7 +397,8 @@ SwFrameFormat* SwWW8ImplReader::MakeGrafInContent(const WW8_PIC& rPic,
if( !pFlyFormat ) // then just as graphic
{
- pFlyFormat = m_rDoc.getIDocumentContentOperations().Insert( *m_pPaM, rFileName, OUString(), pGraph, &aFlySet,
+ pFlyFormat = m_rDoc.getIDocumentContentOperations().InsertGraphic(
+ *m_pPaM, rFileName, OUString(), pGraph, &aFlySet,
&rGrfSet, nullptr);
}
@@ -670,7 +673,8 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
if (!pRet)
{
- pRet = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, OUString(), OUString(),
+ pRet = m_rDoc.getIDocumentContentOperations().InsertGraphic(
+ *m_pPaM, OUString(), OUString(),
&rGraph, &aAttrSet, &aGrSet, nullptr );
}
}
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index 347c398a1b01..ac6d9d4c4525 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -300,7 +300,8 @@ SwFrameFormat* SwWW8ImplReader::ImportOle(const Graphic* pGrf,
GraphicType::Bitmap == aGraph.GetType()
)
{
- pFormat = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, OUString(), OUString(), &aGraph, pFlySet,
+ pFormat = m_rDoc.getIDocumentContentOperations().InsertGraphic(
+ *m_pPaM, OUString(), OUString(), &aGraph, pFlySet,
pGrfSet, nullptr);
}
delete pTempSet;
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index fd6f05de89b3..02b32af08c49 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -2406,7 +2406,8 @@ eF_ResT SwWW8ImplReader::Read_F_IncludePicture( WW8FieldDesc*, OUString& rStr )
RES_FRMATR_END-1 );
aFlySet.Put( SwFormatAnchor( RndStdIds::FLY_AS_CHAR ) );
aFlySet.Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME ));
- m_pFlyFormatOfJustInsertedGraphic = m_rDoc.getIDocumentContentOperations().Insert( *m_pPaM,
+ m_pFlyFormatOfJustInsertedGraphic =
+ m_rDoc.getIDocumentContentOperations().InsertGraphic(*m_pPaM,
aGrfName,
OUString(),
nullptr, // Graphic*
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index 3a67abd2c3f8..4c06084fb6bf 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -287,9 +287,10 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
if( pTextCursor )
{
- pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCursor->GetPaM(),
- ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ),
- &aItemSet );
+ pFrameFormat = pDoc->getIDocumentContentOperations().InsertEmbObject(
+ *pTextCursor->GetPaM(),
+ ::svt::EmbeddedObjectRef(xObj, embed::Aspects::MSOLE_CONTENT),
+ &aItemSet);
pOLENd = lcl_GetOLENode( pFrameFormat );
}
@@ -590,9 +591,11 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink(
uno::UNO_QUERY_THROW );
{
- SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCursor->GetPaM(),
- ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ),
- &aItemSet );
+ SwFrameFormat *const pFrameFormat =
+ pDoc->getIDocumentContentOperations().InsertEmbObject(
+ *pTextCursor->GetPaM(),
+ ::svt::EmbeddedObjectRef(xObj, embed::Aspects::MSOLE_CONTENT),
+ &aItemSet );
// TODO/LATER: in future may need a way to set replacement image url to the link ( may be even to the object ), needs oasis cws???
@@ -650,9 +653,10 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertApplet(
Size( nWidth, nHeight ),
MapUnit::Map100thMM );
- SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCursor->GetPaM(),
- ::svt::EmbeddedObjectRef( aAppletImpl.GetApplet(), embed::Aspects::MSOLE_CONTENT ),
- &aAppletImpl.GetItemSet());
+ SwFrameFormat *const pFrameFormat =
+ pDoc->getIDocumentContentOperations().InsertEmbObject( *pTextCursor->GetPaM(),
+ ::svt::EmbeddedObjectRef(aAppletImpl.GetApplet(), embed::Aspects::MSOLE_CONTENT),
+ &aAppletImpl.GetItemSet());
xPropSet.set(SwXTextEmbeddedObject::CreateXTextEmbeddedObject(
*pDoc, pFrameFormat), uno::UNO_QUERY);
if( pDoc->getIDocumentDrawModelAccess().GetDrawModel() )
@@ -723,9 +727,11 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin(
makeAny( OUString( rMimeType ) ) );
}
- SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCursor->GetPaM(),
- ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ),
- &aItemSet);
+ SwFrameFormat *const pFrameFormat =
+ pDoc->getIDocumentContentOperations().InsertEmbObject(
+ *pTextCursor->GetPaM(),
+ ::svt::EmbeddedObjectRef(xObj, embed::Aspects::MSOLE_CONTENT),
+ &aItemSet);
xPropSet.set(SwXTextEmbeddedObject::CreateXTextEmbeddedObject(
*pDoc, pFrameFormat), uno::UNO_QUERY);
if( pDoc->getIDocumentDrawModelAccess().GetDrawModel() )
@@ -874,9 +880,11 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra
makeAny( sal_Int32( aMargin.Height() ) ) );
}
- SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCursor->GetPaM(),
- ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ),
- &aItemSet);
+ SwFrameFormat *const pFrameFormat =
+ pDoc->getIDocumentContentOperations().InsertEmbObject(
+ *pTextCursor->GetPaM(),
+ ::svt::EmbeddedObjectRef(xObj, embed::Aspects::MSOLE_CONTENT),
+ &aItemSet);
xPropSet.set(SwXTextEmbeddedObject::CreateXTextEmbeddedObject(
*pDoc, pFrameFormat), uno::UNO_QUERY);
if( pDoc->getIDocumentDrawModelAccess().GetDrawModel() )