[Libreoffice-commits] core.git: 2 commits - include/sfx2 include/svx sfx2/source svx/inc svx/source

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Fri Jan 16 03:37:16 PST 2015


 include/sfx2/recentdocsviewitem.hxx         |    2 
 include/svx/sdr/overlay/overlaytriangle.hxx |   60 +++++++++++++++++++++++++++
 sfx2/source/control/recentdocsview.cxx      |    2 
 sfx2/source/control/recentdocsviewitem.cxx  |    5 --
 svx/inc/sdr/overlay/overlaytriangle.hxx     |   62 ----------------------------
 svx/source/sdr/overlay/overlaytriangle.cxx  |   27 +++++++++++-
 svx/source/svdraw/svdhdl.cxx                |    2 
 7 files changed, 90 insertions(+), 70 deletions(-)

New commits:
commit 2d92cfd38eb89fdf527a00754eb97d7b49f08ada
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon Sep 1 15:36:35 2014 +0200

    make OverlayTriangle public, allow to change each point
    
    Change-Id: Ifdc8df1852e29173ee571102aed1c21d5611171b

diff --git a/svx/inc/sdr/overlay/overlaytriangle.hxx b/include/svx/sdr/overlay/overlaytriangle.hxx
similarity index 84%
rename from svx/inc/sdr/overlay/overlaytriangle.hxx
rename to include/svx/sdr/overlay/overlaytriangle.hxx
index c1f780f..b2ae411 100644
--- a/svx/inc/sdr/overlay/overlaytriangle.hxx
+++ b/include/svx/sdr/overlay/overlaytriangle.hxx
@@ -17,18 +17,16 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYTRIANGLE_HXX
-#define INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYTRIANGLE_HXX
+#ifndef INCLUDED_SVX_SDR_OVERLAY_OVERLAYTRIANGLE_HXX
+#define INCLUDED_SVX_SDR_OVERLAY_OVERLAYTRIANGLE_HXX
 
 #include <svx/sdr/overlay/overlayobject.hxx>
 
-
-
 namespace sdr
 {
     namespace overlay
     {
-        class OverlayTriangle : public OverlayObjectWithBasePosition
+        class SVX_DLLPUBLIC OverlayTriangle : public OverlayObjectWithBasePosition
         {
         protected:
             // second and third position in pixel
@@ -48,15 +46,15 @@ namespace sdr
 
             // change second position
             const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; }
+            void setSecondPosition(const basegfx::B2DPoint& rNew);
 
             // change third position
             const basegfx::B2DPoint& getThirdPosition() const { return maThirdPosition; }
+            void setThirdPosition(const basegfx::B2DPoint& rNew);
         };
     } // end of namespace overlay
 } // end of namespace sdr
 
-
-
-#endif // INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYTRIANGLE_HXX
+#endif // INCLUDED_SVX_SDR_OVERLAY_OVERLAYTRIANGLE_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sdr/overlay/overlaytriangle.cxx b/svx/source/sdr/overlay/overlaytriangle.cxx
index 752a73a..52a3cb7 100644
--- a/svx/source/sdr/overlay/overlaytriangle.cxx
+++ b/svx/source/sdr/overlay/overlaytriangle.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <sdr/overlay/overlaytriangle.hxx>
+#include <svx/sdr/overlay/overlaytriangle.hxx>
 #include <tools/poly.hxx>
 #include <vcl/outdev.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
@@ -64,6 +64,31 @@ namespace sdr
         OverlayTriangle::~OverlayTriangle()
         {
         }
