Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


Hi!

Jörg Sonnenberger made a patch fixing the compilation of
libreoffice-4.2.5.2 against boost-1.56.0. I've applied the patches to
git head (only one patch needed slight modifications). The result is
attached.

Usually, I would just push this, but since libreoffice distributes
matching boost versions for libreoffice releases, I'll let someone who
knows how this works in detail take over.

Please integrate this.

Thanks,
 Thomas

(please cc me, not currently subscribed to the mailing list)
From 6a2ef051cfdd0b4e61bd083a7f1965a69e5bd534 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Sonnenberger?= <joerg@NetBSD.org>
Date: Thu, 28 Aug 2014 12:18:43 +0200
Subject: [PATCH] Fix build with boost-1.56.0.

Change-Id: I61686bf61ff1e0561c385492c563e4495456ca47
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
---
 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(-)

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 Reference < ::com::sun::star::table::XCell >& rxCell, const 
TableCell& rTableCell )
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx 
b/reportdesign/source/core/api/ReportDefinition.cxx
index db5eb0b..571095a 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1622,8 +1622,9 @@ void SAL_CALL OReportDefinition::switchToStorage( const uno::Reference< 
embed::X
         m_pImpl->m_pObjectContainer->SwitchPersistence(m_pImpl->m_xStorage);
     }
     // notify our container listeners
+    OWeakObject *weakObjectThis = static_cast<OWeakObject*>(this);
     m_pImpl->m_aStorageChangeListeners.forEach<document::XStorageChangeListener>(
-            
::boost::bind(&document::XStorageChangeListener::notifyStorageChange,_1,boost::cref(static_cast<OWeakObject*>(this)),boost::cref(_xStorage)));
+            
::boost::bind(&document::XStorageChangeListener::notifyStorageChange,_1,boost::cref(weakObjectThis),boost::cref(_xStorage)));
 }
 
 uno::Reference< embed::XStorage > SAL_CALL OReportDefinition::getDocumentStorage(  ) throw 
(io::IOException, uno::Exception, uno::RuntimeException, std::exception)
diff --git a/slideshow/source/engine/activities/activitybase.hxx 
b/slideshow/source/engine/activities/activitybase.hxx
index ec0d72b..52ac966 100644
--- a/slideshow/source/engine/activities/activitybase.hxx
+++ b/slideshow/source/engine/activities/activitybase.hxx
@@ -111,7 +111,7 @@ protected:
     ShapeAttributeLayerSharedPtr getShapeAttributeLayer() const
         { return mpAttributeLayer; }
 
-    bool isRepeatCountValid() const { return maRepeats; }
+    bool isRepeatCountValid() const { return bool(maRepeats); }
     double getRepeatCount() const { return *maRepeats; }
     bool isAutoReverse() const { return mbAutoReverse; }
 
diff --git a/slideshow/source/engine/rehearsetimingsactivity.cxx 
b/slideshow/source/engine/rehearsetimingsactivity.cxx
index c1513eb..3add12f 100644
--- a/slideshow/source/engine/rehearsetimingsactivity.cxx
+++ b/slideshow/source/engine/rehearsetimingsactivity.cxx
@@ -400,11 +400,12 @@ void RehearseTimingsActivity::viewsChanged()
     {
         // new sprite pos, transformation might have changed:
         maSpriteRectangle = calcSpriteRectangle( maViews.front().first );
+        ::basegfx::B2DPoint rectMin( maSpriteRectangle.getMinimum() );
 
         // reposition sprites
         for_each_sprite( boost::bind( &cppcanvas::Sprite::move,
                                       _1,
-                                      boost::cref(maSpriteRectangle.getMinimum())) );
+                                      boost::cref( rectMin )) );
 
         // sprites changed, need screen update
         mrScreenUpdater.notifyUpdate();
