summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docedt.cxx3
-rw-r--r--sw/source/core/doc/docnew.cxx3
-rw-r--r--sw/source/core/edit/edlingu.cxx3
-rw-r--r--sw/source/filter/xml/wrtxml.cxx4
-rw-r--r--sw/source/uibase/table/tablemgr.cxx19
5 files changed, 16 insertions, 16 deletions
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 56d8f0ed01ad..c73d05f4c2a7 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -41,6 +41,7 @@
#include <vector>
#include <com/sun/star/linguistic2/XProofreadingIterator.hpp>
+#include <com/sun/star/frame/XModel.hpp>
using namespace ::com::sun::star;
using namespace ::com::sun::star::linguistic2;
@@ -618,7 +619,7 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
uno::Reference< linguistic2::XProofreadingIterator > xGCIterator( GetGCIterator() );
if (xGCIterator.is())
{
- uno::Reference< lang::XComponent > xDoc( GetDocShell()->GetBaseModel(), uno::UNO_QUERY );
+ uno::Reference< lang::XComponent > xDoc = GetDocShell()->GetBaseModel();
// Expand the string:
const ModelToViewHelper aConversionMap(*pNd->GetTextNode(), pLayout);
const OUString& aExpandText = aConversionMap.getViewText();
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 9efcc13c0f52..781c1a466e02 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -25,6 +25,7 @@
#include <proofreadingiterator.hxx>
#include <com/sun/star/text/XFlatParagraphIteratorProvider.hpp>
#include <com/sun/star/linguistic2/XProofreadingIterator.hpp>
+#include <com/sun/star/frame/XModel.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/random.hxx>
@@ -146,7 +147,7 @@ bool SwDoc::StartGrammarChecking( bool bSkipStart )
uno::Reference< linguistic2::XProofreadingIterator > xGCIterator( GetGCIterator() );
if ( xGCIterator.is() )
{
- uno::Reference< lang::XComponent > xDoc( GetDocShell()->GetBaseModel(), uno::UNO_QUERY );
+ uno::Reference< lang::XComponent > xDoc = GetDocShell()->GetBaseModel();
uno::Reference< text::XFlatParagraphIteratorProvider > xFPIP( xDoc, uno::UNO_QUERY );
// start automatic background checking if not active already
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 62d1b94679a9..a7abd1b50687 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/linguistic2/ProofreadingResult.hpp>
#include <com/sun/star/linguistic2/XProofreadingIterator.hpp>
#include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
@@ -984,7 +985,7 @@ bool SwEditShell::GetGrammarCorrection(
uno::Reference< linguistic2::XProofreadingIterator > xGCIterator( mxDoc->GetGCIterator() );
if (xGCIterator.is())
{
- uno::Reference< lang::XComponent > xDoc( mxDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY );
+ uno::Reference< lang::XComponent > xDoc = mxDoc->GetDocShell()->GetBaseModel();
// Expand the string:
const ModelToViewHelper aConversionMap(*pNode, GetLayout());
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index 4904f63d75dc..4a7d5f879524 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/document/XExporter.hpp>
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/frame/XModule.hpp>
+#include <com/sun/star/frame/XModel.hpp>
#include <comphelper/fileformat.h>
#include <comphelper/processfactory.hxx>
@@ -248,8 +249,7 @@ ErrCode SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& xS
*pArgs++ <<= xStatusIndicator;
//Get model
- uno::Reference< lang::XComponent > xModelComp(
- m_pDoc->GetDocShell()->GetModel(), UNO_QUERY );
+ uno::Reference< lang::XComponent > xModelComp = m_pDoc->GetDocShell()->GetModel();
OSL_ENSURE( xModelComp.is(), "XMLWriter::Write: got no model" );
if( !xModelComp.is() )
return ERR_SWG_WRITE_ERROR;
diff --git a/sw/source/uibase/table/tablemgr.cxx b/sw/source/uibase/table/tablemgr.cxx
index 77adc6b2e716..ecf9b6deafc6 100644
--- a/sw/source/uibase/table/tablemgr.cxx
+++ b/sw/source/uibase/table/tablemgr.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/beans/PropertyState.hpp>
#include <com/sun/star/embed/EmbedVerbs.hpp>
#include <com/sun/star/embed/XComponentSupplier.hpp>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <comphelper/classids.hxx>
#include <svx/charthelper.hxx>
@@ -222,19 +223,15 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
if (ppFlyFrameFormat)
*ppFlyFrameFormat = pTmp;
- uno::Reference< embed::XComponentSupplier > xCompSupp( xObj, uno::UNO_QUERY );
- if( xCompSupp.is())
+ xChartModel.set( xObj->getComponent(), uno::UNO_QUERY );
+ if( xChartModel.is() )
{
- xChartModel.set( xCompSupp->getComponent(), uno::UNO_QUERY );
- if( xChartModel.is() )
- {
- // Create a default chart type.
- uno::Reference<chart2::XChartDocument> xChartDoc(xChartModel, uno::UNO_QUERY);
- if (xChartDoc.is())
- xChartDoc->createDefaultChart();
+ // Create a default chart type.
+ uno::Reference<chart2::XChartDocument> xChartDoc(xChartModel, uno::UNO_QUERY);
+ if (xChartDoc.is())
+ xChartDoc->createDefaultChart();
- xChartModel->lockControllers(); //#i79578# don't request a new replacement image for charts to often - block change notifications
- }
+ xChartModel->lockControllers(); //#i79578# don't request a new replacement image for charts to often - block change notifications
}
// set the table name at the OLE-node