+
+        void OverlayTriangle::setSecondPosition(const basegfx::B2DPoint& rNew)
+        {
+            if(rNew != maSecondPosition)
+            {
+                // remember new value
+                maSecondPosition = rNew;
+
+                // register change (after change)
+                objectChange();
+            }
+        }
+
+        void OverlayTriangle::setThirdPosition(const basegfx::B2DPoint& rNew)
+        {
+            if(rNew != maThirdPosition)
+            {
+                // remember new value
+                maThirdPosition = rNew;
+
+                // register change (after change)
+                objectChange();
+            }
+        }
+
     } // end of namespace overlay
 } // end of namespace sdr
 
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 69deb57..dd0ad36 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -49,7 +49,7 @@
 #include <svx/sdr/overlay/overlayanimatedbitmapex.hxx>
 #include <svx/sdr/overlay/overlaybitmapex.hxx>
 #include <sdr/overlay/overlayline.hxx>
-#include <sdr/overlay/overlaytriangle.hxx>
+#include <svx/sdr/overlay/overlaytriangle.hxx>
 #include <sdr/overlay/overlayrectangle.hxx>
 #include <svx/sdrpagewindow.hxx>
 #include <svx/sdrpaintwindow.hxx>
commit cb6b1a6c7c66801f5ba9ff7bd80cc666c8ada0cb
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Thu Jan 15 23:39:39 2015 +0900

    Provide thumbnail size via constructor for RecentDocsViewItem
    
    Change-Id: Ic206ebff28683da2b1daf23039820c2184788595

diff --git a/include/sfx2/recentdocsviewitem.hxx b/include/sfx2/recentdocsviewitem.hxx
index 7ee05ee..ee50a3c 100644
--- a/include/sfx2/recentdocsviewitem.hxx
+++ b/include/sfx2/recentdocsviewitem.hxx
@@ -16,7 +16,7 @@ class RecentDocsViewItem : public ThumbnailViewItem
 {
 public:
     RecentDocsViewItem(ThumbnailView &rView, const OUString &rURL,
-        const OUString &rTitle, const BitmapEx& rThumbnail, sal_uInt16 nId);
+        const OUString &rTitle, const BitmapEx& rThumbnail, sal_uInt16 nId, long nThumbnailSize = 256);
     virtual void setEditTitle (bool edit, bool bChangeFocus = true) SAL_OVERRIDE;
 
     /** Updates own highlight status based on the aPoint position.
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index 84bf04a..9b68a0e 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -150,7 +150,7 @@ BitmapEx RecentDocsView::getDefaultThumbnail(const OUString &rURL)
 
 void RecentDocsView::insertItem(const OUString &rURL, const OUString &rTitle, const BitmapEx &rThumbnail, sal_uInt16 nId)
 {
-    RecentDocsViewItem *pChild = new RecentDocsViewItem(*this, rURL, rTitle, rThumbnail, nId);
+    RecentDocsViewItem *pChild = new RecentDocsViewItem(*this, rURL, rTitle, rThumbnail, nId, GetThumbnailSize());
 
     AppendItem(pChild);
 }
diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx
index c8f19f4..8f68306 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -31,7 +31,7 @@ using namespace drawinglayer::primitive2d;
 using namespace drawinglayer::processor2d;
 
 RecentDocsViewItem::RecentDocsViewItem(ThumbnailView &rView, const OUString &rURL,
-    const OUString &rTitle, const BitmapEx &rThumbnail, sal_uInt16 nId)
+    const OUString &rTitle, const BitmapEx &rThumbnail, sal_uInt16 nId, long nThumbnailSize)
     : ThumbnailViewItem(rView, nId),
       maURL(rURL),
       m_bRemoveIconHighlighted(false),
@@ -46,9 +46,6 @@ RecentDocsViewItem::RecentDocsViewItem(ThumbnailView &rView, const OUString &rUR
     if( m_sHelpText.isEmpty() )
         m_sHelpText = aURLObj.GetURLNoPass();
 
-    RecentDocsView& rRecentView = dynamic_cast<RecentDocsView&>(rView);
-    long nThumbnailSize = rRecentView.GetThumbnailSize();
-
     if (aTitle.isEmpty())
         aTitle = aURLObj.GetName(INetURLObject::DECODE_WITH_CHARSET);
 


More information about the Libreoffice-commits mailing list