diff --git a/slideshow/source/engine/shapes/appletshape.cxx 
b/slideshow/source/engine/shapes/appletshape.cxx
index f5de6d8..3d784d0 100644
--- a/slideshow/source/engine/shapes/appletshape.cxx
+++ b/slideshow/source/engine/shapes/appletshape.cxx
@@ -148,12 +148,13 @@ namespace slideshow
         void AppletShape::implViewsChanged()
         {
             // resize all ViewShapes
+            ::basegfx::B2DRectangle bounds( AppletShape::getBounds() );
             ::std::for_each( maViewAppletShapes.begin(),
                              maViewAppletShapes.end(),
                              ::boost::bind(
                                  &ViewAppletShape::resize,
                                  _1,
-                                 ::boost::cref( AppletShape::getBounds())) );
+                                 ::boost::cref( bounds )) );
         }
 
 
@@ -252,11 +253,12 @@ namespace slideshow
 
         bool AppletShape::implStartIntrinsicAnimation()
         {
+            ::basegfx::B2DRectangle bounds( getBounds() );
             ::std::for_each( maViewAppletShapes.begin(),
                              maViewAppletShapes.end(),
                              ::boost::bind( &ViewAppletShape::startApplet,
                                             _1,
-                                            ::boost::cref( getBounds() )));
+                                            ::boost::cref( bounds )));
             mbIsPlaying = true;
 
             return true;
diff --git a/slideshow/source/engine/shapes/drawshape.cxx 
b/slideshow/source/engine/shapes/drawshape.cxx
index b0f12fd..a3b89b7 100644
--- a/slideshow/source/engine/shapes/drawshape.cxx
+++ b/slideshow/source/engine/shapes/drawshape.cxx
@@ -168,6 +168,7 @@ namespace slideshow
             }
 
             // redraw all view shapes, by calling their update() method
+            ViewShape::RenderArgs renderArgs( getViewRenderArgs() );
             if( ::std::count_if( maViewShapes.begin(),
                                  maViewShapes.end(),
                                  ::boost::bind<bool>(
@@ -178,8 +179,7 @@ namespace slideshow
                                                                              // the extra mem_fn. 
WTF.
                                      _1,
                                      ::boost::cref( mpCurrMtf ),
-                                     ::boost::cref(
-                                         getViewRenderArgs() ),
+                                     ::boost::cref( renderArgs ),
                                      nUpdateFlags,
                                      isVisible() ) )
                 != static_cast<ViewShapeVector::difference_type>(maViewShapes.size()) )
diff --git a/slideshow/source/engine/shapes/mediashape.cxx 
b/slideshow/source/engine/shapes/mediashape.cxx
index f50e84b..071fe60 100644
--- a/slideshow/source/engine/shapes/mediashape.cxx
+++ b/slideshow/source/engine/shapes/mediashape.cxx
@@ -125,12 +125,13 @@ namespace slideshow
         void MediaShape::implViewsChanged()
         {
             // resize all ViewShapes
+            ::basegfx::B2DRectangle bounds( getBounds() );
             ::std::for_each( maViewMediaShapes.begin(),
                              maViewMediaShapes.end(),
                              ::boost::bind(
                                  &ViewMediaShape::resize,
                                  _1,
-                                 ::boost::cref( getBounds())) );
+                                 ::boost::cref( bounds )) );
         }
 
 
diff --git a/slideshow/source/engine/unoviewcontainer.cxx 
b/slideshow/source/engine/unoviewcontainer.cxx
index a547997..0f27c8f 100644
--- a/slideshow/source/engine/unoviewcontainer.cxx
+++ b/slideshow/source/engine/unoviewcontainer.cxx
@@ -45,11 +45,12 @@ namespace slideshow
             const UnoViewVector::iterator aEnd( maViews.end() );
 
             // already added?
+            uno::Reference<presentation::XSlideShowView> xView (rView->getUnoView());
             if( ::std::find_if( maViews.begin(),
                                 aEnd,
                                 ::boost::bind(
                                     ::std::equal_to< uno::Reference< presentation::XSlideShowView 
(),
-                                    ::boost::cref( rView->getUnoView() ),
+                                    ::boost::cref( xView ),
                                     ::boost::bind(
                                         &UnoView::getUnoView,
                                         _1 ) ) ) != aEnd )
-- 
2.1.0


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.