summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorLászló Németh <laszlo.nemeth@collabora.com>2015-03-23 16:16:28 +0100
committerNémeth László <nemeth@numbertext.org>2015-03-24 07:38:04 +0000
commit9b0e09dedc76a3bc4fd7a128a3a115b328727e00 (patch)
treeea05f0ca70cf559c679f5f3bb0b7d2a107bae443 /filter
parent799a7878fd5b3a5a01b59d0a4139a2b0908ccc43 (diff)
SkipImages option for document import
This option allows images and drawings to be skipped while importing DOC and DOCX, for text-only conversion or indexing. Change-Id: Id4bfbbe48d8a8e970b1cb5922187768bf94dc918 Reviewed-on: https://gerrit.libreoffice.org/14733 Reviewed-by: Németh László <nemeth@numbertext.org> Tested-by: Németh László <nemeth@numbertext.org>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/msdffimp.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index a3e880d8ed53..e3c35f8606b2 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -4278,9 +4278,11 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
if ( bGraphic )
{
- pRet = ImportGraphic( rSt, aSet, aObjData ); // SJ: #68396# is no longer true (fixed in ppt2000)
- ApplyAttributes( rSt, aSet, aObjData );
- pRet->SetMergedItemSet(aSet);
+ if (!mbSkipImages) {
+ pRet = ImportGraphic( rSt, aSet, aObjData ); // SJ: #68396# is no longer true (fixed in ppt2000)
+ ApplyAttributes( rSt, aSet, aObjData );
+ pRet->SetMergedItemSet(aSet);
+ }
}
else if ( aObjData.eShapeType == mso_sptLine && !( GetPropertyValue( DFF_Prop_fc3DLightFace ) & 8 ) )
{
@@ -5527,7 +5529,8 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
long nApplicationScale,
ColorData mnDefaultColor_,
sal_uLong nDefaultFontHeight_,
- SvStream* pStData2_ )
+ SvStream* pStData2_,
+ bool bSkipImages )
:DffPropertyReader( *this ),
pFormModel( NULL ),
pBLIPInfos( new SvxMSDffBLIPInfos ),
@@ -5550,7 +5553,8 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
nSvxMSDffOLEConvFlags( 0 ),
pSecPropSet( NULL ),
mnDefaultColor( mnDefaultColor_),
- mbTracing( false )
+ mbTracing( false ),
+ mbSkipImages (bSkipImages)
{
SetModel( pSdrModel_, nApplicationScale );