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 6B3ED97D1 for ; Wed, 11 Jul 2012 12:18:14 +0000 (UTC) Received: (qmail 62952 invoked by uid 500); 11 Jul 2012 12:18:14 -0000 Delivered-To: apmail-incubator-ooo-commits-archive@incubator.apache.org Received: (qmail 62895 invoked by uid 500); 11 Jul 2012 12:18:13 -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 62865 invoked by uid 99); 11 Jul 2012 12:18:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2012 12:18:11 +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; Wed, 11 Jul 2012 12:18:09 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id F26A6238889B; Wed, 11 Jul 2012 12:17:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1360139 - in /incubator/ooo/trunk/main/sd/source/ui/slidesorter: inc/view/SlsPageObjectPainter.hxx view/SlsPageObjectPainter.cxx Date: Wed, 11 Jul 2012 12:17:48 -0000 To: ooo-commits@incubator.apache.org From: af@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120711121748.F26A6238889B@eris.apache.org> Author: af Date: Wed Jul 11 12:17:48 2012 New Revision: 1360139 URL: http://svn.apache.org/viewvc?rev=1360139&view=rev Log: #i118813# Update slide sorter after page format is modified. Modified: incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx incubator/ooo/trunk/main/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx Modified: incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx?rev=1360139&r1=1360138&r2=1360139&view=diff ============================================================================== --- incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx (original) +++ incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx Wed Jul 11 12:17:48 2012 @@ -129,6 +129,12 @@ private: const BitmapEx& rOverlay, const OutputDevice* pReferenceDevice) const; void InvalidateBitmaps (void); + + /** Update the local pointer to the page object layouter to the + one owned by the general layouter. + Return when after the call we have a valid page object layouter. + */ + bool UpdatePageObjectLayouter (void); }; } } } // end of namespace sd::slidesorter::view Modified: incubator/ooo/trunk/main/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx?rev=1360139&r1=1360138&r2=1360139&view=diff ============================================================================== --- incubator/ooo/trunk/main/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx (original) +++ incubator/ooo/trunk/main/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx Wed Jul 11 12:17:48 2012 @@ -135,27 +135,38 @@ void PageObjectPainter::PaintPageObject OutputDevice& rDevice, const model::SharedPageDescriptor& rpDescriptor) { + if (UpdatePageObjectLayouter()) + { + // Turn off antialiasing to avoid the bitmaps from being + // shifted by fractions of a pixel and thus show blurry edges. + const sal_uInt16 nSavedAntialiasingMode (rDevice.GetAntialiasing()); + rDevice.SetAntialiasing(nSavedAntialiasingMode & ~ANTIALIASING_ENABLE_B2DDRAW); + + PaintBackground(rDevice, rpDescriptor); + PaintPreview(rDevice, rpDescriptor); + PaintPageNumber(rDevice, rpDescriptor); + PaintTransitionEffect(rDevice, rpDescriptor); + mrButtonBar.Paint(rDevice, rpDescriptor); + + rDevice.SetAntialiasing(nSavedAntialiasingMode); + } +} + + + + +bool PageObjectPainter::UpdatePageObjectLayouter (void) +{ // The page object layouter is quite volatile. It may have been replaced // since the last call. Update it now. mpPageObjectLayouter = mrLayouter.GetPageObjectLayouter(); if ( ! mpPageObjectLayouter) { OSL_ASSERT(mpPageObjectLayouter); - return; + return false; } - - // Turn off antialiasing to avoid the bitmaps from being shifted by - // fractions of a pixel and thus show blurry edges. - const sal_uInt16 nSavedAntialiasingMode (rDevice.GetAntialiasing()); - rDevice.SetAntialiasing(nSavedAntialiasingMode & ~ANTIALIASING_ENABLE_B2DDRAW); - - PaintBackground(rDevice, rpDescriptor); - PaintPreview(rDevice, rpDescriptor); - PaintPageNumber(rDevice, rpDescriptor); - PaintTransitionEffect(rDevice, rpDescriptor); - mrButtonBar.Paint(rDevice, rpDescriptor); - - rDevice.SetAntialiasing(nSavedAntialiasingMode); + else + return true; } @@ -165,7 +176,7 @@ void PageObjectPainter::NotifyResize (co { if (bForce || ! mpPageObjectLayouter) InvalidateBitmaps(); - else + else if (UpdatePageObjectLayouter()) { const Size aSize (mpPageObjectLayouter->GetSize( PageObjectLayouter::FocusIndicator,