Kaydet (Commit) 61dfc6fa authored tarafından Jürgen Schmidt's avatar Jürgen Schmidt Kaydeden (comit) Caolán McNamara

Resolves: #i120030# optimize thumbnail creation/painting

(cherry picked from commit 255beb8f)

Conflicts:
	sfx2/inc/sfx2/objsh.hxx
	sw/source/core/layout/paintfrm.cxx

Change-Id: I23157f7a6983ba81b1c8ddcc409a4989915be2ed
üst f0545c44
......@@ -198,6 +198,7 @@ private:
sal_Bool bHasName :1, // sal_True := existing object,
// sal_False := new object
bIsTmp :1; // temporary Storage
sal_Bool bIsInGenerateThumbnail; //optimize thumbnail generate and store procedure to improve odt saving performance, i120030
private:
SAL_DLLPRIVATE void UpdateTime_Impl(const ::com::sun::star::uno::Reference<
......@@ -444,6 +445,8 @@ public:
sal_Bool bIsTemplate,
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xStream );
sal_Bool IsInGenerateAndStoreThumbnail() const {return bIsInGenerateThumbnail;}//optimize thumbnail generate and store procedure to improve odt saving performance, i120030
// Transfer IFace
void AbortImport();
sal_Bool IsAbortingImport() const;
......
......@@ -3523,6 +3523,8 @@ sal_Bool SfxObjectShell::GenerateAndStoreThumbnail( sal_Bool bEncrypted,
{
RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mv76033) SfxObjectShell::GenerateAndStoreThumbnail" );
bIsInGenerateThumbnail = sal_True;//optimize thumbnail generate and store procedure to improve odt saving performance, i120030
sal_Bool bResult = sal_False;
try {
......@@ -3547,6 +3549,8 @@ sal_Bool SfxObjectShell::GenerateAndStoreThumbnail( sal_Bool bEncrypted,
{
}
bIsInGenerateThumbnail = sal_False;//optimize thumbnail generate and store procedure to improve odt saving performance, i120030
return bResult;
}
......
......@@ -3880,6 +3880,19 @@ private:
void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
//optimize thumbnail generation and store procedure to improve odt saving performance, #i120030#
ViewShell *pShell = getRootFrm()->GetCurrShell();
if (pShell && pShell->GetDoc() && pShell->GetDoc()->GetDocShell())
{
sal_Bool bInGenerateThumbnail = pShell->GetDoc()->GetDocShell()->IsInGenerateAndStoreThumbnail();
if (bInGenerateThumbnail)
{
SwRect aVisRect = pShell->VisArea();
if (!aVisRect.IsOver(Frm()))
return;
}
}
//because of the overlapping of frames and drawing objects the flys have to
//paint their borders (and those of the internal ones) directly.
//e.g. #33066#
......
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