summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-10-27 16:20:25 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-10-27 16:20:25 +0000
commit959cfafb5d71c24b4568473fc3fa8c3bb8c30243 (patch)
treeceb0cafeea4bf085e6e70f531989c0985ce7ce4e /svtools
parent728c8eb458b5613eb5b8bbe8201dfc33a8a9cd78 (diff)
CWS-TOOLING: integrate CWS ooo32gsl01
2009-10-13 15:59:25 +0200 hdu r276868 : #i100000# fix remaining merge conflict 2009-10-12 16:08:38 +0200 hdu r276837 : CWS-TOOLING: rebase CWS ooo32gsl01 to branches/OOO320@276773 (milestone: OOO320:m1) 2009-09-15 10:09:52 +0200 hdu r276150 : #i104861# adjust metrics to pseudo-emUnits==1000 expectation for better precision allow non-integer charwidth/stemwidth 2009-09-15 09:58:00 +0200 hdu r276149 : #i104861# prepare to fix by updating cff.cxx to latest version from CWS vcl105 2009-09-14 16:06:46 +0200 hdu r276130 : #i104221# treat judeo-spanish varika as diacritic also in problematic fonts (thanks yoramg) 2009-09-14 15:27:14 +0200 hdu r276126 : #i104221# fix regression with he/ar diacritics 2009-09-10 15:39:58 +0200 aw r276038 : #i104867# added a GraphicVersion number to EmbeddedObjectRef to allow Grahic chamge checks without fetching the graphic 2009-09-10 15:38:41 +0200 aw r276037 : #i104867# added GraphicVersionNumber to SdrOleContentPrimitive to detect OLE content change without getting the Graphic 2009-09-09 17:16:43 +0200 hdu r276006 : #i104886# Aqua: fix for 101491 only applies to non-hairlines 2009-09-09 16:39:05 +0200 hdu r276002 : #i99849# don't give up on ScriptItemize too early
Diffstat (limited to 'svtools')
-rw-r--r--svtools/inc/svtools/embedhlp.hxx10
-rw-r--r--svtools/source/misc/embedhlp.cxx41
2 files changed, 40 insertions, 11 deletions
diff --git a/svtools/inc/svtools/embedhlp.hxx b/svtools/inc/svtools/embedhlp.hxx
index f4cccd3115b8..68763a3fd487 100644
--- a/svtools/inc/svtools/embedhlp.hxx
+++ b/svtools/inc/svtools/embedhlp.hxx
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: embedhlp.hxx,v $
- * $Revision: 1.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -131,6 +128,13 @@ namespace svt
BOOL is() const { return mxObj.is(); }
BOOL IsChart() const;
+
+ // #i104867#
+ // Provides a graphic version number for the fetchable Graphic during this object's lifetime. Internally,
+ // that number is incremented at each change of the Graphic. This mechanism is needed to identify if a
+ // remembered Graphic (e.g. primitives) has changed compared to the current one, but without actively
+ // fetching the Graphic what would be too expensive e.g. for charts
+ sal_uInt32 getGraphicVersion() const;
void SetDefaultSizeForChart( const Size& rSizeIn_100TH_MM );//#i103460# charts do not necessaryly have an own size within ODF files, in this case they need to use the size settings from the surrounding frame, which is made available with this method
};
}
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index 6bd1126f8082..edddb7c1ab6d 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -7,7 +7,6 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: embedhlp.cxx,v $
- * $Revision: 1.28 $
*
* This file is part of OpenOffice.org.
*
@@ -189,7 +188,6 @@ void SAL_CALL EmbedEventListener_Impl::modified( const lang::EventObject& ) thro
pObject->UpdateReplacementOnDemand();
}
}
-
}
void SAL_CALL EmbedEventListener_Impl::notifyEvent( const document::EventObject& aEvent ) throw( uno::RuntimeException )
@@ -250,6 +248,9 @@ struct EmbeddedObjectRef_Impl
sal_Int64 nViewAspect;
BOOL bIsLocked;
sal_Bool bNeedUpdate;
+
+ // #i104867#
+ sal_uInt32 mnGraphicVersion;
awt::Size aDefaultSizeForChart_In_100TH_MM;//#i103460# charts do not necessaryly have an own size within ODF files, in this case they need to use the size settings from the surrounding frame, which is made available with this member
};
@@ -262,6 +263,7 @@ void EmbeddedObjectRef::Construct_Impl()
mpImp->nViewAspect = embed::Aspects::MSOLE_CONTENT;
mpImp->bIsLocked = FALSE;
mpImp->bNeedUpdate = sal_False;
+ mpImp->mnGraphicVersion = 0;
mpImp->aDefaultSizeForChart_In_100TH_MM = awt::Size(8000,7000);
}
@@ -297,12 +299,14 @@ EmbeddedObjectRef::EmbeddedObjectRef( const EmbeddedObjectRef& rObj )
mpImp->pGraphic = 0;
mpImp->pHCGraphic = 0;
+ mpImp->mnGraphicVersion = 0;
}
EmbeddedObjectRef::~EmbeddedObjectRef()
{
delete mpImp->pGraphic;
- if ( mpImp->pHCGraphic ) DELETEZ( mpImp->pHCGraphic );
+ if ( mpImp->pHCGraphic )
+ DELETEZ( mpImp->pHCGraphic );
Clear();
}
/*
@@ -453,10 +457,15 @@ void EmbeddedObjectRef::GetReplacement( BOOL bUpdate )
DELETEZ( mpImp->pGraphic );
mpImp->aMediaType = ::rtl::OUString();
mpImp->pGraphic = new Graphic;
- if ( mpImp->pHCGraphic ) DELETEZ( mpImp->pHCGraphic );
+ if ( mpImp->pHCGraphic )
+ DELETEZ( mpImp->pHCGraphic );
+ mpImp->mnGraphicVersion++;
}
else if ( !mpImp->pGraphic )
+ {
mpImp->pGraphic = new Graphic;
+ mpImp->mnGraphicVersion++;
+ }
else
{
DBG_ERROR("No update, but replacement exists already!");
@@ -469,6 +478,7 @@ void EmbeddedObjectRef::GetReplacement( BOOL bUpdate )
GraphicFilter* pGF = GraphicFilter::GetGraphicFilter();
if( mpImp->pGraphic )
pGF->ImportGraphic( *mpImp->pGraphic, String(), *pGraphicStream, GRFILTER_FORMAT_DONTKNOW );
+ mpImp->mnGraphicVersion++;
delete pGraphicStream;
}
}
@@ -598,6 +608,7 @@ Graphic* EmbeddedObjectRef::GetHCGraphic() const
mpImp->pHCGraphic = pGraphic;
else
delete pGraphic;
+ mpImp->mnGraphicVersion++;
}
delete pStream;
@@ -615,7 +626,9 @@ void EmbeddedObjectRef::SetGraphicStream( const uno::Reference< io::XInputStream
delete mpImp->pGraphic;
mpImp->pGraphic = new Graphic();
mpImp->aMediaType = rMediaType;
- if ( mpImp->pHCGraphic ) DELETEZ( mpImp->pHCGraphic );
+ if ( mpImp->pHCGraphic )
+ DELETEZ( mpImp->pHCGraphic );
+ mpImp->mnGraphicVersion++;
SvStream* pGraphicStream = ::utl::UcbStreamHelper::CreateStream( xInGrStream );
@@ -623,6 +636,7 @@ void EmbeddedObjectRef::SetGraphicStream( const uno::Reference< io::XInputStream
{
GraphicFilter* pGF = GraphicFilter::GetGraphicFilter();
pGF->ImportGraphic( *mpImp->pGraphic, String(), *pGraphicStream, GRFILTER_FORMAT_DONTKNOW );
+ mpImp->mnGraphicVersion++;
if ( mpImp->pContainer )
{
@@ -645,7 +659,9 @@ void EmbeddedObjectRef::SetGraphic( const Graphic& rGraphic, const ::rtl::OUStri
delete mpImp->pGraphic;
mpImp->pGraphic = new Graphic( rGraphic );
mpImp->aMediaType = rMediaType;
- if ( mpImp->pHCGraphic ) DELETEZ( mpImp->pHCGraphic );
+ if ( mpImp->pHCGraphic )
+ DELETEZ( mpImp->pHCGraphic );
+ mpImp->mnGraphicVersion++;
if ( mpImp->pContainer )
SetGraphicToContainer( rGraphic, *mpImp->pContainer, mpImp->aPersistName, rMediaType );
@@ -880,7 +896,9 @@ void EmbeddedObjectRef::UpdateReplacementOnDemand()
{
DELETEZ( mpImp->pGraphic );
mpImp->bNeedUpdate = sal_True;
- if ( mpImp->pHCGraphic ) DELETEZ( mpImp->pHCGraphic );
+ if ( mpImp->pHCGraphic )
+ DELETEZ( mpImp->pHCGraphic );
+ mpImp->mnGraphicVersion++;
if( mpImp->pContainer )
{
@@ -914,6 +932,12 @@ BOOL EmbeddedObjectRef::IsChart() const
return sal_False;
}
+// #i104867#
+sal_uInt32 EmbeddedObjectRef::getGraphicVersion() const
+{
+ return mpImp->mnGraphicVersion;
+}
+
void EmbeddedObjectRef::SetDefaultSizeForChart( const Size& rSizeIn_100TH_MM )
{
//#i103460# charts do not necessaryly have an own size within ODF files,
@@ -928,4 +952,5 @@ void EmbeddedObjectRef::SetDefaultSizeForChart( const Size& rSizeIn_100TH_MM )
xSizeTransmitter->setDefaultSize( mpImp->aDefaultSizeForChart_In_100TH_MM );
}
-}
+} // namespace svt
+