Kaydet (Commit) 87b04949 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:returnconstant in DocxAttributeOutput

It appears that the last code which returned something other than true
from PostponeOLE was removed in
    commit 21d356f6
    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: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst ef62f7bd
...@@ -4756,14 +4756,7 @@ void DocxAttributeOutput::WriteOLE2Obj( const SdrObject* pSdrObj, SwOLENode& rOL ...@@ -4756,14 +4756,7 @@ void DocxAttributeOutput::WriteOLE2Obj( const SdrObject* pSdrObj, SwOLENode& rOL
return; return;
if( WriteOLEMath( rOLENode )) if( WriteOLEMath( rOLENode ))
return; return;
if( PostponeOLE( rOLENode, rSize, pFlyFrameFormat )) 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));
} }
bool DocxAttributeOutput::WriteOLEChart( const SdrObject* pSdrObj, const Size& rSize ) bool DocxAttributeOutput::WriteOLEChart( const SdrObject* pSdrObj, const Size& rSize )
...@@ -5183,14 +5176,13 @@ bool DocxAttributeOutput::ExportAsActiveXControl(const SdrObject* pObject) const ...@@ -5183,14 +5176,13 @@ bool DocxAttributeOutput::ExportAsActiveXControl(const SdrObject* pObject) const
return true; 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 ) if( !m_pPostponedOLEs )
//cannot be postponed, try to write now //cannot be postponed, try to write now
WriteOLE( rNode, rSize, pFlyFrameFormat ); WriteOLE( rNode, rSize, pFlyFrameFormat );
else else
m_pPostponedOLEs->push_back( PostponedOLE( &rNode, rSize, pFlyFrameFormat ) ); m_pPostponedOLEs->push_back( PostponedOLE( &rNode, rSize, pFlyFrameFormat ) );
return true;
} }
/* /*
......
...@@ -392,7 +392,7 @@ private: ...@@ -392,7 +392,7 @@ private:
void WriteOLE2Obj( const SdrObject* pSdrObj, SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat); void WriteOLE2Obj( const SdrObject* pSdrObj, SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat);
bool WriteOLEChart( const SdrObject* pSdrObj, const Size& rSize ); bool WriteOLEChart( const SdrObject* pSdrObj, const Size& rSize );
bool WriteOLEMath( const SwOLENode& rNode ); 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 WriteOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* rFlyFrameFormat );
void WriteActiveXControl(const SdrObject* pObject, const SwFrameFormat& rFrameFormat, bool bInsideRun); void WriteActiveXControl(const SdrObject* pObject, const SwFrameFormat& rFrameFormat, bool bInsideRun);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment