Re: [Libreoffice-commits] core.git: canvas/source dbaccess/source oox/source reportdesign/source slideshow/source

2014-09-02 Thread Joerg Sonnenberger
On Fri, Aug 29, 2014 at 11:58:48AM +0200, Thorsten Behrens wrote:
> Jörg Sonnenberger wrote:
> > +SurfaceSharedPtr surface(mpOwningSpriteCanvas->getBufferSurface());
> >  ::std::for_each( aUncoveredAreas.begin(),
> >   aUncoveredAreas.end(),
> >   ::boost::bind( &repaintBackground,
> >  boost::cref(pCompositingCairo),
> > -
> > boost::cref(mpOwningSpriteCanvas->getBufferSurface()),
> > +boost::cref(surface),
> >  _1 ) );
> >
> If you need a local variable anyway - why not insted getting rid of
> the boost::cref and pass the parameter by value in the first place?
> 
> e.g. , mpOwningSpriteCanvas->getBufferSurface(), _1 ... ?

Haven't tried, was looking for the minimal change to the existing
structure. One thing to keep in mind is that getBufferSurface() creates
a temporary variable. It doesn't return a reference itself.

Joerg
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-commits] core.git: canvas/source dbaccess/source oox/source reportdesign/source slideshow/source

2014-08-30 Thread Thorsten Behrens
Joerg Sonnenberger wrote:
> Haven't tried, was looking for the minimal change to the existing
> structure.
>
The proposed change would be even more minimal. ;)

> One thing to keep in mind is that getBufferSurface() creates a
> temporary variable. It doesn't return a reference itself.
> 
Sure, it's a temporary. And it shouldn't make a bit of a difference
performance/memory-wise, if you create the local copy manually, or
implicitely in the boost::bind.

Can you quickly try if the proposed change compiles on your side?
Don't want to involuntarily break your build again.

Cheers,

-- Thorsten


signature.asc
Description: Digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-commits] core.git: canvas/source dbaccess/source oox/source reportdesign/source slideshow/source

2014-08-29 Thread Thorsten Behrens
Jörg Sonnenberger wrote:
> +SurfaceSharedPtr surface(mpOwningSpriteCanvas->getBufferSurface());
>  ::std::for_each( aUncoveredAreas.begin(),
>   aUncoveredAreas.end(),
>   ::boost::bind( &repaintBackground,
>  boost::cref(pCompositingCairo),
> -
> boost::cref(mpOwningSpriteCanvas->getBufferSurface()),
> +boost::cref(surface),
>  _1 ) );
>
If you need a local variable anyway - why not insted getting rid of
the boost::cref and pass the parameter by value in the first place?

e.g. , mpOwningSpriteCanvas->getBufferSurface(), _1 ... ?

Cheers,

-- Thorsten


signature.asc
Description: Digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: canvas/source dbaccess/source oox/source reportdesign/source slideshow/source

2014-08-29 Thread Jörg Sonnenberger
 canvas/source/cairo/cairo_spritecanvashelper.cxx|3 ++-
 canvas/source/vcl/spritecanvashelper.cxx|4 ++--
 dbaccess/source/ui/tabledesign/TableController.cxx  |3 ++-
 oox/source/drawingml/table/tablecell.cxx|4 ++--
 reportdesign/source/core/api/ReportDefinition.cxx   |3 ++-
 slideshow/source/engine/activities/activitybase.hxx |2 +-
 slideshow/source/engine/rehearsetimingsactivity.cxx |3 ++-
 slideshow/source/engine/shapes/appletshape.cxx  |6 --
 slideshow/source/engine/shapes/drawshape.cxx|4 ++--
 slideshow/source/engine/shapes/mediashape.cxx   |3 ++-
 slideshow/source/engine/unoviewcontainer.cxx|3 ++-
 11 files changed, 23 insertions(+), 15 deletions(-)

New commits:
commit 45dfbdca6a9afba1a6aef21623ec025ded635a4d
Author: Jörg Sonnenberger 
Date:   Thu Aug 28 12:18:43 2014 +0200

Fix build with boost-1.56.0.

Change-Id: I61686bf61ff1e0561c385492c563e4495456ca47
Signed-off-by: Thomas Klausner 

diff --git a/canvas/source/cairo/cairo_spritecanvashelper.cxx 
b/canvas/source/cairo/cairo_spritecanvashelper.cxx
index eb33f8f..741dbb3 100644
--- a/canvas/source/cairo/cairo_spritecanvashelper.cxx
+++ b/canvas/source/cairo/cairo_spritecanvashelper.cxx
@@ -402,11 +402,12 @@ namespace cairocanvas
 ::basegfx::computeSetDifference( aUncoveredAreas,
  rUpdateArea.maTotalBounds,
  ::basegfx::B2DRange( rDestRect ) );
+SurfaceSharedPtr surface(mpOwningSpriteCanvas->getBufferSurface());
 ::std::for_each( aUncoveredAreas.begin(),
  aUncoveredAreas.end(),
  ::boost::bind( &repaintBackground,
 boost::cref(pCompositingCairo),
-
boost::cref(mpOwningSpriteCanvas->getBufferSurface()),
+boost::cref(surface),
 _1 ) );
 
 cairo_rectangle( pWindowCairo.get(), 0, 0, rSize.getX(), rSize.getY() 
);
diff --git a/canvas/source/vcl/spritecanvashelper.cxx 
b/canvas/source/vcl/spritecanvashelper.cxx
index 13ae629..e2ded77 100644
--- a/canvas/source/vcl/spritecanvashelper.cxx
+++ b/canvas/source/vcl/spritecanvashelper.cxx
@@ -573,12 +573,12 @@ namespace vclcanvas
 
 // repaint all affected sprites on top of background into
 // VDev.
+::basegfx::B2DPoint outPos( 
::vcl::unotools::b2DPointFromPoint(aOutputPosition) );
 ::std::for_each( rSortedUpdateSprites.begin(),
  rSortedUpdateSprites.end(),
  ::boost::bind( &spriteRedrawStub2,
 ::boost::ref( maVDev.get() ),
-::boost::cref(
-
::vcl::unotools::b2DPointFromPoint(aOutputPosition)),
+::boost::cref( outPos ),
 _1 ) );
 
 // flush to screen
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx 
b/dbaccess/source/ui/tabledesign/TableController.cxx
index d51d1bc..14f24e6 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -1396,7 +1396,8 @@ void OTableController::assignTable()
 setEditable( xMeta.is() && !xMeta->isReadOnly() && 
(isAlterAllowed() || isDropAllowed() || isAddAllowed()) );
 if(!isEditable())
 {
-
::std::for_each(m_vRowList.begin(),m_vRowList.end(),boost::bind( 
&OTableRow::SetReadOnly, _1, boost::cref( sal_True )));
+sal_Bool t( sal_True );
+
::std::for_each(m_vRowList.begin(),m_vRowList.end(),boost::bind( 
&OTableRow::SetReadOnly, _1, boost::cref( t )));
 }
 m_bNew = false;
 // be notified when the table is in disposing
diff --git a/oox/source/drawingml/table/tablecell.cxx 
b/oox/source/drawingml/table/tablecell.cxx
index e91f5b8..033434a 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -117,9 +117,9 @@ void applyTableStylePart( oox::drawingml::FillProperties& 
rFillProperties,
 if (rTableStylePart.getTextColor().isUsed())
 aTextCharProps.maCharColor = rTableStylePart.getTextColor();
 if( rTableStylePart.getTextBoldStyle().is_initialized() )
-aTextCharProps.moBold = rTableStylePart.getTextBoldStyle();
+aTextCharProps.moBold = *rTableStylePart.getTextBoldStyle();
 if( rTableStylePart.getTextItalicStyle().is_initialized() )
-aTextCharProps.moItalic = rTableStylePart.getTextItalicStyle();
+aTextCharProps.moItalic = *rTableStylePart.getTextItalicStyle();
 }
 
 void applyTableCellProperties( const Refe