summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-03-07 09:43:32 +0200
committerTor Lillqvist <tml@collabora.com>2016-03-07 09:43:32 +0200
commit9ffb33a5f041d2a4d9516ab163d9967afd0404dc (patch)
tree0301cc0a489f346ba9779c9ed13056283569126a /fpicker
parentb5e280fdd0f14f29d54800adff2c0090c35664bf (diff)
Bin overly verbose OSL_TRACEs of questionable usefulness
Change-Id: Ic535aef31c2a8d73f9c496ffdc535494c15d3c12
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/aqua/FilterHelper.mm5
-rw-r--r--fpicker/source/aqua/SalAquaFilePicker.mm33
-rw-r--r--fpicker/source/aqua/SalAquaFolderPicker.mm5
-rw-r--r--fpicker/source/aqua/SalAquaPicker.mm10
4 files changed, 2 insertions, 51 deletions
diff --git a/fpicker/source/aqua/FilterHelper.mm b/fpicker/source/aqua/FilterHelper.mm
index 25f9b8a7edef..ca91f7a95293 100644
--- a/fpicker/source/aqua/FilterHelper.mm
+++ b/fpicker/source/aqua/FilterHelper.mm
@@ -55,9 +55,8 @@ FilterEntry::FilterEntry( const rtl::OUString& _rTitle, const UnoFilterList& _rS
bool FilterEntry::hasSubFilters() const
{
-// OSL_TRACE(">>> FilterEntry::%s", __func__);
bool bReturn = ( 0 < m_aSubFilters.getLength() );
-// OSL_TRACE("<<< FilterEntry::%s retVal: %d", __func__, bReturn);
+
return bReturn;
}
@@ -232,7 +231,6 @@ bool FilterHelper::FilterNameExists( const UnoFilterList& _rGroupedFilters )
void FilterHelper::ensureFilterList( const ::rtl::OUString& _rInitialCurrentFilter )
{
- //OSL_TRACE(">>> FilterHelper::%s", __func__);
if( nullptr == m_pFilterList )
{
m_pFilterList = new FilterList;
@@ -241,7 +239,6 @@ void FilterHelper::ensureFilterList( const ::rtl::OUString& _rInitialCurrentFilt
m_aCurrentFilter = _rInitialCurrentFilter;
OSL_TRACE("ensureFilterList filter:%s", OUStringToOString(m_aCurrentFilter, RTL_TEXTENCODING_UTF8).getStr());
}
- //OSL_TRACE("<<< FilterHelper::%s", __func__);
}
void FilterHelper::SetCurFilter( const rtl::OUString& rFilter )
diff --git a/fpicker/source/aqua/SalAquaFilePicker.mm b/fpicker/source/aqua/SalAquaFilePicker.mm
index 8ac9b6150a73..78ec4f8cf640 100644
--- a/fpicker/source/aqua/SalAquaFilePicker.mm
+++ b/fpicker/source/aqua/SalAquaFilePicker.mm
@@ -165,14 +165,8 @@ sal_Int16 SAL_CALL SalAquaFilePicker::execute() throw( uno::RuntimeException )
if (m_sSaveFileName.getLength() > 0) {
setDefaultName(m_sSaveFileName);
}
- } else {
- OSL_TRACE("no dash present in window title");
}
- } else {
- OSL_TRACE("couldn't get window title");
}
- } else {
- OSL_TRACE("no front window found");
}
}
}
@@ -197,7 +191,6 @@ sal_Int16 SAL_CALL SalAquaFilePicker::execute() throw( uno::RuntimeException )
#else
case NSOKButton:
#endif
- OSL_TRACE("The dialog returned OK");
retVal = ExecutableDialogResults::OK;
break;
@@ -206,7 +199,6 @@ sal_Int16 SAL_CALL SalAquaFilePicker::execute() throw( uno::RuntimeException )
#else
case NSCancelButton:
#endif
- OSL_TRACE("The dialog was cancelled by the user!");
retVal = ExecutableDialogResults::CANCEL;
break;
@@ -232,7 +224,6 @@ void SAL_CALL SalAquaFilePicker::setMultiSelectionMode( sal_Bool /* bMode */ ) t
if (m_nDialogType == NAVIGATIONSERVICES_OPEN) {
[(NSOpenPanel*)m_pDialog setAllowsMultipleSelection:YES];
- OSL_TRACE("dialog allows multi-selection? %d", [(NSOpenPanel*)m_pDialog allowsMultipleSelection]);
}
}
@@ -285,7 +276,6 @@ uno::Sequence<rtl::OUString> SAL_CALL SalAquaFilePicker::getSelectedFiles() thro
}
#endif
- // OSL_TRACE("starting work");
NSArray *files = nil;
if (m_nDialogType == NAVIGATIONSERVICES_OPEN) {
files = [(NSOpenPanel*)m_pDialog URLs];
@@ -325,14 +315,11 @@ uno::Sequence<rtl::OUString> SAL_CALL SalAquaFilePicker::getSelectedFiles() thro
}
#endif
- OSL_TRACE("handling %s", [[url description] UTF8String]);
InfoType info = FULLPATH;
OUString sFileOrDirURL = [url OUStringForInfo:info];
aSelectedFiles[nIndex] = sFileOrDirURL;
-
- OSL_TRACE("Returned file in getFiles: \"%s\".", OUStringToOString(sFileOrDirURL, RTL_TEXTENCODING_UTF8).getStr());
}
return aSelectedFiles;
@@ -356,9 +343,6 @@ throw( lang::IllegalArgumentException, uno::RuntimeException )
void SAL_CALL SalAquaFilePicker::setCurrentFilter( const rtl::OUString& aTitle )
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- OSL_TRACE( "Setting current filter to %s",
- OUStringToOString( aTitle, RTL_TEXTENCODING_UTF8 ).getStr() );
-
SolarMutexGuard aGuard;
ensureFilterHelper();
@@ -468,47 +452,36 @@ throw( uno::Exception, uno::RuntimeException )
{
case FILEOPEN_SIMPLE:
m_nDialogType = NAVIGATIONSERVICES_OPEN;
- OSL_TRACE( "Template: FILEOPEN_SIMPLE" );
break;
case FILESAVE_SIMPLE:
m_nDialogType = NAVIGATIONSERVICES_SAVE;
- OSL_TRACE( "Template: FILESAVE_SIMPLE" );
break;
case FILESAVE_AUTOEXTENSION_PASSWORD:
m_nDialogType = NAVIGATIONSERVICES_SAVE;
- OSL_TRACE( "Template: FILESAVE_AUTOEXTENSION_PASSWORD" );
break;
case FILESAVE_AUTOEXTENSION_PASSWORD_FILTEROPTIONS:
m_nDialogType = NAVIGATIONSERVICES_SAVE;
- OSL_TRACE( "Template: FILESAVE_AUTOEXTENSION_PASSWORD_FILTEROPTIONS" );
break;
case FILESAVE_AUTOEXTENSION_SELECTION:
m_nDialogType = NAVIGATIONSERVICES_SAVE;
- OSL_TRACE( "Template: FILESAVE_AUTOEXTENSION_SELECTION" );
break;
case FILESAVE_AUTOEXTENSION_TEMPLATE:
m_nDialogType = NAVIGATIONSERVICES_SAVE;
- OSL_TRACE( "Template: FILESAVE_AUTOEXTENSION_TEMPLATE" );
break;
case FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE:
m_nDialogType = NAVIGATIONSERVICES_OPEN;
- OSL_TRACE( "Template: FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE" );
break;
case FILEOPEN_PLAY:
m_nDialogType = NAVIGATIONSERVICES_OPEN;
- OSL_TRACE( "Template: FILEOPEN_PLAY" );
break;
case FILEOPEN_READONLY_VERSION:
m_nDialogType = NAVIGATIONSERVICES_OPEN;
- OSL_TRACE( "Template: FILEOPEN_READONLY_VERSION" );
break;
case FILEOPEN_LINK_PREVIEW:
m_nDialogType = NAVIGATIONSERVICES_OPEN;
- OSL_TRACE( "Template: FILEOPEN_LINK_PREVIEW" );
break;
case FILESAVE_AUTOEXTENSION:
m_nDialogType = NAVIGATIONSERVICES_SAVE;
- OSL_TRACE( "Template: FILESAVE_AUTOEXTENSION" );
break;
default:
throw lang::IllegalArgumentException("Unknown template",
@@ -582,28 +555,24 @@ throw( uno::RuntimeException )
void SAL_CALL SalAquaFilePicker::fileSelectionChanged( FilePickerEvent aEvent )
{
- OSL_TRACE( "file selection changed");
if (m_xListener.is())
m_xListener->fileSelectionChanged( aEvent );
}
void SAL_CALL SalAquaFilePicker::directoryChanged( FilePickerEvent aEvent )
{
- OSL_TRACE("directory changed");
if (m_xListener.is())
m_xListener->directoryChanged( aEvent );
}
void SAL_CALL SalAquaFilePicker::controlStateChanged( FilePickerEvent aEvent )
{
- OSL_TRACE("control state changed");
if (m_xListener.is())
m_xListener->controlStateChanged( aEvent );
}
void SAL_CALL SalAquaFilePicker::dialogSizeChanged()
{
- OSL_TRACE("dialog size changed");
if (m_xListener.is())
m_xListener->dialogSizeChanged();
}
@@ -645,7 +614,6 @@ void SalAquaFilePicker::updateSaveFileNameExtension()
SolarMutexGuard aGuard;
if (!m_pControlHelper->isAutoExtensionEnabled()) {
- OSL_TRACE("allowing other file types");
[m_pDialog setAllowedFileTypes:nil];
[m_pDialog setAllowsOtherFileTypes:YES];
} else {
@@ -660,7 +628,6 @@ void SalAquaFilePicker::updateSaveFileNameExtension()
[m_pDialog setAllowedFileTypes:[NSArray arrayWithObjects:requiredFileType, nil]];
- OSL_TRACE("disallowing other file types");
[m_pDialog setAllowsOtherFileTypes:NO];
}
}
diff --git a/fpicker/source/aqua/SalAquaFolderPicker.mm b/fpicker/source/aqua/SalAquaFolderPicker.mm
index ef5246ca55ae..72f27c79911d 100644
--- a/fpicker/source/aqua/SalAquaFolderPicker.mm
+++ b/fpicker/source/aqua/SalAquaFolderPicker.mm
@@ -102,7 +102,6 @@ sal_Int16 SAL_CALL SalAquaFolderPicker::execute() throw( uno::RuntimeException )
#else
case NSOKButton:
#endif
- OSL_TRACE("Dialog returned with OK");
retVal = ExecutableDialogResults::OK;
break;
@@ -111,7 +110,6 @@ sal_Int16 SAL_CALL SalAquaFolderPicker::execute() throw( uno::RuntimeException )
#else
case NSCancelButton:
#endif
- OSL_TRACE("Dialog was cancelled!");
retVal = ExecutableDialogResults::CANCEL;
break;
@@ -163,14 +161,11 @@ rtl::OUString SAL_CALL SalAquaFolderPicker::getDirectory() throw( uno::RuntimeEx
rtl::OUString aDirectory;
NSURL *url = [files objectAtIndex:0];
- OSL_TRACE("handling %s", [[url description] UTF8String]);
aDirectory = [url OUStringForInfo:FULLPATH];
implsetDisplayDirectory(aDirectory);
- OSL_TRACE("dir url: %s", OUStringToOString(aDirectory, RTL_TEXTENCODING_UTF8).getStr());
-
return aDirectory;
}
diff --git a/fpicker/source/aqua/SalAquaPicker.mm b/fpicker/source/aqua/SalAquaPicker.mm
index f97795a4af97..a7757f94b81c 100644
--- a/fpicker/source/aqua/SalAquaPicker.mm
+++ b/fpicker/source/aqua/SalAquaPicker.mm
@@ -82,14 +82,12 @@ void SAL_CALL SalAquaPicker::implInitialize()
switch (m_nDialogType)
{
case NAVIGATIONSERVICES_OPEN:
- OSL_TRACE("NAVIGATIONSERVICES_OPEN");
m_pDialog = [NSOpenPanel openPanel];
[(NSOpenPanel*)m_pDialog setCanChooseDirectories:NO];
[(NSOpenPanel*)m_pDialog setCanChooseFiles:YES];
break;
case NAVIGATIONSERVICES_SAVE:
- OSL_TRACE("NAVIGATIONSERVICES_SAVE");
m_pDialog = [NSSavePanel savePanel];
[(NSSavePanel*)m_pDialog setCanSelectHiddenExtension:NO]; //changed for issue #102102
/* I would have loved to use
@@ -105,28 +103,22 @@ void SAL_CALL SalAquaPicker::implInitialize()
NSUserDefaults *pDefaults = [NSUserDefaults standardUserDefaults];
NSNumber *pExtn = [pDefaults objectForKey:kSetHideExtensionStateKey];
if(pExtn == nil || [pExtn boolValue] == NO) {
- OSL_TRACE("Hiding extension");
[pDefaults setBool:YES forKey:kSetHideExtensionStateKey];
}
}
break;
case NAVIGATIONSERVICES_DIRECTORY:
- OSL_TRACE("NAVIGATIONSERVICES_DIRECTORY");
m_pDialog = [NSOpenPanel openPanel];
[(NSOpenPanel*)m_pDialog setCanChooseDirectories:YES];
[(NSOpenPanel*)m_pDialog setCanChooseFiles:NO];
break;
default:
- OSL_TRACE("m_nDialogType is UNKNOWN: %d", m_nDialogType);
break;
}
- if (m_pDialog == nil) {
- OSL_TRACE("An error occurred while creating the dialog!");
- }
- else {
+ if (m_pDialog != nil) {
[(NSOpenPanel*)m_pDialog setCanCreateDirectories:YES];
//Retain the dialog instance or it will go away immediately
[m_pDialog retain];