[Libreoffice-commits] core.git: include/sal toolkit/source

2019-05-08 Thread Jens Carl (via logerrit)
 include/sal/log-areas.dox   |1 
 toolkit/source/helper/formpdfexport.cxx |   70 +---
 2 files changed, 49 insertions(+), 22 deletions(-)

New commits:
commit bfdb5a2d96483907cd4b757398b3df159a9e7af2
Author: Jens Carl 
AuthorDate: Tue May 7 08:56:00 2019 -0700
Commit: Stephan Bergmann 
CommitDate: Wed May 8 08:23:16 2019 +0200

tdf#43157 Clean up OSL_VERIFY (replace with SAL_WARN)

Replace OSL_VERIFY with if-statement and SAL_WARN.

Change-Id: I356a875e1364f3d16f562f3cfa0b41e0939e43d5
Reviewed-on: https://gerrit.libreoffice.org/71923
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index d72710a1f79e..1f007b0c2944 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -405,6 +405,7 @@ certain functionality.
 
 @li @c toolkit
 @li @c toolkit.controls
+@li @c toolkit.helper
 
 @section tools
 
diff --git a/toolkit/source/helper/formpdfexport.cxx 
b/toolkit/source/helper/formpdfexport.cxx
index 796de3d56a2a..24cd1e02ccf6 100644
--- a/toolkit/source/helper/formpdfexport.cxx
+++ b/toolkit/source/helper/formpdfexport.cxx
@@ -78,7 +78,9 @@ namespace toolkitform
 xPSI = _rxModel->getPropertySetInfo();
 if ( xPSI.is() && xPSI->hasPropertyByName( FM_PROP_CLASSID ) )
 {
-OSL_VERIFY( _rxModel->getPropertyValue( FM_PROP_CLASSID ) >>= 
nControlType );
+if( ! (_rxModel->getPropertyValue( FM_PROP_CLASSID ) >>= 
nControlType) ) {
+SAL_WARN("toolkit.helper", "classifyFormControl: unable to 
get property " << FM_PROP_CLASSID);
+}
 }
 
 return nControlType;
@@ -233,7 +235,7 @@ namespace toolkitform
 DBG_UNHANDLED_EXCEPTION("toolkit");
 }
 }
-SAL_WARN("toolkit","determineRadioGroupId: did not 
find the radios element's group!" );
+SAL_WARN("toolkit.helper","determineRadioGroupId: did 
not find the radios element's group!" );
 }
 }
 
