include/svx/xoutbmp.hxx | 10 -
include/vcl/bitmapex.hxx|4
svx/source/dialog/_contdlg.cxx |9 -
svx/source/xoutdev/_xoutbmp.cxx | 230 ---
vcl/source/gdi/bitmapex.cxx | 232
vcl/source/gdi/impgraph.cxx |3
6 files changed, 242 insertions(+), 246 deletions(-)
New commits:
commit f2c3ea4f54d634ab54702d6fe07ccd4d4d76bdc1
Author: Noel Grandin
AuthorDate: Thu Jul 4 15:05:41 2019 +0200
Commit: Noel Grandin
CommitDate: Fri Jul 5 08:46:46 2019 +0200
tdf#121740 improve ppt load time on windows, reduce image swapout
Reduces load time of this file by 10%.
This logic is here since
commit 8ab086b6cc054501bfbf7ef6fa509c393691e860
Date: Mon Sep 18 16:07:07 2000 +
initial import
and there does not seem to be any good reason to immediately trigger a
swapout.
Our balancing logic will perform a swapout as necessary.
Change-Id: I02592dfd3bde1a00bcca2fcbcd4d38aacc8f3de4
Reviewed-on: https://gerrit.libreoffice.org/75086
Tested-by: Jenkins
Reviewed-by: Noel Grandin
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 5a621025423f..195e40d1a45a 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1652,9 +1652,6 @@ void ImpGraphic::ImplSetLink(const
std::shared_ptr& rGfxLink)
ensureAvailable();
mpGfxLink = rGfxLink;
-
-if (mpGfxLink && mpGfxLink->IsNative())
-mpGfxLink->SwapOut();
}
GfxLink ImpGraphic::ImplGetLink()
commit 7f4fe205c4b1baf01115a9e0d74655818d03ec40
Author: Noel Grandin
AuthorDate: Thu Jul 4 14:26:41 2019 +0200
Commit: Noel Grandin
CommitDate: Fri Jul 5 08:46:36 2019 +0200
move the contour-finding code inside vcl
Change-Id: Iac52b72831868a917fc445e970edabc1c2585b55
Reviewed-on: https://gerrit.libreoffice.org/75080
Tested-by: Jenkins
Reviewed-by: Noel Grandin
diff --git a/include/svx/xoutbmp.hxx b/include/svx/xoutbmp.hxx
index 09d55e3d8d51..8635ed86a30c 100644
--- a/include/svx/xoutbmp.hxx
+++ b/include/svx/xoutbmp.hxx
@@ -33,9 +33,6 @@ enum class XOutFlags {
NONE = 0x,
MirrorHorz = 0x0001,
MirrorVert = 0x0010,
-ContourHorz = 0x0001,
-ContourVert = 0x0002,
-ContourEdgeDetect= 0x0004,
DontAddExtension = 0x0008,
DontExpandFilename = 0x0001,
UseGifIfPossible = 0x0002,
@@ -43,7 +40,7 @@ enum class XOutFlags {
UseNativeIfPossible = 0x0008,
};
namespace o3tl {
-template<> struct typed_flags : is_typed_flags {};
+template<> struct typed_flags : is_typed_flags {};
}
class GraphicFilter;
@@ -72,11 +69,6 @@ public:
static ErrCode ExportGraphic( const Graphic& rGraphic, const
INetURLObject& rURL,
GraphicFilter& rFilter, const
sal_uInt16 nFormat,
const css::uno::Sequence<
css::beans::PropertyValue >* pFilterData );
-
-static Bitmap DetectEdges( const Bitmap& rBmp, const sal_uInt8
cThreshold );
-
-static tools::Polygon GetContour( const Bitmap& rBmp, const XOutFlags
nContourFlags,
- const tools::Rectangle* pWorkRect );
};
#endif // INCLUDED_SVX_XOUTBMP_HXX
diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx
index c3d27edf9d91..71da7cb45dc8 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -318,6 +318,10 @@ public:
*/
voidReplaceTransparency( const Color& rColor );
+/** Get contours in image */
+tools::Polygon GetContour( bool bContourEdgeDetect, bool bContourVert,
+const tools::Rectangle* pWorkRect );
+
/** Change various global color characteristics
@param nLuminancePercent
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index 2832eece6ec2..cc7da3c25fd6 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -86,7 +86,8 @@ tools::PolyPolygon SvxContourDlg::CreateAutoContour( const
Graphic& rGraphic,
const tools::Rectangle*
pRect )
{
Bitmap aBmp;
-XOutFlags nContourFlags = XOutFlags::ContourHorz;
+bool bContourEdgeDetect = false;
+bool bContourVert = false;
if ( rGraphic.GetType() == GraphicType::Bitmap )
{
@@ -125,7 +126,7 @@ tools::PolyPolygon SvxContourDlg::CreateAutoContour( const
Graphic& rGraphic,
else
{
aBmp = rGraphic.GetBitmapEx().GetBitmap();
-nContourFlags |= XOutFlags::ContourEdgeDetect;
+bContourEdgeDetect = true;
}
}
else if( rGraphic.GetType() != GraphicType::NONE )
@@ -157,13 +158,13 @@ tools::PolyPolygon