Return-Path: X-Original-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 07D50C548 for ; Fri, 22 Jun 2012 13:31:07 +0000 (UTC) Received: (qmail 52419 invoked by uid 500); 22 Jun 2012 13:31:06 -0000 Delivered-To: apmail-incubator-ooo-commits-archive@incubator.apache.org Received: (qmail 52318 invoked by uid 500); 22 Jun 2012 13:31:06 -0000 Mailing-List: contact ooo-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-dev@incubator.apache.org Delivered-To: mailing list ooo-commits@incubator.apache.org Received: (qmail 52311 invoked by uid 99); 22 Jun 2012 13:31:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2012 13:31:06 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2012 13:31:05 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7801623888CD; Fri, 22 Jun 2012 13:30:45 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1352878 - in /incubator/ooo/trunk/main: sfx2/inc/sfx2/objsh.hxx sfx2/source/doc/objstor.cxx sw/source/core/layout/paintfrm.cxx Date: Fri, 22 Jun 2012 13:30:44 -0000 To: ooo-commits@incubator.apache.org From: jsc@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120622133045.7801623888CD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jsc Date: Fri Jun 22 13:30:43 2012 New Revision: 1352878 URL: http://svn.apache.org/viewvc?rev=1352878&view=rev Log: #120030# apply reviewed patch to optimize thumbnail creation/painting Modified: incubator/ooo/trunk/main/sfx2/inc/sfx2/objsh.hxx incubator/ooo/trunk/main/sfx2/source/doc/objstor.cxx incubator/ooo/trunk/main/sw/source/core/layout/paintfrm.cxx Modified: incubator/ooo/trunk/main/sfx2/inc/sfx2/objsh.hxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sfx2/inc/sfx2/objsh.hxx?rev=1352878&r1=1352877&r2=1352878&view=diff ============================================================================== --- incubator/ooo/trunk/main/sfx2/inc/sfx2/objsh.hxx (original) +++ incubator/ooo/trunk/main/sfx2/inc/sfx2/objsh.hxx Fri Jun 22 13:30:43 2012 @@ -203,6 +203,7 @@ private: SfxObjectCreateMode eCreateMode; // Zweck des Objekts sal_Bool bHasName :1, // sal_True := bestehendes Objekt, sal_False := es ist ein neues Objekt bIsTmp :1; // temp. Storage + sal_Bool bIsInGenerateThumbnail; //optimize thumbnail generate and store procedure to improve odt saving performance, i120030 private: //#if 0 // _SOLAR__PRIVATE @@ -439,6 +440,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; Modified: incubator/ooo/trunk/main/sfx2/source/doc/objstor.cxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sfx2/source/doc/objstor.cxx?rev=1352878&r1=1352877&r2=1352878&view=diff ============================================================================== --- incubator/ooo/trunk/main/sfx2/source/doc/objstor.cxx (original) +++ incubator/ooo/trunk/main/sfx2/source/doc/objstor.cxx Fri Jun 22 13:30:43 2012 @@ -3692,6 +3692,8 @@ sal_Bool SfxObjectShell::GenerateAndStor const uno::Reference< embed::XStorage >& xStor ) { 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; @@ -3716,6 +3718,8 @@ sal_Bool SfxObjectShell::GenerateAndStor catch( uno::Exception& ) { } + + bIsInGenerateThumbnail = sal_False;//optimize thumbnail generate and store procedure to improve odt saving performance, i120030 return bResult; } Modified: incubator/ooo/trunk/main/sw/source/core/layout/paintfrm.cxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/core/layout/paintfrm.cxx?rev=1352878&r1=1352877&r2=1352878&view=diff ============================================================================== --- incubator/ooo/trunk/main/sw/source/core/layout/paintfrm.cxx (original) +++ incubator/ooo/trunk/main/sw/source/core/layout/paintfrm.cxx Fri Jun 22 13:30:43 2012 @@ -3522,6 +3522,20 @@ void MA_FASTCALL lcl_PaintLowerBorders( void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const { + //begin:optimize thumbnail generate 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; + } + } + //end:i120030 + //wegen der Ueberlappung von Rahmen und Zeichenobjekten muessen die //Flys ihre Umrandung (und die der Innenliegenden) direkt ausgeben. //z.B. #33066#