@@ -268,7 +270,9 @@ namespace toolkitform
 void getStringItemVector( const Reference< XPropertySet >& _rxModel, 
::std::vector< OUString >& _rVector )
 {
 Sequence< OUString > aListEntries;
-OSL_VERIFY( _rxModel->getPropertyValue( "StringItemList" ) >>= 
aListEntries );
+if( ! (_rxModel->getPropertyValue( "StringItemList" ) >>= 
aListEntries) ) {
+SAL_WARN("toolkit.helper", "getStringItemVector: unable to get 
property StringItemList");
+}
 ::std::copy( aListEntries.begin(), aListEntries.end(),
  ::std::back_insert_iterator< ::std::vector< OUString 
> >( _rVector ) );
 }
@@ -305,8 +309,12 @@ namespace toolkitform
 
 
 // Name, Description, Text
-OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_NAME ) >>= 
Descriptor->Name );
-OSL_VERIFY( xModelProps->getPropertyValue( "HelpText" ) >>= 
Descriptor->Description );
+if( ! (xModelProps->getPropertyValue( FM_PROP_NAME ) >>= 
Descriptor->Name) ) {
+SAL_WARN("toolkit.helper", "describePDFControl: unable to get 
property " << FM_PROP_NAME);
+}
+if( ! (xModelProps->getPropertyValue( "HelpText" ) >>= 
Descriptor->Description) ) {
+SAL_INFO("toolkit.helper", "describePDFControl: unable to get 
property HelpText");
+}
 Any aText;
 static const char FM_PROP_TEXT[] = "Text";
 static const char FM_PROP_LABEL[] = "Label";
@@ -314,14 +322,18 @@ namespace toolkitform
 aText = xModelProps->getPropertyValue( FM_PROP_TEXT );
 else if ( xPSI->hasPropertyByName( FM_PROP_LABEL ) )
 aText = xModelProps->getPropertyValue( FM_PROP_LABEL );
-if ( aText.hasValue() )
-OSL_VERIFY( aText >>= Descriptor->Text );
+if ( aText.hasValue() ) {
+if( ! (aText >>= Descriptor->Text) ) {
+SAL_WARN("toolkit.helper", "describePDFControl: unable to 
assign aText to Descriptor->Text");
+}
+}
 
 
 // readonly
 static const char FM_PROP_READONLY[] = "ReadOnly";
 if ( xPSI->hasPropertyByName( FM_PROP_READONLY ) )
-OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_READONLY ) 
>>= Descriptor->ReadOnly );
+if( ! (xModelProps->getPropertyValue( FM_PROP_READONLY ) >>= 
Descriptor->ReadOnly) )
+SAL_WARN("toolkit.helper", "describePDFControl: unable to 
get property " << FM_PROP_READONLY);
 
 
 // border
@@ -330,7 +342,8 @@ namespace toolkitform
 if ( xPSI->hasPropertyByName( FM_PROP_BORDER ) )
  

[Libreoffice-commits] core.git: include/sal toolkit/source vcl/win

2018-05-03 Thread Thorsten Behrens
 include/sal/log-areas.dox |1 +
 toolkit/source/awt/vclxwindow.cxx |3 +++
 vcl/win/app/salinst.cxx   |2 ++
 vcl/win/window/salframe.cxx   |2 ++
 4 files changed, 8 insertions(+)

New commits:
commit bb2443cc18d43860faafc852a5bfc5d446a7b6b3
Author: Thorsten Behrens 
Date:   Wed Feb 1 03:29:18 2017 +0100

logging: add some strategic places around vcl messages

Change-Id: I3eb1076a0dd697ceb3b4310444542f324848b358
Reviewed-on: https://gerrit.libreoffice.org/53777
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 0f8927cc89ff..488f4d6c0232 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -462,6 +462,7 @@ certain functionality.
 @li @c vcl.filter
 @li @c vcl.fonts - font-specific code
 @li @c vcl.gdi - the GDI part of VCL, devices, bitmaps, etc.
+@li @c vcl.gdi.wndproc - Windows Procedure part of VCL
 @li @c vcl.gdi.fontmetric
 @li @c vcl.gtk - Gtk+ 2/3 plugin
 @li @c vcl.gtk3
diff --git a/toolkit/source/awt/vclxwindow.cxx 
b/toolkit/source/awt/vclxwindow.cxx
index d85def1007e7..45c7d1dcdc62 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -269,6 +269,8 @@ IMPL_LINK_NOARG(VCLXWindowImpl, OnProcessCallbacks, void*, 
void)
 {
 const Reference< uno::XInterface > xKeepAlive( mrAntiImpl );
 
+SAL_INFO("toolkit.controls", "OnProcessCallbacks grabbing solarmutex");
+
 // work on a copy of the callback array
 CallbackArray aCallbacksCopy;
 {
@@ -287,6 +289,7 @@ IMPL_LINK_NOARG(VCLXWindowImpl, OnProcessCallbacks, void*, 
void)
 }
 
 {
+SAL_INFO("toolkit.controls", "OnProcessCallbacks relinquished 
solarmutex");
 SolarMutexReleaser aReleaseSolar;
 for (   CallbackArray::const_iterator loop = aCallbacksCopy.begin();
 loop != aCallbacksCopy.end();
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index a33b7e1bd683..c0bd18f85627 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -582,6 +582,8 @@ LRESULT CALLBACK SalComWndProc( HWND, UINT nMsg, WPARAM 
wParam, LPARAM lParam, b
 WinSalInstance *pInst = GetSalData()->mpInstance;
 WinSalTimer *const pTimer = static_cast( 
ImplGetSVData()->maSchedCtx.mpSalTimer );
 
+SAL_INFO("vcl.gdi.wndproc", "SalComWndProc(nMsg=" << nMsg << ", wParam=" << 
wParam << ", lParam=" << lParam << ")");
+
 switch ( nMsg )
 {
 case SAL_MSG_THREADYIELD:
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 7dfe3c0a573d..864c0dd45f03 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -5437,6 +5437,8 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, 
WPARAM wParam, LPARAM lP
 static bool  bInWheelMsg = false;
 static bool  bInQueryEnd = false;
 
+SAL_INFO("vcl.gdi.wndproc", "SalFrameWndProc(nMsg=" << nMsg << ", wParam=" 
<< wParam << ", lParam=" << lParam << ")");
+
 // By WM_CREATE we connect the frame with the window handle
 if ( nMsg == WM_CREATE )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits