summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml/xmltexti.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-27 11:12:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-27 13:06:59 +0200
commite5ece062058f7772f8414d47d07bb8af6e8e5c2a (patch)
tree97ab9340c5e29f5445279a9585b4abe42396b14d /sw/source/filter/xml/xmltexti.cxx
parent2d5090419e0113f5b411ee84bfc55926a19da411 (diff)
loplugin:oncevar in sw
Change-Id: Ia96172489eec09607113d388a5b683bb6e0d2dec Reviewed-on: https://gerrit.libreoffice.org/39290 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/xml/xmltexti.cxx')
-rw-r--r--sw/source/filter/xml/xmltexti.cxx15
1 files changed, 5 insertions, 10 deletions
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index 99052561e3db..58a3bd20f4b8 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -269,8 +269,6 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
try
{
// create object with desired ClassId
- sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
- OUString aName("DummyName");
uno::Sequence < sal_Int8 > aClass( aClassName.GetByteSequence() );
uno::Reference < embed::XEmbeddedObjectCreator > xFactory = embed::EmbeddedObjectCreator::create( ::comphelper::getProcessComponentContext() );
uno::Sequence<beans::PropertyValue> aObjArgs( comphelper::InitPropertySequence({
@@ -278,11 +276,11 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
}));
uno::Reference < embed::XEmbeddedObject > xObj =
uno::Reference < embed::XEmbeddedObject >( xFactory->createInstanceInitNew(
- aClass, OUString(), xStorage, aName, aObjArgs), uno::UNO_QUERY );
+ aClass, OUString(), xStorage, "DummyName", aObjArgs), uno::UNO_QUERY );
if ( xObj.is() )
{
//TODO/LATER: is it enough to only set the VisAreaSize?
- lcl_setObjectVisualArea( xObj, nAspect, aTwipSize, MapUnit::MapTwip );
+ lcl_setObjectVisualArea( xObj, embed::Aspects::MSOLE_CONTENT, aTwipSize, MapUnit::MapTwip );
}
if( pTextCursor )
@@ -566,7 +564,6 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink(
try
{
// create object with desired ClassId
- OUString aName("DummyName");
uno::Reference < embed::XEmbeddedObjectCreator > xFactory =
embed::OOoEmbeddedObjectFactory::create(::comphelper::getProcessComponentContext());
@@ -587,7 +584,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink(
uno::Reference < embed::XEmbeddedObject > xObj(
xFactory->createInstanceLink(
- xStorage, aName, aMediaDescriptor, uno::Sequence< beans::PropertyValue >() ),
+ xStorage, "DummyName", aMediaDescriptor, uno::Sequence< beans::PropertyValue >() ),
uno::UNO_QUERY_THROW );
{
@@ -700,12 +697,11 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin(
try
{
// create object with desired ClassId
- OUString aName("DummyName");
uno::Sequence < sal_Int8 > aClass( SvGlobalName( SO3_PLUGIN_CLASSID ).GetByteSequence() );
uno::Reference < embed::XEmbeddedObjectCreator > xFactory = embed::EmbeddedObjectCreator::create( ::comphelper::getProcessComponentContext() );
uno::Reference < embed::XEmbeddedObject > xObj =
uno::Reference < embed::XEmbeddedObject >( xFactory->createInstanceInitNew(
- aClass, OUString(), xStorage, aName,
+ aClass, OUString(), xStorage, "DummyName",
uno::Sequence < beans::PropertyValue >() ), uno::UNO_QUERY );
// set size to the object
@@ -833,12 +829,11 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra
try
{
// create object with desired ClassId
- OUString aName("DummyName");
uno::Sequence < sal_Int8 > aClass( SvGlobalName( SO3_IFRAME_CLASSID ).GetByteSequence() );
uno::Reference < embed::XEmbeddedObjectCreator > xFactory = embed::EmbeddedObjectCreator::create( ::comphelper::getProcessComponentContext() );
uno::Reference < embed::XEmbeddedObject > xObj =
uno::Reference < embed::XEmbeddedObject >( xFactory->createInstanceInitNew(
- aClass, OUString(), xStorage, aName,
+ aClass, OUString(), xStorage, "DummyName",
uno::Sequence < beans::PropertyValue >() ), uno::UNO_QUERY );
// set size to the object