[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - include/sfx2 sfx2/source

2016-03-01 Thread Giuseppe Castagno
 include/sfx2/dinfdlg.hxx   |3 +++
 sfx2/source/dialog/dinfdlg.cxx |   11 +++
 2 files changed, 14 insertions(+)

New commits:
commit 75433880cbb622808c30a91b064a6604fcd0c4a3
Author: Giuseppe Castagno 
Date:   Thu Feb 25 17:15:38 2016 +0100

tdf#98188: Crash when closing File->Properties->CMIS Properties tab

Change-Id: I22e1d6cc1c50b9ae613dab7c253ba21451aac584
Reviewed-on: https://gerrit.libreoffice.org/22704
Tested-by: Jenkins 
Reviewed-by: David Tardon 
(cherry picked from commit cadc130171a9bd4f1e6930fed09ad2897e9111b5)
Reviewed-on: https://gerrit.libreoffice.org/22785
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index a8b7d04..ec846d6 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -649,6 +649,9 @@ protected:
 
 public:
 SfxCmisPropertiesPage( vcl::Window* pParent, const SfxItemSet& );
+virtual ~SfxCmisPropertiesPage();
+virtual void dispose() override;
+
 static VclPtr Create( vcl::Window* pParent, const SfxItemSet* 
);
 };
 
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 6de3b56..f733e59 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2672,6 +2672,17 @@ SfxCmisPropertiesPage::SfxCmisPropertiesPage( 
vcl::Window* pParent, const SfxIte
 {
 }
 
+SfxCmisPropertiesPage::~SfxCmisPropertiesPage()
+{
+disposeOnce();
+}
+
+void SfxCmisPropertiesPage::dispose()
+{
+m_pPropertiesCtrl.ClearAllLines();
+SfxTabPage::dispose();
+}
+
 bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet* rSet )
 {
 const SfxPoolItem* pItem = NULL;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - include/sfx2 sfx2/source

2015-07-08 Thread Caolán McNamara
 include/sfx2/childwin.hxx |2 ++
 sfx2/source/appl/childwin.cxx |   17 +++--
 2 files changed, 13 insertions(+), 6 deletions(-)

New commits:
commit a26723f028a9795104e12b5f98cddb53471b44d2
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Jul 7 13:47:14 2015 +0100

Related: tdf#92392 clear workwins that point to pWindow

before trying to destroy pWindow

Change-Id: I7257096e8da2a5d6753ad2091287d63ea9ae244b
(cherry picked from commit 3c6eec0d99a2bb84bd6719ad498d5de54dc959fe)
Reviewed-on: https://gerrit.libreoffice.org/16832
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk
Tested-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index eb43f8e..7214005 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -163,6 +163,8 @@ private:
 GetContext() const
 { return pContext; }
 
+SAL_DLLPRIVATE void ClearWorkwin();
+
 protected:
 SfxChildWindow(vcl::Window *pParentWindow, sal_uInt16 
nId);
 
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 0b41d43..35e53d6 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -177,12 +177,7 @@ void SfxChildWindow::Destroy()
 {
 if ( GetFrame().is() )
 {
-if (pImp-pWorkWin)
-{
-if (pImp-pWorkWin-GetActiveChild_Impl() == pWindow)
-pImp-pWorkWin-SetActiveChild_Impl(NULL);
-pImp-pWorkWin = NULL;
-}
+ClearWorkwin();
 try
 {
 ::com::sun::star::uno::Reference  
::com::sun::star::util::XCloseable  xClose( GetFrame(), 
::com::sun::star::uno::UNO_QUERY );
@@ -199,11 +194,21 @@ void SfxChildWindow::Destroy()
 delete this;
 }
 
+void SfxChildWindow::ClearWorkwin()
+{
+if (pImp-pWorkWin)
+{
+if (pImp-pWorkWin-GetActiveChild_Impl() == pWindow)
+pImp-pWorkWin-SetActiveChild_Impl(NULL);
+pImp-pWorkWin = NULL;
+}
+}
 
 SfxChildWindow::~SfxChildWindow()
 {
 delete pContext;
 pContext = NULL;
+ClearWorkwin();
 pWindow.disposeAndClear();
 delete pImp;
 pImp = NULL;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - include/sfx2 sfx2/source

2015-07-03 Thread Jan Holesovsky
 include/sfx2/thumbnailview.hxx|9 +
 include/sfx2/thumbnailviewitem.hxx|1 +
 sfx2/source/control/recentdocsview.cxx|1 +
 sfx2/source/control/templateabstractview.cxx  |2 +-
 sfx2/source/control/templatecontaineritem.cxx |   12 
 sfx2/source/control/templatedefaultview.cxx   |   21 +
 sfx2/source/control/templateviewitem.cxx  |8 ++--
 sfx2/source/control/thumbnailview.cxx |6 ++
 sfx2/source/control/thumbnailviewitem.cxx |6 +-
 9 files changed, 42 insertions(+), 24 deletions(-)

New commits:
commit 56c1103d6a83b46d5cacdc9d0e249d2959256f76
Author: Jan Holesovsky ke...@collabora.com
Date:   Tue Jun 30 17:53:49 2015 +0200

tdf#90452: Templates should adhere to the recent docs colors too.

Change-Id: I5df89581796eca4e48e0a305d4319e4674f8dd87
Reviewed-on: https://gerrit.libreoffice.org/16625
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index 9000d32..bf0ea16 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -324,10 +324,11 @@ protected:
 bool mbIsTransientChildrenDisabled : 1;
 bool mbHasVisibleItems : 1;
 bool mbShowTooltips : 1;
-Color maFillColor;
-Color maTextColor;
-Color maHighlightColor;
-Color maHighlightTextColor;
+Color maFillColor;  /// Background color of the thumbnail 
view widget.
+Color maTextColor;  /// Text color.
+Color maHighlightColor; /// Color of the highlight (background) 
of the hovered / selected item.
+Color maHighlightTextColor; /// Color of the text for the higlighted 
item.
+double mfHighlightTransparence; /// Transparence of the highlight.
 
 Link maItemStateHdl;
 ThumbnailItemAttributes* mpItemAttrs;
diff --git a/include/sfx2/thumbnailviewitem.hxx 
b/include/sfx2/thumbnailviewitem.hxx
index ab2194b..8929b8e 100644
--- a/include/sfx2/thumbnailviewitem.hxx
+++ b/include/sfx2/thumbnailviewitem.hxx
@@ -60,6 +60,7 @@ struct ThumbnailItemAttributes
 basegfx::BColor aTextColor;
 basegfx::BColor aHighlightColor;
 basegfx::BColor aHighlightTextColor;
+double fHighlightTransparence;
 basegfx::B2DVector aFontSize;
 drawinglayer::attribute::FontAttribute aFontAttr;
 };
diff --git a/sfx2/source/control/recentdocsview.cxx 
b/sfx2/source/control/recentdocsview.cxx
index 471645e..69952e1 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -74,6 +74,7 @@ RecentDocsView::RecentDocsView( vcl::Window* pParent )
 maTextColor = 
Color(officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsTextColor::get());
 maHighlightColor = 
Color(officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsHighlightColor::get());
 maHighlightTextColor = 
Color(officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsHighlightTextColor::get());
+mfHighlightTransparence = 0.25;
 }
 
 VCL_BUILDER_FACTORY(RecentDocsView)
diff --git a/sfx2/source/control/templateabstractview.cxx 
b/sfx2/source/control/templateabstractview.cxx
index dbd2379..11b985d 100644
--- a/sfx2/source/control/templateabstractview.cxx
+++ b/sfx2/source/control/templateabstractview.cxx
@@ -312,7 +312,7 @@ void TemplateAbstractView::Paint(vcl::RenderContext 
rRenderContext, const Recta
 drawinglayer::primitive2d::Primitive2DSequence aSeq(1);
 aSeq[0] = drawinglayer::primitive2d::Primitive2DReference(
 new 
PolyPolygonColorPrimitive2D(B2DPolyPolygon(Polygon(aRect).getB2DPolygon()),
-BColor(1.0, 1.0, 1.0)));
+maFillColor.getBColor()));
 
 const drawinglayer::geometry::ViewInformation2D aNewViewInfos;
 std::unique_ptrdrawinglayer::processor2d::BaseProcessor2D mpProcessor(
diff --git a/sfx2/source/control/templatecontaineritem.cxx 
b/sfx2/source/control/templatecontaineritem.cxx
index 16e05d1..b4f2f63 100644
--- a/sfx2/source/control/templatecontaineritem.cxx
+++ b/sfx2/source/control/templatecontaineritem.cxx
@@ -22,7 +22,6 @@
 #include sfx2/templateviewitem.hxx
 #include vcl/button.hxx
 #include vcl/graph.hxx
-#include svtools/optionsdrawinglayer.hxx
 
 using namespace basegfx;
 using namespace basegfx::tools;
@@ -75,10 +74,7 @@ void TemplateContainerItem::Paint 
(drawinglayer::processor2d::BaseProcessor2D *p
 aFillColor = pAttrs-aHighlightColor;
 
 if (mbHover)
-{
-const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer;
-fTransparence = 
aSvtOptionsDrawinglayer.GetTransparentSelectionPercent() * 0.01;
-}
+fTransparence = pAttrs-fHighlightTransparence;
 
 aSeq[nCount++] = drawinglayer::primitive2d::Primitive2DReference( new 
PolyPolygonSelectionPrimitive2D(


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - include/sfx2 sfx2/source

2015-06-18 Thread László Németh
 include/sfx2/thumbnailview.hxx   |6 --
 sfx2/source/control/templateabstractview.cxx |5 +
 sfx2/source/control/thumbnailview.cxx|   23 ---
 3 files changed, 13 insertions(+), 21 deletions(-)

New commits:
commit e306e206bb9a9754e2b04569dc41badd8e46471a
Author: László Németh laszlo.nem...@collabora.com
Date:   Thu Jun 18 00:44:45 2015 +0200

fix start center rendering

Change-Id: Ib32b299806851fd2df1fbe8a824c1fe49a4efd99
Reviewed-on: https://gerrit.libreoffice.org/16350
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Jan Holesovsky ke...@collabora.com

diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index 04c251c..b7375dd 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -261,10 +261,6 @@ protected:
 
 virtual void Paint(vcl::RenderContext rRenderContext, const Rectangle 
rRect) SAL_OVERRIDE;
 
-virtual void PrePaint(vcl::RenderContext rRenderContext) SAL_OVERRIDE;
-
-virtual void PostPaint(vcl::RenderContext rRenderContext) SAL_OVERRIDE;
-
 virtual void GetFocus() SAL_OVERRIDE;
 
 virtual void LoseFocus() SAL_OVERRIDE;
@@ -339,8 +335,6 @@ protected:
 Link maItemStateHdl;
 ThumbnailItemAttributes* mpItemAttrs;
 
-std::unique_ptrdrawinglayer::processor2d::BaseProcessor2D mpProcessor;
-
 boost::functionbool (const ThumbnailViewItem*) maFilterFunc;
 };
 
diff --git a/sfx2/source/control/templateabstractview.cxx 
b/sfx2/source/control/templateabstractview.cxx
index fdf246a..dbd2379 100644
--- a/sfx2/source/control/templateabstractview.cxx
+++ b/sfx2/source/control/templateabstractview.cxx
@@ -20,6 +20,7 @@
 #include basegfx/polygon/b2dpolygon.hxx
 #include drawinglayer/primitive2d/polypolygonprimitive2d.hxx
 #include drawinglayer/processor2d/baseprocessor2d.hxx
+#include drawinglayer/processor2d/processorfromoutputdevice.hxx
 
 #include com/sun/star/embed/ElementModes.hpp
 #include com/sun/star/embed/XStorage.hpp
@@ -313,6 +314,10 @@ void TemplateAbstractView::Paint(vcl::RenderContext 
rRenderContext, const Recta
 new 
PolyPolygonColorPrimitive2D(B2DPolyPolygon(Polygon(aRect).getB2DPolygon()),
 BColor(1.0, 1.0, 1.0)));
 
+const drawinglayer::geometry::ViewInformation2D aNewViewInfos;
+std::unique_ptrdrawinglayer::processor2d::BaseProcessor2D mpProcessor(
+
drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(rRenderContext,
 aNewViewInfos));
+
 mpProcessor-process(aSeq);
 }
 
diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index 4bcdf56..08675c0 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -252,7 +252,7 @@ void ThumbnailView::DrawItem(ThumbnailViewItem *pItem)
 Rectangle aRect = pItem-getDrawArea();
 
 if ((aRect.GetHeight()  0)  (aRect.GetWidth()  0))
-pItem-Paint(mpProcessor.get(), mpItemAttrs);
+Invalidate(aRect);
 }
 }
 
@@ -855,7 +855,7 @@ void ThumbnailView::Command( const CommandEvent rCEvt )
 Control::Command( rCEvt );
 }
 
