Bin overly verbose function entry/exit debug print macros
Change-Id: Icdbb9344a669e5f78d5db85dc555e91a56ded34c
This commit is contained in:
@@ -26,7 +26,6 @@
|
|||||||
#include <postmac.h>
|
#include <postmac.h>
|
||||||
#include <rtl/ustring.hxx>
|
#include <rtl/ustring.hxx>
|
||||||
#include <sal/types.h>
|
#include <sal/types.h>
|
||||||
#include "sal/log.hxx"
|
|
||||||
|
|
||||||
enum InfoType {
|
enum InfoType {
|
||||||
FULLPATH,
|
FULLPATH,
|
||||||
@@ -39,145 +38,6 @@ OUString FSRefToOUString(FSRef const & fsRef, InfoType info = FULLPATH);
|
|||||||
OUString CFURLRefToOUString(CFURLRef aUrlRef, InfoType info);
|
OUString CFURLRefToOUString(CFURLRef aUrlRef, InfoType info);
|
||||||
CFStringRef CFStringCreateWithOUString(const OUString& aString);
|
CFStringRef CFStringCreateWithOUString(const OUString& aString);
|
||||||
|
|
||||||
//debug utils
|
|
||||||
#define PARAMFILLER "\n "
|
|
||||||
|
|
||||||
inline void DBG_PRINT_ENTRY() {
|
|
||||||
SAL_INFO("fpicker.aqua",">>> "<< __func__);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname) {
|
|
||||||
SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const char* 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) {
|
|
||||||
SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " = " << OUStringToOString(value1, RTL_TEXTENCODING_UTF8).getStr());
|
|
||||||
}
|
|
||||||
|
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
|
||||||
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const CFStringRef value1)
|
|
||||||
{
|
|
||||||
SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname<< PARAMFILLER << param1 <<" =");
|
|
||||||
CFShow(value1);
|
|
||||||
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const CFStringRef /* value1 */)
|
|
||||||
{
|
|
||||||
SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " =");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
|
||||||
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const NSString* value1)
|
|
||||||
{
|
|
||||||
SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " =");
|
|
||||||
NSLog(const_cast<NSString*>(value1));
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const NSString* /* value1 */)
|
|
||||||
{
|
|
||||||
SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " =");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const int 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) {
|
|
||||||
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) {
|
|
||||||
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) {
|
|
||||||
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) {
|
|
||||||
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)
|
|
||||||
{
|
|
||||||
SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " = " << value1 << PARAMFILLER << param2 << " =" << value2);
|
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
|
||||||
CFShow(value2);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const int value1, const char* param2, const NSString* value2)
|
|
||||||
{
|
|
||||||
SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " = " << value1 << PARAMFILLER << param2 << " =" << value2);
|
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
|
||||||
NSLog( const_cast<NSString*>(value2));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inline void DBG_PRINT_ENTRY(const char * classname, const char * methodname, const char* param1, const OUString& value1, const char* param2, const OUString& value2) {
|
|
||||||
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) {
|
|
||||||
SAL_INFO("fpicker.aqua",">>> " << classname << "::" << methodname << PARAMFILLER << param1 << " = " << OUStringToOString(value1, RTL_TEXTENCODING_UTF8).getStr() << PARAMFILLER << param2 <<" = " << value2);
|
|
||||||
}
|
|
||||||
|
|
||||||
//exit method debugs
|
|
||||||
|
|
||||||
inline void DBG_PRINT_EXIT() {
|
|
||||||
SAL_INFO("fpicker.aqua","<<< " << __func__);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void DBG_PRINT_EXIT(const char * classname, const char * methodname) {
|
|
||||||
SAL_INFO("fpicker.aqua","<<< " << classname << "::" << methodname);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, const char* retVal) {
|
|
||||||
SAL_INFO("fpicker.aqua","<<< " << classname << "::" << methodname << PARAMFILLER "returnValue = " << retVal);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, int retVal) {
|
|
||||||
SAL_INFO("fpicker.aqua","<<< " << classname << "::" << methodname << PARAMFILLER "returnValue = " << retVal);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
|
||||||
inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, const CFStringRef retVal)
|
|
||||||
{
|
|
||||||
SAL_INFO("fpicker.aqua","<<< " << classname << "::" << methodname << PARAMFILLER "returnValue = ");
|
|
||||||
CFShow(retVal);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, const CFStringRef /* retVal */)
|
|
||||||
{
|
|
||||||
SAL_INFO("fpicker.aqua","<<< " << classname << "::" << methodname << PARAMFILLER "returnValue = ");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
|
||||||
inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, const NSString* retVal)
|
|
||||||
{
|
|
||||||
SAL_INFO("fpicker.aqua","<<< " << classname << "::" << methodname << PARAMFILLER "returnValue = ");
|
|
||||||
NSLog(const_cast<NSString*>(retVal));
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, const NSString* /* retVal */ )
|
|
||||||
{
|
|
||||||
SAL_INFO("fpicker.aqua","<<< " << classname << "::" << methodname << PARAMFILLER "returnValue = ");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
inline void DBG_PRINT_EXIT(const char * classname, const char * methodname, const OUString& retVal) {
|
|
||||||
SAL_INFO("fpicker.aqua","<<< " << classname << "::" << methodname << PARAMFILLER "returnValue = " << OUStringToOString(retVal, RTL_TEXTENCODING_UTF8).getStr());
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // INCLUDED_FPICKER_SOURCE_AQUA_CFSTRINGUTILITIES_HXX
|
#endif // INCLUDED_FPICKER_SOURCE_AQUA_CFSTRINGUTILITIES_HXX
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -20,9 +20,8 @@
|
|||||||
#include "sal/log.hxx"
|
#include "sal/log.hxx"
|
||||||
#include "CFStringUtilities.hxx"
|
#include "CFStringUtilities.hxx"
|
||||||
|
|
||||||
rtl::OUString CFStringToOUString(const CFStringRef sOrig) {
|
rtl::OUString CFStringToOUString(const CFStringRef sOrig)
|
||||||
//DBG_PRINT_ENTRY("CFStringUtilities", __func__, "sOrig", sOrig);
|
{
|
||||||
|
|
||||||
if (nullptr == sOrig) {
|
if (nullptr == sOrig) {
|
||||||
return rtl::OUString();
|
return rtl::OUString();
|
||||||
}
|
}
|
||||||
@@ -39,25 +38,18 @@ rtl::OUString CFStringToOUString(const CFStringRef sOrig) {
|
|||||||
//we no longer need the original string
|
//we no longer need the original string
|
||||||
CFRelease(sOrig);
|
CFRelease(sOrig);
|
||||||
|
|
||||||
//DBG_PRINT_EXIT("CFStringUtilities", __func__, unichars);
|
|
||||||
|
|
||||||
return rtl::OUString(reinterpret_cast<sal_Unicode *>(unichars));
|
return rtl::OUString(reinterpret_cast<sal_Unicode *>(unichars));
|
||||||
}
|
}
|
||||||
|
|
||||||
CFStringRef CFStringCreateWithOUString(const rtl::OUString& aString) {
|
CFStringRef CFStringCreateWithOUString(const rtl::OUString& aString)
|
||||||
//DBG_PRINT_ENTRY("CFStringUtilities", __func__);
|
{
|
||||||
|
|
||||||
CFStringRef ref = CFStringCreateWithCharacters(kCFAllocatorDefault, reinterpret_cast<UniChar const *>(aString.getStr()), aString.getLength());
|
CFStringRef ref = CFStringCreateWithCharacters(kCFAllocatorDefault, reinterpret_cast<UniChar const *>(aString.getStr()), aString.getLength());
|
||||||
|
|
||||||
//DBG_PRINT_EXIT("CFStringUtilities", __func__, ref);
|
|
||||||
|
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
rtl::OUString FSRefToOUString(FSRef const & fsRef, InfoType info)
|
rtl::OUString FSRefToOUString(FSRef const & fsRef, InfoType info)
|
||||||
{
|
{
|
||||||
//DBG_PRINT_ENTRY("CFStringUtilities", __func__);
|
|
||||||
|
|
||||||
SAL_WNODEPRECATED_DECLARATIONS_PUSH //TODO: 10.9 CFURLCreateFromFSRef
|
SAL_WNODEPRECATED_DECLARATIONS_PUSH //TODO: 10.9 CFURLCreateFromFSRef
|
||||||
CFURLRef aUrlRef = CFURLCreateFromFSRef(nullptr, &fsRef);
|
CFURLRef aUrlRef = CFURLCreateFromFSRef(nullptr, &fsRef);
|
||||||
SAL_WNODEPRECATED_DECLARATIONS_POP
|
SAL_WNODEPRECATED_DECLARATIONS_POP
|
||||||
@@ -67,15 +59,11 @@ rtl::OUString FSRefToOUString(FSRef const & fsRef, InfoType info)
|
|||||||
//we no longer need the CFURLRef
|
//we no longer need the CFURLRef
|
||||||
CFRelease(aUrlRef);
|
CFRelease(aUrlRef);
|
||||||
|
|
||||||
//DBG_PRINT_EXIT("CFStringUtilities", __func__, OUStringToOString(sResult, RTL_TEXTENCODING_UTF8).getStr());
|
|
||||||
|
|
||||||
return sResult;
|
return sResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
rtl::OUString CFURLRefToOUString(CFURLRef aUrlRef, InfoType info)
|
rtl::OUString CFURLRefToOUString(CFURLRef aUrlRef, InfoType info)
|
||||||
{
|
{
|
||||||
//DBG_PRINT_ENTRY("CFStringUtilities", __func__);
|
|
||||||
|
|
||||||
CFStringRef sURLString = nullptr;
|
CFStringRef sURLString = nullptr;
|
||||||
|
|
||||||
switch(info) {
|
switch(info) {
|
||||||
@@ -113,8 +101,6 @@ rtl::OUString CFURLRefToOUString(CFURLRef aUrlRef, InfoType info)
|
|||||||
|
|
||||||
CFRelease(sURLString);
|
CFRelease(sURLString);
|
||||||
|
|
||||||
//DBG_PRINT_EXIT("CFStringUtilities", __func__, OUStringToOString(sResult, RTL_TEXTENCODING_UTF8).getStr());
|
|
||||||
|
|
||||||
return sResult;
|
return sResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -31,7 +31,6 @@
|
|||||||
#include "ControlHelper.hxx"
|
#include "ControlHelper.hxx"
|
||||||
|
|
||||||
#pragma mark DEFINES
|
#pragma mark DEFINES
|
||||||
#define CLASS_NAME "ControlHelper"
|
|
||||||
#define POPUP_WIDTH_MIN 200
|
#define POPUP_WIDTH_MIN 200
|
||||||
#define POPUP_WIDTH_MAX 350
|
#define POPUP_WIDTH_MAX 350
|
||||||
|
|
||||||
@@ -44,13 +43,10 @@ namespace {
|
|||||||
|
|
||||||
uno::Any HandleGetListValue(const NSControl* pControl, const sal_Int16 nControlAction)
|
uno::Any HandleGetListValue(const NSControl* pControl, const sal_Int16 nControlAction)
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "controlAction", nControlAction);
|
|
||||||
|
|
||||||
uno::Any aAny;
|
uno::Any aAny;
|
||||||
|
|
||||||
if ([pControl class] != [NSPopUpButton class]) {
|
if ([pControl class] != [NSPopUpButton class]) {
|
||||||
SAL_INFO("fpicker.aqua","not a popup button");
|
SAL_INFO("fpicker.aqua","not a popup button");
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
return aAny;
|
return aAny;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,7 +54,6 @@ uno::Any HandleGetListValue(const NSControl* pControl, const sal_Int16 nControlA
|
|||||||
NSMenu *rMenu = [pButton menu];
|
NSMenu *rMenu = [pButton menu];
|
||||||
if (nil == rMenu) {
|
if (nil == rMenu) {
|
||||||
SAL_INFO("fpicker.aqua","button has no menu");
|
SAL_INFO("fpicker.aqua","button has no menu");
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
return aAny;
|
return aAny;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,14 +103,11 @@ uno::Any HandleGetListValue(const NSControl* pControl, const sal_Int16 nControlA
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
return aAny;
|
return aAny;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSTextField* createLabelWithString(NSString* labelString) {
|
NSTextField* createLabelWithString(NSString* labelString)
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "label", labelString);
|
{
|
||||||
|
|
||||||
NSTextField *textField = [NSTextField new];
|
NSTextField *textField = [NSTextField new];
|
||||||
[textField setEditable:NO];
|
[textField setEditable:NO];
|
||||||
[textField setSelectable:NO];
|
[textField setSelectable:NO];
|
||||||
@@ -125,7 +117,6 @@ NSTextField* createLabelWithString(NSString* labelString) {
|
|||||||
[[textField cell] setTitle:labelString];
|
[[textField cell] setTitle:labelString];
|
||||||
SAL_WNODEPRECATED_DECLARATIONS_POP
|
SAL_WNODEPRECATED_DECLARATIONS_POP
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
return textField;
|
return textField;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,8 +134,6 @@ ControlHelper::ControlHelper()
|
|||||||
, m_bIsFilterControlNeeded(false)
|
, m_bIsFilterControlNeeded(false)
|
||||||
, m_pFilterHelper(nullptr)
|
, m_pFilterHelper(nullptr)
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for( i = 0; i < TOGGLE_LAST; i++ ) {
|
for( i = 0; i < TOGGLE_LAST; i++ ) {
|
||||||
@@ -154,14 +143,10 @@ ControlHelper::ControlHelper()
|
|||||||
for( i = 0; i < LIST_LAST; i++ ) {
|
for( i = 0; i < LIST_LAST; i++ ) {
|
||||||
m_bListVisibility[i] = false;
|
m_bListVisibility[i] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ControlHelper::~ControlHelper()
|
ControlHelper::~ControlHelper()
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
|
|
||||||
if (nullptr != m_pUserPane) {
|
if (nullptr != m_pUserPane) {
|
||||||
@@ -188,8 +173,6 @@ ControlHelper::~ControlHelper()
|
|||||||
}
|
}
|
||||||
|
|
||||||
[pool release];
|
[pool release];
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark XInitialization delegate
|
#pragma mark XInitialization delegate
|
||||||
@@ -198,8 +181,6 @@ ControlHelper::~ControlHelper()
|
|||||||
|
|
||||||
void ControlHelper::initialize( sal_Int16 nTemplateId )
|
void ControlHelper::initialize( sal_Int16 nTemplateId )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "templateId", nTemplateId);
|
|
||||||
|
|
||||||
switch( nTemplateId )
|
switch( nTemplateId )
|
||||||
{
|
{
|
||||||
case FILESAVE_AUTOEXTENSION_PASSWORD:
|
case FILESAVE_AUTOEXTENSION_PASSWORD:
|
||||||
@@ -238,8 +219,6 @@ void ControlHelper::initialize( sal_Int16 nTemplateId )
|
|||||||
}
|
}
|
||||||
|
|
||||||
createControls();
|
createControls();
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark XFilePickerControlAccess delegates
|
#pragma mark XFilePickerControlAccess delegates
|
||||||
@@ -249,13 +228,10 @@ void ControlHelper::initialize( sal_Int16 nTemplateId )
|
|||||||
|
|
||||||
void ControlHelper::enableControl( const sal_Int16 nControlId, const bool bEnable ) const
|
void ControlHelper::enableControl( const sal_Int16 nControlId, const bool bEnable ) const
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "controlId", nControlId, "enable", int(bEnable));
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
if (nControlId == ExtendedFilePickerElementIds::CHECKBOX_PREVIEW) {
|
if (nControlId == ExtendedFilePickerElementIds::CHECKBOX_PREVIEW) {
|
||||||
SAL_INFO("fpicker.aqua"," preview checkbox cannot be changed");
|
SAL_INFO("fpicker.aqua"," preview checkbox cannot be changed");
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -271,14 +247,10 @@ void ControlHelper::enableControl( const sal_Int16 nControlId, const bool bEnabl
|
|||||||
} else {
|
} else {
|
||||||
SAL_INFO("fpicker.aqua","enable unknown control " << nControlId );
|
SAL_INFO("fpicker.aqua","enable unknown control " << nControlId );
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OUString ControlHelper::getLabel( sal_Int16 nControlId )
|
OUString ControlHelper::getLabel( sal_Int16 nControlId )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "controlId", nControlId);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
NSControl* pControl = getControl( nControlId );
|
NSControl* pControl = getControl( nControlId );
|
||||||
@@ -301,15 +273,11 @@ OUString ControlHelper::getLabel( sal_Int16 nControlId )
|
|||||||
retVal = [sLabel OUString];
|
retVal = [sLabel OUString];
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__, retVal);
|
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ControlHelper::setLabel( sal_Int16 nControlId, NSString* aLabel )
|
void ControlHelper::setLabel( sal_Int16 nControlId, NSString* aLabel )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "controlId", nControlId, "label", aLabel);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
@@ -336,14 +304,10 @@ void ControlHelper::setLabel( sal_Int16 nControlId, NSString* aLabel )
|
|||||||
layoutControls();
|
layoutControls();
|
||||||
|
|
||||||
[pool release];
|
[pool release];
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ControlHelper::setValue( sal_Int16 nControlId, sal_Int16 nControlAction, const uno::Any& rValue )
|
void ControlHelper::setValue( sal_Int16 nControlId, sal_Int16 nControlAction, const uno::Any& rValue )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "controlId", nControlId, "controlAction", nControlAction);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
if (nControlId == ExtendedFilePickerElementIds::CHECKBOX_PREVIEW) {
|
if (nControlId == ExtendedFilePickerElementIds::CHECKBOX_PREVIEW) {
|
||||||
@@ -368,14 +332,10 @@ void ControlHelper::setValue( sal_Int16 nControlId, sal_Int16 nControlAction, co
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uno::Any ControlHelper::getValue( sal_Int16 nControlId, sal_Int16 nControlAction ) const
|
uno::Any ControlHelper::getValue( sal_Int16 nControlId, sal_Int16 nControlAction ) const
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "controlId", nControlId, "controlAction", nControlAction);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
uno::Any aRetval;
|
uno::Any aRetval;
|
||||||
|
|
||||||
@@ -395,24 +355,18 @@ uno::Any ControlHelper::getValue( sal_Int16 nControlId, sal_Int16 nControlAction
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
return aRetval;
|
return aRetval;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ControlHelper::createUserPane()
|
void ControlHelper::createUserPane()
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
if (!m_bUserPaneNeeded) {
|
if (!m_bUserPaneNeeded) {
|
||||||
SAL_INFO("fpicker.aqua","no user pane needed");
|
SAL_INFO("fpicker.aqua","no user pane needed");
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nil != m_pUserPane) {
|
if (nil != m_pUserPane) {
|
||||||
SAL_INFO("fpicker.aqua","user pane already exists");
|
SAL_INFO("fpicker.aqua","user pane already exists");
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -555,8 +509,6 @@ void ControlHelper::createUserPane()
|
|||||||
[m_pUserPane setFrame:upRect];
|
[m_pUserPane setFrame:upRect];
|
||||||
|
|
||||||
layoutControls();
|
layoutControls();
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark Private / Misc
|
#pragma mark Private / Misc
|
||||||
@@ -565,8 +517,6 @@ void ControlHelper::createUserPane()
|
|||||||
|
|
||||||
void ControlHelper::createControls()
|
void ControlHelper::createControls()
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
CResourceProvider aResProvider;
|
CResourceProvider aResProvider;
|
||||||
for (int i = 0; i < LIST_LAST; i++) {
|
for (int i = 0; i < LIST_LAST; i++) {
|
||||||
if (m_bListVisibility[i]) {
|
if (m_bListVisibility[i]) {
|
||||||
@@ -627,25 +577,19 @@ void ControlHelper::createControls()
|
|||||||
[pPreviewBox setEnabled:NO];
|
[pPreviewBox setEnabled:NO];
|
||||||
[(NSButton*)pPreviewBox setState:NSOnState];
|
[(NSButton*)pPreviewBox setState:NSOnState];
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define TOGGLE_ELEMENT( elem ) \
|
#define TOGGLE_ELEMENT( elem ) \
|
||||||
case elem: \
|
case elem: \
|
||||||
nReturn = CHECKBOX_##elem; \
|
nReturn = CHECKBOX_##elem; \
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__, nReturn); \
|
|
||||||
return nReturn
|
return nReturn
|
||||||
#define LIST_ELEMENT( elem ) \
|
#define LIST_ELEMENT( elem ) \
|
||||||
case elem: \
|
case elem: \
|
||||||
nReturn = LISTBOX_##elem##_LABEL; \
|
nReturn = LISTBOX_##elem##_LABEL; \
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__, nReturn); \
|
|
||||||
return nReturn
|
return nReturn
|
||||||
|
|
||||||
int ControlHelper::getControlElementName(const Class aClazz, const int nControlId)
|
int ControlHelper::getControlElementName(const Class aClazz, const int nControlId)
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "aClazz", [[aClazz description] UTF8String], "controlId", nControlId);
|
|
||||||
|
|
||||||
int nReturn = -1;
|
int nReturn = -1;
|
||||||
if (aClazz == [NSButton class])
|
if (aClazz == [NSButton class])
|
||||||
{
|
{
|
||||||
@@ -668,18 +612,13 @@ int ControlHelper::getControlElementName(const Class aClazz, const int nControlI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__, nReturn);
|
|
||||||
|
|
||||||
return nReturn;
|
return nReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ControlHelper::HandleSetListValue(const NSControl* pControl, const sal_Int16 nControlAction, const uno::Any& rValue)
|
void ControlHelper::HandleSetListValue(const NSControl* pControl, const sal_Int16 nControlAction, const uno::Any& rValue)
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "controlAction", nControlAction);
|
|
||||||
|
|
||||||
if ([pControl class] != [NSPopUpButton class]) {
|
if ([pControl class] != [NSPopUpButton class]) {
|
||||||
SAL_INFO("fpicker.aqua","not a popup menu");
|
SAL_INFO("fpicker.aqua","not a popup menu");
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -687,7 +626,6 @@ void ControlHelper::HandleSetListValue(const NSControl* pControl, const sal_Int1
|
|||||||
NSMenu *rMenu = [pButton menu];
|
NSMenu *rMenu = [pButton menu];
|
||||||
if (nil == rMenu) {
|
if (nil == rMenu) {
|
||||||
SAL_INFO("fpicker.aqua","button has no menu");
|
SAL_INFO("fpicker.aqua","button has no menu");
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -733,7 +671,6 @@ void ControlHelper::HandleSetListValue(const NSControl* pControl, const sal_Int1
|
|||||||
int nItems = [rMenu numberOfItems];
|
int nItems = [rMenu numberOfItems];
|
||||||
if (nItems == 0) {
|
if (nItems == 0) {
|
||||||
SAL_INFO("fpicker.aqua","no menu items to delete");
|
SAL_INFO("fpicker.aqua","no menu items to delete");
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for(sal_Int32 i = 0; i < nItems; i++) {
|
for(sal_Int32 i = 0; i < nItems; i++) {
|
||||||
@@ -755,15 +692,11 @@ void ControlHelper::HandleSetListValue(const NSControl* pControl, const sal_Int1
|
|||||||
}
|
}
|
||||||
|
|
||||||
layoutControls();
|
layoutControls();
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// cf. offapi/com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.idl
|
// cf. offapi/com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.idl
|
||||||
NSControl* ControlHelper::getControl( const sal_Int16 nControlId ) const
|
NSControl* ControlHelper::getControl( const sal_Int16 nControlId ) const
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "controlId", nControlId);
|
|
||||||
|
|
||||||
NSControl* pWidget = nil;
|
NSControl* pWidget = nil;
|
||||||
|
|
||||||
#define MAP_TOGGLE( elem ) \
|
#define MAP_TOGGLE( elem ) \
|
||||||
@@ -803,26 +736,20 @@ case ExtendedFilePickerElementIds::LISTBOX_##elem##_LABEL: \
|
|||||||
}
|
}
|
||||||
#undef MAP
|
#undef MAP
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
return pWidget;
|
return pWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ControlHelper::layoutControls()
|
void ControlHelper::layoutControls()
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
if (nil == m_pUserPane) {
|
if (nil == m_pUserPane) {
|
||||||
SAL_INFO("fpicker.aqua","no user pane to layout");
|
SAL_INFO("fpicker.aqua","no user pane to layout");
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_bIsUserPaneLaidOut) {
|
if (m_bIsUserPaneLaidOut) {
|
||||||
SAL_INFO("fpicker.aqua","user pane already laid out");
|
SAL_INFO("fpicker.aqua","user pane already laid out");
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -931,13 +858,10 @@ void ControlHelper::layoutControls()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_bIsUserPaneLaidOut = true;
|
m_bIsUserPaneLaidOut = true;
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ControlHelper::createFilterControl() {
|
void ControlHelper::createFilterControl()
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
{
|
||||||
|
|
||||||
CResourceProvider aResProvider;
|
CResourceProvider aResProvider;
|
||||||
NSString* sLabel = aResProvider.getResString(CommonFilePickerElementIds::LISTBOX_FILTER_LABEL);
|
NSString* sLabel = aResProvider.getResString(CommonFilePickerElementIds::LISTBOX_FILTER_LABEL);
|
||||||
|
|
||||||
@@ -962,8 +886,6 @@ void ControlHelper::createFilterControl() {
|
|||||||
// always add the filter as first item
|
// always add the filter as first item
|
||||||
m_aActiveControls.push_front(m_pFilterControl);
|
m_aActiveControls.push_front(m_pFilterControl);
|
||||||
m_aMapListLabels[m_pFilterControl] = [sLabel retain];
|
m_aMapListLabels[m_pFilterControl] = [sLabel retain];
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ControlHelper::getVerticalDistance(const NSControl* first, const NSControl* second)
|
int ControlHelper::getVerticalDistance(const NSControl* first, const NSControl* second)
|
||||||
@@ -993,11 +915,8 @@ int ControlHelper::getVerticalDistance(const NSControl* first, const NSControl*
|
|||||||
|
|
||||||
void ControlHelper::updateFilterUI()
|
void ControlHelper::updateFilterUI()
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
if (!m_bIsFilterControlNeeded || m_pFilterHelper == nullptr) {
|
if (!m_bIsFilterControlNeeded || m_pFilterHelper == nullptr) {
|
||||||
SAL_INFO("fpicker.aqua","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__);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1008,8 +927,6 @@ void ControlHelper::updateFilterUI()
|
|||||||
}
|
}
|
||||||
|
|
||||||
[m_pFilterControl selectItemAtIndex:index];
|
[m_pFilterControl selectItemAtIndex:index];
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -43,7 +43,6 @@ void fillSuffixList(OUStringList& aSuffixList, const ::rtl::OUString& suffixStri
|
|||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark DEFINES
|
#pragma mark DEFINES
|
||||||
#define CLASS_NAME "FilterEntry"
|
|
||||||
|
|
||||||
#pragma mark FilterEntry
|
#pragma mark FilterEntry
|
||||||
|
|
||||||
@@ -51,8 +50,6 @@ FilterEntry::FilterEntry( const rtl::OUString& _rTitle, const UnoFilterList& _rS
|
|||||||
:m_sTitle( _rTitle )
|
:m_sTitle( _rTitle )
|
||||||
,m_aSubFilters( _rSubFilters )
|
,m_aSubFilters( _rSubFilters )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "title", _rTitle);
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -67,13 +64,9 @@ bool FilterEntry::hasSubFilters() const
|
|||||||
|
|
||||||
sal_Int32 FilterEntry::getSubFilters( UnoFilterList& _rSubFilterList )
|
sal_Int32 FilterEntry::getSubFilters( UnoFilterList& _rSubFilterList )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
_rSubFilterList = m_aSubFilters;
|
_rSubFilterList = m_aSubFilters;
|
||||||
sal_Int32 nReturn = m_aSubFilters.getLength();
|
sal_Int32 nReturn = m_aSubFilters.getLength();
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__, nReturn);
|
|
||||||
|
|
||||||
return nReturn;
|
return nReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,8 +99,6 @@ isFilterString( const rtl::OUString& rFilterString, const char *pMatch )
|
|||||||
static rtl::OUString
|
static rtl::OUString
|
||||||
shrinkFilterName( const rtl::OUString& aFilterName, bool bAllowNoStar = false )
|
shrinkFilterName( const rtl::OUString& aFilterName, bool bAllowNoStar = false )
|
||||||
{
|
{
|
||||||
// DBG_PRINT_ENTRY(CLASS_NAME, "shrinkFilterName", "filterName", aFilterName);
|
|
||||||
|
|
||||||
sal_Int32 nBracketEnd = -1;
|
sal_Int32 nBracketEnd = -1;
|
||||||
rtl::OUString aRealName(aFilterName);
|
rtl::OUString aRealName(aFilterName);
|
||||||
|
|
||||||
@@ -178,21 +169,14 @@ public:
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef CLASS_NAME
|
|
||||||
#define CLASS_NAME "FilterHelper"
|
|
||||||
|
|
||||||
FilterHelper::FilterHelper()
|
FilterHelper::FilterHelper()
|
||||||
: m_pFilterList(nullptr)
|
: m_pFilterList(nullptr)
|
||||||
, m_pFilterNames(nullptr)
|
, m_pFilterNames(nullptr)
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FilterHelper::~FilterHelper()
|
FilterHelper::~FilterHelper()
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
|
|
||||||
if (nullptr != m_pFilterList) {
|
if (nullptr != m_pFilterList) {
|
||||||
@@ -208,8 +192,6 @@ FilterHelper::~FilterHelper()
|
|||||||
}
|
}
|
||||||
|
|
||||||
[pool release];
|
[pool release];
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -264,8 +246,6 @@ void FilterHelper::ensureFilterList( const ::rtl::OUString& _rInitialCurrentFilt
|
|||||||
|
|
||||||
void FilterHelper::SetCurFilter( const rtl::OUString& rFilter )
|
void FilterHelper::SetCurFilter( const rtl::OUString& rFilter )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "filter", rFilter);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
if(!m_aCurrentFilter.equals(rFilter))
|
if(!m_aCurrentFilter.equals(rFilter))
|
||||||
@@ -290,14 +270,10 @@ void FilterHelper::SetCurFilter( const rtl::OUString& rFilter )
|
|||||||
OSL_TRACE("No filter entry was found for that name!");
|
OSL_TRACE("No filter entry was found for that name!");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FilterHelper::SetFilters()
|
void FilterHelper::SetFilters()
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
// set the default filter
|
// set the default filter
|
||||||
if( m_aCurrentFilter.getLength() > 0 )
|
if( m_aCurrentFilter.getLength() > 0 )
|
||||||
{
|
{
|
||||||
@@ -305,14 +281,11 @@ void FilterHelper::SetFilters()
|
|||||||
|
|
||||||
SetCurFilter( m_aCurrentFilter );
|
SetCurFilter( m_aCurrentFilter );
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FilterHelper::appendFilter(const ::rtl::OUString& aTitle, const ::rtl::OUString& aFilterString)
|
void FilterHelper::appendFilter(const ::rtl::OUString& aTitle, const ::rtl::OUString& aFilterString)
|
||||||
throw( css::lang::IllegalArgumentException, css::uno::RuntimeException ) {
|
throw( css::lang::IllegalArgumentException, css::uno::RuntimeException )
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "title", aTitle, "filter", aFilterString);
|
{
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
if( FilterNameExists( aTitle ) ) {
|
if( FilterNameExists( aTitle ) ) {
|
||||||
@@ -326,35 +299,25 @@ throw( css::lang::IllegalArgumentException, css::uno::RuntimeException ) {
|
|||||||
OUStringList suffixList;
|
OUStringList suffixList;
|
||||||
fillSuffixList(suffixList, aFilterString);
|
fillSuffixList(suffixList, aFilterString);
|
||||||
m_pFilterList->push_back(FilterEntry( aTitle, suffixList ) );
|
m_pFilterList->push_back(FilterEntry( aTitle, suffixList ) );
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FilterHelper::setCurrentFilter( const ::rtl::OUString& aTitle )
|
void FilterHelper::setCurrentFilter( const ::rtl::OUString& aTitle )
|
||||||
throw( css::lang::IllegalArgumentException, css::uno::RuntimeException ) {
|
throw( css::lang::IllegalArgumentException, css::uno::RuntimeException )
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "aTitle", OUStringToOString(aTitle, RTL_TEXTENCODING_UTF8).getStr());
|
{
|
||||||
|
|
||||||
SetCurFilter(aTitle);
|
SetCurFilter(aTitle);
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
::rtl::OUString SAL_CALL FilterHelper::getCurrentFilter( )
|
::rtl::OUString SAL_CALL FilterHelper::getCurrentFilter( )
|
||||||
throw( css::uno::RuntimeException ) {
|
throw( css::uno::RuntimeException )
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
{
|
||||||
|
|
||||||
::rtl::OUString sReturn = (m_aCurrentFilter);
|
::rtl::OUString sReturn = (m_aCurrentFilter);
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__, OUStringToOString(sReturn, RTL_TEXTENCODING_UTF8).getStr());
|
|
||||||
|
|
||||||
return sReturn;
|
return sReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL FilterHelper::appendFilterGroup( const ::rtl::OUString& sGroupTitle, const css::uno::Sequence< css::beans::StringPair >& aFilters )
|
void SAL_CALL FilterHelper::appendFilterGroup( const ::rtl::OUString& /* sGroupTitle */, const css::uno::Sequence< css::beans::StringPair >& aFilters )
|
||||||
throw (css::lang::IllegalArgumentException, css::uno::RuntimeException) {
|
throw (css::lang::IllegalArgumentException, css::uno::RuntimeException)
|
||||||
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "title", OUStringToOString(sGroupTitle, RTL_TEXTENCODING_UTF8).getStr());
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
//add a separator if this is not the first group to be added
|
//add a separator if this is not the first group to be added
|
||||||
@@ -378,14 +341,10 @@ throw (css::lang::IllegalArgumentException, css::uno::RuntimeException) {
|
|||||||
for( ; pSubFilters != pSubFiltersEnd; ++pSubFilters ) {
|
for( ; pSubFilters != pSubFiltersEnd; ++pSubFilters ) {
|
||||||
appendFilter(pSubFilters->First, pSubFilters->Second);
|
appendFilter(pSubFilters->First, pSubFilters->Second);
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FilterHelper::filenameMatchesFilter(NSString* sFilename)
|
bool FilterHelper::filenameMatchesFilter(NSString* sFilename)
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
if (m_aCurrentFilter == nullptr) {
|
if (m_aCurrentFilter == nullptr) {
|
||||||
OSL_TRACE("filter name is null");
|
OSL_TRACE("filter name is null");
|
||||||
return true;
|
return true;
|
||||||
@@ -433,21 +392,16 @@ bool FilterHelper::filenameMatchesFilter(NSString* sFilename)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
FilterList* FilterHelper::getFilterList() {
|
FilterList* FilterHelper::getFilterList()
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
{
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
return m_pFilterList;
|
return m_pFilterList;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSStringList* FilterHelper::getFilterNames() {
|
NSStringList* FilterHelper::getFilterNames()
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
{
|
||||||
|
|
||||||
if (nullptr == m_pFilterList)
|
if (nullptr == m_pFilterList)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
if (nullptr == m_pFilterNames) {
|
if (nullptr == m_pFilterNames) {
|
||||||
@@ -458,26 +412,20 @@ NSStringList* FilterHelper::getFilterNames() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
return m_pFilterNames;
|
return m_pFilterNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FilterHelper::SetFilterAtIndex(unsigned index) {
|
void FilterHelper::SetFilterAtIndex(unsigned index)
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "index", index);
|
{
|
||||||
|
|
||||||
if (m_pFilterList->size() <= index) {
|
if (m_pFilterList->size() <= index) {
|
||||||
index = 0;
|
index = 0;
|
||||||
}
|
}
|
||||||
FilterEntry entry = m_pFilterList->at(index);
|
FilterEntry entry = m_pFilterList->at(index);
|
||||||
SetCurFilter(entry.getTitle());
|
SetCurFilter(entry.getTitle());
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int FilterHelper::getCurrentFilterIndex() {
|
int FilterHelper::getCurrentFilterIndex()
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
{
|
||||||
|
|
||||||
int result = 0;//default to first filter
|
int result = 0;//default to first filter
|
||||||
if (m_aCurrentFilter.getLength() > 0) {
|
if (m_aCurrentFilter.getLength() > 0) {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@@ -496,14 +444,11 @@ int FilterHelper::getCurrentFilterIndex() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__, result);
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
OUStringList FilterHelper::getCurrentFilterSuffixList() {
|
OUStringList FilterHelper::getCurrentFilterSuffixList()
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
{
|
||||||
|
|
||||||
OUStringList retVal;
|
OUStringList retVal;
|
||||||
if (m_aCurrentFilter.getLength() > 0) {
|
if (m_aCurrentFilter.getLength() > 0) {
|
||||||
for (FilterList::iterator iter = m_pFilterList->begin(); iter != m_pFilterList->end(); iter++) {
|
for (FilterList::iterator iter = m_pFilterList->begin(); iter != m_pFilterList->end(); iter++) {
|
||||||
@@ -521,8 +466,6 @@ OUStringList FilterHelper::getCurrentFilterSuffixList() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -20,17 +20,12 @@
|
|||||||
#include "CFStringUtilities.hxx"
|
#include "CFStringUtilities.hxx"
|
||||||
#include "NSString_OOoAdditions.hxx"
|
#include "NSString_OOoAdditions.hxx"
|
||||||
|
|
||||||
#define CLASS_NAME "NSString"
|
|
||||||
|
|
||||||
@implementation NSString (OOoAdditions)
|
@implementation NSString (OOoAdditions)
|
||||||
|
|
||||||
+ (id) stringWithOUString:(const rtl::OUString&)ouString
|
+ (id) stringWithOUString:(const rtl::OUString&)ouString
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "ouString", ouString);
|
|
||||||
|
|
||||||
NSString *string = [[NSString alloc] initWithCharacters:reinterpret_cast<unichar const *>(ouString.getStr()) length:ouString.getLength()];
|
NSString *string = [[NSString alloc] initWithCharacters:reinterpret_cast<unichar const *>(ouString.getStr()) length:ouString.getLength()];
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__, string);
|
|
||||||
return [string autorelease];
|
return [string autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -51,9 +51,6 @@
|
|||||||
|
|
||||||
#pragma mark DEFINES
|
#pragma mark DEFINES
|
||||||
|
|
||||||
#define CLASS_NAME "SalAquaFilePicker"
|
|
||||||
|
|
||||||
|
|
||||||
// namespace directives
|
// namespace directives
|
||||||
|
|
||||||
|
|
||||||
@@ -91,24 +88,16 @@ SalAquaFilePicker::SalAquaFilePicker()
|
|||||||
: SalAquaFilePicker_Base( m_rbHelperMtx )
|
: SalAquaFilePicker_Base( m_rbHelperMtx )
|
||||||
, m_pFilterHelper( nullptr )
|
, m_pFilterHelper( nullptr )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
m_pDelegate = [[AquaFilePickerDelegate alloc] initWithFilePicker:this];
|
m_pDelegate = [[AquaFilePickerDelegate alloc] initWithFilePicker:this];
|
||||||
m_pControlHelper->setFilePickerDelegate(m_pDelegate);
|
m_pControlHelper->setFilePickerDelegate(m_pDelegate);
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SalAquaFilePicker::~SalAquaFilePicker()
|
SalAquaFilePicker::~SalAquaFilePicker()
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
if (nullptr != m_pFilterHelper)
|
if (nullptr != m_pFilterHelper)
|
||||||
delete m_pFilterHelper;
|
delete m_pFilterHelper;
|
||||||
|
|
||||||
[m_pDelegate release];
|
[m_pDelegate release];
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -120,23 +109,15 @@ SalAquaFilePicker::~SalAquaFilePicker()
|
|||||||
void SAL_CALL SalAquaFilePicker::addFilePickerListener( const uno::Reference<XFilePickerListener>& xListener )
|
void SAL_CALL SalAquaFilePicker::addFilePickerListener( const uno::Reference<XFilePickerListener>& xListener )
|
||||||
throw( uno::RuntimeException )
|
throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
m_xListener = xListener;
|
m_xListener = xListener;
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL SalAquaFilePicker::removeFilePickerListener( const uno::Reference<XFilePickerListener>& )
|
void SAL_CALL SalAquaFilePicker::removeFilePickerListener( const uno::Reference<XFilePickerListener>& )
|
||||||
throw( uno::RuntimeException )
|
throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
m_xListener.clear();
|
m_xListener.clear();
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark XAsynchronousExecutableDialog
|
#pragma mark XAsynchronousExecutableDialog
|
||||||
@@ -145,18 +126,12 @@ void SAL_CALL SalAquaFilePicker::removeFilePickerListener( const uno::Reference<
|
|||||||
|
|
||||||
void SAL_CALL SalAquaFilePicker::setTitle( const rtl::OUString& aTitle ) throw( uno::RuntimeException )
|
void SAL_CALL SalAquaFilePicker::setTitle( const rtl::OUString& aTitle ) throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "title", aTitle);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
implsetTitle(aTitle);
|
implsetTitle(aTitle);
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Int16 SAL_CALL SalAquaFilePicker::execute() throw( uno::RuntimeException )
|
sal_Int16 SAL_CALL SalAquaFilePicker::execute() throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
sal_Int16 retVal = 0;
|
sal_Int16 retVal = 0;
|
||||||
@@ -242,8 +217,6 @@ sal_Int16 SAL_CALL SalAquaFilePicker::execute() throw( uno::RuntimeException )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__, retVal);
|
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,72 +226,52 @@ sal_Int16 SAL_CALL SalAquaFilePicker::execute() throw( uno::RuntimeException )
|
|||||||
// XFilePicker functions
|
// XFilePicker functions
|
||||||
|
|
||||||
|
|
||||||
void SAL_CALL SalAquaFilePicker::setMultiSelectionMode( sal_Bool bMode ) throw( uno::RuntimeException )
|
void SAL_CALL SalAquaFilePicker::setMultiSelectionMode( sal_Bool /* bMode */ ) throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "multiSelectable?", int(bMode));
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
if (m_nDialogType == NAVIGATIONSERVICES_OPEN) {
|
if (m_nDialogType == NAVIGATIONSERVICES_OPEN) {
|
||||||
[(NSOpenPanel*)m_pDialog setAllowsMultipleSelection:YES];
|
[(NSOpenPanel*)m_pDialog setAllowsMultipleSelection:YES];
|
||||||
OSL_TRACE("dialog allows multi-selection? %d", [(NSOpenPanel*)m_pDialog allowsMultipleSelection]);
|
OSL_TRACE("dialog allows multi-selection? %d", [(NSOpenPanel*)m_pDialog allowsMultipleSelection]);
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL SalAquaFilePicker::setDefaultName( const rtl::OUString& aName )
|
void SAL_CALL SalAquaFilePicker::setDefaultName( const rtl::OUString& aName )
|
||||||
throw( uno::RuntimeException )
|
throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "name", aName);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
m_sSaveFileName = aName;
|
m_sSaveFileName = aName;
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL SalAquaFilePicker::setDisplayDirectory( const rtl::OUString& rDirectory )
|
void SAL_CALL SalAquaFilePicker::setDisplayDirectory( const rtl::OUString& rDirectory )
|
||||||
throw( lang::IllegalArgumentException, uno::RuntimeException )
|
throw( lang::IllegalArgumentException, uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "directory", rDirectory);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
implsetDisplayDirectory(rDirectory);
|
implsetDisplayDirectory(rDirectory);
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rtl::OUString SAL_CALL SalAquaFilePicker::getDisplayDirectory() throw( uno::RuntimeException )
|
rtl::OUString SAL_CALL SalAquaFilePicker::getDisplayDirectory() throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
rtl::OUString retVal = implgetDisplayDirectory();
|
rtl::OUString retVal = implgetDisplayDirectory();
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__, retVal);
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
uno::Sequence<rtl::OUString> SAL_CALL SalAquaFilePicker::getFiles() throw( uno::RuntimeException )
|
uno::Sequence<rtl::OUString> SAL_CALL SalAquaFilePicker::getFiles() throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
uno::Sequence< rtl::OUString > aSelectedFiles = getSelectedFiles();
|
uno::Sequence< rtl::OUString > aSelectedFiles = getSelectedFiles();
|
||||||
// multiselection doesn't really work with getFiles
|
// multiselection doesn't really work with getFiles
|
||||||
// so just retrieve the first url
|
// so just retrieve the first url
|
||||||
if (aSelectedFiles.getLength() > 1)
|
if (aSelectedFiles.getLength() > 1)
|
||||||
aSelectedFiles.realloc(1);
|
aSelectedFiles.realloc(1);
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
return aSelectedFiles;
|
return aSelectedFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
uno::Sequence<rtl::OUString> SAL_CALL SalAquaFilePicker::getSelectedFiles() throw( uno::RuntimeException, std::exception )
|
uno::Sequence<rtl::OUString> SAL_CALL SalAquaFilePicker::getSelectedFiles() throw( uno::RuntimeException, std::exception )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
#if HAVE_FEATURE_MACOSX_SANDBOX
|
#if HAVE_FEATURE_MACOSX_SANDBOX
|
||||||
@@ -382,7 +335,6 @@ uno::Sequence<rtl::OUString> SAL_CALL SalAquaFilePicker::getSelectedFiles() thro
|
|||||||
OSL_TRACE("Returned file in getFiles: \"%s\".", OUStringToOString(sFileOrDirURL, RTL_TEXTENCODING_UTF8).getStr());
|
OSL_TRACE("Returned file in getFiles: \"%s\".", OUStringToOString(sFileOrDirURL, RTL_TEXTENCODING_UTF8).getStr());
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
return aSelectedFiles;
|
return aSelectedFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -394,21 +346,16 @@ uno::Sequence<rtl::OUString> SAL_CALL SalAquaFilePicker::getSelectedFiles() thro
|
|||||||
void SAL_CALL SalAquaFilePicker::appendFilter( const rtl::OUString& aTitle, const rtl::OUString& aFilter )
|
void SAL_CALL SalAquaFilePicker::appendFilter( const rtl::OUString& aTitle, const rtl::OUString& aFilter )
|
||||||
throw( lang::IllegalArgumentException, uno::RuntimeException )
|
throw( lang::IllegalArgumentException, uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
ensureFilterHelper();
|
ensureFilterHelper();
|
||||||
m_pFilterHelper->appendFilter( aTitle, aFilter );
|
m_pFilterHelper->appendFilter( aTitle, aFilter );
|
||||||
m_pControlHelper->setFilterControlNeeded(true);
|
m_pControlHelper->setFilterControlNeeded(true);
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL SalAquaFilePicker::setCurrentFilter( const rtl::OUString& aTitle )
|
void SAL_CALL SalAquaFilePicker::setCurrentFilter( const rtl::OUString& aTitle )
|
||||||
throw( lang::IllegalArgumentException, uno::RuntimeException )
|
throw( lang::IllegalArgumentException, uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
OSL_TRACE( "Setting current filter to %s",
|
OSL_TRACE( "Setting current filter to %s",
|
||||||
OUStringToOString( aTitle, RTL_TEXTENCODING_UTF8 ).getStr() );
|
OUStringToOString( aTitle, RTL_TEXTENCODING_UTF8 ).getStr() );
|
||||||
|
|
||||||
@@ -419,18 +366,14 @@ throw( lang::IllegalArgumentException, uno::RuntimeException )
|
|||||||
updateFilterUI();
|
updateFilterUI();
|
||||||
|
|
||||||
updateSaveFileNameExtension();
|
updateSaveFileNameExtension();
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rtl::OUString SAL_CALL SalAquaFilePicker::getCurrentFilter() throw( uno::RuntimeException )
|
rtl::OUString SAL_CALL SalAquaFilePicker::getCurrentFilter() throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
ensureFilterHelper();
|
ensureFilterHelper();
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
return m_pFilterHelper->getCurrentFilter();
|
return m_pFilterHelper->getCurrentFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -442,13 +385,11 @@ rtl::OUString SAL_CALL SalAquaFilePicker::getCurrentFilter() throw( uno::Runtime
|
|||||||
void SAL_CALL SalAquaFilePicker::appendFilterGroup( const rtl::OUString& sGroupTitle, const uno::Sequence<beans::StringPair>& aFilters )
|
void SAL_CALL SalAquaFilePicker::appendFilterGroup( const rtl::OUString& sGroupTitle, const uno::Sequence<beans::StringPair>& aFilters )
|
||||||
throw( lang::IllegalArgumentException, uno::RuntimeException )
|
throw( lang::IllegalArgumentException, uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
ensureFilterHelper();
|
ensureFilterHelper();
|
||||||
m_pFilterHelper->appendFilterGroup(sGroupTitle, aFilters);
|
m_pFilterHelper->appendFilterGroup(sGroupTitle, aFilters);
|
||||||
m_pControlHelper->setFilterControlNeeded(true);
|
m_pControlHelper->setFilterControlNeeded(true);
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark XFilePickerControlAccess
|
#pragma mark XFilePickerControlAccess
|
||||||
@@ -459,8 +400,6 @@ throw( lang::IllegalArgumentException, uno::RuntimeException )
|
|||||||
void SAL_CALL SalAquaFilePicker::setValue( sal_Int16 nControlId, sal_Int16 nControlAction, const uno::Any& rValue )
|
void SAL_CALL SalAquaFilePicker::setValue( sal_Int16 nControlId, sal_Int16 nControlAction, const uno::Any& rValue )
|
||||||
throw( uno::RuntimeException )
|
throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
m_pControlHelper->setValue(nControlId, nControlAction, rValue);
|
m_pControlHelper->setValue(nControlId, nControlAction, rValue);
|
||||||
@@ -468,50 +407,34 @@ throw( uno::RuntimeException )
|
|||||||
if (nControlId == ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION && m_nDialogType == NAVIGATIONSERVICES_SAVE) {
|
if (nControlId == ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION && m_nDialogType == NAVIGATIONSERVICES_SAVE) {
|
||||||
updateSaveFileNameExtension();
|
updateSaveFileNameExtension();
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uno::Any SAL_CALL SalAquaFilePicker::getValue( sal_Int16 nControlId, sal_Int16 nControlAction )
|
uno::Any SAL_CALL SalAquaFilePicker::getValue( sal_Int16 nControlId, sal_Int16 nControlAction )
|
||||||
throw( uno::RuntimeException )
|
throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
uno::Any aValue = m_pControlHelper->getValue(nControlId, nControlAction);
|
uno::Any aValue = m_pControlHelper->getValue(nControlId, nControlAction);
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
return aValue;
|
return aValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL SalAquaFilePicker::enableControl( sal_Int16 nControlId, sal_Bool bEnable )
|
void SAL_CALL SalAquaFilePicker::enableControl( sal_Int16 nControlId, sal_Bool bEnable )
|
||||||
throw( uno::RuntimeException )
|
throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
m_pControlHelper->enableControl(nControlId, bEnable);
|
m_pControlHelper->enableControl(nControlId, bEnable);
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL SalAquaFilePicker::setLabel( sal_Int16 nControlId, const ::rtl::OUString& aLabel )
|
void SAL_CALL SalAquaFilePicker::setLabel( sal_Int16 nControlId, const ::rtl::OUString& aLabel )
|
||||||
throw( uno::RuntimeException )
|
throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
NSString* sLabel = [NSString stringWithOUString:aLabel];
|
NSString* sLabel = [NSString stringWithOUString:aLabel];
|
||||||
m_pControlHelper->setLabel( nControlId, sLabel ) ;
|
m_pControlHelper->setLabel( nControlId, sLabel ) ;
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rtl::OUString SAL_CALL SalAquaFilePicker::getLabel( sal_Int16 nControlId )
|
rtl::OUString SAL_CALL SalAquaFilePicker::getLabel( sal_Int16 nControlId )
|
||||||
throw( uno::RuntimeException )
|
throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
return m_pControlHelper->getLabel(nControlId);
|
return m_pControlHelper->getLabel(nControlId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -523,8 +446,6 @@ throw( uno::RuntimeException )
|
|||||||
void SAL_CALL SalAquaFilePicker::initialize( const uno::Sequence<uno::Any>& aArguments )
|
void SAL_CALL SalAquaFilePicker::initialize( const uno::Sequence<uno::Any>& aArguments )
|
||||||
throw( uno::Exception, uno::RuntimeException )
|
throw( uno::Exception, uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "arguments size", aArguments.getLength());
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
// parameter checking
|
// parameter checking
|
||||||
@@ -598,8 +519,6 @@ throw( uno::Exception, uno::RuntimeException )
|
|||||||
m_pControlHelper->initialize(templateId);
|
m_pControlHelper->initialize(templateId);
|
||||||
|
|
||||||
implInitialize();
|
implInitialize();
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark XCancellable
|
#pragma mark XCancellable
|
||||||
@@ -609,15 +528,11 @@ throw( uno::Exception, uno::RuntimeException )
|
|||||||
|
|
||||||
void SAL_CALL SalAquaFilePicker::cancel() throw( uno::RuntimeException )
|
void SAL_CALL SalAquaFilePicker::cancel() throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
if (m_pDialog != nil) {
|
if (m_pDialog != nil) {
|
||||||
[m_pDialog cancel:nil];
|
[m_pDialog cancel:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark XEventListener
|
#pragma mark XEventListener
|
||||||
@@ -627,16 +542,12 @@ void SAL_CALL SalAquaFilePicker::cancel() throw( uno::RuntimeException )
|
|||||||
|
|
||||||
void SAL_CALL SalAquaFilePicker::disposing( const lang::EventObject& aEvent ) throw( uno::RuntimeException )
|
void SAL_CALL SalAquaFilePicker::disposing( const lang::EventObject& aEvent ) throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
uno::Reference<XFilePickerListener> xFilePickerListener( aEvent.Source, css::uno::UNO_QUERY );
|
uno::Reference<XFilePickerListener> xFilePickerListener( aEvent.Source, css::uno::UNO_QUERY );
|
||||||
|
|
||||||
if( xFilePickerListener.is() )
|
if( xFilePickerListener.is() )
|
||||||
removeFilePickerListener( xFilePickerListener );
|
removeFilePickerListener( xFilePickerListener );
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark XServiceInfo
|
#pragma mark XServiceInfo
|
||||||
@@ -647,12 +558,8 @@ void SAL_CALL SalAquaFilePicker::disposing( const lang::EventObject& aEvent ) th
|
|||||||
rtl::OUString SAL_CALL SalAquaFilePicker::getImplementationName()
|
rtl::OUString SAL_CALL SalAquaFilePicker::getImplementationName()
|
||||||
throw( uno::RuntimeException )
|
throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
rtl::OUString retVal( FILE_PICKER_IMPL_NAME );
|
rtl::OUString retVal( FILE_PICKER_IMPL_NAME );
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__, retVal);
|
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -665,9 +572,6 @@ throw( uno::RuntimeException )
|
|||||||
uno::Sequence<rtl::OUString> SAL_CALL SalAquaFilePicker::getSupportedServiceNames()
|
uno::Sequence<rtl::OUString> SAL_CALL SalAquaFilePicker::getSupportedServiceNames()
|
||||||
throw( uno::RuntimeException )
|
throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
return FilePicker_getSupportedServiceNames();
|
return FilePicker_getSupportedServiceNames();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -707,9 +611,8 @@ void SAL_CALL SalAquaFilePicker::dialogSizeChanged()
|
|||||||
|
|
||||||
// Misc
|
// Misc
|
||||||
|
|
||||||
void SalAquaFilePicker::ensureFilterHelper() {
|
void SalAquaFilePicker::ensureFilterHelper()
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
{
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
if (nullptr == m_pFilterHelper) {
|
if (nullptr == m_pFilterHelper) {
|
||||||
@@ -717,31 +620,21 @@ void SalAquaFilePicker::ensureFilterHelper() {
|
|||||||
m_pControlHelper->setFilterHelper(m_pFilterHelper);
|
m_pControlHelper->setFilterHelper(m_pFilterHelper);
|
||||||
[m_pDelegate setFilterHelper:m_pFilterHelper];
|
[m_pDelegate setFilterHelper:m_pFilterHelper];
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SalAquaFilePicker::implInitialize()
|
void SalAquaFilePicker::implInitialize()
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
//call super
|
//call super
|
||||||
SalAquaPicker::implInitialize();
|
SalAquaPicker::implInitialize();
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SalAquaFilePicker::updateFilterUI() {
|
void SalAquaFilePicker::updateFilterUI()
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
{
|
||||||
|
|
||||||
m_pControlHelper->updateFilterUI();
|
m_pControlHelper->updateFilterUI();
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SalAquaFilePicker::updateSaveFileNameExtension() {
|
void SalAquaFilePicker::updateSaveFileNameExtension()
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
{
|
||||||
|
|
||||||
if (m_nDialogType != NAVIGATIONSERVICES_SAVE) {
|
if (m_nDialogType != NAVIGATIONSERVICES_SAVE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -770,13 +663,10 @@ void SalAquaFilePicker::updateSaveFileNameExtension() {
|
|||||||
OSL_TRACE("disallowing other file types");
|
OSL_TRACE("disallowing other file types");
|
||||||
[m_pDialog setAllowsOtherFileTypes:NO];
|
[m_pDialog setAllowsOtherFileTypes:NO];
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SalAquaFilePicker::filterControlChanged() {
|
void SalAquaFilePicker::filterControlChanged()
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
{
|
||||||
|
|
||||||
if (m_pDialog == nil) {
|
if (m_pDialog == nil) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -790,8 +680,6 @@ void SalAquaFilePicker::filterControlChanged() {
|
|||||||
FilePickerEvent evt;
|
FilePickerEvent evt;
|
||||||
evt.ElementId = LISTBOX_FILTER;
|
evt.ElementId = LISTBOX_FILTER;
|
||||||
controlStateChanged( evt );
|
controlStateChanged( evt );
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -42,8 +42,6 @@
|
|||||||
#include "NSURL_OOoAdditions.hxx"
|
#include "NSURL_OOoAdditions.hxx"
|
||||||
|
|
||||||
#pragma mark DEFINES
|
#pragma mark DEFINES
|
||||||
#define CLASS_NAME "SalAquaFolderPicker"
|
|
||||||
|
|
||||||
|
|
||||||
// namespace directives
|
// namespace directives
|
||||||
|
|
||||||
@@ -75,11 +73,7 @@ namespace
|
|||||||
SalAquaFolderPicker::SalAquaFolderPicker( const uno::Reference<lang::XMultiServiceFactory>& xServiceMgr ) :
|
SalAquaFolderPicker::SalAquaFolderPicker( const uno::Reference<lang::XMultiServiceFactory>& xServiceMgr ) :
|
||||||
m_xServiceMgr( xServiceMgr )
|
m_xServiceMgr( xServiceMgr )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
m_nDialogType = NAVIGATIONSERVICES_DIRECTORY;
|
m_nDialogType = NAVIGATIONSERVICES_DIRECTORY;
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -88,19 +82,13 @@ SalAquaFolderPicker::SalAquaFolderPicker( const uno::Reference<lang::XMultiServi
|
|||||||
|
|
||||||
void SAL_CALL SalAquaFolderPicker::setTitle( const rtl::OUString& aTitle ) throw( uno::RuntimeException )
|
void SAL_CALL SalAquaFolderPicker::setTitle( const rtl::OUString& aTitle ) throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "title", aTitle);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
implsetTitle(aTitle);
|
implsetTitle(aTitle);
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Int16 SAL_CALL SalAquaFolderPicker::execute() throw( uno::RuntimeException )
|
sal_Int16 SAL_CALL SalAquaFolderPicker::execute() throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
sal_Int16 retVal = 0;
|
sal_Int16 retVal = 0;
|
||||||
@@ -132,7 +120,6 @@ sal_Int16 SAL_CALL SalAquaFolderPicker::execute() throw( uno::RuntimeException )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,32 +130,22 @@ sal_Int16 SAL_CALL SalAquaFolderPicker::execute() throw( uno::RuntimeException )
|
|||||||
void SAL_CALL SalAquaFolderPicker::setDisplayDirectory( const rtl::OUString& aDirectory )
|
void SAL_CALL SalAquaFolderPicker::setDisplayDirectory( const rtl::OUString& aDirectory )
|
||||||
throw( lang::IllegalArgumentException, uno::RuntimeException )
|
throw( lang::IllegalArgumentException, uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "directory", aDirectory);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
implsetDisplayDirectory(aDirectory);
|
implsetDisplayDirectory(aDirectory);
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rtl::OUString SAL_CALL SalAquaFolderPicker::getDisplayDirectory() throw( uno::RuntimeException )
|
rtl::OUString SAL_CALL SalAquaFolderPicker::getDisplayDirectory() throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
OUString aDirectory = implgetDisplayDirectory();
|
OUString aDirectory = implgetDisplayDirectory();
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__, aDirectory);
|
|
||||||
|
|
||||||
return aDirectory;
|
return aDirectory;
|
||||||
}
|
}
|
||||||
|
|
||||||
rtl::OUString SAL_CALL SalAquaFolderPicker::getDirectory() throw( uno::RuntimeException )
|
rtl::OUString SAL_CALL SalAquaFolderPicker::getDirectory() throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
NSArray *files = nil;
|
NSArray *files = nil;
|
||||||
@@ -194,18 +171,13 @@ rtl::OUString SAL_CALL SalAquaFolderPicker::getDirectory() throw( uno::RuntimeEx
|
|||||||
|
|
||||||
OSL_TRACE("dir url: %s", OUStringToOString(aDirectory, RTL_TEXTENCODING_UTF8).getStr());
|
OSL_TRACE("dir url: %s", OUStringToOString(aDirectory, RTL_TEXTENCODING_UTF8).getStr());
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
return aDirectory;
|
return aDirectory;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL SalAquaFolderPicker::setDescription( const rtl::OUString& rDescription )
|
void SAL_CALL SalAquaFolderPicker::setDescription( const rtl::OUString& rDescription )
|
||||||
throw( uno::RuntimeException )
|
throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "description", rDescription);
|
|
||||||
|
|
||||||
[m_pDialog setMessage:[NSString stringWithOUString:rDescription]];
|
[m_pDialog setMessage:[NSString stringWithOUString:rDescription]];
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -215,12 +187,8 @@ void SAL_CALL SalAquaFolderPicker::setDescription( const rtl::OUString& rDescrip
|
|||||||
rtl::OUString SAL_CALL SalAquaFolderPicker::getImplementationName()
|
rtl::OUString SAL_CALL SalAquaFolderPicker::getImplementationName()
|
||||||
throw( uno::RuntimeException )
|
throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
rtl::OUString retVal( FOLDER_PICKER_IMPL_NAME );
|
rtl::OUString retVal( FOLDER_PICKER_IMPL_NAME );
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__, retVal);
|
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -233,9 +201,6 @@ sal_Bool SAL_CALL SalAquaFolderPicker::supportsService( const rtl::OUString& sSe
|
|||||||
uno::Sequence<rtl::OUString> SAL_CALL SalAquaFolderPicker::getSupportedServiceNames()
|
uno::Sequence<rtl::OUString> SAL_CALL SalAquaFolderPicker::getSupportedServiceNames()
|
||||||
throw( uno::RuntimeException )
|
throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
return FolderPicker_getSupportedServiceNames();
|
return FolderPicker_getSupportedServiceNames();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,13 +210,9 @@ uno::Sequence<rtl::OUString> SAL_CALL SalAquaFolderPicker::getSupportedServiceNa
|
|||||||
|
|
||||||
void SAL_CALL SalAquaFolderPicker::cancel() throw( uno::RuntimeException )
|
void SAL_CALL SalAquaFolderPicker::cancel() throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
[m_pDialog cancel:nil];
|
[m_pDialog cancel:nil];
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -261,8 +222,6 @@ void SAL_CALL SalAquaFolderPicker::cancel() throw( uno::RuntimeException )
|
|||||||
void SAL_CALL SalAquaFolderPicker::disposing( const lang::EventObject& )
|
void SAL_CALL SalAquaFolderPicker::disposing( const lang::EventObject& )
|
||||||
throw( uno::RuntimeException )
|
throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -39,7 +39,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#pragma mark DEFINES
|
#pragma mark DEFINES
|
||||||
#define CLASS_NAME "SalAquaPicker"
|
|
||||||
#define kSetHideExtensionStateKey @"NSNavLastUserSetHideExtensionButtonState"
|
#define kSetHideExtensionStateKey @"NSNavLastUserSetHideExtensionButtonState"
|
||||||
|
|
||||||
|
|
||||||
@@ -55,14 +54,10 @@ SalAquaPicker::SalAquaPicker()
|
|||||||
: m_pDialog(nullptr)
|
: m_pDialog(nullptr)
|
||||||
, m_pControlHelper(new ControlHelper())
|
, m_pControlHelper(new ControlHelper())
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SalAquaPicker::~SalAquaPicker()
|
SalAquaPicker::~SalAquaPicker()
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
@@ -74,14 +69,10 @@ SalAquaPicker::~SalAquaPicker()
|
|||||||
[m_pDialog release];
|
[m_pDialog release];
|
||||||
|
|
||||||
[pool release];
|
[pool release];
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL SalAquaPicker::implInitialize()
|
void SAL_CALL SalAquaPicker::implInitialize()
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
if (m_pDialog != nil) {
|
if (m_pDialog != nil) {
|
||||||
@@ -140,14 +131,10 @@ void SAL_CALL SalAquaPicker::implInitialize()
|
|||||||
//Retain the dialog instance or it will go away immediately
|
//Retain the dialog instance or it will go away immediately
|
||||||
[m_pDialog retain];
|
[m_pDialog retain];
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int SalAquaPicker::run()
|
int SalAquaPicker::run()
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
@@ -197,7 +184,6 @@ int SalAquaPicker::run()
|
|||||||
implsetDisplayDirectory([pDir OUStringForInfo:FULLPATH]);
|
implsetDisplayDirectory([pDir OUStringForInfo:FULLPATH]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__, retVal);
|
|
||||||
|
|
||||||
[pool release];
|
[pool release];
|
||||||
|
|
||||||
@@ -206,49 +192,35 @@ int SalAquaPicker::run()
|
|||||||
|
|
||||||
int SalAquaPicker::runandwaitforresult()
|
int SalAquaPicker::runandwaitforresult()
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
int status = this->run();
|
int status = this->run();
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__, status);
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL SalAquaPicker::implsetDisplayDirectory( const rtl::OUString& aDirectory )
|
void SAL_CALL SalAquaPicker::implsetDisplayDirectory( const rtl::OUString& aDirectory )
|
||||||
throw( lang::IllegalArgumentException, uno::RuntimeException )
|
throw( lang::IllegalArgumentException, uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "directory", aDirectory);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
if (aDirectory != m_sDisplayDirectory) {
|
if (aDirectory != m_sDisplayDirectory) {
|
||||||
m_sDisplayDirectory = aDirectory;
|
m_sDisplayDirectory = aDirectory;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rtl::OUString SAL_CALL SalAquaPicker::implgetDisplayDirectory() throw( uno::RuntimeException )
|
rtl::OUString SAL_CALL SalAquaPicker::implgetDisplayDirectory() throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__, m_sDisplayDirectory);
|
|
||||||
|
|
||||||
return m_sDisplayDirectory;
|
return m_sDisplayDirectory;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL SalAquaPicker::implsetTitle( const rtl::OUString& aTitle ) throw( uno::RuntimeException )
|
void SAL_CALL SalAquaPicker::implsetTitle( const rtl::OUString& aTitle ) throw( uno::RuntimeException )
|
||||||
{
|
{
|
||||||
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "title", aTitle);
|
|
||||||
|
|
||||||
SolarMutexGuard aGuard;
|
SolarMutexGuard aGuard;
|
||||||
|
|
||||||
if (m_pDialog != nil) {
|
if (m_pDialog != nil) {
|
||||||
[m_pDialog setTitle:[NSString stringWithOUString:aTitle]];
|
[m_pDialog setTitle:[NSString stringWithOUString:aTitle]];
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_PRINT_EXIT(CLASS_NAME, __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
Reference in New Issue
Block a user