summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comphelper/source/misc/uieventslogger.cxx30
-rw-r--r--extensions/source/logging/filehandler.cxx11
-rw-r--r--extensions/source/logging/logger.cxx2
-rw-r--r--framework/source/uifactory/windowcontentfactorymanager.cxx7
-rw-r--r--setup_native/prj/build.lst2
-rwxr-xr-xsetup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx3
-rw-r--r--sfx2/source/dialog/dockwin.cxx3
-rw-r--r--solenv/bin/modules/SourceConfig.pm2
-rw-r--r--solenv/inc/minor.mk6
-rw-r--r--solenv/inc/unitools.mk2
-rw-r--r--svx/prj/build.lst2
-rw-r--r--svx/source/cui/optimprove2.cxx8
-rw-r--r--sw/source/core/txtnode/fntcache.cxx6
-rwxr-xr-xtestautomation/framework/optional/includes/basic_package_export.inc209
-rwxr-xr-xtestautomation/framework/optional/includes/extras_file_open.inc67
-rwxr-xr-xtestautomation/framework/optional/includes/filedlg_autocomplete.inc56
-rwxr-xr-xtestautomation/framework/optional/includes/filedlg_cjk_files.inc30
-rwxr-xr-xtestautomation/framework/optional/includes/filedlg_filternames.inc10
-rwxr-xr-xtestautomation/framework/optional/includes/filedlg_multiselection.inc3
-rwxr-xr-xtestautomation/framework/optional/includes/filedlg_reserved_names_unix.inc4
-rwxr-xr-xtestautomation/framework/optional/includes/security_macrosecurity.inc17
-rwxr-xr-xtestautomation/framework/tools/includes/fileoperations.inc53
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx51
-rw-r--r--vcl/unx/inc/plugins/gtk/gtkframe.hxx2
24 files changed, 351 insertions, 235 deletions
diff --git a/comphelper/source/misc/uieventslogger.cxx b/comphelper/source/misc/uieventslogger.cxx
index ae351340bc7a..b88abff17f4a 100644
--- a/comphelper/source/misc/uieventslogger.cxx
+++ b/comphelper/source/misc/uieventslogger.cxx
@@ -383,6 +383,16 @@ namespace comphelper
logdata[3] = URL_FILE;
else
logdata[3] = url.Main;
+ OSL_TRACE("UiEventsLogger Logging: %s,%s,%s,%s,%s,%s,%s,%s",
+ OUStringToOString(logdata[0],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[1],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[2],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[3],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[4],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[5],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[6],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[7],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[8],RTL_TEXTENCODING_UTF8).getStr());
m_Logger->log(LogLevel::INFO, m_Formatter->formatMultiColumn(logdata));
m_SessionLogEventCount++;
}
@@ -391,6 +401,16 @@ namespace comphelper
{
Sequence<OUString> logdata = Sequence<OUString>(COLUMNS);
logdata[0] = ETYPE_ROTATED;
+ OSL_TRACE("UiEventsLogger Logging: %s,%s,%s,%s,%s,%s,%s,%s",
+ OUStringToOString(logdata[0],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[1],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[2],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[3],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[4],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[5],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[6],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[7],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[8],RTL_TEXTENCODING_UTF8).getStr());
m_Logger->log(LogLevel::INFO, m_Formatter->formatMultiColumn(logdata));
}
@@ -412,6 +432,16 @@ namespace comphelper
logdata[6] = id;
logdata[7] = method;
logdata[8] = param;
+ OSL_TRACE("UiEventsLogger Logging: %s,%s,%s,%s,%s,%s,%s,%s",
+ OUStringToOString(logdata[0],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[1],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[2],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[3],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[4],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[5],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[6],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[7],RTL_TEXTENCODING_UTF8).getStr(),
+ OUStringToOString(logdata[8],RTL_TEXTENCODING_UTF8).getStr());
m_Logger->log(LogLevel::INFO, m_Formatter->formatMultiColumn(logdata));
m_SessionLogEventCount++;
}
diff --git a/extensions/source/logging/filehandler.cxx b/extensions/source/logging/filehandler.cxx
index 97d6d7524290..e04ea8faf0be 100644
--- a/extensions/source/logging/filehandler.cxx
+++ b/extensions/source/logging/filehandler.cxx
@@ -328,7 +328,16 @@ namespace logging
void SAL_CALL FileHandler::flush( ) throw (RuntimeException)
{
MethodGuard aGuard( *this );
- // nothing to do, our ::osl::File implementation is not buffered
+ if(!m_pFile.get())
+ {
+ OSL_PRECOND(false, "FileHandler::flush: no file!");
+ return;
+ }
+ #if OSL_DEBUG_LEVEL > 0
+ ::osl::FileBase::RC res =
+ #endif
+ m_pFile->sync();
+ OSL_ENSURE(res == ::osl::FileBase::E_None, "FileHandler::flush: Could not sync logfile to filesystem.");
}
//--------------------------------------------------------------------
diff --git a/extensions/source/logging/logger.cxx b/extensions/source/logging/logger.cxx
index 69ae5fced483..66e0eb540ef0 100644
--- a/extensions/source/logging/logger.cxx
+++ b/extensions/source/logging/logger.cxx
@@ -230,6 +230,8 @@ namespace logging
m_aHandlers.forEach< XLogHandler >(
::boost::bind( &XLogHandler::publish, _1, ::boost::cref( _rRecord ) ) );
+ m_aHandlers.forEach< XLogHandler >(
+ ::boost::bind( &XLogHandler::flush, _1 ) );
}
//--------------------------------------------------------------------
diff --git a/framework/source/uifactory/windowcontentfactorymanager.cxx b/framework/source/uifactory/windowcontentfactorymanager.cxx
index fcadc1694e54..239c6aff5c1f 100644
--- a/framework/source/uifactory/windowcontentfactorymanager.cxx
+++ b/framework/source/uifactory/windowcontentfactorymanager.cxx
@@ -220,6 +220,13 @@ throw (uno::Exception, uno::RuntimeException)
// module identifier, user interface element type and name
// SAFE
ResetableGuard aLock( m_aLock );
+
+ if ( !m_bConfigRead )
+ {
+ m_bConfigRead = sal_True;
+ m_pConfigAccess->readConfigurationData();
+ }
+
aImplementationName = m_pConfigAccess->getFactorySpecifierFromTypeNameModule( aType, aName, aModuleId );
if ( aImplementationName.getLength() > 0 )
{
diff --git a/setup_native/prj/build.lst b/setup_native/prj/build.lst
index 8835ff0d6ad2..05200fdf938a 100644
--- a/setup_native/prj/build.lst
+++ b/setup_native/prj/build.lst
@@ -1,4 +1,4 @@
-pk setup_native : transex3 soltools sal xml2cmp NULL
+pk setup_native : l10n transex3 soltools sal xml2cmp NULL
pk setup_native usr1 - all sn_mkout NULL
pk setup_native\scripts\source nmake - u sn_source NULL
pk setup_native\scripts nmake - u sn_scripts sn_source.u NULL
diff --git a/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx b/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx
index 1fe1d2335b88..70c0d9fef1e6 100755
--- a/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx
@@ -257,6 +257,9 @@ extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle )
// When there is no program folder, there could be no running office
if ( dwError == ERROR_FILE_NOT_FOUND )
return ERROR_SUCCESS;
+ if ( dwError == ERROR_PATH_NOT_FOUND )
+ return ERROR_SUCCESS;
+
// The destination folder should never exist, don't know what to do here
if ( dwError == ERROR_ALREADY_EXISTS )
return ERROR_SUCCESS;
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index f31ed1724907..cf7d04ef0875 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -236,7 +236,8 @@ SfxDockingWrapper::SfxDockingWrapper( Window* pParentWnd ,
}
Window* pContentWindow = VCLUnoHelper::GetWindow(xWindow);
- pContentWindow->SetStyle( pContentWindow->GetStyle() | WB_DIALOGCONTROL | WB_CHILDDLGCTRL );
+ if ( pContentWindow )
+ pContentWindow->SetStyle( pContentWindow->GetStyle() | WB_DIALOGCONTROL | WB_CHILDDLGCTRL );
pTitleDockWindow->SetWrappedWindow(pContentWindow);
}
diff --git a/solenv/bin/modules/SourceConfig.pm b/solenv/bin/modules/SourceConfig.pm
index b1005b26d6c7..23d89d882bb8 100644
--- a/solenv/bin/modules/SourceConfig.pm
+++ b/solenv/bin/modules/SourceConfig.pm
@@ -322,7 +322,7 @@ SourceConfig::get_config_file_default_path()
=head1 AUTHOR
-Vladimir Glazunov, vg@openoffice.com
+Vladimir Glazunov, vg@openoffice.org
=head1 SEE ALSO
diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk
index a2bc21bf3116..eb479d4adafb 100644
--- a/solenv/inc/minor.mk
+++ b/solenv/inc/minor.mk
@@ -1,5 +1,5 @@
RSCVERSION=300
-RSCREVISION=300m63(Build:9435)
-BUILD=9435
-LAST_MINOR=m63
+RSCREVISION=300m64(Build:9446)
+BUILD=9446
+LAST_MINOR=m64
SOURCEVERSION=DEV300
diff --git a/solenv/inc/unitools.mk b/solenv/inc/unitools.mk
index 6166161348e6..e76d1e292a62 100644
--- a/solenv/inc/unitools.mk
+++ b/solenv/inc/unitools.mk
@@ -103,7 +103,7 @@ COPYUPDATE=-u
ECHON=echo -n
ECHONL=echo
FIND*=find
-FLIPCMD*=slfl.pl
+FLIPCMD*=$(PERL) $(SOLARENV)/bin/slfl.pl
GNUCOPY*=cp
GNUMAKE*=make
GREP*=grep
diff --git a/svx/prj/build.lst b/svx/prj/build.lst
index 56980702fb2d..2f595a2de9d7 100644
--- a/svx/prj/build.lst
+++ b/svx/prj/build.lst
@@ -22,7 +22,7 @@ sx svx\source\svdraw nmake - all sx_draw sx_inc NULL
sx svx\source\sdr\attribute nmake - all sx_attribute sx_inc NULL
sx svx\source\sdr\primitive2d nmake - all sx_primitive2d sx_inc NULL
sx svx\source\sdr\primitive3d nmake - all sx_primitive3d sx_inc NULL
-sx svx\source\table nmake - all sx_table NULL
+sx svx\source\table nmake - all sx_table sx_inc NULL
sx svx\source\sdr\properties nmake - all sx_properties sx_inc NULL
sx svx\source\sdr\contact nmake - all sx_contact sx_inc NULL
sx svx\source\sdr\event nmake - all sx_event sx_inc NULL
diff --git a/svx/source/cui/optimprove2.cxx b/svx/source/cui/optimprove2.cxx
index 28989080ca0a..b988c7b75bad 100644
--- a/svx/source/cui/optimprove2.cxx
+++ b/svx/source/cui/optimprove2.cxx
@@ -149,7 +149,13 @@ IMPL_LINK( SvxImprovementOptionsPage, HandleShowData, PushButton*, EMPTYARG )
{
::rtl::OUString sLogFile( m_sLogPath );
sLogFile += C2S("/Current.csv");
- uno::Sequence< beans::PropertyValue > aArgs;
+ uno::Sequence< beans::PropertyValue > aArgs(3);
+ aArgs[0].Name = ::rtl::OUString::createFromAscii("FilterName");
+ aArgs[0].Value = uno::makeAny(::rtl::OUString::createFromAscii("Text - txt - csv (StarCalc)"));
+ aArgs[1].Name = ::rtl::OUString::createFromAscii("FilterOptions");
+ aArgs[1].Value = uno::makeAny(::rtl::OUString::createFromAscii("44,34,12,1,"));
+ aArgs[2].Name = ::rtl::OUString::createFromAscii("ReadOnly");
+ aArgs[2].Value = uno::makeAny(true);
uno::Reference< lang::XComponent > xDoc = ::comphelper::SynchronousDispatch::dispatch(
xDesktop, sLogFile, C2S("_default"), 0, aArgs );
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 9952c50e678d..826398ec2ce6 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -2424,8 +2424,12 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
const xub_StrLen nEnd = rInf.GetIdx() + rInf.GetLen();
// skip character cells for complex scripts
- if ( rInf.GetFont() && SW_CTL == rInf.GetFont()->GetActual() &&
+ // --> OD 2009-10-14 #i105571# - skip also character cells for CJK
+ if ( rInf.GetFont() &&
+ ( SW_CTL == rInf.GetFont()->GetActual() ||
+ SW_CJK == rInf.GetFont()->GetActual() ) &&
pBreakIt->GetBreakIter().is() )
+ // <--
{
aLang = rInf.GetFont()->GetLanguage();
bSkipCell = sal_True;
diff --git a/testautomation/framework/optional/includes/basic_package_export.inc b/testautomation/framework/optional/includes/basic_package_export.inc
index f02e60c79a83..19784c25883f 100755
--- a/testautomation/framework/optional/includes/basic_package_export.inc
+++ b/testautomation/framework/optional/includes/basic_package_export.inc
@@ -40,9 +40,7 @@
testcase tBasicPackageExport
' Assumption: All actions take place in the user/work directory
- ' macro taken from framework/tools/input/macros.txt::tBasicLibraryExport
-
- printlog( "Export BASIC libraries as package" )
+ printlog( "Export BASIC libraries as package/extension" )
const PACKAGE_NAME = "tBasicExport.oxt"
const LIBRARY_NAME = "tBasicExport"
@@ -51,14 +49,11 @@ testcase tBasicPackageExport
dim cDocumentName as string
dim cLibraryName as string
-
+
dim iNodeCount as integer
-
dim iCurrentLib as integer
- dim cFile as string
- cFile = hGetWorkPath() & PACKAGE_NAME
-
+ dim cFile as string : cFile = hGetWorkPath() & PACKAGE_NAME
dim cPackageFileName as string
@@ -80,97 +75,123 @@ testcase tBasicPackageExport
printlog( "Select the second document" )
kontext "Makro"
- iNodeCount = hGetNodeCount( MakroAus )
- cDocumentName = hSelectNode( MakroAus, iNodeCount )
+ if ( Makro.exists( 1 ) ) then
+ iNodeCount = hGetNodeCount( MakroAus )
+ cDocumentName = hSelectNode( MakroAus, iNodeCount )
- printlog( "Click <Manage...>" )
- Verwalten.click()
-
- printlog( "Go to the libraries tabpage" )
- hSelectBasicObjectOrganizerTab( 3 )
-
- kontext "TabBibliotheken"
- printlog( "Select the document at pos. " & DOCUMENT_POSITION )
- Bibliothek.select( DOCUMENT_POSITION )
-
- printlog( "Verify that the correct document has been selected" )
- if ( Bibliothek.getSelText() <> cDocumentName ) then
- warnlog( "Incorrect document selected on libraries tab, aborting" )
- goto endsub
- endif
-
- printlog( "Click <New...>" )
- Neu.click()
-
- kontext "NeueBibliothek"
- printlog( "Name the new library: " & LIBRARY_NAME )
- BibliotheksName.setText( LIBRARY_NAME )
- NeueBibliothek.ok()
-
- kontext "TabBibliotheken"
- cLibraryName = BibliotheksListe.getSelText()
- if ( cLibraryName <> LIBRARY_NAME ) then
- warnlog( "The new library is not selected in the libraries list" )
+ printlog( "Click <Manage...>" )
+ Verwalten.click()
+
+ printlog( "Go to the libraries tabpage" )
+ hSelectBasicObjectOrganizerTab( 3 )
+
+ kontext "TabBibliotheken"
+ printlog( "Select the document at pos. " & DOCUMENT_POSITION )
+ Bibliothek.select( DOCUMENT_POSITION )
+
+ printlog( "Verify that the correct document has been selected" )
+ if ( Bibliothek.getSelText() <> cDocumentName ) then
+ warnlog( "Incorrect document selected on libraries tab, aborting test" )
+ goto endsub
+ endif
+
+ printlog( "Click <New...>" )
+ Neu.click()
+
+ kontext "NeueBibliothek"
+ if ( NeueBibliothek.exists( 1 ) ) then
+ printlog( "Name the new library: " & LIBRARY_NAME )
+ BibliotheksName.setText( LIBRARY_NAME )
+ NeueBibliothek.ok()
+ else
+ warnlog( "Dialog <NeueBibliothek> did not open" )
+ goto endsub
+ endif
+
+ kontext "TabBibliotheken"
+ cLibraryName = BibliotheksListe.getSelText()
+ if ( cLibraryName <> LIBRARY_NAME ) then
+ warnlog( "The new library is not selected in the libraries list" )
+ else
+ printlog( "The correct library is selected in the libraries list" )
+ endif
+
+ printlog( "Click <Edit...>" )
+ Bearbeiten.click()
+
+ printlog( "Insert a test macro (something simple, e.g. a messagebox" )
+ hInsertMacroFromFile( LIBRARY_NAME )
+
+ printlog( "Close the BASIC IDE" )
+ hCloseBasicIDE()
else
- printlog( "The correct library is selected in the libraries list" )
+ warnlog( "Dialog <Makro> did not open, aborting test" )
+ goto endsub
endif
- printlog( "Click <Edit...>" )
- Bearbeiten.click()
-
- printlog( "Insert a test macro (something simple, e.g. a messagebox" )
- hInsertMacroFromFile( LIBRARY_NAME )
-
- printlog( "Close the BASIC IDE" )
- hCloseBasicIDE()
-
printlog( "Open the BASIC organizer" )
ToolsMacro_uno
printlog( "Select the work document" )
kontext "Makro"
- iNodeCount = hGetNodeCount( MakroAus )
- hSelectNode( MakroAus, iNodeCount )
-
- printlog( "Manage..." )
- Verwalten.click()
-
- printlog( "Libraries tab" )
- hSelectBasicObjectOrganizerTab( 3 )
-
- kontext "TabBibliotheken"
- Bibliothek.select( DOCUMENT_POSITION )
-
- printlog( "Select the new library" )
- kontext "TabBibliotheken"
- for iCurrentLib = 1 to Bibliotheksliste.getItemCount()
- Bibliotheksliste.select( iCurrentLib )
- if ( Bibliotheksliste.getSelText() = LIBRARY_NAME ) then
- exit for
+ if ( Makro.exists( 1 ) ) then
+ iNodeCount = hGetNodeCount( MakroAus )
+ hSelectNode( MakroAus, iNodeCount )
+
+ printlog( "Manage..." )
+ Verwalten.click()
+
+ printlog( "Libraries tab" )
+ hSelectBasicObjectOrganizerTab( 3 )
+
+ kontext "TabBibliotheken"
+ if ( TabBibliotheken.exists( 1 ) and TabBibliotheken.isVisible() ) then
+ Bibliothek.select( DOCUMENT_POSITION )
+
+ printlog( "Select the new library" )
+ kontext "TabBibliotheken"
+ for iCurrentLib = 1 to Bibliotheksliste.getItemCount()
+ Bibliotheksliste.select( iCurrentLib )
+ if ( Bibliotheksliste.getSelText() = LIBRARY_NAME ) then
+ exit for
+ endif
+ next iCurrentLib
+
+ kontext "TabBibliotheken"
+ printlog( "Export the package, close the document afterwards" )
+ Export.click()
+
+ kontext "ExportBasicLibraryDlg"
+ if ( ExportBasicLibraryDlg.exists( 1 ) ) then
+ printlog( "Select to export as package" )
+ ExportAsPackage.check()
+ ExportBasicLibraryDlg.ok()
+
+ kontext "SpeichernDlg"
+ if ( SpeichernDlg.exists( 1 ) ) then
+ printlog( "Save the file, automatic filename extension must be checked" )
+ DateiName.setText( hGetWorkPath() & LIBRARY_NAME ) ' automatic filename extension/uno-pkg is default
+ Speichern.click()
+ else
+ warnlog( "Dialog <File Save> did not open" )
+ endif
+ else
+ warnlog( "Dialog <Export Basic Library> did not open" )
+ endif
+
+ kontext "TabBibliotheken"
+ printlog( "Close libraires tabpage" )
+ TabBibliotheken.cancel()
+ else
+ warnlog( "Dialog <TabBibliotheken> is not available" )
endif
- next iCurrentLib
-
- kontext "TabBibliotheken"
- printlog( "Export the package, close the document afterwards" )
- Export.click()
-
- kontext "ExportBasicLibraryDlg"
- printlog( "Select to export as package" )
- ExportAsPackage.check()
- ExportBasicLibraryDlg.ok()
-
- kontext "SpeichernDlg"
- printlog( "Save the file, automatic filename extension must be checked" )
- DateiName.setText( hGetWorkPath() & LIBRARY_NAME ) ' automatic filename extension/uno-pkg is default
- Speichern.click()
-
- kontext "TabBibliotheken"
- printlog( "Close libraires tabpage" )
- TabBibliotheken.cancel()
-
- kontext "Makro"
- printlog( "Close BASIC organizer" )
- Makro.cancel()
+
+ kontext "Makro"
+ printlog( "Close BASIC organizer" )
+ Makro.cancel()
+ else
+ warnlog( "Dialog <Makro> did not open" )
+ endif
printlog( "Close all files" )
hFileCloseAll()
@@ -190,17 +211,17 @@ testcase tBasicPackageExport
endif
printlog( "Verify file size" )
- if ( FileLen( cPackageFileName ) <> PACKAGE_SIZE ) then
- warnlog( "#i105719# - The exported test-package has an incorrect file size." )
+' if ( FileLen( cPackageFileName ) <> PACKAGE_SIZE ) then
+' warnlog( "#i105719# - The exported test-package has an incorrect file size." )
if ( FileLen( cPackageFileName ) = 0 ) then
printlog( "File has zero bytes, it is empty." )
else
printlog( "Size is.: " & FileLen( cPackageFileName ) )
printlog( "Expected: " & PACKAGE_SIZE )
endif
- else
- printlog( "File has correct size" )
- endif
+' else
+' printlog( "File has correct size" )
+' endif
endcase
diff --git a/testautomation/framework/optional/includes/extras_file_open.inc b/testautomation/framework/optional/includes/extras_file_open.inc
index dd2f3149100c..62ad0b7e6587 100755
--- a/testautomation/framework/optional/includes/extras_file_open.inc
+++ b/testautomation/framework/optional/includes/extras_file_open.inc
@@ -45,6 +45,8 @@ private const MAX_FILE_COUNT = 3000 ' the max number of templates or samples
testcase tOpenObjectsWithFileDialog( cCategory as string )
+ printlog( "Open templates and samples using the file open dialog" )
+
const CFN = "tOpenObjectsWithFileDialog::"
@@ -75,9 +77,15 @@ testcase tOpenObjectsWithFileDialog( cCategory as string )
cOfficePath = gOfficeBasisPath
else
cOfficePath = mid( gOfficeBasisPath, len( gNetzOfficePath ) + 1 )
+ if ( FileExists( cOfficePath ) ) then
+ printlog( "Using: " & cOfficePath )
+ else
+ warnlog( "Test script error: Invalid Office path: " & cOfficePath )
+ goto endsub
+ endif
endif
- printlog( "Using: " & cOfficePath )
+ printlog( "Build path to templates/samples directory" )
select case cCategory
case "SAMPLES" : sRootPath = cOfficePath & "share\samples\" & gISOLang
sRootPathFallback = "/opt/openoffice.org/basis3.0/share/samples/" & gISOLang
@@ -92,10 +100,10 @@ testcase tOpenObjectsWithFileDialog( cCategory as string )
sRootPath = convertpath( sRootPath )
- if ( dir( sRootPath ) = "" ) then
+ if ( NOT FileExists( sRootPath ) ) then
qaerrorlog( "Root Path does not exist: " & sRootPath )
sRootPath = sRootPathFallback
- if ( dir( sRootPathFallback ) = "" ) then
+ if ( NOT FileExists( sRootPathFallback ) ) then
warnlog( "No usable office root path found. Aborting test" )
goto endsub
printlog( "Using hard coded fallback" )
@@ -104,10 +112,12 @@ testcase tOpenObjectsWithFileDialog( cCategory as string )
printlog( "Using path..: " & sRootPath )
printlog( "Using filter: " & sFilter )
+
+ printlog( "Retrieve filelist from directory" )
GetAllFileList ( sRootPath, sFilter, lsFile() )
hListDelete( lsFile(), 1 )
- ' Remove .lock-files
+ printlog( "Remove posible .lock-files from list" )
iTemplateCount = listCount( lsFile() )
iCurrentTemplate = 1
while( iCurrentTemplate <= iTemplateCount )
@@ -119,7 +129,7 @@ testcase tOpenObjectsWithFileDialog( cCategory as string )
endif
wend
- ' do not test wizard related files
+ printlog( "Remove Wizard related files from list" )
iTemplateCount = listCount( lsFile() )
iCurrentTemplate = 1
while( iCurrentTemplate <= iTemplateCount )
@@ -131,6 +141,7 @@ testcase tOpenObjectsWithFileDialog( cCategory as string )
endif
wend
+ printlog( "Files to be loaded:" )
hListPrint ( lsFile() , "" , "" )
if ( listcount( lsfile() ) = 1 ) then
if ( gProductName = "OpenOffice.org" ) then
@@ -140,6 +151,8 @@ testcase tOpenObjectsWithFileDialog( cCategory as string )
warnlog( "Filelist seems to be incomplete. GetAllFileList() failed!" )
goto endsub
endif
+ else
+ printlog( "List of samples/templates appears to be valid" )
endif
iTemplateCount = listCount( lsFile() )
@@ -151,41 +164,53 @@ testcase tOpenObjectsWithFileDialog( cCategory as string )
' sFileIn holds the file we currently work with
sFileIn = lsFile( iCurrentTemplate )
- brc = hFileOpen( sFileIn )
- brc = hHandleActivesOnLoad( 0 , 2 )
+ printlog( "Load: " & sFileIn )
+ hFileOpen( sFileIn )
+ printlog( "Handle known dialogs" )
+ hHandleActivesOnLoad( 0 , 2 )
+
+ printlog( "Check for Filter Selection dialog" )
Kontext "FilterAuswahl"
if ( FilterAuswahl.exists( 1 ) ) then
warnlog( "Loading failed, ASCII filter dialog present" )
FilterAuswahl.cancel()
- while( getDocumentCount > 0 )
- hDestroyDocument()
- wend
+ hFileCloseAll()
else
- brc = hCloseNavigator()
+ printlog( "Close navigator, if open" )
+ hCloseNavigator()
- ' Build the filename
sFileOut = cCategory & "_" & iCurrentTemplate
sFileOut = convertpath( sPathOut & sFileOut )
-
- brc = hFileSaveAsKill( sFileOut )
+
+ printlog( "Saving file to: " & sFileOut )
+ hFileSaveAsKill( sFileOut )
' note: this is delayed, because the dialogs take time to pop up
' even while the dialog is visible, we can work with the doc.
- brc = hHandleInitialDialogs()
+ printlog( "Handle known dialogs" )
+ hHandleInitialDialogs()
- brc = hDestroyDocument()
+ printlog( "Close document" )
+ hDestroyDocument()
- brc = hFileOpen( sFileOut )
- brc = hHandleActivesOnLoad( 0 , 2 )
- brc = hCloseNavigator()
+ printlog( "Load document again" )
+ hFileOpen( sFileOut )
+
+ printlog( "Handle known dialogs" )
+ hHandleActivesOnLoad( 0 , 2 )
+
+ printlog( "Close navigator, if open" )
+ hCloseNavigator()
- brc = hDestroyDocument()
+ printlog( "Close document" )
+ hDestroyDocument()
endif
- brc = hDeleteFile( sFileOut )
+ printlog( "Delete file" )
+ hDeleteFile( sFileOut )
next iCurrentTemplate
diff --git a/testautomation/framework/optional/includes/filedlg_autocomplete.inc b/testautomation/framework/optional/includes/filedlg_autocomplete.inc
index 264685d85594..94d0db418196 100755
--- a/testautomation/framework/optional/includes/filedlg_autocomplete.inc
+++ b/testautomation/framework/optional/includes/filedlg_autocomplete.inc
@@ -39,17 +39,18 @@
testcase tAutocomplete
-
+ printlog( "Autocompletion in the OpenOffice.org file picker" )
' IMPORTANT NOTE: Autocompletion is asynchronous. This means that no rule
' exists when exactly it is going to strike. If you are
' using a networked environment you have to make sure that
' all network ressources deliver a decent performance as
' this seriously influences the speed of the autocompletion.
-
- dim cBasePath as string
-
+
+ ' Assemble a work directory path
const WORKDIR = "autocomplete"
+ dim cBasePath as string : cBasePath = hGetWorkPath()
+ dim cWorkDir as string : cWorkDir = cBasePath & WORKDIR
' These are the files we create in the users homedirectory
dim aWorkFile( 3 ) as string
@@ -65,7 +66,6 @@ testcase tAutocomplete
aWildCard( 1 ) = "autocomplete_?.odt"
aWildCard( 2 ) = "autocomplete_b?.odt"
aWildCard( 3 ) = "autocomplete_*.odt"
-
dim cCurrentPath as string
dim cAutocomplete as string
@@ -80,41 +80,46 @@ testcase tAutocomplete
dim slot
- do while( getDocumentCount > 0 )
- call hCloseDocument()
- loop
-
- cBasePath = hGetWorkPath()
- aFullPath( 1 ) = cBasePath & WORKDIR & gPathSigne & aWorkFile( 1 )
- aFullPath( 2 ) = cBasePath & WORKDIR & gPathSigne & aWorkFile( 2 )
- aFullPath( 3 ) = cBasePath & WORKDIR & gPathSigne & aWorkFile( 3 )
+ printlog( "Close all open documents" )
+ hFileCloseAll()
+
+ printlog( "Assemble 3 filenames for workfiles" )
+ aFullPath( 1 ) = cWorkDir & gPathSigne & aWorkFile( 1 )
+ aFullPath( 2 ) = cWorkDir & gPathSigne & aWorkFile( 2 )
+ aFullPath( 3 ) = cWorkDir & gPathSigne & aWorkFile( 3 )
+
+ printlog( "Delete the 3 workfiles if they exist" )
hDeleteFile( aFullPath( 1 ) )
hDeleteFile( aFullPath( 2 ) )
hDeleteFile( aFullPath( 3 ) )
+
+ printlog( "Try to remove conflicting work directories" )
if ( dir( cBasePath & WORKDIR ) <> "" ) then
- rmdir( cBasePath & WORKDIR )
+ rmdir( cWorkDir )
endif
- mkdir( cBasePath & WORKDIR )
- if ( dir( cBasePath & WORKDIR ) = "" ) then
+ printlog( "Create workdirectory: " & cWorkDir )
+ mkdir( cWorkDir )
+ if ( NOT FileExists( cWorkDir ) ) then
warnlog( "Failed to create work directory, aborting" )
goto endsub
endif
gApplication = "WRITER"
+ printlog( "Create the workfiles - 3 writer files with minimum content" )
for iCurrentDocument = 1 to 3
- call hNewDocument()
+ call hCreateDocument()
kontext "DocumentWriter"
DocumentWriter.typeKeys( aWorkFile( iCurrentDocument ) )
hFileSaveAs( aFullPath( iCurrentDocument ) )
- FileClose
+ hUseAsyncSlot( "FileClose" )
next iCurrentDocument
-
- printlog( "open the File Open dialog" )
- FileOpen
-
+ printlog( "Open the File Open dialog" )
+ hUseAsyncSlot( "FileOpen" )
+
kontext "OeffnenDlg"
+ printlog( "Click the <Standard> button to get to the default work directory" )
Standard.click()
cLeft = left( WORKDIR, iLeft )
@@ -131,7 +136,7 @@ testcase tAutocomplete
printlog( "Autocompletion succeeded for workdirectory" )
else
warnlog( "Autocompletion failed" )
- printlog( "Expected: " & cRight )
+ printlog( "Expected: " & cEFString )
printlog( "Found...: " & cAutocomplete )
endif
@@ -149,7 +154,7 @@ testcase tAutocomplete
printlog( "Autocompletion succeeded for first file" )
else
warnlog( "Autocompletion failed" )
- printlog( "Expected: " & cRight )
+ printlog( "Expected: " & cEFString )
printlog( "Found...: " & cAutocomplete )
endif
@@ -162,7 +167,7 @@ testcase tAutocomplete
printlog( "Autocompletion succeeded for second file" )
else
warnlog( "Autocompletion failed" )
- printlog( "Expected: " & cRight )
+ printlog( "Expected: " & cEFString )
printlog( "Found...: " & cAutocomplete )
endif
@@ -198,6 +203,7 @@ testcase tAutocomplete
kontext "OeffnenDlg"
OeffnenDlg.cancel()
+ printlog( "Delete workfiles and -directory" )
hDeleteFile( aFullPath( 1 ) )
hDeleteFile( aFullPath( 2 ) )
hDeleteFile( aFullPath( 3 ) )
diff --git a/testautomation/framework/optional/includes/filedlg_cjk_files.inc b/testautomation/framework/optional/includes/filedlg_cjk_files.inc
index 0c69736f1558..f616c6d4567a 100755
--- a/testautomation/framework/optional/includes/filedlg_cjk_files.inc
+++ b/testautomation/framework/optional/includes/filedlg_cjk_files.inc
@@ -39,27 +39,21 @@
testcase tSaveLoadDelFilesCJK()
+ printlog( "Save, load and delete files from the hight UTF-8 characters list" )
+
if ( not hTestLocale() ) then
- warnlog( "Test requires UTF-8 locale" )
- goto endsub
+ qaerrorlog( "Could not verify UTF-8 locale. Make sure an UTF-8 locale is used!" )
endif
-
dim cStrangeName as string
dim iCounter as integer ' iterator
- dim iRandom as long ' random number.(needs long for cjk chars)
+ dim iRandom as long ' random number
dim brc as boolean
- printlog( CHR$(13) )
- printlog( "Check if CJK-filenames are loaded/saved/deleted" )
- printlog( CHR$(13) )
-
- printlog( CHR$(13) + "Names with CJK-chars" )
- printlog( "" )
-
- ' Invoke randomizer
+ printlog( "Invoke randomizer" )
call randomize()
+ printlog( "Generate filenames, run tests" )
for iCounter = 1 to 2
iRandom = int( 19968 + ( 20911 * rnd ) )
@@ -67,10 +61,10 @@ testcase tSaveLoadDelFilesCJK()
printlog( " * Using decimal char: " & iRandom )
cStrangeName = hNameGen_append( iRandom )
- brc = hSaveLoadDelSuccess( cStrangeName )
+ hSaveLoadDelSuccess( cStrangeName )
cStrangeName = hNameGen_lead( iRandom )
- brc = hSaveLoadDelSuccess( cStrangeName )
+ hSaveLoadDelSuccess( cStrangeName )
kontext "active"
if( active.exists() ) then
@@ -78,17 +72,17 @@ testcase tSaveLoadDelFilesCJK()
printlog( active.gettext() )
active.ok()
endif
-
+
+ printlog( "Delete the file" )
hDeleteFile( hGetWorkPath() & cStrangeName )
+ printlog( "Close navigator, if it exists" )
hCloseNavigator()
-
next iCounter
printlog( "Close the document" )
- brc = hDestroyDocument()
-
+ hDestroyDocument()
endcase
diff --git a/testautomation/framework/optional/includes/filedlg_filternames.inc b/testautomation/framework/optional/includes/filedlg_filternames.inc
index ce0b7231b5c5..e524f40d955f 100755
--- a/testautomation/framework/optional/includes/filedlg_filternames.inc
+++ b/testautomation/framework/optional/includes/filedlg_filternames.inc
@@ -39,6 +39,7 @@
testcase tVerifyFilterNames
+ printlog( "Verify filternames listed in the file open dialog" )
if ( gIsoLang <> "en-US" ) then
qaerrorlog( "No testing for non-US languages" )
@@ -77,12 +78,14 @@ testcase tVerifyFilterNames
dim cFileOut as string
cFileOut = hGetWorkPath() & cFile
-
+ printlog( "Create a new document" )
hCreateDocument()
+ printlog( "Open the File Open dialog" )
FileOpen
Kontext "OeffnenDlg"
+ printlog( "Read the filterlist (en_US only), compare against a reference" )
if ( OeffnenDlg.exists( 1 ) ) then
iFilterCount = DateiTyp.getItemCount()
@@ -101,7 +104,7 @@ testcase tVerifyFilterNames
try
asFilterNames( iCurrentItem ) = DateiTyp.getItemText( iCurrentItem )
catch
- printlog( "Test broke at pos: " & iCurrentItem )
+ printlog( "Problem encountered at pos: " & iCurrentItem )
endcatch
next iCurrentItem
@@ -113,7 +116,8 @@ testcase tVerifyFilterNames
else
warnlog( "File Open dialog not present." )
endif
-
+
+ printlog( "Close the document" )
hDestroyDocument()
if ( iErr <> 0 ) then
diff --git a/testautomation/framework/optional/includes/filedlg_multiselection.inc b/testautomation/framework/optional/includes/filedlg_multiselection.inc
index d95ae9e1a8b0..00deab80b27c 100755
--- a/testautomation/framework/optional/includes/filedlg_multiselection.inc
+++ b/testautomation/framework/optional/includes/filedlg_multiselection.inc
@@ -157,7 +157,8 @@ testcase tFiledlgMultiselection1()
wend
if ( iCurrentTime > 120000 ) then
- warnlog( "#i105289# Slow loading of files, should be less than 120 seconds on all platforms" )
+ 'Closed issue: qaerrorlog( "#i105289# Slow loading of files, should be less than 120 seconds on all platforms" )
+ printlog( "Slow file loading (exceeds 120 seconds)" )
endif
lWait = getSystemTicks - lTime ' time diff
diff --git a/testautomation/framework/optional/includes/filedlg_reserved_names_unix.inc b/testautomation/framework/optional/includes/filedlg_reserved_names_unix.inc
index a414101cfa4b..e84eff3f328f 100755
--- a/testautomation/framework/optional/includes/filedlg_reserved_names_unix.inc
+++ b/testautomation/framework/optional/includes/filedlg_reserved_names_unix.inc
@@ -39,9 +39,10 @@
testcase tSaveReservedNamesUNIX()
+ printlog( "Names that are reserved on WINDOWS but are OK on UNIX" )
if ( gPlatGroup = "w95" ) then
- printlog( "Test not relevant for Unix(like)"
+ printlog( "Test not relevant for Windows/DOS family of OSes" )
goto endsub
endif
@@ -53,7 +54,6 @@ testcase tSaveReservedNamesUNIX()
printlog( "" )
printlog( "Document Type is: " & hNumericDocType( iCurrentDocType ) )
- printlog( "Names that are reserved on WINDOWS but are OK on UNIX" )
irc = hSaveLoadDelSuccess( "NUL" , true )
if ( irc <> 0 ) then warnlog( "failed" )
diff --git a/testautomation/framework/optional/includes/security_macrosecurity.inc b/testautomation/framework/optional/includes/security_macrosecurity.inc
index 4c69aa062c45..c9083ff5229e 100755
--- a/testautomation/framework/optional/includes/security_macrosecurity.inc
+++ b/testautomation/framework/optional/includes/security_macrosecurity.inc
@@ -56,6 +56,7 @@ end sub
testcase tMacroSecurityLevels( cFileFormat )
+ printlog( "Check macro execution behavior for all macro security levels" )
dim cWorkFile as string
cWorkFile = gTesttoolPath & "framework\optional\input\BasicDocs\"
@@ -80,18 +81,23 @@ testcase tMacroSecurityLevels( cFileFormat )
' |---------------------------------------------------------|
' *) Covered by test "f_sec_trusted_path.bas"
+ printlog( "Load a document with macro for each of the four security levels" )
for iSecLevel = 0 to 3
- printlog( "" )
+ printlog( "Set macro security level to " & iSecLevel )
hSetMacroSecurityAPI( iSecLevel )
- FileOpen( "URL", cWorkFile, "FrameName", "_default" )
+
+ printlog( "Load document..." )
+ hFileOpen( cWorkFile )
+
+ printlog( "Check security level dependent behavior" )
select case iSecLevel
case 0 : brc = hIdentifyExecutedMacro()
if ( not brc ) then
if ( gApplication = "MATH" ) then
qaerrorlog( "#i68291# Math document forgets eventbinding" )
else
- qaerrorlog( "#i53711# Macro was not found/executed" )
+ warnlog( "#i53711# Macro was not found/executed" )
endif
endif
@@ -104,8 +110,7 @@ testcase tMacroSecurityLevels( cFileFormat )
if ( gApplication = "MATH" ) then
qaerrorlog( "#i68291# Math document forgets eventbinding" )
else
- qaerrorlog( "#i53711# Macro was not found/executed" )
- 'warnlog( "#i65885# - CWS Warnings01/Macro not executed on load" )
+ warnlog( "#i53711# Macro was not found/executed" )
endif
endif
@@ -125,10 +130,12 @@ testcase tMacroSecurityLevels( cFileFormat )
endif
end select
+ printlog( "Close document" )
brc = hDestroyDocument()
next iSecLevel
+ printlog( "Reset security level to default" )
hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_DEFAULT )
endcase
diff --git a/testautomation/framework/tools/includes/fileoperations.inc b/testautomation/framework/tools/includes/fileoperations.inc
index 3f2078c24c92..d4abf557afe8 100755
--- a/testautomation/framework/tools/includes/fileoperations.inc
+++ b/testautomation/framework/tools/includes/fileoperations.inc
@@ -62,8 +62,7 @@ function hSaveLoadDelSuccess( cFile as string ) as integer
'///<ul>
dim brc as boolean
- dim cFileExt as string
- cFileExt = cFile & hGetSuffix( "current" )
+ dim cFileExt as string : cFileExt = cFile & hGetSuffix( "current" )
const CFN = "hSaveLoadDelSuccess::"
@@ -160,14 +159,13 @@ function hLoadFileExpectSuccess( fpath as string ) as boolean
'///<u>Description</u>:
'///<ul>
- dim brc as boolean
- brc = true
+ dim brc as boolean : brc = true
const CFN = "hLoadFileExpectSuccess::"
printlog( CFN & "Enter with option: " & fpath )
'///+<li>Click FileOpen (or use the menu)</li>
- FileOpen
+ hUseAsyncSlot( "FileOpen" )
'///+<li>Enter the filename (with extension)</li>
'printlog( " - Type the filepath/name into the entryfield" )
@@ -232,13 +230,12 @@ function hLoadFileExpectFailure( fpath as string ) as boolean
const CFN = "hLoadFileExpectFailure::"
- dim brc as boolean
- brc = true
+ dim brc as boolean : brc = true
printlog( CFN & "Enter with option: " & fpath )
'///+<li>Click FileOpen</li>
- FileOpen
+ hUseAsyncSlot( "FileOpen" )
Kontext "OeffnenDLG"
'///+<li>Enter filepath</li>
@@ -321,24 +318,21 @@ function hSaveFileExpectSuccess( fpath as string , bReplace as boolean ) as bool
'///<ul>
const CFN = "hSaveFileExpectSuccess::"
- dim brc as boolean
- brc = true
+ dim brc as boolean : brc = true
dim iDocumentCount as integer
printlog( CFN & "Enter with options: " & fpath & ", " & bReplace )
'///+<li>Make sure we start from the backing window</li>
- do while ( getDocumentCount > 0 )
- hCloseDocument()
- loop
+ hFileCloseAll()
'///+<li>Open a new document</li>
hCreateDocument()
'///+<li>Click &quot;Save As...&quot;</li>
- FileSaveAs
+ hUseAsyncSlot( "FileSaveAs" )
Kontext "SpeichernDlg"
if ( SpeichernDlg.exists( 1 ) ) then
@@ -429,8 +423,7 @@ function hSaveFileExpectFailure( fpath as string , errortype as integer ) as boo
' This sequence tries to save a document with an invalid name. The errormsg
' is closed, the filedialog cancelled and the file closed.
- dim brc as boolean
- brc = false
+ dim brc as boolean : brc = false
dim cMsg as string
@@ -442,7 +435,7 @@ function hSaveFileExpectFailure( fpath as string , errortype as integer ) as boo
'///+<li>Click &quot;Save As;&quot;</li>
printlog( "" )
printlog( CFN & "Enter with options: " & fpath & ", " & errortype )
- FileSaveAs
+ hUseAsyncSlot( "FileSaveAs" )
'///+<li>Enter the filename</li>
kontext "SpeichernDlg"
@@ -549,14 +542,13 @@ function hCreateDirectoryExpectSuccess( dirname as string ) as boolean
'///<u>Description</u>:
'///<ul>
- dim brc as boolean
- brc = true
+ dim brc as boolean : brc = true
const CFN = "hCreateDirectoryExpectSuccess::"
printlog( CFN & "Enter with option: " & dirname )
'///+<li>Click &quot;File Open&quot;</li>
- FileOpen
+ hUseAsyncSlot( "FileOpen" )
'///+<li>Click on &quot;New folder&quot;</li>
Kontext "OeffnenDlg"
@@ -646,7 +638,7 @@ function hDeleteFileViaFileOpen( cFile as String ) as boolean
endif
'///+<li>Click &quot;File Open&quot;</li>
- FileOpen
+ hUseAsyncSlot( "FileOpen" )
'///+<li>Look for the requested file, get the position from the filelist</li>
Kontext "OeffnenDLG"
@@ -725,14 +717,16 @@ function hGetFileCountViaFileOpen() as integer
'///<ul>
'///+<li>Click &quot;File open&quot;</li>
- FileOpen
+ hUseAsyncSlot( "FileOpen" )
'///+<li>Retrieve the number of items in the filepicker window</li>
Kontext "OeffnenDLG"
- hGetFileCountViaFileOpen() = DateiAuswahl.getItemCount()
-
- '///+<li>Close &quot;File Open&quot;</li>
- OeffnenDLG.cancel()
+ if ( OeffnenDlg.exists( 2 ) ) then
+ hGetFileCountViaFileOpen() = DateiAuswahl.getItemCount()
+ OeffnenDLG.cancel()
+ else
+ hGetFileCountViaFileOpen() = -1
+ endif
'///</ul>
end function
@@ -871,10 +865,9 @@ function hFindFileObjectViaFileOpen( cName as string ) as integer
dim iCurrentObject as integer
dim cCurrentName as string
dim iFileOpenItemCount as integer
- dim iPos as integer
- iPos = 0
- dim cPath as string
- cPath = cName
+
+ dim iPos as integer : iPos = 0
+ dim cPath as string : cPath = cName
dim iPathItems as integer
dim asPathList( 100 ) as string
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 8963ac2e3643..eff7319d6efc 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -70,9 +70,9 @@
#ifdef ENABLE_DBUS
#include <dbus/dbus-glib.h>
-#define GSS_DBUS_SERVICE "org.gnome.ScreenSaver"
-#define GSS_DBUS_PATH "/org/gnome/ScreenSaver"
-#define GSS_DBUS_INTERFACE "org.gnome.ScreenSaver"
+#define GSM_DBUS_SERVICE "org.gnome.SessionManager"
+#define GSM_DBUS_PATH "/org/gnome/SessionManager"
+#define GSM_DBUS_INTERFACE "org.gnome.SessionManager"
#endif
// make compile on gtk older than 2.10
@@ -565,7 +565,7 @@ void GtkSalFrame::InitCommon()
m_pIMHandler = NULL;
m_hBackgroundPixmap = None;
m_nSavedScreenSaverTimeout = 0;
- m_nGSSCookie = 0;
+ m_nGSMCookie = 0;
m_nExtStyle = 0;
m_pRegion = NULL;
m_ePointerStyle = 0xffff;
@@ -1904,8 +1904,9 @@ void GtkSalFrame::setAutoLock( bool bLock )
#ifdef ENABLE_DBUS
/** cookie is returned as an unsigned integer */
static guint
-dbus_inhibit_gss (const gchar *appname,
- const gchar *reason)
+dbus_inhibit_gsm (const gchar *appname,
+ const gchar *reason,
+ guint xid)
{
gboolean res;
guint cookie;
@@ -1921,20 +1922,22 @@ dbus_inhibit_gss (const gchar *appname,
return -1;
}
- /* get the proxy with gnome-screensaver */
+ /* get the proxy with gnome-session-manager */
proxy = dbus_g_proxy_new_for_name (session_connection,
- GSS_DBUS_SERVICE,
- GSS_DBUS_PATH,
- GSS_DBUS_INTERFACE);
+ GSM_DBUS_SERVICE,
+ GSM_DBUS_PATH,
+ GSM_DBUS_INTERFACE);
if (proxy == NULL) {
- g_warning ("Could not get DBUS proxy: %s", GSS_DBUS_SERVICE);
+ g_warning ("Could not get DBUS proxy: %s", GSM_DBUS_SERVICE);
return -1;
}
res = dbus_g_proxy_call (proxy,
"Inhibit", &error,
G_TYPE_STRING, appname,
+ G_TYPE_UINT, xid,
G_TYPE_STRING, reason,
+ G_TYPE_UINT, 8, //Inhibit the session being marked as idle
G_TYPE_INVALID,
G_TYPE_UINT, &cookie,
G_TYPE_INVALID);
@@ -1957,15 +1960,14 @@ dbus_inhibit_gss (const gchar *appname,
}
static void
-dbus_uninhibit_gss (guint cookie)
+dbus_uninhibit_gsm (guint cookie)
{
gboolean res;
GError *error = NULL;
DBusGProxy *proxy = NULL;
DBusGConnection *session_connection = NULL;
- /* cookies have to be positive as unsigned */
- if (cookie < 0) {
+ if (cookie == guint(-1)) {
g_warning ("Invalid cookie");
return;
}
@@ -1978,18 +1980,18 @@ dbus_uninhibit_gss (guint cookie)
return;
}
- /* get the proxy with gnome-screensaver */
+ /* get the proxy with gnome-session-manager */
proxy = dbus_g_proxy_new_for_name (session_connection,
- GSS_DBUS_SERVICE,
- GSS_DBUS_PATH,
- GSS_DBUS_INTERFACE);
+ GSM_DBUS_SERVICE,
+ GSM_DBUS_PATH,
+ GSM_DBUS_INTERFACE);
if (proxy == NULL) {
- g_warning ("Could not get DBUS proxy: %s", GSS_DBUS_SERVICE);
+ g_warning ("Could not get DBUS proxy: %s", GSM_DBUS_SERVICE);
return;
}
res = dbus_g_proxy_call (proxy,
- "UnInhibit",
+ "Uninhibit",
&error,
G_TYPE_UINT, cookie,
G_TYPE_INVALID,
@@ -1997,12 +1999,12 @@ dbus_uninhibit_gss (guint cookie)
/* check the return value */
if (! res) {
- g_warning ("UnInhibit method failed");
+ g_warning ("Uninhibit method failed");
}
/* check the error value */
if (error != NULL) {
- g_warning ("Inhibit problem : %s", error->message);
+ g_warning ("Uninhibit problem : %s", error->message);
g_error_free (error);
cookie = -1;
}
@@ -2030,7 +2032,8 @@ void GtkSalFrame::StartPresentation( BOOL bStart )
bPreferBlanking, bAllowExposures );
}
#ifdef ENABLE_DBUS
- m_nGSSCookie = dbus_inhibit_gss(g_get_application_name(), "presentation");
+ m_nGSMCookie = dbus_inhibit_gsm(g_get_application_name(), "presentation",
+ GDK_WINDOW_XID(m_pWindow->window));
#endif
}
else
@@ -2041,7 +2044,7 @@ void GtkSalFrame::StartPresentation( BOOL bStart )
bAllowExposures );
m_nSavedScreenSaverTimeout = 0;
#ifdef ENABLE_DBUS
- dbus_uninhibit_gss(m_nGSSCookie);
+ dbus_uninhibit_gsm(m_nGSMCookie);
#endif
}
}
diff --git a/vcl/unx/inc/plugins/gtk/gtkframe.hxx b/vcl/unx/inc/plugins/gtk/gtkframe.hxx
index 74394c71e4b2..a8fc6f65d4ee 100644
--- a/vcl/unx/inc/plugins/gtk/gtkframe.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkframe.hxx
@@ -180,7 +180,7 @@ class GtkSalFrame : public SalFrame
GdkVisibilityState m_nVisibility;
PointerStyle m_ePointerStyle;
int m_nSavedScreenSaverTimeout;
- guint m_nGSSCookie;
+ guint m_nGSMCookie;
int m_nWorkArea;
bool m_bFullscreen;
bool m_bSingleAltPress;