summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorDaniel Rentz <dr@openoffice.org>2010-06-21 15:39:04 +0200
committerDaniel Rentz <dr@openoffice.org>2010-06-21 15:39:04 +0200
commitd90bbc5dd13e751ec630871eab55ac333841c241 (patch)
treee475de770106d05ebf7b47c9b7e711a375d8d9a3 /filter
parent74721a30a80c06fac3d51dbe9da54344b60542ab (diff)
parent33750471297793a14d19f783208f7d8019903570 (diff)
mib16: rebase to m83
Diffstat (limited to 'filter')
-rw-r--r--filter/inc/filter/msfilter/escherex.hxx1
-rw-r--r--filter/source/msfilter/escherex.cxx28
-rw-r--r--filter/source/msfilter/eschesdo.cxx2
-rw-r--r--filter/source/msfilter/msdffimp.cxx7
-rw-r--r--filter/source/msfilter/svdfppt.cxx8
-rw-r--r--filter/source/pdf/pdfexport.cxx4
6 files changed, 46 insertions, 4 deletions
diff --git a/filter/inc/filter/msfilter/escherex.hxx b/filter/inc/filter/msfilter/escherex.hxx
index b98f5dc85147..51058e2eabd8 100644
--- a/filter/inc/filter/msfilter/escherex.hxx
+++ b/filter/inc/filter/msfilter/escherex.hxx
@@ -1197,6 +1197,7 @@ class MSFILTER_DLLPUBLIC EscherPropertyContainer
void Commit( SvStream& rSt, sal_uInt16 nVersion = 3, sal_uInt16 nRecType = ESCHER_OPT );
+ sal_Bool CreateShapeProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape );
sal_Bool CreateOLEGraphicProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXOleObject );
/** Creates a complex ESCHER_Prop_fillBlip containing the BLIP directly (for Excel charts). */
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index ff5be3476da7..2ad33b1e6195 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1101,6 +1101,32 @@ void EscherPropertyContainer::ImplCreateGraphicAttributes( const ::com::sun::sta
}
}
+sal_Bool EscherPropertyContainer::CreateShapeProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape )
+{
+ uno::Reference< beans::XPropertySet > aXPropSet( rXShape, uno::UNO_QUERY );
+ if ( aXPropSet.is() )
+ {
+ sal_Bool bVal = false;
+ ::com::sun::star::uno::Any aAny;
+ sal_uInt32 nShapeAttr = 0;
+ EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Visible" ) ), sal_True );
+ if ( aAny >>= bVal )
+ {
+ if ( !bVal )
+ nShapeAttr |= 0x20002; // set fHidden = true
+ }
+ EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Printable" ) ), sal_True );
+ if ( aAny >>= bVal )
+ {
+ if ( !bVal )
+ nShapeAttr |= 0x10000; // set fPrint = false;
+ }
+ if ( nShapeAttr )
+ AddOpt( ESCHER_Prop_fPrint, nShapeAttr );
+ }
+ return sal_True;
+}
+
sal_Bool EscherPropertyContainer::CreateOLEGraphicProperties(
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape )
{
@@ -4199,7 +4225,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( sal_Bool bFirst )
nRule = GetClosestPoint( aPoly, aRefPoint );
if ( aType == "drawing.Ellipse" )
- nRule <<= 1; // In PPT hat eine Ellipse 8 Möglichkeiten sich zu connecten
+ nRule <<= 1; // In PPT hat eine Ellipse 8 M?glichkeiten sich zu connecten
}
}
return nRule;
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index facc6e799d04..950a32cd0645 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -729,6 +729,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
if( rObj.GetAngle() )
ImplFlipBoundingBox( rObj, aPropOpt );
+ aPropOpt.CreateShapeProperties( rObj.GetShapeRef() );
mpEscherEx->Commit( aPropOpt, rObj.GetRect() );
if( mpEscherEx->GetGroupLevel() > 1 )
mpEscherEx->AddChildAnchor( rObj.GetRect() );
@@ -826,6 +827,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj,
rObj.GetRect() );
}
rObj.SetAngle( nAngle );
+ aPropOpt.CreateShapeProperties( rObj.GetShapeRef() );
mpEscherEx->Commit( aPropOpt, rObj.GetRect() );
// write the childanchor
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index c96dab01c9c1..05411501218e 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -5416,6 +5416,13 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
pRet =
ProcessObj( rSt, aObjData, pClientData, aTextRect, pRet);
+ if ( pRet )
+ {
+ sal_Int32 nGroupProperties( GetPropertyValue( DFF_Prop_fPrint ) );
+ pRet->SetVisible( ( nGroupProperties & 2 ) == 0 );
+ pRet->SetPrintable( ( nGroupProperties & 1 ) != 0 );
+ }
+
if ( mbTracing )
mpTracer->RemoveAttribute( aObjData.nSpFlags & SP_FGROUP
? rtl::OUString::createFromAscii( "GroupShape" )
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 8d8e48832dc9..73868d3a9f55 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -5087,6 +5087,10 @@ void PPTStyleTextPropReader::ReadParaProps( SvStream& rIn, SdrPowerPointImport&
rIn >> nCharCount
>> aParaPropSet.pParaSet->mnDepth; // Einruecktiefe
+ aParaPropSet.pParaSet->mnDepth =
+ std::min(sal_uInt16(9),
+ aParaPropSet.pParaSet->mnDepth);
+
nCharCount--;
rIn >> nMask;
@@ -5320,8 +5324,8 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con
DffRecordHeader aTextHd;
rIn >> aTextHd;
sal_uInt32 nMaxLen = aTextHd.nRecLen;
- if ( nMaxLen > 0xFFFF )
- nMaxLen = 0xFFFF;
+ if ( nMaxLen >= 0xFFFF )
+ nMaxLen = 0xFFFE;
if( aTextHd.nRecType == PPT_PST_TextCharsAtom )
{
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index c868a3ec3157..8115f36d76f8 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -1926,6 +1926,7 @@ void PDFExport::ImplWriteBitmapEx( PDFWriter& rWriter, VirtualDevice& rDummyVDev
SvMemoryStream aStrm;
Bitmap aMask;
+ bool bTrueColorJPG = true;
if ( bUseJPGCompression )
{
sal_uInt32 nZippedFileSize; // sj: we will calculate the filesize of a zipped bitmap
@@ -1956,12 +1957,13 @@ void PDFExport::ImplWriteBitmapEx( PDFWriter& rWriter, VirtualDevice& rDummyVDev
aFilterData[ 1 ].Value <<= nColorMode;
/*sal_uInt16 nError =*/ aGraphicFilter.ExportGraphic( aGraphic, String(), aStrm, nFormatName, &aFilterData );
+ bTrueColorJPG = ((aGraphicFilter.GetExportGraphicHint() & GRFILTER_OUTHINT_GREY) == 0);
aStrm.Seek( STREAM_SEEK_TO_END );
if ( aStrm.Tell() > nZippedFileSize )
bUseJPGCompression = sal_False;
}
if ( bUseJPGCompression )
- rWriter.DrawJPGBitmap( aStrm, true, aSizePixel, Rectangle( aPoint, aSize ), aMask );
+ rWriter.DrawJPGBitmap( aStrm, bTrueColorJPG, aSizePixel, Rectangle( aPoint, aSize ), aMask );
else if ( aBitmapEx.IsTransparent() )
rWriter.DrawBitmapEx( aPoint, aSize, aBitmapEx );
else