[Libreoffice-commits] core.git: 6 commits - vcl/inc vcl/source vcl/unx
Chris Sherlock
chris.sherlock79 at gmail.com
Wed Sep 10 03:24:16 PDT 2014
vcl/inc/unx/gtk/gtkgdi.hxx | 1 +
vcl/source/gdi/bitmapex.cxx | 3 ++-
vcl/source/window/brdwin.cxx | 21 ---------------------
vcl/source/window/window.cxx | 3 ---
vcl/source/window/winproc.cxx | 11 ++---------
vcl/unx/gtk/app/gtkinst.cxx | 6 +++---
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 9 +++++++++
vcl/unx/gtk/window/gtksalframe.cxx | 5 ++---
8 files changed, 19 insertions(+), 40 deletions(-)
New commits:
commit 8e174eab91acec0f1578af4dac23be76dce700af
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Wed Sep 10 20:13:13 2014 +1000
vcl: BitmapEx now states which icon theme is being used for missing image
Change-Id: I83b9c86685f72569c0df88231458183b1ae511c8
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 7673f0b..b2d0dde 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -104,7 +104,8 @@ BitmapEx::BitmapEx( const ResId& rResId ) :
#ifdef DBG_UTIL
OStringBuffer aErrorStr(
"BitmapEx::BitmapEx( const ResId& rResId ): could not load image <");
- aErrorStr.append(OUStringToOString(aFileName, RTL_TEXTENCODING_ASCII_US)).append('>');
+ aErrorStr.append(OUStringToOString(aFileName, RTL_TEXTENCODING_ASCII_US)).append("> via icon theme ");
+ aErrorStr.append(OUStringToOString(aIconTheme, RTL_TEXTENCODING_ASCII_US)).append('.');
OSL_FAIL(aErrorStr.getStr());
#endif
}
commit b01bbc3516b63d2772e53fef4dc016788c779612
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Tue Sep 9 18:46:45 2014 +1000
vcl: no such thing as GtkSalInstance, remove commented code
Change-Id: I6627363aea34570b5f7d118b1d64b6a2d93c19cb
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index 042d541..1ca67f1 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -108,10 +108,10 @@ extern "C"
gdk_threads_init();
GtkInstance* pInstance = new GtkInstance( pYieldMutex );
- SAL_INFO("vcl.gtk", "creating GtkSalInstance " << pInstance);
+ SAL_INFO("vcl.gtk", "creating GtkInstance " << pInstance);
- //Create SalData, this does not leak
- /*GtkData *pSalData =*/ new GtkData( pInstance );
+ // Create SalData, this does not leak
+ new GtkData( pInstance );
return pInstance;
}
commit 99f58dc2a6d9d2976948b2fe01b1ed1ae63d685e
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Tue Sep 9 18:32:41 2014 +1000
vcl: remove dead code and useless task comments from winproc.cxx
Change-Id: I10e4a0aa23fe83fa0f2edd671b321fa4588c880f
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index c4dac53..197a173 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -101,11 +101,7 @@ static bool ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos,
pLastLevelFloat = pSVData->maWinData.mpFirstFloat->ImplFindLastLevelFloat();
nPopupFlags = pLastLevelFloat->GetPopupModeFlags();
pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL );
-// Erstmal ausgebaut als Hack fuer Bug 53378
-// if ( nPopupFlags & FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK )
-// return false;
-// else
- return true;
+ return true;
}
else if ( nHitTest == HITTEST_RECT )
{
@@ -550,7 +546,6 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, bool bMouseLeav
if ( !ImplCallPreNotify( aNLeaveEvt ) )
{
pMouseMoveWin->MouseMove( aMLeaveEvt );
- // #82968#
if( !aDelData.IsDead() )
aNLeaveEvt.GetWindow()->ImplNotifyKeyMouseCommandEventListeners( aNLeaveEvt );
}
@@ -747,7 +742,6 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, bool bMouseLeav
}
}
- // #82968#
if ( !aDelData.IsDead() )
aNEvt.GetWindow()->ImplNotifyKeyMouseCommandEventListeners( aNEvt );
}
@@ -1038,7 +1032,6 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent,
pChild->ImplGetWindowImpl()->mbKeyUp = false;
pChild->KeyUp( aKeyEvt );
}
- // #82968#
if( !aDelData.IsDead() )
aNotifyEvt.GetWindow()->ImplNotifyKeyMouseCommandEventListeners( aNotifyEvt );
}
@@ -1152,7 +1145,7 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent,
pChild->ImplGetWindowImpl()->mbKeyUp = false;
pChild->KeyUp( aKEvt );
}
- // #82968#
+
if( !aChildDelData.IsDead() )
aNEvt.GetWindow()->ImplNotifyKeyMouseCommandEventListeners( aNEvt );
if ( aChildDelData.IsDead() )
commit 64f186cfda29d3d92c0ebd9c4ee7992898a00134
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Tue Sep 9 18:14:46 2014 +1000
vcl: remove dead code from brdwin.cxx
Change-Id: I97d5a8dc85fe77c6bf0235425db0a7b9e42ff869
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 84794f4..a1a0165 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -736,21 +736,6 @@ bool ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track
}
else
{
- /*
- // adjusting mousepos not required, we allow the whole screen (no desktop anymore...)
- Point aFrameMousePos = pBorderWindow->ImplOutputToFrame( aMousePos );
- Size aFrameSize = pBorderWindow->ImplGetFrameWindow()->GetOutputSizePixel();
- if ( aFrameMousePos.X() < 0 )
- aFrameMousePos.X() = 0;
- if ( aFrameMousePos.Y() < 0 )
- aFrameMousePos.Y() = 0;
- if ( aFrameMousePos.X() > aFrameSize.Width()-1 )
- aFrameMousePos.X() = aFrameSize.Width()-1;
- if ( aFrameMousePos.Y() > aFrameSize.Height()-1 )
- aFrameMousePos.Y() = aFrameSize.Height()-1;
- aMousePos = pBorderWindow->ImplFrameToOutput( aFrameMousePos );
- */
-
aMousePos.X() -= pData->maMouseOff.X();
aMousePos.Y() -= pData->maMouseOff.Y();
@@ -918,12 +903,6 @@ OUString ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData* pData,
nHelpId = SV_HELPTEXT_MAXIMIZE;
rHelpRect = pData->maDockRect;
}
- /* no help string available
- else if ( nHitTest & BORDERWINDOW_HITTEST_MENU )
- {
- nHelpId = SV_HELPTEXT_MENU;
- rHelpRect = pData->maMenuRect;
- }*/
else if ( nHitTest & BORDERWINDOW_HITTEST_HIDE )
{
nHelpId = SV_HELPTEXT_MINIMIZE;
commit d5d6efe7331052634e230cbbac83eea1959f27e8
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Tue Sep 9 17:56:01 2014 +1000
vcl: remove obsolete commented out assert from window.cxx
Change-Id: Ibf478abae5aa0574279e8b45c26b96ab66bfe203
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 73940bc..00d4c8c 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -232,9 +232,6 @@ Window::~Window()
"Window::~Window(): Window is in TrackingMode" );
DBG_ASSERT( pSVData->maWinData.mpCaptureWin != this,
"Window::~Window(): Window has the mouse captured" );
- // #103442# DefModalDialogParent is now determined on-the-fly, so this pointer is unimportant now
- //DBG_ASSERT( pSVData->maWinData.mpDefDialogParent != this,
- // "Window::~Window(): Window is DefModalDialogParent" );
// due to old compatibility
if ( pSVData->maWinData.mpTrackWin == this )
commit f62aa7cafe3e5413c70c5cb2e75de2114b4fd9d0
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Tue Sep 9 16:21:22 2014 +1000
vcl: GtkSalFrame::AcquireGraphics() calls GtkSalGraphics::Init() twice
We really don't want to call on GtkSalGraphics::Init() twice, the only
reason we do this is because we pass in a new screen. To get around this,
I've created a new GtkSalGraphics constructor that takes and additional
screen parameter.
Change-Id: Ie53d609c2b8f64d77a3bfb2efe0e97027c75c5d0
diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx
index f6cec54..8bd45b0 100644
--- a/vcl/inc/unx/gtk/gtkgdi.hxx
+++ b/vcl/inc/unx/gtk/gtkgdi.hxx
@@ -121,6 +121,7 @@ class GtkSalGraphics : public X11SalGraphics
public:
GtkSalGraphics( GtkSalFrame *, GtkWidget *window );
+ GtkSalGraphics( GtkSalFrame *, GtkWidget *window, SalX11Screen nXScreen );
virtual ~GtkSalGraphics();
inline GtkWidget* GetGtkWidget() const { return m_pWindow; }
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 11aec87..de64314 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -57,6 +57,15 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
gtk_widget_get_screen( pWindow ) ) ) );
}
+GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow,
+ SalX11Screen nXScreen )
+ : X11SalGraphics(),
+ m_pWindow( pWindow ),
+ m_aClipRegion(true)
+{
+ Init( pFrame, GDK_WINDOW_XID( widget_get_window( pWindow ) ), nXScreen );
+}
+
GtkSalGraphics::~GtkSalGraphics()
{
}
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 004c5a8..f8322e3 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -1505,14 +1505,13 @@ SalGraphics* GtkSalFrame::AcquireGraphics()
m_aGraphics[i].bInUse = true;
if( ! m_aGraphics[i].pGraphics )
{
- m_aGraphics[i].pGraphics = new GtkSalGraphics( this, m_pWindow );
#if GTK_CHECK_VERSION(3,0,0)
+ m_aGraphics[i].pGraphics = new GtkSalGraphics( this, m_pWindow );
if( !m_aFrame.get() )
AllocateFrame();
m_aGraphics[i].pGraphics->setDevice( m_aFrame );
#else // common case:
- m_aGraphics[i].pGraphics->Init( this, widget_get_xid(m_pWindow),
- m_nXScreen );
+ m_aGraphics[i].pGraphics = new GtkSalGraphics( this, m_pWindow, m_nXScreen );
#endif
}
return m_aGraphics[i].pGraphics;
More information about the Libreoffice-commits
mailing list