-void ThumbnailView::Paint(vcl::RenderContext /*rRenderContext*/, const 
Rectangle rRect)
+void ThumbnailView::Paint(vcl::RenderContext rRenderContext, const Rectangle 
rRect)
 {
 size_t nItemCount = mItemList.size();
 
@@ -865,6 +865,11 @@ void ThumbnailView::Paint(vcl::RenderContext 
/*rRenderContext*/, const Rectangl
 B2DPolyPolygon(Polygon(rRect, 5, 5).getB2DPolygon()),
 maColor.getBColor()));
 
+// Create the processor and process the primitives
+const drawinglayer::geometry::ViewInformation2D aNewViewInfos;
+
+std::unique_ptrdrawinglayer::processor2d::BaseProcessor2D mpProcessor(
+
drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(rRenderContext,
 aNewViewInfos));
 mpProcessor-process(aSeq);
 
 // draw items
@@ -874,7 +879,7 @@ void ThumbnailView::Paint(vcl::RenderContext 
/*rRenderContext*/, const Rectangl
 
 if (pItem-isVisible())
 {
-DrawItem(pItem);
+pItem-Paint(mpProcessor.get(), mpItemAttrs);
 }
 }
 
@@ -882,18 +887,6 @@ void ThumbnailView::Paint(vcl::RenderContext 
/*rRenderContext*/, const Rectangl
 mpScrBar-Invalidate(rRect);
 }
 
-void ThumbnailView::PrePaint(vcl::RenderContext rRenderContext)
-{
-// Create the processor and process the primitives
-const drawinglayer::geometry::ViewInformation2D aNewViewInfos;
-
mpProcessor.reset(drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(rRenderContext,
 aNewViewInfos));
-}
-
-void ThumbnailView::PostPaint(vcl::RenderContext /*rRenderContext*/)
-{
-mpProcessor.reset();
-}
-
 void ThumbnailView::GetFocus()
 {
 // Select the first item if nothing selected
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org