summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-15 10:51:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-16 08:55:31 +0200
commit87b04949ee633c9bd8f1407394a104ec70e4031d (patch)
treea6ce3be8a3fa9abb28719b69fdc4e47965d25cc1 /sw
parentef62f7bdfc5ff6e1a2c23f67a3339fd24608f4f5 (diff)
loplugin:returnconstant in DocxAttributeOutput
It appears that the last code which returned something other than true from PostponeOLE was removed in commit 21d356f691a7c1859f85a19c79060a3d31cffc21 Date: Fri Feb 28 10:44:53 2014 +0100 sw: export OLE objects outside run properties Change-Id: Ie0197be980014a7ceb58c6b71adf69babd734e4e Reviewed-on: https://gerrit.libreoffice.org/59128 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx12
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx2
2 files changed, 3 insertions, 11 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index f97ffe2645a6..3696f11070ef 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4756,14 +4756,7 @@ void DocxAttributeOutput::WriteOLE2Obj( const SdrObject* pSdrObj, SwOLENode& rOL
return;
if( WriteOLEMath( rOLENode ))
return;
- if( PostponeOLE( rOLENode, rSize, pFlyFrameFormat ))
- return;
- // Then we fall back to just export the object as a graphic.
- if( !m_pPostponedGraphic )
- FlyFrameGraphic( nullptr, rSize, pFlyFrameFormat, &rOLENode );
- else
- // w:drawing should not be inside w:rPr, so write it out later
- m_pPostponedGraphic->push_back(PostponedGraphic(nullptr, rSize, pFlyFrameFormat, &rOLENode, nullptr));
+ PostponeOLE( rOLENode, rSize, pFlyFrameFormat );
}
bool DocxAttributeOutput::WriteOLEChart( const SdrObject* pSdrObj, const Size& rSize )
@@ -5183,14 +5176,13 @@ bool DocxAttributeOutput::ExportAsActiveXControl(const SdrObject* pObject) const
return true;
}
-bool DocxAttributeOutput::PostponeOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat )
+void DocxAttributeOutput::PostponeOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat )
{
if( !m_pPostponedOLEs )
//cannot be postponed, try to write now
WriteOLE( rNode, rSize, pFlyFrameFormat );
else
m_pPostponedOLEs->push_back( PostponedOLE( &rNode, rSize, pFlyFrameFormat ) );
- return true;
}
/*
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index 4d380bf6e656..e4c331ad0dcc 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -392,7 +392,7 @@ private:
void WriteOLE2Obj( const SdrObject* pSdrObj, SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat);
bool WriteOLEChart( const SdrObject* pSdrObj, const Size& rSize );
bool WriteOLEMath( const SwOLENode& rNode );
- bool PostponeOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat );
+ void PostponeOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat );
void WriteOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* rFlyFrameFormat );
void WriteActiveXControl(const SdrObject* pObject, const SwFrameFormat& rFrameFormat, bool bInsideRun);