Kaydet (Commit) 1b9b886a authored tarafından Kohei Yoshida's avatar Kohei Yoshida

sal_Bool to bool.

üst 7ce98f34
...@@ -71,7 +71,7 @@ public: ...@@ -71,7 +71,7 @@ public:
sal_Bool bMirrored; sal_Bool bMirrored;
SdrGrafObjGeoData() SdrGrafObjGeoData()
: bMirrored(sal_False) : bMirrored(false)
{ {
} }
}; };
...@@ -104,21 +104,21 @@ private: ...@@ -104,21 +104,21 @@ private:
String aFilterName; String aFilterName;
GraphicObject* pGraphic; // Zur Beschleunigung von Bitmapausgaben, besonders von gedrehten. GraphicObject* pGraphic; // Zur Beschleunigung von Bitmapausgaben, besonders von gedrehten.
SdrGraphicLink* pGraphicLink; // Und hier noch ein Pointer fuer gelinkte Grafiken SdrGraphicLink* pGraphicLink; // Und hier noch ein Pointer fuer gelinkte Grafiken
bool bMirrored; // True bedeutet, die Grafik ist horizontal, d.h. ueber die Y-Achse gespiegelt auszugeben. bool bMirrored:1; // True bedeutet, die Grafik ist horizontal, d.h. ueber die Y-Achse gespiegelt auszugeben.
// #111096# // #111096#
// Flag for allowing text animation. Default is sal_true. // Flag for allowing text animation. Default is sal_true.
unsigned mbGrafAnimationAllowed : 1; bool mbGrafAnimationAllowed:1;
// #i25616# // #i25616#
unsigned mbInsidePaint : 1; bool mbInsidePaint:1;
unsigned mbIsPreview : 1; bool mbIsPreview:1;
private: private:
void ImpLinkAnmeldung(); void ImpLinkAnmeldung();
void ImpLinkAbmeldung(); void ImpLinkAbmeldung();
sal_Bool ImpUpdateGraphicLink( sal_Bool bAsynchron = sal_True ) const; bool ImpUpdateGraphicLink( bool bAsynchron = true ) const;
void ImpSetLinkedGraphic( const Graphic& rGraphic ); void ImpSetLinkedGraphic( const Graphic& rGraphic );
DECL_LINK( ImpSwapHdl, GraphicObject* ); DECL_LINK( ImpSwapHdl, GraphicObject* );
...@@ -131,7 +131,7 @@ public: ...@@ -131,7 +131,7 @@ public:
virtual ~SdrGrafObj(); virtual ~SdrGrafObj();
void SetGraphicObject( const GraphicObject& rGrfObj ); void SetGraphicObject( const GraphicObject& rGrfObj );
const GraphicObject& GetGraphicObject( bool bForceSwapIn = false) const; const GraphicObject& GetGraphicObject(bool bForceSwapIn = false) const;
void NbcSetGraphic(const Graphic& rGrf); void NbcSetGraphic(const Graphic& rGrf);
void SetGraphic(const Graphic& rGrf); void SetGraphic(const Graphic& rGrf);
...@@ -143,11 +143,11 @@ public: ...@@ -143,11 +143,11 @@ public:
// #111096# // #111096#
// Keep ATM for SD. // Keep ATM for SD.
sal_Bool IsAnimated() const; bool IsAnimated() const;
sal_Bool IsEPS() const; bool IsEPS() const;
sal_Bool IsRenderGraphic() const; bool IsRenderGraphic() const;
sal_Bool HasRenderGraphic() const; bool HasRenderGraphic() const;
sal_Bool IsSwappedOut() const; bool IsSwappedOut() const;
const MapMode& GetGrafPrefMapMode() const; const MapMode& GetGrafPrefMapMode() const;
const Size& GetGrafPrefSize() const; const Size& GetGrafPrefSize() const;
...@@ -160,7 +160,7 @@ public: ...@@ -160,7 +160,7 @@ public:
void SetGraphicLink(const String& rFileName, const String& rFilterName); void SetGraphicLink(const String& rFileName, const String& rFilterName);
void ReleaseGraphicLink(); void ReleaseGraphicLink();
sal_Bool IsLinkedGraphic() const { return (sal_Bool)aFileName.Len(); } bool IsLinkedGraphic() const;
const String& GetFileName() const { return aFileName; } const String& GetFileName() const { return aFileName; }
const String& GetFilterName() const { return aFilterName; } const String& GetFilterName() const { return aFilterName; }
...@@ -203,12 +203,12 @@ public: ...@@ -203,12 +203,12 @@ public:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
bool IsMirrored() { return bMirrored; } bool IsMirrored() const;
void SetMirrored( bool _bMirrored ) { bMirrored = _bMirrored; } void SetMirrored( bool _bMirrored );
// #111096# // #111096#
// Access to GrafAnimationAllowed flag // Access to GrafAnimationAllowed flag
void SetGrafAnimationAllowed(sal_Bool bNew); void SetGrafAnimationAllowed(bool bNew);
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > getInputStream(); ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > getInputStream();
......
...@@ -140,9 +140,9 @@ namespace sdr ...@@ -140,9 +140,9 @@ namespace sdr
else else
{ {
// SwapIn direct // SwapIn direct
rGrafObj.mbInsidePaint = sal_True; rGrafObj.mbInsidePaint = true;
rGrafObj.ForceSwapIn(); rGrafObj.ForceSwapIn();
rGrafObj.mbInsidePaint = sal_False; rGrafObj.mbInsidePaint = false;
} }
bRetval = true; bRetval = true;
...@@ -192,9 +192,9 @@ namespace sdr ...@@ -192,9 +192,9 @@ namespace sdr
else else
{ {
// SwapIn direct // SwapIn direct
rGrafObj.mbInsidePaint = sal_True; rGrafObj.mbInsidePaint = true;
rGrafObj.ForceSwapIn(); rGrafObj.ForceSwapIn();
rGrafObj.mbInsidePaint = sal_False; rGrafObj.mbInsidePaint = false;
} }
bRetval = true; bRetval = true;
......
...@@ -93,7 +93,7 @@ const Graphic ImpLoadLinkedGraphic( const String aFileName, const String aFilter ...@@ -93,7 +93,7 @@ const Graphic ImpLoadLinkedGraphic( const String aFileName, const String aFilter
{ {
Graphic aGraphic; Graphic aGraphic;
SfxMedium xMed( aFileName, STREAM_STD_READ, sal_True ); SfxMedium xMed( aFileName, STREAM_STD_READ, true );
xMed.DownLoad(); xMed.DownLoad();
SvStream* pInStrm = xMed.GetInStream(); SvStream* pInStrm = xMed.GetInStream();
...@@ -114,7 +114,7 @@ const Graphic ImpLoadLinkedGraphic( const String aFileName, const String aFilter ...@@ -114,7 +114,7 @@ const Graphic ImpLoadLinkedGraphic( const String aFileName, const String aFilter
// But this link is required by some filters to access the native graphic (PDF export/MS export), // But this link is required by some filters to access the native graphic (PDF export/MS export),
// there we should create a new service to provide this data if needed // there we should create a new service to provide this data if needed
aFilterData[ 0 ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CreateNativeLink" ) ); aFilterData[ 0 ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CreateNativeLink" ) );
aFilterData[ 0 ].Value = Any( sal_True ); aFilterData[ 0 ].Value = Any( true );
rGF.ImportGraphic( aGraphic, aEmptyStr, *pInStrm, nFilter, NULL, 0, &aFilterData ); rGF.ImportGraphic( aGraphic, aEmptyStr, *pInStrm, nFilter, NULL, 0, &aFilterData );
} }
return aGraphic; return aGraphic;
...@@ -176,7 +176,7 @@ SdrGraphicUpdater::SdrGraphicUpdater( const String& rFileName, const String& rFi ...@@ -176,7 +176,7 @@ SdrGraphicUpdater::SdrGraphicUpdater( const String& rFileName, const String& rFi
: maFileName( rFileName ) : maFileName( rFileName )
, maFilterName( rFilterName ) , maFilterName( rFilterName )
, mrGraphicLink( rGraphicLink ) , mrGraphicLink( rGraphicLink )
, mbIsTerminated( sal_False ) , mbIsTerminated( false )
{ {
create(); create();
} }
...@@ -187,7 +187,7 @@ SdrGraphicUpdater::~SdrGraphicUpdater( void ) ...@@ -187,7 +187,7 @@ SdrGraphicUpdater::~SdrGraphicUpdater( void )
void SdrGraphicUpdater::Terminate() void SdrGraphicUpdater::Terminate()
{ {
mbIsTerminated = sal_True; mbIsTerminated = true;
} }
void SAL_CALL SdrGraphicUpdater::onTerminated(void) void SAL_CALL SdrGraphicUpdater::onTerminated(void)
...@@ -213,7 +213,7 @@ SdrGraphicLink::SdrGraphicLink(SdrGrafObj* pObj) ...@@ -213,7 +213,7 @@ SdrGraphicLink::SdrGraphicLink(SdrGrafObj* pObj)
, pGrafObj( pObj ) , pGrafObj( pObj )
, pGraphicUpdater( NULL ) , pGraphicUpdater( NULL )
{ {
SetSynchron( sal_False ); SetSynchron( false );
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
...@@ -324,21 +324,21 @@ TYPEINIT1(SdrGrafObj,SdrRectObj); ...@@ -324,21 +324,21 @@ TYPEINIT1(SdrGrafObj,SdrRectObj);
SdrGrafObj::SdrGrafObj() SdrGrafObj::SdrGrafObj()
: SdrRectObj(), : SdrRectObj(),
pGraphicLink ( NULL ), pGraphicLink ( NULL ),
bMirrored ( sal_False ) bMirrored ( false )
{ {
pGraphic = new GraphicObject; pGraphic = new GraphicObject;
pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), SWAPGRAPHIC_TIMEOUT ); pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), SWAPGRAPHIC_TIMEOUT );
bNoShear = sal_True; bNoShear = true;
mbGrafAnimationAllowed = sal_True; mbGrafAnimationAllowed = true;
// #i25616# // #i25616#
mbLineIsOutsideGeometry = sal_True; mbLineIsOutsideGeometry = true;
mbInsidePaint = sal_False; mbInsidePaint = false;
mbIsPreview = sal_False; mbIsPreview = false;
// #i25616# // #i25616#
mbSupportTextIndentingOnLineWidthChange = sal_False; mbSupportTextIndentingOnLineWidthChange = false;
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
...@@ -346,21 +346,21 @@ SdrGrafObj::SdrGrafObj() ...@@ -346,21 +346,21 @@ SdrGrafObj::SdrGrafObj()
SdrGrafObj::SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect) SdrGrafObj::SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect)
: SdrRectObj ( rRect ), : SdrRectObj ( rRect ),
pGraphicLink ( NULL ), pGraphicLink ( NULL ),
bMirrored ( sal_False ) bMirrored ( false )
{ {
pGraphic = new GraphicObject( rGrf ); pGraphic = new GraphicObject( rGrf );
pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), SWAPGRAPHIC_TIMEOUT ); pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), SWAPGRAPHIC_TIMEOUT );
bNoShear = sal_True; bNoShear = true;
mbGrafAnimationAllowed = sal_True; mbGrafAnimationAllowed = true;
// #i25616# // #i25616#
mbLineIsOutsideGeometry = sal_True; mbLineIsOutsideGeometry = true;
mbInsidePaint = sal_False; mbInsidePaint = false;
mbIsPreview = sal_False; mbIsPreview = false;
// #i25616# // #i25616#
mbSupportTextIndentingOnLineWidthChange = sal_False; mbSupportTextIndentingOnLineWidthChange = false;
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
...@@ -368,21 +368,21 @@ SdrGrafObj::SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect) ...@@ -368,21 +368,21 @@ SdrGrafObj::SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect)
SdrGrafObj::SdrGrafObj( const Graphic& rGrf ) SdrGrafObj::SdrGrafObj( const Graphic& rGrf )
: SdrRectObj(), : SdrRectObj(),
pGraphicLink ( NULL ), pGraphicLink ( NULL ),
bMirrored ( sal_False ) bMirrored ( false )
{ {
pGraphic = new GraphicObject( rGrf ); pGraphic = new GraphicObject( rGrf );
pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), SWAPGRAPHIC_TIMEOUT ); pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), SWAPGRAPHIC_TIMEOUT );
bNoShear = sal_True; bNoShear = true;
mbGrafAnimationAllowed = sal_True; mbGrafAnimationAllowed = true;
// #i25616# // #i25616#
mbLineIsOutsideGeometry = sal_True; mbLineIsOutsideGeometry = true;
mbInsidePaint = sal_False; mbInsidePaint = false;
mbIsPreview = sal_False; mbIsPreview = false;
// #i25616# // #i25616#
mbSupportTextIndentingOnLineWidthChange = sal_False; mbSupportTextIndentingOnLineWidthChange = false;
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
...@@ -400,7 +400,7 @@ void SdrGrafObj::SetGraphicObject( const GraphicObject& rGrfObj ) ...@@ -400,7 +400,7 @@ void SdrGrafObj::SetGraphicObject( const GraphicObject& rGrfObj )
*pGraphic = rGrfObj; *pGraphic = rGrfObj;
pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), SWAPGRAPHIC_TIMEOUT ); pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), SWAPGRAPHIC_TIMEOUT );
pGraphic->SetUserData(); pGraphic->SetUserData();
mbIsPreview = sal_False; mbIsPreview = false;
SetChanged(); SetChanged();
BroadcastObjectChange(); BroadcastObjectChange();
} }
...@@ -423,7 +423,7 @@ void SdrGrafObj::NbcSetGraphic( const Graphic& rGrf ) ...@@ -423,7 +423,7 @@ void SdrGrafObj::NbcSetGraphic( const Graphic& rGrf )
{ {
pGraphic->SetGraphic( rGrf ); pGraphic->SetGraphic( rGrf );
pGraphic->SetUserData(); pGraphic->SetUserData();
mbIsPreview = sal_False; mbIsPreview = false;
} }
void SdrGrafObj::SetGraphic( const Graphic& rGrf ) void SdrGrafObj::SetGraphic( const Graphic& rGrf )
...@@ -490,29 +490,29 @@ GraphicType SdrGrafObj::GetGraphicType() const ...@@ -490,29 +490,29 @@ GraphicType SdrGrafObj::GetGraphicType() const
return pGraphic->GetType(); return pGraphic->GetType();
} }
sal_Bool SdrGrafObj::IsAnimated() const bool SdrGrafObj::IsAnimated() const
{ {
return pGraphic->IsAnimated(); return pGraphic->IsAnimated();
} }
sal_Bool SdrGrafObj::IsEPS() const bool SdrGrafObj::IsEPS() const
{ {
return pGraphic->IsEPS(); return pGraphic->IsEPS();
} }
sal_Bool SdrGrafObj::IsRenderGraphic() const bool SdrGrafObj::IsRenderGraphic() const
{ {
return pGraphic->IsRenderGraphic(); return pGraphic->IsRenderGraphic();
} }
sal_Bool SdrGrafObj::HasRenderGraphic() const bool SdrGrafObj::HasRenderGraphic() const
{ {
return pGraphic->HasRenderGraphic(); return pGraphic->HasRenderGraphic();
} }
sal_Bool SdrGrafObj::IsSwappedOut() const bool SdrGrafObj::IsSwappedOut() const
{ {
return mbIsPreview ? sal_True : pGraphic->IsSwappedOut(); return mbIsPreview ? true : pGraphic->IsSwappedOut();
} }
const MapMode& SdrGrafObj::GetGrafPrefMapMode() const const MapMode& SdrGrafObj::GetGrafPrefMapMode() const
...@@ -529,7 +529,7 @@ const Size& SdrGrafObj::GetGrafPrefSize() const ...@@ -529,7 +529,7 @@ const Size& SdrGrafObj::GetGrafPrefSize() const
void SdrGrafObj::SetGrafStreamURL( const String& rGraphicStreamURL ) void SdrGrafObj::SetGrafStreamURL( const String& rGraphicStreamURL )
{ {
mbIsPreview = sal_False; mbIsPreview = false;
if( !rGraphicStreamURL.Len() ) if( !rGraphicStreamURL.Len() )
{ {
pGraphic->SetUserData(); pGraphic->SetUserData();
...@@ -565,10 +565,10 @@ void SdrGrafObj::ForceSwapIn() const ...@@ -565,10 +565,10 @@ void SdrGrafObj::ForceSwapIn() const
pGraphic->SetUserData( aUserData ); pGraphic->SetUserData( aUserData );
pGraphic->SetSwapState(); pGraphic->SetSwapState();
const_cast< SdrGrafObj* >( this )->mbIsPreview = sal_False; const_cast< SdrGrafObj* >( this )->mbIsPreview = false;
} }
if ( pGraphicLink && pGraphic->IsSwappedOut() ) if ( pGraphicLink && pGraphic->IsSwappedOut() )
ImpUpdateGraphicLink( sal_False ); ImpUpdateGraphicLink( false );
else else
pGraphic->FireSwapInRequest(); pGraphic->FireSwapInRequest();
...@@ -643,6 +643,11 @@ void SdrGrafObj::ReleaseGraphicLink() ...@@ -643,6 +643,11 @@ void SdrGrafObj::ReleaseGraphicLink()
aFilterName = String(); aFilterName = String();
} }
bool SdrGrafObj::IsLinkedGraphic() const
{
return aFileName.Len() > 0;
}
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
...@@ -655,19 +660,19 @@ void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const ...@@ -655,19 +660,19 @@ void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
aGeo.nDrehWink % 18000 == 0 || aGeo.nDrehWink % 18000 == 0 ||
aGeo.nDrehWink % 27000 == 0; aGeo.nDrehWink % 27000 == 0;
rInfo.bResizePropAllowed = sal_True; rInfo.bResizePropAllowed = true;
rInfo.bRotateFreeAllowed = bNoPresGrf && !bAnim && !bRenderGraphic; rInfo.bRotateFreeAllowed = bNoPresGrf && !bAnim && !bRenderGraphic;
rInfo.bRotate90Allowed = bNoPresGrf && !bAnim && !bRenderGraphic; rInfo.bRotate90Allowed = bNoPresGrf && !bAnim && !bRenderGraphic;
rInfo.bMirrorFreeAllowed = bNoPresGrf && !bAnim && !bRenderGraphic; rInfo.bMirrorFreeAllowed = bNoPresGrf && !bAnim && !bRenderGraphic;
rInfo.bMirror45Allowed = bNoPresGrf && !bAnim && !bRenderGraphic; rInfo.bMirror45Allowed = bNoPresGrf && !bAnim && !bRenderGraphic;
rInfo.bMirror90Allowed = !bEmptyPresObj && !bRenderGraphic; rInfo.bMirror90Allowed = !bEmptyPresObj && !bRenderGraphic;
rInfo.bTransparenceAllowed = sal_False; rInfo.bTransparenceAllowed = false;
rInfo.bGradientAllowed = sal_False; rInfo.bGradientAllowed = false;
rInfo.bShearAllowed = sal_False; rInfo.bShearAllowed = false;
rInfo.bEdgeRadiusAllowed=sal_False; rInfo.bEdgeRadiusAllowed=false;
rInfo.bCanConvToPath = sal_False; rInfo.bCanConvToPath = false;
rInfo.bCanConvToPathLineToArea = sal_False; rInfo.bCanConvToPathLineToArea = false;
rInfo.bCanConvToPolyLineToArea = sal_False; rInfo.bCanConvToPolyLineToArea = false;
rInfo.bCanConvToPoly = !IsEPS() && !bRenderGraphic; rInfo.bCanConvToPoly = !IsEPS() && !bRenderGraphic;
rInfo.bCanConvToContour = (rInfo.bCanConvToPoly || LineGeometryUsageIsNecessary()); rInfo.bCanConvToContour = (rInfo.bCanConvToPoly || LineGeometryUsageIsNecessary());
} }
...@@ -684,16 +689,16 @@ sal_uInt16 SdrGrafObj::GetObjIdentifier() const ...@@ -684,16 +689,16 @@ sal_uInt16 SdrGrafObj::GetObjIdentifier() const
/* The graphic of the GraphicLink will be loaded. If it is called with /* The graphic of the GraphicLink will be loaded. If it is called with
bAsynchron = true then the graphic will be set later via DataChanged bAsynchron = true then the graphic will be set later via DataChanged
*/ */
sal_Bool SdrGrafObj::ImpUpdateGraphicLink( sal_Bool bAsynchron ) const bool SdrGrafObj::ImpUpdateGraphicLink( bool bAsynchron ) const
{ {
sal_Bool bRet = sal_False; bool bRet = false;
if( pGraphicLink ) if( pGraphicLink )
{ {
if ( bAsynchron ) if ( bAsynchron )
pGraphicLink->UpdateAsynchron(); pGraphicLink->UpdateAsynchron();
else else
pGraphicLink->DataChanged( ImpLoadLinkedGraphic( aFileName, aFilterName ) ); pGraphicLink->DataChanged( ImpLoadLinkedGraphic( aFileName, aFilterName ) );
bRet = sal_True; bRet = true;
} }
return bRet; return bRet;
} }
...@@ -1002,7 +1007,7 @@ void SdrGrafObj::SetModel( SdrModel* pNewModel ) ...@@ -1002,7 +1007,7 @@ void SdrGrafObj::SetModel( SdrModel* pNewModel )
void SdrGrafObj::StartAnimation( OutputDevice* /*pOutDev*/, const Point& /*rPoint*/, const Size& /*rSize*/, long /*nExtraData*/) void SdrGrafObj::StartAnimation( OutputDevice* /*pOutDev*/, const Point& /*rPoint*/, const Size& /*rSize*/, long /*nExtraData*/)
{ {
SetGrafAnimationAllowed(sal_True); SetGrafAnimationAllowed(true);
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
...@@ -1077,7 +1082,7 @@ SdrObject* SdrGrafObj::DoConvertToPolyObj(sal_Bool bBezier) const ...@@ -1077,7 +1082,7 @@ SdrObject* SdrGrafObj::DoConvertToPolyObj(sal_Bool bBezier) const
Bitmap aBitmap( GetTransformedGraphic().GetBitmap() ); Bitmap aBitmap( GetTransformedGraphic().GetBitmap() );
XOBitmap aXBmp(aBitmap, XBITMAP_STRETCH); XOBitmap aXBmp(aBitmap, XBITMAP_STRETCH);
aSet.Put(XFillBitmapItem(String(), aXBmp)); aSet.Put(XFillBitmapItem(String(), aXBmp));
aSet.Put(XFillBmpTileItem(sal_False)); aSet.Put(XFillBmpTileItem(false));
pRetval->SetMergedItemSet(aSet); pRetval->SetMergedItemSet(aSet);
} }
...@@ -1103,6 +1108,16 @@ void SdrGrafObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) ...@@ -1103,6 +1108,16 @@ void SdrGrafObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
ImpSetAttrToGrafInfo(); ImpSetAttrToGrafInfo();
} }
bool SdrGrafObj::IsMirrored() const
{
return bMirrored;
}
void SdrGrafObj::SetMirrored( bool _bMirrored )
{
bMirrored = _bMirrored;
}
void SdrGrafObj::ImpSetAttrToGrafInfo() void SdrGrafObj::ImpSetAttrToGrafInfo()
{ {
const SfxItemSet& rSet = GetObjectItemSet(); const SfxItemSet& rSet = GetObjectItemSet();
...@@ -1239,8 +1254,8 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO ) ...@@ -1239,8 +1254,8 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO )
pFilterData = new com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >( 3 ); pFilterData = new com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >( 3 );
com::sun::star::awt::Size aPreviewSizeHint( 64, 64 ); com::sun::star::awt::Size aPreviewSizeHint( 64, 64 );
sal_Bool bAllowPartialStreamRead = sal_True; sal_Bool bAllowPartialStreamRead = true;
sal_Bool bCreateNativeLink = sal_False; sal_Bool bCreateNativeLink = false;
(*pFilterData)[ 0 ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "PreviewSizeHint" ) ); (*pFilterData)[ 0 ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "PreviewSizeHint" ) );
(*pFilterData)[ 0 ].Value <<= aPreviewSizeHint; (*pFilterData)[ 0 ].Value <<= aPreviewSizeHint;
(*pFilterData)[ 1 ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "AllowPartialStreamRead" ) ); (*pFilterData)[ 1 ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "AllowPartialStreamRead" ) );
...@@ -1248,7 +1263,7 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO ) ...@@ -1248,7 +1263,7 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO )
(*pFilterData)[ 2 ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "CreateNativeLink" ) ); (*pFilterData)[ 2 ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "CreateNativeLink" ) );
(*pFilterData)[ 2 ].Value <<= bCreateNativeLink; (*pFilterData)[ 2 ].Value <<= bCreateNativeLink;
mbIsPreview = sal_True; mbIsPreview = true;
} }
if( !GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, if( !GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic,
...@@ -1270,7 +1285,7 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO ) ...@@ -1270,7 +1285,7 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO )
pStream->ResetError(); pStream->ResetError();
} }
} }
else if( !ImpUpdateGraphicLink( sal_False ) ) else if( !ImpUpdateGraphicLink( false ) )
{ {
pRet = GRFMGR_AUTOSWAPSTREAM_TEMP; pRet = GRFMGR_AUTOSWAPSTREAM_TEMP;
} }
...@@ -1288,7 +1303,7 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO ) ...@@ -1288,7 +1303,7 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO )
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
void SdrGrafObj::SetGrafAnimationAllowed(sal_Bool bNew) void SdrGrafObj::SetGrafAnimationAllowed(bool bNew)
{ {
if(mbGrafAnimationAllowed != bNew) if(mbGrafAnimationAllowed != bNew)
{ {
...@@ -1324,8 +1339,8 @@ Reference< XInputStream > SdrGrafObj::getInputStream() ...@@ -1324,8 +1339,8 @@ Reference< XInputStream > SdrGrafObj::getInputStream()
memcpy( pBuffer, pSourceData, nSize ); memcpy( pBuffer, pSourceData, nSize );
SvMemoryStream* pStream = new SvMemoryStream( (void*)pBuffer, (sal_Size)nSize, STREAM_READ ); SvMemoryStream* pStream = new SvMemoryStream( (void*)pBuffer, (sal_Size)nSize, STREAM_READ );
pStream->ObjectOwnsMemory( sal_True ); pStream->ObjectOwnsMemory( true );
xStream.set( new utl::OInputStreamWrapper( pStream, sal_True ) ); xStream.set( new utl::OInputStreamWrapper( pStream, true ) );
} }
} }
} }
......
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