Kaydet (Commit) f9aabc71 authored tarafından Radu Ioan's avatar Radu Ioan Kaydeden (comit) Luboš Luňák

fdo#43157 - Clean up OSL_ASSERT, DBG_ASSERT

- replaced OSL_TRACE with SAL_INFO

Change-Id: I4d63df493e85bc095b8a11e3842b0d69c5217c96
Reviewed-on: https://gerrit.libreoffice.org/1804Reviewed-by: 's avatarLuboš Luňák <l.lunak@suse.cz>
Tested-by: 's avatarLuboš Luňák <l.lunak@suse.cz>
üst 9b11db84
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <postmac.h> #include <postmac.h>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <sal/types.h> #include <sal/types.h>
#include <osl/diagnose.h> #include "sal/log.hxx"
enum InfoType { enum InfoType {
FULLPATH, FULLPATH,
...@@ -43,71 +43,71 @@ CFStringRef CFStringCreateWithOUString(const OUString& aString); ...@@ -43,71 +43,71 @@ CFStringRef CFStringCreateWithOUString(const OUString& aString);
#define PARAMFILLER "\n " #define PARAMFILLER "\n "
inline void DBG_PRINT_ENTRY() { inline void DBG_PRINT_ENTRY() {
OSL_TRACE(">>> %s", __func__); SAL_INFO("fpicker.aqua",">>> "<< __func__);
} }
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname) { inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname) {
OSL_TRACE(">>> %s::%s", classname, methodname); SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname);
} }
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const char* value1) { inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const char* value1) {
OSL_TRACE(">>> %s::%s%s%s = %s", classname, methodname, PARAMFILLER, param1, value1); SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " = " << value1);
} }
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const OUString& value1) { inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const OUString& value1) {
OSL_TRACE(">>> %s::%s%s%s = %s", classname, methodname, PARAMFILLER, param1, OUStringToOString(value1, RTL_TEXTENCODING_UTF8).getStr()); SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " = " << OUStringToOString(value1, RTL_TEXTENCODING_UTF8).getStr());
} }
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 1
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const CFStringRef value1) inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const CFStringRef value1)
{ {
OSL_TRACE(">>> %s::%s%s%s =", classname, methodname, PARAMFILLER, param1); SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname<< PARAMFILLER << param1 <<" =");
CFShow(value1); CFShow(value1);
} }
#else #else
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const CFStringRef /* value1 */) inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const CFStringRef /* value1 */)
{ {
OSL_TRACE(">>> %s::%s%s%s =", classname, methodname, PARAMFILLER, param1); SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " =");
} }
#endif #endif
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 1
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const NSString* value1) inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const NSString* value1)
{ {
OSL_TRACE(">>> %s::%s%s%s =", classname, methodname, PARAMFILLER, param1); SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " =");
NSLog(value1); NSLog(value1);
} }
#else #else
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const NSString* /* value1 */) inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const NSString* /* value1 */)
{ {
OSL_TRACE(">>> %s::%s%s%s =", classname, methodname, PARAMFILLER, param1); SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " =");
} }
#endif #endif
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const int value1) { inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const int value1) {
OSL_TRACE(">>> %s::%s%s%s = %d", classname, methodname, PARAMFILLER, param1, value1); SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " = " << value1);
} }
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const char* value1, const char* param2, const int value2) { inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const char* value1, const char* param2, const int value2) {
OSL_TRACE(">>> %s::%s%s%s = %s%s%s = %d", classname, methodname, PARAMFILLER, param1, value1, PARAMFILLER, param2, value2); SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 <<" = " << value1 << PARAMFILLER << param2 << " = " << value2);
} }
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const char* value1, const char* param2, const char* value2) { inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const char* value1, const char* param2, const char* value2) {
OSL_TRACE(">>> %s::%s%s%s = %s%s%s = %s", classname, methodname, PARAMFILLER, param1, value1, PARAMFILLER, param2, value2); SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " = " << value1 << PARAMFILLER << param2 << " = " << value2);
} }
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const int value1, const char* param2, const int value2) { inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const int value1, const char* param2, const int value2) {
OSL_TRACE(">>> %s::%s%s%s = %d%s%s = %d", classname, methodname, PARAMFILLER, param1, value1, PARAMFILLER, param2, value2); SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " = " << value1 << PARAMFILLER << param2 << " = " << value2);
} }
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const int value1, const char* param2, const char* value2) { inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const int value1, const char* param2, const char* value2) {
OSL_TRACE(">>> %s::%s%s%s = %d%s%s = %s", classname, methodname, PARAMFILLER, param1, value1, PARAMFILLER, param2, value2); SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " = " << value1 << PARAMFILLER << param2 << " = " << value2);
} }
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const int value1, const char* param2, const CFStringRef value2) inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const int value1, const char* param2, const CFStringRef value2)
{ {
OSL_TRACE(">>> %s::%s%s%s = %d%s%s =", classname, methodname, PARAMFILLER, param1, value1, PARAMFILLER, param2, value2); SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " = " << value1 << PARAMFILLER << param2 << " =" << value2);
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 1
CFShow(value2); CFShow(value2);
#endif #endif
...@@ -115,7 +115,7 @@ inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, con ...@@ -115,7 +115,7 @@ inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, con
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const int value1, const char* param2, const NSString* value2) inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const int value1, const char* param2, const NSString* value2)
{ {
OSL_TRACE(">>> %s::%s%s%s = %d%s%s =", classname, methodname, PARAMFILLER, param1, value1, PARAMFILLER, param2, value2); SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " = " << value1 << PARAMFILLER << param2 << " =" << value2);
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 1
NSLog(value2); NSLog(value2);
#endif #endif
...@@ -123,59 +123,59 @@ inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, con ...@@ -123,59 +123,59 @@ inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, con
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const OUString& value1, const char* param2, const OUString& value2) { inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const OUString& value1, const char* param2, const OUString& value2) {
OSL_TRACE(">>> %s::%s%s%s = %s%s%s = %s", classname, methodname, PARAMFILLER, param1, OUStringToOString(value1, RTL_TEXTENCODING_UTF8).getStr(), PARAMFILLER, param2, OUStringToOString(value2, RTL_TEXTENCODING_UTF8).getStr()); SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " = " << OUStringToOString(value1, RTL_TEXTENCODING_UTF8).getStr() << PARAMFILLER << param2 << " = " << OUStringToOString(value2, RTL_TEXTENCODING_UTF8).getStr());
} }
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const OUString& value1, const char* param2, const int value2) { inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const OUString& value1, const char* param2, const int value2) {
OSL_TRACE(">>> %s::%s%s%s = %s%s%s = %d", classname, methodname, PARAMFILLER, param1, OUStringToOString(value1, RTL_TEXTENCODING_UTF8).getStr(), PARAMFILLER, param2, value2); SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " = " << OUStringToOString(value1, RTL_TEXTENCODING_UTF8).getStr() << PARAMFILLER << param2 <<" = " << value2);
} }
//exit method debugs //exit method debugs
inline void DBG_PRINT_EXIT() { inline void DBG_PRINT_EXIT() {
OSL_TRACE("<<< %s", __func__); SAL_INFO("fpicker.aqua","<<< " << __func__);
} }
inline void DBG_PRINT_EXIT(const char * classname, const char * methodname) { inline void DBG_PRINT_EXIT(const char * classname, const char * methodname) {
OSL_TRACE("<<< %s::%s", classname, methodname); SAL_INFO("fpicker.aqua","<<< " << classname << "::" << methodname);
} }
inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, const char* retVal) { inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, const char* retVal) {
OSL_TRACE("<<< %s::%s%sreturnValue = %s", classname, methodname, PARAMFILLER, retVal); SAL_INFO("fpicker.aqua","<<< " << classname << "::" << methodname << PARAMFILLER << "returnValue = " << retVal);
} }
inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, int retVal) { inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, int retVal) {
OSL_TRACE("<<< %s::%s%sreturnValue = %d", classname, methodname, PARAMFILLER, retVal); SAL_INFO("fpicker.aqua","<<< " << classname << "::" << methodname << PARAMFILLER << "returnValue = " << retVal);
} }
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 1
inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, const CFStringRef retVal) inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, const CFStringRef retVal)
{ {
OSL_TRACE("<<< %s::%s%sreturnValue = ", classname, methodname, PARAMFILLER); SAL_INFO("fpicker.aqua","<<< " << classname << "::" << methodname << PARAMFILLER << "returnValue = ");
CFShow(retVal); CFShow(retVal);
} }
#else #else
inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, const CFStringRef /* retVal */) inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, const CFStringRef /* retVal */)
{ {
OSL_TRACE("<<< %s::%s%sreturnValue = ", classname, methodname, PARAMFILLER); SAL_INFO("fpicker.aqua","<<< " << classname << "::" << methodname << PARAMFILLER << "returnValue = ");
} }
#endif #endif
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 1
inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, const NSString* retVal) inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, const NSString* retVal)
{ {
OSL_TRACE("<<< %s::%s%sreturnValue = ", classname, methodname, PARAMFILLER); SAL_INFO("fpicker.aqua","<<< " << classname << "::" << methodname << PARAMFILLER << "returnValue = ");
NSLog(retVal); NSLog(retVal);
} }
#else #else
inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, const NSString* /* retVal */ ) inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, const NSString* /* retVal */ )
{ {
OSL_TRACE("<<< %s::%s%sreturnValue = ", classname, methodname, PARAMFILLER); SAL_INFO("fpicker.aqua","<<< " << classname << "::" << methodname << PARAMFILLER << "returnValue = ");
} }
#endif #endif
inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, const OUString& retVal) { inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, const OUString& retVal) {
OSL_TRACE("<<< %s::%s%sreturnValue = %s", classname, methodname, PARAMFILLER, OUStringToOString(retVal, RTL_TEXTENCODING_UTF8).getStr()); SAL_INFO("fpicker.aqua","<<< " << classname << "::" << methodname << PARAMFILLER << "returnValue = " << OUStringToOString(retVal, RTL_TEXTENCODING_UTF8).getStr());
} }
#endif //_CFSTRINGUTILITIES_HXX_ #endif //_CFSTRINGUTILITIES_HXX_
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <osl/diagnose.h> #include "sal/log.hxx"
#include "CFStringUtilities.hxx" #include "CFStringUtilities.hxx"
rtl::OUString CFStringToOUString(const CFStringRef sOrig) { rtl::OUString CFStringToOUString(const CFStringRef sOrig) {
...@@ -29,7 +29,7 @@ rtl::OUString CFStringToOUString(const CFStringRef sOrig) { ...@@ -29,7 +29,7 @@ rtl::OUString CFStringToOUString(const CFStringRef sOrig) {
CFRetain(sOrig); CFRetain(sOrig);
CFIndex nFileNameLength = CFStringGetLength(sOrig); CFIndex nFileNameLength = CFStringGetLength(sOrig);
//OSL_TRACE("FH: string length: %d", (int)(nFileNameLength)); //SAL_INFO("fpicker.aqua","FH: string length: " << (int)(nFileNameLength));
UniChar unichars[nFileNameLength+1]; UniChar unichars[nFileNameLength+1];
//'close' the string buffer correctly //'close' the string buffer correctly
unichars[nFileNameLength] = '\0'; unichars[nFileNameLength] = '\0';
...@@ -78,13 +78,13 @@ rtl::OUString CFURLRefToOUString(CFURLRef aUrlRef, InfoType info) ...@@ -78,13 +78,13 @@ rtl::OUString CFURLRefToOUString(CFURLRef aUrlRef, InfoType info)
switch(info) { switch(info) {
case FULLPATH: case FULLPATH:
OSL_TRACE("Extracting the full path of an item"); SAL_INFO("fpicker.aqua","Extracting the full path of an item");
sURLString = CFURLGetString(aUrlRef); sURLString = CFURLGetString(aUrlRef);
CFRetain(sURLString); CFRetain(sURLString);
break; break;
case FILENAME: case FILENAME:
{ {
OSL_TRACE("Extracting the file name of an item"); SAL_INFO("fpicker.aqua","Extracting the file name of an item");
CFStringRef fullString = CFURLGetString(aUrlRef); CFStringRef fullString = CFURLGetString(aUrlRef);
CFURLRef dirRef = CFURLCreateCopyDeletingLastPathComponent(NULL,aUrlRef); CFURLRef dirRef = CFURLCreateCopyDeletingLastPathComponent(NULL,aUrlRef);
CFIndex dirLength = CFStringGetLength(CFURLGetString(dirRef)); CFIndex dirLength = CFStringGetLength(CFURLGetString(dirRef));
...@@ -96,7 +96,7 @@ rtl::OUString CFURLRefToOUString(CFURLRef aUrlRef, InfoType info) ...@@ -96,7 +96,7 @@ rtl::OUString CFURLRefToOUString(CFURLRef aUrlRef, InfoType info)
break; break;
case PATHWITHOUTLASTCOMPONENT: case PATHWITHOUTLASTCOMPONENT:
{ {
OSL_TRACE("Extracting the last but one component of an item's path"); SAL_INFO("fpicker.aqua","Extracting the last but one component of an item's path");
CFURLRef directoryRef = CFURLCreateCopyDeletingLastPathComponent(NULL,aUrlRef); CFURLRef directoryRef = CFURLCreateCopyDeletingLastPathComponent(NULL,aUrlRef);
sURLString = CFURLGetString(directoryRef); sURLString = CFURLGetString(directoryRef);
CFRetain(sURLString); CFRetain(sURLString);
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "CFStringUtilities.hxx" #include "CFStringUtilities.hxx"
#include "resourceprovider.hxx" #include "resourceprovider.hxx"
#include "NSString_OOoAdditions.hxx" #include "NSString_OOoAdditions.hxx"
#include "sal/log.hxx"
#include "ControlHelper.hxx" #include "ControlHelper.hxx"
...@@ -163,7 +164,7 @@ void ControlHelper::enableControl( const sal_Int16 nControlId, const sal_Bool bE ...@@ -163,7 +164,7 @@ void ControlHelper::enableControl( const sal_Int16 nControlId, const sal_Bool bE
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
if (nControlId == ExtendedFilePickerElementIds::CHECKBOX_PREVIEW) { if (nControlId == ExtendedFilePickerElementIds::CHECKBOX_PREVIEW) {
OSL_TRACE(" preview checkbox cannot be changed"); SAL_INFO("fpicker.aqua"," preview checkbox cannot be changed");
DBG_PRINT_EXIT(CLASS_NAME, __func__); DBG_PRINT_EXIT(CLASS_NAME, __func__);
return; return;
} }
...@@ -172,13 +173,13 @@ void ControlHelper::enableControl( const sal_Int16 nControlId, const sal_Bool bE ...@@ -172,13 +173,13 @@ void ControlHelper::enableControl( const sal_Int16 nControlId, const sal_Bool bE
if( pControl != nil ) { if( pControl != nil ) {
if( bEnable ) { if( bEnable ) {
OSL_TRACE( "enable" ); SAL_INFO("fpicker.aqua", "enable" );
} else { } else {
OSL_TRACE( "disable" ); SAL_INFO("fpicker.aqua", "disable" );
} }
[pControl setEnabled:bEnable]; [pControl setEnabled:bEnable];
} else { } else {
OSL_TRACE("enable unknown control %d", nControlId ); SAL_INFO("fpicker.aqua","enable unknown control " << nControlId );
} }
DBG_PRINT_EXIT(CLASS_NAME, __func__); DBG_PRINT_EXIT(CLASS_NAME, __func__);
...@@ -193,7 +194,7 @@ OUString ControlHelper::getLabel( sal_Int16 nControlId ) ...@@ -193,7 +194,7 @@ OUString ControlHelper::getLabel( sal_Int16 nControlId )
NSControl* pControl = getControl( nControlId ); NSControl* pControl = getControl( nControlId );
if( pControl == nil ) { if( pControl == nil ) {
OSL_TRACE("Get label for unknown control %d", nControlId); SAL_INFO("fpicker.aqua","Get label for unknown control " << nControlId);
return OUString(); return OUString();
} }
...@@ -235,7 +236,7 @@ void ControlHelper::setLabel( sal_Int16 nControlId, NSString* aLabel ) ...@@ -235,7 +236,7 @@ void ControlHelper::setLabel( sal_Int16 nControlId, NSString* aLabel )
[[pControl cell] setTitle:aLabel]; [[pControl cell] setTitle:aLabel];
} }
} else { } else {
OSL_TRACE("Control not found to set label for"); SAL_INFO("fpicker.aqua","Control not found to set label for");
} }
layoutControls(); layoutControls();
...@@ -252,25 +253,24 @@ void ControlHelper::setValue( sal_Int16 nControlId, sal_Int16 nControlAction, co ...@@ -252,25 +253,24 @@ void ControlHelper::setValue( sal_Int16 nControlId, sal_Int16 nControlAction, co
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
if (nControlId == ExtendedFilePickerElementIds::CHECKBOX_PREVIEW) { if (nControlId == ExtendedFilePickerElementIds::CHECKBOX_PREVIEW) {
OSL_TRACE(" value for preview is unchangeable"); SAL_INFO("fpicker.aqua"," value for preview is unchangeable");
} }
else { else {
NSControl* pControl = getControl( nControlId ); NSControl* pControl = getControl( nControlId );
if( pControl == nil ) { if( pControl == nil ) {
OSL_TRACE("enable unknown control %d", nControlId); SAL_INFO("fpicker.aqua","enable unknown control " << nControlId);
} else { } else {
if( [pControl class] == [NSPopUpButton class] ) { if( [pControl class] == [NSPopUpButton class] ) {
HandleSetListValue(pControl, nControlAction, rValue); HandleSetListValue(pControl, nControlAction, rValue);
} else if( [pControl class] == [NSButton class] ) { } else if( [pControl class] == [NSButton class] ) {
sal_Bool bChecked = false; sal_Bool bChecked = false;
rValue >>= bChecked; rValue >>= bChecked;
OSL_TRACE(" value is a bool: %d", bChecked); SAL_INFO("fpicker.aqua"," value is a bool: " << bChecked);
[(NSButton*)pControl setState:(bChecked ? NSOnState : NSOffState)]; [(NSButton*)pControl setState:(bChecked ? NSOnState : NSOffState)];
} else } else
{ {
OSL_TRACE("Can't set value on button / list %d %d", SAL_INFO("fpicker.aqua","Can't set value on button / list " << nControlId << " " << nControlAction);
nControlId, nControlAction);
} }
} }
} }
...@@ -288,7 +288,7 @@ uno::Any ControlHelper::getValue( sal_Int16 nControlId, sal_Int16 nControlAction ...@@ -288,7 +288,7 @@ uno::Any ControlHelper::getValue( sal_Int16 nControlId, sal_Int16 nControlAction
NSControl* pControl = getControl( nControlId ); NSControl* pControl = getControl( nControlId );
if( pControl == nil ) { if( pControl == nil ) {
OSL_TRACE("get value for unknown control %d", nControlId); SAL_INFO("fpicker.aqua","get value for unknown control " << nControlId);
aRetval <<= sal_True; aRetval <<= sal_True;
} else { } else {
if( [pControl class] == [NSPopUpButton class] ) { if( [pControl class] == [NSPopUpButton class] ) {
...@@ -297,7 +297,7 @@ uno::Any ControlHelper::getValue( sal_Int16 nControlId, sal_Int16 nControlAction ...@@ -297,7 +297,7 @@ uno::Any ControlHelper::getValue( sal_Int16 nControlId, sal_Int16 nControlAction
//NSLog(@"control: %@", [[pControl cell] title]); //NSLog(@"control: %@", [[pControl cell] title]);
sal_Bool bValue = [(NSButton*)pControl state] == NSOnState ? sal_True : sal_False; sal_Bool bValue = [(NSButton*)pControl state] == NSOnState ? sal_True : sal_False;
aRetval <<= bValue; aRetval <<= bValue;
OSL_TRACE("value is a bool (checkbox): %d", bValue); SAL_INFO("fpicker.aqua","value is a bool (checkbox): " << bValue);
} }
} }
...@@ -311,13 +311,13 @@ void ControlHelper::createUserPane() ...@@ -311,13 +311,13 @@ void ControlHelper::createUserPane()
DBG_PRINT_ENTRY(CLASS_NAME, __func__); DBG_PRINT_ENTRY(CLASS_NAME, __func__);
if (m_bUserPaneNeeded == false) { if (m_bUserPaneNeeded == false) {
OSL_TRACE("no user pane needed"); SAL_INFO("fpicker.aqua","no user pane needed");
DBG_PRINT_EXIT(CLASS_NAME, __func__); DBG_PRINT_EXIT(CLASS_NAME, __func__);
return; return;
} }
if (nil != m_pUserPane) { if (nil != m_pUserPane) {
OSL_TRACE("user pane already exists"); SAL_INFO("fpicker.aqua","user pane already exists");
DBG_PRINT_EXIT(CLASS_NAME, __func__); DBG_PRINT_EXIT(CLASS_NAME, __func__);
return; return;
} }
...@@ -340,7 +340,7 @@ void ControlHelper::createUserPane() ...@@ -340,7 +340,7 @@ void ControlHelper::createUserPane()
int nPopupLabelMaxWidth = 0; int nPopupLabelMaxWidth = 0;
for (::std::list<NSControl*>::iterator child = m_aActiveControls.begin(); child != m_aActiveControls.end(); child++) { for (::std::list<NSControl*>::iterator child = m_aActiveControls.begin(); child != m_aActiveControls.end(); child++) {
OSL_TRACE("currentHeight: %d", currentHeight); SAL_INFO("fpicker.aqua","currentHeight: " << currentHeight);
NSControl* pControl = *child; NSControl* pControl = *child;
...@@ -348,7 +348,7 @@ void ControlHelper::createUserPane() ...@@ -348,7 +348,7 @@ void ControlHelper::createUserPane()
[pControl sizeToFit]; [pControl sizeToFit];
NSRect frame = [pControl frame]; NSRect frame = [pControl frame];
OSL_TRACE("frame for control %s is {%f, %f, %f, %f}", [[pControl description] UTF8String], frame.origin.x, frame.origin.y, frame.size.width, frame.size.height); SAL_INFO("fpicker.aqua","frame for control " << [[pControl description] UTF8String] << " is {" << frame.origin.x << ", " << frame.origin.y << ", " << frame.size.width << ", " << frame.size.height << "}");
int nControlHeight = frame.size.height; int nControlHeight = frame.size.height;
int nControlWidth = frame.size.width; int nControlWidth = frame.size.width;
...@@ -374,7 +374,7 @@ void ControlHelper::createUserPane() ...@@ -374,7 +374,7 @@ void ControlHelper::createUserPane()
[m_pUserPane addSubview:textField]; [m_pUserPane addSubview:textField];
NSRect tfRect = [textField frame]; NSRect tfRect = [textField frame];
OSL_TRACE("frame for textfield %s is {%f, %f, %f, %f}", [[textField description] UTF8String], tfRect.origin.x, tfRect.origin.y, tfRect.size.width, tfRect.size.height); SAL_INFO("fpicker.aqua","frame for textfield " << [[textField description] UTF8String] << " is {" << tfRect.origin.x << ", " << tfRect.origin.y << ", " << tfRect.size.width << ", " << tfRect.size.height << "}");
int tfWidth = tfRect.size.width; int tfWidth = tfRect.size.width;
...@@ -432,20 +432,20 @@ void ControlHelper::createUserPane() ...@@ -432,20 +432,20 @@ void ControlHelper::createUserPane()
[m_pUserPane addSubview:pControl]; [m_pUserPane addSubview:pControl];
} }
OSL_TRACE("height after adding all controls: %d", currentHeight); SAL_INFO("fpicker.aqua","height after adding all controls: " << currentHeight);
if (bPopupControlPresent && bButtonControlPresent) if (bPopupControlPresent && bButtonControlPresent)
{ {
//after a popup button (array) and before a different kind of control we need some extra space instead of the standard //after a popup button (array) and before a different kind of control we need some extra space instead of the standard
currentHeight -= kAquaSpaceBetweenControls; currentHeight -= kAquaSpaceBetweenControls;
currentHeight += kAquaSpaceAfterPopupButtonsV; currentHeight += kAquaSpaceAfterPopupButtonsV;
OSL_TRACE("popup extra space added, currentHeight: %d", currentHeight); SAL_INFO("fpicker.aqua","popup extra space added, currentHeight: " << currentHeight);
} }
int nLongestPopupWidth = nPopupMaxWidth + nPopupLabelMaxWidth + kAquaSpaceBetweenControls - kAquaSpacePopupMenuFrameBoundsDiffLeft - kAquaSpaceLabelFrameBoundsDiffH; int nLongestPopupWidth = nPopupMaxWidth + nPopupLabelMaxWidth + kAquaSpaceBetweenControls - kAquaSpacePopupMenuFrameBoundsDiffLeft - kAquaSpaceLabelFrameBoundsDiffH;
currentWidth = nLongestPopupWidth > nCheckboxMaxWidth ? nLongestPopupWidth : nCheckboxMaxWidth; currentWidth = nLongestPopupWidth > nCheckboxMaxWidth ? nLongestPopupWidth : nCheckboxMaxWidth;
OSL_TRACE("longest control width: %d", currentWidth); SAL_INFO("fpicker.aqua","longest control width: " << currentWidth);
currentWidth += 2* kAquaSpaceInsideGroupH; currentWidth += 2* kAquaSpaceInsideGroupH;
...@@ -456,7 +456,7 @@ void ControlHelper::createUserPane() ...@@ -456,7 +456,7 @@ void ControlHelper::createUserPane()
currentHeight = minRect.size.height; currentHeight = minRect.size.height;
NSRect upRect = NSMakeRect(0, 0, currentWidth, currentHeight ); NSRect upRect = NSMakeRect(0, 0, currentWidth, currentHeight );
OSL_TRACE("setting user pane rect to {%f, %f, %f, %f}",upRect.origin.x, upRect.origin.y, upRect.size.width, upRect.size.height); SAL_INFO("fpicker.aqua","setting user pane rect to {" << upRect.origin.x << ", " << upRect.origin.y << ", " << upRect.size.width << ", " << upRect.size.height << "}");
[m_pUserPane setFrame:upRect]; [m_pUserPane setFrame:upRect];
...@@ -584,7 +584,7 @@ void ControlHelper::HandleSetListValue(const NSControl* pControl, const sal_Int1 ...@@ -584,7 +584,7 @@ void ControlHelper::HandleSetListValue(const NSControl* pControl, const sal_Int1
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "controlAction", nControlAction); DBG_PRINT_ENTRY(CLASS_NAME, __func__, "controlAction", nControlAction);
if ([pControl class] != [NSPopUpButton class]) { if ([pControl class] != [NSPopUpButton class]) {
OSL_TRACE("not a popup menu"); SAL_INFO("fpicker.aqua","not a popup menu");
DBG_PRINT_EXIT(CLASS_NAME, __func__); DBG_PRINT_EXIT(CLASS_NAME, __func__);
return; return;
} }
...@@ -592,7 +592,7 @@ void ControlHelper::HandleSetListValue(const NSControl* pControl, const sal_Int1 ...@@ -592,7 +592,7 @@ void ControlHelper::HandleSetListValue(const NSControl* pControl, const sal_Int1
NSPopUpButton *pButton = (NSPopUpButton*)pControl; NSPopUpButton *pButton = (NSPopUpButton*)pControl;
NSMenu *rMenu = [pButton menu]; NSMenu *rMenu = [pButton menu];
if (nil == rMenu) { if (nil == rMenu) {
OSL_TRACE("button has no menu"); SAL_INFO("fpicker.aqua","button has no menu");
DBG_PRINT_EXIT(CLASS_NAME, __func__); DBG_PRINT_EXIT(CLASS_NAME, __func__);
return; return;
} }
...@@ -601,44 +601,44 @@ void ControlHelper::HandleSetListValue(const NSControl* pControl, const sal_Int1 ...@@ -601,44 +601,44 @@ void ControlHelper::HandleSetListValue(const NSControl* pControl, const sal_Int1
{ {
case ControlActions::ADD_ITEM: case ControlActions::ADD_ITEM:
{ {
OSL_TRACE("ADD_ITEMS"); SAL_INFO("fpicker.aqua","ADD_ITEMS");
OUString sItem; OUString sItem;
rValue >>= sItem; rValue >>= sItem;
NSString* sCFItem = [NSString stringWithOUString:sItem]; NSString* sCFItem = [NSString stringWithOUString:sItem];
OSL_TRACE("Adding menu item: %s", OUStringToOString(sItem, RTL_TEXTENCODING_UTF8).getStr()); SAL_INFO("fpicker.aqua","Adding menu item: " << OUStringToOString(sItem, RTL_TEXTENCODING_UTF8).getStr());
[pButton addItemWithTitle:sCFItem]; [pButton addItemWithTitle:sCFItem];
} }
break; break;
case ControlActions::ADD_ITEMS: case ControlActions::ADD_ITEMS:
{ {
OSL_TRACE("ADD_ITEMS"); SAL_INFO("fpicker.aqua","ADD_ITEMS");
uno::Sequence< OUString > aStringList; uno::Sequence< OUString > aStringList;
rValue >>= aStringList; rValue >>= aStringList;
sal_Int32 nItemCount = aStringList.getLength(); sal_Int32 nItemCount = aStringList.getLength();
for (sal_Int32 i = 0; i < nItemCount; ++i) for (sal_Int32 i = 0; i < nItemCount; ++i)
{ {
NSString* sCFItem = [NSString stringWithOUString:aStringList[i]]; NSString* sCFItem = [NSString stringWithOUString:aStringList[i]];
OSL_TRACE("Adding menu item: %s", OUStringToOString(aStringList[i], RTL_TEXTENCODING_UTF8).getStr()); SAL_INFO("fpicker.aqua","Adding menu item: " << OUStringToOString(aStringList[i], RTL_TEXTENCODING_UTF8).getStr());
[pButton addItemWithTitle:sCFItem]; [pButton addItemWithTitle:sCFItem];
} }
} }
break; break;
case ControlActions::DELETE_ITEM: case ControlActions::DELETE_ITEM:
{ {
OSL_TRACE("DELETE_ITEM"); SAL_INFO("fpicker.aqua","DELETE_ITEM");
sal_Int32 nPos = -1; sal_Int32 nPos = -1;
rValue >>= nPos; rValue >>= nPos;
OSL_TRACE("Deleting item at position %d", (nPos)); SAL_INFO("fpicker.aqua","Deleting item at position " << (nPos));
[rMenu removeItemAtIndex:nPos]; [rMenu removeItemAtIndex:nPos];
} }
break; break;
case ControlActions::DELETE_ITEMS: case ControlActions::DELETE_ITEMS:
{ {
OSL_TRACE("DELETE_ITEMS"); SAL_INFO("fpicker.aqua","DELETE_ITEMS");
int nItems = [rMenu numberOfItems]; int nItems = [rMenu numberOfItems];
if (nItems == 0) { if (nItems == 0) {
OSL_TRACE("no menu items to delete"); SAL_INFO("fpicker.aqua","no menu items to delete");
DBG_PRINT_EXIT(CLASS_NAME, __func__); DBG_PRINT_EXIT(CLASS_NAME, __func__);
return; return;
} }
...@@ -651,12 +651,12 @@ void ControlHelper::HandleSetListValue(const NSControl* pControl, const sal_Int1 ...@@ -651,12 +651,12 @@ void ControlHelper::HandleSetListValue(const NSControl* pControl, const sal_Int1
{ {
sal_Int32 nPos = -1; sal_Int32 nPos = -1;
rValue >>= nPos; rValue >>= nPos;
OSL_TRACE("Selecting item at position %d", nPos); SAL_INFO("fpicker.aqua","Selecting item at position " << nPos);
[pButton selectItemAtIndex:nPos]; [pButton selectItemAtIndex:nPos];
} }
break; break;
default: default:
OSL_TRACE("undocumented/unimplemented ControlAction for a list"); SAL_INFO("fpicker.aqua","undocumented/unimplemented ControlAction for a list");
break; break;
} }
...@@ -673,7 +673,7 @@ uno::Any ControlHelper::HandleGetListValue(const NSControl* pControl, const sal_ ...@@ -673,7 +673,7 @@ uno::Any ControlHelper::HandleGetListValue(const NSControl* pControl, const sal_
uno::Any aAny; uno::Any aAny;
if ([pControl class] != [NSPopUpButton class]) { if ([pControl class] != [NSPopUpButton class]) {
OSL_TRACE("not a popup button"); SAL_INFO("fpicker.aqua","not a popup button");
DBG_PRINT_EXIT(CLASS_NAME, __func__); DBG_PRINT_EXIT(CLASS_NAME, __func__);
return aAny; return aAny;
} }
...@@ -681,7 +681,7 @@ uno::Any ControlHelper::HandleGetListValue(const NSControl* pControl, const sal_ ...@@ -681,7 +681,7 @@ uno::Any ControlHelper::HandleGetListValue(const NSControl* pControl, const sal_
NSPopUpButton *pButton = (NSPopUpButton*)pControl; NSPopUpButton *pButton = (NSPopUpButton*)pControl;
NSMenu *rMenu = [pButton menu]; NSMenu *rMenu = [pButton menu];
if (nil == rMenu) { if (nil == rMenu) {
OSL_TRACE("button has no menu"); SAL_INFO("fpicker.aqua","button has no menu");
DBG_PRINT_EXIT(CLASS_NAME, __func__); DBG_PRINT_EXIT(CLASS_NAME, __func__);
return aAny; return aAny;
} }
...@@ -690,7 +690,7 @@ uno::Any ControlHelper::HandleGetListValue(const NSControl* pControl, const sal_ ...@@ -690,7 +690,7 @@ uno::Any ControlHelper::HandleGetListValue(const NSControl* pControl, const sal_
{ {
case ControlActions::GET_ITEMS: case ControlActions::GET_ITEMS:
{ {
OSL_TRACE("GET_ITEMS"); SAL_INFO("fpicker.aqua","GET_ITEMS");
uno::Sequence< OUString > aItemList; uno::Sequence< OUString > aItemList;
int nItems = [rMenu numberOfItems]; int nItems = [rMenu numberOfItems];
...@@ -701,7 +701,7 @@ uno::Any ControlHelper::HandleGetListValue(const NSControl* pControl, const sal_ ...@@ -701,7 +701,7 @@ uno::Any ControlHelper::HandleGetListValue(const NSControl* pControl, const sal_
NSString* sCFItem = [pButton itemTitleAtIndex:i]; NSString* sCFItem = [pButton itemTitleAtIndex:i];
if (nil != sCFItem) { if (nil != sCFItem) {
aItemList[i] = [sCFItem OUString]; aItemList[i] = [sCFItem OUString];
OSL_TRACE("Return value[%d]: %s", (i - 1), OUStringToOString(aItemList[i - 1], RTL_TEXTENCODING_UTF8).getStr()); SAL_INFO("fpicker.aqua","Return value[" << (i - 1) << "]: " << OUStringToOString(aItemList[i - 1], RTL_TEXTENCODING_UTF8).getStr());
} }
} }
...@@ -710,25 +710,25 @@ uno::Any ControlHelper::HandleGetListValue(const NSControl* pControl, const sal_ ...@@ -710,25 +710,25 @@ uno::Any ControlHelper::HandleGetListValue(const NSControl* pControl, const sal_
break; break;
case ControlActions::GET_SELECTED_ITEM: case ControlActions::GET_SELECTED_ITEM:
{ {
OSL_TRACE("GET_SELECTED_ITEM"); SAL_INFO("fpicker.aqua","GET_SELECTED_ITEM");
NSString* sCFItem = [pButton titleOfSelectedItem]; NSString* sCFItem = [pButton titleOfSelectedItem];
if (nil != sCFItem) { if (nil != sCFItem) {
OUString sString = [sCFItem OUString]; OUString sString = [sCFItem OUString];
OSL_TRACE("Return value: %s", OUStringToOString(sString, RTL_TEXTENCODING_UTF8).getStr()); SAL_INFO("fpicker.aqua","Return value: " << OUStringToOString(sString, RTL_TEXTENCODING_UTF8).getStr());
aAny <<= sString; aAny <<= sString;
} }
} }
break; break;
case ControlActions::GET_SELECTED_ITEM_INDEX: case ControlActions::GET_SELECTED_ITEM_INDEX:
{ {
OSL_TRACE("GET_SELECTED_ITEM_INDEX"); SAL_INFO("fpicker.aqua","GET_SELECTED_ITEM_INDEX");
sal_Int32 nActive = [pButton indexOfSelectedItem]; sal_Int32 nActive = [pButton indexOfSelectedItem];
OSL_TRACE("Return value: %d", nActive); SAL_INFO("fpicker.aqua","Return value: " << nActive);
aAny <<= nActive; aAny <<= nActive;
} }
break; break;
default: default:
OSL_TRACE("undocumented/unimplemented ControlAction for a list"); SAL_INFO("fpicker.aqua","undocumented/unimplemented ControlAction for a list");
break; break;
} }
...@@ -782,7 +782,7 @@ case ExtendedFilePickerElementIds::LISTBOX_##elem##_LABEL: \ ...@@ -782,7 +782,7 @@ case ExtendedFilePickerElementIds::LISTBOX_##elem##_LABEL: \
MAP_LIST_LABEL( TEMPLATE ); MAP_LIST_LABEL( TEMPLATE );
MAP_LIST_LABEL( IMAGE_TEMPLATE ); MAP_LIST_LABEL( IMAGE_TEMPLATE );
default: default:
OSL_TRACE("Handle unknown control %d", nControlId); SAL_INFO("fpicker.aqua","Handle unknown control " << nControlId);
break; break;
} }
#undef MAP #undef MAP
...@@ -799,19 +799,19 @@ void ControlHelper::layoutControls() ...@@ -799,19 +799,19 @@ void ControlHelper::layoutControls()
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
if (nil == m_pUserPane) { if (nil == m_pUserPane) {
OSL_TRACE("no user pane to layout"); SAL_INFO("fpicker.aqua","no user pane to layout");
DBG_PRINT_EXIT(CLASS_NAME, __func__); DBG_PRINT_EXIT(CLASS_NAME, __func__);
return; return;
} }
if (m_bIsUserPaneLaidOut == true) { if (m_bIsUserPaneLaidOut == true) {
OSL_TRACE("user pane already laid out"); SAL_INFO("fpicker.aqua","user pane already laid out");
DBG_PRINT_EXIT(CLASS_NAME, __func__); DBG_PRINT_EXIT(CLASS_NAME, __func__);
return; return;
} }
NSRect userPaneRect = [m_pUserPane frame]; NSRect userPaneRect = [m_pUserPane frame];
OSL_TRACE("userPane frame: {%f, %f, %f, %f}",userPaneRect.origin.x, userPaneRect.origin.y, userPaneRect.size.width, userPaneRect.size.height); SAL_INFO("fpicker.aqua","userPane frame: {" << userPaneRect.origin.x << ", " << userPaneRect.origin.y << ", " << userPaneRect.size.width << ", " << userPaneRect.size.height << "}");
int nUsableWidth = userPaneRect.size.width; int nUsableWidth = userPaneRect.size.width;
...@@ -848,7 +848,7 @@ void ControlHelper::layoutControls() ...@@ -848,7 +848,7 @@ void ControlHelper::layoutControls()
} }
int nLongestPopupWidth = nPopupMaxWidth + nPopupLabelMaxWidth + kAquaSpaceBetweenControls - kAquaSpacePopupMenuFrameBoundsDiffLeft - kAquaSpaceLabelFrameBoundsDiffH; int nLongestPopupWidth = nPopupMaxWidth + nPopupLabelMaxWidth + kAquaSpaceBetweenControls - kAquaSpacePopupMenuFrameBoundsDiffLeft - kAquaSpaceLabelFrameBoundsDiffH;
OSL_TRACE("longest popup width: %d", nLongestPopupWidth); SAL_INFO("fpicker.aqua","longest popup width: " << nLongestPopupWidth);
NSControl* previousControl = nil; NSControl* previousControl = nil;
...@@ -869,7 +869,7 @@ void ControlHelper::layoutControls() ...@@ -869,7 +869,7 @@ void ControlHelper::layoutControls()
//add space between the previous control and this control according to Apple's HIG //add space between the previous control and this control according to Apple's HIG
nDistBetweenControls = getVerticalDistance(previousControl, pControl); nDistBetweenControls = getVerticalDistance(previousControl, pControl);
OSL_TRACE("vertical distance: %d", nDistBetweenControls); SAL_INFO("fpicker.aqua","vertical distance: " << nDistBetweenControls);
currenttop -= nDistBetweenControls; currenttop -= nDistBetweenControls;
previousControl = pControl; previousControl = pControl;
...@@ -882,19 +882,19 @@ void ControlHelper::layoutControls() ...@@ -882,19 +882,19 @@ void ControlHelper::layoutControls()
NSTextField *label = m_aMapListLabelFields[(NSPopUpButton*)pControl]; NSTextField *label = m_aMapListLabelFields[(NSPopUpButton*)pControl];
NSRect labelFrame = [label frame]; NSRect labelFrame = [label frame];
int totalWidth = nPopupMaxWidth + labelFrame.size.width + kAquaSpaceBetweenControls - kAquaSpacePopupMenuFrameBoundsDiffLeft - kAquaSpaceLabelFrameBoundsDiffH; int totalWidth = nPopupMaxWidth + labelFrame.size.width + kAquaSpaceBetweenControls - kAquaSpacePopupMenuFrameBoundsDiffLeft - kAquaSpaceLabelFrameBoundsDiffH;
OSL_TRACE("totalWidth: %d", totalWidth); SAL_INFO("fpicker.aqua","totalWidth: " << totalWidth);
//let's center popups //let's center popups
int left = (nUsableWidth + nLongestPopupWidth) / 2 - totalWidth; int left = (nUsableWidth + nLongestPopupWidth) / 2 - totalWidth;
OSL_TRACE("left: %d", left); SAL_INFO("fpicker.aqua","left: " << left);
labelFrame.origin.x = left; labelFrame.origin.x = left;
labelFrame.origin.y = currenttop + kAquaSpaceLabelPopupDiffV; labelFrame.origin.y = currenttop + kAquaSpaceLabelPopupDiffV;
OSL_TRACE("setting label at: {%f, %f, %f, %f}",labelFrame.origin.x, labelFrame.origin.y, labelFrame.size.width, labelFrame.size.height); SAL_INFO("fpicker.aqua","setting label at: {" << labelFrame.origin.x << ", " << labelFrame.origin.y << ", " << labelFrame.size.width << ", " << labelFrame.size.height << "}");
[label setFrame:labelFrame]; [label setFrame:labelFrame];
controlRect.origin.x = left + labelFrame.size.width + kAquaSpaceBetweenControls - kAquaSpaceLabelFrameBoundsDiffH - kAquaSpacePopupMenuFrameBoundsDiffLeft; controlRect.origin.x = left + labelFrame.size.width + kAquaSpaceBetweenControls - kAquaSpaceLabelFrameBoundsDiffH - kAquaSpacePopupMenuFrameBoundsDiffLeft;
controlRect.origin.y = currenttop; controlRect.origin.y = currenttop;
controlRect.size.width = nPopupMaxWidth; controlRect.size.width = nPopupMaxWidth;
OSL_TRACE("setting popup at: {%f, %f, %f, %f}",controlRect.origin.x, controlRect.origin.y, controlRect.size.width, controlRect.size.height); SAL_INFO("fpicker.aqua","setting popup at: {" << controlRect.origin.x << ", " << controlRect.origin.y << ", " << controlRect.size.width << ", " << controlRect.size.height << "}");
[pControl setFrame:controlRect]; [pControl setFrame:controlRect];
//add some space to place the vertical position right below the popup's visual bounds //add some space to place the vertical position right below the popup's visual bounds
...@@ -908,7 +908,7 @@ void ControlHelper::layoutControls() ...@@ -908,7 +908,7 @@ void ControlHelper::layoutControls()
controlRect.origin.y = currenttop; controlRect.origin.y = currenttop;
controlRect.size.width = nPopupMaxWidth; controlRect.size.width = nPopupMaxWidth;
[pControl setFrame:controlRect]; [pControl setFrame:controlRect];
OSL_TRACE("setting checkbox at: {%f, %f, %f, %f}",controlRect.origin.x, controlRect.origin.y, controlRect.size.width, controlRect.size.height); SAL_INFO("fpicker.aqua","setting checkbox at: {" << controlRect.origin.x << ", " << controlRect.origin.y << ", " << controlRect.size.width << ", " << controlRect.size.height << "}");
currenttop += kAquaSpaceSwitchButtonFrameBoundsDiff; currenttop += kAquaSpaceSwitchButtonFrameBoundsDiff;
} }
...@@ -934,7 +934,7 @@ void ControlHelper::createFilterControl() { ...@@ -934,7 +934,7 @@ void ControlHelper::createFilterControl() {
for (NSStringList::iterator iter = m_pFilterHelper->getFilterNames()->begin(); iter != m_pFilterHelper->getFilterNames()->end(); iter++) { for (NSStringList::iterator iter = m_pFilterHelper->getFilterNames()->begin(); iter != m_pFilterHelper->getFilterNames()->end(); iter++) {
NSString *filterName = *iter; NSString *filterName = *iter;
OSL_TRACE("adding filter name: %s", [filterName UTF8String]); SAL_INFO("fpicker.aqua","adding filter name: " << [filterName UTF8String]);
if ([filterName isEqualToString:@"-"]) { if ([filterName isEqualToString:@"-"]) {
[menu addItem:[NSMenuItem separatorItem]]; [menu addItem:[NSMenuItem separatorItem]];
} }
...@@ -994,7 +994,7 @@ void ControlHelper::updateFilterUI() ...@@ -994,7 +994,7 @@ void ControlHelper::updateFilterUI()
DBG_PRINT_ENTRY(CLASS_NAME, __func__); DBG_PRINT_ENTRY(CLASS_NAME, __func__);
if (m_bIsFilterControlNeeded == false || m_pFilterHelper == NULL) { if (m_bIsFilterControlNeeded == false || m_pFilterHelper == NULL) {
OSL_TRACE("no filter control needed or no filter helper present"); SAL_INFO("fpicker.aqua","no filter control needed or no filter helper present");
DBG_PRINT_EXIT(CLASS_NAME, __func__); DBG_PRINT_EXIT(CLASS_NAME, __func__);
return; return;
} }
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#endif #endif
#include "NSURL_OOoAdditions.hxx" #include "NSURL_OOoAdditions.hxx"
#include "sal/log.hxx"
@implementation NSURL (OOoAdditions) @implementation NSURL (OOoAdditions)
- (rtl::OUString) OUStringForInfo:(InfoType)info - (rtl::OUString) OUStringForInfo:(InfoType)info
...@@ -32,13 +33,13 @@ ...@@ -32,13 +33,13 @@
switch(info) { switch(info) {
case FULLPATH: case FULLPATH:
OSL_TRACE("Extracting the full path of an item"); SAL_INFO("fpicker.aqua","Extracting the full path of an item");
sURLString = [self absoluteString]; sURLString = [self absoluteString];
[sURLString retain]; [sURLString retain];
break; break;
case FILENAME: case FILENAME:
{ {
OSL_TRACE("Extracting the file name of an item"); SAL_INFO("fpicker.aqua","Extracting the file name of an item");
NSString *path = [self path]; NSString *path = [self path];
if (path == nil) { if (path == nil) {
sURLString = @""; sURLString = @"";
...@@ -51,7 +52,7 @@ ...@@ -51,7 +52,7 @@
break; break;
case PATHWITHOUTLASTCOMPONENT: case PATHWITHOUTLASTCOMPONENT:
{ {
OSL_TRACE("Extracting the last but one component of an item's path"); SAL_INFO("fpicker.aqua","Extracting the last but one component of an item's path");
NSString *path = [self absoluteString]; NSString *path = [self absoluteString];
if (path == nil) { if (path == nil) {
sURLString = @""; sURLString = @"";
......
...@@ -92,6 +92,7 @@ certain functionality. ...@@ -92,6 +92,7 @@ certain functionality.
@section fpicker @section fpicker
@li @c fpicker.aqua
@li @c fpicker.office @li @c fpicker.office
@section i18npool @section i18npool
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment