summaryrefslogtreecommitdiffstats
path: root/sdext/source
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2018-03-12 18:23:31 +0900
committerTomaž Vajngerl <quikee@gmail.com>2018-03-13 08:31:20 +0100
commitd3df14dd7eaac16eb7c6317ad920509468784940 (patch)
treeda48934bc63dda587bf8ead00fee5197d5ccb40d /sdext/source
parentwinaccessibility: GraphicURL is not set anymore (diff)
downloadcore-d3df14dd7eaac16eb7c6317ad920509468784940.tar.gz
core-d3df14dd7eaac16eb7c6317ad920509468784940.zip
change minimizer extension to not use GraphicUrl and FillBitmapUrl
Change-Id: I3a0c22d0e9411e5a427efce6adee0679e2c2de68 Reviewed-on: https://gerrit.libreoffice.org/51109 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sdext/source')
-rw-r--r--sdext/source/minimizer/graphiccollector.cxx11
-rw-r--r--sdext/source/minimizer/graphiccollector.hxx3
-rw-r--r--sdext/source/minimizer/impoptimizer.cxx1
3 files changed, 6 insertions, 9 deletions
diff --git a/sdext/source/minimizer/graphiccollector.cxx b/sdext/source/minimizer/graphiccollector.cxx
index d37945eeb542..34e7964049d6 100644
--- a/sdext/source/minimizer/graphiccollector.cxx
+++ b/sdext/source/minimizer/graphiccollector.cxx
@@ -60,15 +60,12 @@ const DeviceInfo& GraphicCollector::GetDeviceInfo( const Reference< XComponentCo
void ImpAddEntity( std::vector< GraphicCollector::GraphicEntity >& rGraphicEntities, const GraphicSettings& rGraphicSettings, const GraphicCollector::GraphicUser& rUser )
{
- const OUString aGraphicURL( rUser.maGraphicURL );
-
- if ( rGraphicSettings.mbEmbedLinkedGraphics ||
- aGraphicURL.isEmpty() || aGraphicURL.match( "vnd.sun.star.GraphicObject:" ) )
+ if ( rGraphicSettings.mbEmbedLinkedGraphics )
{
std::vector< GraphicCollector::GraphicEntity >::iterator aIter( rGraphicEntities.begin() );
while( aIter != rGraphicEntities.end() )
{
- if ( aIter->maUser[ 0 ].maGraphicURL == aGraphicURL )
+ if ( aIter->maUser[ 0 ].mxGraphic == rUser.mxGraphic )
{
if ( rUser.maLogicalSize.Width > aIter->maLogicalSize.Width )
aIter->maLogicalSize.Width = rUser.maLogicalSize.Width;
@@ -98,7 +95,7 @@ void ImpAddGraphicEntity( const Reference< XComponentContext >& rxMSF, Reference
GraphicCollector::GraphicUser aUser;
aUser.mxShape = rxShape;
aUser.mbFillBitmap = false;
- xShapePropertySet->getPropertyValue( "GraphicURL" ) >>= aUser.maGraphicURL;
+ aUser.mxGraphic = xGraphic;
xShapePropertySet->getPropertyValue( "GraphicCrop" ) >>= aGraphicCropLogic;
awt::Size aLogicalSize( rxShape->getSize() );
@@ -180,7 +177,7 @@ void ImpAddFillBitmapEntity( const Reference< XComponentContext >& rxMSF, const
}
GraphicCollector::GraphicUser aUser;
aUser.mxPropertySet = rxPropertySet;
- rxPropertySet->getPropertyValue( "FillBitmapURL" ) >>= aUser.maGraphicURL;
+ aUser.mxGraphic = xGraphic;
aUser.mbFillBitmap = true;
aUser.maLogicalSize = aLogicalSize;
aUser.mxPagePropertySet = rxPagePropertySet;
diff --git a/sdext/source/minimizer/graphiccollector.hxx b/sdext/source/minimizer/graphiccollector.hxx
index ae31016574b9..f989a95ad39c 100644
--- a/sdext/source/minimizer/graphiccollector.hxx
+++ b/sdext/source/minimizer/graphiccollector.hxx
@@ -57,7 +57,8 @@ class GraphicCollector
css::uno::Reference< css::drawing::XShape > mxShape; // if mbFillBitmap is false the xShape has
css::uno::Reference< css::beans::XPropertySet > mxPropertySet; // to be used otherwise the PropertySet
css::uno::Reference< css::beans::XPropertySet > mxPagePropertySet;
- OUString maGraphicURL;
+ css::uno::Reference< css::graphic::XGraphic > mxGraphic;
+
css::text::GraphicCrop maGraphicCropLogic;
css::awt::Size maLogicalSize;
bool mbFillBitmap;
diff --git a/sdext/source/minimizer/impoptimizer.cxx b/sdext/source/minimizer/impoptimizer.cxx
index 2507a657abbb..a04cf0f93ebc 100644
--- a/sdext/source/minimizer/impoptimizer.cxx
+++ b/sdext/source/minimizer/impoptimizer.cxx
@@ -417,7 +417,6 @@ void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentCont
if ( aGraphicUserIter->mxShape.is() )
{
Reference< XPropertySet > xShapePropertySet( aGraphicUserIter->mxShape, UNO_QUERY_THROW );
- xShapePropertySet->setPropertyValue( "GraphicURL", Any( OUString() ) );
xShapePropertySet->setPropertyValue( "Graphic", Any( xNewGraphic ) );
if ( aGraphicUserIter->maGraphicCropLogic.Left || aGraphicUserIter->maGraphicCropLogic.Top