diff options
Diffstat (limited to 'extensions')
114 files changed, 319 insertions, 731 deletions
diff --git a/extensions/inc/ucbhelper/ext_content.hxx b/extensions/inc/ucbhelper/ext_content.hxx index 69d4a016eecb..99736f7b764e 100644 --- a/extensions/inc/ucbhelper/ext_content.hxx +++ b/extensions/inc/ucbhelper/ext_content.hxx @@ -52,9 +52,10 @@ using namespace com::sun::star::uno; using namespace com::sun::star::beans; using namespace com::sun::star::lang; using namespace std; -using namespace rtl; using namespace osl; +using ::rtl::OUString; + template <class Type> class safe_list : public osl::Mutex, public std::list< Type > {}; diff --git a/extensions/source/abpilot/abpservices.cxx b/extensions/source/abpilot/abpservices.cxx index 9f07a1aabb6b..1f52f1aeef24 100644 --- a/extensions/source/abpilot/abpservices.cxx +++ b/extensions/source/abpilot/abpservices.cxx @@ -81,7 +81,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( } catch (InvalidRegistryException& ) { - OSL_ASSERT("abp::component_writeInfo: could not create a registry key (InvalidRegistryException) !"); + OSL_FAIL("abp::component_writeInfo: could not create a registry key (InvalidRegistryException) !"); } return sal_False; diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx index 13ddcf175909..826657b2a283 100644 --- a/extensions/source/abpilot/abspilot.cxx +++ b/extensions/source/abpilot/abspilot.cxx @@ -319,7 +319,7 @@ namespace abp case AST_EVOLUTION_GROUPWISE: case AST_EVOLUTION_LDAP : pGuess = "Personal"; break; default: - DBG_ERROR( "OAddessBookSourcePilot::implDefaultTableName: unhandled case!" ); + OSL_FAIL( "OAddessBookSourcePilot::implDefaultTableName: unhandled case!" ); return; } const ::rtl::OUString sGuess = ::rtl::OUString::createFromAscii( pGuess ); @@ -398,7 +398,7 @@ namespace abp break; case AST_INVALID: - DBG_ERROR( "OAddessBookSourcePilot::implCreateDataSource: illegal data source type!" ); + OSL_FAIL( "OAddessBookSourcePilot::implCreateDataSource: illegal data source type!" ); break; } m_eNewDataSourceType = m_aSettings.eType; @@ -437,7 +437,7 @@ namespace abp return new FinalPage( this ); default: - DBG_ERROR("OAddessBookSourcePilot::createPage: invalid state!"); + OSL_FAIL("OAddessBookSourcePilot::createPage: invalid state!"); return NULL; } } diff --git a/extensions/source/abpilot/admininvokationimpl.cxx b/extensions/source/abpilot/admininvokationimpl.cxx index 622c913201d0..3512e99cce86 100644 --- a/extensions/source/abpilot/admininvokationimpl.cxx +++ b/extensions/source/abpilot/admininvokationimpl.cxx @@ -123,7 +123,7 @@ namespace abp } catch(const Exception&) { - DBG_ERROR("OAdminDialogInvokation::invokeAdministration: caught an exception while executing the dialog!"); + OSL_FAIL("OAdminDialogInvokation::invokeAdministration: caught an exception while executing the dialog!"); } return sal_False; } diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx index acce49187c94..e0073cad0481 100644 --- a/extensions/source/abpilot/datasourcehandling.cxx +++ b/extensions/source/abpilot/datasourcehandling.cxx @@ -145,7 +145,7 @@ namespace abp } catch(const Exception&) { - DBG_ERROR( "lcl_implCreateAndSetURL: caught an exception while creating the data source!" ); + OSL_FAIL( "lcl_implCreateAndSetURL: caught an exception while creating the data source!" ); } return aReturn; @@ -217,7 +217,7 @@ namespace abp } catch( const Exception& ) { - DBG_ERROR( "ODataSourceContext::ODataSourceContext: caught an exception!" ); + OSL_FAIL( "ODataSourceContext::ODataSourceContext: caught an exception!" ); } } @@ -395,7 +395,7 @@ namespace abp } catch(const Exception&) { - DBG_ERROR( "ODataSource::registerDataSource: caught an exception while creating the data source!" ); + OSL_FAIL( "ODataSource::registerDataSource: caught an exception while creating the data source!" ); } } //--------------------------------------------------------------------- @@ -412,7 +412,7 @@ namespace abp } catch(const Exception&) { - DBG_ERROR( "ODataSource::registerDataSource: caught an exception while creating the data source!" ); + OSL_FAIL( "ODataSource::registerDataSource: caught an exception while creating the data source!" ); } } @@ -444,7 +444,7 @@ namespace abp } catch(const Exception&) { - DBG_ERROR( "ODataSource::remove: caught an exception while creating the data source!" ); + OSL_FAIL( "ODataSource::remove: caught an exception while creating the data source!" ); } } @@ -483,7 +483,7 @@ namespace abp m_pImpl->aTables.clear(); if ( !isConnected() ) { - DBG_ERROR( "ODataSource::getTableNames: not connected!" ); + OSL_FAIL( "ODataSource::getTableNames: not connected!" ); } else { @@ -564,7 +564,7 @@ namespace abp catch( const SQLException& e ) { aError <<= e; } catch( const Exception& ) { - DBG_ERROR( "ODataSource::connect: caught a generic exception!" ); + OSL_FAIL( "ODataSource::connect: caught a generic exception!" ); } // ................................................................ @@ -593,7 +593,7 @@ namespace abp } catch( const Exception& ) { - DBG_ERROR( "ODataSource::connect: caught an exception while trying to display the error!" ); + OSL_FAIL( "ODataSource::connect: caught an exception while trying to display the error!" ); } } diff --git a/extensions/source/abpilot/fieldmappingimpl.cxx b/extensions/source/abpilot/fieldmappingimpl.cxx index 88c6c4747d71..9c4c3b2e4bec 100644 --- a/extensions/source/abpilot/fieldmappingimpl.cxx +++ b/extensions/source/abpilot/fieldmappingimpl.cxx @@ -148,7 +148,7 @@ namespace abp } catch(const Exception&) { - DBG_ERROR("fieldmapping::invokeDialog: caught an exception while executing the dialog!"); + OSL_FAIL("fieldmapping::invokeDialog: caught an exception while executing the dialog!"); } return sal_False; } @@ -228,20 +228,20 @@ namespace abp aDriverFieldAliasing.getNodeValue( sDriverProgrammatic ) >>= sDriverUI; if ( 0 == sDriverUI.getLength() ) { - DBG_ERROR( "fieldmapping::defaultMapping: invalid driver UI column name!"); + OSL_FAIL( "fieldmapping::defaultMapping: invalid driver UI column name!"); } else _rFieldAssignment[ sAddressProgrammatic ] = sDriverUI; } else { - DBG_ERROR( "fieldmapping::defaultMapping: invalid driver programmatic name!" ); + OSL_FAIL( "fieldmapping::defaultMapping: invalid driver programmatic name!" ); } } } catch( const Exception& ) { - DBG_ERROR("fieldmapping::defaultMapping: code is assumed to throw no exceptions!"); + OSL_FAIL("fieldmapping::defaultMapping: code is assumed to throw no exceptions!"); // the config nodes we're using herein should not do this .... } } diff --git a/extensions/source/abpilot/fieldmappingpage.cxx b/extensions/source/abpilot/fieldmappingpage.cxx index 323259965d62..5e1a6f91290e 100644 --- a/extensions/source/abpilot/fieldmappingpage.cxx +++ b/extensions/source/abpilot/fieldmappingpage.cxx @@ -53,7 +53,6 @@ namespace abp m_aInvokeDialog.SetClickHdl( LINK( this, FieldMappingPage, OnInvokeDialog ) ); // check the size of the InvokeDialog button - some languages are very ... gossipy here .... - // 96349 - 09.01.2002 - fs@openoffice.org sal_Int32 nTextWidth = m_aInvokeDialog.GetTextWidth( m_aInvokeDialog.GetText() ); sal_Int32 nBorderSpace = m_aInvokeDialog.LogicToPixel( Point( 4, 0 ), MAP_APPFONT ).X(); diff --git a/extensions/source/activex/main/so_activex.cpp b/extensions/source/activex/main/so_activex.cpp index 43e49b6b3345..8618571a5a1d 100644 --- a/extensions/source/activex/main/so_activex.cpp +++ b/extensions/source/activex/main/so_activex.cpp @@ -17,8 +17,6 @@ #include <comphelper\documentconstants.hxx> -// #define MY_DEBUG 1 - CComModule _Module; BEGIN_OBJECT_MAP(ObjectMap) @@ -29,7 +27,7 @@ END_OBJECT_MAP() #define X64_LIB_NAME "so_activex_x64.dll" #define X32_LIB_NAME "so_activex.dll" -// 06.11.2009 tkr: to provide windows xp as build systems for mingw we need to define KEY_WOW64_64KEY +// to provide windows xp as build systems for mingw we need to define KEY_WOW64_64KEY // in mingw 3.13 KEY_WOW64_64KEY isn't available < Win2003 systems. // Also defined in setup_native\source\win32\customactions\reg64\reg64.cxx,source\win32\customactions\shellextensions\shellextensions.cxx and // extensions\source\activex\main\so_activex.cpp @@ -51,7 +49,7 @@ const BOOL bX64 = FALSE; #define REG_DELETE_KEY_A( key, aPath, nKeyAccess ) RegDeleteKeyA( key, aPath ) #endif -// 10.11.2009 tkr: MinGW doesn't know anything about RegDeleteKeyExA if WINVER < 0x0502. +// MinGW doesn't know anything about RegDeleteKeyExA if WINVER < 0x0502. extern "C" { WINADVAPI LONG WINAPI RegDeleteKeyExA(HKEY,LPCSTR,REGSAM,DWORD); } @@ -211,10 +209,6 @@ STDAPI DllRegisterServerNative_Impl( int nMode, BOOL bForAllUsers, REGSAM nKeyAc if ( bForAllUsers ) DllUnregisterServerNative( nMode, sal_False, sal_False ); -#ifdef MY_DEBUG - MessageBoxA(NULL, pProgramPath, "Library Path, ( from library )", MB_OK | MB_ICONINFORMATION); -#endif - if ( pProgramPath && strlen( pProgramPath ) < 1024 ) { sprintf( pActiveXPath, "%s\\%s", pProgramPath, pLibName ); diff --git a/extensions/source/bibliography/bibbeam.cxx b/extensions/source/bibliography/bibbeam.cxx index 6caac4f610d3..a4dd71df31ba 100644 --- a/extensions/source/bibliography/bibbeam.cxx +++ b/extensions/source/bibliography/bibbeam.cxx @@ -46,11 +46,12 @@ #include "datman.hxx" #include "bibtools.hxx" -using namespace rtl; using namespace ::com::sun::star; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::uno; +using ::rtl::OUString; + #define C2U(cChar) OUString::createFromAscii(cChar) #define PROPERTY_FRAME 1 @@ -178,7 +179,6 @@ namespace bib m_xGridWin->setVisible( sal_True ); m_xControl->setDesignMode( sal_True ); // initially switch on the desing mode - switch it off _after_ loading the form - // 17.10.2001 - 93107 - frank.schoenheit@sun.com ::Size aSize = GetOutputSizePixel(); m_xGridWin->setPosSize(0, 0, aSize.Width(),aSize.Height(), awt::PosSize::POSSIZE); diff --git a/extensions/source/bibliography/bibconfig.cxx b/extensions/source/bibliography/bibconfig.cxx index c86369f834b6..7e317986e00f 100644 --- a/extensions/source/bibliography/bibconfig.cxx +++ b/extensions/source/bibliography/bibconfig.cxx @@ -39,12 +39,13 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <comphelper/processfactory.hxx> -using namespace rtl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; +using ::rtl::OUString; + typedef Mapping* MappingPtr; SV_DECL_PTRARR_DEL(MappingArray, MappingPtr, 2, 2) SV_IMPL_PTRARR(MappingArray, MappingPtr); diff --git a/extensions/source/bibliography/bibmod.cxx b/extensions/source/bibliography/bibmod.cxx index 05d068b807af..a686e76bca79 100644 --- a/extensions/source/bibliography/bibmod.cxx +++ b/extensions/source/bibliography/bibmod.cxx @@ -112,13 +112,10 @@ STATIC_USTRING(FM_PROP_LABEL,C2U("Label")); STATIC_USTRING(FM_PROP_CONTROLSOURCE,C2U("DataField")); STATIC_USTRING(FM_PROP_NAME,C2U("Name")); STATIC_USTRING(FM_PROP_FORMATKEY,C2U("FormatKey")); -#ifdef TF_SDBAPI -#else // !TF_SDBAPI STATIC_USTRING(FM_PROP_EDITMODE,C2U("RecordMode")); STATIC_USTRING(FM_PROP_CURSORSOURCETYPE,C2U("DataSelectionType")); STATIC_USTRING(FM_PROP_CURSORSOURCE,C2U("DataSelection")); STATIC_USTRING(FM_PROP_DATASOURCE, C2U("DataSource")); -#endif // !TF_SDBAPI STATIC_USTRING(FM_PROP_VALUE,C2U("Value")); STATIC_USTRING(FM_PROP_TEXT,C2U("Text")); diff --git a/extensions/source/bibliography/bibprop.hrc b/extensions/source/bibliography/bibprop.hrc index 42767a2c01b1..694d90d6402a 100644 --- a/extensions/source/bibliography/bibprop.hrc +++ b/extensions/source/bibliography/bibprop.hrc @@ -32,13 +32,10 @@ extern rtl::OUString FM_PROP_NAME; extern rtl::OUString FM_PROP_CONTROLSOURCE; extern rtl::OUString FM_PROP_FORMATKEY; extern rtl::OUString FM_PROP_VALUE; -#ifdef TF_SDBAPI -#else // !TF_SDBAPI extern rtl::OUString FM_PROP_EDITMODE; extern rtl::OUString FM_PROP_DATASOURCE; extern rtl::OUString FM_PROP_CURSORSOURCE; extern rtl::OUString FM_PROP_CURSORSOURCETYPE; -#endif // !TF_SDBAPI extern rtl::OUString FM_PROP_TEXT; #endif // _SVX_FMPROP_HRC diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index 2915e2cb547d..6da27ca6a28d 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -121,7 +121,7 @@ Reference< XConnection > getConnection(const ::rtl::OUString& _rURL) catch(Exception eEx) { (void) eEx; // make compiler happy - DBG_ERROR("Exception caught in ODatabaseContext::getRegisteredObject()"); + OSL_FAIL("Exception caught in ODatabaseContext::getRegisteredObject()"); } } // build the connection from the data source @@ -170,7 +170,7 @@ Reference< XConnection > getConnection(const Reference< XInterface > & xRowSe catch(Exception& e ) { (void) e; // make compiler happy - DBG_ERROR("exception in getConnection"); + OSL_FAIL("exception in getConnection"); } return xConn; @@ -629,7 +629,7 @@ DBChangeDialog_Impl::DBChangeDialog_Impl(Window* pParent, BibDataManager* pMan ) catch(Exception& e ) { (void) e; // make compiler happy - DBG_ERROR("Exception in BibDataManager::DBChangeDialog_Impl::DBChangeDialog_Impl"); + OSL_FAIL("Exception in BibDataManager::DBChangeDialog_Impl::DBChangeDialog_Impl"); } @@ -861,7 +861,7 @@ void BibDataManager::InsertFields(const Reference< XFormComponent > & _rxGrid) catch(Exception& e ) { (void) e; // make compiler happy - DBG_ERROR("Exception in BibDataManager::InsertFields"); + OSL_FAIL("Exception in BibDataManager::InsertFields"); } } /* -------------------------------------------------- @@ -897,7 +897,7 @@ Reference< awt::XControlModel > BibDataManager::updateGridModel(const Reference< catch(Exception& e ) { (void) e; // make compiler happy - DBG_ERROR("::updateGridModel: something went wrong !"); + OSL_FAIL("::updateGridModel: something went wrong !"); } @@ -983,7 +983,7 @@ Reference< XForm > BibDataManager::createDatabaseForm(BibDBDescriptor& rDesc) catch(Exception& e ) { (void) e; // make compiler happy - DBG_ERROR("::createDatabaseForm: something went wrong !"); + OSL_FAIL("::createDatabaseForm: something went wrong !"); } @@ -1006,7 +1006,7 @@ Sequence< ::rtl::OUString > BibDataManager::getDataSources() catch(Exception& e ) { (void) e; // make compiler happy - DBG_ERROR("::getDataSources: something went wrong !"); + OSL_FAIL("::getDataSources: something went wrong !"); } @@ -1248,7 +1248,7 @@ void BibDataManager::setActiveDataTable(const ::rtl::OUString& rTable) catch(Exception& e ) { (void) e; // make compiler happy - DBG_ERROR("::setActiveDataTable: something went wrong !"); + OSL_FAIL("::setActiveDataTable: something went wrong !"); } } @@ -1381,7 +1381,7 @@ Reference< awt::XControlModel > BibDataManager::createGridModel(const ::rtl::OUS catch(Exception& e ) { (void) e; // make compiler happy - DBG_ERROR("::createGridModel: something went wrong !"); + OSL_FAIL("::createGridModel: something went wrong !"); } @@ -1503,7 +1503,7 @@ Reference< awt::XControlModel > BibDataManager::loadControlModel( catch(Exception& e ) { (void) e; // make compiler happy - DBG_ERROR("::loadControlModel: something went wrong !"); + OSL_FAIL("::loadControlModel: something went wrong !"); } return xModel; } @@ -1524,7 +1524,6 @@ void BibDataManager::propertyChange(const beans::PropertyChangeEvent& evt) throw { try { - sal_Bool bFlag=sal_False; if(evt.PropertyName == FM_PROP_VALUE) { if( evt.NewValue.getValueType() == ::getCppuType((Reference<io::XInputStream>*)0) ) @@ -1538,13 +1537,13 @@ void BibDataManager::propertyChange(const beans::PropertyChangeEvent& evt) throw Reference< XRowLocate > xLocate(xBibCursor, UNO_QUERY); DBG_ASSERT(xLocate.is(), "BibDataManager::propertyChange : invalid cursor !"); - bFlag = xLocate->moveToBookmark(aUID); + xLocate->moveToBookmark(aUID); } } catch(Exception& e ) { (void) e; // make compiler happy - DBG_ERROR("::propertyChange: something went wrong !"); + OSL_FAIL("::propertyChange: something went wrong !"); } @@ -1589,7 +1588,7 @@ try catch(Exception& e ) { (void) e; // make compiler happy - DBG_ERROR("Exception in BibDataManager::SetMeAsUidListener"); + OSL_FAIL("Exception in BibDataManager::SetMeAsUidListener"); } @@ -1635,7 +1634,7 @@ try catch(Exception& e ) { (void) e; // make compiler happy - DBG_ERROR("Exception in BibDataManager::RemoveMeAsUidListener"); + OSL_FAIL("Exception in BibDataManager::RemoveMeAsUidListener"); } diff --git a/extensions/source/bibliography/formcontrolcontainer.cxx b/extensions/source/bibliography/formcontrolcontainer.cxx index 665ced0242c5..ee45d2b58a99 100644 --- a/extensions/source/bibliography/formcontrolcontainer.cxx +++ b/extensions/source/bibliography/formcontrolcontainer.cxx @@ -120,7 +120,7 @@ namespace bib catch( const Exception& e) { (void) e; // make compiler happy - DBG_ERROR( "FormControlContainer::implSetDesignMode: caught an exception!" ); + OSL_FAIL( "FormControlContainer::implSetDesignMode: caught an exception!" ); } } diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx index 8e130bef94dc..4655075e052c 100644 --- a/extensions/source/bibliography/framectr.cxx +++ b/extensions/source/bibliography/framectr.cxx @@ -61,16 +61,17 @@ #include <vcl/edit.hxx> #include <osl/mutex.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> using namespace osl; using namespace cppu; -using namespace rtl; using namespace com::sun::star::sdbc; using namespace com::sun::star::frame; using namespace com::sun::star::uno; using namespace com::sun::star; +using ::rtl::OUString; + #define C2U(cChar) OUString::createFromAscii(cChar) struct DispatchInfo @@ -110,7 +111,7 @@ static DispatchInfo SupportedCommandsArray[] = { 0 , 0 , sal_False } }; -typedef ::std::hash_map< ::rtl::OUString, CacheDispatchInfo, rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > CmdToInfoCache; +typedef ::boost::unordered_map< ::rtl::OUString, CacheDispatchInfo, rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > CmdToInfoCache; SV_IMPL_PTRARR( BibStatusDispatchArr, BibStatusDispatchPtr ); @@ -383,7 +384,6 @@ sal_Bool BibFrameController_Impl::SaveModified(const Reference< form::runtime::X { if (!xController.is()) return sal_False; - sal_Bool bInserted = sal_False; Reference< XResultSetUpdate> _xCursor = Reference< XResultSetUpdate>(xController->getModel(), UNO_QUERY); @@ -410,10 +410,8 @@ sal_Bool BibFrameController_Impl::SaveModified(const Reference< form::runtime::X } catch(Exception&) { - DBG_ERROR("SaveModified: Exception occurred!"); + OSL_FAIL("SaveModified: Exception occurred!"); } - - bInserted = bIsNew && bResult; } return bResult; } @@ -466,7 +464,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen } catch(const Exception&) { - DBG_ERROR("Exception catched while changing the data source"); + OSL_FAIL("Exception catched while changing the data source"); } } } @@ -556,7 +554,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen } catch( const uno::Exception& ) { - DBG_ERROR( "BibFrameController_Impl::dispatch: caught an exception!" ); + OSL_FAIL( "BibFrameController_Impl::dispatch: caught an exception!" ); } sal_uInt16 nCount = aStatusListeners.Count(); @@ -600,7 +598,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen } catch(Exception&) { - DBG_ERROR("Exception in last() or moveToInsertRow()"); + OSL_FAIL("Exception in last() or moveToInsertRow()"); } } } @@ -660,7 +658,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen } catch(Exception&) { - DBG_ERROR("DeleteRecord : exception caught !"); + OSL_FAIL("DeleteRecord : exception caught !"); } } } diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx index c38180d43dbd..27adec5f5c80 100644 --- a/extensions/source/bibliography/general.cxx +++ b/extensions/source/bibliography/general.cxx @@ -183,7 +183,7 @@ void BibPosListener::cursorMoved(const lang::EventObject& /*aEvent*/) throw( uno catch(Exception& rEx) { (void) rEx; // make compiler happy - DBG_ERROR("BibPosListener::positioned: something went wrong !"); + OSL_FAIL("BibPosListener::positioned: something went wrong !"); } } @@ -559,7 +559,6 @@ uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl( xCtrWin->setVisible( sal_True ); xControl->setDesignMode( sal_True ); // initially switch on the desing mode - switch it off _after_ loading the form - // 17.10.2001 - 93107 - frank.schoenheit@sun.com xCtrWin->setPosSize(rPos.X(), rPos.Y(), rSize.Width(), rSize.Height(), awt::PosSize::POSSIZE); @@ -570,7 +569,7 @@ uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl( catch(Exception& rEx) { (void) rEx; // make compiler happy - DBG_ERROR("BibGeneralPage::AddXControl: something went wrong !"); + OSL_FAIL("BibGeneralPage::AddXControl: something went wrong !"); } return xCtrModel; } diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx index 2b77d1224283..a63f95756928 100644 --- a/extensions/source/bibliography/toolbar.cxx +++ b/extensions/source/bibliography/toolbar.cxx @@ -216,7 +216,6 @@ BibToolBar::BibToolBar(Window* pParent, Link aLink, WinBits nStyle): ApplyImageList(); SetStyle(GetStyle()|nStyle); SetOutStyle(TOOLBOX_STYLE_FLAT); - Size aSize=GetSizePixel(); Size a2Size(GetOutputSizePixel()); a2Size.Width()=100; aLBSource.SetSizePixel(a2Size); diff --git a/extensions/source/bibliography/uiconfig/sbibliography/menubar/menubar.xml b/extensions/source/bibliography/uiconfig/sbibliography/menubar/menubar.xml index a1924145b4cf..817473af0e73 100644 --- a/extensions/source/bibliography/uiconfig/sbibliography/menubar/menubar.xml +++ b/extensions/source/bibliography/uiconfig/sbibliography/menubar/menubar.xml @@ -85,7 +85,6 @@ <menu:menuitem menu:id=".uno:ExtendedHelp"/> <menu:menuseparator/> <menu:menuitem menu:id=".uno:ShowLicense"/> - <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/> <menu:menuseparator/> <menu:menuitem menu:id=".uno:About"/> </menu:menupopup> diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index 1a5f7fb0aab6..c8b175839435 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -156,7 +156,7 @@ namespace dbp } catch(Exception&) { - DBG_ERROR("OTableSelectionPage::initializePage: caught an exception!"); + OSL_FAIL("OTableSelectionPage::initializePage: caught an exception!"); } } @@ -191,7 +191,7 @@ namespace dbp } catch(Exception&) { - DBG_ERROR("OTableSelectionPage::commitPage: caught an exception!"); + OSL_FAIL("OTableSelectionPage::commitPage: caught an exception!"); } return sal_True; @@ -306,7 +306,7 @@ namespace dbp } else { - DBG_ERROR("OTableSelectionPage::implFillTables: invalid data source object returned by the context"); + OSL_FAIL("OTableSelectionPage::implFillTables: invalid data source object returned by the context"); } } } @@ -315,7 +315,7 @@ namespace dbp catch(SQLException& e) { aSQLException <<= e; } catch (Exception&) { - DBG_ERROR("OTableSelectionPage::implFillTables: could not fill the table list!"); + OSL_FAIL("OTableSelectionPage::implFillTables: could not fill the table list!"); } } @@ -347,7 +347,7 @@ namespace dbp catch(SQLException& e) { aSQLException <<= e; } catch (Exception&) { - DBG_ERROR("OTableSelectionPage::implFillTables: could not fill the table list!"); + OSL_FAIL("OTableSelectionPage::implFillTables: could not fill the table list!"); } } @@ -388,7 +388,7 @@ namespace dbp } catch (Exception&) { - DBG_ERROR("OTableSelectionPage::implCollectDatasource: could not collect the data source names!"); + OSL_FAIL("OTableSelectionPage::implCollectDatasource: could not collect the data source names!"); } } diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx index 408a45dda260..4097c4016565 100644 --- a/extensions/source/dbpilots/controlwizard.cxx +++ b/extensions/source/dbpilots/controlwizard.cxx @@ -246,7 +246,7 @@ namespace dbp } catch(const Exception&) { - DBG_ERROR("OControlWizardPage::initializePage: caught an exception!"); + OSL_FAIL("OControlWizardPage::initializePage: caught an exception!"); } INetURLObject aURL( sDataSource ); @@ -310,7 +310,7 @@ namespace dbp } catch(Exception&) { - DBG_ERROR("OControlWizard::activate: could not obtain the class id!"); + OSL_FAIL("OControlWizard::activate: could not obtain the class id!"); } if (!approveControl(nClassId)) { @@ -434,7 +434,7 @@ namespace dbp } catch(Exception&) { - DBG_ERROR("OControlWizard::implDeterminePage: caught an exception!"); + OSL_FAIL("OControlWizard::implDeterminePage: caught an exception!"); } } @@ -456,7 +456,7 @@ namespace dbp } catch(Exception&) { - DBG_ERROR("OControlWizard::implGetDSContext: invalid database context!"); + OSL_FAIL("OControlWizard::implGetDSContext: invalid database context!"); } } @@ -476,7 +476,7 @@ namespace dbp } catch(const Exception&) { - DBG_ERROR("OControlWizard::getFormConnection: caught an exception!"); + OSL_FAIL("OControlWizard::getFormConnection: caught an exception!"); } return xConn; } @@ -507,7 +507,7 @@ namespace dbp } catch(const Exception&) { - DBG_ERROR("OControlWizard::setFormConnection: caught an exception!"); + OSL_FAIL("OControlWizard::setFormConnection: caught an exception!"); } } @@ -646,7 +646,7 @@ namespace dbp } catch(Exception&) { - DBG_ERROR("OControlWizard::initContext: unexpected exception while gathering column information!"); + OSL_FAIL("OControlWizard::initContext: unexpected exception while gathering column information!"); } m_aContext.aTypes.insert(OControlWizardContext::TNameTypeMap::value_type(*pBegin,nFieldType)); } @@ -657,7 +657,7 @@ namespace dbp catch(SQLException& e) { aSQLException <<= e; } catch(Exception&) { - DBG_ERROR("OControlWizard::initContext: could not retrieve the control context (caught an exception)!"); + OSL_FAIL("OControlWizard::initContext: could not retrieve the control context (caught an exception)!"); } ::comphelper::disposeComponent(xStatement); @@ -710,7 +710,7 @@ namespace dbp } catch(Exception&) { - DBG_ERROR("OControlWizard::commitControlSettings: could not commit the basic control settings!"); + OSL_FAIL("OControlWizard::commitControlSettings: could not commit the basic control settings!"); } } @@ -735,7 +735,7 @@ namespace dbp } catch(Exception&) { - DBG_ERROR("OControlWizard::initControlSettings: could not retrieve the basic control settings!"); + OSL_FAIL("OControlWizard::initControlSettings: could not retrieve the basic control settings!"); } } diff --git a/extensions/source/dbpilots/dbpservices.cxx b/extensions/source/dbpilots/dbpservices.cxx index 3b251c144eb7..78bc4a45eb79 100644 --- a/extensions/source/dbpilots/dbpservices.cxx +++ b/extensions/source/dbpilots/dbpservices.cxx @@ -85,7 +85,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( } catch (InvalidRegistryException& ) { - OSL_ASSERT("dbp::component_writeInfo: could not create a registry key (InvalidRegistryException) !"); + OSL_FAIL("dbp::component_writeInfo: could not create a registry key (InvalidRegistryException) !"); } return sal_False; diff --git a/extensions/source/dbpilots/dbptools.cxx b/extensions/source/dbpilots/dbptools.cxx index 6bf34b177643..47836495b585 100644 --- a/extensions/source/dbpilots/dbptools.cxx +++ b/extensions/source/dbpilots/dbptools.cxx @@ -61,7 +61,7 @@ namespace dbp } catch(Exception&) { - DBG_ERROR("::dbp::disambiguateName: something went (strangely) wrong!"); + OSL_FAIL("::dbp::disambiguateName: something went (strangely) wrong!"); } } diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index ebc03de45850..7012e876751e 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -118,10 +118,10 @@ namespace dbp static const ::rtl::OUString s_sEmptyString; // collect "descriptors" for the to-be-created (grid)columns - DECLARE_STL_VECTOR( ::rtl::OUString, StringArray ); - StringArray aColumnServiceNames; // service names to be used with the XGridColumnFactory - StringArray aColumnLabelPostfixes; // postfixes to append to the column labels - StringArray aFormFieldNames; // data field names + DECLARE_STL_VECTOR( ::rtl::OUString, OUStringArray ); + OUStringArray aColumnServiceNames; // service names to be used with the XGridColumnFactory + OUStringArray aColumnLabelPostfixes; // postfixes to append to the column labels + OUStringArray aFormFieldNames; // data field names aColumnServiceNames.reserve(getSettings().aSelectedFields.getLength()); aColumnLabelPostfixes.reserve(getSettings().aSelectedFields.getLength()); @@ -196,10 +196,10 @@ namespace dbp { Reference< XNameAccess > xExistenceChecker(xColumnContainer.get()); - ConstStringArrayIterator pColumnServiceName = aColumnServiceNames.begin(); - ConstStringArrayIterator pColumnLabelPostfix = aColumnLabelPostfixes.begin(); - ConstStringArrayIterator pFormFieldName = aFormFieldNames.begin(); - ConstStringArrayIterator pColumnServiceNameEnd = aColumnServiceNames.end(); + ConstOUStringArrayIterator pColumnServiceName = aColumnServiceNames.begin(); + ConstOUStringArrayIterator pColumnLabelPostfix = aColumnLabelPostfixes.begin(); + ConstOUStringArrayIterator pFormFieldName = aFormFieldNames.begin(); + ConstOUStringArrayIterator pColumnServiceNameEnd = aColumnServiceNames.end(); for (;pColumnServiceName < pColumnServiceNameEnd; ++pColumnServiceName, ++pColumnLabelPostfix, ++pFormFieldName) { diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx index 66c97e59b83e..acda08475eed 100644 --- a/extensions/source/dbpilots/groupboxwiz.cxx +++ b/extensions/source/dbpilots/groupboxwiz.cxx @@ -177,7 +177,7 @@ namespace dbp } catch(Exception&) { - DBG_ERROR("OGroupBoxWizard::createRadios: caught an exception while creating the radio shapes!"); + OSL_FAIL("OGroupBoxWizard::createRadios: caught an exception while creating the radio shapes!"); } } diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx index 0a93ad8c22d1..e313ee92049c 100644 --- a/extensions/source/dbpilots/listcombowizard.cxx +++ b/extensions/source/dbpilots/listcombowizard.cxx @@ -222,7 +222,7 @@ namespace dbp } catch(Exception&) { - DBG_ERROR("OListComboWizard::implApplySettings: could not set the property values for the listbox!"); + OSL_FAIL("OListComboWizard::implApplySettings: could not set the property values for the listbox!"); } } @@ -353,7 +353,7 @@ namespace dbp } catch(Exception&) { - DBG_ERROR("OContentTableSelection::initializePage: could not retrieve the table names!"); + OSL_FAIL("OContentTableSelection::initializePage: could not retrieve the table names!"); } m_aSelectTable.SelectEntry(getSettings().sListContentTable); diff --git a/extensions/source/dbpilots/optiongrouplayouter.cxx b/extensions/source/dbpilots/optiongrouplayouter.cxx index e1de8e380b85..9db495891604 100644 --- a/extensions/source/dbpilots/optiongrouplayouter.cxx +++ b/extensions/source/dbpilots/optiongrouplayouter.cxx @@ -78,14 +78,14 @@ namespace dbp Reference< XShapes > xPageShapes(_rContext.xDrawPage, UNO_QUERY); if (!xPageShapes.is()) { - DBG_ERROR("OOptionGroupLayouter::OOptionGroupLayouter: missing the XShapes interface for the page!"); + OSL_FAIL("OOptionGroupLayouter::OOptionGroupLayouter: missing the XShapes interface for the page!"); return; } Reference< XMultiServiceFactory > xDocFactory(_rContext.xDocumentModel, UNO_QUERY); if (!xDocFactory.is()) { - DBG_ERROR("OOptionGroupLayouter::OOptionGroupLayouter: no document service factory!"); + OSL_FAIL("OOptionGroupLayouter::OOptionGroupLayouter: no document service factory!"); return; } @@ -196,7 +196,7 @@ namespace dbp } catch(Exception&) { - DBG_ERROR("OOptionGroupLayouter::doLayout: caught an exception while grouping the shapes!"); + OSL_FAIL("OOptionGroupLayouter::doLayout: caught an exception while grouping the shapes!"); } } diff --git a/extensions/source/inc/componentmodule.cxx b/extensions/source/inc/componentmodule.cxx index 35daf0e83799..46580ce3e96b 100644 --- a/extensions/source/inc/componentmodule.cxx +++ b/extensions/source/inc/componentmodule.cxx @@ -203,7 +203,7 @@ namespace COMPMOD_NAMESPACE { if (!s_pImplementationNames) { - OSL_ASSERT("OModule::revokeComponent : have no class infos ! Are you sure called this method at the right time ?"); + OSL_FAIL("OModule::revokeComponent : have no class infos ! Are you sure called this method at the right time ?"); return; } OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, @@ -245,7 +245,7 @@ namespace COMPMOD_NAMESPACE if (!s_pImplementationNames) { - OSL_ASSERT("OModule::writeComponentInfos : have no class infos ! Are you sure called this method at the right time ?"); + OSL_FAIL("OModule::writeComponentInfos : have no class infos ! Are you sure called this method at the right time ?"); return sal_True; } OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, @@ -276,7 +276,7 @@ namespace COMPMOD_NAMESPACE } catch(Exception&) { - OSL_ASSERT("OModule::writeComponentInfos : something went wrong while creating the keys !"); + OSL_FAIL("OModule::writeComponentInfos : something went wrong while creating the keys !"); return sal_False; } } @@ -294,7 +294,7 @@ namespace COMPMOD_NAMESPACE if (!s_pImplementationNames) { - OSL_ASSERT("OModule::getComponentFactory : have no class infos ! Are you sure called this method at the right time ?"); + OSL_FAIL("OModule::getComponentFactory : have no class infos ! Are you sure called this method at the right time ?"); return NULL; } OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, diff --git a/extensions/source/logging/consolehandler.cxx b/extensions/source/logging/consolehandler.cxx index c095198900ef..6f0a6b4969da 100644 --- a/extensions/source/logging/consolehandler.cxx +++ b/extensions/source/logging/consolehandler.cxx @@ -250,9 +250,9 @@ namespace logging return sal_False; if ( _rRecord.Level >= m_nThreshold ) - fprintf( stderr, sEntry.getStr() ); + fprintf( stderr, "%s\n", sEntry.getStr() ); else - fprintf( stdout, sEntry.getStr() ); + fprintf( stdout, "%s\n", sEntry.getStr() ); return sal_True; } diff --git a/extensions/source/logging/log_services.cxx b/extensions/source/logging/log_services.cxx index 9659849d0970..1b3e0e842706 100644 --- a/extensions/source/logging/log_services.cxx +++ b/extensions/source/logging/log_services.cxx @@ -47,19 +47,12 @@ namespace logging static void initializeModule() { - static bool bInitialized( false ); - if ( !bInitialized ) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if ( !bInitialized ) - { - createRegistryInfo_LoggerPool(); - createRegistryInfo_FileHandler(); - createRegistryInfo_ConsoleHandler(); - createRegistryInfo_PlainTextFormatter(); - createRegistryInfo_CsvFormatter(); - } - } + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + createRegistryInfo_LoggerPool(); + createRegistryInfo_FileHandler(); + createRegistryInfo_ConsoleHandler(); + createRegistryInfo_PlainTextFormatter(); + createRegistryInfo_CsvFormatter(); } //........................................................................ diff --git a/extensions/source/nsplugin/source/makefile.mk b/extensions/source/nsplugin/source/makefile.mk index abe8ef71a9c5..793e4bd67d95 100644 --- a/extensions/source/nsplugin/source/makefile.mk +++ b/extensions/source/nsplugin/source/makefile.mk @@ -49,7 +49,8 @@ dummy: @echo GTK disabled - nothing to build .ELSE # "$(ENABLE_GTK)"=="" -.IF "$(OS)"=="LINUX" || "$(OS)"=="FREEBSD" || "$(OS)"=="NETBSD" || "$(OS)"=="OPENBSD" +.IF "$(OS)"=="LINUX" || "$(OS)"=="FREEBSD" || "$(OS)"=="NETBSD" || \ + "$(OS)"=="OPENBSD" || "$(OS)"=="DRAGONFLY" INC+= -DNP_LINUX .ENDIF PKGCONFIG_MODULES=gtk+-2.0 @@ -72,9 +73,6 @@ SHL1OBJS= $(SLO)$/npshell.obj \ .IF "$(GUI)"=="UNX" STDLIBS+=$(SOLARLIBDIR)$/npunix.o SHL1STDLIBS+=$(SOLARLIBDIR)$/npunix.o -#.IF "$(OS)"!="FREEBSD" -#SHL1STDLIBS+= -ldl -lnsl -#.ENDIF #FREEBSD .ENDIF #UNX .IF "$(GUI)"=="WNT" SHL1OBJS+=$(SOLARLIBDIR)$/pathutils-slo.obj diff --git a/extensions/source/nsplugin/source/nsplugin_oo.rc b/extensions/source/nsplugin/source/nsplugin_oo.rc index 42a2a642e023..9d30de3918a1 100644 --- a/extensions/source/nsplugin/source/nsplugin_oo.rc +++ b/extensions/source/nsplugin/source/nsplugin_oo.rc @@ -26,5 +26,5 @@ ************************************************************************/ #define ADDITIONAL_VERINFO1 value "FileExtents", "sdc|sds|sda|sdd|sdp|smf|vor|sgl|sdw|sxc|stc|sxd|std|sxi|sti|sxm|sxw|sxg|stw|odt|ott|odm|oth|ods|ots|odg|otg|odp|otp|odf\0"\ value "FileOpenName", "StarCalc 3.0 - 5.0|StarChart 3.0 - 5.0|StarDraw 3.0 - 5.0|StarImpress 3.0 - 5.0|StarImpress-packed 3.0 - 5.0|StarMath 3.0 - 5.0|StarWriter Template 3.0 - 5.0|StarWriter Global 3.0 - 5.0|StarWriter 3.0 - 5.0|StarOffice 6.0/7 Spreadsheet|StarOffice 6.0/7 Spreadsheet Template|StarOffice 6.0/7 Drawing|StarOffice 6.0/7 Drawing Template|StarOffice 6.0/7 Presentation|StarOffice 6.0/7 Presentation Template|StarOffice 6.0/7 Formula|StarOffice 6.0/7 Text Document|StarOffice 6.0/7 Master Document|StarOffice 6.0/7 Text Document Template|OpenDocument Text|OpenDocument Text Template|OpenDocument Master Document|HTML Document Template|OpenDocument Spreadsheet|OpenDocument Spreadsheet Template|OpenDocument Drawing|OpenDocument Drawing Template|OpenDocument Presentation|OpenDocument Presentation Template|OpenDocument Formula\0" -#define ADDITIONAL_VERINFO2 value "FileDescription", "OpenOffice.org Plug-in handles all its documents" value "ProductName", "OpenOffice.org Plug-in" value "MIMEType", "application/vnd.stardivision.calc|application/vnd.stardivision.chart|application/vnd.stardivision.draw|application/vnd.stardivision.impress|application/vnd.stardivision.impress-packed|application/vnd.stardivision.math|application/vnd.stardivision.writer|application/vnd.stardivision.writer-global|application/vnd.staroffice.writer|application/vnd.sun.xml.calc|application/vnd.sun.xml.calc.template|application/vnd.sun.xml.draw|application/vnd.sun.xml.draw.template|" +#define ADDITIONAL_VERINFO2 value "FileDescription", "LibreOffice Plug-in handles all its documents" value "ProductName", "LibreOffice Plug-in" value "MIMEType", "application/vnd.stardivision.calc|application/vnd.stardivision.chart|application/vnd.stardivision.draw|application/vnd.stardivision.impress|application/vnd.stardivision.impress-packed|application/vnd.stardivision.math|application/vnd.stardivision.writer|application/vnd.stardivision.writer-global|application/vnd.staroffice.writer|application/vnd.sun.xml.calc|application/vnd.sun.xml.calc.template|application/vnd.sun.xml.draw|application/vnd.sun.xml.draw.template|" #define ADDITIONAL_VERINFO3 "application/vnd.sun.xml.impress|application/vnd.sun.xml.impress.template|application/vnd.sun.xml.math|application/vnd.sun.xml.writer|application/vnd.sun.xml.writer.global|application/vnd.sun.xml.writer.template|application/vnd.oasis.opendocument.text|application/vnd.oasis.opendocument.text-template|application/vnd.oasis.opendocument.text-master|application/vnd.oasis.opendocument.text-web|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template|application/vnd.oasis.opendocument.graphics|application/vnd.oasis.opendocument.graphics-template|application/vnd.oasis.opendocument.presentation|application/vnd.oasis.opendocument.presentation-template|application/vnd.oasis.opendocument.formula\0" diff --git a/extensions/source/nsplugin/source/so_env.cxx b/extensions/source/nsplugin/source/so_env.cxx index 212ff43d7272..bf782a74933f 100644 --- a/extensions/source/nsplugin/source/so_env.cxx +++ b/extensions/source/nsplugin/source/so_env.cxx @@ -205,7 +205,9 @@ int nspluginOOoModuleHook (void** aResult) strcpy (realFileName, libFileName); } - fprintf (stderr, "OpenOffice path before fixup is '%s'\n", realFileName); +#if OSL_DEBUG_LEVEL > 0 + fprintf (stderr, "LibreOffice path before fixup is '%s'\n", realFileName); +#endif if (realFileName[0] != '/') { /* a relative sym-link and we need to get an absolute path */ @@ -224,7 +226,9 @@ int nspluginOOoModuleHook (void** aResult) *aResult = realFileName; - fprintf (stderr, "OpenOffice path is '%s'\n", realFileName); +#if OSL_DEBUG_LEVEL > 0 + fprintf (stderr, "LibreOffice path is '%s'\n", realFileName); +#endif return 0; } diff --git a/extensions/source/nsplugin/source/so_instance.cxx b/extensions/source/nsplugin/source/so_instance.cxx index 742bedecc0e7..658d73a59180 100644 --- a/extensions/source/nsplugin/source/so_instance.cxx +++ b/extensions/source/nsplugin/source/so_instance.cxx @@ -64,9 +64,11 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::connection; using namespace cppu; -using namespace rtl; using namespace com::sun::star; +using ::rtl::OUString; +using ::rtl::OString; + char SoPluginInstance::sSO_Dir[] = {0}; Reference< XMultiServiceFactory > SoPluginInstance::mxRemoteMSF = Reference< XMultiServiceFactory >(NULL); diff --git a/extensions/source/ole/makefile.mk b/extensions/source/ole/makefile.mk index 87841c463f43..783614590838 100644 --- a/extensions/source/ole/makefile.mk +++ b/extensions/source/ole/makefile.mk @@ -47,9 +47,9 @@ INCPRE+= $(foreach,i,$(ATL_INCLUDE) -I$(i)) .IF "$(GUI)" == "WNT" && "$(DISABLE_ATL)"=="" -.IF "$(USE_STLP_DEBUG)"!="" +.IF "$(USE_DEBUG_RUNTIME)"!="" CDEFS+=-D_DEBUG -.ENDIF # "$(USE_STLP_DEBUG)"!="" +.ENDIF # "$(USE_DEBUG_RUNTIME)"!="" SLOFILES= \ $(SLO)$/servreg.obj \ @@ -80,7 +80,7 @@ SHL1STDLIBS=\ .IF "$(COM)"=="MSC" .IF "$(WINDOWS_VISTA_PSDK)"!="" || "$(CCNUMVER)"<="001399999999" -.IF "$(USE_STLP_DEBUG)" != "" +.IF "$(USE_DEBUG_RUNTIME)" != "" SHL1STDLIBS+= $(ATL_LIB)$/atlsd.lib .ELSE SHL1STDLIBS+= $(ATL_LIB)$/atls.lib @@ -107,7 +107,7 @@ SHL2STDLIBS=\ .IF "$(COM)"=="MSC" .IF "$(WINDOWS_VISTA_PSDK)"!="" || "$(CCNUMVER)"<="001399999999" -.IF "$(USE_STLP_DEBUG)" != "" +.IF "$(USE_DEBUG_RUNTIME)" != "" SHL2STDLIBS+= $(ATL_LIB)$/atlsd.lib .ELSE SHL2STDLIBS+= $(ATL_LIB)$/atls.lib diff --git a/extensions/source/ole/ole2uno.hxx b/extensions/source/ole/ole2uno.hxx index 2cd8c75d3857..55ca3104bd64 100644 --- a/extensions/source/ole/ole2uno.hxx +++ b/extensions/source/ole/ole2uno.hxx @@ -49,12 +49,12 @@ #pragma warning (disable:4005) #pragma warning (disable:4548) -#include <tools/prewin.h> +#include <prewin.h> #include <tchar.h> #if (_MSC_VER >= 1200) || defined(__MINGW32__) #include <dispex.h> #endif -#include <tools/postwin.h> +#include <postwin.h> #include <tools/presys.h> #include <list> @@ -91,10 +91,9 @@ using namespace com::sun::star::registry; using namespace com::sun::star::reflection; using namespace com::sun::star::beans; using namespace osl; -using namespace rtl; using namespace std; - +using ::rtl::OUString; namespace ole_adapter { diff --git a/extensions/source/ole/oledll.cxx b/extensions/source/ole/oledll.cxx index 6c80487ffcb4..a2ac152fd8e2 100644 --- a/extensions/source/ole/oledll.cxx +++ b/extensions/source/ole/oledll.cxx @@ -36,7 +36,7 @@ #pragma warning (push,1) #pragma warning (disable:4548) -#if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(_STLP_DEBUG) +#if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(_DEBUG_RUNTIME) #undef _DEBUG #endif #ifdef __MINGW32__ diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index 5696375a5971..4c772288fe16 100644 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -69,7 +69,6 @@ using namespace std; using namespace boost; using namespace osl; -using namespace rtl; using namespace cppu; using namespace com::sun::star::script; using namespace com::sun::star::lang; @@ -77,6 +76,10 @@ using namespace com::sun::star::bridge; using namespace com::sun::star::bridge::oleautomation; using namespace com::sun::star::bridge::ModelDependent; +using ::rtl::OUString; +using ::rtl::OString; +using ::rtl::OUStringBuffer; + #define JSCRIPT_ID_PROPERTY L"_environment" #define JSCRIPT_ID L"jscript" namespace ole_adapter @@ -91,16 +94,16 @@ namespace ole_adapter // called. // Before UNO object is wrapped to COM object this map is checked // to see if the UNO object is already a wrapper. -hash_map<sal_uInt32, sal_uInt32> AdapterToWrapperMap; +boost::unordered_map<sal_uInt32, sal_uInt32> AdapterToWrapperMap; // key: XInterface of the wrapper object. // value: XInterface of the Interface created by the Invocation Adapter Factory. // A COM wrapper is responsible for removing the corresponding entry // in AdapterToWrappperMap if it is being destroyed. Because the wrapper does not // know about its adapted interface it uses WrapperToAdapterMap to get the // adapted interface which is then used to locate the entry in AdapterToWrapperMap. -hash_map<sal_uInt32,sal_uInt32> WrapperToAdapterMap; +boost::unordered_map<sal_uInt32,sal_uInt32> WrapperToAdapterMap; -hash_map<sal_uInt32, WeakReference<XInterface> > ComPtrToWrapperMap; +boost::unordered_map<sal_uInt32, WeakReference<XInterface> > ComPtrToWrapperMap; /***************************************************************************** class implementation IUnknownWrapper_Impl @@ -127,7 +130,7 @@ IUnknownWrapper_Impl::~IUnknownWrapper_Impl() #endif // remove entries in global maps - typedef hash_map<sal_uInt32, sal_uInt32>::iterator _IT; + typedef boost::unordered_map<sal_uInt32, sal_uInt32>::iterator _IT; _IT it= WrapperToAdapterMap.find( (sal_uInt32) xIntRoot); if( it != WrapperToAdapterMap.end()) { diff --git a/extensions/source/ole/oleobjw.hxx b/extensions/source/ole/oleobjw.hxx index 733d25f1d78b..b9e0ca21cd56 100644 --- a/extensions/source/ole/oleobjw.hxx +++ b/extensions/source/ole/oleobjw.hxx @@ -43,7 +43,7 @@ #endif #include <atlbase.h> #include <vector> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <tools/postsys.h> #ifdef _MSC_VER @@ -65,20 +65,20 @@ #include "unoconversionutilities.hxx" #include "windata.hxx" using namespace cppu; -using namespace rtl; using namespace std; using namespace com::sun::star::lang; using namespace com::sun::star::bridge; using namespace com::sun::star::bridge::oleautomation; +using ::rtl::OUString; namespace ole_adapter { -typedef hash_map<OUString, pair<DISPID, unsigned short>, hashOUString_Impl, equalOUString_Impl> DispIdMap; +typedef boost::unordered_map<OUString, pair<DISPID, unsigned short>, hashOUString_Impl, equalOUString_Impl> DispIdMap; -typedef hash_multimap<OUString, unsigned int, hashOUString_Impl, equalOUString_Impl> TLBFuncIndexMap; +typedef boost::unordered_multimap<OUString, unsigned int, hashOUString_Impl, equalOUString_Impl> TLBFuncIndexMap; // This class wraps an IDispatch and maps XInvocation calls to IDispatch calls on the wrapped object. // If m_TypeDescription is set then this class represents an UNO interface implemented in a COM component. diff --git a/extensions/source/ole/servprov.cxx b/extensions/source/ole/servprov.cxx index 4eed6c7be1ca..a72b6bc5845f 100644 --- a/extensions/source/ole/servprov.cxx +++ b/extensions/source/ole/servprov.cxx @@ -29,6 +29,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_extensions.hxx" +#include <vector> + #ifdef __MINGW32__ #define INITGUID #include <initguid.h> @@ -53,24 +55,19 @@ extern CComModule _Module; #include <tools/postsys.h> -using namespace std; using namespace cppu; -using namespace rtl; using namespace osl; using namespace com::sun::star::lang; using namespace com::sun::star::uno; using namespace com::sun::star::bridge; using namespace com::sun::star::bridge::ModelDependent; - +using ::rtl::OUString; namespace ole_adapter { #include <initguid.h> -// prior 5.2 ( src569 ver m) -// {3ECF78F0-B149-11D2-8EBE-00105AD848AF} -//DEFINE_GUID(OID_ServiceManager, 0x3ECF78F0, 0xB149, 0x11d2, 0x8E, 0xBE, 0x00, 0x10, 0x5A, 0xD8, 0x48, 0xAF); #ifndef OWNGUID // GUID used since 5.2 ( src569 m) diff --git a/extensions/source/ole/servreg.cxx b/extensions/source/ole/servreg.cxx index 7311f965ca8d..6284bc1f8246 100644 --- a/extensions/source/ole/servreg.cxx +++ b/extensions/source/ole/servreg.cxx @@ -34,10 +34,11 @@ #include "servprov.hxx" #include <rtl/ustring.hxx> #include <cppuhelper/factory.hxx> -using namespace rtl; using namespace ole_adapter; using namespace cppu; +using ::rtl::OUString; + namespace ole_adapter { rtl_StandardModuleCount globalModuleCount= MODULE_COUNT_INIT; diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx index 1ce9f3c9ae0b..b6ac7f1caff0 100644 --- a/extensions/source/ole/unoconversionutilities.hxx +++ b/extensions/source/ole/unoconversionutilities.hxx @@ -41,7 +41,7 @@ #include "ole2uno.hxx" #include "unotypewrapper.hxx" -#include <hash_map> +#include <boost/unordered_map.hpp> // for some reason DECIMAL_NEG (wtypes.h) which contains BYTE is not resolved. typedef unsigned char BYTE; @@ -72,17 +72,17 @@ using namespace com::sun::star::bridge::oleautomation; using namespace boost; namespace ole_adapter { -extern hash_map<sal_uInt32, sal_uInt32> AdapterToWrapperMap; -extern hash_map<sal_uInt32, sal_uInt32> WrapperToAdapterMap; -typedef hash_map<sal_uInt32, sal_uInt32>::iterator IT_Wrap; -typedef hash_map<sal_uInt32, sal_uInt32>::iterator CIT_Wrap; +extern boost::unordered_map<sal_uInt32, sal_uInt32> AdapterToWrapperMap; +extern boost::unordered_map<sal_uInt32, sal_uInt32> WrapperToAdapterMap; +typedef boost::unordered_map<sal_uInt32, sal_uInt32>::iterator IT_Wrap; +typedef boost::unordered_map<sal_uInt32, sal_uInt32>::iterator CIT_Wrap; //Maps IUnknown pointers to a weak reference of the respective wrapper class (e.g. // IUnknownWrapperImpl. It is the responsibility of the wrapper to remove the entry when // it is being destroyed. // Used to ensure that an Automation object is always mapped to the same UNO objects. -extern hash_map<sal_uInt32, WeakReference<XInterface> > ComPtrToWrapperMap; -typedef hash_map<sal_uInt32, WeakReference<XInterface> >::iterator IT_Com; -typedef hash_map<sal_uInt32, WeakReference<XInterface> >::const_iterator CIT_Com; +extern boost::unordered_map<sal_uInt32, WeakReference<XInterface> > ComPtrToWrapperMap; +typedef boost::unordered_map<sal_uInt32, WeakReference<XInterface> >::iterator IT_Com; +typedef boost::unordered_map<sal_uInt32, WeakReference<XInterface> >::const_iterator CIT_Com; // Maps XInterface pointers to a weak reference of its wrapper class (i.e. // InterfaceOleWrapper_Impl). It is the responsibility of the wrapper to remove the entry when @@ -90,9 +90,9 @@ typedef hash_map<sal_uInt32, WeakReference<XInterface> >::const_iterator CIT_Com // is mapped to IDispatch which is kept alive in the COM environment. If the same // UNO interface is mapped again to COM then the IDispach of the first mapped instance // must be returned. -extern hash_map<sal_uInt32, WeakReference<XInterface> > UnoObjToWrapperMap; -typedef hash_map<sal_uInt32, WeakReference<XInterface> >::iterator IT_Uno; -typedef hash_map<sal_uInt32, WeakReference<XInterface> >::const_iterator CIT_Uno; +extern boost::unordered_map<sal_uInt32, WeakReference<XInterface> > UnoObjToWrapperMap; +typedef boost::unordered_map<sal_uInt32, WeakReference<XInterface> >::iterator IT_Uno; +typedef boost::unordered_map<sal_uInt32, WeakReference<XInterface> >::const_iterator CIT_Uno; #ifdef __MINGW32__ inline void reduceRange( Any& any); #endif @@ -1420,7 +1420,7 @@ void UnoConversionUtilities<T>::createUnoObjectWrapper(const Any & rObj, VARIANT else { Reference<XInterface> xIntComWrapper = xInt; - typedef hash_map<sal_uInt32,sal_uInt32>::iterator _IT; + typedef boost::unordered_map<sal_uInt32,sal_uInt32>::iterator _IT; // Adapter? then get the COM wrapper to which the adapter delegates its calls _IT it= AdapterToWrapperMap.find( (sal_uInt32) xInt.get()); if( it != AdapterToWrapperMap.end() ) @@ -1910,7 +1910,7 @@ Reference<XInterface> UnoConversionUtilities<T>::createAdapter(const Sequence<Ty // in a global map. Thus we can determine in a call to createUnoObjectWrapper whether the UNO // object is a wrapped COM object. In that case we extract the original COM object rather than // creating a wrapper around the UNO object. - typedef hash_map<sal_uInt32,sal_uInt32>::value_type VALUE; + typedef boost::unordered_map<sal_uInt32,sal_uInt32>::value_type VALUE; AdapterToWrapperMap.insert( VALUE( (sal_uInt32) xIntAdapted.get(), (sal_uInt32) receiver.get())); WrapperToAdapterMap.insert( VALUE( (sal_uInt32) receiver.get(), (sal_uInt32) xIntAdapted.get())); } diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx index 744e756ed4e2..96cc39625512 100644 --- a/extensions/source/ole/unoobjw.cxx +++ b/extensions/source/ole/unoobjw.cxx @@ -35,7 +35,7 @@ #include <olectl.h> #include <vector> #include <list> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <tools/postsys.h> @@ -66,7 +66,6 @@ #include "servprov.hxx" using namespace std; -using namespace rtl; using namespace osl; using namespace cppu; using namespace com::sun::star::uno; @@ -77,7 +76,7 @@ using namespace com::sun::star::lang; using namespace com::sun::star::bridge::ModelDependent; using namespace com::sun::star::reflection; - +using ::rtl::OUString; #if _MSC_VER < 1200 extern "C" const GUID IID_IDispatchEx; @@ -85,7 +84,7 @@ extern "C" const GUID IID_IDispatchEx; namespace ole_adapter { -hash_map<sal_uInt32, WeakReference<XInterface> > UnoObjToWrapperMap; +boost::unordered_map<sal_uInt32, WeakReference<XInterface> > UnoObjToWrapperMap; static sal_Bool writeBackOutParameter(VARIANTARG* pDest, VARIANT* pSource); static sal_Bool writeBackOutParameter2( VARIANTARG* pDest, VARIANT* pSource); static HRESULT mapCannotConvertException( CannotConvertException e, unsigned int * puArgErr); diff --git a/extensions/source/ole/unoobjw.hxx b/extensions/source/ole/unoobjw.hxx index 6bbf95ebdbb6..dbbe3d832498 100644 --- a/extensions/source/ole/unoobjw.hxx +++ b/extensions/source/ole/unoobjw.hxx @@ -86,7 +86,7 @@ struct MemberInfo OUString name; }; -typedef hash_map +typedef boost::unordered_map < OUString, DISPID, @@ -94,7 +94,7 @@ typedef hash_map equalOUString_Impl > NameToIdMap; -typedef hash_map +typedef boost::unordered_map < OUString, sal_Bool, @@ -102,7 +102,7 @@ typedef hash_map equalOUString_Impl > BadNameMap; -typedef hash_map +typedef boost::unordered_map < DISPID, MemberInfo diff --git a/extensions/source/ole/unotypewrapper.hxx b/extensions/source/ole/unotypewrapper.hxx index d6111368ca47..b43dcd7bc46c 100644 --- a/extensions/source/ole/unotypewrapper.hxx +++ b/extensions/source/ole/unotypewrapper.hxx @@ -35,7 +35,7 @@ #define STRICT #define _WIN32_WINNT 0x0403 #define _WIN32_DCOM -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 1 #define _ATL_DEBUG_INTERFACES #endif #include <atlbase.h> diff --git a/extensions/source/oooimprovecore/oooimprovecore_services.cxx b/extensions/source/oooimprovecore/oooimprovecore_services.cxx index 6c3a04539e30..0682cdef2947 100644 --- a/extensions/source/oooimprovecore/oooimprovecore_services.cxx +++ b/extensions/source/oooimprovecore/oooimprovecore_services.cxx @@ -37,15 +37,8 @@ namespace oooimprovecore static void initializeModule() { - static bool bInitialized(false); - if (!bInitialized) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if (!bInitialized) - { - createRegistryInfo_Core(); - } - } + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + createRegistryInfo_Core(); } } diff --git a/extensions/source/plugin/aqua/macmgr.cxx b/extensions/source/plugin/aqua/macmgr.cxx index 2d7d87c93fd0..2a67cc994b8e 100644 --- a/extensions/source/plugin/aqua/macmgr.cxx +++ b/extensions/source/plugin/aqua/macmgr.cxx @@ -33,11 +33,17 @@ #include "osl/file.h" #include "osl/module.hxx" -using namespace rtl; using namespace std; using namespace com::sun::star::uno; using namespace com::sun::star::plugin; +using ::rtl::OUString; +using ::rtl::OString; +using ::rtl::OUStringBuffer; +using ::rtl::OStringBuffer; +using ::rtl::OUStringToOString; +using ::rtl::OStringToOUString; + namespace plugstringhelper { diff --git a/extensions/source/plugin/aqua/makefile.mk b/extensions/source/plugin/aqua/makefile.mk index c0d3a2eed949..8d1aaa484d28 100644 --- a/extensions/source/plugin/aqua/makefile.mk +++ b/extensions/source/plugin/aqua/makefile.mk @@ -28,8 +28,6 @@ PRJ=..$/..$/.. PRJNAME=extensions TARGET=plaqua -#ENABLE_EXCEPTIONS=TRUE -#TARGETTYPE=CUI .INCLUDE : ..$/util$/makefile.pmk @@ -58,15 +56,6 @@ SLOFILES=\ $(SLO)$/macmgr.obj \ $(SLO)$/sysplug.obj -#APP1TARGET=pluginapp.bin -#APP1OBJS=$(OBJFILES) -#APP1STDLIBS=\ -# $(TOOLSLIB) \ -# $(SALLIB) - -#APP1DEF= $(MISC)$/$(TARGET).def - - # --- Targets ------------------------------------------------------ .INCLUDE : target.mk diff --git a/extensions/source/plugin/aqua/sysplug.cxx b/extensions/source/plugin/aqua/sysplug.cxx index 39e3fc5cc4c4..6b4c93202b85 100644 --- a/extensions/source/plugin/aqua/sysplug.cxx +++ b/extensions/source/plugin/aqua/sysplug.cxx @@ -38,9 +38,11 @@ extern NPNetscapeFuncs aNPNFuncs; #include <tools/debug.hxx> -using namespace rtl; using namespace plugstringhelper; +using ::rtl::OUString; +using ::rtl::OUStringToOString; + #if OSL_DEBUG_LEVEL > 1 void TRACE( char const * s ); void TRACEN( char const * s, long n ); @@ -682,7 +684,7 @@ NPError MacPluginComm::NPP_SetValue( NPP instance, NPNVariable variable, void *s //-------------------------------------------------------------------------------------------------- void * MacPluginComm::NPP_GetJavaClass() { - DBG_ERROR( "no java class available!" ); + OSL_FAIL( "no java class available!" ); return 0; } diff --git a/extensions/source/plugin/base/context.cxx b/extensions/source/plugin/base/context.cxx index 5f295a13e76b..4881a610fe71 100644 --- a/extensions/source/plugin/base/context.cxx +++ b/extensions/source/plugin/base/context.cxx @@ -35,10 +35,8 @@ #undef _LINUX_SOURCE_COMPAT #endif -#if STLPORT_VERSION>=321 #include <cstdarg> #include <cstdio> -#endif #include <plugin/impl.hxx> diff --git a/extensions/source/plugin/base/evtlstnr.cxx b/extensions/source/plugin/base/evtlstnr.cxx index d01844aadff6..4f1db5bd3e7e 100644 --- a/extensions/source/plugin/base/evtlstnr.cxx +++ b/extensions/source/plugin/base/evtlstnr.cxx @@ -35,9 +35,7 @@ #undef _LINUX_SOURCE_COMPAT #endif -#if STLPORT_VERSION>=321 #include <cstdarg> -#endif #include <plugin/impl.hxx> diff --git a/extensions/source/plugin/base/manager.cxx b/extensions/source/plugin/base/manager.cxx index 9c0bd7dc1c7d..338eb1940df9 100644 --- a/extensions/source/plugin/base/manager.cxx +++ b/extensions/source/plugin/base/manager.cxx @@ -35,9 +35,7 @@ #undef _LINUX_SOURCE_COMPAT #endif -#if STLPORT_VERSION>=321 #include <cstdarg> -#endif #include "plugin/impl.hxx" diff --git a/extensions/source/plugin/base/nfuncs.cxx b/extensions/source/plugin/base/nfuncs.cxx index 297f96a0a441..24e9939cb2ad 100644 --- a/extensions/source/plugin/base/nfuncs.cxx +++ b/extensions/source/plugin/base/nfuncs.cxx @@ -35,10 +35,7 @@ #undef _LINUX_SOURCE_COMPAT #endif -#if STLPORT_VERSION>=321 #include <cstdarg> -#endif - #include <list> #include <plugin/impl.hxx> @@ -87,9 +84,12 @@ void TRACES( char const* s, char const* s2 ) #define TRACES(x,s) #endif -using namespace rtl; using namespace com::sun::star::lang; +using ::rtl::OUString; +using ::rtl::OString; +using ::rtl::OStringToOUString; + NPNetscapeFuncs aNPNFuncs = { sizeof( NPNetscapeFuncs ), diff --git a/extensions/source/plugin/base/plcom.cxx b/extensions/source/plugin/base/plcom.cxx index 9aef0e1de458..1b4c9fbcb312 100644 --- a/extensions/source/plugin/base/plcom.cxx +++ b/extensions/source/plugin/base/plcom.cxx @@ -39,9 +39,7 @@ #include <limits> #endif -#if STLPORT_VERSION>=321 #include <cstdarg> -#endif #include <tools/fsys.hxx> #include <plugin/impl.hxx> diff --git a/extensions/source/plugin/base/plctrl.cxx b/extensions/source/plugin/base/plctrl.cxx index 4498ecedcb3b..dba569c1a1db 100644 --- a/extensions/source/plugin/base/plctrl.cxx +++ b/extensions/source/plugin/base/plctrl.cxx @@ -162,7 +162,7 @@ void PluginControl_Impl::createPeer( const Reference< ::com::sun::star::awt::XTo { if (_xPeer.is()) { - DBG_ERROR( "### Peer is already set!" ); + OSL_FAIL( "### Peer is already set!" ); return; } @@ -190,7 +190,7 @@ void PluginControl_Impl::createPeer( const Reference< ::com::sun::star::awt::XTo } else { - DBG_ERROR( "### cannot get implementation of parent peer!" ); + OSL_FAIL( "### cannot get implementation of parent peer!" ); } getMultiplexer()->setPeer( _xPeerWindow ); diff --git a/extensions/source/plugin/base/service.cxx b/extensions/source/plugin/base/service.cxx index 51a79bdbc153..bef0be999906 100644 --- a/extensions/source/plugin/base/service.cxx +++ b/extensions/source/plugin/base/service.cxx @@ -35,9 +35,7 @@ #undef _LINUX_SOURCE_COMPAT #endif -#if STLPORT_VERSION>=321 #include <cstdarg> -#endif #include <plugin/impl.hxx> #include <tools/debug.hxx> diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx index 49a8b08954ab..1eac4dd9c983 100644 --- a/extensions/source/plugin/base/xplugin.cxx +++ b/extensions/source/plugin/base/xplugin.cxx @@ -60,9 +60,11 @@ using namespace com::sun::star; using namespace com::sun::star::io; using namespace com::sun::star::beans; using namespace com::sun::star::plugin; -using namespace rtl; using namespace osl; +using ::rtl::OUString; +using ::rtl::OString; + class PluginDisposer : public salhelper::Timer { private: @@ -548,7 +550,7 @@ void XPlugin_Impl::loadPlugin() return; } - NPError aError = getPluginComm()-> + getPluginComm()-> NPP_New( (char*)OUStringToOString( m_aDescription.Mimetype, m_aEncoding).getStr(), getNPPInstance(), @@ -595,7 +597,7 @@ void XPlugin_Impl::loadPlugin() m_aNPWindow.width = aPosSize.Width ? aPosSize.Width : 600; m_aNPWindow.height = aPosSize.Height ? aPosSize.Height : 600; - aError = getPluginComm()->NPP_SetWindow( this ); + getPluginComm()->NPP_SetWindow( this ); } void XPlugin_Impl::destroyStreams() diff --git a/extensions/source/plugin/inc/plugin/plctrl.hxx b/extensions/source/plugin/inc/plugin/plctrl.hxx index 06ee50cb8e0a..d38cc7c01ed2 100644 --- a/extensions/source/plugin/inc/plugin/plctrl.hxx +++ b/extensions/source/plugin/inc/plugin/plctrl.hxx @@ -82,7 +82,6 @@ public: { return _xContext; } virtual sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & Model ) throw( ::com::sun::star::uno::RuntimeException ) = 0; -// { DBG_ERROR( "### setModel() illegal on plugincontrol!" ); return sal_False; } virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > SAL_CALL getModel() throw( ::com::sun::star::uno::RuntimeException ) = 0; virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XView > SAL_CALL getView() throw( ::com::sun::star::uno::RuntimeException ) diff --git a/extensions/source/plugin/inc/plugin/win/sysplug.hxx b/extensions/source/plugin/inc/plugin/win/sysplug.hxx index 45e09d98d950..c90c816e45d3 100644 --- a/extensions/source/plugin/inc/plugin/win/sysplug.hxx +++ b/extensions/source/plugin/inc/plugin/win/sysplug.hxx @@ -32,13 +32,9 @@ #pragma warning (push,1) #pragma warning (disable:4005) -#include <tools/prewin.h> - -#include <windows.h> +#include <prewin.h> #include <tchar.h> -#include <winbase.h> - -#include <tools/postwin.h> +#include <postwin.h> #pragma pack( push, 8 ) #include <npsdk/npapi.h> diff --git a/extensions/source/plugin/unx/makefile.mk b/extensions/source/plugin/unx/makefile.mk index 0e9b5d454596..7ed18c291a4c 100644 --- a/extensions/source/plugin/unx/makefile.mk +++ b/extensions/source/plugin/unx/makefile.mk @@ -71,13 +71,13 @@ APP1TARGET=pluginapp.bin APP1OBJS=$(OBJFILES) APP1STDLIBS= $(SALLIB) -.IF "$(OS)"=="SOLARIS" || "$(OS)"=="SCO" || "$(OS)"=="HPUX" +.IF "$(OS)"=="SOLARIS" || "$(OS)"=="SCO" APP1STDLIBS+=-lXm -lXt $(X11LINK_DYNAMIC) -ldl .ELSE .IF "$(DISABLE_XAW)" != "TRUE" APP1STDLIBS+=-lXaw .ENDIF -.IF "$(OS)"=="FREEBSD" || "$(OS)"=="NETBSD" || "$(OS)"=="OPENBSD" +.IF "$(OS)"=="FREEBSD" || "$(OS)"=="NETBSD" || "$(OS)"=="OPENBSD" || "$(OS)"=="DRAGONFLY" APP1STDLIBS+= -lXt -lXext -lX11 .ELIF "$(OS)"=="AIX" APP1STDLIBS+= -lXpm -lXmu -lXt $(X11LINK_DYNAMIC) -ldl diff --git a/extensions/source/plugin/unx/npnapi.cxx b/extensions/source/plugin/unx/npnapi.cxx index d4cb19e3bce0..f50af7c1d5d3 100644 --- a/extensions/source/plugin/unx/npnapi.cxx +++ b/extensions/source/plugin/unx/npnapi.cxx @@ -704,7 +704,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) gtk_widget_show( pInst->pGtkWidget ); gtk_container_add( GTK_CONTAINER(pInst->pGtkWindow), pInst->pGtkWidget ); gtk_widget_show_all( pInst->pGtkWindow ); - pInst->window.window = (void *)gtk_socket_get_id( GTK_SOCKET(pInst->pGtkWidget ) ); + pInst->window.window = (void *)(sal_uIntPtr)gtk_socket_get_id( GTK_SOCKET(pInst->pGtkWidget ) ); XSync( pAppDisplay, False ); diff --git a/extensions/source/plugin/unx/nppapi.cxx b/extensions/source/plugin/unx/nppapi.cxx index bf0faabf15dc..1353722fdf91 100644 --- a/extensions/source/plugin/unx/nppapi.cxx +++ b/extensions/source/plugin/unx/nppapi.cxx @@ -35,9 +35,7 @@ #undef _LINUX_SOURCE_COMPAT #endif -#if STLPORT_VERSION>=321 #include <cstdarg> -#endif #include <plugin/impl.hxx> #include <vcl/svapp.hxx> diff --git a/extensions/source/plugin/unx/unxmgr.cxx b/extensions/source/plugin/unx/unxmgr.cxx index 20c91bfba8b8..3ec32edd795b 100644 --- a/extensions/source/plugin/unx/unxmgr.cxx +++ b/extensions/source/plugin/unx/unxmgr.cxx @@ -46,11 +46,15 @@ #include <vcl/svapp.hxx> #include <plugin/impl.hxx> -using namespace rtl; using namespace std; using namespace com::sun::star::uno; using namespace com::sun::star::plugin; +using ::rtl::OUString; +using ::rtl::OString; +using ::rtl::OStringBuffer; +using ::rtl::OStringToOUString; + // Unix specific implementation static bool CheckPlugin( const ByteString& rPath, list< PluginDescription* >& rDescriptions ) { diff --git a/extensions/source/plugin/util/makefile.mk b/extensions/source/plugin/util/makefile.mk index 75baea867c21..cb5b751c7404 100644 --- a/extensions/source/plugin/util/makefile.mk +++ b/extensions/source/plugin/util/makefile.mk @@ -73,24 +73,16 @@ DEF1NAME=$(SHL1TARGET) SHL1LIBS=$(LIB1TARGET) -.IF "$(OS)"=="MACOSX" -SHL1STDLIBS= \ - $(LIBSTLPORT) \ - $(TKLIB) -.ELSE -SHL1STDLIBS= \ - $(TKLIB) -.ENDIF - SHL1STDLIBS+= \ + $(TKLIB) \ $(VCLLIB) \ $(SVLLIB) \ - $(UNOTOOLSLIB) \ + $(UNOTOOLSLIB) \ $(TOOLSLIB) \ $(UCBHELPERLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ - $(SALLIB) \ + $(SALLIB) \ $(SALHELPERLIB) .IF "$(GUIBASE)"=="unx" diff --git a/extensions/source/plugin/win/makefile.mk b/extensions/source/plugin/win/makefile.mk index 3167c22d135d..7f676ac16748 100644 --- a/extensions/source/plugin/win/makefile.mk +++ b/extensions/source/plugin/win/makefile.mk @@ -46,20 +46,13 @@ CDEFS+=-DOJI # --- Types ------------------------------------- .IF "$(WITH_MOZILLA)" != "NO" - -#UNOUCROUT=$(OUT)$/inc$/$(PRJNAME) -#INCPRE+=$(UNOUCROUT) - -# --- Types ------------------------------------- - SLOFILES = $(SLO)$/winmgr.obj \ $(SLO)$/sysplug.obj - .ENDIF # $(WITH_MOZILLA) != "NO" + .ENDIF # ------------------------------------------------------------------ - .INCLUDE : target.mk diff --git a/extensions/source/plugin/win/sysplug.cxx b/extensions/source/plugin/win/sysplug.cxx index c992341dc947..59e62c15188d 100644 --- a/extensions/source/plugin/win/sysplug.cxx +++ b/extensions/source/plugin/win/sysplug.cxx @@ -34,16 +34,11 @@ #pragma warning (push,1) #pragma warning (disable:4005) - #include <tools/prewin.h> - - #include <windows.h> - #include <string.h> - #include <tchar.h> - #include <winreg.h> - #include <winbase.h> - #include <objbase.h> - - #include <tools/postwin.h> +#include <prewin.h> +#include <string.h> +#include <tchar.h> +#include <objbase.h> +#include <postwin.h> #pragma warning (pop) @@ -56,7 +51,9 @@ extern NPNetscapeFuncs aNPNFuncs; #include <tools/debug.hxx> -using namespace rtl; +using ::rtl::OUString; +using ::rtl::OString; +using ::rtl::OUStringToOString; #if OSL_DEBUG_LEVEL > 1 void TRACE( char const * s ); @@ -426,7 +423,7 @@ NPError PluginComm_Impl::NPP_SetValue( NPP instance, NPNVariable variable, void //-------------------------------------------------------------------------------------------------- void * PluginComm_Impl::NPP_GetJavaClass() { - DBG_ERROR( "no java class available!" ); + OSL_FAIL( "no java class available!" ); return 0; } diff --git a/extensions/source/plugin/win/winmgr.cxx b/extensions/source/plugin/win/winmgr.cxx index 4717ec9423a6..23aa94464d02 100644 --- a/extensions/source/plugin/win/winmgr.cxx +++ b/extensions/source/plugin/win/winmgr.cxx @@ -43,16 +43,11 @@ #pragma warning (push,1) #pragma warning (disable:4005) - #include "tools/prewin.h" - - #include <windows.h> - #include <string.h> - #include <tchar.h> - #include <winreg.h> - #include <winbase.h> - #include <objbase.h> - - #include "tools/postwin.h" +#include <prewin.h> +#include <string.h> +#include <tchar.h> +#include <objbase.h> +#include <postwin.h> #pragma warning (pop) @@ -61,27 +56,17 @@ #include <algorithm> -using namespace rtl; using namespace std; using namespace osl; using namespace com::sun::star::uno; using namespace com::sun::star::plugin; -typedef map< OString, OUString, less< OString > > PluginLocationMap; - +using ::rtl::OUString; +using ::rtl::OString; +using ::rtl::OStringToOUString; +using ::rtl::OUStringToOString; -#if OSL_DEBUG_LEVEL > 1 -#include <stdio.h> - -static void logPlugin( OUString const & path_ ) -{ - static FILE * s_file = 0; - if (! s_file) - s_file = fopen( "d:\\plugins.log", "a+" ); - OString path( OUStringToOString( path_, RTL_TEXTENCODING_ASCII_US ) ); - fprintf( s_file, "%s\n", path.getStr() ); -} -#endif +typedef map< OString, OUString, less< OString > > PluginLocationMap; //__________________________________________________________________________________________________ static void addPluginsFromPath( const TCHAR * pPluginsPath, PluginLocationMap & rPlugins ) @@ -126,9 +111,6 @@ static void addPluginsFromPath( const TCHAR * pPluginsPath, PluginLocationMap & OUString path( OStringToOUString( arComplete, RTL_TEXTENCODING_MS_1252 ) ); rPlugins[ aName ] = path; -#if OSL_DEBUG_LEVEL > 1 - logPlugin( path ); -#endif } if (! ::FindNextFile( hFind, &aFindData )) @@ -257,9 +239,6 @@ static void add_MozPlugin( HKEY hKey, PluginLocationMap & rPlugins ) rPlugins.find( aName ) == rPlugins.end()) { rPlugins[ aName ] = aUPath; -#if OSL_DEBUG_LEVEL > 1 - logPlugin( aUPath ); -#endif } } } @@ -456,7 +435,7 @@ Sequence< PluginDescription > XPluginManager_Impl::impl_getPluginDescriptions(vo } #if OSL_DEBUG_LEVEL > 1 else - DBG_ERROR( "### cannot get MIME type or extensions!" ); + OSL_FAIL( "### cannot get MIME type or extensions!" ); #endif } if (pVersionData) diff --git a/extensions/source/preload/services.cxx b/extensions/source/preload/services.cxx index 5c2b199275f9..96305c2f8ef5 100644 --- a/extensions/source/preload/services.cxx +++ b/extensions/source/preload/services.cxx @@ -81,7 +81,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( } catch (InvalidRegistryException& ) { - OSL_ASSERT("preload::component_writeInfo: could not create a registry key (InvalidRegistryException) !"); + OSL_FAIL("preload::component_writeInfo: could not create a registry key (InvalidRegistryException) !"); } return sal_False; diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 02e663c820c4..f3c0ad6b97de 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -393,7 +393,6 @@ namespace pcr // doing the commit here, while we, as well as our owner, as well as some other components, // are already "half dead" (means within their dtor) is potentially dangerous. // By definition, CommitModified has to be called (if necessary) before destruction - // #105868# - 2002-12-13 - fs@openoffice.org m_pControlContextImpl->dispose(); m_pControlContextImpl.clear(); @@ -421,7 +420,7 @@ namespace pcr if ( IsModified() && m_xActiveControl.is() ) { // for the time of this commit, notify all events synchronously - // #i63814# / 2006-03-31 / frank.schoenheit@sun.com + // #i63814# m_pControlContextImpl->setNotificationMode( PropertyControlContext_Impl::eSynchronously ); try { @@ -975,7 +974,7 @@ namespace pcr ) if ( (*search)->second.pLine->getControl().get() == _rxControl.get() ) return sal_uInt16( search - m_aOrderedLines.begin() ); - DBG_ERROR( "OBrowserListBox::impl_getControlPos: invalid control - not part of any of our lines!" ); + OSL_FAIL( "OBrowserListBox::impl_getControlPos: invalid control - not part of any of our lines!" ); return (sal_uInt16)-1; } diff --git a/extensions/source/propctrlr/browserlistbox.hxx b/extensions/source/propctrlr/browserlistbox.hxx index d038f58c626d..3f6e4c995e52 100644 --- a/extensions/source/propctrlr/browserlistbox.hxx +++ b/extensions/source/propctrlr/browserlistbox.hxx @@ -45,7 +45,7 @@ #include <set> #include <vector> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <boost/shared_ptr.hpp> //............................................................................ @@ -76,7 +76,7 @@ namespace pcr { } }; - typedef ::std::hash_map< ::rtl::OUString, ListBoxLine, ::rtl::OUStringHash > ListBoxLines; + typedef ::boost::unordered_map< ::rtl::OUString, ListBoxLine, ::rtl::OUStringHash > ListBoxLines; typedef ::std::vector< ListBoxLines::iterator > OrderedListBoxLines; //======================================================================== diff --git a/extensions/source/propctrlr/browserview.cxx b/extensions/source/propctrlr/browserview.cxx index 3ec4e3bf3ded..be772262cd48 100644 --- a/extensions/source/propctrlr/browserview.cxx +++ b/extensions/source/propctrlr/browserview.cxx @@ -114,7 +114,7 @@ namespace pcr if ( ( KEY_DELETE == nKey ) || ( KEY_BACKSPACE == nKey ) ) // silence this, we don't want to propagate this outside the property // browser, as it will probably do harm there - // #i63285# / 2006-12-06 / frank.schoenheit@sun.com + // #i63285# return 1; } return Window::Notify( _rNEvt ); diff --git a/extensions/source/propctrlr/buttonnavigationhandler.cxx b/extensions/source/propctrlr/buttonnavigationhandler.cxx index 6435da2f763b..db097ce89cfb 100644 --- a/extensions/source/propctrlr/buttonnavigationhandler.cxx +++ b/extensions/source/propctrlr/buttonnavigationhandler.cxx @@ -121,7 +121,7 @@ namespace pcr break; default: - DBG_ERROR( "ButtonNavigationHandler::getPropertyState: cannot handle this property!" ); + OSL_FAIL( "ButtonNavigationHandler::getPropertyState: cannot handle this property!" ); break; } @@ -152,7 +152,7 @@ namespace pcr break; default: - DBG_ERROR( "ButtonNavigationHandler::getPropertyValue: cannot handle this property!" ); + OSL_FAIL( "ButtonNavigationHandler::getPropertyValue: cannot handle this property!" ); break; } diff --git a/extensions/source/propctrlr/cellbindinghandler.cxx b/extensions/source/propctrlr/cellbindinghandler.cxx index ea64279b2e81..aa293ce11d0a 100644 --- a/extensions/source/propctrlr/cellbindinghandler.cxx +++ b/extensions/source/propctrlr/cellbindinghandler.cxx @@ -175,7 +175,7 @@ namespace pcr aDependentProperties.push_back( PROPERTY_ID_BOUNDCOLUMN ); // also reset the list entries if the cell range is reset - // #i28319# - 2004-04-27 - fs@openoffice.org + // #i28319# if ( !_bFirstTimeInit ) { try @@ -202,7 +202,7 @@ namespace pcr break; // case PROPERTY_ID_CONTROLSOURCE default: - DBG_ERROR( "CellBindingPropertyHandler::actuatingPropertyChanged: did not register for this property!" ); + OSL_FAIL( "CellBindingPropertyHandler::actuatingPropertyChanged: did not register for this property!" ); } for ( ::std::vector< PropertyId >::const_iterator loopAffected = aDependentProperties.begin(); @@ -282,7 +282,7 @@ namespace pcr break; default: - DBG_ERROR( "CellBindingPropertyHandler::getPropertyValue: cannot handle this!" ); + OSL_FAIL( "CellBindingPropertyHandler::getPropertyValue: cannot handle this!" ); break; } return aReturn; @@ -342,7 +342,7 @@ namespace pcr break; default: - DBG_ERROR( "CellBindingPropertyHandler::setPropertyValue: cannot handle this!" ); + OSL_FAIL( "CellBindingPropertyHandler::setPropertyValue: cannot handle this!" ); break; } @@ -401,7 +401,7 @@ namespace pcr break; default: - DBG_ERROR( "CellBindingPropertyHandler::convertToPropertyValue: cannot handle this!" ); + OSL_FAIL( "CellBindingPropertyHandler::convertToPropertyValue: cannot handle this!" ); break; } @@ -456,7 +456,7 @@ namespace pcr break; default: - DBG_ERROR( "CellBindingPropertyHandler::convertToControlValue: cannot handle this!" ); + OSL_FAIL( "CellBindingPropertyHandler::convertToControlValue: cannot handle this!" ); break; } diff --git a/extensions/source/propctrlr/editpropertyhandler.cxx b/extensions/source/propctrlr/editpropertyhandler.cxx index 9dd3911cd7bd..cb5aac0137b6 100644 --- a/extensions/source/propctrlr/editpropertyhandler.cxx +++ b/extensions/source/propctrlr/editpropertyhandler.cxx @@ -134,7 +134,7 @@ namespace pcr default: - DBG_ERROR( "EditPropertyHandler::getPropertyValue: cannot handle this property!" ); + OSL_FAIL( "EditPropertyHandler::getPropertyValue: cannot handle this property!" ); break; } } diff --git a/extensions/source/propctrlr/eformshelper.cxx b/extensions/source/propctrlr/eformshelper.cxx index 387b3aa06479..0d1120658d86 100644 --- a/extensions/source/propctrlr/eformshelper.cxx +++ b/extensions/source/propctrlr/eformshelper.cxx @@ -47,6 +47,7 @@ #include <functional> #include <algorithm> +#include <o3tl/compat_functional.hxx> //........................................................................ namespace pcr @@ -715,7 +716,7 @@ namespace pcr } _rElementNames.resize( rMapUINameToElement.size() ); - ::std::transform( rMapUINameToElement.begin(), rMapUINameToElement.end(), _rElementNames.begin(), ::std::select1st< MapStringToPropertySet::value_type >() ); + ::std::transform( rMapUINameToElement.begin(), rMapUINameToElement.end(), _rElementNames.begin(), ::o3tl::select1st< MapStringToPropertySet::value_type >() ); } //-------------------------------------------------------------------- diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx index 68bd6ae46311..338eccc3262d 100644 --- a/extensions/source/propctrlr/eformspropertyhandler.cxx +++ b/extensions/source/propctrlr/eformspropertyhandler.cxx @@ -153,7 +153,7 @@ namespace pcr break; default: - DBG_ERROR( "EFormsPropertyHandler::getPropertyValue: cannot handle this property!" ); + OSL_FAIL( "EFormsPropertyHandler::getPropertyValue: cannot handle this property!" ); break; } } @@ -269,7 +269,7 @@ namespace pcr break; default: - DBG_ERROR( "EFormsPropertyHandler::setPropertyValue: cannot handle this property!" ); + OSL_FAIL( "EFormsPropertyHandler::setPropertyValue: cannot handle this property!" ); break; } @@ -463,7 +463,7 @@ namespace pcr case PROPERTY_ID_XSD_CALCULATION: aDescriptor.PrimaryButtonId = UID_PROP_DLG_XSD_CALCULATION; break; default: - DBG_ERROR( "EFormsPropertyHandler::describePropertyLine: cannot handle this property!" ); + OSL_FAIL( "EFormsPropertyHandler::describePropertyLine: cannot handle this property!" ); break; } @@ -606,7 +606,7 @@ namespace pcr break; default: - DBG_ERROR( "EFormsPropertyHandler::actuatingPropertyChanged: cannot handle this property!" ); + OSL_FAIL( "EFormsPropertyHandler::actuatingPropertyChanged: cannot handle this property!" ); break; } } diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx index 5f1df02469e1..e4716eda777e 100644 --- a/extensions/source/propctrlr/eventhandler.cxx +++ b/extensions/source/propctrlr/eventhandler.cxx @@ -78,6 +78,7 @@ #include <map> #include <algorithm> +#include <o3tl/compat_functional.hxx> //------------------------------------------------------------------------ extern "C" void SAL_CALL createRegistryInfo_EventHandler() @@ -265,7 +266,7 @@ namespace pcr || ( pAssignedEvent->ScriptType.getLength() == 0 ) ) { - DBG_ERROR( "lcl_getAssignedScriptEvent: me thinks this should not happen!" ); + OSL_FAIL( "lcl_getAssignedScriptEvent: me thinks this should not happen!" ); continue; } @@ -304,7 +305,7 @@ namespace pcr EventDescription aKnownEvent; if ( lcl_getEventDescriptionForMethod( _rFormComponentEventDescriptor.EventMethod, aKnownEvent ) ) return aKnownEvent.sListenerClassName; - DBG_ERROR( "lcl_getQualifiedKnownListenerName: unknown method name!" ); + OSL_FAIL( "lcl_getQualifiedKnownListenerName: unknown method name!" ); // somebody assigned an script to a form component event which we don't know // Speaking strictly, this is not really an error - it is possible to do // this programmatically -, but it should rarely happen, since it's not possible @@ -354,7 +355,7 @@ namespace pcr class EventHolder : public EventHolder_Base { private: - typedef ::std::hash_map< ::rtl::OUString, ScriptEventDescriptor, ::rtl::OUStringHash > EventMap; + typedef ::boost::unordered_map< ::rtl::OUString, ScriptEventDescriptor, ::rtl::OUStringHash > EventMap; typedef ::std::map< EventId, EventMap::iterator > EventMapIndexAccess; EventMap m_aEventNameAccess; @@ -845,7 +846,7 @@ namespace pcr StlSyntaxSequence< Property > aReturn( aOrderedProperties.size() ); ::std::transform( aOrderedProperties.begin(), aOrderedProperties.end(), aReturn.begin(), - ::std::select2nd< ::std::map< EventId, Property >::value_type >() ); + ::o3tl::select2nd< ::std::map< EventId, Property >::value_type >() ); return aReturn; } @@ -971,7 +972,7 @@ namespace pcr //-------------------------------------------------------------------- void SAL_CALL EventHandler::actuatingPropertyChanged( const ::rtl::OUString& /*_rActuatingPropertyName*/, const Any& /*_rNewValue*/, const Any& /*_rOldValue*/, const Reference< XObjectInspectorUI >& /*_rxInspectorUI*/, sal_Bool /*_bFirstTimeInit*/ ) throw (NullPointerException, RuntimeException) { - DBG_ERROR( "EventHandler::actuatingPropertyChanged: no actuating properties -> no callback (well, this is how it *should* be!)" ); + OSL_FAIL( "EventHandler::actuatingPropertyChanged: no actuating properties -> no callback (well, this is how it *should* be!)" ); } //-------------------------------------------------------------------- diff --git a/extensions/source/propctrlr/eventhandler.hxx b/extensions/source/propctrlr/eventhandler.hxx index 4ea10e0e6463..721ca8a0edac 100644 --- a/extensions/source/propctrlr/eventhandler.hxx +++ b/extensions/source/propctrlr/eventhandler.hxx @@ -79,7 +79,7 @@ namespace pcr sal_Int32 _nUniqueBrowseId ); }; - typedef ::std::hash_map< ::rtl::OUString, EventDescription, ::rtl::OUStringHash > EventMap; + typedef ::boost::unordered_map< ::rtl::OUString, EventDescription, ::rtl::OUStringHash > EventMap; //==================================================================== //= EventHandler diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index 1c06d9310974..0b2548a76bfe 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -281,7 +281,7 @@ namespace pcr } catch (Exception&) { - DBG_ERROR("ControlCharacterDialog::translatePropertiesToItems: caught an exception!"); + OSL_FAIL("ControlCharacterDialog::translatePropertiesToItems: caught an exception!"); } _pSet->DisableItem(SID_ATTR_CHAR_CJK_FONT); diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 63dac91d9b7f..3344a8a62c8b 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -1000,7 +1000,7 @@ namespace pcr String sDisplayName = m_pInfoService->getPropertyTranslation( nPropId ); if ( !sDisplayName.Len() ) { - DBG_ERROR( "FormComponentPropertyHandler::describePropertyLine: did getSupportedProperties not work properly?" ); + OSL_FAIL( "FormComponentPropertyHandler::describePropertyLine: did getSupportedProperties not work properly?" ); throw UnknownPropertyException(); } @@ -1513,7 +1513,7 @@ namespace pcr eResult = InteractiveSelectionResult_Pending; break; default: - DBG_ERROR( "FormComponentPropertyHandler::onInteractivePropertySelection: request for a property which does not have dedicated UI!" ); + OSL_FAIL( "FormComponentPropertyHandler::onInteractivePropertySelection: request for a property which does not have dedicated UI!" ); break; } return eResult; @@ -1801,7 +1801,7 @@ namespace pcr break; default: - DBG_ERROR( "FormComponentPropertyHandler::actuatingPropertyChanged: did not register for this property!" ); + OSL_FAIL( "FormComponentPropertyHandler::actuatingPropertyChanged: did not register for this property!" ); break; } // switch ( nActuatingPropId ) @@ -2389,7 +2389,7 @@ namespace pcr } catch (Exception&) { - DBG_ERROR( "FormComponentPropertyHandler::impl_initFieldList_nothrow: caught an exception!" ); + OSL_FAIL( "FormComponentPropertyHandler::impl_initFieldList_nothrow: caught an exception!" ); } } @@ -2443,7 +2443,7 @@ namespace pcr } catch( const Exception& ) { - DBG_ERROR( "FormComponentPropertyHandler::impl_ensureRowsetConnection_nothrow: caught an exception during error handling!" ); + OSL_FAIL( "FormComponentPropertyHandler::impl_ensureRowsetConnection_nothrow: caught an exception during error handling!" ); } // additional info about what happended String sInfo( PcrRes( RID_STR_UNABLETOCONNECT ) ); @@ -2503,7 +2503,7 @@ namespace pcr } catch (Exception&) { - DBG_ERROR("FormComponentPropertyHandler::impl_describeCursorSource_nothrow: caught an exception !"); + OSL_FAIL("FormComponentPropertyHandler::impl_describeCursorSource_nothrow: caught an exception !"); } } @@ -2846,7 +2846,6 @@ namespace pcr if ( INET_PROT_FILE == aParser.GetProtocol() ) // set the initial directory only for file-URLs. Everything else // is considered to be potentially expensive - // 106126 - 2002/12/10 - fs@openoffice.org aFileDlg.SetDisplayDirectory( sURL ); _rClearBeforeDialog.clear(); @@ -2900,7 +2899,6 @@ namespace pcr if ( INET_PROT_FILE == aParser.GetProtocol() ) // set the initial directory only for file-URLs. Everything else // is considered to be potentially expensive - // 106126 - 2002/12/10 - fs@openoffice.org aFileDlg.SetDisplayDirectory( sDataSource ); const String s_sDatabaseType = String::CreateFromAscii("StarOffice XML (Base)"); diff --git a/extensions/source/propctrlr/formmetadata.cxx b/extensions/source/propctrlr/formmetadata.cxx index 0155062b9dbb..05791a48cc38 100644 --- a/extensions/source/propctrlr/formmetadata.cxx +++ b/extensions/source/propctrlr/formmetadata.cxx @@ -651,7 +651,7 @@ namespace pcr } else { - DBG_ERROR( "DefaultEnumRepresentation::getValueFromDescription: could not translate the enum string!" ); + OSL_FAIL( "DefaultEnumRepresentation::getValueFromDescription: could not translate the enum string!" ); _out_rValue.clear(); } } @@ -675,7 +675,7 @@ namespace pcr } else { - DBG_ERROR( "DefaultEnumRepresentation::getDescriptionForValue: could not translate an enum value" ); + OSL_FAIL( "DefaultEnumRepresentation::getDescriptionForValue: could not translate an enum value" ); } return sReturn; } diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx index e86830db5624..f273f948e0e4 100644 --- a/extensions/source/propctrlr/genericpropertyhandler.cxx +++ b/extensions/source/propctrlr/genericpropertyhandler.cxx @@ -46,6 +46,7 @@ #include <cppuhelper/extract.hxx> #include <algorithm> +#include <o3tl/compat_functional.hxx> //------------------------------------------------------------------------ extern "C" void SAL_CALL createRegistryInfo_GenericPropertyHandler() @@ -171,7 +172,7 @@ namespace pcr _out_rValue = ::cppu::int2enum( aValues[ index ], m_aEnumType ); else { - DBG_ERROR( "EnumRepresentation::getValueFromDescription: cannot convert!" ); + OSL_FAIL( "EnumRepresentation::getValueFromDescription: cannot convert!" ); _out_rValue.clear(); } } @@ -195,7 +196,7 @@ namespace pcr sDescription = aDescriptions[ index ]; else { - DBG_ERROR( "EnumRepresentation::getDescriptionForValue: cannot convert!" ); + OSL_FAIL( "EnumRepresentation::getDescriptionForValue: cannot convert!" ); } return sDescription; } @@ -614,7 +615,7 @@ namespace pcr Sequence< Property > aReturn( m_aProperties.size() ); ::std::transform( m_aProperties.begin(), m_aProperties.end(), - aReturn.getArray(), ::std::select2nd< PropertyMap::value_type >() ); + aReturn.getArray(), ::o3tl::select2nd< PropertyMap::value_type >() ); return aReturn; } @@ -694,14 +695,14 @@ namespace pcr //-------------------------------------------------------------------- InteractiveSelectionResult SAL_CALL GenericPropertyHandler::onInteractivePropertySelection( const ::rtl::OUString& /*_rPropertyName*/, sal_Bool /*_bPrimary*/, Any& /*_rData*/, const Reference< XObjectInspectorUI >& /*_rxInspectorUI*/ ) throw (UnknownPropertyException, NullPointerException, RuntimeException) { - DBG_ERROR( "GenericPropertyHandler::onInteractivePropertySelection: I'm too dumb to know anything about property browse buttons!" ); + OSL_FAIL( "GenericPropertyHandler::onInteractivePropertySelection: I'm too dumb to know anything about property browse buttons!" ); return InteractiveSelectionResult_Cancelled; } //-------------------------------------------------------------------- void SAL_CALL GenericPropertyHandler::actuatingPropertyChanged( const ::rtl::OUString& /*_rActuatingPropertyName*/, const Any& /*_rNewValue*/, const Any& /*_rOldValue*/, const Reference< XObjectInspectorUI >& /*_rxInspectorUI*/, sal_Bool /*_bFirstTimeInit*/ ) throw (NullPointerException, RuntimeException) { - DBG_ERROR( "GenericPropertyHandler::actuatingPropertyChanged: no no no, I did not register for any actuating properties!" ); + OSL_FAIL( "GenericPropertyHandler::actuatingPropertyChanged: no no no, I did not register for any actuating properties!" ); } //-------------------------------------------------------------------- diff --git a/extensions/source/propctrlr/handlerhelper.cxx b/extensions/source/propctrlr/handlerhelper.cxx index fbdf4b18206e..65e5507deb34 100644 --- a/extensions/source/propctrlr/handlerhelper.cxx +++ b/extensions/source/propctrlr/handlerhelper.cxx @@ -113,7 +113,7 @@ namespace pcr break; default: - DBG_ERROR( "PropertyHandlerHelper::describePropertyLine: don't know how to represent this at the UI!" ); + OSL_FAIL( "PropertyHandlerHelper::describePropertyLine: don't know how to represent this at the UI!" ); // NO break! case TypeClass_STRING: diff --git a/extensions/source/propctrlr/pcrcommontypes.hxx b/extensions/source/propctrlr/pcrcommontypes.hxx index 434f395af4e5..7cec06d7e10c 100644 --- a/extensions/source/propctrlr/pcrcommontypes.hxx +++ b/extensions/source/propctrlr/pcrcommontypes.hxx @@ -34,14 +34,14 @@ /** === end UNO includes === **/ #include <rtl/ustring.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> //........................................................................ namespace pcr { //........................................................................ - typedef ::std::hash_map< ::rtl::OUString, ::com::sun::star::beans::Property, ::rtl::OUStringHash > + typedef ::boost::unordered_map< ::rtl::OUString, ::com::sun::star::beans::Property, ::rtl::OUStringHash > PropertyMap; //........................................................................ diff --git a/extensions/source/propctrlr/pcrservices.cxx b/extensions/source/propctrlr/pcrservices.cxx index 034aee9881ef..15ac891604cf 100644 --- a/extensions/source/propctrlr/pcrservices.cxx +++ b/extensions/source/propctrlr/pcrservices.cxx @@ -117,7 +117,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( } catch (InvalidRegistryException& ) { - OSL_ASSERT("pcr::component_writeInfo: could not create a registry key (InvalidRegistryException) !"); + OSL_FAIL("pcr::component_writeInfo: could not create a registry key (InvalidRegistryException) !"); } return sal_False; diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index efd52a54ccdb..2499e9aaa360 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -990,7 +990,7 @@ namespace pcr catch(Exception&) { - DBG_ERROR("OPropertyBrowserController::impl_rebindToInspectee_nothrow: caught an exception !"); + OSL_FAIL("OPropertyBrowserController::impl_rebindToInspectee_nothrow: caught an exception !"); } } @@ -1121,7 +1121,7 @@ namespace pcr } catch(Exception&) { - DBG_ERROR("OPropertyBrowserController::doInspection : caught an exception !"); + OSL_FAIL("OPropertyBrowserController::doInspection : caught an exception !"); } } @@ -1441,7 +1441,7 @@ namespace pcr } catch(Exception&) { - DBG_ERROR("OPropertyBrowserController::Commit : caught an exception !"); + OSL_FAIL("OPropertyBrowserController::Commit : caught an exception !"); } m_sCommittingProperty = ::rtl::OUString(); diff --git a/extensions/source/propctrlr/propcontroller.hxx b/extensions/source/propctrlr/propcontroller.hxx index e7c02599a723..70bcba95ad90 100644 --- a/extensions/source/propctrlr/propcontroller.hxx +++ b/extensions/source/propctrlr/propcontroller.hxx @@ -68,7 +68,7 @@ #include <comphelper/broadcasthelper.hxx> #include <map> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <vector> #include <memory> @@ -137,9 +137,9 @@ namespace pcr typedef ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler > PropertyHandlerRef; typedef ::std::vector< PropertyHandlerRef > PropertyHandlerArray; - typedef ::std::hash_map< ::rtl::OUString, PropertyHandlerRef, ::rtl::OUStringHash > + typedef ::boost::unordered_map< ::rtl::OUString, PropertyHandlerRef, ::rtl::OUStringHash > PropertyHandlerRepository; - typedef ::std::hash_multimap< ::rtl::OUString, PropertyHandlerRef, ::rtl::OUStringHash > + typedef ::boost::unordered_multimap< ::rtl::OUString, PropertyHandlerRef, ::rtl::OUStringHash > PropertyHandlerMultiRepository; PropertyHandlerRepository m_aPropertyHandlers; PropertyHandlerMultiRepository m_aDependencyHandlers; @@ -157,7 +157,7 @@ namespace pcr /// the property we're just committing ::rtl::OUString m_sCommittingProperty; - typedef ::std::hash_map< ::rtl::OUString, sal_uInt16, ::rtl::OUStringHash > HashString2Int16; + typedef ::boost::unordered_map< ::rtl::OUString, sal_uInt16, ::rtl::OUStringHash > HashString2Int16; HashString2Int16 m_aPageIds; bool m_bContainerFocusListening; diff --git a/extensions/source/propctrlr/propertyhandler.cxx b/extensions/source/propctrlr/propertyhandler.cxx index ee5e4dd67cc4..c3fe86810dba 100644 --- a/extensions/source/propctrlr/propertyhandler.cxx +++ b/extensions/source/propctrlr/propertyhandler.cxx @@ -248,14 +248,14 @@ namespace pcr //-------------------------------------------------------------------- InteractiveSelectionResult SAL_CALL PropertyHandler::onInteractivePropertySelection( const ::rtl::OUString& /*_rPropertyName*/, sal_Bool /*_bPrimary*/, Any& /*_rData*/, const Reference< XObjectInspectorUI >& /*_rxInspectorUI*/ ) throw (UnknownPropertyException, NullPointerException, RuntimeException) { - DBG_ERROR( "PropertyHandler::onInteractivePropertySelection: not implemented!" ); + OSL_FAIL( "PropertyHandler::onInteractivePropertySelection: not implemented!" ); return InteractiveSelectionResult_Cancelled; } //-------------------------------------------------------------------- void SAL_CALL PropertyHandler::actuatingPropertyChanged( const ::rtl::OUString& /*_rActuatingPropertyName*/, const Any& /*_rNewValue*/, const Any& /*_rOldValue*/, const Reference< XObjectInspectorUI >& /*_rxInspectorUI*/, sal_Bool /*_bFirstTimeInit*/ ) throw (NullPointerException, RuntimeException) { - DBG_ERROR( "PropertyHandler::actuatingPropertyChanged: not implemented!" ); + OSL_FAIL( "PropertyHandler::actuatingPropertyChanged: not implemented!" ); } //-------------------------------------------------------------------- diff --git a/extensions/source/propctrlr/submissionhandler.cxx b/extensions/source/propctrlr/submissionhandler.cxx index b14153383f6f..3a64005d3541 100644 --- a/extensions/source/propctrlr/submissionhandler.cxx +++ b/extensions/source/propctrlr/submissionhandler.cxx @@ -167,7 +167,7 @@ namespace pcr break; default: - DBG_ERROR( "SubmissionPropertyHandler::getPropertyValue: cannot handle this property!" ); + OSL_FAIL( "SubmissionPropertyHandler::getPropertyValue: cannot handle this property!" ); break; } } diff --git a/extensions/source/propctrlr/taborder.cxx b/extensions/source/propctrlr/taborder.cxx index 61dc96f287d7..c403f2d709e7 100644 --- a/extensions/source/propctrlr/taborder.cxx +++ b/extensions/source/propctrlr/taborder.cxx @@ -171,7 +171,7 @@ namespace pcr case FormComponentType::SPINBUTTON: nImageId = RID_SVXIMG_SPINBUTTON; break; case FormComponentType::NAVIGATIONBAR: nImageId = RID_SVXIMG_NAVIGATIONBAR; break; default: - DBG_ERROR( "TabOrderDialog::GetImage: unknown control type" ); + OSL_FAIL( "TabOrderDialog::GetImage: unknown control type" ); } } @@ -215,7 +215,7 @@ namespace pcr else { // no property set -> no tab order - DBG_ERROR( "TabOrderDialog::FillList: invalid control encountered!" ); + OSL_FAIL( "TabOrderDialog::FillList: invalid control encountered!" ); aLB_Controls.Clear(); break; } @@ -223,7 +223,7 @@ namespace pcr } catch( const Exception& ) { - DBG_ERROR( "TabOrderDialog::FillList: caught an exception!" ); + OSL_FAIL( "TabOrderDialog::FillList: caught an exception!" ); } // select first entry diff --git a/extensions/source/propctrlr/taborder.hxx b/extensions/source/propctrlr/taborder.hxx index 9a0d99f68bf2..e10416376704 100644 --- a/extensions/source/propctrlr/taborder.hxx +++ b/extensions/source/propctrlr/taborder.hxx @@ -41,7 +41,6 @@ #include <vcl/fixed.hxx> -#include <tools/list.hxx> #include <comphelper/uno3.hxx> //............................................................................ diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx index c254800af14c..ac69955ac444 100644 --- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx +++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx @@ -163,7 +163,7 @@ namespace pcr ::rtl::Reference< XSDDataType > pType = m_pHelper->getValidatingDataType(); if ( !pType.is() ) { - DBG_ERROR( "XSDValidationPropertyHandler::setPropertyValue: you're trying to set a type facet, without a current type!" ); + OSL_FAIL( "XSDValidationPropertyHandler::setPropertyValue: you're trying to set a type facet, without a current type!" ); return; } @@ -415,7 +415,7 @@ namespace pcr break; default: - DBG_ERROR( "XSDValidationPropertyHandler::describePropertyLine: cannot handle this property!" ); + OSL_FAIL( "XSDValidationPropertyHandler::describePropertyLine: cannot handle this property!" ); break; } @@ -471,7 +471,7 @@ namespace pcr break; default: - DBG_ERROR( "XSDValidationPropertyHandler::onInteractivePropertySelection: unexpected property to build a dedicated UI!" ); + OSL_FAIL( "XSDValidationPropertyHandler::onInteractivePropertySelection: unexpected property to build a dedicated UI!" ); break; } return InteractiveSelectionResult_Cancelled; @@ -503,7 +503,7 @@ namespace pcr ::rtl::Reference< XSDDataType > pType = m_pHelper->getValidatingDataType(); if ( !pType.is() ) { - DBG_ERROR( "XSDValidationPropertyHandler::implPrepareCloneDataCurrentType: invalid current data type!" ); + OSL_FAIL( "XSDValidationPropertyHandler::implPrepareCloneDataCurrentType: invalid current data type!" ); return false; } @@ -542,7 +542,7 @@ namespace pcr ::rtl::Reference< XSDDataType > pType = m_pHelper->getValidatingDataType(); if ( !pType.is() ) { - DBG_ERROR( "XSDValidationPropertyHandler::implPrepareRemoveCurrentDataType: invalid current data type!" ); + OSL_FAIL( "XSDValidationPropertyHandler::implPrepareRemoveCurrentDataType: invalid current data type!" ); return false; } @@ -656,7 +656,7 @@ namespace pcr break; default: - DBG_ERROR( "XSDValidationPropertyHandler::actuatingPropertyChanged: cannot handle this property!" ); + OSL_FAIL( "XSDValidationPropertyHandler::actuatingPropertyChanged: cannot handle this property!" ); return; } diff --git a/extensions/source/resource/resource.cxx b/extensions/source/resource/resource.cxx index 7c0a0fd60616..55fd5944bbbd 100644 --- a/extensions/source/resource/resource.cxx +++ b/extensions/source/resource/resource.cxx @@ -51,7 +51,6 @@ #include <rtl/ustring.hxx> #include <rtl/strbuf.hxx> -using namespace rtl; using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::registry; @@ -59,6 +58,11 @@ using namespace com::sun::star::script; using namespace com::sun::star::beans; using namespace com::sun::star::reflection; +using ::rtl::OUString; +using ::rtl::OStringBuffer; +using ::rtl::OUStringToOString; +using ::rtl::OStringToOUString; + //------------------------------------------------------------------------ //------------------------------------------------------------------------ //------------------------------------------------------------------------ diff --git a/extensions/source/scanner/makefile.mk b/extensions/source/scanner/makefile.mk index baaefdf66e7d..99c1e43e547d 100644 --- a/extensions/source/scanner/makefile.mk +++ b/extensions/source/scanner/makefile.mk @@ -77,7 +77,7 @@ SHL1STDLIBS=\ $(SVTOOLLIB) .IF "$(GUI)"=="UNX" && "$(OS)"!="FREEBSD" && \ - "$(OS)"!="NETBSD" && "$(OS)"!="OPENBSD" + "$(OS)"!="NETBSD" && "$(OS)"!="OPENBSD" && "$(OS)"!="DRAGONFLY" SHL1STDLIBS+=$(SVTOOLLIB) -ldl .ENDIF diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index d1e8ed07ad58..2145a6c371ea 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -40,9 +40,6 @@ #include <math.h> #include <sal/macros.h> -#define USE_SAVE_STATE -#undef SAVE_ALL_STATES - ResId SaneResId( sal_uInt32 nID ) { static ResMgr* pResMgr = ResMgr::CreateResMgr( "san" ); @@ -224,7 +221,7 @@ void SaneDlg::InitFields() maReslBox.SetMin( (long)pDouble[0] ); maReslBox.SetMax( (long)pDouble[1] ); maReslBox.InsertValue( (long)pDouble[0] ); - // mh@openoffice.org: issue 68557: Can only select 75 and 2400 dpi in Scanner dialogue + // Can only select 75 and 2400 dpi in Scanner dialogue // scanner allows random setting of dpi resolution, a slider might be useful // support that // workaround: offer at least some more standard dpi resolution between @@ -1170,7 +1167,6 @@ void SaneDlg::UpdateScanArea( BOOL bSend ) BOOL SaneDlg::LoadState() { -#ifdef USE_SAVE_STATE int i; if( ! Sane::IsSane() ) @@ -1236,14 +1232,10 @@ BOOL SaneDlg::LoadState() InitFields(); return TRUE; -#else - return FALSE; -#endif } void SaneDlg::SaveState() { -#ifdef USE_SAVE_STATE if( ! Sane::IsSane() ) return; @@ -1256,59 +1248,6 @@ void SaneDlg::SaveState() aConfig.SetGroup( "SANE" ); aConfig.WriteKey( "SO_LastSANEDevice", ByteString( maDeviceBox.GetSelectEntry(), RTL_TEXTENCODING_UTF8 ) ); -#ifdef SAVE_ALL_STATES - for( int i = 1; i < mrSane.CountOptions(); i++ ) - { - String aOption=mrSane.GetOptionName( i ); - SANE_Value_Type nType = mrSane.GetOptionType( i ); - switch( nType ) - { - case SANE_TYPE_BOOL: - { - BOOL bValue; - if( mrSane.GetOptionValue( i, bValue ) ) - { - ByteString aString( "BOOL=" ); - aString += (ULONG)bValue; - aConfig.WriteKey( aOption, aString ); - } - } - break; - case SANE_TYPE_STRING: - { - String aString( "STRING=" ); - String aValue; - if( mrSane.GetOptionValue( i, aValue ) ) - { - aString += aValue; - aConfig.WriteKey( aOption, aString ); - } - } - break; - case SANE_TYPE_FIXED: - case SANE_TYPE_INT: - { - String aString( "NUMERIC=" ); - double fValue; - char buf[256]; - for( int n = 0; n < mrSane.GetOptionElements( i ); n++ ) - { - if( ! mrSane.GetOptionValue( i, fValue, n ) ) - break; - if( n > 0 ) - aString += ":"; - sprintf( buf, "%lg", fValue ); - aString += buf; - } - if( n >= mrSane.GetOptionElements( i ) ) - aConfig.WriteKey( aOption, aString ); - } - break; - default: - break; - } - } -#else static char const* pSaveOptions[] = { "resolution", "tl-x", @@ -1373,8 +1312,6 @@ void SaneDlg::SaveState() } } } -#endif -#endif } BOOL SaneDlg::SetAdjustedNumericalValue( diff --git a/extensions/source/scanner/scanner.hxx b/extensions/source/scanner/scanner.hxx index 52bba3113938..15af9d83f144 100644 --- a/extensions/source/scanner/scanner.hxx +++ b/extensions/source/scanner/scanner.hxx @@ -42,11 +42,12 @@ #include <com/sun/star/scanner/XScannerManager.hpp> #include <com/sun/star/scanner/ScannerException.hpp> -using namespace rtl; using namespace cppu; using namespace com::sun::star::uno; using namespace com::sun::star::scanner; +using ::rtl::OUString; + // ----------- // - Defines - // ----------- diff --git a/extensions/source/scanner/scanunx.cxx b/extensions/source/scanner/scanunx.cxx index 3b26c18afe52..a94a97982c28 100644 --- a/extensions/source/scanner/scanunx.cxx +++ b/extensions/source/scanner/scanunx.cxx @@ -31,7 +31,6 @@ #include <scanner.hxx> #include <sanedlg.hxx> #include <osl/thread.hxx> -#include <tools/list.hxx> #include <boost/shared_ptr.hpp> #if OSL_DEBUG_LEVEL > 1 diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx index f1fd8b69c8af..b292833cf375 100644 --- a/extensions/source/scanner/scanwin.cxx +++ b/extensions/source/scanner/scanwin.cxx @@ -598,7 +598,7 @@ uno::Reference< frame::XFrame > ImpTwain::ImplGetActiveFrame() catch( const beans::UnknownPropertyException& ) { // property unknown. - DBG_ERROR("ImpTwain::ImplGetActiveFrame: ActiveFrame property unknown, cannot determine active frame!"); + OSL_FAIL("ImpTwain::ImplGetActiveFrame: ActiveFrame property unknown, cannot determine active frame!"); return uno::Reference< frame::XFrame >(); } @@ -617,7 +617,7 @@ uno::Reference< frame::XFrame > ImpTwain::ImplGetActiveFrame() { } - DBG_ERROR("ImpTwain::ImplGetActiveFrame: Could not determine active frame!"); + OSL_FAIL("ImpTwain::ImplGetActiveFrame: Could not determine active frame!"); return uno::Reference< frame::XFrame >(); } @@ -633,7 +633,7 @@ uno::Reference< util::XCloseBroadcaster > ImpTwain::ImplGetActiveFrameCloseBroad { } - DBG_ERROR("ImpTwain::ImplGetActiveFrameCloseBroadcaster: Could determine close broadcaster on active frame!"); + OSL_FAIL("ImpTwain::ImplGetActiveFrameCloseBroadcaster: Could determine close broadcaster on active frame!"); return uno::Reference< util::XCloseBroadcaster >(); } @@ -653,7 +653,7 @@ void ImpTwain::ImplRegisterCloseListener() else { // interface unknown. don't register, then - DBG_ERROR("ImpTwain::ImplRegisterCloseListener: XFrame has no XCloseBroadcaster!"); + OSL_FAIL("ImpTwain::ImplRegisterCloseListener: XFrame has no XCloseBroadcaster!"); return; } } @@ -661,7 +661,7 @@ void ImpTwain::ImplRegisterCloseListener() { } - DBG_ERROR("ImpTwain::ImplRegisterCloseListener: Could not register as close listener!"); + OSL_FAIL("ImpTwain::ImplRegisterCloseListener: Could not register as close listener!"); } // ----------------------------------------------------------------------------- @@ -681,7 +681,7 @@ void ImpTwain::ImplDeregisterCloseListener() else { // interface unknown. don't deregister, then - DBG_ERROR("ImpTwain::ImplDeregisterCloseListener: XFrame has no XCloseBroadcaster!"); + OSL_FAIL("ImpTwain::ImplDeregisterCloseListener: XFrame has no XCloseBroadcaster!"); return; } } @@ -689,7 +689,7 @@ void ImpTwain::ImplDeregisterCloseListener() { } - DBG_ERROR("ImpTwain::ImplDeregisterCloseListener: Could not deregister as close listener!"); + OSL_FAIL("ImpTwain::ImplDeregisterCloseListener: Could not deregister as close listener!"); } // ----------------------------------------------------------------------------- @@ -708,7 +708,7 @@ void SAL_CALL ImpTwain::queryClosing( const lang::EventObject& /*Source*/, sal_B void SAL_CALL ImpTwain::notifyClosing( const lang::EventObject& /*Source*/ ) throw (uno::RuntimeException) { // should not happen - DBG_ERROR("ImpTwain::notifyClosing called, but we vetoed the closing before!"); + OSL_FAIL("ImpTwain::notifyClosing called, but we vetoed the closing before!"); } // ----------------------------------------------------------------------------- @@ -733,7 +733,7 @@ void ImpTwain::ImplSendCloseEvent() { } - DBG_ERROR("ImpTwain::ImplSendCloseEvent: Could not send required close broadcast!"); + OSL_FAIL("ImpTwain::ImplSendCloseEvent: Could not send required close broadcast!"); } diff --git a/extensions/source/svg/svgaction.cxx b/extensions/source/svg/svgaction.cxx index 97e1921542c2..e3881c5f5b88 100644 --- a/extensions/source/svg/svgaction.cxx +++ b/extensions/source/svg/svgaction.cxx @@ -519,7 +519,7 @@ void SVGActionWriter::ImplWriteLine( const Point& rPt1, const Point& rPt2, const if( pLineColor ) { // !!! mrExport.AddAttribute( XML_NAMESPACE_NONE, ... ) - DBG_ERROR( "SVGActionWriter::ImplWriteLine: Line color not implemented" ); + OSL_FAIL( "SVGActionWriter::ImplWriteLine: Line color not implemented" ); } { diff --git a/extensions/source/update/tools/makefile.mk b/extensions/source/update/tools/makefile.mk index d6baac98680a..110887bb102f 100644 --- a/extensions/source/update/tools/makefile.mk +++ b/extensions/source/update/tools/makefile.mk @@ -41,28 +41,4 @@ APP1TARGET = ztool APP1OBJS = $(OBJ)$/ztool.obj APP1STDLIBS = $(TOOLSLIB) -#APP1TARGET = ztool -#APP1OBJS = $(OBJ)$/ztool.obj -#.IF "$(GUI)" == "UNX" -#APP1STDLIBS = $(TOOLSLIB) -#.ELSE -#APP1LIBS = $(LB)$/itools.lib -#.ENDIF - -#APP2TARGET = urltest -#APP2OBJS = $(OBJ)$/urltest.obj -#.IF "$(GUI)" == "UNX" -#APP2STDLIBS = $(TOOLSLIB) $(SALLIB) $(CPPULIB) $(CPPUHELPERLIB) -#.ELSE -#APP2STDLIBS = $(LB)$/itools.lib isal.lib icppu.lib icppuhelper.lib -#.ENDIF - -# APP3TARGET = tldem -# APP3OBJS = $(OBJ)$/tldem.obj -# .IF "$(GUI)" == "UNX" -# APP3STDLIBS = $(TOOLSLIB) -# .ELSE -# APP3STDLIBS = $(LB)$/itools.lib -# .ENDIF - .INCLUDE: target.mk diff --git a/extensions/test/ole/OleClient/clientTest.cxx b/extensions/test/ole/OleClient/clientTest.cxx index 684644e47cec..fe780c7a2ecc 100644 --- a/extensions/test/ole/OleClient/clientTest.cxx +++ b/extensions/test/ole/OleClient/clientTest.cxx @@ -60,9 +60,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::script; using namespace com::sun::star::bridge::oleautomation; using namespace cppu; -using namespace rtl; - +using ::rtl::OUString; Reference<XInvocation> convertComObject( IUnknown* pUnk); Reference<XInvocation> getComObject( OUString progId); @@ -1240,12 +1239,6 @@ HRESULT doTest() aAny <<= OUString( L" A string in an any"); aAny=invMfc->invoke( OUString(L"inVariant"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut); - // Tests with Sequences later. - // OUString arStr4[]= {L"string0", L"string1", L"string2"}; - // Sequence<OUString> seqStr4( arStr4, 3); - // aAny <<= seqStr4; - // invMfc->invoke( OUString(L"inArray"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut); - Reference < XInvocation > inv5= getComObject(L"AxTestComponents.Basic"); Any anyVal4; diff --git a/extensions/test/ole/OleClient/funcs.cxx b/extensions/test/ole/OleClient/funcs.cxx index 231f5bc825db..5f2d1d8b6c90 100644 --- a/extensions/test/ole/OleClient/funcs.cxx +++ b/extensions/test/ole/OleClient/funcs.cxx @@ -50,9 +50,10 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::script; using namespace com::sun::star::bridge::oleautomation; -using namespace rtl; using namespace cppu; +using ::rtl::OUString; + template< class T > bool equalSequences(const Sequence<T>& seqIn, const Sequence<Any> & returned); diff --git a/extensions/test/ole/OleConverterVar1/convTest.cxx b/extensions/test/ole/OleConverterVar1/convTest.cxx index 6cc6e47462ac..c9955d40d169 100644 --- a/extensions/test/ole/OleConverterVar1/convTest.cxx +++ b/extensions/test/ole/OleConverterVar1/convTest.cxx @@ -63,7 +63,9 @@ using namespace com::sun::star::lang; using namespace com::sun::star::uno; using namespace oletest; using namespace cppu; -using namespace rtl; + +using ::rtl::OUString; + HRESULT doTest(); HRESULT InitializeParameter(); void printResultVariantArray( VARIANT & var); diff --git a/extensions/test/ole/cpnt/cpnt.cxx b/extensions/test/ole/cpnt/cpnt.cxx index eff03c8aedd4..c7d6661ddf9d 100644 --- a/extensions/test/ole/cpnt/cpnt.cxx +++ b/extensions/test/ole/cpnt/cpnt.cxx @@ -62,7 +62,6 @@ using namespace cppu; using namespace osl; using namespace oletest; -using namespace rtl; using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::beans; @@ -70,6 +69,8 @@ using namespace com::sun::star::registry; using namespace com::sun::star::script; using namespace com::sun::star::reflection; +using ::rtl::OUString; + #define IMPL_NAME L"oletest.OleTestImpl" // oletest.OleTestImpl in applicat.rdb #define SERVICE_NAME L"oletest.OleTest" @@ -280,29 +281,6 @@ public: // XTestSequence virtual Any SAL_CALL other_methodAny( const Any& rAny, const OUString& typeInAny ) throw (RuntimeException); - - // XTestOutParameters ------------------------------------------------------------------------ -// virtual void SAL_CALL out_test(sal_Int8 rIn) throw( RuntimeException ); - -// virtual void SAL_CALL out_methodByte(sal_Int8& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodFloat(float& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodDouble(double& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodBool(sal_Bool& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodShort(sal_Int16& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodUShort(sal_uInt16& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodLong(sal_Int32& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodULong(sal_uInt32& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodHyper(sal_Int64& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodUHyper(sal_uInt64& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodString(OUString& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodChar(sal_Unicode& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodAny(Any& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodMulParams1(sal_Int32& rout1, sal_Int32& rout2) throw( RuntimeException ); -// virtual void SAL_CALL out_methodMulParams2(sal_Int32& rout1, sal_Int32& rout2, OUString& rout3) throw( RuntimeException ); -// virtual void SAL_CALL out_methodMulParams3(const OUString& sin, OUString& sout) throw( RuntimeException ); - // XTestInParameters virtual sal_Int8 SAL_CALL in_methodByte( sal_Int8 rIn ) throw (RuntimeException); virtual float SAL_CALL in_methodFloat( float rIn ) throw (RuntimeException); @@ -526,8 +504,7 @@ Sequence< Type > SAL_CALL OComponent::methodType(const Sequence< Type >& aSeq) t } return aSeq; } -//Sequence< Reference< XInterface> > SAL_CALL methodXInterface ( const Sequence< Reference < XInterface> >& aSeq) -// throw (RuntimeException) + Sequence< Reference< XInterface > > SAL_CALL OComponent::methodXInterface( const Sequence< Reference< XInterface > >& aSeq ) throw(RuntimeException) { for( sal_Int32 i= 0; i < aSeq.getLength(); i++) @@ -993,9 +970,6 @@ void SAL_CALL OComponent::testout_methodMulParams4( float in1, float& out1, sal_ void SAL_CALL OComponent::testout_methodXInterface( Reference< XInterface >& rOut ) throw(RuntimeException) { rOut = m_xinterface; -// OUString string( L"Property Any"); -// m_any <<= string; -// rOut= Reference<XInterface> (static_cast<XTestSequence*>(this), UNO_QUERY); } // XTestInParameters ------------------------------------------------------------ @@ -1250,17 +1224,6 @@ void SAL_CALL OComponent::testinout_methodXInterface2( Reference< XInterface > & Reference<XInterface> tmp = rOut; rOut = m_xinterface; m_xinterface = tmp; -// Reference<XTestSequence> xTest( rOut, UNO_QUERY); -// if( xTest.is()) -// { -// Any any= xTest->getAttrAny2(); -// OUString _s; -// any >>= _s; -// OUString string= _s + OUString((L" this string was written in the UNO component to the inout pararmeter")); -// any <<= string; -// xTest->setAttrAny2( any); -// } - } Any SAL_CALL OComponent::methodAnyTest1(const Any& rIn) throw( RuntimeException ) { @@ -1360,94 +1323,6 @@ Any SAL_CALL OComponent::other_methodAny( const Any& rAny, const OUString& typeI return rAny; } -// XTestOutParameters ============================================================================ -// void SAL_CALL OComponent::out_test(sal_Int8 rIn) throw( RuntimeException ) -// { -// } - -// void SAL_CALL OComponent::out_methodByte(sal_Int8& rOut) throw( RuntimeException ) -// { -// rOut= 100; -// } - -// void SAL_CALL OComponent::out_methodDouble(double& rOut) throw( RuntimeException ) -// { -// rOut= 3.14; -// } -// void SAL_CALL OComponent::out_methodFloat(float& rOut) throw( RuntimeException ) -// { -// rOut= 3.14; -// } -// void SAL_CALL OComponent::out_methodBool(sal_Bool& rOut) throw( RuntimeException ) -// { -// rOut= sal_True; -// } -// void SAL_CALL OComponent::out_methodShort(sal_Int16& rOut) throw( RuntimeException ) -// { -// rOut= -100; -// } -// void SAL_CALL OComponent::out_methodUShort(sal_uInt16& rOut) throw( RuntimeException ) -// { -// rOut= 100; -// } -// void SAL_CALL OComponent::out_methodLong(sal_Int32& rOut) throw( RuntimeException ) -// { -// rOut= -100; -// } - -// void SAL_CALL OComponent::out_methodULong(sal_uInt32& rOut) throw( RuntimeException ) -// { -// rOut= 100; -// } -// void SAL_CALL OComponent::out_methodHyper(sal_Int64& rOut) throw( RuntimeException ) -// { - -// } - -// void SAL_CALL OComponent::out_methodUHyper(sal_uInt64& rOut) throw( RuntimeException ) -// { -// } - -// void SAL_CALL OComponent::out_methodString(OUString& rOut) throw( RuntimeException ) -// { -// rOut= L"I'm a string"; -// } -// void SAL_CALL OComponent::out_methodChar(sal_Unicode& rOut) throw( RuntimeException ) -// { -// rOut= 'A'; -// } -// void SAL_CALL OComponent::out_methodAny(Any& rOut) throw( RuntimeException) -// { -// Any a; -// a <<= OUString( L"Hi"); -// rOut= a; -// } -// void SAL_CALL OComponent::out_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException ) -// { -// Sequence< sal_Int32 > aseq(10); -// for( sal_Int16 i= 0; i < aseq.getLength(); i++) aseq.getArray()[i]= i; -// rOut= aseq; -// } -// void SAL_CALL OComponent::out_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException ) -// { -// rOut= Sequence< Sequence< sal_Int32 > >(); -// } -// void SAL_CALL OComponent::out_methodMulParams1(sal_Int32& rout1, sal_Int32& rout2) throw( RuntimeException ) -// { -// rout1= 111; -// rout2= 222; -// } -// void SAL_CALL OComponent::out_methodMulParams2(sal_Int32& rout1, sal_Int32& rout2, OUString& rout3) throw( RuntimeException ) -// { -// rout1= 111; -// rout2= 222; -// rout3= L"this is a neet little string"; -// } -// void SAL_CALL OComponent::out_methodMulParams3(const OUString& sin, OUString& sout) throw( RuntimeException ) -// { -// sout= L"this is a neet little string"; -// } - // XTestInterfaces ------------------------------------------------------------------------------------- void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallback, sal_Int32 mode ) throw(RuntimeException) { @@ -1469,8 +1344,6 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac sal_Int8 aByte; sal_Int16 aShort; sal_Int32 aLong; -// sal_uInt16 aUShort; -// sal_uInt32 aULong; switch( mode) { @@ -1588,8 +1461,6 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac sal_Int8 aByte; sal_Int16 aShort; sal_Int32 aLong; -// sal_uInt16 aUShort; -// sal_uInt32 aULong; xCallback->outValuesAll( xSimple, aSimpleStruct, aSimpleEnum, seqAny, aAny, aBool, aChar, aString, aFloat, aDouble, @@ -1880,25 +1751,10 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac Reference<XInterface> xIntCallback= oleFact->createInstance(L"XCallback_Impl.Callback"); Reference<XInvocation> xInv( xIntCallback, UNO_QUERY); -//Any SAL_CALL invoke( const OUString& aFunctionName, const Sequence<Any >& aParams,Sequence< sal_Int16 >& aOutParamIndex, -// Sequence<Any >& aOutParam ); Sequence<sal_Int16> seqIndizes; Sequence<Any> seqOutParams; xInv->invoke( OUString( L"outValuesAll"), Sequence<Any>(), seqIndizes, seqOutParams); -// void outValuesAll( [out] oletest::XSimple outInterface, -// [out] SimpleStruct outStruct , -// [out] SimpleEnum outEnum, -// [out] sequence<any> outSeqAny, -// [out] any outAny, -// [out] boolean outBool, -// [out] char outChar, -// [out] string outString, -// [out] float outFloat, -// [out] double outDouble, -// [out] byte outByte, -// [out] short outShort, -// [out] long outLong); if( seqOutParams.getLength() == 12) { Reference<XSimple> xSimple= *(XSimple**)seqOutParams[0].getValue(); @@ -2026,8 +1882,6 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac break; } case 303: - // in parameter -// void inValues( [in] char aChar, [in] long aLong, [in] string aString); { Reference<XInterface> xIntFact = m_rFactory->createInstance( L"com.sun.star.bridge.oleautomation.Factory"); @@ -2082,7 +1936,6 @@ sal_Bool SAL_CALL OComponent::isSame( const Reference< XInterface >& val ) throw Reference< XInterface > SAL_CALL OComponent::getThis( ) throw (RuntimeException) { -// return Reference<XInterface>(static_cast<XIdentity*>(this), UNO_QUERY); Reference<XInterface> ret(static_cast<XIdentity*>(this), UNO_QUERY); return ret; } diff --git a/extensions/test/ole/cpnt/makefile.mk b/extensions/test/ole/cpnt/makefile.mk index 53d3cc321c49..65601edd9444 100644 --- a/extensions/test/ole/cpnt/makefile.mk +++ b/extensions/test/ole/cpnt/makefile.mk @@ -35,20 +35,6 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk # --- Files -------------------------------------------------------- -#UNOUCRDEP= $(SOLARBINDIR)$/types.rdb $(BIN)$/oletest.rdb -#UNOUCRRDB= $(SOLARBINDIR)$/types.rdb $(BIN)$/oletest.rdb - -#UNOUCROUT= $(OUT)$/inc - -#UNOTYPES= oletest.XTestSequence \ -# oletest.XTestStruct \ -# oletest.XTestOther \ -# oletest.XTestInterfaces \ -# oletest.XSimple \ -# oletest.XSimple2 \ -# oletest.XSimple3 \ -# oletest.XTestInParameters \ -# oletest.XIdentity INCPRE+= -I$(ATL_INCLUDE) @@ -62,12 +48,8 @@ SHL1STDLIBS= \ $(CPPULIB) \ $(CPPUHELPERLIB) -#.IF "$(COMEX)"=="8" || "$(COMEX)"=="10" -# SHL1STDLIBS+= $(COMPATH)$/atlmfc$/lib$/atls.lib -#.ENDIF - .IF "$(COMEX)"=="8" || "$(COMEX)"=="10" -.IF "$(USE_STLP_DEBUG)" != "" +.IF "$(USE_DEBUG_RUNTIME)" != "" SHL1STDLIBS+= $(ATL_LIB)$/atlsd.lib .ELSE SHL1STDLIBS+= $(ATL_LIB)$/atls.lib diff --git a/extensions/test/ole/cppToUno/testcppuno.cxx b/extensions/test/ole/cppToUno/testcppuno.cxx index 6c4745a0f5cd..80d93dfb731c 100644 --- a/extensions/test/ole/cppToUno/testcppuno.cxx +++ b/extensions/test/ole/cppToUno/testcppuno.cxx @@ -54,7 +54,7 @@ using namespace com::sun::star::script; using namespace com::sun::star::bridge; using namespace com::sun::star::bridge::ModelDependent; using namespace cppu; -using namespace rtl; + HRESULT doTest(); bool incrementMultidimensionalIndex( sal_Int32 dimensions, diff --git a/extensions/test/ole/unloading/unloadTest.cxx b/extensions/test/ole/unloading/unloadTest.cxx index fa3e39271365..35ccd1ab1005 100644 --- a/extensions/test/ole/unloading/unloadTest.cxx +++ b/extensions/test/ole/unloading/unloadTest.cxx @@ -171,18 +171,6 @@ sal_Bool test3() Reference<XComponent> xcomp( context, UNO_QUERY); xcomp->dispose(); -// for (int i=0; i < 10; i++) -// { -// Reference<XSimpleRegistry> xreg= createSimpleRegistry(); -// xreg->open( OUString( RTL_CONSTASCII_USTRINGPARAM("applicat.rdb")), -// sal_False, sal_False ); -// Reference< XComponentContext > context= bootstrap_InitialComponentContext(xreg); -// Reference<XComponent> xcomp( context, UNO_QUERY); -// xcomp->dispose(); -// -// } - -// return sal_True; return bTest1 && bTest2; } diff --git a/extensions/test/pgp/makefile.mk b/extensions/test/pgp/makefile.mk index 9fe20937d2b7..96b7883e9e7a 100644 --- a/extensions/test/pgp/makefile.mk +++ b/extensions/test/pgp/makefile.mk @@ -25,23 +25,18 @@ # #************************************************************************* - - PRJ=..$/.. PRJNAME := extensions -#PACKAGE := com$/sun$/star$/pgp PACKAGE := TARGET := test_com_sun_star_pgp - # --- Settings ----------------------------------------------------- -.INCLUDE : settings.mk +.INCLUDE : settings.mk # Files -------------------------------------------------------- - APPLICATRDB := $(SOLARBINDIR)$/applicat.rdb RDB := $(APPLICATRDB) @@ -52,51 +47,6 @@ GENJAVACLASSFILES= \ $(CLASSDIR)$/com$/sun$/star$/beans$/PropertyState.class \ $(CLASSDIR)$/com$/sun$/star$/container$/XSet.class \ - -#$(CLASSDIR)$/com$/sun$/star$/awt$/FocusEvent.class - -# $(CLASSDIR)$/com$/sun$/star$/awt$/InputEvent.class \ -# $(CLASSDIR)$/com$/sun$/star$/awt$/KeyEvent.class \ -# $(CLASSDIR)$/com$/sun$/star$/awt$/MouseEvent.class \ -# $(CLASSDIR)$/com$/sun$/star$/awt$/WindowEvent.class \ -# $(CLASSDIR)$/com$/sun$/star$/awt$/PaintEvent.class \ -# $(CLASSDIR)$/com$/sun$/star$/awt$/Rectangle.class \ -# $(CLASSDIR)$/com$/sun$/star$/awt$/XFocusListener.class \ -# $(CLASSDIR)$/com$/sun$/star$/awt$/XKeyListener.class \ -# $(CLASSDIR)$/com$/sun$/star$/awt$/XMouseListener.class \ -# $(CLASSDIR)$/com$/sun$/star$/awt$/XMouseMotionListener.class \ -# $(CLASSDIR)$/com$/sun$/star$/awt$/XWindow.class \ -# $(CLASSDIR)$/com$/sun$/star$/awt$/XWindowListener.class \ -# $(CLASSDIR)$/com$/sun$/star$/awt$/XPaintListener.class \ -# $(CLASSDIR)$/com$/sun$/star$/bridge$/XBridge.class \ -# $(CLASSDIR)$/com$/sun$/star$/container$/XIndexAccess.class \ -# $(CLASSDIR)$/com$/sun$/star$/frame$/FrameAction.class \ -# $(CLASSDIR)$/com$/sun$/star$/frame$/FrameActionEvent.class \ -# $(CLASSDIR)$/com$/sun$/star$/frame$/XComponentLoader.class \ -# $(CLASSDIR)$/com$/sun$/star$/frame$/XController.class \ -# $(CLASSDIR)$/com$/sun$/star$/frame$/XFrame.class \ -# $(CLASSDIR)$/com$/sun$/star$/frame$/XFrameActionListener.class \ -# $(CLASSDIR)$/com$/sun$/star$/frame$/XFrames.class \ -# $(CLASSDIR)$/com$/sun$/star$/frame$/XFramesSupplier.class \ -# $(CLASSDIR)$/com$/sun$/star$/frame$/XModel.class \ -# $(CLASSDIR)$/com$/sun$/star$/io$/BufferSizeExceededException.class \ -# $(CLASSDIR)$/com$/sun$/star$/io$/NotConnectedException.class \ -# $(CLASSDIR)$/com$/sun$/star$/io$/XInputStream.class \ -# $(CLASSDIR)$/com$/sun$/star$/io$/XOutputStream.class \ -# $(CLASSDIR)$/com$/sun$/star$/lang$/IndexOutOfBoundsException.class \ -# $(CLASSDIR)$/com$/sun$/star$/lang$/XComponent.class \ -# $(CLASSDIR)$/com$/sun$/star$/lang$/XMultiServiceFactory.class \ -# $(CLASSDIR)$/com$/sun$/star$/lang$/XServiceInfo.class \ -# $(CLASSDIR)$/com$/sun$/star$/text$/XSimpleText.class \ -# $(CLASSDIR)$/com$/sun$/star$/text$/XText.class \ -# $(CLASSDIR)$/com$/sun$/star$/text$/XTextContent.class \ -# $(CLASSDIR)$/com$/sun$/star$/text$/XTextCursor.class \ -# $(CLASSDIR)$/com$/sun$/star$/text$/XTextDocument.class \ -# $(CLASSDIR)$/com$/sun$/star$/text$/XTextRange.class \ -# $(CLASSDIR)$/com$/sun$/star$/uno$/XNamingService.class \ -# $(CLASSDIR)$/com$/sun$/star$/uno$/Enum.class - - JAVACLASSFILES= \ $(CLASSDIR)$/$(PACKAGE)$/TestPGP.class @@ -105,10 +55,8 @@ TYPES={$(subst,.class, $(subst,$/,. $(subst,$(CLASSDIR)$/,-T $(GENJAVACLASSFIL GENJAVAFILES = {$(subst,.class,.java $(subst,$/class, $(GENJAVACLASSFILES)))} JAVAFILES= $(subst,$(CLASSDIR)$/$(PACKAGE)$/, $(subst,.class,.java $(JAVACLASSFILES))) $(GENJAVAFILES) - # --- Targets ------------------------------------------------------ - .IF "$(depend)" == "" ALL : $(GENJAVAFILES) ALLTAR .ELSE @@ -118,7 +66,6 @@ ALL: ALLDEP .INCLUDE : target.mk $(GENJAVAFILES) : $(RDB) -# javamaker -BUCR -O$(OUT) $(TYPES) $(RDB) javamaker @$(mktmp -BUCR -O$(OUT) $(TYPES) $(RDB)) $(JAVACLASSFILES) : $(GENJAVAFILES) diff --git a/extensions/test/sax/testsax.cxx b/extensions/test/sax/testsax.cxx index e08231409bed..67ea67a31038 100644 --- a/extensions/test/sax/testsax.cxx +++ b/extensions/test/sax/testsax.cxx @@ -51,10 +51,8 @@ #include "factory.hxx" -using namespace rtl; using namespace usr; - #define BUILD_ERROR(expr, Message)\ {\ m_seqErrors.realloc( m_seqErrors.getLen() + 1 ); \ diff --git a/extensions/test/sax/testwriter.cxx b/extensions/test/sax/testwriter.cxx index 19efbc72a947..1f778092e2eb 100644 --- a/extensions/test/sax/testwriter.cxx +++ b/extensions/test/sax/testwriter.cxx @@ -51,7 +51,6 @@ #include <usr/reflserv.hxx> // for EXTERN_SERVICE_CALLTYPE using namespace std; -using namespace rtl; using namespace usr; #define BUILD_ERROR(expr, Message)\ diff --git a/extensions/workben/makefile.mk b/extensions/workben/makefile.mk index ca25cfa51312..d62100ac26c5 100644 --- a/extensions/workben/makefile.mk +++ b/extensions/workben/makefile.mk @@ -32,11 +32,6 @@ TARGET=workben LIBTARGET=NO TESTAPP=testpgp -#TESTAPP=testcomponent -#TESTAPP=pythontest -#TESTAPP=pythonautotest -#TESTAPP=testresource -#TESTAPP=testframecontrol .IF "$(TESTAPP)" == "testresource" || "$(TESTAPP)" == "testframecontrol" TARGETTYPE=GUI @@ -106,27 +101,14 @@ APP2STDLIBS = \ # test python. # .IF "$(TESTAPP)" == "phytontest" - OBJFILES= $(OBJ)$/pythontest.obj - -#APP4TARGET= pythontest -#APP4OBJS= $(OBJ)$/pythontest.obj -#APP4STDLIBS=$(TOOLSLIB) -# - .ENDIF # phytontest # # python auto test # .IF "$(TESTAPP)" == "phytonautotest" - OBJFILES= $(OBJ)$/pythonautotest.obj - -#APP5TARGET= pythonautotest -#APP5OBJS = $(OBJ)$/pythonautotest.obj -#APP5STDLIBS=$(TOOLSLIB) - .ENDIF # phytonautotest # diff --git a/extensions/workben/pythonautotest.cxx b/extensions/workben/pythonautotest.cxx index aab403885835..e0d3469476b9 100644 --- a/extensions/workben/pythonautotest.cxx +++ b/extensions/workben/pythonautotest.cxx @@ -42,9 +42,11 @@ #include <tools/string.hxx> #include <osl/conditn.hxx> -using namespace rtl; using namespace usr; +using ::rtl::StringToOUString; +using ::rtl::OUStringToString; + #define PCHAR_TO_USTRING(x) StringToOUString(String(x),CHARSET_SYSTEM) #define USTRING_TO_PCHAR(x) OUStringToString(x , CHARSET_DONTKNOW ).GetCharStr() diff --git a/extensions/workben/pythontest.cxx b/extensions/workben/pythontest.cxx index dfb3fa3e0019..7f480af53c05 100644 --- a/extensions/workben/pythontest.cxx +++ b/extensions/workben/pythontest.cxx @@ -43,9 +43,12 @@ #include <tools/string.hxx> #include <osl/conditn.hxx> -using namespace rtl; using namespace usr; +using ::rtl::OUStringToString; +using ::rtl::StringToOUString; + + #define PCHAR_TO_USTRING(x) StringToOUString(String(x),CHARSET_SYSTEM) diff --git a/extensions/workben/testcomponent.cxx b/extensions/workben/testcomponent.cxx index 9ba161f9eea8..ece2570df35c 100644 --- a/extensions/workben/testcomponent.cxx +++ b/extensions/workben/testcomponent.cxx @@ -50,9 +50,12 @@ #include <smart/com/sun/star/test/XSimpleTest.hxx> -using namespace rtl; using namespace usr; +using ::rtl::OString; +using ::rtl::OWStringToOString; +using ::rtl::OStringToOWString; + // Needed to switch on solaris threads #ifdef SOLARIS diff --git a/extensions/workben/testresource.cxx b/extensions/workben/testresource.cxx index 069f33c631b7..eca30044bbdc 100644 --- a/extensions/workben/testresource.cxx +++ b/extensions/workben/testresource.cxx @@ -37,8 +37,8 @@ #include <usr/services.hxx> #include <vcl/svapp.hxx> -using namespace rtl; using namespace usr; +using ::rtl::StringToOUString; class MyApp : public Application { |